From 41c20feedb0e2fad5213b8c386f008322b9f83a6 Mon Sep 17 00:00:00 2001 From: nimadez <111365948+nimadez@users.noreply.github.com> Date: Mon, 29 Jul 2024 18:13:47 +0330 Subject: [PATCH] Update 4.3.3 --- CHANGELOG.md | 9 ++++ README.md | 2 +- electron.js | 8 ++-- index.html | 2 +- libs/babylon.gui.min.js | 2 +- libs/babylon.inspector.bundle.js | 2 +- libs/babylon.js | 2 +- libs/babylonjs.loaders.min.js | 2 +- libs/babylonjs.materials.min.js | 2 +- libs/babylonjs.serializers.min.js | 2 +- libs/three-mesh-bvh.module.js | 21 +++++++-- libs/three.module.min.js | 2 +- package.json | 10 ++-- src/main.js | 69 +++++----------------------- src/modules/pathtracer/pathtracer.js | 2 +- 15 files changed, 56 insertions(+), 81 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a1d708e..08e12d7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ All notable changes to this project will be documented in this file. +## 4.3.3 +- Update three-mesh-bvh to 0.7.6 +- Update three to r167 +- Update to babylonjs 7.17.0 +- Prevent frame camera on quickload voxels (holds the camera for further changes) +- Remove showSaveFilePicker, this experimental technology is not ready for production
+ Fix save file functionality in electron and mobile
+ Fix save format from .txt to .json in mobile + ## 4.3.2 - Update to babylonjs 7.13.1 - Update to three r166 diff --git a/README.md b/README.md index 4b7effcd..f878502b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Voxel-based 3D modeling application
[https://nimadez.github.io/voxel-builder/](https://nimadez.github.io/voxel-builder/) -```Version 4.3.2 Beta```
+```Version 4.3.3 Beta```
[Changelog](https://github.com/nimadez/voxel-builder/blob/main/CHANGELOG.md) [Installation](https://github.com/nimadez/voxel-builder#installation)
diff --git a/electron.js b/electron.js index bdab8870..58f26391 100644 --- a/electron.js +++ b/electron.js @@ -1,9 +1,7 @@ -const { app, BrowserWindow, nativeImage, globalShortcut } = require('electron'); - -if (!app.requestSingleInstanceLock()) { - app.exit(0); -} +if (!require('electron').app.requestSingleInstanceLock()) + require('electron').app.exit(0); +const { app, BrowserWindow, nativeImage, globalShortcut } = require('electron'); const APPICON = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3FpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDA5ZDQ4Ni00ZmQ0LWZiNDktODZjYy05N2Q0ZDc1ZmRmYWUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzM0MDIyM0NDRkVEMTFFRDg1NThGQzVFOTExREY1OUIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzM0MDIyM0JDRkVEMTFFRDg1NThGQzVFOTExREY1OUIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOmQ4MGRjNzEzLTkwMzEtYzM0Zi1hOTc4LTQ5YjIzNWQ1YjM2NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDA5ZDQ4Ni00ZmQ0LWZiNDktODZjYy05N2Q0ZDc1ZmRmYWUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5+rn/PAAA080lEQVR42uzde3Qc9X338d/uSrszNsjGxMH4hrAs6y6bS8IlNtgm54TTh5AGEsDQJ03Ck8Mh7ZOc0zx9Tp4+DX8oSS9Jm5amadIkpJc0UdOkTwJt7gXfMOYWkGRJlmyMb1hgsI3BYker2z6/kRaQZWlnVlrt9zcz79c5c7ZJCb/R/Pbymd/szieWzWYVAACIljiHAAAAAgAAACAAAAAAAgAAACAAAAAAAgAAACAAAAAAAgAAACAAAAAAAgAAACAAAAAAAgAAACAAAAAAAgAAACAAAAAAAgAAACAAAAAAAgAAAAQAAABAAAAAAAQAAABAAAAAAAQAAABAAAAAAAQAAABAAAAAAAQAAABAAAAAAAQAAABAAAAAAAQAAABAAAAAAAQAAABAAAAAAAQAAAAIAAAAgAAAAAAIAAAAgAAAAAAIAAAAgAAAAAAIAAAAgAAAAAAIAAAAgAAAAAAIAAAAgAAAAAAIAAAAgAAAAAAIAAAAYBplUT8An/78QzwLACCC7v/czQQAiIorVmIKMcwhQMAk9BbjMPDaJgBggd426G19bnsPh6Qgu/X2aG7bqbdXOSQwzMJJr/FrOSS8tgkA0bQi9ybw5htCE4dkVq7JbX+Y+89dE94w3MfDHCKU2MpJr/FGDgmvbQJANDVMSP7uG8IlHJI5P97udk/uPx+d8Ibhbns4RCiyxkmv8ZUcEl7bBIBo+4Le7tXbIg6FKHfF5c7c5jqtt6/r7Y84NJilL+Ze4xdwKIx6bbfobYDDUzi+fDZ7NXp7RG//lw9/I7nXY/+P3rbprY7DgRmo1dvWXIjkw9+813a73jZzOAgApfax3JNvE4fCeNfn5upuDgUK8PHc82Yjh8JYa/T2sN7+mENBACgF99LJt/X2Hb2lOByBUZ6btwf0luRwwOO58gDPlUD5vN5+rrdKDgUBYC7PJDs4kwz8WZ07h6zcYCobc8+Pj3MoAudGNb5icyeHggBQbFxLDo+J390A3uRe53ev99dyKAKrQm/f09vfcigIAMX88P8TDkPofIEQgAkf/l/kMITG7+ntWQ4DAWC2rufDP/QhgMsB0baRD/9QWsdKAAFgNtwv/H2dwxB67hzzZa9oKuc1HvqVAL4TQACYkW8orvlHQQ0fApF+jXPNP/wBv5LDQAAohPs7f77tHx0fZ74jOed82z/8Kgj4BADOCOHnTIEVn2io5TUeKe5PBLlZEAHA9wcBN/mJHq4HR+s1zvc+osW9WRC3DSYA5MW3wqONX32En/uN/40chsgGP4vDQACYiq34XTjG7/uwhMMQSvMU7ZBR5nYH3MthIABMZQOHADkf5hCE0q0cAt7nOQQEgKms5xAg5w4OQSjdxiHgfZ5DQADgiYF8rtXbCg5DqLjL/zdxGCJvsRr/pRcBAGdhaQicLYbXLRwC8F5PAJjK1Wr81r/Am7gMEC4f5BAgJ/KrvQQAnhDI70q9VXEYQiHJCgB4vycATIflf0yFXwOEAx/+mKjq059/aCkBACRC5PNZDgFBDrznEwDCq15vizgMmMICvTVzGAKN5X8QAAgAPBEwI3x5LNj48MdUIn3ZlwDAEwH+/AGHgACH0Fn36c8/dB4BAKwAIB+3T3wthyGw73PczwG890/Cb97HLddbZakHXZB4Q33qontUTI0wAz598+WvqZeGxb6qccd9S7e0MwvB0tLXKnb2vzDRP/YaV2qUifDwRP896pevb5QY2l39/QUrANH1gt4OlXrQ10bmqxcyGzn6BWiyOyWH/z1mIJDEvv3fZO3lw9+ntrTYAtvOqB5zAsDbHpUYtMu5iiNfgFp7l+Tw5+uzySuYhUCd/bvvcbfLPV+fYhJ8eHnoKnV8+IJIvfcTAMwikgI7nBo1kj2Po+/TBWUdaln5CclduJNZCBTR5f+Lk7uYAR+6nWulhm67/3M39xMAIJICB7JJ9fzADRz9AjTZeySHv4cZCBSxn/81Wj2K5X9vWZVQbenGSJ34EQAMDKF6OyUx8B7nSo5+AWos0dfs/Ja+1muZhcDYIjXwGvsZjr4PRzOb1euj8yJ14kcAYBXgLXszq9TA6MUcfZ8WlO1VK8uPR/JDBf7poPZ+/RCTGLsinlbLkjuYBB86nXdH7j2fAGAmkVPLkWxc7R/YzNEvQKPsZYC7mYFAuE3u+dnDz3t9GM5W6ABQIzX8gfs/d3MfAQDiabA9fRlHvwC19jaZU7txtj673MQsGO8uuefn0xx9H9zvPw1kyzn7JwAY4XE3lEoMfHBwmXp9pIYZ8Om8xAFVmRQN77czC+Zi+T8YhL//RADgKXgOkcsAWb31ONdx9AvQaHdIDv9RZsBoH5Z7XrL874czukz1ZCoj915PADCbWCpsS6/j6BegZuwyQFZq+JQ+y7yRWTCW3Lf/rWc5+j7sdzaNff9JyCt66yUAwJgA4N7j/pWhdzMDPs2LH1ZVyWORPMvE9HLBTKTnZH58QC1PsfzvR7sj+r2nR5kBAsBURJeFBO+IFUhN80TPtj7KDBhJ8N7/vfpNdZAZ8PDaSK06OLg0su/zBABzOXr7odTgbU7j2J2x4M9qa7t+EotdBojnvmwGs3xEauBa+zccfR96nOuld+F7zAIBwLgnBw2BhbHjx1R16ojkLtAzbxD55f/tTIKfEx255j/Xr/X2MrNAAJjOg3oT+xovDYGFaZK95erv5BrnYAaW/w0n3PzH2T8BwJdvSw1MQ2BhqqztKhETLV35ILNgDLGb/9TYfPvfDwO+5/SvzAIBwMu/SA1MQ2BhUvHjqjZ1KJJnnXhbS1+r+6JJSYxtxzNqBTf/8ZRV5ZLNf64f6C3DTBAAvLg/E3lDavBO5wpmoAANspcBbtcfPklmQZzczX+s/Soec5gBD0cyGyWb/0RP7AgAwfM3UgN3Z6pUZnQJM+DTKmubKouJ3n3tFmZB3EelBq7j2/++CH+/yb3N+38yCwQAv8SuFbl3yNpHQ6BvydhJ1WAdEF0FYBbkSC//r0zy7X8vQ9mFqtNZI7kL32IWCACFcG82/5rY4OnLmYEC1FuilwF+W38IzWMWxLD8b7jnBzZJNv+5WP4nABTsC2IvmMFl6szIGmbAp0pru0rGhiV34VZmQYzczX9kg2dgCDf/ud/neoxZIAAEJjWONwRezwz4VB47rc/G9knuwp3MQum19LVu0A+2xNhWbEitTHFXWS9u81/vQKXkLvw1s0AAmImX9Paw1ODCd8wKnDrZ32LfqD+MKpiFkhO7G2O9tV8lYv3MgId9zmY1Ivtxw/I/AWDGxO4c9eLwherE0JXMgE+VqW3KjonejY17ApTe3RENnIHRIdv85/5Eo4dZIADMlOido7qc9cyAT+7ZWKPNZYCokF7+dwMn8nttuE4dHLw4kidwBIBwEG0IbHcaaAgs6KxM9DfZm/WH0oXMQsmw/G+4vTT/EQBCQOxJdHrkPPVChi8D+uX+JtttZhPEPQFKh+V/w7U7zZLD0/xHACgKGgKD8qSOOWPNbIK2MAtzr6Wv9WoltPzv/tz0Eqp/PR0fuprmPwJAaIg1BO5xamkILECt7GWA9frDifs4zz2xL1zWWwdUWewMM+CB5j8CQJh8X2pgx20IzNAQ6NeK1COqIp5mFSDc7pEauM5i+d+L2/zXnm6Q/vCn+Y8AUDRu36dcQ2CahkC/YmpENdqiv/zhewBzKLf8P19ibHf5373rJPKj+Y8AEEZflRqYhsACz9LspySHv0p/SK1gFuaM6PK/e9dJ5GdA899PmQUCQLG1Sg1MQ2BhliV3qIUJ0Z9p3cUszBmW/w1mQPPfN5kFAsBcoCEwMEZVk7U3kmepYdbS1+reGlNk+b8sNsLyvw80/xEAwuyLYi8sGgILO1ub97jk8JfrD6tqZqHoPiT2fEodZPnfB+HmP3fZbzezQAAIXbocbwi8jhnwaUn5Y2pRQvTnWncwC0X3SbEAYLdx9D0Y0Pz3V8wCAWAuvai3rVKDt6XXMQMFaLa7JIf/DDNQPC19re5PYc6XGNtd/l9lbWMSPBjQ/MfNfwgA4V0FGG8I5CeB/s/aHpMcfoH+0GpmFopG7HsV7vJ/MnaSGfAg3Pz3tN56mQUCwFwTvcNUNw2Bvi0uf0otLhO9bsuXAYuH5X+D0fxHAIgK9zZzP5IavM1pZPoK0Gx3Sg7/KWZg9lr6Wt1TS5b/DUbzHwEgSoQbAjcyA77P3nZJDl+Ru3aN2blFauA1qSMs//sg3Pz3K729wiwQAErlJ8r9sbkQGgL9W1TWppaUnZLcBS4DzJ7YSkq9xfK/F5r/CABRJNYQ2DFQQ0NgAdbO65Ac/veZgZlr6Wtdqx8qJMZOxEZVFTf/8UTzHwEgisRSpzOaUgcz3BrYrxpL9DLA/FyBDWZG7OY/NanDKhU/zgzkYUjz3yAzQQAoNeGGwCuZAZ8WlnWqZeUnJHeBywAzx/K/wWj+IwBEmWBD4CqVGb2IGfBprexPue5lBgrH8r/5aP4jAESZWEPgcDah9g3cwAz4tMZ+VHJ4W3+YbWAWCvYBqYGrk0dY/vdA8x8BIOqEGwIvYwZ8qkj0qsrkS5K7cBuzULA/kBq4zt7D0fdA8x8BAEr9idgLcHC5OjNC6ZxfjXa75PCfYAb8y91GeYHMm2NWrWb53xPNfwQAiDcEXs8M+LTG2qlicsOn9Ica12z8k1v+Tx1RdvwYM5AHzX8EAIzr09s2qcFpCPTvvMQBtSop+sZ+O7Pgm1ibYr3dwdH3QPMfAQAGPBlpCCyM8GWAjzED3lj+Nx/NfwQAvO37koPTEOhftb1DxcYunogo0x9uNzILnm6SGnh16ijL/x5eG66n+Y8AgAnchsB/lxqchkD/5sUPjxW8CNrCLHi6VWrgOquTo+9hr3Od9C4QAAgAxhFtCDw2eB0z4JPwNd7/zgxMr6WvtUo/XC4xtrsy5K4QweuEY63k8DT/EQCM9GOl5NaWO9Pcbt4v9xqve6c3ITH9Ifd+ZmFaYrdNrkoeG1shwvSOD12jXh5eyNk/AQBTEGwIrFUj2XnMgA/uNV636EXQXcyCeQGggW//e+pK0/xHAIBx6XS8IZCfmfslXPRye0tfK6/BSVj+N9uoSqoOp176w5/mPwKAsdzfD6WlBqch0L/V9iOqLDYiuQu3MgvnEKv+Zfnf21Ga/wgA8CTYEFhFQ6BPydgJVZc6KLkLdzAL5/ig1MB1dhdH3/ME492Sw9P8RwAIBLF7ArgNgfsHNjMDvt/0RS8D3NLS15pkFsbpY7FCP4h0y7q3h662djIJeYw1/w3Q/EcAgBfZhkCHhkC/qqyHVTI2LLkLH2YW3iLWlliZ7Bu7TTSm97w+scjQ/EcAgC9iDYEHMitU/8hqZsCH8thpVW+JvvFzGcCAMNRA9a8nmv8IAAhAWnVvRLDX2cgM+FRvPyM5/E0tfa2R/+2m9PL/Gpb/83JGl6semv8IAPBNtCGw3aEh0K9LU48oKzYkuQvcGpjlf6P1OpvVqGSRNjf/IQAEkNiTtm+IhkC/ErF+VW/tl9wFvgcg+O3/eotv/3vpkD2heErR/EcACCDRhsC9znuYAZ8a7Kclh39fS1/rwqgee/23L9EPYk/WansXL4A83Oa/QzT/EQBQMPeGQD+WGrzNaWKafboktU3Z8YzkLkT5y4BiKyAry4+rigQnl/lPJGj+IwBgpsS+DPgqDYH+XwwxRzVyGUCK2PX/Rr797+NEQrT575d6O8EsEACC6v8pGgIDocF+UnL4zS19rZG7hWNu+X+91Phr7Ed54udhQPMfv/0nAATeA1ID0xDo3/LUdjU/PhDJM2FBLP8bzIDmv39jFggAQUdDYCBeEIOq2e4hAJSWWCFSg93Jkz4PA5r/WhXNfwSAENjmfhaLpXiHhkC/6mQvA6zP3RAnEvTfeqF+uF5q/GrrcZ7wedD8RwBA8Yg1BHYNuA2Bi5kBH5Yld6iKeFpyF6K0CiC2/L+s/IRaWMYKQD7CzX/unbl+xiwQAMJC7DLAeEMglwH8iKkR1Wx3S+7C7QSAudfEt//zf/rS/EcAQFGJNgTucS5nBnwSvgzwrpa+1qqwH+Pc8r9Yb/Ua6zGe6HnQ/EcAQPH9qdTAz2WWq/6RKmbAh4uTu9TCRH8kz4yj8Dey/O/nhEH0e0Nn9MYXNAgAoSPYEBhTPTQE+jSq1sl+Q/yzBIC5w/J/fjT/EQAwN47pbbvU4DQE+lcjexlgQUtfa3NYj63+2yqU4PL/ausJnuB50PxHAEAIn9zHht6hTg7zXQA/Lirfrd6ReF1yFz7A2X/xLSk7pRaVtfMEz8OA5r99zAIBIKxEGwK70zQE+tU8T3Sp+H8RAIqviZv/5EXzHwEAc+sNRUNgINTILhVXtPS1rg3bMc0t/79PbE7t3Tyx86D5jwCAuSfYEHg+DYE+LS5/amzJWFAYbwokvPzfxhM77wkCzX8EAMw10YbALucqZsAn4SXj/0kACM1cGo/mPwIASkesIbDdqVOjWZsZ8EF4yfj8lr7WK8JyLPXfMl8JLv9XW0/yhM53YkDzHwEAJSP2ZcDxhsD3MgM+uEvG7o1jBN0RosN5i9TAi8tOq3eU/4Yn9DRo/iMAoLS2KsGGwE4aAn0TvnHMvSE6lLfJzWEXT+Q8aP4jAKD0/lZqYBoC/auxHpUcfn5LX+vVQT+G+m9wP11ukptDbv6T94SA5j8CAEqOhsAAWFDWrVaWH5fchbtCcBhvlRrYXf53f9GBaT59af4jAKD07lu6xb0lmdjt5mgI9K9R9jLA3SE4hCz/G+qAPhGg+Y8AABk0BAZAjb1D8u7odktf6/VBPXZ63y3F8r+x9jiiPzSh+Y8AEGk0BAbA+Yn9qjLZJ7kLWwJ8+H5bauBFiTMs/+fhjK5QvTT/EQAg476lW17QDzukxu9w1jIJPjXIXgb4aIAPndjNf5pZ/s+r19lE8x8BAMLEXgQvDC1WJ4cvYwZ8qLW36rdKsRs4plr6Wt8XtGOm9zmpBH//L1zrbLwOR/S1T/MfAQBKuCFwb3o9M+DDvPhhVZU8JrkLQewGEPvwd5f/3VpnTO30cIM6NLiEs38CACTdt3RLv374idT4NAT61zhPtEzmIwE8ZCz/G4rmPwIAzCH2Yjg11hC4gRnwodrapl84YpcBylr6Wt8flGPF8r/Z2pxmyeFp/iMAYMIqwI+UYENgt3M1k+CDHT+mqlNHJHchSJcBxMLKBYl+lv/zeGnoWvUKzX8EABjlO1ID0xDoX6Mtehngd/SZdSwgh0ps+b/R2ssTNV/gT18jvQs0/xEAMInYZYD0WEPgZmbAh9XWVpWIjUruwi2mHyMdUtz3l9ulxq+1+e3/dNzmv3anQXIXWu9buoXmPwIAJtIvCuGGwHcxCT6k4sdVTepwJM+sC/BBqYEXJvrVxcldPFGncTSzSZ0ZFV3tY/mfAIBpCDYErlaD2XcwAz402qLd8rfnvmBnMrGQ0jS2/D/Kk3S6oC/c/KdPdGj+IwBgGrINgc57mQEfVlnbVFlsRHIXjL0MwPK/udzmvz2yzX/fYBYIAJiGfEMgdwX0Ixk7qepTz0fyDNuHm6UGXpB4g+X/PNzmv8FsWSRPcEAACIo/kxp4f2aF6h9ZxQz40CB7GeAWfaY9z9BDc6vYnFi9iuX/fAFftvlPn+BQzUgAgKkpebwhcBMz4EOltV0lY8OR/KD1cJfUwLX20zwxp2FA899XmAUCADzolOzeaWan1Pg0BPpTHjutGq39krtwh2nHJHenQpH7FFTE02pZcgdPzGnQ/AcCAKsAnmgI9K/OfkZy+N/SH7gVhh0SsTsVNto9+uNthCfltMFe9DX9pD6x2c8sEADgDw2BAVCZ2qas2JDkLpj2ZUCW/w1E8x8IAAGi0/IZ/fCg1Pg0BPqTiPWrJrtXcheMuQzQ0td6k2L530g0/4EAEDyiDYF9g6wC+FEn+2uA9+oP3gsNORRid/+rt/az/J830Is2//1Cn9CcZBYIAChsFeCHkuN30RDoy8rkdjU/PiC5C6ZcBviI1MC1siHMaDT/gQAQXP8gNXAHDYH+XkgxRzVZopcB7pI+Bi19rTfqB5E7zLjha3lqO0/EadD8BwJAcIml5zdGLXWIhsAgnIGu1x/AS4QPgeC9/3v1mxnlclMxoPnv+/ct3TLETBAAMAP6xfOIEm0IvJJJ8ME9A3W/iCboduFDwPK/gWj+AwEg+L4mFgAGqtVg9kJmwPPFNDj2O3RBW6QGZvnfXMLNf4P6BObnzAIBALNDQ2AACP8O/Sr9QbxCaGyxb/83WPtY/p+GAc1/f88sEAAwSzpFtynRhsDLmQQflie3q4WJfslduFNo3N+VC13P8sSbBs1/IACEh2hD4BsjlzIDnkZVk7VXcgdKfhvelr7WG/RDSuKPteOZsZ9gYrrgTvMfCABhQUNgANTZou95l+sP5KoSjyn27X+3iMn9CSbORfMfCAAhIt0Q2O6sYxJ8WJLcpRYlzkjuQqkvA3xULmzx7f/p0PwHAgCrAEXjNgSeGqYm2I9mu0ty+M+UaiCW/81F8x8IAOEj2hDY7WxgBnyotXdLDr9AfzCX6sbvt0j9kQ0s/0+L5j8QAEIo1xD4kNT4belmnjY+vLP8SbW47LTkLpTquvzHpP7AGqudJ9o0aP4DASC8aAgMgCbZywCfmusBWvpa3eUgkVvMWbEhVZnaxpNsuqBO8x8IAKFFQ2AA1NuPSg5foT+g5/oi8G1ix9barxKxfp5kU3hpkOY/EABCS6frrH74R6nxaQj0Z1FZm1pSdkpyF+a6G+BuqT+sjpv/5Ano10rvAs1/BADMMbHLADQE+tds75Ec/pNz9S9m+d9M481/9ZK7QPMfAQAlWAX4L0VDoPFqZS8DnK8/qOfqeo3YzX9Y/p/ekcwm1U/zHwgAkfB3UgN3DaymIdCHhWWdaln5CcldmKsP6o9L/UE1dgdPrOmCOc1/IABEhthlgKFsmXrOuYEZ8KHZFv252r3F/hfmVhXmS/wxydiwqqT6d5rX5AWqk+Y/EACiQadt95tQNAQarsbeKTm8nbteH4RVBU/11gFVHjvNk2oKNP+BABA9fy418L7MSvXGSCUz4KEi0atWlh+X3IVi/1zvHqk/pM7i2//TBvK0aCCn+Y8AgCil7rGGwAEaAv1ontcmOfwnivUvEl/+t1j+n0p6dKXqzYiGcZr/CAAoNZ26D+uHXVLjd6RpCPRjjbVTspctlSvtKQaW/w1E8x8IANEl9tObo0PvVK8ONzMDHs5LHFCXJo9J7kKxPrg/IfUHcO//PEFctqqb5j8CAAQJNwRexwz40CT7a4BZ37Wvpa/1Cv1wvsTOl8VG1KXWDp5EUzg93KgO0/wHAkA06fTt/hJAsCGwiUnwodreoWIqKzV8mf4Av9GQVYSC1aUOqmSMfhlDAzgBgACAqL4IT45UqL7BDcyAh3nxw6o6dVRyF2bbDfBJqR2vs9t4Ak2jXbb57+c0/xEAIE+0IbDbuYYZ8KFB9jLA7870fyi9/L/K2saTZwrjzX8LJHeBW/8SACBNuiGwnYZAX1Zb2/WLTuwyQEx/kL9/hv9blv8NRPMfCAB4k3BDIPcE8GLHj6la65DkLtw5w//dvVI7zPL/1Axo/vuePvEYZiYIADBjFcBtCByQOxt5F5PgQ70l+oF2R0tfa0Gve/3Pr9UPFRI7m4iNqktTj/KkmQLNfyAAYLKvSw3cSUOgL1XW9rHr2oI+WOA//yGpHa1JHVap+HGeNFO93mSb/zL6hOMXzAIBAGYRS+U0BPrjfqC517UFFXoZ4FNSOyq8WmIsmv9AAMA5dCp/RtEQaDzh69q3tPS1Jv38g9LL/1Xc+39KNP+BAIDpfElqYBoC/amyto6V2wj6UJH/uaJj+T9P0JZv/nuSWSAAwEyiDYG9NAR6Ko+dGiu3EbTF5z/H8r9hDGj++0tmgQAAQ+l0fkg/PCY1fjsNgb4Id9vf1NLXOi/fPyC5/O/eK2GVtZMnyRRo/gMBAF5oCDTcKuthZcWGJHfB69bAN0vtWHXqiLLiL/IkmYJw898T+gTjOWaBAACzCTcE0g3gJRHrV/WWaIuqVwD4jNSO1dsdPEGmYEDzH7/9JwDAdDqlv6Yf/kNq/PY0KwD+PuiekRz+fS19rVMu8ev/3p1AkZvMu8v/q/n2/zTBWrz57/vMAgEAwSB2re7ESIV6cXA9M+ChMvWIsuMZyV2Y7p4AH5DaIXf5371lMqYI1vLNf6eYBQIAgkG0IbCLhkDvF2DMUY2ylwGmK/lh+d8wNP+BAADfdFof1Q//JHe2Uq9GlcVEeH7gif6kenNLX+viif+F5PJ/bGz5fwdPiikDNc1/IACgMKINgYe5J4CnFantan58QHIX7pj0n39LakeqkseUHX+BJ8UkNP+BAICZrAL8Wgk2BHbSEOjjRTiomqxeyV24bdJ//rDUjjSw/D8lmv9AAMBMiTUEdg1U0xDoQ/28JySHX9/S17rM/T/0Y5V+ELnPrLv8X22z/D9lkKb5DwQABC29u4UlBwY2MwMeliV3qIp4WnIX7pA++3eX/+fFD/NkmITmPxAAMGPiDYFpGgK9z35HVJO9V3IXPiwdAFj+nxrNfyAAYLa+LDVwb+YSlR69hBnwUG+LXga4iuV/M9H8BwIAApvi3YbAHofLAF4uTu5SCxP9JqwClFxl8kWW/6dA8x8IAJg1neIP6ofdUuPTEOjHqFprd0nuwGelBm6w9zD9U+jVwZnmPxAAUAw0BBquVvYygNDNf5RaQ/WvicGZ5j8CAEKEhkDDXVS+Wy1KnInU31yZ7FPnJQ4w+ZO8OtykjgxdFMkTBhAAUGQ6zZ/WDz+VO5thBcCPdfOi9W14lv+ntpfmPxAAEJZUT0OgPzXWE5H5W1n+n16b0yQ5PM1/BACEkGihR7dzNTPgYXH5U+qislcj8bdeknyJ5f8pvDT4HnWC5j8QAFBMuYbAf5Yav91pGCs2QX7NEVkWr7c6mewpGFClTfMfAQAhJfbTnv6xhsAbmAEPNfbuSPyda+xHmexJxpv/GkTfH2j+IwAgvKsAv9IPGbmzGxoCvSwqa1NLy0+G+m9cWX5cVSR6mexJ3IDsBmVBLP8TABByYg2BnQPVaii7iBnw0Bzye+M38u1/EwMyzX8EAESA2GUAt9jkOS4DeFpjPRbuv4/l/3O4wdgNyIJo/iMAIOx0yn9a0RBotIVlnWPL5GG0ovxllv+n8BzNfyAAoETEGgL30RDoS1iXyRtkOw+MRfMfCAAIfdp3C056nU3MgAd3mTwWxr8r5Jc3ZsINxG4wFvQXzAIBABFBQ6D53GVy9175YbKs/MTY5Q2czQ3Ews1/fPufAICIEXvRu0UnbuEJ8gvbvfKb+Pa/iYH4cX1C8DyzQABAtIgWfhhQeGK8GmubPi/MhubvYfn/XDT/gQCAkpNuCBQuPAmE+YlDqip5LBR/C8v/xgZhmv8IAIgosS8DuoUnbvEJ8msIyU2B6q1uJtO8IPwzfSLwKrNAAEA0iRZ/GFB8Yrw19iP6xRr8ywBR6TgoBM1/IABAjE7/I/rhu1Lj0xDozY4fU9WpI4H+G5aUnRrrOIBxAZjmPwIAIo6GQMM12MH+8GyyufY/mQHNf9/NnQCAAIAIrwL8UtEQaLRqa6tKxEYDu/8s/5/LgOY/bv1LAADGfENq4PGGwAuYgTxS8eOqJnU4kPvO8r+RwTeTC/4gAACyDYEHuAzgqdF+JqD7zbf/JzOg+e8bzAIBABijzwae0g9npManIdDbKmurKosF75JttUXHzGQ0/4EAANOIFYL0ZipVenQlM5BHMnZS1aUOBmqfF5edVovLn2LyzAq8Z3KBHwQA4C1ivwmmIdCfRvvpQO1vE9W/56D5DwQAGCdXCPK41PgdDg2BXiqt7SoZGw7M/tZYTzBpk9D8BwIAWAWY5PDgEnV6uJEZyKM8dlo1WM8FYl9Z/p8azX8gAMBUosUg3TQEeqq3fxOI/Wzi3v/noPkPBAAYK1cM8jOxsyOnmUnwUJnapqzYkPH7WR2w7yuUAs1/IADAdGJnCa+MNQReywzkkYj1q0Z7n9H7uChxRl1Uzt3/JqP5DwQAmE64IZAA4KXe8LPrZr79fw6a/0AAgPHkGwLraQj0sDK5XdnxjLH7V2Nz859zgy3NfyAAIBgEGwJtdSTDPQHyvnhjjlpr9Ri5byz/n4vmPxAAEKRVANGGwM70u5kED7WG/hqA5f9z0fwHAgCC5u/FAsDAGhoCPSxPbVfnxR3j9qva+g2TM/n5TPMfCAAIGBoCjX4BD+qz7b1G7dPCRL+6OPkYk3PWc/lC1UXzHwgACBJ91uB+k4uGQIPVGvZrgCbLDSSjTMwEBwY20/wHAgAC6S+lBqYh0Nuy5I6xs25zAgm3/jUsyNL8BwIAgnf2QEOgt5gayZ11yxtf/t/FpEzgNv/10vwHAgCCSJ89uM0zYpVue2gIDMxZN8v/5+pxNqsszX8gACDAxN5EDo01BDYwA3lcnNw59tt7aTXc+/8cNP+BAICgEy0Q2UtDoCfp395XxNMs/0/y6nCzOjr0Ts7+QQBAcOmziFP64edS47fREOip1n5cdPxGu2fs+wh4W7ezIdLBHQQAhIdgQ+BC9dIQBUH5vLP8CbW47LRgAGH5f7L2tGhwpfkPBAAUjWiRSHf6GmbAQ5PQZQB3+d/9OSLe9uLgenVipCKSgR0EAISMPpsYVoI/CXSLVGgIzK/OlrkDH8v/56L5DwQAhI3YWcWZUVsdpSEwrwvLnlFLyk6VfFyW/882qqyxSmtB/0zzHwgAKPYqwC8UDYFGa7I7Szre/PiAWsq3/89yeGCTeoPmPxAAEEJiDYF7xhoCFzIDedTZO0sbOKzesVIiTAiq8s1/v2IWQABAqM4uaAj0trCsUy0rP1Gy8Wptqn/Pfo6KN/99nVkAAQBzQrwh0LmCSfDQbHeUZBx3+X95ajsHfAKa/0AAQNjJNQQOVCpndAUzkEeNXZqf5LH8P0VAlW3+e10HdL6RCQIA5pTYHcZoCPRWkehVK8uPz/k4LP+fzYDmvy8zCyAAYE7ps4z9+uFJqfE7nMuYBK+z83ntc/rvt+MZlv8nMaD5j+V/EAAQ7jcbGgK91Vg75vSjqNHaz/L/JMLNf7t1MD/ILIAAgNCfbdAQmN95iQOqMtk3Z//+Opb/z0LzHwgAiAx9tnFSP/xCanwaAr01221z8u91l/9XJln+n4jmPxAAEDWiDYHHhygIyqfadi8DZIv+7x1b/o85HOAJhJv/fqoD+WlmAQQAlJJo4UhXmorgfObFD6vVqReK/u9l+f9sNP+BAIDI0WcdQ0pw6bHDqach0OtsvciXAazYIMv/k4MozX8gACCixM4+Xh+dp45mNjIDeay2tusXevEuA9Rbz7H8P4EhzX+jzAQIAJBYBfi5fhD7PRgNgfnZ8WOqxjpUtH9fnf0sB3UCmv9AAEDUiTUEdtIQ6KnBKs5lACs2pCpT2zigE59/NP+BAICIEzsLyWTL1fMDm5mBPKqs7SoRm/0qcb21X/97+jmgOTT/gQCAyNNnIU8o0YbAK5mEPFLx46o+9fys/z0s/5+N5j8QAIBxX5EauGesIXA5M5D3w3t2lwFY/p8ieNL8BwIAIHs2Mt4QyGWAfFZZ21QyNjzj/32t9TzL/xPQ/AcCAJAj3xC4jknIIxk7qeqtAzNfQbBY/p+I5j8QAABD3pQODV6sXhuuZwbm4EPcXTmotLj5z0Q0/4EAABh0VkJDYH6XWlvHruUXyl05KI9xq/k30fwHAgAwSa4h8JdS47c5a5mEPMpir4/9lK9UKwdh1S0fNGn+AwEARhI7O3mZhkDvD/MCf8rH8v8UQTPdJDk8zX8gAMBYNAQa7NLUw8qOZ3z/87Wp51n+n6BvcIM6SfMfCADAufTZidsL0Co1Pg2BHi/6mKMaC7gMUGt3cNAm6Kb5DwQAwMyzFBoCvdXb/u4fUxYbGbt/AMaNZm3V7tRJ7gLNfyAAwPhVgJ/phyGp8WkIzG9FaquaHx/w/OfqUgfH7h+AcYcyNP+BAAD48U2xAEBDoMcLf1A1Wb3eAcBu42BN0EXzHwgAgC9ilwHGGwI3MQN5P9zz37SR5f+zuc1/nQOrJXeB5j8QABAM+mzlcUVDoLGWp7arinh62v9/Lcv/Z3nOuUEN0fwHAgDg219JDdw71hC4jBmYRkyNqEa7Z/oAYO3hIJ0VKGn+AwEACMRZy4h+eu+jITCvBvvxKf/7RGxUVXHzn7e8MVKp9mVWSu4CzX8gACBY9FnLPv3wlNT4Hc5lTEIeFyd3qYWJcyt+a1KHVSp+nAOU0zOwieY/EACAIL15HRxrCKxjBqY1qprt7nP+23qLb/+fFSRp/gMBAAje2cte53pmII+6SZcBWP4/mwHNf99lFkAAQCDps5cTSrAhsN1pZhLyuKh8t1qUePvHGiz/n43mPxAAgNkRuyfA8eEL1PGhq5mBPNbZb3/jn2//n024+e8/dIB+jVkAAQBBJlpg0u3QEJhPTe4yQFxlVZW1gwOSY0DzH1/+AwEAwSbdENiebtAfbeVMxDQWlz+lFpedVtWpI8qOH+OAvBUcxZv/fsgsgACAMBBtCDxCQ2Be6+wOVU/171sMaP77J5r/QABAWFYBRBsCu5yrmIQ8au1dajXf/n8LzX8gAADF9S2pgTsdGgLzuaCsg+X/swKjaPPfgA7Mv2YWQABAmIhdBhigIRA+0fwHAgBQZPqsZrd+6Jcan4ZA+GFA89+/MAsgACCMaAiE0Qxo/nuGWQABAGFEQyCMZUDz35eYBRAAEEr67KZXP4h1m3c465gETIvmPxAAgJC+yR0cXKpeG6llBjB1QJRt/ntMB+RDzAIIACAAzNVZHg2BmIIBzX98+Q8EAISbPst5RT/8Smr8tvRaJgHnoPkPBAAg5KsAbkPgy0PcGRCTgyHNfyAAAKXwr7JnezQE4m00/4EAAJRIriFQLAS0pRtVViWYCOQCIc1/IAAApSTaEHg0wz0BQPMfCACAxCrAT/XDsNT4nc67mQTQ/AcCACDkm3IBoEYNZyuYgYij+Q8EAECGcEPgDcxAhNH8BwIAIISGQEii+Q8EAECWWENgT4aGwCjrcK6QHJ7mPxAAEHlid0AbycbVfmcTMxBBb4xcqvZnVkjuAs1/IAAg2vRZUI9++I3U+O3OZUxCBPU4NP+BAACYgIZAlDj40fwHAgAQ6QAwfjZIQ2CUnBpeq14YWiy5C3z5DwQAwKXPhl7WD2K/h6YhMFq6nQ3Su0DzHwgAgAmrADQERuutry3dLLkDNP+BAABMQkMg5lzf4Hp1auT8SAZdgAAAI+mzoox++IHU+O1OAw2BEdDlXC29CzT/gQAATEHsy1GvjcxXRzPcEyDM3Oa/Dpr/AAIAjFwF+E8l2BDYRUNgqB3KbKb5DyAAwGDfkhp4j1OrhrPnMwMh1Snb/UDzHwgAgAcaAlF0481/1ZK78HfMAggAQB76LOkx/fCG3CoADYFhtN95rxrOin7Jk5v/gAAA+PDXUgP3ZC5VA6NLmYGQ2eNcLjm82/z3LLMAAgBg8NmS2xC4b4BfA4SJAc1/f84sgAAA+CDdENiRvpxJCBGa/wACAIJFtCHw9ZEaZiAkhJv/dulAe5hZAAEACEAAyOptr7ORGQgBmv8AAgACRrohsF22MAZFQvMfQABAMIm9eb40vEi9PMSdAYP+Nifc/PeQDrKvMw8gAACFE24IfA8zEGA0/wEEAASUPnsa0A//JjU+DYHBRvMfQABAsImdRdEQGFwGNP/9ow6wWWYCBABg5qsADykaAlEgmv8AAgDC4dtSA9MQGEzCzX+ODq7/xSyAAADMnmhD4MGBzcxAgND8BxAAEBL6bGqXoiEQPhnQ/MfyPwgAQBHdLzXw3swqNTB6MTMQEDT/AQQAhMsPpAZ2GwL3cxkgEGj+AwgACBl9VtWhH16TGr89fRmTEAA0/wEEAIRTi9TABweX0RAYADT/AQQAhJNoQ2CPcx0zYDCa/wACAEJKn10d1w9iv69uS69jEgxG8x9AAACrAHPCbQh8hYZAY9/SaP4DCAAIN+GGwGuZAQPR/AcQABBy0g2BbU4jDYEG6nKukd4Fmv9AAADCfLblNgS+kNnIDBjEbf5rp/kPIAAgEqsAwg2BVzEJBjmY2azSo6lIBlKAAIAoekBq4A6nRo1kz2MGDNHpvEtyeJr/QAAASkywITCpnh+4gRkwwGD2HaprYLXkLtD8BwIAUEr6rOtRRUNg5NH8BxAAEE1/IzUwDYFm2OOIdjTQ/AcCACBE7J4ANATK6x9ZRfMfQABAFNEQGG00/wEEAETbF6QGdhsCz4ysYQaEdDhrJYen+Q8EAECY2K8BxhsCr2cGBJwcvozmP4AAgCjTZ2Ev6YeHpcZvS69lEgTsTa+X3gWa/0AAAAwgdi32xeEL1YkhfhJY6revNqdJcgdo/gMBADCEaENgl7OeGSihY4MbpJv/WP4HAQAwgT4bc5RgG1u700BDYAl1O1dLP99o/gMBADCI2GWA0yPnqRcyfBmwFAxo/vsHZgEEAMCsVYAH9cOI1Pg0BJaGAc1/LP+DAAAY6NtSA+9xamkILAEDmv8eYRZAAADMI3Z25rgNgRkaAueSAc1/X2MWQAAADCTdENiZvoJJmEM0/wEEACAfsYbA7kyVyowuYQbmiAHNf23MAggAgLlEGwL30RA4Jwxo/vszZgEEAMBg0g2BHenLmYQ5QPMfQAAA/Pii1MDP0xA4N8FKtvlvpw6WR5gFEAAA89EQGCIGNP9x9g8CABAE+mztRf2wVWp8GgKLi+Y/gAAABGIVgIbA4r5VCTf/PagD5RnmAQQAIDhEGwK7nfcwA0VgQPMfy/8gAABBos/a0vrhR1LjtzmNvMyKEqRo/gMIAECAzt7GGwI3MgOzQPMfQAAAZnr29hP3c0RqfBoCZ4fmP4AAAMyGWENgx0ANDYGzQPMfQAAAZkPsMoCjz17ds1gUjuY/gAAAzIo+i9uhRBsC+TngTND8BxAAgGL4qtTA3ZlVKjN6ETNQIJr/AAIAUAytUgO7Z7H7Bm5gBgpA8x9AAACKQr4h8DImoQA0/wFzK5bNZiN9AD79+Yd4FkTLH+rtSxwGeNipt+s4DOF2/+duZgUAiBB+0w3O/gECACJItCEQgUHzHwgAAGd3iJgH9UbzHwgAQAi1cghAQAQBAIgetyHw3zkMmAbNfyAAAJzlIWJo/gMBAAi5H+sty2HAJPxKBAQAIAK+zSHABI7eaP4DAQCIAC4DYCKa/0AAACJiuxr/QiBAIAQBAIiYr3IIoL2uN5r/QAAAIoQvfcFF8x8IAEDEdCqu/UbdEb19ncMAAgAQPb+vt2c5DJF1r95OcxhAAACi+yGA6Pmi3n7GYQABAIiuJ/T2GQ5DpGzT2x9zGEAAAPAVRUdAVAwqVn1AAAAwgfuh8CKHIRLz3MNhAAEAwJte4cww9B7Q23c4DCAAAJjsQb19mcMQSj0EPIAAAOTzvxVfEAvjmX+z3oY4FAABAMjH/YnYZr31cigCzf3C3916+x98+AMEAMCvrbmzRq4ZB9M2va1l/gACAMAZZHS4KzibFN/2BwgAwCw9kDub3M6hMJp7b///pvgOB0AAAIpor9426u1PFfePN83p3Ly4IY3b+wIeyjgEwIz8UW5r0tv63LZBbys4NCVzVG879fZobtvDIQEIAECp7Mltb9bJXjIhDLiPDRyiounKfdC/+aF/mEMCEAAAUxzObd/L/ecLJoQBd7uGQ+Tb7gln9+6H/qscEoAAAASF+6H1UG7jNVeYYQ4BQAAA+FADgCKKZbNZjgIAABHDzwABACAAAAAAAgAAACAAAAAAAgAAACAAAAAAAgAAACAAAAAAAgAAACAAAAAAAgAAACAAAAAAAgAAACAAAAAAAgAAACAAAAAAAgAAACAAAABAAAAAAAQAAABAAAAAAAQAAABAAAAAAAQAAABAAAAAAAQAAABAAAAAAAQAAABAAAAAAAQAAABAAAAAAAQAAABAAAAAAAQAAABAAAAAgAAAAAAIAAAAgAAAAAAIAAAAgAAAAAAIAAAAgAAAAAAIAAAAgAAAAAAIAAAAgAAAAAAIAAAAgAAAAABm5v8LMAD0iA3vyiOnxgAAAABJRU5ErkJggg=="; function createWindow() { diff --git a/index.html b/index.html index 3021ac52..c16adfeb 100644 --- a/index.html +++ b/index.html @@ -315,7 +315,7 @@
  • - 4.3.2 Beta 2024 + 4.3.3 Beta 2024
    GitHub
    Developer
    @nimadez diff --git a/libs/babylon.gui.min.js b/libs/babylon.gui.min.js index 1f5bbe40..3a02583f 100644 --- a/libs/babylon.gui.min.js +++ b/libs/babylon.gui.min.js @@ -1,2 +1,2 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("babylonjs")):"function"==typeof define&&define.amd?define("babylonjs-gui",["babylonjs"],e):"object"==typeof exports?exports["babylonjs-gui"]=e(require("babylonjs")):(t.BABYLON=t.BABYLON||{},t.BABYLON.GUI=e(t.BABYLON))}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this,(t=>(()=>{"use strict";var e={597:e=>{e.exports=t}},i={};function o(t){var r=i[t];if(void 0!==r)return r.exports;var n=i[t]={exports:{}};return e[t](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{o.d(r,{default:()=>_e});var t={};o.r(t),o.d(t,{AbstractButton3D:()=>pt,AdvancedDynamicTexture:()=>lt,AdvancedDynamicTextureInstrumentation:()=>_t,BaseGradient:()=>rt,BaseSlider:()=>V,Button:()=>T,Button3D:()=>gt,Checkbox:()=>O,CheckboxGroup:()=>G,ColorPicker:()=>E,Container:()=>x,Container3D:()=>bt,Control:()=>y,Control3D:()=>dt,CornerHandle:()=>Nt,CylinderPanel:()=>vt,DisplayGrid:()=>et,Ellipse:()=>F,FluentBackplateMaterial:()=>Ct,FluentButtonMaterial:()=>Rt,FluentMaterial:()=>xt,FluentMaterialDefines:()=>yt,FocusableButton:()=>D,GUI3DManager:()=>se,GizmoHandle:()=>Lt,Grid:()=>M,HandMenu:()=>It,HandleMaterial:()=>Dt,HandleState:()=>Ft,HolographicBackplate:()=>Tt,HolographicButton:()=>St,HolographicSlate:()=>zt,Image:()=>C,ImageBasedSlider:()=>it,ImageScrollBar:()=>Z,InputPassword:()=>k,InputText:()=>w,InputTextArea:()=>L,KeyPropertySet:()=>$,Line:()=>N,LinearGradient:()=>nt,MRDLBackplateMaterial:()=>Kt,MRDLSliderBarMaterial:()=>Ut,MRDLSliderThumbMaterial:()=>Yt,MathTools:()=>v,Matrix2D:()=>m,Measure:()=>g,MeshButton3D:()=>Qt,MultiLine:()=>z,MultiLinePoint:()=>A,NearMenu:()=>Vt,PlanePanel:()=>Wt,RadialGradient:()=>at,RadioButton:()=>Q,RadioGroup:()=>U,Rectangle:()=>I,ScatterPanel:()=>Ht,ScrollBar:()=>K,ScrollViewer:()=>q,SelectionPanel:()=>Y,SelectorGroup:()=>H,SideHandle:()=>kt,SlateGizmo:()=>At,Slider:()=>W,Slider3D:()=>Zt,SliderGroup:()=>j,SpherePanel:()=>qt,StackPanel:()=>S,StackPanel3D:()=>Jt,Style:()=>st,TextBlock:()=>B,TextWrapper:()=>R,TextWrapping:()=>P,ToggleButton:()=>J,TouchButton3D:()=>wt,TouchHolographicButton:()=>Mt,TouchHolographicButtonV3:()=>ae,TouchHolographicMenu:()=>Pt,TouchMeshButton3D:()=>$t,ValueAndUnit:()=>c,Vector2WithInfo:()=>b,Vector3WithInfo:()=>ut,VirtualKeyboard:()=>tt,VolumeBasedPanel:()=>mt,XmlLoader:()=>ct,name:()=>ot});var e={};o.r(e),o.d(e,{AbstractButton3D:()=>pt,AdvancedDynamicTexture:()=>lt,AdvancedDynamicTextureInstrumentation:()=>_t,BaseGradient:()=>rt,BaseSlider:()=>V,Button:()=>T,Button3D:()=>gt,Checkbox:()=>O,CheckboxGroup:()=>G,ColorPicker:()=>E,Container:()=>x,Container3D:()=>bt,Control:()=>y,Control3D:()=>dt,CornerHandle:()=>Nt,CylinderPanel:()=>vt,DisplayGrid:()=>et,Ellipse:()=>F,FluentBackplateMaterial:()=>Ct,FluentButtonMaterial:()=>Rt,FluentMaterial:()=>xt,FluentMaterialDefines:()=>yt,FocusableButton:()=>D,GUI3DManager:()=>se,GizmoHandle:()=>Lt,Grid:()=>M,HandMenu:()=>It,HandleMaterial:()=>Dt,HandleState:()=>Ft,HolographicBackplate:()=>Tt,HolographicButton:()=>St,HolographicSlate:()=>zt,Image:()=>C,ImageBasedSlider:()=>it,ImageScrollBar:()=>Z,InputPassword:()=>k,InputText:()=>w,InputTextArea:()=>L,KeyPropertySet:()=>$,Line:()=>N,LinearGradient:()=>nt,MRDLBackplateMaterial:()=>Kt,MRDLSliderBarMaterial:()=>Ut,MRDLSliderThumbMaterial:()=>Yt,MathTools:()=>v,Matrix2D:()=>m,Measure:()=>g,MeshButton3D:()=>Qt,MultiLine:()=>z,MultiLinePoint:()=>A,NearMenu:()=>Vt,PlanePanel:()=>Wt,RadialGradient:()=>at,RadioButton:()=>Q,RadioGroup:()=>U,Rectangle:()=>I,ScatterPanel:()=>Ht,ScrollBar:()=>K,ScrollViewer:()=>q,SelectionPanel:()=>Y,SelectorGroup:()=>H,SideHandle:()=>kt,SlateGizmo:()=>At,Slider:()=>W,Slider3D:()=>Zt,SliderGroup:()=>j,SpherePanel:()=>qt,StackPanel:()=>S,StackPanel3D:()=>Jt,Style:()=>st,TextBlock:()=>B,TextWrapper:()=>R,TextWrapping:()=>P,ToggleButton:()=>J,TouchButton3D:()=>wt,TouchHolographicButton:()=>Mt,TouchHolographicButtonV3:()=>ae,TouchHolographicMenu:()=>Pt,TouchMeshButton3D:()=>$t,ValueAndUnit:()=>c,Vector2WithInfo:()=>b,Vector3WithInfo:()=>ut,VirtualKeyboard:()=>tt,VolumeBasedPanel:()=>mt,XmlLoader:()=>ct,name:()=>ot});var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},i(t,e)};function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var a=function(){return a=Object.assign||function(t){for(var e,i=1,o=arguments.length;i=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a}function l(t,e,i,o){return new(i||(i=Promise))((function(r,n){function a(t){try{l(o.next(t))}catch(t){n(t)}}function s(t){try{l(o.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))}function _(t,e){var i,o,r,n,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(s){return function(l){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;n&&(n=0,s[0]&&(a=0)),a;)try{if(i=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]1?this.notRenderable=!0:this.notRenderable=!1}else h.Tools.Error("Cannot move a control to a vector3 if the control is not at root level")},t.prototype.getDescendantsToRef=function(t,e,i){void 0===e&&(e=!1)},t.prototype.getDescendants=function(t,e){var i=[];return this.getDescendantsToRef(i,t,e),i},t.prototype.linkWithMesh=function(e){if(!this._host||this.parent&&this.parent!==this._host._rootContainer)e&&h.Tools.Error("Cannot link a control to a mesh if the control is not at root level");else{var i=this._host._linkedControls.indexOf(this);if(-1!==i)return this._linkedMesh=e,void(e||this._host._linkedControls.splice(i,1));e&&(this.horizontalAlignment=t.HORIZONTAL_ALIGNMENT_LEFT,this.verticalAlignment=t.VERTICAL_ALIGNMENT_TOP,this._linkedMesh=e,this._host._linkedControls.push(this))}},t.prototype.setPadding=function(t,e,i,o){var r=t,n=null!=e?e:r,a=null!=i?i:r,s=null!=o?o:n;this.paddingTop=r,this.paddingRight=n,this.paddingBottom=a,this.paddingLeft=s},t.prototype.setPaddingInPixels=function(t,e,i,o){var r=t,n=null!=e?e:r,a=null!=i?i:r,s=null!=o?o:n;this.paddingTopInPixels=r,this.paddingRightInPixels=n,this.paddingBottomInPixels=a,this.paddingLeftInPixels=s},t.prototype._moveToProjectedPosition=function(t){var e,i=this._left.getValue(this._host),o=this._top.getValue(this._host),r=null===(e=this.parent)||void 0===e?void 0:e._currentMeasure;r&&this._processMeasures(r,this._host.getContext());var n=t.x+this._linkOffsetX.getValue(this._host)-this._currentMeasure.width/2,a=t.y+this._linkOffsetY.getValue(this._host)-this._currentMeasure.height/2,s=this._left.ignoreAdaptiveScaling&&this._top.ignoreAdaptiveScaling;s&&(Math.abs(n-i)<.5&&(n=i),Math.abs(a-o)<.5&&(a=o)),(s||i!==n||o!==a)&&(this.left=n+"px",this.top=a+"px",this._left.ignoreAdaptiveScaling=!0,this._top.ignoreAdaptiveScaling=!0,this._markAsDirty())},t.prototype._offsetLeft=function(t){this._isDirty=!0,this._currentMeasure.left+=t},t.prototype._offsetTop=function(t){this._isDirty=!0,this._currentMeasure.top+=t},t.prototype._markMatrixAsDirty=function(){this._isMatrixDirty=!0,this._flagDescendantsAsMatrixDirty()},t.prototype._flagDescendantsAsMatrixDirty=function(){},t.prototype._intersectsRect=function(t,e){return this._transform(e),!(this._evaluatedMeasure.left>=t.left+t.width||this._evaluatedMeasure.top>=t.top+t.height||this._evaluatedMeasure.left+this._evaluatedMeasure.width<=t.left||this._evaluatedMeasure.top+this._evaluatedMeasure.height<=t.top)},t.prototype._computeAdditionalOffsetX=function(){return 0},t.prototype._computeAdditionalOffsetY=function(){return 0},t.prototype.invalidateRect=function(){if(this._transform(),this.host&&this.host.useInvalidateRectOptimization){this._currentMeasure.transformToRef(this._transformMatrix,this._tmpMeasureA),g.CombineToRef(this._tmpMeasureA,this._prevCurrentMeasureTransformedIntoGlobalSpace,this._tmpMeasureA);var t=this.shadowOffsetX,e=this.shadowOffsetY,i=Math.max(this._previousShadowBlur,this.shadowBlur),o=Math.min(Math.min(t,0)-2*i,0),r=Math.max(Math.max(t,0)+2*i,0),n=Math.min(Math.min(e,0)-2*i,0),a=Math.max(Math.max(e,0)+2*i,0),s=this._computeAdditionalOffsetX(),l=this._computeAdditionalOffsetY();this.host.invalidateRect(Math.floor(this._tmpMeasureA.left+o-s),Math.floor(this._tmpMeasureA.top+n-l),Math.ceil(this._tmpMeasureA.left+this._tmpMeasureA.width+r+s),Math.ceil(this._tmpMeasureA.top+this._tmpMeasureA.height+a+l))}},t.prototype._markAsDirty=function(t){void 0===t&&(t=!1),(this._isVisible||t)&&(this._isDirty=!0,this._markMatrixAsDirty(),this._host&&this._host.markAsDirty())},t.prototype._markAllAsDirty=function(){this._markAsDirty(),this._font&&this._prepareFont()},t.prototype._link=function(t){this._host=t,this._host&&(this.uniqueId=this._host.getScene().getUniqueId())},t.prototype._transform=function(t){if(this._isMatrixDirty||1!==this._scaleX||1!==this._scaleY||0!==this._rotation){var e=this._currentMeasure.width*this._transformCenterX+this._currentMeasure.left,i=this._currentMeasure.height*this._transformCenterY+this._currentMeasure.top;t&&(t.translate(e,i),t.rotate(this._rotation),t.scale(this._scaleX,this._scaleY),t.translate(-e,-i)),(this._isMatrixDirty||this._cachedOffsetX!==e||this._cachedOffsetY!==i)&&(this._cachedOffsetX=e,this._cachedOffsetY=i,this._isMatrixDirty=!1,this._flagDescendantsAsMatrixDirty(),m.ComposeToRef(-e,-i,this._rotation,this._scaleX,this._scaleY,this.parent?this.parent._transformMatrix:null,this._transformMatrix),this._transformMatrix.invertToRef(this._invertTransformMatrix),this._currentMeasure.transformToRef(this._transformMatrix,this._evaluatedMeasure))}},t.prototype._renderHighlight=function(t){this.isHighlighted&&(t.save(),t.strokeStyle=this._highlightColor,t.lineWidth=this._highlightLineWidth,this._renderHighlightSpecific(t),t.restore())},t.prototype._renderHighlightSpecific=function(t){t.strokeRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)},t.prototype._getColor=function(t){return this.gradient?this.gradient.getCanvasGradient(t):this.color},t.prototype._applyStates=function(e){this._isFontSizeInPercentage&&(this._fontSet=!0),this._host&&this._host.useSmallestIdeal&&!this._font&&(this._fontSet=!0),this._fontSet&&(this._prepareFont(),this._fontSet=!1),this._font&&(e.font=this._font),(this._color||this.gradient)&&(e.fillStyle=this._getColor(e)),t.AllowAlphaInheritance?e.globalAlpha*=this._alpha:this._alphaSet&&(e.globalAlpha=this.parent&&!this.parent.renderToIntermediateTexture?this.parent.alpha*this._alpha:this._alpha)},t.prototype._layout=function(t,e){if(!this.isDirty&&(!this.isVisible||this.notRenderable))return!1;if(this._isDirty||!this._cachedParentMeasure.isEqualsTo(t)){this.host._numLayoutCalls++,this._currentMeasure.addAndTransformToRef(this._transformMatrix,0|-this._paddingLeftInPixels,0|-this._paddingTopInPixels,0|this._paddingRightInPixels,0|this._paddingBottomInPixels,this._prevCurrentMeasureTransformedIntoGlobalSpace),e.save(),this._applyStates(e);var i=0;do{this._rebuildLayout=!1,this._processMeasures(t,e),i++}while(this._rebuildLayout&&i<3);i>=3&&h.Logger.Error("Layout cycle detected in GUI (Control name=".concat(this.name,", uniqueId=").concat(this.uniqueId,")")),e.restore(),this.invalidateRect(),this._evaluateClippingState(t)}return this._wasDirty=this._isDirty,this._isDirty=!1,!0},t.prototype._processMeasures=function(t,e){this._tempPaddingMeasure.copyFrom(t),this.parent&&this.parent.descendantsOnlyPadding&&(this._tempPaddingMeasure.left+=this.parent.paddingLeftInPixels,this._tempPaddingMeasure.top+=this.parent.paddingTopInPixels,this._tempPaddingMeasure.width-=this.parent.paddingLeftInPixels+this.parent.paddingRightInPixels,this._tempPaddingMeasure.height-=this.parent.paddingTopInPixels+this.parent.paddingBottomInPixels),this._currentMeasure.copyFrom(this._tempPaddingMeasure),this._preMeasure(this._tempPaddingMeasure,e),this._measure(),this._postMeasure(this._tempPaddingMeasure,e),this._computeAlignment(this._tempPaddingMeasure,e),this._currentMeasure.left=0|this._currentMeasure.left,this._currentMeasure.top=0|this._currentMeasure.top,this._currentMeasure.width=0|this._currentMeasure.width,this._currentMeasure.height=0|this._currentMeasure.height,this._additionalProcessing(this._tempPaddingMeasure,e),this._cachedParentMeasure.copyFrom(this._tempPaddingMeasure),this._currentMeasure.transformToRef(this._transformMatrix,this._evaluatedMeasure),this.onDirtyObservable.hasObservers()&&this.onDirtyObservable.notifyObservers(this)},t.prototype._evaluateClippingState=function(t){if(this._transform(),this._currentMeasure.transformToRef(this._transformMatrix,this._evaluatedMeasure),this.parent&&this.parent.clipChildren){if(t.transformToRef(this.parent._transformMatrix,this._evaluatedParentMeasure),this._evaluatedMeasure.left>this._evaluatedParentMeasure.left+this._evaluatedParentMeasure.width)return void(this._isClipped=!0);if(this._evaluatedMeasure.left+this._evaluatedMeasure.widththis._evaluatedParentMeasure.top+this._evaluatedParentMeasure.height)return void(this._isClipped=!0);if(this._evaluatedMeasure.top+this._evaluatedMeasure.heightthis._currentMeasure.left+this._currentMeasure.width||ethis._currentMeasure.top+this._currentMeasure.height||(this.isPointerBlocker&&(this._host._shouldBlockPointer=!0),0))},t.prototype._processPicking=function(t,e,i,o,r,n,a,s){return!(!this._isEnabled||!this.isHitTestVisible||!this.isVisible||this._doNotRender||!this.contains(t,e)||(this._processObservables(o,t,e,i,r,n,a,s),0))},t.prototype._onPointerMove=function(t,e,i,o){this.onPointerMoveObservable.notifyObservers(e,-1,t,this,o)&&null!=this.parent&&!this.isPointerBlocker&&this.parent._onPointerMove(t,e,i,o)},t.prototype._onPointerEnter=function(t,e){return!(!this._isEnabled||this._enterCount>0||(-1===this._enterCount&&(this._enterCount=0),this._enterCount++,this.onPointerEnterObservable.notifyObservers(this,-1,t,this,e)&&null!=this.parent&&!this.isPointerBlocker&&this.parent._onPointerEnter(t,e),0))},t.prototype._onPointerOut=function(t,e,i){if(void 0===i&&(i=!1),i||this._isEnabled&&t!==this){this._enterCount=0;var o=!0;t.isAscendant(this)||(o=this.onPointerOutObservable.notifyObservers(this,-1,t,this,e)),o&&null!=this.parent&&!this.isPointerBlocker&&this.parent._onPointerOut(t,e,i)}},t.prototype._onPointerDown=function(t,e,i,o,r){return this._onPointerEnter(this,r),0===this._downCount&&(this._downCount++,this._downPointerIds[i]=!0,this.onPointerDownObservable.notifyObservers(new b(e,o),-1,t,this,r)&&null!=this.parent&&!this.isPointerBlocker&&this.parent._onPointerDown(t,e,i,o,r),r&&this.uniqueId!==this._host.rootContainer.uniqueId&&this._host._capturedPointerIds.add(r.event.pointerId),!0)},t.prototype._onPointerUp=function(t,e,i,o,r,n){if(this._isEnabled){this._downCount=0,delete this._downPointerIds[i];var a=r;r&&(this._enterCount>0||-1===this._enterCount)&&(a=this.onPointerClickObservable.notifyObservers(new b(e,o),-1,t,this,n)),this.onPointerUpObservable.notifyObservers(new b(e,o),-1,t,this,n)&&null!=this.parent&&!this.isPointerBlocker&&this.parent._onPointerUp(t,e,i,o,a,n),n&&this.uniqueId!==this._host.rootContainer.uniqueId&&this._host._capturedPointerIds.delete(n.event.pointerId)}},t.prototype._forcePointerUp=function(t){if(void 0===t&&(t=null),null!==t)this._onPointerUp(this,h.Vector2.Zero(),t,0,!0);else for(var e in this._downPointerIds)this._onPointerUp(this,h.Vector2.Zero(),+e,0,!0)},t.prototype._onWheelScroll=function(t,e){this._isEnabled&&this.onWheelObservable.notifyObservers(new h.Vector2(t,e))&&null!=this.parent&&this.parent._onWheelScroll(t,e)},t.prototype._onCanvasBlur=function(){},t.prototype._processObservables=function(t,e,i,o,r,n,a,s){if(!this._isEnabled)return!1;if(this._dummyVector2.copyFromFloats(e,i),t===h.PointerEventTypes.POINTERMOVE){this._onPointerMove(this,this._dummyVector2,r,o);var l=this._host._lastControlOver[r];return l&&l!==this&&l._onPointerOut(this,o),l!==this&&this._onPointerEnter(this,o),this._host._lastControlOver[r]=this,!0}return t===h.PointerEventTypes.POINTERDOWN?(this._onPointerDown(this,this._dummyVector2,r,n,o),this._host._registerLastControlDown(this,r),this._host._lastPickedControl=this,!0):t===h.PointerEventTypes.POINTERUP?(this._host._lastControlDown[r]&&this._host._lastControlDown[r]._onPointerUp(this,this._dummyVector2,r,n,!0,o),delete this._host._lastControlDown[r],!0):!(t!==h.PointerEventTypes.POINTERWHEEL||!this._host._lastControlOver[r]||(this._host._lastControlOver[r]._onWheelScroll(a,s),0))},t.prototype._getStyleProperty=function(t,e){var i,o=null!==(i=this._style&&this._style[t])&&void 0!==i?i:this[t];return!o&&this.parent?this.parent._getStyleProperty(t,e):this.parent?o:e},t.prototype._prepareFont=function(){var e,i;(this._font||this._fontSet)&&(this._font=this._getStyleProperty("fontStyle","")+" "+this._getStyleProperty("fontWeight","")+" "+this.fontSizeInPixels+"px "+this._getStyleProperty("fontFamily","Arial"),this._fontOffset=t._GetFontOffset(this._font,null===(i=null===(e=this._host)||void 0===e?void 0:e.getScene())||void 0===i?void 0:i.getEngine()),this.getDescendants().forEach((function(t){return t._markAllAsDirty()})))},t.prototype.isDimensionFullyDefined=function(t){return this.getDimension(t).isPixel},t.prototype.getDimension=function(t){return"width"===t?this._width:this._height},t.prototype.clone=function(t){var e={};this.serialize(e,!0);var i=new(h.Tools.Instantiate("BABYLON.GUI."+e.className));return i.parse(e,t),i},t.prototype.parse=function(t,e,i){var o=this;return this._urlRewriter=i,h.SerializationHelper.Parse((function(){return o}),t,null),this.name=t.name,this._parseFromContent(t,null!=e?e:this._host),this},t.prototype.serialize=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0),(this.isSerializable||e)&&(h.SerializationHelper.Serialize(this,t),t.name=this.name,t.className=this.getClassName(),i&&this._prepareFont(),this._fontFamily&&(t.fontFamily=this._fontFamily),this.fontSize&&(t.fontSize=this.fontSize),this.fontWeight&&(t.fontWeight=this.fontWeight),this.fontStyle&&(t.fontStyle=this.fontStyle),this._gradient&&(t.gradient={},this._gradient.serialize(t.gradient)),h.SerializationHelper.AppendSerializedAnimations(this,t))},t.prototype._parseFromContent=function(t,e,i){var o,r;if(t.fontFamily&&(this.fontFamily=t.fontFamily),t.fontSize&&(this.fontSize=t.fontSize),t.fontWeight&&(this.fontWeight=t.fontWeight),t.fontStyle&&(this.fontStyle=t.fontStyle),t.gradient){var n=h.Tools.Instantiate("BABYLON.GUI."+t.gradient.className);this._gradient=new n,null===(o=this._gradient)||void 0===o||o.parse(t.gradient)}if(t.animations){this.animations=[];for(var a=0;a-1&&this.linkWithMesh(null),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear()},Object.defineProperty(t,"HORIZONTAL_ALIGNMENT_LEFT",{get:function(){return t._HORIZONTAL_ALIGNMENT_LEFT},enumerable:!1,configurable:!0}),Object.defineProperty(t,"HORIZONTAL_ALIGNMENT_RIGHT",{get:function(){return t._HORIZONTAL_ALIGNMENT_RIGHT},enumerable:!1,configurable:!0}),Object.defineProperty(t,"HORIZONTAL_ALIGNMENT_CENTER",{get:function(){return t._HORIZONTAL_ALIGNMENT_CENTER},enumerable:!1,configurable:!0}),Object.defineProperty(t,"VERTICAL_ALIGNMENT_TOP",{get:function(){return t._VERTICAL_ALIGNMENT_TOP},enumerable:!1,configurable:!0}),Object.defineProperty(t,"VERTICAL_ALIGNMENT_BOTTOM",{get:function(){return t._VERTICAL_ALIGNMENT_BOTTOM},enumerable:!1,configurable:!0}),Object.defineProperty(t,"VERTICAL_ALIGNMENT_CENTER",{get:function(){return t._VERTICAL_ALIGNMENT_CENTER},enumerable:!1,configurable:!0}),t._GetFontOffset=function(e,i){if(t._FontHeightSizes[e])return t._FontHeightSizes[e];var o=i||h.EngineStore.LastCreatedEngine;if(!o)throw new Error("Invalid engine. Unable to create a canvas.");var r=o.getFontOffset(e);return t._FontHeightSizes[e]=r,r},t.Parse=function(t,e,i){var o=h.Tools.Instantiate("BABYLON.GUI."+t.className),r=h.SerializationHelper.Parse((function(){var t=new o;return t._urlRewriter=i,t}),t,null);return r.name=t.name,r._parseFromContent(t,e,i),r},t.drawEllipse=function(t,e,i,o,r,n){n.translate(t,e),n.scale(i,o),n.beginPath(),n.arc(0,0,1,0,2*Math.PI*r,r<0),r>=1&&n.closePath(),n.scale(1/i,1/o),n.translate(-t,-e)},t.prototype.isReady=function(){return!0},t.AllowAlphaInheritance=!1,t._ClipMeasure=new g(0,0,0,0),t._HORIZONTAL_ALIGNMENT_LEFT=0,t._HORIZONTAL_ALIGNMENT_RIGHT=1,t._HORIZONTAL_ALIGNMENT_CENTER=2,t._VERTICAL_ALIGNMENT_TOP=0,t._VERTICAL_ALIGNMENT_BOTTOM=1,t._VERTICAL_ALIGNMENT_CENTER=2,t._FontHeightSizes={},t.AddHeader=function(){},s([(0,h.serialize)()],t.prototype,"metadata",void 0),s([(0,h.serialize)()],t.prototype,"isHitTestVisible",void 0),s([(0,h.serialize)()],t.prototype,"isPointerBlocker",void 0),s([(0,h.serialize)()],t.prototype,"isFocusInvisible",void 0),s([(0,h.serialize)()],t.prototype,"clipChildren",null),s([(0,h.serialize)()],t.prototype,"clipContent",null),s([(0,h.serialize)()],t.prototype,"useBitmapCache",void 0),s([(0,h.serialize)()],t.prototype,"shadowOffsetX",null),s([(0,h.serialize)()],t.prototype,"shadowOffsetY",null),s([(0,h.serialize)()],t.prototype,"shadowBlur",null),s([(0,h.serialize)()],t.prototype,"shadowColor",null),s([(0,h.serialize)()],t.prototype,"hoverCursor",void 0),s([(0,h.serialize)()],t.prototype,"fontOffset",null),s([(0,h.serialize)()],t.prototype,"alpha",null),s([(0,h.serialize)()],t.prototype,"isSerializable",void 0),s([(0,h.serialize)()],t.prototype,"scaleX",null),s([(0,h.serialize)()],t.prototype,"scaleY",null),s([(0,h.serialize)()],t.prototype,"rotation",null),s([(0,h.serialize)()],t.prototype,"transformCenterY",null),s([(0,h.serialize)()],t.prototype,"transformCenterX",null),s([(0,h.serialize)()],t.prototype,"horizontalAlignment",null),s([(0,h.serialize)()],t.prototype,"verticalAlignment",null),s([(0,h.serialize)()],t.prototype,"fixedRatio",null),s([(0,h.serialize)()],t.prototype,"fixedRatioMasterIsWidth",null),s([(0,h.serialize)()],t.prototype,"width",null),s([(0,h.serialize)()],t.prototype,"height",null),s([(0,h.serialize)()],t.prototype,"style",null),s([(0,h.serialize)()],t.prototype,"color",null),s([(0,h.serialize)()],t.prototype,"gradient",null),s([(0,h.serialize)()],t.prototype,"zIndex",null),s([(0,h.serialize)()],t.prototype,"notRenderable",null),s([(0,h.serialize)()],t.prototype,"isVisible",null),s([(0,h.serialize)()],t.prototype,"descendantsOnlyPadding",null),s([(0,h.serialize)()],t.prototype,"paddingLeft",null),s([(0,h.serialize)()],t.prototype,"paddingRight",null),s([(0,h.serialize)()],t.prototype,"paddingTop",null),s([(0,h.serialize)()],t.prototype,"paddingBottom",null),s([(0,h.serialize)()],t.prototype,"left",null),s([(0,h.serialize)()],t.prototype,"top",null),s([(0,h.serialize)()],t.prototype,"linkOffsetX",null),s([(0,h.serialize)()],t.prototype,"linkOffsetY",null),s([(0,h.serialize)()],t.prototype,"isEnabled",null),s([(0,h.serialize)()],t.prototype,"disabledColor",null),s([(0,h.serialize)()],t.prototype,"disabledColorItem",null),s([(0,h.serialize)()],t.prototype,"overlapGroup",void 0),s([(0,h.serialize)()],t.prototype,"overlapDeltaMultiplier",void 0),t}();(0,h.RegisterClass)("BABYLON.GUI.Control",y);var x=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._children=new Array,i._measureForChildren=g.Empty(),i._background="",i._backgroundGradient=null,i._adaptWidthToChildren=!1,i._adaptHeightToChildren=!1,i._renderToIntermediateTexture=!1,i._intermediateTexture=null,i.delegatePickingToChildren=!1,i.logLayoutCycleErrors=!1,i.maxLayoutCycle=3,i.onControlAddedObservable=new h.Observable,i.onControlRemovedObservable=new h.Observable,i._inverseTransformMatrix=m.Identity(),i._inverseMeasure=new g(0,0,0,0),i}return n(e,t),Object.defineProperty(e.prototype,"renderToIntermediateTexture",{get:function(){return this._renderToIntermediateTexture},set:function(t){this._renderToIntermediateTexture!==t&&(this._renderToIntermediateTexture=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"adaptHeightToChildren",{get:function(){return this._adaptHeightToChildren},set:function(t){this._adaptHeightToChildren!==t&&(this._adaptHeightToChildren=t,t&&(this.height="100%"),this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"adaptWidthToChildren",{get:function(){return this._adaptWidthToChildren},set:function(t){this._adaptWidthToChildren!==t&&(this._adaptWidthToChildren=t,t&&(this.width="100%"),this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"background",{get:function(){return this._background},set:function(t){this._background!==t&&(this._background=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundGradient",{get:function(){return this._backgroundGradient},set:function(t){this._backgroundGradient!==t&&(this._backgroundGradient=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isReadOnly",{get:function(){return this._isReadOnly},set:function(t){this._isReadOnly=t;for(var e=0,i=this._children;et.zIndex){this._children.splice(o,0,t),i=!0;break}i||this._children.push(t),t.parent=this,e&&t.linkWithMesh(e),this._markAsDirty()},e.prototype._offsetLeft=function(e){t.prototype._offsetLeft.call(this,e);for(var i=0,o=this._children;i=0&&(n+=this.paddingLeftInPixels+this.paddingRightInPixels,this.width!==n+"px"&&(null===(i=this.parent)||void 0===i||i._markAsDirty(),this.width=n+"px",this._width.ignoreAdaptiveScaling=!0,this._rebuildLayout=!0)),this.adaptHeightToChildren&&a>=0&&(a+=this.paddingTopInPixels+this.paddingBottomInPixels,this.height!==a+"px"&&(null===(o=this.parent)||void 0===o||o._markAsDirty(),this.height=a+"px",this._height.ignoreAdaptiveScaling=!0,this._rebuildLayout=!0)),this._postMeasure()}r++}while(this._rebuildLayout&&r=3&&this.logLayoutCycleErrors&&h.Logger.Error("Layout cycle detected in GUI (Container name=".concat(this.name,", uniqueId=").concat(this.uniqueId,")")),e.restore(),this._isDirty&&(this.invalidateRect(),this._isDirty=!1),!0},e.prototype._postMeasure=function(){},e.prototype._draw=function(t,e){var i=this._renderToIntermediateTexture&&this._intermediateTexture,o=i?this._intermediateTexture.getContext():t;i&&(o.save(),o.translate(-this._currentMeasure.left,-this._currentMeasure.top),e?(this._transformMatrix.invertToRef(this._inverseTransformMatrix),e.transformToRef(this._inverseTransformMatrix,this._inverseMeasure),o.clearRect(this._inverseMeasure.left,this._inverseMeasure.top,this._inverseMeasure.width,this._inverseMeasure.height)):o.clearRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)),this._localDraw(o),t.save(),this.clipChildren&&this._clipForChildren(o);for(var r=0,n=this._children;r=0;c--)if((u=this._children[c]).isEnabled&&u.isHitTestVisible&&u.isVisible&&!u.notRenderable&&u.contains(e,i)){h=!0;break}if(!h)return!1}for(c=this._children.length-1;c>=0;c--){var u;if((u=this._children[c])._processPicking(e,i,o,r,n,a,s,l))return u.hoverCursor&&this._host._changeCursor(u.hoverCursor),!0}return!!_&&!!this.isHitTestVisible&&this._processObservables(r,e,i,o,n,a,s,l)},e.prototype._additionalProcessing=function(e,i){t.prototype._additionalProcessing.call(this,e,i),this._measureForChildren.copyFrom(this._currentMeasure)},e.prototype._getAdaptDimTo=function(t){return"width"===t?this.adaptWidthToChildren:this.adaptHeightToChildren},e.prototype.isDimensionFullyDefined=function(e){if(this._getAdaptDimTo(e)){for(var i=0,o=this.children;i=0;i--)this.children[i].dispose();null===(e=this._intermediateTexture)||void 0===e||e.dispose()},e.prototype._parseFromContent=function(e,i,o){var r;if(t.prototype._parseFromContent.call(this,e,i,o),this._link(i),e.backgroundGradient){var n=h.Tools.Instantiate("BABYLON.GUI."+e.backgroundGradient.className);this._backgroundGradient=new n,null===(r=this._backgroundGradient)||void 0===r||r.parse(e.backgroundGradient)}if(e.children)for(var a=0,s=e.children;ar&&(r=a.width)}if(this._resizeToFit){if(0===this._textWrapping||this._forceResizeWidth){var s=Math.ceil(this._paddingLeftInPixels)+Math.ceil(this._paddingRightInPixels)+Math.ceil(r);s!==this._width.getValueInPixel(this._host,this._tempParentMeasure.width)&&(this._width.updateInPlace(s,c.UNITMODE_PIXEL),this._rebuildLayout=!0)}var l=this._paddingTopInPixels+this._paddingBottomInPixels+this._fontOffset.height*this._lines.length|0;if(this._lines.length>0&&0!==this._lineSpacing.internalValue){var _;_=this._lineSpacing.isPixel?this._lineSpacing.getValue(this._host):this._lineSpacing.getValue(this._host)*this._height.getValueInPixel(this._host,this._cachedParentMeasure.height),l+=(this._lines.length-1)*_}l!==this._height.internalValue&&(this._height.updateInPlace(l,c.UNITMODE_PIXEL),this._rebuildLayout=!0)}},e.prototype._drawText=function(t,e,i,o){var r=this._currentMeasure.width,n=0;switch(this._textHorizontalAlignment){case y.HORIZONTAL_ALIGNMENT_LEFT:n=0;break;case y.HORIZONTAL_ALIGNMENT_RIGHT:n=r-e;break;case y.HORIZONTAL_ALIGNMENT_CENTER:n=(r-e)/2}(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(o.shadowColor=this.shadowColor,o.shadowBlur=this.shadowBlur,o.shadowOffsetX=this.shadowOffsetX,o.shadowOffsetY=this.shadowOffsetY),this.outlineWidth&&o.strokeText(t,this._currentMeasure.left+n,i),o.fillText(t,this._currentMeasure.left+n,i),this._underline&&this._drawLine(this._currentMeasure.left+n,i+3,this._currentMeasure.left+n+e,i+3,o),this._lineThrough&&this._drawLine(this._currentMeasure.left+n,i-this.fontSizeInPixels/3,this._currentMeasure.left+n+e,i-this.fontSizeInPixels/3,o)},e.prototype._drawLine=function(t,e,i,o,r){if(r.beginPath(),r.lineWidth=Math.round(.05*this.fontSizeInPixels),r.moveTo(t,e),r.lineTo(i,o),this.outlineWidth&&this.applyOutlineToUnderline)r.stroke(),r.fill();else{var n=r.strokeStyle;r.strokeStyle=r.fillStyle,r.stroke(),r.strokeStyle=n}r.closePath()},e.prototype._draw=function(t){t.save(),this._applyStates(t),this._renderLines(t),t.restore()},e.prototype._applyStates=function(e){t.prototype._applyStates.call(this,e),this.outlineWidth&&(e.lineWidth=this.outlineWidth,e.strokeStyle=this.outlineColor,e.lineJoin="miter",e.miterLimit=2)},e.prototype._breakLines=function(t,e,i){var o,r;this._linesTemp.length=0;var n=this.text.split("\n");if(2===this._textWrapping)for(var a=0,s=n;ae?t-e:0,r=t/i;return Math.max(Math.floor(o/r),1)},e.prototype._parseLineEllipsis=function(t,e,i){void 0===t&&(t="");var o=this._getTextMetricsWidth(i.measureText(t)),r=this._getCharsToRemove(o,e,t.length),n=Array.from&&Array.from(t);if(n)for(;n.length&&o>e;)n.splice(n.length-r,r),t="".concat(n.join(""),"…"),o=this._getTextMetricsWidth(i.measureText(t)),r=this._getCharsToRemove(o,e,t.length);else{for(;t.length>2&&o>e;)t=t.slice(0,-r),o=this._getTextMetricsWidth(i.measureText(t+"…")),r=this._getCharsToRemove(o,e,t.length);t+="…"}return{text:t,width:o}},e.prototype._getTextMetricsWidth=function(t){return void 0!==t.actualBoundingBoxLeft?Math.abs(t.actualBoundingBoxLeft)+Math.abs(t.actualBoundingBoxRight):t.width},e.prototype._parseLineWordWrap=function(t,e,i){void 0===t&&(t="");for(var o=[],r=this.wordSplittingFunction?this.wordSplittingFunction(t):t.split(this._wordDivider),n=this._getTextMetricsWidth(i.measureText(t)),a=0;a0?t+this._wordDivider+r[a]:r[0],l=this._getTextMetricsWidth(i.measureText(s));l>e&&a>0?(o.push({text:t,width:n}),t=r[a],n=this._getTextMetricsWidth(i.measureText(t))):(n=l,t=s)}return o.push({text:t,width:n}),o},e.prototype._parseLineWordWrapEllipsis=function(t,e,i,o){void 0===t&&(t="");for(var r=this._parseLineWordWrap(t,e,o),n=1;n<=r.length;n++)if(this._computeHeightForLinesOf(n)>i&&n>1){var a=r[n-2],s=r[n-1];r[n-2]=this._parseLineEllipsis(a.text+this._wordDivider+s.text,e,o);for(var l=r.length-n+1,_=0;_0&&0!==this._lineSpacing.internalValue&&(e+=(t-1)*(this._lineSpacing.isPixel?this._lineSpacing.getValue(this._host):this._lineSpacing.getValue(this._host)*this._height.getValueInPixel(this._host,this._cachedParentMeasure.height))),e},e.prototype.isDimensionFullyDefined=function(e){return!!this.resizeToFit||t.prototype.isDimensionFullyDefined.call(this,e)},e.prototype.computeExpectedHeight=function(){var t,e;if(this.text&&this.widthInPixels){var i=null===(t=h.EngineStore.LastCreatedEngine)||void 0===t?void 0:t.createCanvas(0,0).getContext("2d");if(i){this._applyStates(i),this._fontOffset||(this._fontOffset=y._GetFontOffset(i.font,null===(e=this._host.getScene())||void 0===e?void 0:e.getEngine()));var o=this._lines?this._lines:this._breakLines(this.widthInPixels-this._paddingLeftInPixels-this._paddingRightInPixels,this.heightInPixels-this._paddingTopInPixels-this._paddingBottomInPixels,i);return this._computeHeightForLinesOf(o.length)}}return 0},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.onTextChangedObservable.clear()},s([(0,h.serialize)()],e.prototype,"resizeToFit",null),s([(0,h.serialize)()],e.prototype,"textWrapping",null),s([(0,h.serialize)()],e.prototype,"text",null),s([(0,h.serialize)()],e.prototype,"textHorizontalAlignment",null),s([(0,h.serialize)()],e.prototype,"textVerticalAlignment",null),s([(0,h.serialize)()],e.prototype,"lineSpacing",null),s([(0,h.serialize)()],e.prototype,"outlineWidth",null),s([(0,h.serialize)()],e.prototype,"underline",null),s([(0,h.serialize)()],e.prototype,"lineThrough",null),s([(0,h.serialize)()],e.prototype,"applyOutlineToUnderline",null),s([(0,h.serialize)()],e.prototype,"outlineColor",null),s([(0,h.serialize)()],e.prototype,"wordDivider",null),s([(0,h.serialize)()],e.prototype,"forceResizeWidth",null),e}(y);(0,h.RegisterClass)("BABYLON.GUI.TextBlock",B);var C=function(t){function e(i,o){void 0===o&&(o=null);var r=t.call(this,i)||this;return r.name=i,r._workingCanvas=null,r._loaded=!1,r._stretch=e.STRETCH_FILL,r._autoScale=!1,r._sourceLeft=0,r._sourceTop=0,r._sourceWidth=0,r._sourceHeight=0,r._svgAttributesComputationCompleted=!1,r._isSVG=!1,r._cellWidth=0,r._cellHeight=0,r._cellId=-1,r._populateNinePatchSlicesFromImage=!1,r._imageDataCache={data:null,key:""},r.onImageLoadedObservable=new h.Observable,r.onSVGAttributesComputedObservable=new h.Observable,r.source=o,r}return n(e,t),Object.defineProperty(e.prototype,"isLoaded",{get:function(){return this._loaded},enumerable:!1,configurable:!0}),e.prototype.isReady=function(){return this.isLoaded},Object.defineProperty(e.prototype,"detectPointerOnOpaqueOnly",{get:function(){return this._detectPointerOnOpaqueOnly},set:function(t){this._detectPointerOnOpaqueOnly!==t&&(this._detectPointerOnOpaqueOnly=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliceLeft",{get:function(){return this._sliceLeft},set:function(t){this._sliceLeft!==t&&(this._sliceLeft=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliceRight",{get:function(){return this._sliceRight},set:function(t){this._sliceRight!==t&&(this._sliceRight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliceTop",{get:function(){return this._sliceTop},set:function(t){this._sliceTop!==t&&(this._sliceTop=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliceBottom",{get:function(){return this._sliceBottom},set:function(t){this._sliceBottom!==t&&(this._sliceBottom=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sourceLeft",{get:function(){return this._sourceLeft},set:function(t){this._sourceLeft!==t&&(this._sourceLeft=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sourceTop",{get:function(){return this._sourceTop},set:function(t){this._sourceTop!==t&&(this._sourceTop=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sourceWidth",{get:function(){return this._sourceWidth},set:function(t){this._sourceWidth!==t&&(this._sourceWidth=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sourceHeight",{get:function(){return this._sourceHeight},set:function(t){this._sourceHeight!==t&&(this._sourceHeight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageWidth",{get:function(){return this._imageWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageHeight",{get:function(){return this._imageHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"populateNinePatchSlicesFromImage",{get:function(){return this._populateNinePatchSlicesFromImage},set:function(t){this._populateNinePatchSlicesFromImage!==t&&(this._populateNinePatchSlicesFromImage=t,this._populateNinePatchSlicesFromImage&&this._loaded&&this._extractNinePatchSliceDataFromImage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSVG",{get:function(){return this._isSVG},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"svgAttributesComputationCompleted",{get:function(){return this._svgAttributesComputationCompleted},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoScale",{get:function(){return this._autoScale},set:function(t){this._autoScale!==t&&(this._autoScale=t,t&&this._loaded&&this.synchronizeSizeWithContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stretch",{get:function(){return this._stretch},set:function(t){this._stretch!==t&&(this._stretch=t,this._markAsDirty())},enumerable:!1,configurable:!0}),e.prototype._rotate90=function(t,i){var o,r;void 0===i&&(i=!1);var n=this._domImage.width,a=this._domImage.height,s=(null===(r=null===(o=this._host)||void 0===o?void 0:o.getScene())||void 0===r?void 0:r.getEngine())||h.EngineStore.LastCreatedEngine;if(!s)throw new Error("Invalid engine. Unable to create a canvas.");var l=s.createCanvas(a,n),_=l.getContext("2d");_.translate(l.width/2,l.height/2),_.rotate(t*Math.PI/2),_.drawImage(this._domImage,0,0,n,a,-n/2,-a/2,n,a);var c=l.toDataURL("image/jpg"),u=new e(this.name+"rotated",c);return i&&(u._stretch=this._stretch,u._autoScale=this._autoScale,u._cellId=this._cellId,u._cellWidth=t%1?this._cellHeight:this._cellWidth,u._cellHeight=t%1?this._cellWidth:this._cellHeight),this._handleRotationForSVGImage(this,u,t),this._imageDataCache.data=null,u},e.prototype._handleRotationForSVGImage=function(t,e,i){var o=this;t._isSVG&&(t._svgAttributesComputationCompleted?(this._rotate90SourceProperties(t,e,i),this._markAsDirty()):t.onSVGAttributesComputedObservable.addOnce((function(){o._rotate90SourceProperties(t,e,i),o._markAsDirty()})))},e.prototype._rotate90SourceProperties=function(t,e,i){var o,r,n=t.sourceLeft,a=t.sourceTop,s=t.domImage.width,l=t.domImage.height,_=n,h=a,c=t.sourceWidth,u=t.sourceHeight;if(0!=i){var d=i<0?-1:1;i%=4;for(var f=0;f127&&-1===this._sliceLeft)this._sliceLeft=s;else if(_<127&&this._sliceLeft>-1){this._sliceRight=s;break}this._sliceTop=-1,this._sliceBottom=-1;for(var l=0;l127&&-1===this._sliceTop)this._sliceTop=l;else if(_<127&&this._sliceTop>-1){this._sliceBottom=l;break}}},Object.defineProperty(e.prototype,"domImage",{get:function(){return this._domImage},set:function(t){var e=this;this._domImage=t,this._loaded=!1,this._imageDataCache.data=null,this._domImage.width?this._onImageLoaded():this._domImage.onload=function(){e._onImageLoaded()}},enumerable:!1,configurable:!0}),e.prototype._onImageLoaded=function(){this._imageDataCache.data=null,this._imageWidth=this._domImage.width,this._imageHeight=this._domImage.height,this._loaded=!0,this._populateNinePatchSlicesFromImage&&this._extractNinePatchSliceDataFromImage(),this._autoScale&&this.synchronizeSizeWithContent(),this.onImageLoadedObservable.notifyObservers(this),this._markAsDirty()},Object.defineProperty(e.prototype,"source",{get:function(){return this._source},set:function(t){var i,o,r,n,a=this;if(this._urlRewriter&&t&&(t=this._urlRewriter(t)),this._source!==t){this._removeCacheUsage(this._source),this._loaded=!1,this._source=t,this._imageDataCache.data=null,t&&(t=this._svgCheck(t));var s=(null===(o=null===(i=this._host)||void 0===i?void 0:i.getScene())||void 0===o?void 0:o.getEngine())||h.EngineStore.LastCreatedEngine;if(!s)throw new Error("Invalid engine. Unable to create a canvas.");if(t&&e.SourceImgCache.has(t)){var l=e.SourceImgCache.get(t);return this._domImage=l.img,l.timesUsed+=1,void(l.loaded?this._onImageLoaded():l.waitingForLoadCallback.push(this._onImageLoaded.bind(this)))}this._domImage=s.createCanvasImage();var _=this._domImage;_.style&&(_.style.visibility="hidden",_.style.position="absolute",null===(n=null===(r=s.getRenderingCanvas())||void 0===r?void 0:r.parentNode)||void 0===n||n.appendChild(_)),t&&e.SourceImgCache.set(t,{img:this._domImage,timesUsed:1,loaded:!1,waitingForLoadCallback:[this._onImageLoaded.bind(this)]}),this._domImage.onload=function(){if(t){var i=e.SourceImgCache.get(t);if(i){i.loaded=!0;for(var o=0,r=i.waitingForLoadCallback;o0},e.prototype._getTypeName=function(){return"Image"},e.prototype.synchronizeSizeWithContent=function(){this._loaded&&(this.width=this._domImage.width+"px",this.height=this._domImage.height+"px")},e.prototype._processMeasures=function(i,o){if(this._loaded)switch(this._stretch){case e.STRETCH_NONE:case e.STRETCH_FILL:case e.STRETCH_UNIFORM:case e.STRETCH_NINE_PATCH:break;case e.STRETCH_EXTEND:this._autoScale&&this.synchronizeSizeWithContent(),this.parent&&this.parent.parent&&(this.parent.adaptWidthToChildren=!0,this.parent.adaptHeightToChildren=!0)}t.prototype._processMeasures.call(this,i,o)},e.prototype._prepareWorkingCanvasForOpaqueDetection=function(){var t,e;if(this._detectPointerOnOpaqueOnly){var i=this._currentMeasure.width,o=this._currentMeasure.height;if(!this._workingCanvas){var r=(null===(e=null===(t=this._host)||void 0===t?void 0:t.getScene())||void 0===e?void 0:e.getEngine())||h.EngineStore.LastCreatedEngine;if(!r)throw new Error("Invalid engine. Unable to create a canvas.");this._workingCanvas=r.createCanvas(i,o)}this._workingCanvas.getContext("2d").clearRect(0,0,i,o)}},e.prototype._drawImage=function(t,e,i,o,r,n,a,s,l){if(t.drawImage(this._domImage,e,i,o,r,n,a,s,l),this._detectPointerOnOpaqueOnly){var _=t.getTransform(),h=this._workingCanvas.getContext("2d");h.save();var c=n-this._currentMeasure.left,u=a-this._currentMeasure.top;h.setTransform(_.a,_.b,_.c,_.d,(c+s)/2,(u+l)/2),h.translate(-(c+s)/2,-(u+l)/2),h.drawImage(this._domImage,e,i,o,r,c,u,s,l),h.restore()}},e.prototype._draw=function(t){var i,o,r,n;if(t.save(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),-1==this.cellId)i=this._sourceLeft,o=this._sourceTop,r=this._sourceWidth?this._sourceWidth:this._imageWidth,n=this._sourceHeight?this._sourceHeight:this._imageHeight;else{var a=this._domImage.naturalWidth/this.cellWidth,s=this.cellId/a|0,l=this.cellId%a;i=this.cellWidth*l,o=this.cellHeight*s,r=this.cellWidth,n=this.cellHeight}if(this._prepareWorkingCanvasForOpaqueDetection(),this._applyStates(t),this._loaded)switch(this._stretch){case e.STRETCH_NONE:case e.STRETCH_FILL:this._drawImage(t,i,o,r,n,this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height);break;case e.STRETCH_UNIFORM:var _=this._currentMeasure.width/r,h=this._currentMeasure.height/n,c=Math.min(_,h),u=(this._currentMeasure.width-r*c)/2,d=(this._currentMeasure.height-n*c)/2;this._drawImage(t,i,o,r,n,this._currentMeasure.left+u,this._currentMeasure.top+d,r*c,n*c);break;case e.STRETCH_EXTEND:this._drawImage(t,i,o,r,n,this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height);break;case e.STRETCH_NINE_PATCH:this._renderNinePatch(t,i,o,r,n)}t.restore()},e.prototype._renderNinePatch=function(t,e,i,o,r){var n=this.host.idealWidth?this._width.getValue(this.host)/this.host.idealWidth:this.host.idealHeight?this._height.getValue(this.host)/this.host.idealHeight:1,a=this._sliceLeft,s=this._sliceTop,l=r-this._sliceBottom,_=o-this._sliceRight,h=this._sliceRight-this._sliceLeft,c=this._sliceBottom-this._sliceTop,u=Math.round(a*n),d=Math.round(s*n),f=Math.round(l*n),p=Math.round(_*n),g=Math.round(this._currentMeasure.width)-p-u+2,b=Math.round(this._currentMeasure.height)-f-d+2,m=Math.round(this._currentMeasure.left)+u-1,v=Math.round(this._currentMeasure.top)+d-1,y=Math.round(this._currentMeasure.left+this._currentMeasure.width)-p,x=Math.round(this._currentMeasure.top+this._currentMeasure.height)-f;this._drawImage(t,e,i,a,s,this._currentMeasure.left,this._currentMeasure.top,u,d),this._drawImage(t,e+this._sliceLeft,i,h,s,m+1,this._currentMeasure.top,g-2,d),this._drawImage(t,e+this._sliceRight,i,_,s,y,this._currentMeasure.top,p,d),this._drawImage(t,e,i+this._sliceTop,a,c,this._currentMeasure.left,v+1,u,b-2),this._drawImage(t,e+this._sliceLeft,i+this._sliceTop,h,c,m+1,v+1,g-2,b-2),this._drawImage(t,e+this._sliceRight,i+this._sliceTop,_,c,y,v+1,p,b-2),this._drawImage(t,e,i+this._sliceBottom,a,l,this._currentMeasure.left,x,u,f),this._drawImage(t,e+this.sliceLeft,i+this._sliceBottom,h,l,m+1,x,g-2,f),this._drawImage(t,e+this._sliceRight,i+this._sliceBottom,_,l,y,x,p,f)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.onImageLoadedObservable.clear(),this.onSVGAttributesComputedObservable.clear(),this._removeCacheUsage(this._source)},e.SourceImgCache=new Map,e.STRETCH_NONE=0,e.STRETCH_FILL=1,e.STRETCH_UNIFORM=2,e.STRETCH_EXTEND=3,e.STRETCH_NINE_PATCH=4,s([(0,h.serialize)()],e.prototype,"detectPointerOnOpaqueOnly",null),s([(0,h.serialize)()],e.prototype,"sliceLeft",null),s([(0,h.serialize)()],e.prototype,"sliceRight",null),s([(0,h.serialize)()],e.prototype,"sliceTop",null),s([(0,h.serialize)()],e.prototype,"sliceBottom",null),s([(0,h.serialize)()],e.prototype,"sourceLeft",null),s([(0,h.serialize)()],e.prototype,"sourceTop",null),s([(0,h.serialize)()],e.prototype,"sourceWidth",null),s([(0,h.serialize)()],e.prototype,"sourceHeight",null),s([(0,h.serialize)()],e.prototype,"populateNinePatchSlicesFromImage",null),s([(0,h.serialize)()],e.prototype,"autoScale",null),s([(0,h.serialize)()],e.prototype,"stretch",null),s([(0,h.serialize)()],e.prototype,"source",null),s([(0,h.serialize)()],e.prototype,"cellWidth",null),s([(0,h.serialize)()],e.prototype,"cellHeight",null),s([(0,h.serialize)()],e.prototype,"cellId",null),e}(y);(0,h.RegisterClass)("BABYLON.GUI.Image",C);var T=function(t){function e(e){var i=t.call(this,e)||this;i.name=e,i.thickness=1,i.isPointerBlocker=!0;var o=null;return i.pointerEnterAnimation=function(){o=i.alpha,i.alpha-=.1},i.pointerOutAnimation=function(){null!==o&&(i.alpha=o)},i.pointerDownAnimation=function(){i.scaleX-=.05,i.scaleY-=.05},i.pointerUpAnimation=function(){i.scaleX+=.05,i.scaleY+=.05},i}return n(e,t),Object.defineProperty(e.prototype,"image",{get:function(){return this._image},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textBlock",{get:function(){return this._textBlock},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"Button"},e.prototype._processPicking=function(e,i,o,r,n,a,s,l){if(!this._isEnabled||!this.isHitTestVisible||!this.isVisible||this.notRenderable)return!1;if(!t.prototype.contains.call(this,e,i))return!1;if(this.delegatePickingToChildren){for(var _=!1,h=this._children.length-1;h>=0;h--){var c=this._children[h];if(c.isEnabled&&c.isHitTestVisible&&c.isVisible&&!c.notRenderable&&c.contains(e,i)){_=!0;break}}if(!_)return!1}return this._processObservables(r,e,i,o,n,a,s,l),!0},e.prototype._onPointerEnter=function(e,i){return!!t.prototype._onPointerEnter.call(this,e,i)&&(!this.isReadOnly&&this.pointerEnterAnimation&&this.pointerEnterAnimation(),!0)},e.prototype._onPointerOut=function(e,i,o){void 0===o&&(o=!1),!this.isReadOnly&&this.pointerOutAnimation&&this.pointerOutAnimation(),t.prototype._onPointerOut.call(this,e,i,o)},e.prototype._onPointerDown=function(e,i,o,r,n){return!!t.prototype._onPointerDown.call(this,e,i,o,r,n)&&(!this.isReadOnly&&this.pointerDownAnimation&&this.pointerDownAnimation(),!0)},e.prototype._getRectangleFill=function(t){return this.isEnabled?this._getBackgroundColor(t):this._disabledColor},e.prototype._onPointerUp=function(e,i,o,r,n,a){!this.isReadOnly&&this.pointerUpAnimation&&this.pointerUpAnimation(),t.prototype._onPointerUp.call(this,e,i,o,r,n,a)},e.prototype.serialize=function(e,i){t.prototype.serialize.call(this,e,i),(this.isSerializable||i)&&(this._textBlock&&(e.textBlockName=this._textBlock.name),this._image&&(e.imageName=this._image.name))},e.prototype._parseFromContent=function(e,i){t.prototype._parseFromContent.call(this,e,i),e.textBlockName&&(this._textBlock=this.getChildByName(e.textBlockName)),e.imageName&&(this._image=this.getChildByName(e.imageName))},e.CreateImageButton=function(t,e,i){var o=new this(t),r=new B(t+"_button",e);r.textWrapping=!0,r.textHorizontalAlignment=y.HORIZONTAL_ALIGNMENT_CENTER,r.paddingLeft="20%",o.addControl(r);var n=new C(t+"_icon",i);return n.width="20%",n.stretch=C.STRETCH_UNIFORM,n.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,o.addControl(n),o._image=n,o._textBlock=r,o},e.CreateImageOnlyButton=function(t,e){var i=new this(t),o=new C(t+"_icon",e);return o.stretch=C.STRETCH_FILL,o.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,i.addControl(o),i._image=o,i},e.CreateSimpleButton=function(t,e){var i=new this(t),o=new B(t+"_button",e);return o.textWrapping=!0,o.textHorizontalAlignment=y.HORIZONTAL_ALIGNMENT_CENTER,i.addControl(o),i._textBlock=o,i},e.CreateImageWithCenterTextButton=function(t,e,i){var o=new this(t),r=new C(t+"_icon",i);r.stretch=C.STRETCH_FILL,o.addControl(r);var n=new B(t+"_button",e);return n.textWrapping=!0,n.textHorizontalAlignment=y.HORIZONTAL_ALIGNMENT_CENTER,o.addControl(n),o._image=r,o._textBlock=n,o},e}(I);(0,h.RegisterClass)("BABYLON.GUI.Button",T);var S=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._isVertical=!0,i._manualWidth=!1,i._manualHeight=!1,i._doNotTrackManualChanges=!1,i._spacing=0,i.ignoreLayoutWarnings=!1,i}return n(e,t),Object.defineProperty(e.prototype,"isVertical",{get:function(){return this._isVertical},set:function(t){this._isVertical!==t&&(this._isVertical=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this._spacing},set:function(t){this._spacing!==t&&(this._spacing=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width.toString(this._host)},set:function(t){this._doNotTrackManualChanges||(this._manualWidth=!0),this._width.toString(this._host)!==t&&this._width.fromString(t)&&this._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height.toString(this._host)},set:function(t){this._doNotTrackManualChanges||(this._manualHeight=!0),this._height.toString(this._host)!==t&&this._height.fromString(t)&&this._markAsDirty()},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"StackPanel"},e.prototype._preMeasure=function(e,i){for(var o=0,r=this._children;o=0?Math.min(t,this._characters.length):this._characters.length+Math.max(t,-this._characters.length),void 0===e?e=this._characters.length-t:(isNaN(e)||e<0)&&(e=0);for(var i=[];--e>=0;)i[e]=this._characters[t+e];return i.join("")}return this._text.substr(t,e)},t.prototype.substring=function(t,e){if(this._characters){isNaN(t)?t=0:t>this._characters.length?t=this._characters.length:t<0&&(t=0),void 0===e?e=this._characters.length:isNaN(e)?e=0:e>this._characters.length?e=this._characters.length:e<0&&(e=0);for(var i=[],o=0;t0){if(this.isTextHighlightOn)return this._textWrapper.removePart(this._startHighlightIndex,this._endHighlightIndex),this._textHasChanged(),this.isTextHighlightOn=!1,this._cursorOffset=this._textWrapper.length-this._startHighlightIndex,this._blinkIsEven=!1,void(i&&i.preventDefault());0===this._cursorOffset?this.text=this._textWrapper.substr(0,this._textWrapper.length-1):(r=this._textWrapper.length-this._cursorOffset)>0&&(this._textWrapper.removePart(r-1,r),this._textHasChanged())}return void(i&&i.preventDefault());case 46:if(this.isTextHighlightOn)return this._textWrapper.removePart(this._startHighlightIndex,this._endHighlightIndex),this._textHasChanged(),this.isTextHighlightOn=!1,this._cursorOffset=this._textWrapper.length-this._startHighlightIndex,void(i&&i.preventDefault());if(this._textWrapper.text&&this._textWrapper.length>0&&this._cursorOffset>0){var r=this._textWrapper.length-this._cursorOffset;this._textWrapper.removePart(r,r+1),this._textHasChanged(),this._cursorOffset--}return void(i&&i.preventDefault());case 13:return this._host.focusedControl=null,void(this.isTextHighlightOn=!1);case 35:return this._cursorOffset=0,this._blinkIsEven=!1,this.isTextHighlightOn=!1,void this._markAsDirty();case 36:return this._cursorOffset=this._textWrapper.length,this._blinkIsEven=!1,this.isTextHighlightOn=!1,void this._markAsDirty();case 37:if(this._cursorOffset++,this._cursorOffset>this._textWrapper.length&&(this._cursorOffset=this._textWrapper.length),i&&i.shiftKey){if(this._blinkIsEven=!1,i.ctrlKey||i.metaKey){if(!this.isTextHighlightOn){if(this._textWrapper.length===this._cursorOffset)return;this._endHighlightIndex=this._textWrapper.length-this._cursorOffset+1}return this._startHighlightIndex=0,this._cursorIndex=this._textWrapper.length-this._endHighlightIndex,this._cursorOffset=this._textWrapper.length,this.isTextHighlightOn=!0,void this._markAsDirty()}return this.isTextHighlightOn?-1===this._cursorIndex&&(this._cursorIndex=this._textWrapper.length-this._endHighlightIndex,this._cursorOffset=0===this._startHighlightIndex?this._textWrapper.length:this._textWrapper.length-this._startHighlightIndex+1):(this.isTextHighlightOn=!0,this._cursorIndex=this._cursorOffset>=this._textWrapper.length?this._textWrapper.length:this._cursorOffset-1),this._cursorIndexthis._cursorOffset?(this._endHighlightIndex=this._textWrapper.length-this._cursorOffset,this._startHighlightIndex=this._textWrapper.length-this._cursorIndex):this.isTextHighlightOn=!1,void this._markAsDirty()}return this.isTextHighlightOn&&(this._cursorOffset=this._textWrapper.length-this._startHighlightIndex,this.isTextHighlightOn=!1),i&&(i.ctrlKey||i.metaKey)&&(this._cursorOffset=this._textWrapper.length,i.preventDefault()),this._blinkIsEven=!1,this.isTextHighlightOn=!1,this._cursorIndex=-1,void this._markAsDirty();case 39:if(this._cursorOffset--,this._cursorOffset<0&&(this._cursorOffset=0),i&&i.shiftKey){if(this._blinkIsEven=!1,i.ctrlKey||i.metaKey){if(!this.isTextHighlightOn){if(0===this._cursorOffset)return;this._startHighlightIndex=this._textWrapper.length-this._cursorOffset-1}return this._endHighlightIndex=this._textWrapper.length,this.isTextHighlightOn=!0,this._cursorIndex=this._textWrapper.length-this._startHighlightIndex,this._cursorOffset=0,void this._markAsDirty()}return this.isTextHighlightOn?-1===this._cursorIndex&&(this._cursorIndex=this._textWrapper.length-this._startHighlightIndex,this._cursorOffset=this._textWrapper.length===this._endHighlightIndex?0:this._textWrapper.length-this._endHighlightIndex-1):(this.isTextHighlightOn=!0,this._cursorIndex=this._cursorOffset<=0?0:this._cursorOffset+1),this._cursorIndexthis._cursorOffset?(this._endHighlightIndex=this._textWrapper.length-this._cursorOffset,this._startHighlightIndex=this._textWrapper.length-this._cursorIndex):this.isTextHighlightOn=!1,void this._markAsDirty()}return this.isTextHighlightOn&&(this._cursorOffset=this._textWrapper.length-this._endHighlightIndex,this.isTextHighlightOn=!1),i&&(i.ctrlKey||i.metaKey)&&(this._cursorOffset=0,i.preventDefault()),this._blinkIsEven=!1,this.isTextHighlightOn=!1,this._cursorIndex=-1,void this._markAsDirty()}if(32===t&&(e=null!==(o=null==i?void 0:i.key)&&void 0!==o?o:" "),this._deadKey="Dead"===e,e&&(-1===t||32===t||34===t||39===t||t>47&&t<64||t>64&&t<91||t>159&&t<193||t>218&&t<223||t>95&&t<112)&&(this._currentKey=e,this.onBeforeKeyAddObservable.notifyObservers(this),e=this._currentKey,this._addKey&&!this._deadKey))if(this.isTextHighlightOn)this._textWrapper.removePart(this._startHighlightIndex,this._endHighlightIndex,e),this._textHasChanged(),this._cursorOffset=this._textWrapper.length-(this._startHighlightIndex+1),this.isTextHighlightOn=!1,this._blinkIsEven=!1,this._markAsDirty();else if(0===this._cursorOffset)this.text+=this._deadKey&&(null==i?void 0:i.key)?i.key:e;else{var n=this._textWrapper.length-this._cursorOffset;this._textWrapper.removePart(n,n,e),this._textHasChanged()}}},e.prototype._updateValueFromCursorIndex=function(t){if(this._blinkIsEven=!1,-1===this._cursorIndex)this._cursorIndex=t;else if(this._cursorIndexthis._cursorOffset))return this.isTextHighlightOn=!1,void this._markAsDirty();this._endHighlightIndex=this._textWrapper.length-this._cursorOffset,this._startHighlightIndex=this._textWrapper.length-this._cursorIndex}this.isTextHighlightOn=!0,this._markAsDirty()},e.prototype._processDblClick=function(t){var e,i;this._startHighlightIndex=this._textWrapper.length-this._cursorOffset,this._endHighlightIndex=this._startHighlightIndex;do{i=this._endHighlightIndex0&&this._textWrapper.isWord(this._startHighlightIndex-1)?--this._startHighlightIndex:0}while(e||i);this._cursorOffset=this._textWrapper.length-this._startHighlightIndex,this.isTextHighlightOn=!0,this._clickedCoordinate=null,this._blinkIsEven=!0,this._cursorIndex=-1,this._markAsDirty()},e.prototype._selectAllText=function(){this._blinkIsEven=!0,this.isTextHighlightOn=!0,this._startHighlightIndex=0,this._endHighlightIndex=this._textWrapper.length,this._cursorOffset=this._textWrapper.length,this._cursorIndex=-1,this._markAsDirty()},e.prototype.processKeyboard=function(e){this.processKey(e.keyCode,e.key,e),t.prototype.processKeyboard.call(this,e)},e.prototype._onCopyText=function(t){this.isTextHighlightOn=!1;try{t.clipboardData&&t.clipboardData.setData("text/plain",this._highlightedText)}catch(t){}this._host.clipboardData=this._highlightedText},e.prototype._onCutText=function(t){if(this._highlightedText){this._textWrapper.removePart(this._startHighlightIndex,this._endHighlightIndex),this._textHasChanged(),this.isTextHighlightOn=!1,this._cursorOffset=this._textWrapper.length-this._startHighlightIndex;try{t.clipboardData&&t.clipboardData.setData("text/plain",this._highlightedText)}catch(t){}this._host.clipboardData=this._highlightedText,this._highlightedText=""}},e.prototype._onPasteText=function(t){var e;e=t.clipboardData&&-1!==t.clipboardData.types.indexOf("text/plain")?t.clipboardData.getData("text/plain"):this._host.clipboardData;var i=this._textWrapper.length-this._cursorOffset;this._textWrapper.removePart(i,i,e),this._textHasChanged()},e.prototype._draw=function(t){var e,i=this;t.save(),this._applyStates(t),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),this._isFocused?this._focusedBackground&&(t.fillStyle=this._isEnabled?this._focusedBackground:this._disabledColor,t.fillRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)):this._background&&(t.fillStyle=this._isEnabled?this._background:this._disabledColor,t.fillRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),this._fontOffset&&!this._wasDirty||(this._fontOffset=y._GetFontOffset(t.font,null===(e=this._host.getScene())||void 0===e?void 0:e.getEngine()));var o=this._currentMeasure.left+this._margin.getValueInPixel(this._host,this._tempParentMeasure.width);this.color&&(t.fillStyle=this.color);var r=this._beforeRenderText(this._textWrapper);this._isFocused||this._textWrapper.text||!this._placeholderText||((r=new R).text=this._placeholderText,this._placeholderColor&&(t.fillStyle=this._placeholderColor)),this._textWidth=t.measureText(r.text).width;var n=2*this._margin.getValueInPixel(this._host,this._tempParentMeasure.width);this._autoStretchWidth&&(this.width=Math.min(this._maxWidth.getValueInPixel(this._host,this._tempParentMeasure.width),this._textWidth+n)+"px",this._autoStretchWidth=!0);var a=this._fontOffset.ascent+(this._currentMeasure.height-this._fontOffset.height)/2,s=this._width.getValueInPixel(this._host,this._tempParentMeasure.width)-n;if(t.save(),t.beginPath(),t.rect(o,this._currentMeasure.top+(this._currentMeasure.height-this._fontOffset.height)/2,s+2,this._currentMeasure.height),t.clip(),this._isFocused&&this._textWidth>s){var l=o-this._textWidth+s;this._scrollLeft||(this._scrollLeft=l)}else this._scrollLeft=o;if(this.outlineWidth&&t.strokeText(r.text,this._scrollLeft,this._currentMeasure.top+a),t.fillText(r.text,this._scrollLeft,this._currentMeasure.top+a),this._isFocused){if(this._clickedCoordinate){var _=this._scrollLeft+this._textWidth-this._clickedCoordinate,h=0;this._cursorOffset=0;var c=0;do{this._cursorOffset&&(c=Math.abs(_-h)),this._cursorOffset++,h=t.measureText(r.substr(r.length-this._cursorOffset,this._cursorOffset)).width}while(h<_&&r.length>=this._cursorOffset);Math.abs(_-h)>c&&this._cursorOffset--,this._blinkIsEven=!1,this._clickedCoordinate=null}if(!this._blinkIsEven){var u=r.substr(r.length-this._cursorOffset),d=t.measureText(u).width,f=this._scrollLeft+this._textWidth-d;fo+s&&(this._scrollLeft+=o+s-f,f=o+s,this._markAsDirty()),this.isTextHighlightOn||t.fillRect(f,this._currentMeasure.top+(this._currentMeasure.height-this._fontOffset.height)/2,2,this._fontOffset.height)}if(clearTimeout(this._blinkTimeout),this._blinkTimeout=setTimeout((function(){i._blinkIsEven=!i._blinkIsEven,i._markAsDirty()}),500),this.isTextHighlightOn){clearTimeout(this._blinkTimeout);var p=t.measureText(r.substring(this._startHighlightIndex)).width,g=this._scrollLeft+this._textWidth-p;this._highlightedText=r.substring(this._startHighlightIndex,this._endHighlightIndex);var b=t.measureText(r.substring(this._startHighlightIndex,this._endHighlightIndex)).width;g=this._rowDefinitions.length?null:this._rowDefinitions[t]},e.prototype.getColumnDefinition=function(t){return t<0||t>=this._columnDefinitions.length?null:this._columnDefinitions[t]},e.prototype.addRowDefinition=function(t,e){var i=this;return void 0===e&&(e=!1),this._rowDefinitions.push(new c(t,e?c.UNITMODE_PIXEL:c.UNITMODE_PERCENTAGE)),this._rowDefinitionObservers.push(this._rowDefinitions[this.rowCount-1].onChangedObservable.add((function(){return i._markAsDirty()}))),this._markAsDirty(),this},e.prototype.addColumnDefinition=function(t,e){var i=this;return void 0===e&&(e=!1),this._columnDefinitions.push(new c(t,e?c.UNITMODE_PIXEL:c.UNITMODE_PERCENTAGE)),this._columnDefinitionObservers.push(this._columnDefinitions[this.columnCount-1].onChangedObservable.add((function(){return i._markAsDirty()}))),this._markAsDirty(),this},e.prototype.setRowDefinition=function(t,e,i){var o=this;if(void 0===i&&(i=!1),t<0||t>=this._rowDefinitions.length)return this;var r=this._rowDefinitions[t];return r&&r.isPixel===i&&r.value===e||(this._rowDefinitions[t].onChangedObservable.remove(this._rowDefinitionObservers[t]),this._rowDefinitions[t]=new c(e,i?c.UNITMODE_PIXEL:c.UNITMODE_PERCENTAGE),this._rowDefinitionObservers[t]=this._rowDefinitions[t].onChangedObservable.add((function(){return o._markAsDirty()})),this._markAsDirty()),this},e.prototype.setColumnDefinition=function(t,e,i){var o=this;if(void 0===i&&(i=!1),t<0||t>=this._columnDefinitions.length)return this;var r=this._columnDefinitions[t];return r&&r.isPixel===i&&r.value===e||(this._columnDefinitions[t].onChangedObservable.remove(this._columnDefinitionObservers[t]),this._columnDefinitions[t]=new c(e,i?c.UNITMODE_PIXEL:c.UNITMODE_PERCENTAGE),this._columnDefinitionObservers[t]=this._columnDefinitions[t].onChangedObservable.add((function(){return o._markAsDirty()})),this._markAsDirty()),this},e.prototype.getChildrenAt=function(t,e){var i=this._cells["".concat(t,":").concat(e)];return i?i.children:null},e.prototype.getChildCellInfo=function(t){return t._tag},e.prototype._removeCell=function(e,i){if(e){t.prototype.removeControl.call(this,e);for(var o=0,r=e.children;o=this._columnDefinitions.length)return this;for(var e=0;e=this._rowDefinitions.length)return this;for(var e=0;e=1-e._Epsilon&&(this._value.r=1),this._value.g>=1-e._Epsilon&&(this._value.g=1),this._value.b>=1-e._Epsilon&&(this._value.b=1),this.onValueChangedObservable.notifyObservers(this._value))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width.toString(this._host)},set:function(t){this._width.toString(this._host)!==t&&this._width.fromString(t)&&(0===this._width.getValue(this._host)&&(t="1px",this._width.fromString(t)),this._height.fromString(t),this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height.toString(this._host)},set:function(t){this._height.toString(this._host)!==t&&this._height.fromString(t)&&(0===this._height.getValue(this._host)&&(t="1px",this._height.fromString(t)),this._width.fromString(t),this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.width},set:function(t){this.width=t},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"ColorPicker"},e.prototype._preMeasure=function(t){t.widthl||f150?.04:-.16*(t-50)/100+.2,m=(p-_)/(t-_),a[b+3]=m1-v?255*(1-(m-(1-v))/v):255}}return r.putImageData(n,0,0),o},e.prototype._draw=function(t){t.save(),this._applyStates(t);var e=.5*Math.min(this._currentMeasure.width,this._currentMeasure.height),i=.2*e,o=this._currentMeasure.left,r=this._currentMeasure.top;this._colorWheelCanvas&&this._colorWheelCanvas.width==2*e||(this._colorWheelCanvas=this._createColorWheelCanvas(e,i)),this._updateSquareProps(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.fillRect(this._squareLeft,this._squareTop,this._squareSize,this._squareSize)),t.drawImage(this._colorWheelCanvas,o,r),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),this._drawGradientSquare(this._h,this._squareLeft,this._squareTop,this._squareSize,this._squareSize,t);var n=this._squareLeft+this._squareSize*this._s,a=this._squareTop+this._squareSize*(1-this._v);this._drawCircle(n,a,.04*e,t);var s=e-.5*i;n=o+e+Math.cos((this._h-180)*Math.PI/180)*s,a=r+e+Math.sin((this._h-180)*Math.PI/180)*s,this._drawCircle(n,a,.35*i,t),t.restore()},e.prototype._updateValueFromPointer=function(t,i){if(this._pointerStartedOnWheel){var o=.5*Math.min(this._currentMeasure.width,this._currentMeasure.height),r=o+this._currentMeasure.left,n=o+this._currentMeasure.top;this._h=180*Math.atan2(i-n,t-r)/Math.PI+180}else this._pointerStartedOnSquare&&(this._updateSquareProps(),this._s=(t-this._squareLeft)/this._squareSize,this._v=1-(i-this._squareTop)/this._squareSize,this._s=Math.min(this._s,1),this._s=Math.max(this._s,e._Epsilon),this._v=Math.min(this._v,1),this._v=Math.max(this._v,e._Epsilon));h.Color3.HSVtoRGBToRef(this._h,this._s,this._v,this._tmpColor),this.value=this._tmpColor},e.prototype._isPointOnSquare=function(t,e){this._updateSquareProps();var i=this._squareLeft,o=this._squareTop,r=this._squareSize;return t>=i&&t<=i+r&&e>=o&&e<=o+r},e.prototype._isPointOnWheel=function(t,e){var i=.5*Math.min(this._currentMeasure.width,this._currentMeasure.height),o=i-.2*i,r=t-(i+this._currentMeasure.left),n=e-(i+this._currentMeasure.top),a=r*r+n*n;return a<=i*i&&a>=o*o},e.prototype._onPointerDown=function(e,i,o,r,n){if(!t.prototype._onPointerDown.call(this,e,i,o,r,n))return!1;if(this.isReadOnly)return!0;this._pointerIsDown=!0,this._pointerStartedOnSquare=!1,this._pointerStartedOnWheel=!1,this._invertTransformMatrix.transformCoordinates(i.x,i.y,this._transformedPosition);var a=this._transformedPosition.x,s=this._transformedPosition.y;return this._isPointOnSquare(a,s)?this._pointerStartedOnSquare=!0:this._isPointOnWheel(a,s)&&(this._pointerStartedOnWheel=!0),this._updateValueFromPointer(a,s),this._host._capturingControl[o]=this,this._lastPointerDownId=o,!0},e.prototype._onPointerMove=function(e,i,o,r){if(o==this._lastPointerDownId){if(!this.isReadOnly){this._invertTransformMatrix.transformCoordinates(i.x,i.y,this._transformedPosition);var n=this._transformedPosition.x,a=this._transformedPosition.y;this._pointerIsDown&&this._updateValueFromPointer(n,a)}t.prototype._onPointerMove.call(this,e,i,o,r)}},e.prototype._onPointerUp=function(e,i,o,r,n,a){this._pointerIsDown=!1,delete this._host._capturingControl[o],t.prototype._onPointerUp.call(this,e,i,o,r,n,a)},e.prototype._onCanvasBlur=function(){this._forcePointerUp(),t.prototype._onCanvasBlur.call(this)},e.ShowPickerDialogAsync=function(t,i){return new Promise((function(o){i.pickerWidth=i.pickerWidth||"640px",i.pickerHeight=i.pickerHeight||"400px",i.headerHeight=i.headerHeight||"35px",i.lastColor=i.lastColor||"#000000",i.swatchLimit=i.swatchLimit||20,i.numSwatchesPerLine=i.numSwatchesPerLine||10;var r,n,a,s,l,_,c,u=i.swatchLimit/i.numSwatchesPerLine,d=parseFloat(i.pickerWidth)/i.numSwatchesPerLine,f=Math.floor(.25*d),p=f*(i.numSwatchesPerLine+1),g=Math.floor((parseFloat(i.pickerWidth)-p)/i.numSwatchesPerLine),b=g*u+f*(u+1),m=(parseInt(i.pickerHeight)+b+Math.floor(.25*g)).toString()+"px",v="#c0c0c0",x="#535353",P="#414141",C="515151",S="#555555",O="#454545",R=h.Color3.FromHexString("#dddddd"),E=R.r+R.g+R.b,F="#aaaaaa",D="#ffffff",L=["R","G","B"],k="#454545",N="#f0f0f0",A=!1,z=new M;if(z.name="Dialog Container",z.width=i.pickerWidth,i.savedColors){z.height=m;var Q=parseInt(i.pickerHeight)/parseInt(m);z.addRowDefinition(Q,!1),z.addRowDefinition(1-Q,!1)}else z.height=i.pickerHeight,z.addRowDefinition(1,!1);if(t.addControl(z),i.savedColors){(s=new M).name="Swatch Drawer",s.verticalAlignment=y.VERTICAL_ALIGNMENT_TOP,s.background=x,s.width=i.pickerWidth;var V,W=i.savedColors.length/i.numSwatchesPerLine;V=0==W?0:W+1,s.height=(g*W+V*f).toString()+"px",s.top=Math.floor(.25*g).toString()+"px";for(var H=0;H<2*Math.ceil(i.savedColors.length/i.numSwatchesPerLine)+1;H++)H%2!=0?s.addRowDefinition(g,!0):s.addRowDefinition(f,!0);for(H=0;H<2*i.numSwatchesPerLine+1;H++)H%2!=0?s.addColumnDefinition(g,!0):s.addColumnDefinition(f,!0);z.addControl(s,1,0)}var G=new M;G.name="Picker Panel",G.height=i.pickerHeight;var U=parseInt(i.headerHeight)/parseInt(i.pickerHeight),j=[U,1-U];G.addRowDefinition(j[0],!1),G.addRowDefinition(j[1],!1),z.addControl(G,0,0);var Y=new I;Y.name="Dialogue Header Bar",Y.background="#cccccc",Y.thickness=0,G.addControl(Y,0,0);var X=T.CreateSimpleButton("closeButton","a");X.fontFamily="coreglyphs";var K=h.Color3.FromHexString(Y.background),Z=new h.Color3(1-K.r,1-K.g,1-K.b);X.color=Z.toHexString(),X.fontSize=Math.floor(.6*parseInt(i.headerHeight)),X.textBlock.textVerticalAlignment=y.VERTICAL_ALIGNMENT_CENTER,X.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_RIGHT,X.height=X.width=i.headerHeight,X.background=Y.background,X.thickness=0,X.pointerDownAnimation=function(){},X.pointerUpAnimation=function(){X.background=Y.background},X.pointerEnterAnimation=function(){X.color=Y.background,X.background="red"},X.pointerOutAnimation=function(){X.color=Z.toHexString(),X.background=Y.background},X.onPointerClickObservable.add((function(){Gt(dt.background)})),G.addControl(X,0,0);var q=new M;q.name="Dialogue Body",q.background=x;var J=[.4375,.5625];q.addRowDefinition(1,!1),q.addColumnDefinition(J[0],!1),q.addColumnDefinition(J[1],!1),G.addControl(q,1,0);var $=new M;$.name="Picker Grid",$.addRowDefinition(.85,!1),$.addRowDefinition(.15,!1),q.addControl($,0,0);var tt=new e;tt.name="GUI Color Picker",i.pickerHeighti.pickerHeight?ht:_t;var ct=new B;ct.text="new",ct.name="New Color Label",ct.color=v,ct.fontSize=lt,nt.addControl(ct,1,0);var ut=new I;ut.name="New Color Swatch",ut.background=i.lastColor,ut.thickness=0,st.addControl(ut,0,0);var dt=T.CreateSimpleButton("currentSwatch","");dt.background=i.lastColor,dt.thickness=0,dt.onPointerClickObservable.add((function(){kt(h.Color3.FromHexString(dt.background),dt.name),Qt(!1)})),dt.pointerDownAnimation=function(){},dt.pointerUpAnimation=function(){},dt.pointerEnterAnimation=function(){},dt.pointerOutAnimation=function(){},st.addControl(dt,1,0);var ft=new I;ft.name="Swatch Outline",ft.width=.67,ft.thickness=2,ft.color="#404040",ft.isHitTestVisible=!1,nt.addControl(ft,2,0);var pt=new B;pt.name="Current Color Label",pt.text="current",pt.color=v,pt.fontSize=lt,nt.addControl(pt,3,0);var gt=new M;gt.name="Button Grid",gt.height=.8;var bt=1/3;gt.addRowDefinition(bt,!1),gt.addRowDefinition(bt,!1),gt.addRowDefinition(bt,!1),ot.addControl(gt,0,1);var mt=Math.floor(parseInt(i.pickerWidth)*J[1]*rt[1]*.67).toString()+"px",vt=Math.floor(parseInt(i.pickerHeight)*j[1]*it[0]*(parseFloat(gt.height.toString())/100)*bt*.7).toString()+"px";r=parseFloat(mt)>parseFloat(vt)?Math.floor(.45*parseFloat(vt)):Math.floor(.11*parseFloat(mt));var yt=T.CreateSimpleButton("butOK","OK");yt.width=mt,yt.height=vt,yt.verticalAlignment=y.VERTICAL_ALIGNMENT_CENTER,yt.thickness=2,yt.color=v,yt.fontSize=r,yt.background=x,yt.onPointerEnterObservable.add((function(){yt.background=P})),yt.onPointerOutObservable.add((function(){yt.background=x})),yt.pointerDownAnimation=function(){yt.background=C},yt.pointerUpAnimation=function(){yt.background=P},yt.onPointerClickObservable.add((function(){Qt(!1),Gt(ut.background)})),gt.addControl(yt,0,0);var xt=T.CreateSimpleButton("butCancel","Cancel");xt.width=mt,xt.height=vt,xt.verticalAlignment=y.VERTICAL_ALIGNMENT_CENTER,xt.thickness=2,xt.color=v,xt.fontSize=r,xt.background=x,xt.onPointerEnterObservable.add((function(){xt.background=P})),xt.onPointerOutObservable.add((function(){xt.background=x})),xt.pointerDownAnimation=function(){xt.background=C},xt.pointerUpAnimation=function(){xt.background=P},xt.onPointerClickObservable.add((function(){Qt(!1),Gt(dt.background)})),gt.addControl(xt,1,0),i.savedColors&&((l=T.CreateSimpleButton("butSave","Save")).width=mt,l.height=vt,l.verticalAlignment=y.VERTICAL_ALIGNMENT_CENTER,l.thickness=2,l.fontSize=r,i.savedColors.length0&&Wt(!0),gt.addControl(l,2,0));var Pt=new M;Pt.name="Dialog Lower Right",Pt.addRowDefinition(.02,!1),Pt.addRowDefinition(.63,!1),Pt.addRowDefinition(.21,!1),Pt.addRowDefinition(.14,!1),et.addControl(Pt,1,0);var It=h.Color3.FromHexString(i.lastColor),Bt=new M;for(Bt.name="RGB Values",Bt.width=.82,Bt.verticalAlignment=y.VERTICAL_ALIGNMENT_CENTER,Bt.addRowDefinition(1/3,!1),Bt.addRowDefinition(1/3,!1),Bt.addRowDefinition(1/3,!1),Bt.addColumnDefinition(.1,!1),Bt.addColumnDefinition(.2,!1),Bt.addColumnDefinition(.7,!1),Pt.addControl(Bt,1,0),H=0;H255?i="255":isNaN(parseInt(i))&&(i="0")),c==t.name&&(_=i),""!=i){i=parseInt(i).toString(),t.text=i;var o=h.Color3.FromHexString(ut.background);c==t.name&&kt("r"==e?new h.Color3(parseInt(i)/255,o.g,o.b):"g"==e?new h.Color3(o.r,parseInt(i)/255,o.b):new h.Color3(o.r,o.g,parseInt(i)/255),t.name)}}function At(t,e){var i=t.text;if(/[^0-9.]/g.test(i))t.text=_;else{""!=i&&"."!=i&&0!=parseFloat(i)&&(parseFloat(i)<0?i="0.0":parseFloat(i)>1?i="1.0":isNaN(parseFloat(i))&&(i="0.0")),c==t.name&&(_=i),""!=i&&"."!=i&&0!=parseFloat(i)?(i=parseFloat(i).toString(),t.text=i):i="0.0";var o=h.Color3.FromHexString(ut.background);c==t.name&&kt("r"==e?new h.Color3(parseFloat(i),o.g,o.b):"g"==e?new h.Color3(o.r,parseFloat(i),o.b):new h.Color3(o.r,o.g,parseFloat(i)),t.name)}}function zt(){if(i.savedColors&&i.savedColors[a]){var t;t=A?"b":"";var e=T.CreateSimpleButton("Swatch_"+a,t);e.fontFamily="coreglyphs";var o=h.Color3.FromHexString(i.savedColors[a]),r=o.r+o.g+o.b;e.color=r>E?F:D,e.fontSize=Math.floor(.7*g),e.textBlock.verticalAlignment=y.VERTICAL_ALIGNMENT_CENTER,e.height=e.width=g.toString()+"px",e.background=i.savedColors[a],e.thickness=2;var n=a;return e.pointerDownAnimation=function(){e.thickness=4},e.pointerUpAnimation=function(){e.thickness=3},e.pointerEnterAnimation=function(){e.thickness=3},e.pointerOutAnimation=function(){e.thickness=2},e.onPointerClickObservable.add((function(){var t;A?(t=n,i.savedColors&&i.savedColors.splice(t,1),i.savedColors&&0==i.savedColors.length&&(Wt(!1),A=!1),Vt("",l)):i.savedColors&&kt(h.Color3.FromHexString(i.savedColors[n]),e.name)})),e}return null}function Qt(t){if(void 0!==t&&(A=t),A){for(var e=0;eh*i.numSwatchesPerLine?i.numSwatchesPerLine:i.savedColors.length-(h-1)*i.numSwatchesPerLine;for(var u=Math.min(Math.max(c,0),i.numSwatchesPerLine),d=0,p=1;di.numSwatchesPerLine)){var b=zt();null!=b&&(s.addControl(b,_,p),p+=2,a++)}}i.savedColors.length>=i.swatchLimit?Ht(e,!0):Ht(e,!1)}}function Wt(t){t?((n=T.CreateSimpleButton("butEdit","Edit")).width=mt,n.height=vt,n.left=Math.floor(.1*parseInt(mt)).toString()+"px",n.top=(-1*parseFloat(n.left)).toString()+"px",n.verticalAlignment=y.VERTICAL_ALIGNMENT_BOTTOM,n.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,n.thickness=2,n.color=v,n.fontSize=r,n.background=x,n.onPointerEnterObservable.add((function(){n.background=P})),n.onPointerOutObservable.add((function(){n.background=x})),n.pointerDownAnimation=function(){n.background=C},n.pointerUpAnimation=function(){n.background=P},n.onPointerClickObservable.add((function(){A=!A,Qt()})),$.addControl(n,1,0)):$.removeControl(n)}function Ht(t,e){e?(t.color=S,t.background=O):(t.color=v,t.background=x)}function Gt(e){i.savedColors&&i.savedColors.length>0?o({savedColors:i.savedColors,pickedColor:e}):o({pickedColor:e}),t.removeControl(z)}Dt.text=Lt[1],Dt.color=N,Dt.background=k,Dt.onFocusObservable.add((function(){c=Dt.name,_=Dt.text,Qt(!1)})),Dt.onBlurObservable.add((function(){if(3==Dt.text.length){var t=Dt.text.split("");Dt.text=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]}""==Dt.text&&(Dt.text="000000",kt(h.Color3.FromHexString(Dt.text),"b")),c==Dt.name&&(c="")})),Dt.onTextChangedObservable.add((function(){var t=Dt.text,e=/[^0-9A-F]/i.test(t);if((Dt.text.length>6||e)&&c==Dt.name)Dt.text=_;else{if(Dt.text.length<6)for(var i=6-Dt.text.length,o=0;o0&&Vt("",l)}))},e._Epsilon=1e-6,s([(0,h.serialize)()],e.prototype,"value",null),s([(0,h.serialize)()],e.prototype,"width",null),s([(0,h.serialize)()],e.prototype,"height",null),s([(0,h.serialize)()],e.prototype,"size",null),e}(y);(0,h.RegisterClass)("BABYLON.GUI.ColorPicker",E);var F=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._thickness=1,i._arc=1,i}return n(e,t),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(t){this._thickness!==t&&(this._thickness=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arc",{get:function(){return this._arc},set:function(t){this._arc!==t&&(this._arc=t,this._markAsDirty())},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"Ellipse"},e.prototype._localDraw=function(t){t.save(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),y.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,this._currentMeasure.width/2-this._thickness/2,this._currentMeasure.height/2-this._thickness/2,this._arc,t),(this._backgroundGradient||this._background)&&(t.fillStyle=this._getBackgroundColor(t),t.fill()),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),this._thickness&&(this.color&&(t.strokeStyle=this.color),t.lineWidth=this._thickness,t.stroke()),t.restore()},e.prototype._additionalProcessing=function(e,i){t.prototype._additionalProcessing.call(this,e,i),this._measureForChildren.width-=2*this._thickness,this._measureForChildren.height-=2*this._thickness,this._measureForChildren.left+=this._thickness,this._measureForChildren.top+=this._thickness},e.prototype._clipForChildren=function(t){y.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,this._currentMeasure.width/2,this._currentMeasure.height/2,this._arc,t),t.clip()},e.prototype._renderHighlightSpecific=function(t){y.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,this._currentMeasure.width/2-this._highlightLineWidth/2,this._currentMeasure.height/2-this._highlightLineWidth/2,this._arc,t),t.stroke()},s([(0,h.serialize)()],e.prototype,"thickness",null),s([(0,h.serialize)()],e.prototype,"arc",null),e}(x);(0,h.RegisterClass)("BABYLON.GUI.Ellipse",F);var D=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._unfocusedColor=i.color,i}return n(e,t),e.prototype._onPointerDown=function(e,i,o,r,n){return this.isReadOnly||this.focus(),t.prototype._onPointerDown.call(this,e,i,o,r,n)},e}(T);(0,h.RegisterClass)("BABYLON.GUI.FocusableButton",D);var L=function(t){function e(e,i){void 0===i&&(i="");var o=t.call(this,e)||this;return o.name=e,o._textHorizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,o._textVerticalAlignment=y.VERTICAL_ALIGNMENT_TOP,o._prevText=o.text,o._lineSpacing=new c(0),o._maxHeight=new c(1,c.UNITMODE_PERCENTAGE,!1),o.onLinesReadyObservable=new h.Observable,o.text=i,o.isPointerBlocker=!0,o.onLinesReadyObservable.add((function(){return o._updateCursorPosition()})),o._highlightCursorInfo={initialStartIndex:-1,initialRelativeStartIndex:-1,initialLineIndex:-1},o._cursorInfo={globalStartIndex:0,globalEndIndex:0,relativeEndIndex:0,relativeStartIndex:0,currentLineIndex:0},o}return n(e,t),Object.defineProperty(e.prototype,"autoStretchHeight",{get:function(){return this._autoStretchHeight},set:function(t){this._autoStretchHeight!==t&&(this._autoStretchHeight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{set:function(t){this.fixedRatioMasterIsWidth=!1,this._height.toString(this._host)!==t&&(this._height.fromString(t)&&this._markAsDirty(),this._autoStretchHeight=!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxHeight",{get:function(){return this._maxHeight.toString(this._host)},set:function(t){this._maxHeight.toString(this._host)!==t&&this._maxHeight.fromString(t)&&this._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxHeightInPixels",{get:function(){return this._maxHeight.getValueInPixel(this._host,this._cachedParentMeasure.height)},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"InputTextArea"},e.prototype.processKeyboard=function(t){this.isReadOnly||(this.alternativeProcessKey(t.code,t.key,t),this.onKeyboardEventProcessedObservable.notifyObservers(t))},e.prototype.alternativeProcessKey=function(t,e,i){if(!i||!i.ctrlKey&&!i.metaKey||"c"!==e&&"v"!==e&&"x"!==e){switch(t){case"Period":i&&i.shiftKey&&i.preventDefault();break;case"Backspace":!this._isTextHighlightOn&&this._cursorInfo.globalStartIndex>0&&(this._cursorInfo.globalEndIndex=this._cursorInfo.globalStartIndex,this._cursorInfo.globalStartIndex--),this._prevText=this._textWrapper.text,this._textWrapper.removePart(this._cursorInfo.globalStartIndex,this._cursorInfo.globalEndIndex),this._cursorInfo.globalEndIndex=this._cursorInfo.globalStartIndex,i&&i.preventDefault(),this._blinkIsEven=!1,this._isTextHighlightOn=!1,this._textHasChanged();break;case"Delete":!this._isTextHighlightOn&&this._cursorInfo.globalEndIndexthis._highlightCursorInfo.initialStartIndex?this._cursorInfo.globalEndIndex--:this._cursorInfo.globalStartIndex--:(this._highlightCursorInfo.initialLineIndex=this._cursorInfo.currentLineIndex,this._highlightCursorInfo.initialStartIndex=this._cursorInfo.globalStartIndex,this._highlightCursorInfo.initialRelativeStartIndex=this._cursorInfo.relativeStartIndex,this._cursorInfo.globalEndIndex=this._cursorInfo.globalStartIndex,this._cursorInfo.globalStartIndex--,this._isTextHighlightOn=!0),this._blinkIsEven=!0,void i.preventDefault()):(this._isTextHighlightOn?this._cursorInfo.globalEndIndex=this._cursorInfo.globalStartIndex:i&&(i.ctrlKey||i.metaKey)?(this._cursorInfo.globalStartIndex-=this._cursorInfo.relativeStartIndex,i.preventDefault()):this._cursorInfo.globalStartIndex>0&&this._cursorInfo.globalStartIndex--,this._blinkIsEven=!1,void(this._isTextHighlightOn=!1));case"ArrowRight":if(this._markAsDirty(),i&&i.shiftKey){if(i.ctrlKey||i.metaKey){var o=this._lines[this._cursorInfo.currentLineIndex].text.length-this._cursorInfo.relativeEndIndex-1;this._cursorInfo.globalEndIndex+=o,this._cursorInfo.globalStartIndex=this._highlightCursorInfo.initialStartIndex}return this._isTextHighlightOn?this._cursorInfo.globalStartIndexc&&u>0&&a--,this._isTextHighlightOn?this._cursorInfo.currentLineIndex<=this._highlightCursorInfo.initialLineIndex?(this._cursorInfo.globalStartIndex=a,this._cursorInfo.globalEndIndex=this._highlightCursorInfo.initialStartIndex,this._cursorInfo.relativeEndIndex=this._highlightCursorInfo.initialRelativeStartIndex):this._cursorInfo.globalEndIndex=a:this._cursorInfo.globalStartIndex=a}return void this._markAsDirty();case"ArrowDown":if(this._blinkIsEven=!1,i&&(i.shiftKey?(this._isTextHighlightOn||(this._highlightCursorInfo.initialLineIndex=this._cursorInfo.currentLineIndex,this._highlightCursorInfo.initialStartIndex=this._cursorInfo.globalStartIndex,this._highlightCursorInfo.initialRelativeStartIndex=this._cursorInfo.relativeStartIndex),this._isTextHighlightOn=!0,this._blinkIsEven=!0):this._isTextHighlightOn=!1,i.preventDefault()),this._cursorInfo.currentLineIndex===this._lines.length-1)this._cursorInfo.globalStartIndex=this.text.length;else{r=this._lines[this._cursorInfo.currentLineIndex];var d=this._lines[this._cursorInfo.currentLineIndex+1];a=0,s=0,!this._isTextHighlightOn||this._cursorInfo.currentLineIndexc&&p>0&&a--,this._isTextHighlightOn?this._cursorInfo.currentLineIndexthis._cursorInfo.globalEndIndex&&(this._cursorInfo.globalEndIndex+=this._cursorInfo.globalStartIndex,this._cursorInfo.globalStartIndex=this._cursorInfo.globalEndIndex-this._cursorInfo.globalStartIndex,this._cursorInfo.globalEndIndex-=this._cursorInfo.globalStartIndex)):(this._cursorInfo.globalEndIndex=a,this._cursorInfo.globalStartIndex=this._highlightCursorInfo.initialStartIndex):this._cursorInfo.globalStartIndex=a}return void this._markAsDirty()}if("a"===e&&i&&(i.ctrlKey||i.metaKey))return this._selectAllText(),void i.preventDefault();1===(null==e?void 0:e.length)&&(null==i||i.preventDefault(),this._currentKey=e,this.onBeforeKeyAddObservable.notifyObservers(this),e=this._currentKey,this._addKey&&(this._isTextHighlightOn=!1,this._blinkIsEven=!1,this._prevText=this._textWrapper.text,this._textWrapper.removePart(this._cursorInfo.globalStartIndex,this._cursorInfo.globalEndIndex,e),this._cursorInfo.globalStartIndex+=e.length,this._cursorInfo.globalEndIndex=this._cursorInfo.globalStartIndex,this._textHasChanged()))}},e.prototype._parseLineWordWrap=function(t,e,i){void 0===t&&(t="");for(var o=[],r=t.split(" "),n=0,a=function(a){var s=a>0?t+" "+r[a]:r[0],l=i.measureText(s).width;if(l>e){a>0&&(n=i.measureText(t).width,o.push({text:t,width:n,lineEnding:" "})),t=r[a];var _="";t.split("").map((function(t){i.measureText(_+t).width>e&&(o.push({text:_,width:i.measureText(_).width,lineEnding:""}),_=""),_+=t})),t=_,n=i.measureText(t).width}else n=l,t=s},s=0;se.measureText(t).width?i:t}),""),a=e.measureText(n).width;this.width=Math.min(this._maxWidth.getValueInPixel(this._host,t.width),a+r)+"px",this.autoStretchWidth=!0}if(this._availableWidth=this._width.getValueInPixel(this._host,t.width)-r,this._lines=this._breakLines(this._availableWidth,e),this._contextForBreakLines=e,this._autoStretchHeight){var s=this._lines.length*this._fontOffset.height+2*this._margin.getValueInPixel(this._host,t.height);this.height=Math.min(this._maxHeight.getValueInPixel(this._host,t.height),s)+"px",this._autoStretchHeight=!0}if(this._availableHeight=this._height.getValueInPixel(this._host,t.height)-r,this._isFocused){this._cursorInfo.currentLineIndex=0;for(var l=this._lines[this._cursorInfo.currentLineIndex].text.length+this._lines[this._cursorInfo.currentLineIndex].lineEnding.length,_=0;_+l<=this._cursorInfo.globalStartIndex;)_+=l,this._cursorInfo.currentLineIndexthis._availableWidth){var t=this._clipTextLeft-this._lines[this._cursorInfo.currentLineIndex].width+this._availableWidth;this._scrollLeft||(this._scrollLeft=t)}else this._scrollLeft=this._clipTextLeft;if(this._isFocused){var e=(this._cursorInfo.currentLineIndex+1)*this._fontOffset.height,i=this._clipTextTop-e;this._scrollTop||(this._scrollTop=i)}else this._scrollTop=this._clipTextTop},e.prototype._additionalProcessing=function(){this.highlightedText="",this.onLinesReadyObservable.notifyObservers(this)},e.prototype._drawText=function(t,e,i,o){var r=this._currentMeasure.width,n=this._scrollLeft;switch(this._textHorizontalAlignment){case y.HORIZONTAL_ALIGNMENT_LEFT:n+=0;break;case y.HORIZONTAL_ALIGNMENT_RIGHT:n+=r-e;break;case y.HORIZONTAL_ALIGNMENT_CENTER:n+=(r-e)/2}(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(o.shadowColor=this.shadowColor,o.shadowBlur=this.shadowBlur,o.shadowOffsetX=this.shadowOffsetX,o.shadowOffsetY=this.shadowOffsetY),this.outlineWidth&&o.strokeText(t,this._currentMeasure.left+n,i),o.fillText(t,n,i)},e.prototype._onCopyText=function(t){this._isTextHighlightOn=!1;try{t.clipboardData&&t.clipboardData.setData("text/plain",this._highlightedText)}catch(t){}this._host.clipboardData=this._highlightedText},e.prototype._onCutText=function(t){if(this._highlightedText){try{t.clipboardData&&t.clipboardData.setData("text/plain",this._highlightedText)}catch(t){}this._host.clipboardData=this._highlightedText,this._prevText=this._textWrapper.text,this._textWrapper.removePart(this._cursorInfo.globalStartIndex,this._cursorInfo.globalEndIndex),this._textHasChanged()}},e.prototype._onPasteText=function(t){var e;e=t.clipboardData&&-1!==t.clipboardData.types.indexOf("text/plain")?t.clipboardData.getData("text/plain"):this._host.clipboardData,this._isTextHighlightOn=!1,this._prevText=this._textWrapper.text,this._textWrapper.removePart(this._cursorInfo.globalStartIndex,this._cursorInfo.globalEndIndex,e);var i=e.length-(this._cursorInfo.globalEndIndex-this._cursorInfo.globalStartIndex);this._cursorInfo.globalStartIndex+=i,this._cursorInfo.globalEndIndex=this._cursorInfo.globalStartIndex,this._textHasChanged()},e.prototype._draw=function(t){var e,i;this._computeScroll(),this._scrollLeft=null!==(e=this._scrollLeft)&&void 0!==e?e:0,this._scrollTop=null!==(i=this._scrollTop)&&void 0!==i?i:0,t.save(),this._applyStates(t),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),this._isFocused?this._focusedBackground&&(t.fillStyle=this._isEnabled?this._focusedBackground:this._disabledColor,t.fillRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)):this._background&&(t.fillStyle=this._isEnabled?this._background:this._disabledColor,t.fillRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),this.color&&(t.fillStyle=this.color);var o=this._currentMeasure.height,r=this._currentMeasure.width,n=0;switch(this._textVerticalAlignment){case y.VERTICAL_ALIGNMENT_TOP:n=this._fontOffset.ascent;break;case y.VERTICAL_ALIGNMENT_BOTTOM:n=o-this._fontOffset.height*(this._lines.length-1)-this._fontOffset.descent;break;case y.VERTICAL_ALIGNMENT_CENTER:n=this._fontOffset.ascent+(o-this._fontOffset.height*this._lines.length)/2}t.save(),t.beginPath(),t.fillStyle=this.fontStyle,!this._textWrapper.text&&this.placeholderText&&(t.fillStyle=this._placeholderColor),t.rect(this._clipTextLeft,this._clipTextTop,this._availableWidth+2,this._availableHeight+2),t.clip(),n+=this._scrollTop;for(var a=0;athis._clipTextLeft+this._availableWidth&&(this._scrollLeft+=this._clipTextLeft+this._availableWidth-l,l=this._clipTextLeft+this._availableWidth,this._markAsDirty());var _=this._scrollTop+this._cursorInfo.currentLineIndex*this._fontOffset.height;_this._clipTextTop+this._availableHeight&&(this._scrollTop+=this._clipTextTop+this._availableHeight-_-this._fontOffset.height,_=this._clipTextTop+this._availableHeight-this._fontOffset.height,this._markAsDirty()),this._isTextHighlightOn||t.fillRect(l,_,2,this._fontOffset.height)}if(this._resetBlinking(),this._isTextHighlightOn){clearTimeout(this._blinkTimeout),this._highlightedText=this.text.substring(this._cursorInfo.globalStartIndex,this._cursorInfo.globalEndIndex),t.globalAlpha=this._highligherOpacity,t.fillStyle=this._textHighlightColor;var h=Math.min(this._cursorInfo.currentLineIndex,this._highlightCursorInfo.initialLineIndex),c=Math.max(this._cursorInfo.currentLineIndex,this._highlightCursorInfo.initialLineIndex),u=this._scrollTop+h*this._fontOffset.height;for(a=h;a<=c;a++){s=this._lines[a];var d=this._scrollLeft;switch(this._textHorizontalAlignment){case y.HORIZONTAL_ALIGNMENT_LEFT:d+=0;break;case y.HORIZONTAL_ALIGNMENT_RIGHT:d+=r-s.width;break;case y.HORIZONTAL_ALIGNMENT_CENTER:d+=(r-s.width)/2}var f=a===h?this._cursorInfo.relativeStartIndex:0,p=a===c?this._cursorInfo.relativeEndIndex:s.text.length,g=t.measureText(s.text.substr(0,f)).width,b=s.text.substring(f,p),m=t.measureText(b).width;t.fillRect(d+g,u,m,this._fontOffset.height),u+=this._fontOffset.height}this._cursorInfo.globalEndIndex===this._cursorInfo.globalStartIndex&&this._resetBlinking()}}t.restore(),this._thickness&&(this._isFocused?this.focusedColor&&(t.strokeStyle=this.focusedColor):this.color&&(t.strokeStyle=this.color),t.lineWidth=this._thickness,t.strokeRect(this._currentMeasure.left+this._thickness/2,this._currentMeasure.top+this._thickness/2,this._currentMeasure.width-this._thickness,this._currentMeasure.height-this._thickness))},e.prototype._resetBlinking=function(){var t=this;clearTimeout(this._blinkTimeout),this._blinkTimeout=setTimeout((function(){t._blinkIsEven=!t._blinkIsEven,t._markAsDirty()}),500)},e.prototype._onPointerDown=function(e,i,o,r,n){return!(!t.prototype._onPointerDown.call(this,e,i,o,r,n)||!this.isReadOnly&&(this._clickedCoordinateX=i.x,this._clickedCoordinateY=i.y,this._isTextHighlightOn=!1,this._highlightedText="",this._isPointerDown=!0,this._host._capturingControl[o]=this,this._host.focusedControl===this?(clearTimeout(this._blinkTimeout),this._markAsDirty(),0):!this._isEnabled||(this._host.focusedControl=this,0)))},e.prototype._onPointerMove=function(e,i,o,r){0===r.event.movementX&&0===r.event.movementY||(this._host.focusedControl===this&&this._isPointerDown&&!this.isReadOnly&&(this._clickedCoordinateX=i.x,this._clickedCoordinateY=i.y,this._isTextHighlightOn||(this._highlightCursorInfo.initialLineIndex=this._cursorInfo.currentLineIndex,this._highlightCursorInfo.initialStartIndex=this._cursorInfo.globalStartIndex,this._highlightCursorInfo.initialRelativeStartIndex=this._cursorInfo.relativeStartIndex,this._isTextHighlightOn=!0),this._markAsDirty()),t.prototype._onPointerMove.call(this,e,i,o,r))},e.prototype._updateCursorPosition=function(){var t;if(this._isFocused)if(!this._textWrapper.text&&this.placeholderText)this._cursorInfo.currentLineIndex=0,this._cursorInfo.globalStartIndex=0,this._cursorInfo.globalEndIndex=0,this._cursorInfo.relativeStartIndex=0,this._cursorInfo.relativeEndIndex=0;else if(this._clickedCoordinateX&&this._clickedCoordinateY){this._isTextHighlightOn||(this._cursorInfo={globalStartIndex:0,globalEndIndex:0,relativeStartIndex:0,relativeEndIndex:0,currentLineIndex:0});var e=0,i=0,o=this._clickedCoordinateY-this._scrollTop,r=Math.floor(o/this._fontOffset.height);this._cursorInfo.currentLineIndex=Math.min(Math.max(r,0),this._lines.length-1);for(var n=0,a=this._clickedCoordinateX-(null!==(t=this._scrollLeft)&&void 0!==t?t:0),s=0,l=0;li;)i++,s=Math.abs(a-n),n=this._contextForBreakLines.measureText(this._lines[this._cursorInfo.currentLineIndex].text.substr(0,i)).width;Math.abs(a-n)>s&&i>0&&i--,e+=i,this._isTextHighlightOn?e=this._highlightCursorInfo.initialStartIndex){for(;c+h<=this._cursorInfo.globalEndIndex;)c+=h,this._cursorInfo.currentLineIndex0&&this._textWrapper.isWord(this._cursorInfo.globalStartIndex-1)?--this._cursorInfo.globalStartIndex:0,i=this._cursorInfo.globalEndIndex1?this.notRenderable=!0:this.notRenderable=!1}else h.Tools.Error("Cannot move a control to a vector3 if the control is not at root level")},e.prototype._moveToProjectedPosition=function(t,e){void 0===e&&(e=!1);var i=t.x+this._linkOffsetX.getValue(this._host)+"px",o=t.y+this._linkOffsetY.getValue(this._host)+"px";e?(this.x2=i,this.y2=o,this._x2.ignoreAdaptiveScaling=!0,this._y2.ignoreAdaptiveScaling=!0):(this.x1=i,this.y1=o,this._x1.ignoreAdaptiveScaling=!0,this._y1.ignoreAdaptiveScaling=!0)},s([(0,h.serialize)()],e.prototype,"dash",null),s([(0,h.serialize)()],e.prototype,"x1",null),s([(0,h.serialize)()],e.prototype,"y1",null),s([(0,h.serialize)()],e.prototype,"x2",null),s([(0,h.serialize)()],e.prototype,"y2",null),s([(0,h.serialize)()],e.prototype,"lineWidth",null),e}(y);(0,h.RegisterClass)("BABYLON.GUI.Line",N);var A=function(){function t(t){this._multiLine=t,this._x=new c(0),this._y=new c(0),this._point=new h.Vector3(0,0,0)}return Object.defineProperty(t.prototype,"x",{get:function(){return this._x.toString(this._multiLine._host)},set:function(t){this._x.toString(this._multiLine._host)!==t&&this._x.fromString(t)&&this._multiLine._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y.toString(this._multiLine._host)},set:function(t){this._y.toString(this._multiLine._host)!==t&&this._y.fromString(t)&&this._multiLine._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this._control},set:function(t){this._control!==t&&(this._control&&this._controlObserver&&(this._control.onDirtyObservable.remove(this._controlObserver),this._controlObserver=null),this._control=t,this._control&&(this._controlObserver=this._control.onDirtyObservable.add(this._multiLine.onPointUpdate)),this._multiLine._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mesh",{get:function(){return this._mesh},set:function(t){this._mesh!==t&&(this._mesh&&this._meshObserver&&this._mesh.getScene().onAfterCameraRenderObservable.remove(this._meshObserver),this._mesh=t,this._mesh&&(this._meshObserver=this._mesh.getScene().onAfterCameraRenderObservable.add(this._multiLine.onPointUpdate)),this._multiLine._markAsDirty())},enumerable:!1,configurable:!0}),t.prototype.resetLinks=function(){this.control=null,this.mesh=null},t.prototype.translate=function(){return this._point=this._translatePoint(),this._point},t.prototype._translatePoint=function(){if(null!=this._mesh)return this._multiLine._host.getProjectedPositionWithZ(this._mesh.getBoundingInfo().boundingSphere.center,this._mesh.getWorldMatrix());if(null!=this._control)return new h.Vector3(this._control.centerX,this._control.centerY,1-h.Epsilon);var t=this._multiLine._host,e=this._x.getValueInPixel(t,Number(t._canvas.width)),i=this._y.getValueInPixel(t,Number(t._canvas.height));return new h.Vector3(e,i,1-h.Epsilon)},t.prototype.dispose=function(){this.resetLinks()},t}(),z=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._lineWidth=1,i.onPointUpdate=function(){i._markAsDirty()},i._automaticSize=!0,i.isHitTestVisible=!1,i._horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,i._verticalAlignment=y.VERTICAL_ALIGNMENT_TOP,i._dash=[],i._points=[],i}return n(e,t),Object.defineProperty(e.prototype,"dash",{get:function(){return this._dash},set:function(t){this._dash!==t&&(this._dash=t,this._markAsDirty())},enumerable:!1,configurable:!0}),e.prototype.getAt=function(t){return this._points[t]||(this._points[t]=new A(this)),this._points[t]},e.prototype.add=function(){for(var t=this,e=[],i=0;i0;)this.remove(this._points.length-1)},e.prototype.resetLinks=function(){this._points.forEach((function(t){null!=t&&t.resetLinks()}))},Object.defineProperty(e.prototype,"lineWidth",{get:function(){return this._lineWidth},set:function(t){this._lineWidth!==t&&(this._lineWidth=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horizontalAlignment",{set:function(t){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalAlignment",{set:function(t){},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"MultiLine"},e.prototype._draw=function(t){t.save(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),this._applyStates(t),t.strokeStyle=this.color,t.lineWidth=this._lineWidth,t.setLineDash(this._dash),t.beginPath();var e,i=!0;this._points.forEach((function(o){o&&(i?(t.moveTo(o._point.x,o._point.y),i=!1):o._point.z<1&&e.z<1?t.lineTo(o._point.x,o._point.y):t.moveTo(o._point.x,o._point.y),e=o._point)})),t.stroke(),t.restore()},e.prototype._additionalProcessing=function(){var t=this;this._minX=null,this._minY=null,this._maxX=null,this._maxY=null,this._points.forEach((function(e){e&&(e.translate(),(null==t._minX||e._point.xt._maxX)&&(t._maxX=e._point.x),(null==t._maxY||e._point.y>t._maxY)&&(t._maxY=e._point.y))})),null==this._minX&&(this._minX=0),null==this._minY&&(this._minY=0),null==this._maxX&&(this._maxX=0),null==this._maxY&&(this._maxY=0)},e.prototype._measure=function(){null!=this._minX&&null!=this._maxX&&null!=this._minY&&null!=this._maxY&&(this._currentMeasure.width=Math.abs(this._maxX-this._minX)+this._lineWidth,this._currentMeasure.height=Math.abs(this._maxY-this._minY)+this._lineWidth)},e.prototype._computeAlignment=function(){null!=this._minX&&null!=this._minY&&(this._currentMeasure.left=this._minX-this._lineWidth/2,this._currentMeasure.top=this._minY-this._lineWidth/2)},e.prototype.dispose=function(){this.reset(),t.prototype.dispose.call(this)},s([(0,h.serialize)()],e.prototype,"dash",null),e}(y);(0,h.RegisterClass)("BABYLON.GUI.MultiLine",z);var Q=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._isChecked=!1,i._background="black",i._checkSizeRatio=.8,i._thickness=1,i.group="",i.onIsCheckedChangedObservable=new h.Observable,i.isPointerBlocker=!0,i}return n(e,t),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(t){this._thickness!==t&&(this._thickness=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"checkSizeRatio",{get:function(){return this._checkSizeRatio},set:function(t){t=Math.max(Math.min(1,t),0),this._checkSizeRatio!==t&&(this._checkSizeRatio=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"background",{get:function(){return this._background},set:function(t){this._background!==t&&(this._background=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isChecked",{get:function(){return this._isChecked},set:function(t){var e=this;this._isChecked!==t&&(this._isChecked=t,this._markAsDirty(),this.onIsCheckedChangedObservable.notifyObservers(t),this._isChecked&&this._host&&this._host.executeOnAllControls((function(t){if(t!==e&&void 0!==t.group){var i=t;i.group===e.group&&(i.isChecked=!1)}})))},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"RadioButton"},e.prototype._draw=function(t){t.save(),this._applyStates(t);var e=this._currentMeasure.width-this._thickness,i=this._currentMeasure.height-this._thickness;if((this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),y.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,this._currentMeasure.width/2-this._thickness/2,this._currentMeasure.height/2-this._thickness/2,1,t),t.fillStyle=this._isEnabled?this._background:this._disabledColor,t.fill(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),t.strokeStyle=this.color,t.lineWidth=this._thickness,t.stroke(),this._isChecked){t.fillStyle=this._isEnabled?this.color:this._disabledColor;var o=e*this._checkSizeRatio,r=i*this._checkSizeRatio;y.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,o/2-this._thickness/2,r/2-this._thickness/2,1,t),t.fill()}t.restore()},e.prototype._onPointerDown=function(e,i,o,r,n){return!!t.prototype._onPointerDown.call(this,e,i,o,r,n)&&(this.isReadOnly||this.isChecked||(this.isChecked=!0),!0)},e.AddRadioButtonWithHeader=function(t,i,o,r){var n=new S;n.isVertical=!1,n.height="30px";var a=new e;a.width="20px",a.height="20px",a.isChecked=o,a.color="green",a.group=i,a.onIsCheckedChangedObservable.add((function(t){return r(a,t)})),n.addControl(a);var s=new B;return s.text=t,s.width="180px",s.paddingLeft="5px",s.textHorizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,s.color="white",n.addControl(s),n},s([(0,h.serialize)()],e.prototype,"thickness",null),s([(0,h.serialize)()],e.prototype,"group",void 0),s([(0,h.serialize)()],e.prototype,"checkSizeRatio",null),s([(0,h.serialize)()],e.prototype,"background",null),s([(0,h.serialize)()],e.prototype,"isChecked",null),e}(y);(0,h.RegisterClass)("BABYLON.GUI.RadioButton",Q);var V=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._thumbWidth=new c(20,c.UNITMODE_PIXEL,!1),i._minimum=0,i._maximum=100,i._value=50,i._isVertical=!1,i._barOffset=new c(5,c.UNITMODE_PIXEL,!1),i._isThumbClamped=!1,i._displayThumb=!0,i._step=0,i._lastPointerDownId=-1,i._effectiveBarOffset=0,i.onValueChangedObservable=new h.Observable,i._pointerIsDown=!1,i.isPointerBlocker=!0,i}return n(e,t),Object.defineProperty(e.prototype,"displayThumb",{get:function(){return this._displayThumb},set:function(t){this._displayThumb!==t&&(this._displayThumb=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this._step},set:function(t){this._step!==t&&(this._step=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barOffset",{get:function(){return this._barOffset.toString(this._host)},set:function(t){this._barOffset.toString(this._host)!==t&&this._barOffset.fromString(t)&&this._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barOffsetInPixels",{get:function(){return this._barOffset.getValueInPixel(this._host,this._cachedParentMeasure.width)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbWidth",{get:function(){return this._thumbWidth.toString(this._host)},set:function(t){this._thumbWidth.toString(this._host)!==t&&this._thumbWidth.fromString(t)&&this._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbWidthInPixels",{get:function(){return this._thumbWidth.getValueInPixel(this._host,this._cachedParentMeasure.width)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minimum",{get:function(){return this._minimum},set:function(t){this._minimum!==t&&(this._minimum=t,this._markAsDirty(),this.value=Math.max(Math.min(this.value,this._maximum),this._minimum))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maximum",{get:function(){return this._maximum},set:function(t){this._maximum!==t&&(this._maximum=t,this._markAsDirty(),this.value=Math.max(Math.min(this.value,this._maximum),this._minimum))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){t=Math.max(Math.min(t,this._maximum),this._minimum),this._value!==t&&(this._value=t,this._markAsDirty(),this.onValueChangedObservable.notifyObservers(this._value))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isVertical",{get:function(){return this._isVertical},set:function(t){this._isVertical!==t&&(this._isVertical=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isThumbClamped",{get:function(){return this._isThumbClamped},set:function(t){this._isThumbClamped!==t&&(this._isThumbClamped=t,this._markAsDirty())},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"BaseSlider"},e.prototype._getThumbPosition=function(){return this.isVertical?(this.maximum-this.value)/(this.maximum-this.minimum)*this._backgroundBoxLength:(this.value-this.minimum)/(this.maximum-this.minimum)*this._backgroundBoxLength},e.prototype._getThumbThickness=function(t){var e=0;switch(t){case"circle":e=this._thumbWidth.isPixel?Math.max(this._thumbWidth.getValue(this._host),this._backgroundBoxThickness):this._backgroundBoxThickness*this._thumbWidth.getValue(this._host);break;case"rectangle":e=this._thumbWidth.isPixel?Math.min(this._thumbWidth.getValue(this._host),this._backgroundBoxThickness):this._backgroundBoxThickness*this._thumbWidth.getValue(this._host)}return e},e.prototype._prepareRenderingData=function(t){this._effectiveBarOffset=0,this._renderLeft=this._currentMeasure.left,this._renderTop=this._currentMeasure.top,this._renderWidth=this._currentMeasure.width,this._renderHeight=this._currentMeasure.height,this._backgroundBoxLength=Math.max(this._currentMeasure.width,this._currentMeasure.height),this._backgroundBoxThickness=Math.min(this._currentMeasure.width,this._currentMeasure.height),this._effectiveThumbThickness=this._getThumbThickness(t),this.displayThumb&&(this._backgroundBoxLength-=this._effectiveThumbThickness),this.isVertical&&this._currentMeasure.height=this._selectors.length))return this._selectors[t]},t.prototype.removeSelector=function(t){t<0||t>=this._selectors.length||(this._groupPanel.removeControl(this._selectors[t]),this._selectors.splice(t,1))},t}(),G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.addCheckbox=function(t,e,i){void 0===e&&(e=function(t){}),void 0===i&&(i=!1),i=i||!1;var o=new O;o.width="20px",o.height="20px",o.color="#364249",o.background="#CCCCCC",o.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,o.onIsCheckedChangedObservable.add((function(t){e(t)}));var r=y.AddHeader(o,t,"200px",{isHorizontal:!0,controlFirst:!0});r.height="30px",r.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,r.left="4px",this.groupPanel.addControl(r),this.selectors.push(r),o.isChecked=i,this.groupPanel.parent&&this.groupPanel.parent.parent&&(o.color=this.groupPanel.parent.parent.buttonColor,o.background=this.groupPanel.parent.parent.buttonBackground)},e.prototype._setSelectorLabel=function(t,e){this.selectors[t].children[1].text=e},e.prototype._setSelectorLabelColor=function(t,e){this.selectors[t].children[1].color=e},e.prototype._setSelectorButtonColor=function(t,e){this.selectors[t].children[0].color=e},e.prototype._setSelectorButtonBackground=function(t,e){this.selectors[t].children[0].background=e},e}(H),U=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectNb=0,e}return n(e,t),e.prototype.addRadio=function(t,e,i){void 0===e&&(e=function(t){}),void 0===i&&(i=!1);var o=this._selectNb++,r=new Q;r.name=t,r.width="20px",r.height="20px",r.color="#364249",r.background="#CCCCCC",r.group=this.name,r.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,r.onIsCheckedChangedObservable.add((function(t){t&&e(o)}));var n=y.AddHeader(r,t,"200px",{isHorizontal:!0,controlFirst:!0});n.height="30px",n.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,n.left="4px",this.groupPanel.addControl(n),this.selectors.push(n),r.isChecked=i,this.groupPanel.parent&&this.groupPanel.parent.parent&&(r.color=this.groupPanel.parent.parent.buttonColor,r.background=this.groupPanel.parent.parent.buttonBackground)},e.prototype._setSelectorLabel=function(t,e){this.selectors[t].children[1].text=e},e.prototype._setSelectorLabelColor=function(t,e){this.selectors[t].children[1].color=e},e.prototype._setSelectorButtonColor=function(t,e){this.selectors[t].children[0].color=e},e.prototype._setSelectorButtonBackground=function(t,e){this.selectors[t].children[0].background=e},e}(H),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.addSlider=function(t,e,i,o,r,n,a){void 0===e&&(e=function(t){}),void 0===i&&(i="Units"),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===a&&(a=function(t){return 0|t});var s=new W;s.name=i,s.value=n,s.minimum=o,s.maximum=r,s.width=.9,s.height="20px",s.color="#364249",s.background="#CCCCCC",s.borderColor="black",s.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,s.left="4px",s.paddingBottom="4px",s.onValueChangedObservable.add((function(t){s.parent.children[0].text=s.parent.children[0].name+": "+a(t)+" "+s.name,e(t)}));var l=y.AddHeader(s,t+": "+a(n)+" "+i,"30px",{isHorizontal:!1,controlFirst:!1});l.height="60px",l.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,l.left="4px",l.children[0].name=t,this.groupPanel.addControl(l),this.selectors.push(l),this.groupPanel.parent&&this.groupPanel.parent.parent&&(s.color=this.groupPanel.parent.parent.buttonColor,s.background=this.groupPanel.parent.parent.buttonBackground)},e.prototype._setSelectorLabel=function(t,e){this.selectors[t].children[0].name=e,this.selectors[t].children[0].text=e+": "+this.selectors[t].children[1].value+" "+this.selectors[t].children[1].name},e.prototype._setSelectorLabelColor=function(t,e){this.selectors[t].children[0].color=e},e.prototype._setSelectorButtonColor=function(t,e){this.selectors[t].children[1].color=e},e.prototype._setSelectorButtonBackground=function(t,e){this.selectors[t].children[1].background=e},e}(H),Y=function(t){function e(e,i){void 0===i&&(i=[]);var o=t.call(this,e)||this;if(o.name=e,o.groups=i,o._buttonColor="#364249",o._buttonBackground="#CCCCCC",o._headerColor="black",o._barColor="white",o._barHeight="2px",o._spacerHeight="20px",o._bars=new Array,o._groups=i,o.thickness=2,o._panel=new S,o._panel.verticalAlignment=y.VERTICAL_ALIGNMENT_TOP,o._panel.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,o._panel.top=5,o._panel.left=5,o._panel.width=.95,i.length>0){for(var r=0;r0&&this._addSpacer(),this._panel.addControl(t.groupPanel),this._groups.push(t),t.groupPanel.children[0].color=this._headerColor;for(var e=0;e=this._groups.length)){var e=this._groups[t];this._panel.removeControl(e.groupPanel),this._groups.splice(t,1),t=this._groups.length||(this._groups[e].groupPanel.children[0].text=t)},e.prototype.relabel=function(t,e,i){if(!(e<0||e>=this._groups.length)){var o=this._groups[e];i<0||i>=o.selectors.length||o._setSelectorLabel(i,t)}},e.prototype.removeFromGroupSelector=function(t,e){if(!(t<0||t>=this._groups.length)){var i=this._groups[t];e<0||e>=i.selectors.length||i.removeSelector(e)}},e.prototype.addToGroupCheckbox=function(t,e,i,o){void 0===i&&(i=function(){}),void 0===o&&(o=!1),t<0||t>=this._groups.length||this._groups[t].addCheckbox(e,i,o)},e.prototype.addToGroupRadio=function(t,e,i,o){void 0===i&&(i=function(){}),void 0===o&&(o=!1),t<0||t>=this._groups.length||this._groups[t].addRadio(e,i,o)},e.prototype.addToGroupSlider=function(t,e,i,o,r,n,a,s){void 0===i&&(i=function(){}),void 0===o&&(o="Units"),void 0===r&&(r=0),void 0===n&&(n=0),void 0===a&&(a=0),void 0===s&&(s=function(t){return 0|t}),t<0||t>=this._groups.length||this._groups[t].addSlider(e,i,o,r,n,a,s)},e}(I),X=function(t){function e(e){var i=t.call(this,e)||this;return i._freezeControls=!1,i._bucketWidth=0,i._bucketHeight=0,i._buckets={},i}return n(e,t),Object.defineProperty(e.prototype,"freezeControls",{get:function(){return this._freezeControls},set:function(t){if(this._freezeControls!==t){t||this._restoreMeasures(),this._freezeControls=!1;var e=this.host.getSize(),i=e.width,o=e.height,r=this.host.getContext(),n=new g(0,0,i,o);this.host._numLayoutCalls=0,this.host._rootContainer._layout(n,r),t&&(this._updateMeasures(),this._useBuckets()&&this._makeBuckets()),this._freezeControls=t,this.host.markAsDirty()}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucketWidth",{get:function(){return this._bucketWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucketHeight",{get:function(){return this._bucketHeight},enumerable:!1,configurable:!0}),e.prototype.setBucketSizes=function(t,e){this._bucketWidth=t,this._bucketHeight=e,this._useBuckets()?this._freezeControls&&this._makeBuckets():this._buckets={}},e.prototype._useBuckets=function(){return this._bucketWidth>0&&this._bucketHeight>0},e.prototype._makeBuckets=function(){this._buckets={},this._bucketLen=Math.ceil(this.widthInPixels/this._bucketWidth),this._dispatchInBuckets(this._children),this._oldLeft=null,this._oldTop=null},e.prototype._dispatchInBuckets=function(t){for(var e=0;e0&&this._dispatchInBuckets(i._children)}},e.prototype._updateMeasures=function(){var t=0|this.leftInPixels,e=0|this.topInPixels;this._measureForChildren.left-=t,this._measureForChildren.top-=e,this._currentMeasure.left-=t,this._currentMeasure.top-=e,this._customData.origLeftForChildren=this._measureForChildren.left,this._customData.origTopForChildren=this._measureForChildren.top,this._customData.origLeft=this._currentMeasure.left,this._customData.origTop=this._currentMeasure.top,this._updateChildrenMeasures(this._children,t,e)},e.prototype._updateChildrenMeasures=function(t,e,i){for(var o=0;o0&&this._updateChildrenMeasures(r._children,e,i)}},e.prototype._restoreMeasures=function(){var t=0|this.leftInPixels,e=0|this.topInPixels;this._measureForChildren.left=this._customData.origLeftForChildren+t,this._measureForChildren.top=this._customData.origTopForChildren+e,this._currentMeasure.left=this._customData.origLeft+t,this._currentMeasure.top=this._customData.origTop+e},e.prototype._getTypeName=function(){return"ScrollViewerWindow"},e.prototype._additionalProcessing=function(e,i){t.prototype._additionalProcessing.call(this,e,i),this._parentMeasure=e,this._measureForChildren.left=this._currentMeasure.left,this._measureForChildren.top=this._currentMeasure.top,this._measureForChildren.width=e.width,this._measureForChildren.height=e.height},e.prototype._layout=function(e,i){return this._freezeControls?(this.invalidateRect(),!1):t.prototype._layout.call(this,e,i)},e.prototype._scrollChildren=function(t,e,i){for(var o=0;o0&&this._scrollChildren(r._children,e,i)}},e.prototype._scrollChildrenWithBuckets=function(t,e,i,o){for(var r=Math.max(0,Math.floor(-t/this._bucketWidth)),n=Math.floor((-t+this._parentMeasure.width-1)/this._bucketWidth),a=Math.floor((-e+this._parentMeasure.height-1)/this._bucketHeight),s=Math.max(0,Math.floor(-e/this._bucketHeight));s<=a;){for(var l=r;l<=n;++l){var _=s*this._bucketLen+l,h=this._buckets[_];if(h)for(var c=0;cthis._tempMeasure.left+this._tempMeasure.width||ethis._tempMeasure.top+this._tempMeasure.height)&&(this.isVertical?this.value=this.minimum+(1-(e-this._currentMeasure.top)/this._currentMeasure.height)*(this.maximum-this.minimum):this.value=this.minimum+(t-this._currentMeasure.left)/this._currentMeasure.width*(this.maximum-this.minimum)));var o;o=this.isVertical?-(e-this._originY)/(this._currentMeasure.height-this._effectiveThumbThickness):(t-this._originX)/(this._currentMeasure.width-this._effectiveThumbThickness),this.value+=i*o*(this.maximum-this.minimum),this._originX=t,this._originY=e},e.prototype._onPointerDown=function(e,i,o,r,n){return this._first=!0,t.prototype._onPointerDown.call(this,e,i,o,r,n)},e.prototype.serialize=function(e){t.prototype.serialize.call(this,e),this.backgroundGradient&&(e.backgroundGradient={},this.backgroundGradient.serialize(e.backgroundGradient))},e.prototype._parseFromContent=function(e,i){if(t.prototype._parseFromContent.call(this,e,i),e.backgroundGradient){var o=h.Tools.Instantiate("BABYLON.GUI."+e.backgroundGradient.className);this.backgroundGradient=new o,this.backgroundGradient.parse(e.backgroundGradient)}},s([(0,h.serialize)()],e.prototype,"borderColor",null),s([(0,h.serialize)()],e.prototype,"background",null),s([(0,h.serialize)()],e.prototype,"invertScrollDirection",null),e}(V);(0,h.RegisterClass)("BABYLON.GUI.Scrollbar",K);var Z=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._thumbLength=.5,i._thumbHeight=1,i._barImageHeight=1,i._tempMeasure=new g(0,0,0,0),i._invertScrollDirection=!1,i.num90RotationInVerticalMode=1,i}return n(e,t),Object.defineProperty(e.prototype,"invertScrollDirection",{get:function(){return this._invertScrollDirection},set:function(t){this._invertScrollDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundImage",{get:function(){return this._backgroundBaseImage},set:function(t){var e=this;this._backgroundBaseImage!==t&&(this._backgroundBaseImage=t,this.isVertical&&0!==this.num90RotationInVerticalMode?t.isLoaded?(this._backgroundImage=t._rotate90(this.num90RotationInVerticalMode,!0),this._markAsDirty()):t.onImageLoadedObservable.addOnce((function(){var i=t._rotate90(e.num90RotationInVerticalMode,!0);e._backgroundImage=i,i.isLoaded||i.onImageLoadedObservable.addOnce((function(){e._markAsDirty()})),e._markAsDirty()})):(this._backgroundImage=t,t&&!t.isLoaded&&t.onImageLoadedObservable.addOnce((function(){e._markAsDirty()})),this._markAsDirty()))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbImage",{get:function(){return this._thumbBaseImage},set:function(t){var e=this;this._thumbBaseImage!==t&&(this._thumbBaseImage=t,this.isVertical&&0!==this.num90RotationInVerticalMode?t.isLoaded?(this._thumbImage=t._rotate90(-this.num90RotationInVerticalMode,!0),this._markAsDirty()):t.onImageLoadedObservable.addOnce((function(){var i=t._rotate90(-e.num90RotationInVerticalMode,!0);e._thumbImage=i,i.isLoaded||i.onImageLoadedObservable.addOnce((function(){e._markAsDirty()})),e._markAsDirty()})):(this._thumbImage=t,t&&!t.isLoaded&&t.onImageLoadedObservable.addOnce((function(){e._markAsDirty()})),this._markAsDirty()))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbLength",{get:function(){return this._thumbLength},set:function(t){this._thumbLength!==t&&(this._thumbLength=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbHeight",{get:function(){return this._thumbHeight},set:function(t){this._thumbLength!==t&&(this._thumbHeight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barImageHeight",{get:function(){return this._barImageHeight},set:function(t){this._barImageHeight!==t&&(this._barImageHeight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"ImageScrollBar"},e.prototype._getThumbThickness=function(){return this._thumbWidth.isPixel?this._thumbWidth.getValue(this._host):this._backgroundBoxThickness*this._thumbWidth.getValue(this._host)},e.prototype._draw=function(t){t.save(),this._applyStates(t),this._prepareRenderingData("rectangle");var e=this._getThumbPosition(),i=this._renderLeft,o=this._renderTop,r=this._renderWidth,n=this._renderHeight;this._backgroundImage&&(this._tempMeasure.copyFromFloats(i,o,r,n),this.isVertical?(this._tempMeasure.copyFromFloats(i+r*(1-this._barImageHeight)*.5,this._currentMeasure.top,r*this._barImageHeight,n),this._tempMeasure.height+=this._effectiveThumbThickness,this._backgroundImage._currentMeasure.copyFrom(this._tempMeasure)):(this._tempMeasure.copyFromFloats(this._currentMeasure.left,o+n*(1-this._barImageHeight)*.5,r,n*this._barImageHeight),this._tempMeasure.width+=this._effectiveThumbThickness,this._backgroundImage._currentMeasure.copyFrom(this._tempMeasure)),this._backgroundImage._draw(t)),this.isVertical?this._tempMeasure.copyFromFloats(i-this._effectiveBarOffset+this._currentMeasure.width*(1-this._thumbHeight)*.5,this._currentMeasure.top+e,this._currentMeasure.width*this._thumbHeight,this._effectiveThumbThickness):this._tempMeasure.copyFromFloats(this._currentMeasure.left+e,this._currentMeasure.top+this._currentMeasure.height*(1-this._thumbHeight)*.5,this._effectiveThumbThickness,this._currentMeasure.height*this._thumbHeight),this._thumbImage&&(this._thumbImage._currentMeasure.copyFrom(this._tempMeasure),this._thumbImage._draw(t)),t.restore()},e.prototype._updateValueFromPointer=function(t,e){0!=this.rotation&&(this._invertTransformMatrix.transformCoordinates(t,e,this._transformedPosition),t=this._transformedPosition.x,e=this._transformedPosition.y);var i=this._invertScrollDirection?-1:1;this._first&&(this._first=!1,this._originX=t,this._originY=e,(tthis._tempMeasure.left+this._tempMeasure.width||ethis._tempMeasure.top+this._tempMeasure.height)&&(this.isVertical?this.value=this.minimum+(1-(e-this._currentMeasure.top)/this._currentMeasure.height)*(this.maximum-this.minimum):this.value=this.minimum+(t-this._currentMeasure.left)/this._currentMeasure.width*(this.maximum-this.minimum)));var o;o=this.isVertical?-(e-this._originY)/(this._currentMeasure.height-this._effectiveThumbThickness):(t-this._originX)/(this._currentMeasure.width-this._effectiveThumbThickness),this.value+=i*o*(this.maximum-this.minimum),this._originX=t,this._originY=e},e.prototype._onPointerDown=function(e,i,o,r,n){return this._first=!0,t.prototype._onPointerDown.call(this,e,i,o,r,n)},s([(0,h.serialize)()],e.prototype,"num90RotationInVerticalMode",void 0),s([(0,h.serialize)()],e.prototype,"invertScrollDirection",null),e}(V),q=function(t){function e(e,i){var o=t.call(this,e)||this;return o._barSize=20,o._pointerIsOver=!1,o._wheelPrecision=.05,o._thumbLength=.5,o._thumbHeight=1,o._barImageHeight=1,o._horizontalBarImageHeight=1,o._verticalBarImageHeight=1,o._oldWindowContentsWidth=0,o._oldWindowContentsHeight=0,o._forceHorizontalBar=!1,o._forceVerticalBar=!1,o._useImageBar=i||!1,o.onDirtyObservable.add((function(){o._horizontalBarSpace.color=o.color,o._verticalBarSpace.color=o.color,o._dragSpace.color=o.color})),o.onPointerEnterObservable.add((function(){o._pointerIsOver=!0})),o.onPointerOutObservable.add((function(){o._pointerIsOver=!1})),o._grid=new M,o._useImageBar?(o._horizontalBar=new Z,o._verticalBar=new Z):(o._horizontalBar=new K,o._verticalBar=new K),o._window=new X("scrollViewer_window"),o._window.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,o._window.verticalAlignment=y.VERTICAL_ALIGNMENT_TOP,o._grid.addColumnDefinition(1),o._grid.addColumnDefinition(0,!0),o._grid.addRowDefinition(1),o._grid.addRowDefinition(0,!0),t.prototype.addControl.call(o,o._grid),o._grid.addControl(o._window,0,0),o._verticalBarSpace=new I,o._verticalBarSpace.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,o._verticalBarSpace.verticalAlignment=y.VERTICAL_ALIGNMENT_TOP,o._verticalBarSpace.thickness=1,o._grid.addControl(o._verticalBarSpace,0,1),o._addBar(o._verticalBar,o._verticalBarSpace,!0,Math.PI),o._horizontalBarSpace=new I,o._horizontalBarSpace.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,o._horizontalBarSpace.verticalAlignment=y.VERTICAL_ALIGNMENT_TOP,o._horizontalBarSpace.thickness=1,o._grid.addControl(o._horizontalBarSpace,1,0),o._addBar(o._horizontalBar,o._horizontalBarSpace,!1,0),o._dragSpace=new I,o._dragSpace.thickness=1,o._grid.addControl(o._dragSpace,1,1),o._grid.clipChildren=!1,o._useImageBar||(o.barColor="grey",o.barBackground="transparent"),o}return n(e,t),Object.defineProperty(e.prototype,"horizontalBar",{get:function(){return this._horizontalBar},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalBar",{get:function(){return this._verticalBar},enumerable:!1,configurable:!0}),e.prototype.addControl=function(t){return t?(this._window.addControl(t),this):this},e.prototype.removeControl=function(t){return this._window.removeControl(t),this},Object.defineProperty(e.prototype,"children",{get:function(){return this._window.children},enumerable:!1,configurable:!0}),e.prototype._flagDescendantsAsMatrixDirty=function(){for(var t=0,e=this._children;t1&&(t=1),this._wheelPrecision=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollBackground",{get:function(){return this._horizontalBarSpace.background},set:function(t){this._horizontalBarSpace.background!==t&&(this._horizontalBarSpace.background=t,this._verticalBarSpace.background=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barColor",{get:function(){return this._barColor},set:function(t){this._barColor!==t&&(this._barColor=t,this._horizontalBar.color=t,this._verticalBar.color=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbImage",{get:function(){return this._barImage},set:function(t){if(this._barImage!==t){this._barImage=t;var e=this._horizontalBar,i=this._verticalBar;e.thumbImage=t,i.thumbImage=t}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horizontalThumbImage",{get:function(){return this._horizontalBarImage},set:function(t){this._horizontalBarImage!==t&&(this._horizontalBarImage=t,this._horizontalBar.thumbImage=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalThumbImage",{get:function(){return this._verticalBarImage},set:function(t){this._verticalBarImage!==t&&(this._verticalBarImage=t,this._verticalBar.thumbImage=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barSize",{get:function(){return this._barSize},set:function(t){this._barSize!==t&&(this._barSize=t,this._markAsDirty(),this._horizontalBar.isVisible&&this._grid.setRowDefinition(1,this._barSize,!0),this._verticalBar.isVisible&&this._grid.setColumnDefinition(1,this._barSize,!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbLength",{get:function(){return this._thumbLength},set:function(t){if(this._thumbLength!==t){t<=0&&(t=.1),t>1&&(t=1),this._thumbLength=t;var e=this._horizontalBar,i=this._verticalBar;e.thumbLength=t,i.thumbLength=t,this._markAsDirty()}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbHeight",{get:function(){return this._thumbHeight},set:function(t){if(this._thumbHeight!==t){t<=0&&(t=.1),t>1&&(t=1),this._thumbHeight=t;var e=this._horizontalBar,i=this._verticalBar;e.thumbHeight=t,i.thumbHeight=t,this._markAsDirty()}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barImageHeight",{get:function(){return this._barImageHeight},set:function(t){if(this._barImageHeight!==t){t<=0&&(t=.1),t>1&&(t=1),this._barImageHeight=t;var e=this._horizontalBar,i=this._verticalBar;e.barImageHeight=t,i.barImageHeight=t,this._markAsDirty()}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horizontalBarImageHeight",{get:function(){return this._horizontalBarImageHeight},set:function(t){this._horizontalBarImageHeight!==t&&(t<=0&&(t=.1),t>1&&(t=1),this._horizontalBarImageHeight=t,this._horizontalBar.barImageHeight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalBarImageHeight",{get:function(){return this._verticalBarImageHeight},set:function(t){this._verticalBarImageHeight!==t&&(t<=0&&(t=.1),t>1&&(t=1),this._verticalBarImageHeight=t,this._verticalBar.barImageHeight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barBackground",{get:function(){return this._barBackground},set:function(t){if(this._barBackground!==t){this._barBackground=t;var e=this._horizontalBar,i=this._verticalBar;e.background=t,i.background=t,this._dragSpace.background=t}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barImage",{get:function(){return this._barBackgroundImage},set:function(t){this._barBackgroundImage=t;var e=this._horizontalBar,i=this._verticalBar;e.backgroundImage=t,i.backgroundImage=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horizontalBarImage",{get:function(){return this._horizontalBarBackgroundImage},set:function(t){this._horizontalBarBackgroundImage=t,this._horizontalBar.backgroundImage=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalBarImage",{get:function(){return this._verticalBarBackgroundImage},set:function(t){this._verticalBarBackgroundImage=t,this._verticalBar.backgroundImage=t},enumerable:!1,configurable:!0}),e.prototype._setWindowPosition=function(t){void 0===t&&(t=!0);var e=this.host.idealRatio,i=this._window._currentMeasure.width,o=this._window._currentMeasure.height;if(t||this._oldWindowContentsWidth!==i||this._oldWindowContentsHeight!==o){this._oldWindowContentsWidth=i,this._oldWindowContentsHeight=o;var r=this._clientWidth-i,n=this._clientHeight-o,a=this._horizontalBar.value/e*r+"px",s=this._verticalBar.value/e*n+"px";a!==this._window.left&&(this._window.left=a,this.freezeControls||(this._rebuildLayout=!0)),s!==this._window.top&&(this._window.top=s,this.freezeControls||(this._rebuildLayout=!0))}},e.prototype._updateScroller=function(){var t=this._window._currentMeasure.width,e=this._window._currentMeasure.height;this._horizontalBar.isVisible&&t<=this._clientWidth&&!this.forceHorizontalBar?(this._grid.setRowDefinition(1,0,!0),this._horizontalBar.isVisible=!1,this._horizontalBar.value=0,this._rebuildLayout=!0):!this._horizontalBar.isVisible&&(t>this._clientWidth||this.forceHorizontalBar)&&(this._grid.setRowDefinition(1,this._barSize,!0),this._horizontalBar.isVisible=!0,this._rebuildLayout=!0),this._verticalBar.isVisible&&e<=this._clientHeight&&!this.forceVerticalBar?(this._grid.setColumnDefinition(1,0,!0),this._verticalBar.isVisible=!1,this._verticalBar.value=0,this._rebuildLayout=!0):!this._verticalBar.isVisible&&(e>this._clientHeight||this.forceVerticalBar)&&(this._grid.setColumnDefinition(1,this._barSize,!0),this._verticalBar.isVisible=!0,this._rebuildLayout=!0),this._buildClientSizes();var i=this.host.idealRatio;this._horizontalBar.thumbWidth=.9*this._thumbLength*(this._clientWidth/i)+"px",this._verticalBar.thumbWidth=.9*this._thumbLength*(this._clientHeight/i)+"px"},e.prototype._link=function(e){t.prototype._link.call(this,e),this._attachWheel()},e.prototype._addBar=function(t,e,i,o){var r=this;t.paddingLeft=0,t.width="100%",t.height="100%",t.barOffset=0,t.value=0,t.maximum=1,t.horizontalAlignment=y.HORIZONTAL_ALIGNMENT_CENTER,t.verticalAlignment=y.VERTICAL_ALIGNMENT_CENTER,t.isVertical=i,t.rotation=o,t.isVisible=!1,e.addControl(t),t.onValueChangedObservable.add((function(){r._setWindowPosition()}))},e.prototype._attachWheel=function(){var t=this;this._host&&!this._onWheelObserver&&(this._onWheelObserver=this.onWheelObservable.add((function(e){t._pointerIsOver&&!t.isReadOnly&&(1==t._verticalBar.isVisible&&(e.y<0&&t._verticalBar.value>0?t._verticalBar.value-=t._wheelPrecision:e.y>0&&t._verticalBar.value0&&t._horizontalBar.value>0&&(t._horizontalBar.value-=t._wheelPrecision)))})))},e.prototype._renderHighlightSpecific=function(e){this.isHighlighted&&(t.prototype._renderHighlightSpecific.call(this,e),this._grid._renderHighlightSpecific(e),e.restore())},e.prototype.dispose=function(){this.onWheelObservable.remove(this._onWheelObserver),this._onWheelObserver=null,t.prototype.dispose.call(this)},s([(0,h.serialize)()],e.prototype,"wheelPrecision",null),s([(0,h.serialize)()],e.prototype,"scrollBackground",null),s([(0,h.serialize)()],e.prototype,"barColor",null),s([(0,h.serialize)()],e.prototype,"barSize",null),s([(0,h.serialize)()],e.prototype,"barBackground",null),e}(I);(0,h.RegisterClass)("BABYLON.GUI.ScrollViewer",q);var J=function(t){function e(e,i){var o=t.call(this,e)||this;o.name=e,o.onIsActiveChangedObservable=new h.Observable,o.delegatePickingToChildren=!1,o._isActive=!1,o.group=null!=i?i:"",o.thickness=0,o.isPointerBlocker=!0;var r=null;return o.toActiveAnimation=function(){o.thickness=1},o.toInactiveAnimation=function(){o.thickness=0},o.pointerEnterActiveAnimation=function(){r=o.alpha,o.alpha-=.1},o.pointerOutActiveAnimation=function(){null!==r&&(o.alpha=r)},o.pointerDownActiveAnimation=function(){o.scaleX-=.05,o.scaleY-=.05},o.pointerUpActiveAnimation=function(){o.scaleX+=.05,o.scaleY+=.05},o.pointerEnterInactiveAnimation=function(){r=o.alpha,o.alpha-=.1},o.pointerOutInactiveAnimation=function(){null!==r&&(o.alpha=r)},o.pointerDownInactiveAnimation=function(){o.scaleX-=.05,o.scaleY-=.05},o.pointerUpInactiveAnimation=function(){o.scaleX+=.05,o.scaleY+=.05},o}return n(e,t),Object.defineProperty(e.prototype,"group",{get:function(){return this._group},set:function(t){this._group!==t&&(this._group=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isActive",{get:function(){return this._isActive},set:function(t){var e,i,o=this;this._isActive!==t&&(this._isActive=t,this._isActive?null===(e=this.toActiveAnimation)||void 0===e||e.call(this):null===(i=this.toInactiveAnimation)||void 0===i||i.call(this),this._markAsDirty(),this.onIsActiveChangedObservable.notifyObservers(t),this._isActive&&this._host&&this._group&&this._host.executeOnAllControls((function(t){if("ToggleButton"===t.typeName){if(t===o)return;var e=t;e.group===o.group&&(e.isActive=!1)}})))},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"ToggleButton"},e.prototype._processPicking=function(e,i,o,r,n,a,s,l){if(!this._isEnabled||!this.isHitTestVisible||!this.isVisible||this.notRenderable)return!1;if(!t.prototype.contains.call(this,e,i))return!1;if(this.delegatePickingToChildren){for(var _=!1,h=this._children.length-1;h>=0;h--){var c=this._children[h];if(c.isEnabled&&c.isHitTestVisible&&c.isVisible&&!c.notRenderable&&c.contains(e,i)){_=!0;break}}if(!_)return!1}return this._processObservables(r,e,i,o,n,a,s,l),!0},e.prototype._onPointerEnter=function(e,i){return!!t.prototype._onPointerEnter.call(this,e,i)&&(this.isReadOnly||(this._isActive?this.pointerEnterActiveAnimation&&this.pointerEnterActiveAnimation():this.pointerEnterInactiveAnimation&&this.pointerEnterInactiveAnimation()),!0)},e.prototype._onPointerOut=function(e,i,o){void 0===o&&(o=!1),this.isReadOnly||(this._isActive?this.pointerOutActiveAnimation&&this.pointerOutActiveAnimation():this.pointerOutInactiveAnimation&&this.pointerOutInactiveAnimation()),t.prototype._onPointerOut.call(this,e,i,o)},e.prototype._onPointerDown=function(e,i,o,r,n){return!!t.prototype._onPointerDown.call(this,e,i,o,r,n)&&(this.isReadOnly||(this._isActive?this.pointerDownActiveAnimation&&this.pointerDownActiveAnimation():this.pointerDownInactiveAnimation&&this.pointerDownInactiveAnimation()),!0)},e.prototype._onPointerUp=function(e,i,o,r,n,a){this.isReadOnly||(this._isActive?this.pointerUpActiveAnimation&&this.pointerUpActiveAnimation():this.pointerUpInactiveAnimation&&this.pointerUpInactiveAnimation()),t.prototype._onPointerUp.call(this,e,i,o,r,n,a)},e}(I);(0,h.RegisterClass)("BABYLON.GUI.ToggleButton",J);var $=function(){},tt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onKeyPressObservable=new h.Observable,e.defaultButtonWidth="40px",e.defaultButtonHeight="40px",e.defaultButtonPaddingLeft="2px",e.defaultButtonPaddingRight="2px",e.defaultButtonPaddingTop="2px",e.defaultButtonPaddingBottom="2px",e.defaultButtonColor="#DDD",e.defaultButtonBackground="#070707",e.shiftButtonColor="#7799FF",e.selectedShiftThickness=1,e.shiftState=0,e._currentlyConnectedInputText=null,e._connectedInputTexts=[],e._onKeyPressObserver=null,e}return n(e,t),e.prototype._getTypeName=function(){return"VirtualKeyboard"},e.prototype._createKey=function(t,e){var i=this,o=T.CreateSimpleButton(t,t);return o.width=e&&e.width?e.width:this.defaultButtonWidth,o.height=e&&e.height?e.height:this.defaultButtonHeight,o.color=e&&e.color?e.color:this.defaultButtonColor,o.background=e&&e.background?e.background:this.defaultButtonBackground,o.paddingLeft=e&&e.paddingLeft?e.paddingLeft:this.defaultButtonPaddingLeft,o.paddingRight=e&&e.paddingRight?e.paddingRight:this.defaultButtonPaddingRight,o.paddingTop=e&&e.paddingTop?e.paddingTop:this.defaultButtonPaddingTop,o.paddingBottom=e&&e.paddingBottom?e.paddingBottom:this.defaultButtonPaddingBottom,o.thickness=0,o.isFocusInvisible=!0,o.shadowColor=this.shadowColor,o.shadowBlur=this.shadowBlur,o.shadowOffsetX=this.shadowOffsetX,o.shadowOffsetY=this.shadowOffsetY,o.onPointerUpObservable.add((function(){i.onKeyPressObservable.notifyObservers(t)})),o},e.prototype.addKeysRow=function(t,e){var i=new S;i.isVertical=!1,i.isFocusInvisible=!0;for(var o=null,r=0;ro.heightInPixels)&&(o=a),i.addControl(a)}i.height=o?o.height:this.defaultButtonHeight,this.addControl(i)},e.prototype.applyShiftState=function(t){if(this.children)for(var e=0;e1?this.selectedShiftThickness:0),a.text=t>0?a.text.toUpperCase():a.text.toLowerCase()}}}},Object.defineProperty(e.prototype,"connectedInputText",{get:function(){return this._currentlyConnectedInputText},enumerable:!1,configurable:!0}),e.prototype.connect=function(t){var e=this;if(!this._connectedInputTexts.some((function(e){return e.input===t}))){null===this._onKeyPressObserver&&(this._onKeyPressObserver=this.onKeyPressObservable.add((function(t){if(e._currentlyConnectedInputText){switch(e._currentlyConnectedInputText._host.focusedControl=e._currentlyConnectedInputText,t){case"⇧":return e.shiftState++,e.shiftState>2&&(e.shiftState=0),void e.applyShiftState(e.shiftState);case"←":return void(e._currentlyConnectedInputText instanceof L?e._currentlyConnectedInputText.alternativeProcessKey("Backspace"):e._currentlyConnectedInputText.processKey(8));case"↵":return void(e._currentlyConnectedInputText instanceof L?e._currentlyConnectedInputText.alternativeProcessKey("Enter"):e._currentlyConnectedInputText.processKey(13))}e._currentlyConnectedInputText instanceof L?e._currentlyConnectedInputText.alternativeProcessKey("",e.shiftState?t.toUpperCase():t):e._currentlyConnectedInputText.processKey(-1,e.shiftState?t.toUpperCase():t),1===e.shiftState&&(e.shiftState=0,e.applyShiftState(e.shiftState))}}))),this.isVisible=!1,this._currentlyConnectedInputText=t,t._connectedVirtualKeyboard=this;var i=t.onFocusObservable.add((function(){e._currentlyConnectedInputText=t,t._connectedVirtualKeyboard=e,e.isVisible=!0})),o=t.onBlurObservable.add((function(){t._connectedVirtualKeyboard=null,e._currentlyConnectedInputText=null,e.isVisible=!1}));this._connectedInputTexts.push({input:t,onBlurObserver:o,onFocusObserver:i})}},e.prototype.disconnect=function(t){var e=this;if(t){var i=this._connectedInputTexts.filter((function(e){return e.input===t}));1===i.length&&(this._removeConnectedInputObservables(i[0]),this._connectedInputTexts=this._connectedInputTexts.filter((function(e){return e.input!==t})),this._currentlyConnectedInputText===t&&(this._currentlyConnectedInputText=null))}else this._connectedInputTexts.forEach((function(t){e._removeConnectedInputObservables(t)})),this._connectedInputTexts.length=0;0===this._connectedInputTexts.length&&(this._currentlyConnectedInputText=null,this.onKeyPressObservable.remove(this._onKeyPressObserver),this._onKeyPressObserver=null)},e.prototype._removeConnectedInputObservables=function(t){t.input._connectedVirtualKeyboard=null,t.input.onFocusObservable.remove(t.onFocusObserver),t.input.onBlurObservable.remove(t.onBlurObserver)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.disconnect()},e.CreateDefaultLayout=function(t){var i=new e(t);return i.addKeysRow(["1","2","3","4","5","6","7","8","9","0","←"]),i.addKeysRow(["q","w","e","r","t","y","u","i","o","p"]),i.addKeysRow(["a","s","d","f","g","h","j","k","l",";","'","↵"]),i.addKeysRow(["⇧","z","x","c","v","b","n","m",",",".","/"]),i.addKeysRow([" "],[{width:"200px"}]),i},e.prototype._parseFromContent=function(e,i){var o=this;t.prototype._parseFromContent.call(this,e,i);for(var r=0,n=this.children;r0&&(a=a.add(r.normalize().scale(o/n)))}})),a.length()>0&&(a=a.normalize().scale(i*(null!==(n=t.overlapDeltaMultiplier)&&void 0!==n?n:1)),t.linkOffsetXInPixels+=a.x,t.linkOffsetYInPixels+=a.y)}))},e.prototype.dispose=function(){var e=this.getScene();e&&(this._rootElement=null,e.onBeforeCameraRenderObservable.remove(this._renderObserver),this._resizeObserver&&e.getEngine().onResizeObservable.remove(this._resizeObserver),this._prePointerObserver&&e.onPrePointerObservable.remove(this._prePointerObserver),this._sceneRenderObserver&&e.onBeforeRenderObservable.remove(this._sceneRenderObserver),this._pointerObserver&&e.onPointerObservable.remove(this._pointerObserver),this._preKeyboardObserver&&e.onPreKeyboardObservable.remove(this._preKeyboardObserver),this._canvasPointerOutObserver&&e.getEngine().onCanvasPointerOutObservable.remove(this._canvasPointerOutObserver),this._canvasBlurObserver&&e.getEngine().onCanvasBlurObservable.remove(this._canvasBlurObserver),this._controlAddedObserver&&this._rootContainer.onControlAddedObservable.remove(this._controlAddedObserver),this._controlRemovedObserver&&this._rootContainer.onControlRemovedObservable.remove(this._controlRemovedObserver),this._layerToDispose&&(this._layerToDispose.texture=null,this._layerToDispose.dispose(),this._layerToDispose=null),this._rootContainer.dispose(),this.onClipboardObservable.clear(),this.onControlPickedObservable.clear(),this.onBeginRenderObservable.clear(),this.onEndRenderObservable.clear(),this.onBeginLayoutObservable.clear(),this.onEndLayoutObservable.clear(),this.onGuiReadyObservable.clear(),t.prototype.dispose.call(this))},e.prototype._onResize=function(){var t=this.getScene();if(t){var e=t.getEngine(),i=this.getSize(),o=e.getRenderWidth()*this._renderScale,r=e.getRenderHeight()*this._renderScale;this._renderAtIdealSize&&(this._idealWidth?(r=r*this._idealWidth/o,o=this._idealWidth):this._idealHeight&&(o=o*this._idealHeight/r,r=this._idealHeight)),i.width===o&&i.height===r||(this.scaleTo(o,r),this.markAsDirty(),(this._idealWidth||this._idealHeight)&&this._rootContainer._markAllAsDirty()),this.invalidateRect(0,0,i.width-1,i.height-1)}},e.prototype._getGlobalViewport=function(){var t=this.getSize(),e=this._fullscreenViewport.toGlobal(t.width,t.height),i=Math.round(e.width*(1/this.rootContainer.scaleX)),o=Math.round(e.height*(1/this.rootContainer.scaleY));return e.x+=(e.width-i)/2,e.y+=(e.height-o)/2,e.width=i,e.height=o,e},e.prototype.getProjectedPosition=function(t,e){var i=this.getProjectedPositionWithZ(t,e);return new h.Vector2(i.x,i.y)},e.prototype.getProjectedPositionWithZ=function(t,e){var i=this.getScene();if(!i)return h.Vector3.Zero();var o=this._getGlobalViewport(),r=h.Vector3.Project(t,e,i.getTransformMatrix(),o);return new h.Vector3(r.x,r.y,r.z)},e.prototype._checkUpdate=function(t,i){if(!this._layerToDispose||t.layerMask&this._layerToDispose.layerMask){if(this._isFullscreen&&this._linkedControls.length){var o=this.getScene();if(!o)return;for(var r=this._getGlobalViewport(),n=function(t){if(!t.isVisible)return"continue";var e=t._linkedMesh;if(!e||e.isDisposed())return h.Tools.SetImmediate((function(){t.linkWithMesh(null)})),"continue";var i=e.getBoundingInfo?e.getBoundingInfo().boundingSphere.center:h.Vector3.ZeroReadOnly,n=h.Vector3.Project(i,e.getWorldMatrix(),o.getTransformMatrix(),r);if(n.z<0||n.z>1)return t.notRenderable=!0,"continue";t.notRenderable=!1,a.useInvalidateRectOptimization&&t.invalidateRect(),t._moveToProjectedPosition(n)},a=this,s=0,l=this._linkedControls;sl.width||r>l.height||(t.cameraToUseForPointers=i,e.x=l.x,e.y=l.y,e.width=l.width,e.height=l.height)}))}else n.viewport.toGlobalToRef(a.getRenderWidth(),a.getRenderHeight(),e);else e.x=0,e.y=0,e.width=a.getRenderWidth(),e.height=a.getRenderHeight();var _=o/a.getHardwareScalingLevel()-e.x,c=r/a.getHardwareScalingLevel()-(a.getRenderHeight()-e.y-e.height);if(this._shouldBlockPointer=!1,i){var u=i.event.pointerId||this._defaultMousePointerId;this._doPicking(_,c,i,i.type,u,i.event.button,i.event.deltaX,i.event.deltaY),(this._shouldBlockPointer&&!(i.type&this.skipBlockEvents)||this._capturingControl[u])&&(i.skipOnPointerObservable=!0)}else this._doPicking(_,c,null,h.PointerEventTypes.POINTERMOVE,this._defaultMousePointerId,0);t.cameraToUseForPointers=s},e.prototype.attach=function(){var t=this,e=this.getScene();if(e){var i=new h.Viewport(0,0,0,0);this._prePointerObserver=e.onPrePointerObservable.add((function(o){if((!e.isPointerCaptured(o.event.pointerId)||o.type!==h.PointerEventTypes.POINTERUP||t._capturedPointerIds.has(o.event.pointerId))&&(o.type===h.PointerEventTypes.POINTERMOVE||o.type===h.PointerEventTypes.POINTERUP||o.type===h.PointerEventTypes.POINTERDOWN||o.type===h.PointerEventTypes.POINTERWHEEL)){if(o.type===h.PointerEventTypes.POINTERMOVE){if(e.isPointerCaptured(o.event.pointerId))return;o.event.pointerId&&(t._defaultMousePointerId=o.event.pointerId)}t._translateToPicking(e,i,o)}})),this._attachPickingToSceneRender(e,(function(){return t._translateToPicking(e,i,null)}),!1),this._attachToOnPointerOut(e),this._attachToOnBlur(e)}},e.prototype._focusNextElement=function(t){void 0===t&&(t=!0);var e=[];if(this.executeOnAllControls((function(t){t.isFocusInvisible||!t.isVisible||t.tabIndex<0||e.push(t)})),0!==e.length)if(e.sort((function(t,e){return 0===t.tabIndex?1:0===e.tabIndex?-1:t.tabIndex-e.tabIndex})),this._focusedControl){var i=e.indexOf(this._focusedControl)+(t?1:-1);i<0?i=e.length-1:i>=e.length&&(i=0),e[i].focus()}else e[0].focus()},e.prototype.registerClipboardEvents=function(){self.addEventListener("copy",this._onClipboardCopy,!1),self.addEventListener("cut",this._onClipboardCut,!1),self.addEventListener("paste",this._onClipboardPaste,!1)},e.prototype.unRegisterClipboardEvents=function(){self.removeEventListener("copy",this._onClipboardCopy),self.removeEventListener("cut",this._onClipboardCut),self.removeEventListener("paste",this._onClipboardPaste)},e.prototype._transformUvs=function(t){var e,i=this.getTextureMatrix();if(i.isIdentityAs3x2())e=t;else{var o=h.TmpVectors.Matrix[0];i.getRowToRef(0,h.TmpVectors.Vector4[0]),i.getRowToRef(1,h.TmpVectors.Vector4[1]),i.getRowToRef(2,h.TmpVectors.Vector4[2]);var r=h.TmpVectors.Vector4[0],n=h.TmpVectors.Vector4[1],a=h.TmpVectors.Vector4[2];o.setRowFromFloats(0,r.x,r.y,0,0),o.setRowFromFloats(1,n.x,n.y,0,0),o.setRowFromFloats(2,0,0,1,0),o.setRowFromFloats(3,a.x,a.y,0,1),e=h.TmpVectors.Vector2[0],h.Vector2.TransformToRef(t,o,e)}if((this.wrapU===h.Texture.WRAP_ADDRESSMODE||this.wrapU===h.Texture.MIRROR_ADDRESSMODE)&&e.x>1){var s=e.x-Math.trunc(e.x);this.wrapU===h.Texture.MIRROR_ADDRESSMODE&&Math.trunc(e.x)%2==1&&(s=1-s),e.x=s}if((this.wrapV===h.Texture.WRAP_ADDRESSMODE||this.wrapV===h.Texture.MIRROR_ADDRESSMODE)&&e.y>1){var l=e.y-Math.trunc(e.y);this.wrapV===h.Texture.MIRROR_ADDRESSMODE&&Math.trunc(e.x)%2==1&&(l=1-l),e.y=l}return e},e.prototype.attachToMesh=function(t,e){var i=this;void 0===e&&(e=!0);var o=this.getScene();o&&(this._pointerObserver&&o.onPointerObservable.remove(this._pointerObserver),this._pointerObserver=o.onPointerObservable.add((function(e){if(e.type===h.PointerEventTypes.POINTERMOVE||e.type===h.PointerEventTypes.POINTERUP||e.type===h.PointerEventTypes.POINTERDOWN||e.type===h.PointerEventTypes.POINTERWHEEL){e.type===h.PointerEventTypes.POINTERMOVE&&e.event.pointerId&&(i._defaultMousePointerId=e.event.pointerId);var o=e.event.pointerId||i._defaultMousePointerId;if(e.pickInfo&&e.pickInfo.hit&&e.pickInfo.pickedMesh===t){var r=e.pickInfo.getTextureCoordinates();if(r){r=i._transformUvs(r);var n=i.getSize();i._doPicking(r.x*n.width,(i.applyYInversionOnUpdate?1-r.y:r.y)*n.height,e,e.type,o,e.event.button,e.event.deltaX,e.event.deltaY)}}else if(e.type===h.PointerEventTypes.POINTERUP){if(i._lastControlDown[o]&&i._lastControlDown[o]._forcePointerUp(o),delete i._lastControlDown[o],i.focusedControl){var a=i.focusedControl.keepsFocusWith(),s=!0;if(a)for(var l=0,_=a;l<_.length;l++){var c=_[l];if(i!==c._host){var u=c._host;if(u._lastControlOver[o]&&u._lastControlOver[o].isAscendant(c)){s=!1;break}}}s&&(i.focusedControl=null)}}else e.type===h.PointerEventTypes.POINTERMOVE&&(i._lastControlOver[o]&&i._lastControlOver[o]._onPointerOut(i._lastControlOver[o],e,!0),delete i._lastControlOver[o])}})),t.enablePointerMoveEvents=e,this._attachPickingToSceneRender(o,(function(){var e=i._defaultMousePointerId,r=null==o?void 0:o.pick(o.pointerX,o.pointerY);if(r&&r.hit&&r.pickedMesh===t){var n=r.getTextureCoordinates();if(n){n=i._transformUvs(n);var a=i.getSize();i._doPicking(n.x*a.width,(i.applyYInversionOnUpdate?1-n.y:n.y)*a.height,null,h.PointerEventTypes.POINTERMOVE,e,0)}}else i._lastControlOver[e]&&i._lastControlOver[e]._onPointerOut(i._lastControlOver[e],null,!0),delete i._lastControlOver[e]}),!0),this._attachToOnPointerOut(o),this._attachToOnBlur(o))},e.prototype.moveFocusToControl=function(t){this.focusedControl=t,this._lastPickedControl=t,this._blockNextFocusCheck=!0},e.prototype._manageFocus=function(){if(this._blockNextFocusCheck)return this._blockNextFocusCheck=!1,void(this._lastPickedControl=this._focusedControl);if(this._focusedControl&&this._focusedControl!==this._lastPickedControl){if(this._lastPickedControl.isFocusInvisible)return;this.focusedControl=null}},e.prototype._attachPickingToSceneRender=function(t,e,i){var o=this;this._sceneRenderObserver=t.onBeforeRenderObservable.add((function(){o.checkPointerEveryFrame&&(o._linkedControls.length>0||i)&&e()}))},e.prototype._attachToOnPointerOut=function(t){var e=this;this._canvasPointerOutObserver=t.getEngine().onCanvasPointerOutObservable.add((function(t){e._lastControlOver[t.pointerId]&&e._lastControlOver[t.pointerId]._onPointerOut(e._lastControlOver[t.pointerId],null),delete e._lastControlOver[t.pointerId],e._lastControlDown[t.pointerId]&&e._lastControlDown[t.pointerId]!==e._capturingControl[t.pointerId]&&(e._lastControlDown[t.pointerId]._forcePointerUp(t.pointerId),delete e._lastControlDown[t.pointerId])}))},e.prototype._attachToOnBlur=function(t){var e=this;this._canvasBlurObserver=t.getEngine().onCanvasBlurObservable.add((function(){Object.entries(e._lastControlDown).forEach((function(t){t[1]._onCanvasBlur()})),e.focusedControl=null,e._lastControlDown={}}))},e.prototype.serializeContent=function(){var t=this.getSize(),e={root:{},width:t.width,height:t.height};return this._rootContainer.serialize(e.root),e},e.prototype.parseSerializedObject=function(t,e,i){if(this._rootContainer=y.Parse(t.root,this,i),e){var o=t.width,r=t.height;"number"==typeof o&&"number"==typeof r&&o>=0&&r>=0?this.scaleTo(o,r):this.scaleTo(1920,1080)}},e.prototype.clone=function(t,i){var o=this.getScene();if(!o)return this;var r,n=this.getSize(),a=this.serializeContent();return(r=this._isFullscreen?e.CreateFullscreenUI(null!=t?t:"Clone of "+this.name):i?e.CreateForMesh(i,n.width,n.height):new e(null!=t?t:"Clone of "+this.name,n.width,n.height,o,!this.noMipmap,this.samplingMode)).parseSerializedObject(a),r},e.ParseFromSnippetAsync=function(t,i,o,r){return l(this,void 0,void 0,(function(){var n,a;return _(this,(function(s){switch(s.label){case 0:return n=null!=o?o:e.CreateFullscreenUI("ADT from snippet"),"_BLANK"===t?[2,n]:[4,e._LoadURLContentAsync(e.SnippetUrl+"/"+t.replace(/#/g,"/"),!0)];case 1:return a=s.sent(),n.parseSerializedObject(a,i,r),[2,n]}}))}))},e.prototype.parseFromSnippetAsync=function(t,i,o){return e.ParseFromSnippetAsync(t,i,this,o)},e.ParseFromFileAsync=function(t,i,o,r){return l(this,void 0,void 0,(function(){var n,a;return _(this,(function(s){switch(s.label){case 0:return n=null!=o?o:e.CreateFullscreenUI("ADT from URL"),[4,e._LoadURLContentAsync(t)];case 1:return a=s.sent(),n.parseSerializedObject(a,i,r),[2,n]}}))}))},e.prototype.parseFromURLAsync=function(t,i,o){return e.ParseFromFileAsync(t,i,this,o)},e._LoadURLContentAsync=function(t,e){return void 0===e&&(e=!1),""===t?Promise.reject("No URL provided"):new Promise((function(i,o){var r=new h.WebRequest;r.addEventListener("readystatechange",(function(){if(4==r.readyState)if(200==r.status){var t=void 0;if(e){var n=JSON.parse(JSON.parse(r.responseText).jsonPayload);t=n.encodedGui?new TextDecoder("utf-8").decode((0,h.DecodeBase64ToBinary)(n.encodedGui)):n.gui}else t=r.responseText;var a=JSON.parse(t);i(a)}else o("Unable to load")})),r.open("GET",t),r.send()}))},e._Overlaps=function(t,e){return!(t.centerX>e.centerX+e.widthInPixels||t.centerX+t.widthInPixelse.centerY+e.heightInPixels)},e.CreateForMesh=function(t,i,o,r,n,a,s,l){void 0===i&&(i=1024),void 0===o&&(o=1024),void 0===r&&(r=!0),void 0===n&&(n=!1),void 0===s&&(s=this._CreateMaterial),void 0===l&&(l=h.Texture.TRILINEAR_SAMPLINGMODE);var _=(0,h.RandomGUID)(),c=new e("AdvancedDynamicTexture for ".concat(t.name," [").concat(_,"]"),i,o,t.getScene(),!0,l,a);return s(t,_,c,n),c.attachToMesh(t,r),c},e._CreateMaterial=function(t,e,i,o){var r=(0,h.GetClass)("BABYLON.StandardMaterial");if(!r)throw"StandardMaterial needs to be imported before as it contains a side-effect required by your code.";var n=new r("AdvancedDynamicTextureMaterial for ".concat(t.name," [").concat(e,"]"),t.getScene());n.backFaceCulling=!1,n.diffuseColor=h.Color3.Black(),n.specularColor=h.Color3.Black(),o?(n.diffuseTexture=i,n.emissiveTexture=i,i.hasAlpha=!0):(n.emissiveTexture=i,n.opacityTexture=i),t.material=n},e.CreateForMeshTexture=function(t,i,o,r,n,a){void 0===i&&(i=1024),void 0===o&&(o=1024),void 0===r&&(r=!0),void 0===a&&(a=h.Texture.TRILINEAR_SAMPLINGMODE);var s=new e(t.name+" AdvancedDynamicTexture",i,o,t.getScene(),!0,a,n);return s.attachToMesh(t,r),s},e.CreateFullscreenUI=function(t,i,o,r,n){void 0===i&&(i=!0),void 0===o&&(o=null),void 0===r&&(r=h.Texture.BILINEAR_SAMPLINGMODE),void 0===n&&(n=!1);var a=new e(t,0,0,o,!1,r),s=a.getScene(),l=new h.Layer(t+"_layer",null,s,!i);if(l.texture=a,a._layerToDispose=l,a._isFullscreen=!0,n&&s){var _=1/s.getEngine().getHardwareScalingLevel();a._rootContainer.scaleX=_,a._rootContainer.scaleY=_}return a.attach(),a},e.prototype.scale=function(e){t.prototype.scale.call(this,e),this.markAsDirty()},e.prototype.scaleTo=function(e,i){t.prototype.scaleTo.call(this,e,i),this.markAsDirty()},e.prototype._checkGuiIsReady=function(){this.guiIsReady()&&(this.onGuiReadyObservable.notifyObservers(this),this.onGuiReadyObservable.clear())},e.prototype.guiIsReady=function(){return this._rootContainer.isReady()},e.SnippetUrl=h.Constants.SnippetUrl,e.AllowGPUOptimizations=!0,e}(h.DynamicTexture),_t=function(){function t(t){this.texture=t,this._captureRenderTime=!1,this._renderTime=new h.PerfCounter,this._captureLayoutTime=!1,this._layoutTime=new h.PerfCounter,this._onBeginRenderObserver=null,this._onEndRenderObserver=null,this._onBeginLayoutObserver=null,this._onEndLayoutObserver=null}return Object.defineProperty(t.prototype,"renderTimeCounter",{get:function(){return this._renderTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layoutTimeCounter",{get:function(){return this._layoutTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"captureRenderTime",{get:function(){return this._captureRenderTime},set:function(t){var e=this;t!==this._captureRenderTime&&(this._captureRenderTime=t,t?(this._onBeginRenderObserver=this.texture.onBeginRenderObservable.add((function(){e._renderTime.beginMonitoring()})),this._onEndRenderObserver=this.texture.onEndRenderObservable.add((function(){e._renderTime.endMonitoring(!0)}))):(this.texture.onBeginRenderObservable.remove(this._onBeginRenderObserver),this._onBeginRenderObserver=null,this.texture.onEndRenderObservable.remove(this._onEndRenderObserver),this._onEndRenderObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"captureLayoutTime",{get:function(){return this._captureLayoutTime},set:function(t){var e=this;t!==this._captureLayoutTime&&(this._captureLayoutTime=t,t?(this._onBeginLayoutObserver=this.texture.onBeginLayoutObservable.add((function(){e._layoutTime.beginMonitoring()})),this._onEndLayoutObserver=this.texture.onEndLayoutObservable.add((function(){e._layoutTime.endMonitoring(!0)}))):(this.texture.onBeginLayoutObservable.remove(this._onBeginLayoutObserver),this._onBeginLayoutObserver=null,this.texture.onEndLayoutObservable.remove(this._onEndLayoutObserver),this._onEndLayoutObserver=null))},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.texture.onBeginRenderObservable.remove(this._onBeginRenderObserver),this._onBeginRenderObserver=null,this.texture.onEndRenderObservable.remove(this._onEndRenderObserver),this._onEndRenderObserver=null,this.texture.onBeginLayoutObservable.remove(this._onBeginLayoutObserver),this._onBeginLayoutObserver=null,this.texture.onEndLayoutObservable.remove(this._onEndLayoutObserver),this._onEndLayoutObserver=null,this.texture=null},t}(),ht="XmlLoader Exception : XML file is malformed or corrupted.",ct=function(){function t(t){void 0===t&&(t=null),this._nodes={},this._nodeTypes={element:1,attribute:2,text:3},this._isLoaded=!1,this._objectAttributes={textHorizontalAlignment:1,textVerticalAlignment:2,horizontalAlignment:3,verticalAlignment:4,stretch:5},t&&(this._parentClass=t)}return t.prototype._getChainElement=function(t){var e=window;this._parentClass&&(e=this._parentClass);var i=t;i=i.split(".");for(var o=0;o0&&c>u)throw"XmlLoader Exception : In the Grid element, the number of columns is defined in the first row, do not add more columns in the subsequent rows.";if(0==h){if(!n[f].attributes.getNamedItem("width"))throw"XmlLoader Exception : Width must be defined for all the grid columns in the first row";o=Number(n[f].attributes.getNamedItem("width").nodeValue),_=!!n[f].attributes.getNamedItem("isPixel")&&JSON.parse(n[f].attributes.getNamedItem("isPixel").nodeValue),e.addColumnDefinition(o,_)}a=n[f].children;for(var p=0;p1||(this.onPointerEnterObservable.notifyObservers(this,-1,t,this),this.pointerEnterAnimation&&this.pointerEnterAnimation(),0))},t.prototype._onPointerOut=function(t){this._enterCount--,this._enterCount>0||(this._enterCount=0,this.onPointerOutObservable.notifyObservers(this,-1,t,this),this.pointerOutAnimation&&this.pointerOutAnimation())},t.prototype._onPointerDown=function(t,e,i,o){return this._downCount++,this._downPointerIds[i]=this._downPointerIds[i]+1||1,1===this._downCount&&(this.onPointerDownObservable.notifyObservers(new ut(e,o),-1,t,this),this.pointerDownAnimation&&this.pointerDownAnimation(),!0)},t.prototype._onPointerUp=function(t,e,i,o,r){this._downCount--,this._downPointerIds[i]--,this._downPointerIds[i]<=0&&delete this._downPointerIds[i],this._downCount<0?this._downCount=0:0==this._downCount&&(r&&(this._enterCount>0||-1===this._enterCount)&&this.onPointerClickObservable.notifyObservers(new ut(e,o),-1,t,this),this.onPointerUpObservable.notifyObservers(new ut(e,o),-1,t,this),this.pointerUpAnimation&&this.pointerUpAnimation())},t.prototype.forcePointerUp=function(t){if(void 0===t&&(t=null),null!==t)this._onPointerUp(this,h.Vector3.Zero(),t,0,!0);else{for(var e in this._downPointerIds)this._onPointerUp(this,h.Vector3.Zero(),+e,0,!0);this._downCount>0&&(this._downCount=1,this._onPointerUp(this,h.Vector3.Zero(),0,0,!0))}},t.prototype._processObservables=function(t,e,i,o,r){if(this._isTouchButton3D(this)&&i&&(t=this._generatePointerEventType(t,i,this._downCount)),t===h.PointerEventTypes.POINTERMOVE){this._onPointerMove(this,e);var n=this._host._lastControlOver[o];return n&&n!==this&&n._onPointerOut(this),n!==this&&this._onPointerEnter(this),this._host._lastControlOver[o]=this,!0}return t===h.PointerEventTypes.POINTERDOWN?(this._onPointerDown(this,e,o,r),this._host._lastControlDown[o]=this,this._host._lastPickedControl=this,!0):(t===h.PointerEventTypes.POINTERUP||t===h.PointerEventTypes.POINTERDOUBLETAP)&&(this._host._lastControlDown[o]&&this._host._lastControlDown[o]._onPointerUp(this,e,o,r,!0),delete this._host._lastControlDown[o],!0)},t.prototype._disposeNode=function(){this._node&&(this._node.dispose(),this._node=null)},t.prototype.dispose=function(){this.onPointerDownObservable.clear(),this.onPointerEnterObservable.clear(),this.onPointerMoveObservable.clear(),this.onPointerOutObservable.clear(),this.onPointerUpObservable.clear(),this.onPointerClickObservable.clear(),this._disposeNode();for(var t=0,e=this._behaviors;ti));p++);else for(p=0;pi));f++);d=0;for(var g=0,b=this._children;g0,r.BORDER=this.renderBorders,r.HOVERLIGHT=this.renderHoverLight,this._albedoTexture){if(!this._albedoTexture.isReadyOrNotBlocking())return!1;r.TEXTURE=!0}else r.TEXTURE=!1;var n=o.getEngine();if(r.isDirty){r.markAsProcessed(),o.resetCachedMaterial();var a=[h.VertexBuffer.PositionKind];a.push(h.VertexBuffer.NormalKind),a.push(h.VertexBuffer.UVKind);var s=["world","viewProjection","innerGlowColor","albedoColor","borderWidth","edgeSmoothingValue","scaleFactor","borderMinValue","hoverColor","hoverPosition","hoverRadius","textureMatrix"],l=["albedoSampler"],_=[];(0,h.PrepareUniformsAndSamplersList)({uniformsNames:s,uniformBuffersNames:_,samplers:l,defines:r,maxSimultaneousLights:4});var c=r.toString();e.setEffect(o.getEngine().createEffect("fluent",{attributes:a,uniformsNames:s,uniformBuffersNames:_,samplers:l,defines:c,fallbacks:null,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),r,this._materialContext)}return!(!e.effect||!e.effect.isReady()||(r._renderId=o.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){var o=this.getScene(),r=i.materialDefines;if(r){var n=i.effect;if(n){if(this._activeEffect=n,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",o.getTransformMatrix()),this._mustRebind(o,n,i)&&(this._activeEffect.setColor4("albedoColor",this.albedoColor,this.alpha),r.INNERGLOW&&this._activeEffect.setColor4("innerGlowColor",this.innerGlowColor,this.innerGlowColorIntensity),r.BORDER&&(this._activeEffect.setFloat("borderWidth",this.borderWidth),this._activeEffect.setFloat("edgeSmoothingValue",this.edgeSmoothingValue),this._activeEffect.setFloat("borderMinValue",this.borderMinValue),e.getBoundingInfo().boundingBox.extendSize.multiplyToRef(e.scaling,h.TmpVectors.Vector3[0]),this._activeEffect.setVector3("scaleFactor",h.TmpVectors.Vector3[0])),r.HOVERLIGHT&&(this._activeEffect.setDirectColor4("hoverColor",this.hoverColor),this._activeEffect.setFloat("hoverRadius",this.hoverRadius),this._activeEffect.setVector3("hoverPosition",this.hoverPosition)),r.TEXTURE&&this._albedoTexture)){this._activeEffect.setTexture("albedoSampler",this._albedoTexture);var a=this._albedoTexture.getTextureMatrix();this._activeEffect.setMatrix("textureMatrix",a)}this._afterBind(e,this._activeEffect,i)}}},e.prototype.getActiveTextures=function(){return t.prototype.getActiveTextures.call(this)},e.prototype.hasTexture=function(e){return!!t.prototype.hasTexture.call(this,e)},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e)},e.prototype.clone=function(t){var i=this;return h.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var e=t.prototype.serialize.call(this);return e.customType="BABYLON.GUI.FluentMaterial",e},e.prototype.getClassName=function(){return"FluentMaterial"},e.Parse=function(t,i,o){return h.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},s([(0,h.serialize)(),(0,h.expandToProperty)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"innerGlowColorIntensity",void 0),s([(0,h.serializeAsColor3)()],e.prototype,"innerGlowColor",void 0),s([(0,h.serializeAsColor3)()],e.prototype,"albedoColor",void 0),s([(0,h.serialize)(),(0,h.expandToProperty)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"renderBorders",void 0),s([(0,h.serialize)()],e.prototype,"borderWidth",void 0),s([(0,h.serialize)()],e.prototype,"edgeSmoothingValue",void 0),s([(0,h.serialize)()],e.prototype,"borderMinValue",void 0),s([(0,h.serialize)(),(0,h.expandToProperty)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"renderHoverLight",void 0),s([(0,h.serialize)()],e.prototype,"hoverRadius",void 0),s([(0,h.serializeAsColor4)()],e.prototype,"hoverColor",void 0),s([(0,h.serializeAsVector3)()],e.prototype,"hoverPosition",void 0),s([(0,h.serializeAsTexture)("albedoTexture")],e.prototype,"_albedoTexture",void 0),s([(0,h.expandToProperty)("_markAllSubMeshesAsTexturesAndMiscDirty")],e.prototype,"albedoTexture",void 0),e}(h.PushMaterial);(0,h.RegisterClass)("BABYLON.GUI.FluentMaterial",xt);var Pt=function(t){function e(e){var i=t.call(this,e)||this;return i._backPlateMargin=1.25,i}return n(e,t),Object.defineProperty(e.prototype,"backPlateMargin",{get:function(){return this._backPlateMargin},set:function(t){var e=this;this._backPlateMargin=t,this._children.length>=1&&(this.children.forEach((function(t){e._updateCurrentMinMax(t.position)})),this._updateMargins())},enumerable:!1,configurable:!0}),e.prototype._createNode=function(t){var e=new h.Mesh("menu_".concat(this.name),t);return this._backPlate=(0,h.CreateBox)("backPlate"+this.name,{size:1},t),this._backPlate.parent=e,e},e.prototype._affectMaterial=function(t){var e=this;this._backPlateMaterial=new xt(this.name+"backPlateMaterial",t.getScene()),this._backPlateMaterial.albedoColor=new h.Color3(.08,.15,.55),this._backPlateMaterial.renderBorders=!0,this._backPlateMaterial.renderHoverLight=!0,this._pickedPointObserver=this._host.onPickedPointChangedObservable.add((function(t){t?(e._backPlateMaterial.hoverPosition=t,e._backPlateMaterial.hoverColor.a=1):e._backPlateMaterial.hoverColor.a=0})),this._backPlate.material=this._backPlateMaterial},e.prototype._mapGridNode=function(t,e){t.mesh&&(t.position=e.clone(),this._updateCurrentMinMax(e))},e.prototype._finalProcessing=function(){this._updateMargins()},e.prototype._updateCurrentMinMax=function(t){this._currentMin||(this._currentMin=t.clone(),this._currentMax=t.clone()),this._currentMin.minimizeInPlace(t),this._currentMax.maximizeInPlace(t)},e.prototype._updateMargins=function(){if(this._children.length>0){this._currentMin.addInPlaceFromFloats(-this._cellWidth/2,-this._cellHeight/2,0),this._currentMax.addInPlaceFromFloats(this._cellWidth/2,this._cellHeight/2,0);var t=this._currentMax.subtract(this._currentMin);this._backPlate.scaling.x=t.x+this._cellWidth*this.backPlateMargin,this._backPlate.scaling.y=t.y+this._cellHeight*this.backPlateMargin,this._backPlate.scaling.z=.001;for(var e=0;e0.0 ? g : 1.0;Gradient2=Position_Object.z>0.0 ? 1.0 : g;} else {Gradient1=g+(1.0-g)*(Radial_Gradient);Gradient2=1.0;}}\nvoid Pick_Radius_B144(\nfloat Radius,\nfloat Radius_Top_Left,\nfloat Radius_Top_Right,\nfloat Radius_Bottom_Left,\nfloat Radius_Bottom_Right,\nvec3 Position,\nout float Result)\n{bool whichY=Position.y>0.0;Result=Position.x<0.0 ? (whichY ? Radius_Top_Left : Radius_Bottom_Left) : (whichY ? Radius_Top_Right : Radius_Bottom_Right);Result*=Radius;}\nvoid main()\n{vec3 Nrm_World_Q128;Nrm_World_Q128=normalize((world*vec4(normal,0.0)).xyz);vec3 Tangent_World_Q131;vec3 Tangent_World_N_Q131;float Tangent_Length_Q131;Tangent_World_Q131=(world*vec4(vec3(1,0,0),0.0)).xyz;Tangent_Length_Q131=length(Tangent_World_Q131);Tangent_World_N_Q131=Tangent_World_Q131/Tangent_Length_Q131;vec3 Binormal_World_Q132;vec3 Binormal_World_N_Q132;float Binormal_Length_Q132;Object_To_World_Dir_B132(vec3(0,1,0),Binormal_World_Q132,Binormal_World_N_Q132,Binormal_Length_Q132);float Anisotropy_Q133=Tangent_Length_Q131/Binormal_Length_Q132;vec3 Result_Q177;Result_Q177=mix(_Blob_Position_,Global_Left_Index_Tip_Position.xyz,float(_Use_Global_Left_Index_));vec3 Result_Q178;Result_Q178=mix(_Blob_Position_2_,Global_Right_Index_Tip_Position.xyz,float(_Use_Global_Right_Index_));float Result_Q144;Pick_Radius_B144(_Radius_,_Radius_Top_Left_,_Radius_Top_Right_,_Radius_Bottom_Left_,_Radius_Bottom_Right_,position,Result_Q144);vec3 Dir_Q140;PickDir_B140(_Angle_,Tangent_World_N_Q131,Binormal_World_N_Q132,Dir_Q140);float Radius_Q147;float Line_Width_Q147;RelativeOrAbsoluteDetail_B147(Result_Q144,_Line_Width_,_Absolute_Sizes_,Binormal_Length_Q132,Radius_Q147,Line_Width_Q147);vec4 Out_Color_Q145=vec4(Radius_Q147,Line_Width_Q147,0,1);vec3 New_P_Q129;vec2 New_UV_Q129;float Radial_Gradient_Q129;vec3 Radial_Dir_Q129;Move_Verts_B129(Anisotropy_Q133,position,Radius_Q147,New_P_Q129,New_UV_Q129,Radial_Gradient_Q129,Radial_Dir_Q129);vec3 Pos_World_Q115;Object_To_World_Pos_B115(New_P_Q129,Pos_World_Q115);vec4 Blob_Info_Q180;\n#if BLOB_ENABLE\nBlob_Vertex_B180(Pos_World_Q115,Nrm_World_Q128,Tangent_World_N_Q131,Binormal_World_N_Q132,Result_Q177,_Blob_Intensity_,_Blob_Near_Size_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_,_Blob_Fade_,Blob_Info_Q180);\n#else\nBlob_Info_Q180=vec4(0,0,0,0);\n#endif\nvec4 Blob_Info_Q181;\n#if BLOB_ENABLE_2\nBlob_Vertex_B180(Pos_World_Q115,Nrm_World_Q128,Tangent_World_N_Q131,Binormal_World_N_Q132,Result_Q178,_Blob_Intensity_,_Blob_Near_Size_2_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_2_,_Blob_Fade_2_,Blob_Info_Q181);\n#else\nBlob_Info_Q181=vec4(0,0,0,0);\n#endif\nfloat Gradient1_Q130;float Gradient2_Q130;\n#if SMOOTH_EDGES\nEdge_AA_Vertex_B130(Pos_World_Q115,position,normal,cameraPosition,Radial_Gradient_Q129,Radial_Dir_Q129,tangent,Gradient1_Q130,Gradient2_Q130);\n#else\nGradient1_Q130=1.0;Gradient2_Q130=1.0;\n#endif\nvec2 Rect_UV_Q139;vec4 Rect_Parms_Q139;vec2 Scale_XY_Q139;vec2 Line_UV_Q139;Round_Rect_Vertex_B139(New_UV_Q129,Radius_Q147,0.0,Anisotropy_Q133,Gradient1_Q130,Gradient2_Q130,Rect_UV_Q139,Rect_Parms_Q139,Scale_XY_Q139,Line_UV_Q139);vec3 Line_Vertex_Q135;Line_Vertex_B135(Scale_XY_Q139,Line_UV_Q139,0.0,_Rate_,_Highlight_Transform_,Line_Vertex_Q135);vec3 Position=Pos_World_Q115;vec3 Normal=Dir_Q140;vec2 UV=Rect_UV_Q139;vec3 Tangent=Line_Vertex_Q135;vec3 Binormal=Nrm_World_Q128;vec4 Color=Out_Color_Q145;vec4 Extra1=Rect_Parms_Q139;vec4 Extra2=Blob_Info_Q180;vec4 Extra3=Blob_Info_Q181;gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vColor=Color;vExtra1=Extra1;vExtra2=Extra2;vExtra3=Extra3;}";var Bt=function(t){function e(){var e=t.call(this)||this;return e.BLOB_ENABLE=!0,e.BLOB_ENABLE_2=!0,e.SMOOTH_EDGES=!0,e.IRIDESCENT_MAP_ENABLE=!0,e._needNormals=!0,e.rebuild(),e}return n(e,t),e}(h.MaterialDefines),Ct=function(t){function e(i,o){var r=t.call(this,i,o)||this;return r.radius=.03,r.lineWidth=.01,r.absoluteSizes=!1,r._filterWidth=1,r.baseColor=new h.Color4(.0392157,.0666667,.207843,1),r.lineColor=new h.Color4(.14902,.133333,.384314,1),r.blobIntensity=.98,r.blobFarSize=.04,r.blobNearDistance=0,r.blobFarDistance=.08,r.blobFadeLength=.08,r.blobNearSize=.22,r.blobPulse=0,r.blobFade=0,r.blobNearSize2=.22,r.blobPulse2=0,r.blobFade2=0,r._rate=.135,r.highlightColor=new h.Color4(.98,.98,.98,1),r.highlightWidth=.25,r._highlightTransform=new h.Vector4(1,1,0,0),r._highlight=1,r.iridescenceIntensity=0,r.iridescenceEdgeIntensity=1,r._angle=-45,r.fadeOut=1,r._reflected=!0,r._frequency=1,r._verticalOffset=0,r.globalLeftIndexTipPosition=h.Vector3.Zero(),r._globalLeftIndexTipPosition4=h.Vector4.Zero(),r.globalRightIndexTipPosition=h.Vector3.Zero(),r._globalRightIndexTipPosition4=h.Vector4.Zero(),r.alphaMode=h.Constants.ALPHA_DISABLE,r.backFaceCulling=!1,r._blobTexture=new h.Texture(e.BLOB_TEXTURE_URL,r.getScene(),!0,!1,h.Texture.NEAREST_SAMPLINGMODE),r._iridescentMap=new h.Texture(e.IM_TEXTURE_URL,r.getScene(),!0,!1,h.Texture.NEAREST_SAMPLINGMODE),r}return n(e,t),e.prototype.needAlphaBlending=function(){return!1},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new Bt);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,h.PrepareDefinesForAttributes)(t,o,!1,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new h.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,h.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[h.VertexBuffer.PositionKind];o.NORMAL&&s.push(h.VertexBuffer.NormalKind),o.UV1&&s.push(h.VertexBuffer.UVKind),o.UV2&&s.push(h.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(h.VertexBuffer.ColorKind),o.TANGENT&&s.push(h.VertexBuffer.TangentKind),(0,h.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","viewProjection","cameraPosition","_Radius_","_Line_Width_","_Absolute_Sizes_","_Filter_Width_","_Base_Color_","_Line_Color_","_Radius_Top_Left_","_Radius_Top_Right_","_Radius_Bottom_Left_","_Radius_Bottom_Right_","_Blob_Position_","_Blob_Intensity_","_Blob_Near_Size_","_Blob_Far_Size_","_Blob_Near_Distance_","_Blob_Far_Distance_","_Blob_Fade_Length_","_Blob_Pulse_","_Blob_Fade_","_Blob_Texture_","_Blob_Position_2_","_Blob_Near_Size_2_","_Blob_Pulse_2_","_Blob_Fade_2_","_Rate_","_Highlight_Color_","_Highlight_Width_","_Highlight_Transform_","_Highlight_","_Iridescence_Intensity_","_Iridescence_Edge_Intensity_","_Angle_","_Fade_Out_","_Reflected_","_Frequency_","_Vertical_Offset_","_Iridescent_Map_","_Use_Global_Left_Index_","_Use_Global_Right_Index_","Global_Left_Index_Tip_Position","Global_Right_Index_Tip_Position"],c=["_Blob_Texture_","_Iridescent_Map_"],u=[];(0,h.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("fluentBackplate",{attributes:s,uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o,this._materialContext)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){var o,r;if(i.materialDefines){var n=i.effect;n&&(this._activeEffect=n,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",this.getScene().getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",null!==(r=null===(o=this.getScene().activeCamera)||void 0===o?void 0:o.position)&&void 0!==r?r:h.Vector3.ZeroReadOnly),this._activeEffect.setFloat("_Radius_",this.radius),this._activeEffect.setFloat("_Line_Width_",this.lineWidth),this._activeEffect.setFloat("_Absolute_Sizes_",this.absoluteSizes?1:0),this._activeEffect.setFloat("_Filter_Width_",this._filterWidth),this._activeEffect.setDirectColor4("_Base_Color_",this.baseColor),this._activeEffect.setDirectColor4("_Line_Color_",this.lineColor),this._activeEffect.setFloat("_Radius_Top_Left_",1),this._activeEffect.setFloat("_Radius_Top_Right_",1),this._activeEffect.setFloat("_Radius_Bottom_Left_",1),this._activeEffect.setFloat("_Radius_Bottom_Right_",1),this._activeEffect.setFloat("_Blob_Intensity_",this.blobIntensity),this._activeEffect.setFloat("_Blob_Near_Size_",this.blobNearSize),this._activeEffect.setFloat("_Blob_Far_Size_",this.blobFarSize),this._activeEffect.setFloat("_Blob_Near_Distance_",this.blobNearDistance),this._activeEffect.setFloat("_Blob_Far_Distance_",this.blobFarDistance),this._activeEffect.setFloat("_Blob_Fade_Length_",this.blobFadeLength),this._activeEffect.setFloat("_Blob_Pulse_",this.blobPulse),this._activeEffect.setFloat("_Blob_Fade_",this.blobFade),this._activeEffect.setTexture("_Blob_Texture_",this._blobTexture),this._activeEffect.setFloat("_Blob_Near_Size_2_",this.blobNearSize2),this._activeEffect.setFloat("_Blob_Pulse_2_",this.blobPulse2),this._activeEffect.setFloat("_Blob_Fade_2_",this.blobFade2),this._activeEffect.setFloat("_Rate_",this._rate),this._activeEffect.setDirectColor4("_Highlight_Color_",this.highlightColor),this._activeEffect.setFloat("_Highlight_Width_",this.highlightWidth),this._activeEffect.setVector4("_Highlight_Transform_",this._highlightTransform),this._activeEffect.setFloat("_Highlight_",this._highlight),this._activeEffect.setFloat("_Iridescence_Intensity_",this.iridescenceIntensity),this._activeEffect.setFloat("_Iridescence_Edge_Intensity_",this.iridescenceEdgeIntensity),this._activeEffect.setFloat("_Angle_",this._angle),this._activeEffect.setFloat("_Fade_Out_",this.fadeOut),this._activeEffect.setFloat("_Reflected_",this._reflected?1:0),this._activeEffect.setFloat("_Frequency_",this._frequency),this._activeEffect.setFloat("_Vertical_Offset_",this._verticalOffset),this._activeEffect.setTexture("_Iridescent_Map_",this._iridescentMap),this._activeEffect.setFloat("_Use_Global_Left_Index_",1),this._activeEffect.setFloat("_Use_Global_Right_Index_",1),this._globalLeftIndexTipPosition4.set(this.globalLeftIndexTipPosition.x,this.globalLeftIndexTipPosition.y,this.globalLeftIndexTipPosition.z,1),this._activeEffect.setVector4("Global_Left_Index_Tip_Position",this._globalLeftIndexTipPosition4),this._globalRightIndexTipPosition4.set(this.globalRightIndexTipPosition.x,this.globalRightIndexTipPosition.y,this.globalRightIndexTipPosition.z,1),this._activeEffect.setVector4("Global_Right_Index_Tip_Position",this._globalRightIndexTipPosition4),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),this._blobTexture.dispose(),this._iridescentMap.dispose()},e.prototype.clone=function(t){var i=this;return h.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var e=t.prototype.serialize.call(this);return e.customType="BABYLON.FluentBackplateMaterial",e},e.prototype.getClassName=function(){return"FluentBackplateMaterial"},e.Parse=function(t,i,o){return h.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},e.BLOB_TEXTURE_URL="https://assets.babylonjs.com/meshes/MRTK/mrtk-fluent-backplate-blob.png",e.IM_TEXTURE_URL="https://assets.babylonjs.com/meshes/MRTK/mrtk-fluent-backplate-iridescence.png",s([(0,h.serialize)()],e.prototype,"radius",void 0),s([(0,h.serialize)()],e.prototype,"lineWidth",void 0),s([(0,h.serialize)()],e.prototype,"absoluteSizes",void 0),s([(0,h.serialize)()],e.prototype,"baseColor",void 0),s([(0,h.serialize)()],e.prototype,"lineColor",void 0),s([(0,h.serialize)()],e.prototype,"blobIntensity",void 0),s([(0,h.serialize)()],e.prototype,"blobFarSize",void 0),s([(0,h.serialize)()],e.prototype,"blobNearDistance",void 0),s([(0,h.serialize)()],e.prototype,"blobFarDistance",void 0),s([(0,h.serialize)()],e.prototype,"blobFadeLength",void 0),s([(0,h.serialize)()],e.prototype,"blobNearSize",void 0),s([(0,h.serialize)()],e.prototype,"blobPulse",void 0),s([(0,h.serialize)()],e.prototype,"blobFade",void 0),s([(0,h.serialize)()],e.prototype,"blobNearSize2",void 0),s([(0,h.serialize)()],e.prototype,"blobPulse2",void 0),s([(0,h.serialize)()],e.prototype,"blobFade2",void 0),s([(0,h.serialize)()],e.prototype,"highlightColor",void 0),s([(0,h.serialize)()],e.prototype,"highlightWidth",void 0),s([(0,h.serialize)()],e.prototype,"iridescenceIntensity",void 0),s([(0,h.serialize)()],e.prototype,"iridescenceEdgeIntensity",void 0),s([(0,h.serialize)()],e.prototype,"fadeOut",void 0),s([(0,h.serializeAsVector3)()],e.prototype,"globalLeftIndexTipPosition",void 0),s([(0,h.serializeAsVector3)()],e.prototype,"globalRightIndexTipPosition",void 0),e}(h.PushMaterial);(0,h.RegisterClass)("BABYLON.GUI.FluentBackplateMaterial",Ct);var Tt=function(t){function e(e,i){void 0===i&&(i=!0);var o=t.call(this,e)||this;return o._shareMaterials=i,o}return n(e,t),Object.defineProperty(e.prototype,"renderingGroupId",{get:function(){return this._model.renderingGroupId},set:function(t){this._model.renderingGroupId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"material",{get:function(){return this._material},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shareMaterials",{get:function(){return this._shareMaterials},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"HolographicBackplate"},e.prototype._createNode=function(t){var i,o=this,r=(0,h.CreateBox)((null!==(i=this.name)&&void 0!==i?i:"HolographicBackplate")+"_CollisionMesh",{width:1,height:1,depth:1},t);return r.isPickable=!0,r.visibility=0,h.SceneLoader.ImportMeshAsync(void 0,e.MODEL_BASE_URL,e.MODEL_FILENAME,t).then((function(t){var e=t.meshes[1];e.name="".concat(o.name,"_frontPlate"),e.isPickable=!1,e.parent=r,o._material&&(e.material=o._material),o._model=e})),r},e.prototype._createMaterial=function(t){this._material=new Ct(this.name+" Material",t.getScene())},e.prototype._affectMaterial=function(t){this._shareMaterials?this._host._touchSharedMaterials.fluentBackplateMaterial?this._material=this._host._touchSharedMaterials.fluentBackplateMaterial:(this._createMaterial(t),this._host._touchSharedMaterials.fluentBackplateMaterial=this._material):this._createMaterial(t)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.shareMaterials||this._material.dispose(),this._model.dispose()},e.MODEL_BASE_URL="https://assets.babylonjs.com/meshes/MRTK/",e.MODEL_FILENAME="mrtk-fluent-backplate.glb",e}(dt),St=function(t){function e(e,i){void 0===i&&(i=!0);var o=t.call(this,e)||this;return o._shareMaterials=!0,o._shareMaterials=i,o.pointerEnterAnimation=function(){o.mesh&&o._frontPlate.setEnabled(!0)},o.pointerOutAnimation=function(){o.mesh&&o._frontPlate.setEnabled(!1)},o}return n(e,t),e.prototype._disposeTooltip=function(){this._tooltipFade=null,this._tooltipTextBlock&&this._tooltipTextBlock.dispose(),this._tooltipTexture&&this._tooltipTexture.dispose(),this._tooltipMesh&&this._tooltipMesh.dispose(),this.onPointerEnterObservable.remove(this._tooltipHoverObserver),this.onPointerOutObservable.remove(this._tooltipOutObserver)},Object.defineProperty(e.prototype,"renderingGroupId",{get:function(){return this._backPlate.renderingGroupId},set:function(t){this._backPlate.renderingGroupId=t,this._textPlate.renderingGroupId=t,this._frontPlate.renderingGroupId=t,this._tooltipMesh&&(this._tooltipMesh.renderingGroupId=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tooltipText",{get:function(){return this._tooltipTextBlock?this._tooltipTextBlock.text:null},set:function(t){var e=this;if(t){if(!this._tooltipFade){var i=this._backPlate._scene.useRightHandedSystem;this._tooltipMesh=(0,h.CreatePlane)("",{size:1},this._backPlate._scene);var o=(0,h.CreatePlane)("",{size:1,sideOrientation:h.Mesh.DOUBLESIDE},this._backPlate._scene),r=new h.StandardMaterial("",this._backPlate._scene);r.diffuseColor=h.Color3.FromHexString("#212121"),o.material=r,o.isPickable=!1,this._tooltipMesh.addChild(o),o.position=h.Vector3.Forward(i).scale(.05),this._tooltipMesh.scaling.y=1/3,this._tooltipMesh.position=h.Vector3.Up().scale(.7).add(h.Vector3.Forward(i).scale(-.15)),this._tooltipMesh.isPickable=!1,this._tooltipMesh.parent=this._backPlate,this._tooltipTexture=lt.CreateForMesh(this._tooltipMesh),this._tooltipTextBlock=new B,this._tooltipTextBlock.scaleY=3,this._tooltipTextBlock.color="white",this._tooltipTextBlock.fontSize=130,this._tooltipTexture.addControl(this._tooltipTextBlock),this._tooltipFade=new h.FadeInOutBehavior,this._tooltipFade.delay=500,this._tooltipMesh.addBehavior(this._tooltipFade),this._tooltipHoverObserver=this.onPointerEnterObservable.add((function(){e._tooltipFade&&e._tooltipFade.fadeIn(!0)})),this._tooltipOutObserver=this.onPointerOutObservable.add((function(){e._tooltipFade&&e._tooltipFade.fadeIn(!1)}))}this._tooltipTextBlock&&(this._tooltipTextBlock.text=t)}else this._disposeTooltip()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){this._text!==t&&(this._text=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageUrl",{get:function(){return this._imageUrl},set:function(t){this._imageUrl!==t&&(this._imageUrl=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backMaterial",{get:function(){return this._backMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frontMaterial",{get:function(){return this._frontMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"plateMaterial",{get:function(){return this._plateMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shareMaterials",{get:function(){return this._shareMaterials},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"HolographicButton"},e.prototype._rebuildContent=function(){this._disposeFacadeTexture();var t=new S;if(t.isVertical=!0,(0,h.IsDocumentAvailable)()&&document.createElement&&this._imageUrl){var e=new C;e.source=this._imageUrl,e.paddingTop="40px",e.height="180px",e.width="100px",e.paddingBottom="40px",t.addControl(e)}if(this._text){var i=new B;i.text=this._text,i.color="white",i.height="30px",i.fontSize=24,t.addControl(i)}this._frontPlate&&(this.content=t)},e.prototype._createNode=function(e){return this._backPlate=(0,h.CreateBox)(this.name+"BackMesh",{width:1,height:1,depth:.08},e),this._frontPlate=(0,h.CreateBox)(this.name+"FrontMesh",{width:1,height:1,depth:.08},e),this._frontPlate.parent=this._backPlate,this._frontPlate.position=h.Vector3.Forward(e.useRightHandedSystem).scale(-.08),this._frontPlate.isPickable=!1,this._frontPlate.setEnabled(!1),this._textPlate=t.prototype._createNode.call(this,e),this._textPlate.parent=this._backPlate,this._textPlate.position=h.Vector3.Forward(e.useRightHandedSystem).scale(-.08),this._textPlate.isPickable=!1,this._backPlate},e.prototype._applyFacade=function(t){this._plateMaterial.emissiveTexture=t,this._plateMaterial.opacityTexture=t},e.prototype._createBackMaterial=function(t){var e=this;this._backMaterial=new xt(this.name+"Back Material",t.getScene()),this._backMaterial.renderHoverLight=!0,this._pickedPointObserver=this._host.onPickedPointChangedObservable.add((function(t){t?(e._backMaterial.hoverPosition=t,e._backMaterial.hoverColor.a=1):e._backMaterial.hoverColor.a=0}))},e.prototype._createFrontMaterial=function(t){this._frontMaterial=new xt(this.name+"Front Material",t.getScene()),this._frontMaterial.innerGlowColorIntensity=0,this._frontMaterial.alpha=.5,this._frontMaterial.renderBorders=!0},e.prototype._createPlateMaterial=function(t){this._plateMaterial=new h.StandardMaterial(this.name+"Plate Material",t.getScene()),this._plateMaterial.specularColor=h.Color3.Black()},e.prototype._affectMaterial=function(t){this._shareMaterials?(this._host._sharedMaterials.backFluentMaterial?this._backMaterial=this._host._sharedMaterials.backFluentMaterial:(this._createBackMaterial(t),this._host._sharedMaterials.backFluentMaterial=this._backMaterial),this._host._sharedMaterials.frontFluentMaterial?this._frontMaterial=this._host._sharedMaterials.frontFluentMaterial:(this._createFrontMaterial(t),this._host._sharedMaterials.frontFluentMaterial=this._frontMaterial)):(this._createBackMaterial(t),this._createFrontMaterial(t)),this._createPlateMaterial(t),this._backPlate.material=this._backMaterial,this._frontPlate.material=this._frontMaterial,this._textPlate.material=this._plateMaterial,this._rebuildContent()},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._disposeTooltip(),this.shareMaterials||(this._backMaterial.dispose(),this._frontMaterial.dispose(),this._plateMaterial.dispose(),this._pickedPointObserver&&(this._host.onPickedPointChangedObservable.remove(this._pickedPointObserver),this._pickedPointObserver=null))},e}(gt);h.ShaderStore.ShadersStore.fluentButtonPixelShader="uniform vec3 cameraPosition;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vColor;varying vec4 vExtra1;uniform float _Edge_Width_;uniform vec4 _Edge_Color_;uniform bool _Relative_Width_;uniform float _Proximity_Max_Intensity_;uniform float _Proximity_Far_Distance_;uniform float _Proximity_Near_Radius_;uniform float _Proximity_Anisotropy_;uniform float _Selection_Fuzz_;uniform float _Selected_;uniform float _Selection_Fade_;uniform float _Selection_Fade_Size_;uniform float _Selected_Distance_;uniform float _Selected_Fade_Length_;uniform bool _Blob_Enable_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Inner_Fade_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform sampler2D _Blob_Texture_;uniform bool _Blob_Enable_2_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Inner_Fade_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform vec3 _Active_Face_Dir_;uniform vec3 _Active_Face_Up_;uniform bool Enable_Fade;uniform float _Fade_Width_;uniform bool _Smooth_Active_Face_;uniform bool _Show_Frame_;uniform bool _Use_Blob_Texture_;uniform bool Use_Global_Left_Index;uniform bool Use_Global_Right_Index;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;uniform vec4 Global_Left_Thumb_Tip_Position;uniform vec4 Global_Right_Thumb_Tip_Position;uniform float Global_Left_Index_Tip_Proximity;uniform float Global_Right_Index_Tip_Proximity;void Holo_Edge_Fragment_B35(\nvec4 Edges,\nfloat Edge_Width,\nout float NotEdge)\n{vec2 c=vec2(min(Edges.r,Edges.g),min(Edges.b,Edges.a));vec2 df=fwidth(c)*Edge_Width;vec2 g=clamp(c/df,0.0,1.0);NotEdge=g.x*g.y;}\nvoid Blob_Fragment_B39(\nvec2 UV,\nvec3 Blob_Info,\nsampler2D Blob_Texture,\nout vec4 Blob_Color)\n{float k=dot(UV,UV);Blob_Color=Blob_Info.y*texture(Blob_Texture,vec2(vec2(sqrt(k),Blob_Info.x).x,1.0-vec2(sqrt(k),Blob_Info.x).y))*(1.0-clamp(k,0.0,1.0));}\nvec2 FilterStep(vec2 Edge,vec2 X)\n{vec2 dX=max(fwidth(X),vec2(0.00001,0.00001));return clamp( (X+dX-max(Edge,X-dX))/(dX*2.0),0.0,1.0);}\nvoid Wireframe_Fragment_B59(\nvec3 Widths,\nvec2 UV,\nfloat Proximity,\nvec4 Edge_Color,\nout vec4 Wireframe)\n{vec2 c=min(UV,vec2(1.0,1.0)-UV);vec2 g=FilterStep(Widths.xy*0.5,c); \nWireframe=(1.0-min(g.x,g.y))*Proximity*Edge_Color;}\nvoid Proximity_B53(\nvec3 Proximity_Center,\nvec3 Proximity_Center_2,\nfloat Proximity_Max_Intensity,\nfloat Proximity_Near_Radius,\nvec3 Position,\nvec3 Show_Selection,\nvec4 Extra1,\nfloat Dist_To_Face,\nfloat Intensity,\nout float Proximity)\n{vec2 delta1=Extra1.xy;vec2 delta2=Extra1.zw;float d2=sqrt(min(dot(delta1,delta1),dot(delta2,delta2))+Dist_To_Face*Dist_To_Face);Proximity=Intensity*Proximity_Max_Intensity*(1.0-clamp(d2/Proximity_Near_Radius,0.0,1.0))*(1.0-Show_Selection.x)+Show_Selection.x;}\nvoid To_XYZ_B46(\nvec3 Vec3,\nout float X,\nout float Y,\nout float Z)\n{X=Vec3.x;Y=Vec3.y;Z=Vec3.z;}\nvoid main()\n{float NotEdge_Q35;\n#if ENABLE_FADE\nHolo_Edge_Fragment_B35(vColor,_Fade_Width_,NotEdge_Q35);\n#else\nNotEdge_Q35=1.0;\n#endif\nvec4 Blob_Color_Q39;float k=dot(vUV,vUV);vec2 blobTextureCoord=vec2(vec2(sqrt(k),vTangent.x).x,1.0-vec2(sqrt(k),vTangent.x).y);vec4 blobColor=mix(vec4(1.0,1.0,1.0,1.0)*step(1.0-vTangent.x,clamp(sqrt(k)+0.1,0.0,1.0)),texture(_Blob_Texture_,blobTextureCoord),float(_Use_Blob_Texture_));Blob_Color_Q39=vTangent.y*blobColor*(1.0-clamp(k,0.0,1.0));float Is_Quad_Q24;Is_Quad_Q24=vNormal.z;vec3 Blob_Position_Q41= mix(_Blob_Position_,Global_Left_Index_Tip_Position.xyz,float(Use_Global_Left_Index));vec3 Blob_Position_Q42= mix(_Blob_Position_2_,Global_Right_Index_Tip_Position.xyz,float(Use_Global_Right_Index));float X_Q46;float Y_Q46;float Z_Q46;To_XYZ_B46(vBinormal,X_Q46,Y_Q46,Z_Q46);float Proximity_Q53;Proximity_B53(Blob_Position_Q41,Blob_Position_Q42,_Proximity_Max_Intensity_,_Proximity_Near_Radius_,vPosition,vBinormal,vExtra1,Y_Q46,Z_Q46,Proximity_Q53);vec4 Wireframe_Q59;Wireframe_Fragment_B59(vNormal,vUV,Proximity_Q53,_Edge_Color_,Wireframe_Q59);vec4 Wire_Or_Blob_Q23=mix(Wireframe_Q59,Blob_Color_Q39,Is_Quad_Q24);vec4 Result_Q22;Result_Q22=mix(Wire_Or_Blob_Q23,vec4(0.3,0.3,0.3,0.3),float(_Show_Frame_));vec4 Final_Color_Q37=NotEdge_Q35*Result_Q22;vec4 Out_Color=Final_Color_Q37;float Clip_Threshold=0.0;bool To_sRGB=false;gl_FragColor=Out_Color;}";h.ShaderStore.ShadersStore.fluentButtonVertexShader="uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;attribute vec3 tangent;attribute vec4 color;uniform float _Edge_Width_;uniform vec4 _Edge_Color_;uniform float _Proximity_Max_Intensity_;uniform float _Proximity_Far_Distance_;uniform float _Proximity_Near_Radius_;uniform float _Proximity_Anisotropy_;uniform float _Selection_Fuzz_;uniform float _Selected_;uniform float _Selection_Fade_;uniform float _Selection_Fade_Size_;uniform float _Selected_Distance_;uniform float _Selected_Fade_Length_;uniform bool _Blob_Enable_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Inner_Fade_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform sampler2D _Blob_Texture_;uniform bool _Blob_Enable_2_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Inner_Fade_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform vec3 _Active_Face_Dir_;uniform vec3 _Active_Face_Up_;uniform bool _Enable_Fade_;uniform float _Fade_Width_;uniform bool _Smooth_Active_Face_;uniform bool _Show_Frame_;uniform bool Use_Global_Left_Index;uniform bool Use_Global_Right_Index;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;uniform vec4 Global_Left_Thumb_Tip_Position;uniform vec4 Global_Right_Thumb_Tip_Position;uniform float Global_Left_Index_Tip_Proximity;uniform float Global_Right_Index_Tip_Proximity;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vColor;varying vec4 vExtra1;void Blob_Vertex_B47(\nvec3 Position,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nvec3 Blob_Position,\nfloat Intensity,\nfloat Blob_Near_Size,\nfloat Blob_Far_Size,\nfloat Blob_Near_Distance,\nfloat Blob_Far_Distance,\nvec4 Vx_Color,\nvec2 UV,\nvec3 Face_Center,\nvec2 Face_Size,\nvec2 In_UV,\nfloat Blob_Fade_Length,\nfloat Selection_Fade,\nfloat Selection_Fade_Size,\nfloat Inner_Fade,\nvec3 Active_Face_Center,\nfloat Blob_Pulse,\nfloat Blob_Fade,\nfloat Blob_Enabled,\nout vec3 Out_Position,\nout vec2 Out_UV,\nout vec3 Blob_Info)\n{float blobSize,fadeIn;vec3 Hit_Position;Blob_Info=vec3(0.0,0.0,0.0);float Hit_Distance=dot(Blob_Position-Face_Center,Normal);Hit_Position=Blob_Position-Hit_Distance*Normal;float absD=abs(Hit_Distance);float lerpVal=clamp((absD-Blob_Near_Distance)/(Blob_Far_Distance-Blob_Near_Distance),0.0,1.0);fadeIn=1.0-clamp((absD-Blob_Far_Distance)/Blob_Fade_Length,0.0,1.0);float innerFade=1.0-clamp(-Hit_Distance/Inner_Fade,0.0,1.0);float farClip=clamp(1.0-step(Blob_Far_Distance+Blob_Fade_Length,absD),0.0,1.0);float size=mix(Blob_Near_Size,Blob_Far_Size,lerpVal)*farClip;blobSize=mix(size,Selection_Fade_Size,Selection_Fade)*innerFade*Blob_Enabled;Blob_Info.x=lerpVal*0.5+0.5;Blob_Info.y=fadeIn*Intensity*(1.0-Selection_Fade)*Blob_Fade;Blob_Info.x*=(1.0-Blob_Pulse);vec3 delta=Hit_Position-Face_Center;vec2 blobCenterXY=vec2(dot(delta,Tangent),dot(delta,Bitangent));vec2 quadUVin=2.0*UV-1.0; \nvec2 blobXY=blobCenterXY+quadUVin*blobSize;vec2 blobClipped=clamp(blobXY,-Face_Size*0.5,Face_Size*0.5);vec2 blobUV=(blobClipped-blobCenterXY)/max(blobSize,0.0001)*2.0;vec3 blobCorner=Face_Center+blobClipped.x*Tangent+blobClipped.y*Bitangent;Out_Position=mix(Position,blobCorner,Vx_Color.rrr);Out_UV=mix(In_UV,blobUV,Vx_Color.rr);}\nvec2 ProjectProximity(\nvec3 blobPosition,\nvec3 position,\nvec3 center,\nvec3 dir,\nvec3 xdir,\nvec3 ydir,\nout float vdistance\n)\n{vec3 delta=blobPosition-position;vec2 xy=vec2(dot(delta,xdir),dot(delta,ydir));vdistance=abs(dot(delta,dir));return xy;}\nvoid Proximity_Vertex_B66(\nvec3 Blob_Position,\nvec3 Blob_Position_2,\nvec3 Active_Face_Center,\nvec3 Active_Face_Dir,\nvec3 Position,\nfloat Proximity_Far_Distance,\nfloat Relative_Scale,\nfloat Proximity_Anisotropy,\nvec3 Up,\nout vec4 Extra1,\nout float Distance_To_Face,\nout float Intensity)\n{vec3 Active_Face_Dir_X=normalize(cross(Active_Face_Dir,Up));vec3 Active_Face_Dir_Y=cross(Active_Face_Dir,Active_Face_Dir_X);float distz1,distz2;Extra1.xy=ProjectProximity(Blob_Position,Position,Active_Face_Center,Active_Face_Dir,Active_Face_Dir_X*Proximity_Anisotropy,Active_Face_Dir_Y,distz1)/Relative_Scale;Extra1.zw=ProjectProximity(Blob_Position_2,Position,Active_Face_Center,Active_Face_Dir,Active_Face_Dir_X*Proximity_Anisotropy,Active_Face_Dir_Y,distz2)/Relative_Scale;Distance_To_Face=dot(Active_Face_Dir,Position-Active_Face_Center);Intensity=1.0-clamp(min(distz1,distz2)/Proximity_Far_Distance,0.0,1.0);}\nvoid Holo_Edge_Vertex_B44(\nvec3 Incident,\nvec3 Normal,\nvec2 UV,\nvec3 Tangent,\nvec3 Bitangent,\nbool Smooth_Active_Face,\nfloat Active,\nout vec4 Holo_Edges)\n{float NdotI=dot(Incident,Normal);vec2 flip=(UV-vec2(0.5,0.5));float udot=dot(Incident,Tangent)*flip.x*NdotI;float uval=1.0-float(udot>0.0);float vdot=-dot(Incident,Bitangent)*flip.y*NdotI;float vval=1.0-float(vdot>0.0);float Smooth_And_Active=step(1.0,float(Smooth_Active_Face && Active>0.0));uval=mix(uval,max(1.0,uval),Smooth_And_Active); \nvval=mix(vval,max(1.0,vval),Smooth_And_Active);Holo_Edges=vec4(1.0,1.0,1.0,1.0)-vec4(uval*UV.x,uval*(1.0-UV.x),vval*UV.y,vval*(1.0-UV.y));}\nvoid Object_To_World_Pos_B13(\nvec3 Pos_Object,\nout vec3 Pos_World)\n{Pos_World=(world*vec4(Pos_Object,1.0)).xyz;}\nvoid Choose_Blob_B38(\nvec4 Vx_Color,\nvec3 Position1,\nvec3 Position2,\nbool Blob_Enable_1,\nbool Blob_Enable_2,\nfloat Near_Size_1,\nfloat Near_Size_2,\nfloat Blob_Inner_Fade_1,\nfloat Blob_Inner_Fade_2,\nfloat Blob_Pulse_1,\nfloat Blob_Pulse_2,\nfloat Blob_Fade_1,\nfloat Blob_Fade_2,\nout vec3 Position,\nout float Near_Size,\nout float Inner_Fade,\nout float Blob_Enable,\nout float Fade,\nout float Pulse)\n{Position=Position1*(1.0-Vx_Color.g)+Vx_Color.g*Position2;float b1=float(Blob_Enable_1);float b2=float(Blob_Enable_2);Blob_Enable=b1+(b2-b1)*Vx_Color.g;Pulse=Blob_Pulse_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Pulse_2;Fade=Blob_Fade_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Fade_2;Near_Size=Near_Size_1*(1.0-Vx_Color.g)+Vx_Color.g*Near_Size_2;Inner_Fade=Blob_Inner_Fade_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Inner_Fade_2;}\nvoid Wireframe_Vertex_B51(\nvec3 Position,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nfloat Edge_Width,\nvec2 Face_Size,\nout vec3 Wire_Vx_Pos,\nout vec2 UV,\nout vec2 Widths)\n{Widths.xy=Edge_Width/Face_Size;float x=dot(Position,Tangent);float y=dot(Position,Bitangent);float dx=0.5-abs(x);float newx=(0.5-dx*Widths.x*2.0)*sign(x);float dy=0.5-abs(y);float newy=(0.5-dy*Widths.y*2.0)*sign(y);Wire_Vx_Pos=Normal*0.5+newx*Tangent+newy*Bitangent;UV.x=dot(Wire_Vx_Pos,Tangent)+0.5;UV.y=dot(Wire_Vx_Pos,Bitangent)+0.5;}\nvec2 ramp2(vec2 start,vec2 end,vec2 x)\n{return clamp((x-start)/(end-start),vec2(0.0,0.0),vec2(1.0,1.0));}\nfloat computeSelection(\nvec3 blobPosition,\nvec3 normal,\nvec3 tangent,\nvec3 bitangent,\nvec3 faceCenter,\nvec2 faceSize,\nfloat selectionFuzz,\nfloat farDistance,\nfloat fadeLength\n)\n{vec3 delta=blobPosition-faceCenter;float absD=abs(dot(delta,normal));float fadeIn=1.0-clamp((absD-farDistance)/fadeLength,0.0,1.0);vec2 blobCenterXY=vec2(dot(delta,tangent),dot(delta,bitangent));vec2 innerFace=faceSize*(1.0-selectionFuzz)*0.5;vec2 selectPulse=ramp2(-faceSize*0.5,-innerFace,blobCenterXY)-ramp2(innerFace,faceSize*0.5,blobCenterXY);return selectPulse.x*selectPulse.y*fadeIn;}\nvoid Selection_Vertex_B48(\nvec3 Blob_Position,\nvec3 Blob_Position_2,\nvec3 Face_Center,\nvec2 Face_Size,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nfloat Selection_Fuzz,\nfloat Selected,\nfloat Far_Distance,\nfloat Fade_Length,\nvec3 Active_Face_Dir,\nout float Show_Selection)\n{float select1=computeSelection(Blob_Position,Normal,Tangent,Bitangent,Face_Center,Face_Size,Selection_Fuzz,Far_Distance,Fade_Length);float select2=computeSelection(Blob_Position_2,Normal,Tangent,Bitangent,Face_Center,Face_Size,Selection_Fuzz,Far_Distance,Fade_Length);float Active=max(0.0,dot(Active_Face_Dir,Normal));Show_Selection=mix(max(select1,select2),1.0,Selected)*Active;}\nvoid Proximity_Visibility_B54(\nfloat Selection,\nvec3 Proximity_Center,\nvec3 Proximity_Center_2,\nfloat Input_Width,\nfloat Proximity_Far_Distance,\nfloat Proximity_Radius,\nvec3 Active_Face_Center,\nvec3 Active_Face_Dir,\nout float Width)\n{vec3 boxEdges=(world*vec4(vec3(0.5,0.5,0.5),0.0)).xyz;float boxMaxSize=length(boxEdges);float d1=dot(Proximity_Center-Active_Face_Center,Active_Face_Dir);vec3 blob1=Proximity_Center-d1*Active_Face_Dir;float d2=dot(Proximity_Center_2-Active_Face_Center,Active_Face_Dir);vec3 blob2=Proximity_Center_2-d2*Active_Face_Dir;vec3 delta1=blob1-Active_Face_Center;vec3 delta2=blob2-Active_Face_Center;float dist1=dot(delta1,delta1);float dist2=dot(delta2,delta2);float nearestProxDist=sqrt(min(dist1,dist2));Width=Input_Width*(1.0-step(boxMaxSize+Proximity_Radius,nearestProxDist))*(1.0-step(Proximity_Far_Distance,min(d1,d2))*(1.0-step(0.0001,Selection)));}\nvoid Object_To_World_Dir_B67(\nvec3 Dir_Object,\nout vec3 Dir_World)\n{Dir_World=(world*vec4(Dir_Object,0.0)).xyz;}\nvoid main()\n{vec3 Active_Face_Center_Q49;Active_Face_Center_Q49=(world*vec4(_Active_Face_Dir_*0.5,1.0)).xyz;vec3 Blob_Position_Q41= mix(_Blob_Position_,Global_Left_Index_Tip_Position.xyz,float(Use_Global_Left_Index));vec3 Blob_Position_Q42= mix(_Blob_Position_2_,Global_Right_Index_Tip_Position.xyz,float(Use_Global_Right_Index));vec3 Active_Face_Dir_Q64=normalize((world*vec4(_Active_Face_Dir_,0.0)).xyz);float Relative_Scale_Q57;\n#if RELATIVE_WIDTH\nRelative_Scale_Q57=length((world*vec4(vec3(0,1,0),0.0)).xyz);\n#else\nRelative_Scale_Q57=1.0;\n#endif\nvec3 Tangent_World_Q30;Tangent_World_Q30=(world*vec4(tangent,0.0)).xyz;vec3 Binormal_World_Q31;Binormal_World_Q31=(world*vec4((cross(normal,tangent)),0.0)).xyz;vec3 Normal_World_Q60;Normal_World_Q60=(world*vec4(normal,0.0)).xyz;vec3 Result_Q18=0.5*normal;vec3 Dir_World_Q67;Object_To_World_Dir_B67(_Active_Face_Up_,Dir_World_Q67);float Product_Q56=_Edge_Width_*Relative_Scale_Q57;vec3 Normal_World_N_Q29=normalize(Normal_World_Q60);vec3 Tangent_World_N_Q28=normalize(Tangent_World_Q30);vec3 Binormal_World_N_Q32=normalize(Binormal_World_Q31);vec3 Position_Q38;float Near_Size_Q38;float Inner_Fade_Q38;float Blob_Enable_Q38;float Fade_Q38;float Pulse_Q38;Choose_Blob_B38(color,Blob_Position_Q41,Blob_Position_Q42,_Blob_Enable_,_Blob_Enable_2_,_Blob_Near_Size_,_Blob_Near_Size_2_,_Blob_Inner_Fade_,_Blob_Inner_Fade_2_,_Blob_Pulse_,_Blob_Pulse_2_,_Blob_Fade_,_Blob_Fade_2_,Position_Q38,Near_Size_Q38,Inner_Fade_Q38,Blob_Enable_Q38,Fade_Q38,Pulse_Q38);vec3 Face_Center_Q33;Face_Center_Q33=(world*vec4(Result_Q18,1.0)).xyz;vec2 Face_Size_Q50=vec2(length(Tangent_World_Q30),length(Binormal_World_Q31));float Show_Selection_Q48;Selection_Vertex_B48(Blob_Position_Q41,Blob_Position_Q42,Face_Center_Q33,Face_Size_Q50,Normal_World_N_Q29,Tangent_World_N_Q28,Binormal_World_N_Q32,_Selection_Fuzz_,_Selected_,_Selected_Distance_,_Selected_Fade_Length_,Active_Face_Dir_Q64,Show_Selection_Q48);vec3 Normalized_Q72=normalize(Dir_World_Q67);float Active_Q34=max(0.0,dot(Active_Face_Dir_Q64,Normal_World_N_Q29));float Width_Q54;Proximity_Visibility_B54(Show_Selection_Q48,Blob_Position_Q41,Blob_Position_Q42,Product_Q56,_Proximity_Far_Distance_,_Proximity_Near_Radius_,Active_Face_Center_Q49,Active_Face_Dir_Q64,Width_Q54);vec3 Wire_Vx_Pos_Q51;vec2 UV_Q51;vec2 Widths_Q51;Wireframe_Vertex_B51(position,normal,tangent,(cross(normal,tangent)),Width_Q54,Face_Size_Q50,Wire_Vx_Pos_Q51,UV_Q51,Widths_Q51);vec3 Vec3_Q27=vec3(Widths_Q51.x,Widths_Q51.y,color.r);vec3 Pos_World_Q13;Object_To_World_Pos_B13(Wire_Vx_Pos_Q51,Pos_World_Q13);vec3 Incident_Q36=normalize(Pos_World_Q13-cameraPosition);vec3 Out_Position_Q47;vec2 Out_UV_Q47;vec3 Blob_Info_Q47;Blob_Vertex_B47(Pos_World_Q13,Normal_World_N_Q29,Tangent_World_N_Q28,Binormal_World_N_Q32,Position_Q38,_Blob_Intensity_,Near_Size_Q38,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,color,uv,Face_Center_Q33,Face_Size_Q50,UV_Q51,_Blob_Fade_Length_,_Selection_Fade_,_Selection_Fade_Size_,Inner_Fade_Q38,Active_Face_Center_Q49,Pulse_Q38,Fade_Q38,Blob_Enable_Q38,Out_Position_Q47,Out_UV_Q47,Blob_Info_Q47);vec4 Extra1_Q66;float Distance_To_Face_Q66;float Intensity_Q66;Proximity_Vertex_B66(Blob_Position_Q41,Blob_Position_Q42,Active_Face_Center_Q49,Active_Face_Dir_Q64,Pos_World_Q13,_Proximity_Far_Distance_,Relative_Scale_Q57,_Proximity_Anisotropy_,Normalized_Q72,Extra1_Q66,Distance_To_Face_Q66,Intensity_Q66);vec4 Holo_Edges_Q44;Holo_Edge_Vertex_B44(Incident_Q36,Normal_World_N_Q29,uv,Tangent_World_Q30,Binormal_World_Q31,_Smooth_Active_Face_,Active_Q34,Holo_Edges_Q44);vec3 Vec3_Q19=vec3(Show_Selection_Q48,Distance_To_Face_Q66,Intensity_Q66);vec3 Position=Out_Position_Q47;vec2 UV=Out_UV_Q47;vec3 Tangent=Blob_Info_Q47;vec3 Binormal=Vec3_Q19;vec3 Normal=Vec3_Q27;vec4 Extra1=Extra1_Q66;vec4 Color=Holo_Edges_Q44;gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vColor=Color;vExtra1=Extra1;}";var Ot=function(t){function e(){var e=t.call(this)||this;return e.RELATIVE_WIDTH=!0,e.ENABLE_FADE=!0,e._needNormals=!0,e._needUVs=!0,e.rebuild(),e}return n(e,t),e}(h.MaterialDefines),Rt=function(t){function e(i,o){var r=t.call(this,i,o)||this;return r.edgeWidth=.04,r.edgeColor=new h.Color4(.592157,.592157,.592157,1),r.proximityMaxIntensity=.45,r.proximityFarDistance=.16,r.proximityNearRadius=1.5,r.proximityAnisotropy=1,r.selectionFuzz=.5,r.selected=0,r.selectionFade=0,r.selectionFadeSize=.3,r.selectedDistance=.08,r.selectedFadeLength=.08,r.blobIntensity=.5,r.blobFarSize=.05,r.blobNearDistance=0,r.blobFarDistance=.08,r.blobFadeLength=.08,r.leftBlobEnable=!0,r.leftBlobNearSize=.025,r.leftBlobPulse=0,r.leftBlobFade=1,r.leftBlobInnerFade=.01,r.rightBlobEnable=!0,r.rightBlobNearSize=.025,r.rightBlobPulse=0,r.rightBlobFade=1,r.rightBlobInnerFade=.01,r.activeFaceDir=new h.Vector3(0,0,-1),r.activeFaceUp=new h.Vector3(0,1,0),r.enableFade=!0,r.fadeWidth=1.5,r.smoothActiveFace=!0,r.showFrame=!1,r.useBlobTexture=!0,r.globalLeftIndexTipPosition=h.Vector3.Zero(),r.globalRightIndexTipPosition=h.Vector3.Zero(),r.alphaMode=h.Constants.ALPHA_ADD,r.disableDepthWrite=!0,r.backFaceCulling=!1,r._blobTexture=new h.Texture(e.BLOB_TEXTURE_URL,r.getScene(),!0,!1,h.Texture.NEAREST_SAMPLINGMODE),r}return n(e,t),e.prototype.needAlphaBlending=function(){return!0},e.prototype.needAlphaTesting=function(){return!0},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new Ot);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,h.PrepareDefinesForAttributes)(t,o,!0,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new h.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,h.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[h.VertexBuffer.PositionKind];o.NORMAL&&s.push(h.VertexBuffer.NormalKind),o.UV1&&s.push(h.VertexBuffer.UVKind),o.UV2&&s.push(h.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(h.VertexBuffer.ColorKind),o.TANGENT&&s.push(h.VertexBuffer.TangentKind),(0,h.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","viewProjection","cameraPosition","_Edge_Width_","_Edge_Color_","_Relative_Width_","_Proximity_Max_Intensity_","_Proximity_Far_Distance_","_Proximity_Near_Radius_","_Proximity_Anisotropy_","_Selection_Fuzz_","_Selected_","_Selection_Fade_","_Selection_Fade_Size_","_Selected_Distance_","_Selected_Fade_Length_","_Blob_Enable_","_Blob_Position_","_Blob_Intensity_","_Blob_Near_Size_","_Blob_Far_Size_","_Blob_Near_Distance_","_Blob_Far_Distance_","_Blob_Fade_Length_","_Blob_Inner_Fade_","_Blob_Pulse_","_Blob_Fade_","_Blob_Texture_","_Blob_Enable_2_","_Blob_Position_2_","_Blob_Near_Size_2_","_Blob_Inner_Fade_2_","_Blob_Pulse_2_","_Blob_Fade_2_","_Active_Face_Dir_","_Active_Face_Up_","_Enable_Fade_","_Fade_Width_","_Smooth_Active_Face_","_Show_Frame_","_Use_Blob_Texture_","Use_Global_Left_Index","Use_Global_Right_Index","Global_Left_Index_Tip_Position","Global_Right_Index_Tip_Position","Global_Left_Thumb_Tip_Position","Global_Right_Thumb_Tip_Position","Global_Left_Index_Tip_Proximity","Global_Right_Index_Tip_Proximity"],c=["_Blob_Texture_"],u=[];(0,h.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("fluentButton",{attributes:s,uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o,this._materialContext)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){var o=this.getScene();if(i.materialDefines){var r=i.effect;r&&(this._activeEffect=r,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",o.getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",o.activeCamera.position),this._activeEffect.setTexture("_Blob_Texture_",this._blobTexture),this._activeEffect.setFloat("_Edge_Width_",this.edgeWidth),this._activeEffect.setColor4("_Edge_Color_",new h.Color3(this.edgeColor.r,this.edgeColor.g,this.edgeColor.b),this.edgeColor.a),this._activeEffect.setFloat("_Proximity_Max_Intensity_",this.proximityMaxIntensity),this._activeEffect.setFloat("_Proximity_Far_Distance_",this.proximityFarDistance),this._activeEffect.setFloat("_Proximity_Near_Radius_",this.proximityNearRadius),this._activeEffect.setFloat("_Proximity_Anisotropy_",this.proximityAnisotropy),this._activeEffect.setFloat("_Selection_Fuzz_",this.selectionFuzz),this._activeEffect.setFloat("_Selected_",this.selected),this._activeEffect.setFloat("_Selection_Fade_",this.selectionFade),this._activeEffect.setFloat("_Selection_Fade_Size_",this.selectionFadeSize),this._activeEffect.setFloat("_Selected_Distance_",this.selectedDistance),this._activeEffect.setFloat("_Selected_Fade_Length_",this.selectedFadeLength),this._activeEffect.setFloat("_Blob_Enable_",this.leftBlobEnable?1:0),this._activeEffect.setFloat("_Blob_Intensity_",this.blobIntensity),this._activeEffect.setFloat("_Blob_Near_Size_",this.leftBlobNearSize),this._activeEffect.setFloat("_Blob_Far_Size_",this.blobFarSize),this._activeEffect.setFloat("_Blob_Near_Distance_",this.blobNearDistance),this._activeEffect.setFloat("_Blob_Far_Distance_",this.blobFarDistance),this._activeEffect.setFloat("_Blob_Fade_Length_",this.blobFadeLength),this._activeEffect.setFloat("_Blob_Inner_Fade_",this.leftBlobInnerFade),this._activeEffect.setFloat("_Blob_Pulse_",this.leftBlobPulse),this._activeEffect.setFloat("_Blob_Fade_",this.leftBlobFade),this._activeEffect.setFloat("_Blob_Enable_2_",this.rightBlobEnable?1:0),this._activeEffect.setFloat("_Blob_Near_Size_2_",this.rightBlobNearSize),this._activeEffect.setFloat("_Blob_Inner_Fade_2_",this.rightBlobInnerFade),this._activeEffect.setFloat("_Blob_Pulse_2_",this.rightBlobPulse),this._activeEffect.setFloat("_Blob_Fade_2_",this.rightBlobFade),this._activeEffect.setVector3("_Active_Face_Dir_",this.activeFaceDir),this._activeEffect.setVector3("_Active_Face_Up_",this.activeFaceUp),this._activeEffect.setFloat("_Fade_Width_",this.fadeWidth),this._activeEffect.setFloat("_Smooth_Active_Face_",this.smoothActiveFace?1:0),this._activeEffect.setFloat("_Show_Frame_",this.showFrame?1:0),this._activeEffect.setFloat("_Use_Blob_Texture_",this.useBlobTexture?1:0),this._activeEffect.setFloat("Use_Global_Left_Index",1),this._activeEffect.setFloat("Use_Global_Right_Index",1),this._activeEffect.setVector4("Global_Left_Index_Tip_Position",new h.Vector4(this.globalLeftIndexTipPosition.x,this.globalLeftIndexTipPosition.y,this.globalLeftIndexTipPosition.z,1)),this._activeEffect.setVector4("Global_Right_Index_Tip_Position",new h.Vector4(this.globalRightIndexTipPosition.x,this.globalRightIndexTipPosition.y,this.globalRightIndexTipPosition.z,1)),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e)},e.prototype.clone=function(t){var i=this;return h.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var e=t.prototype.serialize.call(this);return e.customType="BABYLON.FluentButtonMaterial",e},e.prototype.getClassName=function(){return"FluentButtonMaterial"},e.Parse=function(t,i,o){return h.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},e.BLOB_TEXTURE_URL="https://assets.babylonjs.com/meshes/MRTK/mrtk-fluent-button-blob.png",s([(0,h.serialize)()],e.prototype,"edgeWidth",void 0),s([(0,h.serializeAsColor4)()],e.prototype,"edgeColor",void 0),s([(0,h.serialize)()],e.prototype,"proximityMaxIntensity",void 0),s([(0,h.serialize)()],e.prototype,"proximityFarDistance",void 0),s([(0,h.serialize)()],e.prototype,"proximityNearRadius",void 0),s([(0,h.serialize)()],e.prototype,"proximityAnisotropy",void 0),s([(0,h.serialize)()],e.prototype,"selectionFuzz",void 0),s([(0,h.serialize)()],e.prototype,"selected",void 0),s([(0,h.serialize)()],e.prototype,"selectionFade",void 0),s([(0,h.serialize)()],e.prototype,"selectionFadeSize",void 0),s([(0,h.serialize)()],e.prototype,"selectedDistance",void 0),s([(0,h.serialize)()],e.prototype,"selectedFadeLength",void 0),s([(0,h.serialize)()],e.prototype,"blobIntensity",void 0),s([(0,h.serialize)()],e.prototype,"blobFarSize",void 0),s([(0,h.serialize)()],e.prototype,"blobNearDistance",void 0),s([(0,h.serialize)()],e.prototype,"blobFarDistance",void 0),s([(0,h.serialize)()],e.prototype,"blobFadeLength",void 0),s([(0,h.serialize)()],e.prototype,"leftBlobEnable",void 0),s([(0,h.serialize)()],e.prototype,"leftBlobNearSize",void 0),s([(0,h.serialize)()],e.prototype,"leftBlobPulse",void 0),s([(0,h.serialize)()],e.prototype,"leftBlobFade",void 0),s([(0,h.serialize)()],e.prototype,"leftBlobInnerFade",void 0),s([(0,h.serialize)()],e.prototype,"rightBlobEnable",void 0),s([(0,h.serialize)()],e.prototype,"rightBlobNearSize",void 0),s([(0,h.serialize)()],e.prototype,"rightBlobPulse",void 0),s([(0,h.serialize)()],e.prototype,"rightBlobFade",void 0),s([(0,h.serialize)()],e.prototype,"rightBlobInnerFade",void 0),s([(0,h.serializeAsVector3)()],e.prototype,"activeFaceDir",void 0),s([(0,h.serializeAsVector3)()],e.prototype,"activeFaceUp",void 0),s([(0,h.serialize)()],e.prototype,"enableFade",void 0),s([(0,h.serialize)()],e.prototype,"fadeWidth",void 0),s([(0,h.serialize)()],e.prototype,"smoothActiveFace",void 0),s([(0,h.serialize)()],e.prototype,"showFrame",void 0),s([(0,h.serialize)()],e.prototype,"useBlobTexture",void 0),s([(0,h.serializeAsVector3)()],e.prototype,"globalLeftIndexTipPosition",void 0),s([(0,h.serializeAsVector3)()],e.prototype,"globalRightIndexTipPosition",void 0),e}(h.PushMaterial);(0,h.RegisterClass)("BABYLON.GUI.FluentButtonMaterial",Rt);var wt=function(t){function e(e,i){var o=t.call(this,e)||this;return o._isNearPressed=!1,o._interactionSurfaceHeight=0,o._isToggleButton=!1,o._toggleState=!1,o._toggleButtonCallback=function(){o._onToggle(!o._toggleState)},o.onToggleObservable=new h.Observable,o.collidableFrontDirection=h.Vector3.Zero(),i&&(o.collisionMesh=i),o}return n(e,t),Object.defineProperty(e.prototype,"isActiveNearInteraction",{get:function(){return this._isNearPressed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"collidableFrontDirection",{get:function(){if(this._collisionMesh){var t=h.TmpVectors.Vector3[0];return h.Vector3.TransformNormalToRef(this._collidableFrontDirection,this._collisionMesh.getWorldMatrix(),t),t.normalize()}return this._collidableFrontDirection},set:function(t){if(this._collidableFrontDirection=t.normalize(),this._collisionMesh){var e=h.TmpVectors.Matrix[0];e.copyFrom(this._collisionMesh.getWorldMatrix()),e.invert(),h.Vector3.TransformNormalToRef(this._collidableFrontDirection,e,this._collidableFrontDirection),this._collidableFrontDirection.normalize()}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"collisionMesh",{set:function(t){var e,i=this;this._collisionMesh&&(this._collisionMesh.isNearPickable=!1,(null===(e=this._collisionMesh.reservedDataStore)||void 0===e?void 0:e.GUI3D)&&(this._collisionMesh.reservedDataStore.GUI3D={}),this._collisionMesh.getChildMeshes().forEach((function(t){var e;t.isNearPickable=!1,(null===(e=t.reservedDataStore)||void 0===e?void 0:e.GUI3D)&&(t.reservedDataStore.GUI3D={})}))),this._collisionMesh=t,this._injectGUI3DReservedDataStore(this._collisionMesh).control=this,this._collisionMesh.isNearPickable=!0,this._collisionMesh.getChildMeshes().forEach((function(t){i._injectGUI3DReservedDataStore(t).control=i,t.isNearPickable=!0})),this.collidableFrontDirection=t.forward},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isToggleButton",{get:function(){return this._isToggleButton},set:function(t){t!==this._isToggleButton&&(this._isToggleButton=t,t?this.onPointerUpObservable.add(this._toggleButtonCallback):(this.onPointerUpObservable.removeCallback(this._toggleButtonCallback),this._toggleState&&this._onToggle(!1)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isToggled",{get:function(){return this._toggleState},set:function(t){this._isToggleButton&&this._toggleState!==t&&this._onToggle(t)},enumerable:!1,configurable:!0}),e.prototype._onToggle=function(t){this._toggleState=t,this.onToggleObservable.notifyObservers(t)},e.prototype._isInteractionInFrontOfButton=function(t){return this._getInteractionHeight(t,this._collisionMesh.getAbsolutePosition())>0},e.prototype.getPressDepth=function(t){if(!this._isNearPressed)return 0;var e=this._getInteractionHeight(t,this._collisionMesh.getAbsolutePosition());return this._interactionSurfaceHeight-e},e.prototype._getInteractionHeight=function(t,e){var i=this.collidableFrontDirection;if(0===i.length())return h.Vector3.Distance(t,e);var o=h.Vector3.Dot(e,i);return h.Vector3.Dot(t,i)-o},e.prototype._generatePointerEventType=function(t,e,i){if(t===h.PointerEventTypes.POINTERDOWN||t===h.PointerEventTypes.POINTERMOVE){if(!this._isInteractionInFrontOfButton(e))return h.PointerEventTypes.POINTERMOVE;this._isNearPressed=!0,this._interactionSurfaceHeight=this._getInteractionHeight(e,this._collisionMesh.getAbsolutePosition())}if(t===h.PointerEventTypes.POINTERUP){if(0==i)return h.PointerEventTypes.POINTERMOVE;this._isNearPressed=!1}return t},e.prototype._getTypeName=function(){return"TouchButton3D"},e.prototype._createNode=function(e){return t.prototype._createNode.call(this,e)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.onPointerUpObservable.removeCallback(this._toggleButtonCallback),this.onToggleObservable.clear(),this._collisionMesh&&this._collisionMesh.dispose()},e}(gt),Mt=function(t){function e(e,i){void 0===i&&(i=!0);var o=t.call(this,e)||this;return o._shareMaterials=!0,o._isBackplateVisible=!0,o._frontPlateDepth=.5,o._backPlateDepth=.04,o._backplateColor=new h.Color3(.08,.15,.55),o._backplateToggledColor=new h.Color3(.25,.4,.95),o._shareMaterials=i,o.pointerEnterAnimation=function(){o._frontMaterial.leftBlobEnable=!0,o._frontMaterial.rightBlobEnable=!0},o.pointerOutAnimation=function(){o._frontMaterial.leftBlobEnable=!1,o._frontMaterial.rightBlobEnable=!1},o.pointerDownAnimation=function(){o._frontPlate&&!o.isActiveNearInteraction&&(o._frontPlate.scaling.z=.2*o._frontPlateDepth,o._frontPlate.position=h.Vector3.Forward(o._frontPlate._scene.useRightHandedSystem).scale((o._frontPlateDepth-.2*o._frontPlateDepth)/2),o._textPlate.position=h.Vector3.Forward(o._textPlate._scene.useRightHandedSystem).scale(-(o._backPlateDepth+.2*o._frontPlateDepth)/2))},o.pointerUpAnimation=function(){o._frontPlate&&(o._frontPlate.scaling.z=o._frontPlateDepth,o._frontPlate.position=h.Vector3.Forward(o._frontPlate._scene.useRightHandedSystem).scale((o._frontPlateDepth-o._frontPlateDepth)/2),o._textPlate.position=h.Vector3.Forward(o._textPlate._scene.useRightHandedSystem).scale(-(o._backPlateDepth+o._frontPlateDepth)/2))},o.onPointerMoveObservable.add((function(t){if(o._frontPlate&&o.isActiveNearInteraction){var e=h.Vector3.Zero();if(o._backPlate.getWorldMatrix().decompose(e,void 0,void 0)){var i=o._getInteractionHeight(t,o._backPlate.getAbsolutePosition())/e.z;i=h.Scalar.Clamp(i-o._backPlateDepth/2,.2*o._frontPlateDepth,o._frontPlateDepth),o._frontPlate.scaling.z=i,o._frontPlate.position=h.Vector3.Forward(o._frontPlate._scene.useRightHandedSystem).scale((o._frontPlateDepth-i)/2),o._textPlate.position=h.Vector3.Forward(o._textPlate._scene.useRightHandedSystem).scale(-(o._backPlateDepth+i)/2)}}})),o._pointerHoverObserver=o.onPointerMoveObservable.add((function(t){o._frontMaterial.globalLeftIndexTipPosition=t})),o}return n(e,t),e.prototype._disposeTooltip=function(){this._tooltipFade=null,this._tooltipTextBlock&&this._tooltipTextBlock.dispose(),this._tooltipTexture&&this._tooltipTexture.dispose(),this._tooltipMesh&&this._tooltipMesh.dispose(),this.onPointerEnterObservable.remove(this._tooltipHoverObserver),this.onPointerOutObservable.remove(this._tooltipOutObserver)},Object.defineProperty(e.prototype,"renderingGroupId",{get:function(){return this._backPlate.renderingGroupId},set:function(t){this._backPlate.renderingGroupId=t,this._textPlate.renderingGroupId=t,this._frontPlate.renderingGroupId=t,this._tooltipMesh&&(this._tooltipMesh.renderingGroupId=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mesh",{get:function(){return this._backPlate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tooltipText",{get:function(){return this._tooltipTextBlock?this._tooltipTextBlock.text:null},set:function(t){var e=this;if(t){if(!this._tooltipFade){var i=this._backPlate._scene.useRightHandedSystem;this._tooltipMesh=(0,h.CreatePlane)("",{size:1},this._backPlate._scene);var o=(0,h.CreatePlane)("",{size:1,sideOrientation:h.Mesh.DOUBLESIDE},this._backPlate._scene),r=new h.StandardMaterial("",this._backPlate._scene);r.diffuseColor=h.Color3.FromHexString("#212121"),o.material=r,o.isPickable=!1,this._tooltipMesh.addChild(o),o.position=h.Vector3.Forward(i).scale(.05),this._tooltipMesh.scaling.y=1/3,this._tooltipMesh.position=h.Vector3.Up().scale(.7).add(h.Vector3.Forward(i).scale(-.15)),this._tooltipMesh.isPickable=!1,this._tooltipMesh.parent=this._backPlate,this._tooltipTexture=lt.CreateForMesh(this._tooltipMesh),this._tooltipTextBlock=new B,this._tooltipTextBlock.scaleY=3,this._tooltipTextBlock.color="white",this._tooltipTextBlock.fontSize=130,this._tooltipTexture.addControl(this._tooltipTextBlock),this._tooltipFade=new h.FadeInOutBehavior,this._tooltipFade.delay=500,this._tooltipMesh.addBehavior(this._tooltipFade),this._tooltipHoverObserver=this.onPointerEnterObservable.add((function(){e._tooltipFade&&e._tooltipFade.fadeIn(!0)})),this._tooltipOutObserver=this.onPointerOutObservable.add((function(){e._tooltipFade&&e._tooltipFade.fadeIn(!1)}))}this._tooltipTextBlock&&(this._tooltipTextBlock.text=t)}else this._disposeTooltip()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){this._text!==t&&(this._text=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageUrl",{get:function(){return this._imageUrl},set:function(t){this._imageUrl!==t&&(this._imageUrl=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backMaterial",{get:function(){return this._backMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frontMaterial",{get:function(){return this._frontMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"plateMaterial",{get:function(){return this._plateMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shareMaterials",{get:function(){return this._shareMaterials},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isBackplateVisible",{set:function(t){this.mesh&&this._backMaterial&&(t&&!this._isBackplateVisible?this._backPlate.visibility=1:!t&&this._isBackplateVisible&&(this._backPlate.visibility=0)),this._isBackplateVisible=t},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"TouchHolographicButton"},e.prototype._rebuildContent=function(){this._disposeFacadeTexture();var t=new S;if(t.isVertical=!0,(0,h.IsDocumentAvailable)()&&document.createElement&&this._imageUrl){var e=new C;e.source=this._imageUrl,e.paddingTop="40px",e.height="180px",e.width="100px",e.paddingBottom="40px",t.addControl(e)}if(this._text){var i=new B;i.text=this._text,i.color="white",i.height="30px",i.fontSize=24,t.addControl(i)}this.content=t},e.prototype._createNode=function(i){var o,r=this;this.name=null!==(o=this.name)&&void 0!==o?o:"TouchHolographicButton";var n=(0,h.CreateBox)("".concat(this.name,"_collisionMesh"),{width:1,height:1,depth:this._frontPlateDepth},i);n.isPickable=!0,n.isNearPickable=!0,n.visibility=0,n.position=h.Vector3.Forward(i.useRightHandedSystem).scale(-this._frontPlateDepth/2),h.SceneLoader.ImportMeshAsync(void 0,e.MODEL_BASE_URL,e.MODEL_FILENAME,i).then((function(t){var e=(0,h.CreateBox)("${this.name}_alphaMesh",{width:1,height:1,depth:1},i);e.isPickable=!1,e.material=new h.StandardMaterial("${this.name}_alphaMesh_material",i),e.material.alpha=.15;var o=t.meshes[1];o.name="".concat(r.name,"_frontPlate"),o.isPickable=!1,o.scaling.z=r._frontPlateDepth,e.parent=o,o.parent=n,r._frontMaterial&&(o.material=r._frontMaterial),r._frontPlate=o})),this._backPlate=(0,h.CreateBox)("".concat(this.name,"_backPlate"),{width:1,height:1,depth:this._backPlateDepth},i),this._backPlate.position=h.Vector3.Forward(i.useRightHandedSystem).scale(this._backPlateDepth/2),this._backPlate.isPickable=!1,this._textPlate=t.prototype._createNode.call(this,i),this._textPlate.name="".concat(this.name,"_textPlate"),this._textPlate.isPickable=!1,this._textPlate.position=h.Vector3.Forward(i.useRightHandedSystem).scale(-this._frontPlateDepth/2),this._backPlate.addChild(n),this._backPlate.addChild(this._textPlate);var a=new h.TransformNode("{this.name}_root",i);return this._backPlate.setParent(a),this.collisionMesh=n,this.collidableFrontDirection=this._backPlate.forward.negate(),a},e.prototype._applyFacade=function(t){this._plateMaterial.emissiveTexture=t,this._plateMaterial.opacityTexture=t,this._plateMaterial.diffuseColor=new h.Color3(.4,.4,.4)},e.prototype._createBackMaterial=function(t){this._backMaterial=new xt(this.name+"backPlateMaterial",t.getScene()),this._backMaterial.albedoColor=this._backplateColor,this._backMaterial.renderBorders=!0,this._backMaterial.renderHoverLight=!1},e.prototype._createFrontMaterial=function(t){this._frontMaterial=new Rt(this.name+"Front Material",t.getScene())},e.prototype._createPlateMaterial=function(t){this._plateMaterial=new h.StandardMaterial(this.name+"Plate Material",t.getScene()),this._plateMaterial.specularColor=h.Color3.Black()},e.prototype._onToggle=function(e){this._backMaterial&&(this._backMaterial.albedoColor=e?this._backplateToggledColor:this._backplateColor),t.prototype._onToggle.call(this,e)},e.prototype._affectMaterial=function(t){this._shareMaterials?(this._host._touchSharedMaterials.backFluentMaterial?this._backMaterial=this._host._touchSharedMaterials.backFluentMaterial:(this._createBackMaterial(t),this._host._touchSharedMaterials.backFluentMaterial=this._backMaterial),this._host._touchSharedMaterials.frontFluentMaterial?this._frontMaterial=this._host._touchSharedMaterials.frontFluentMaterial:(this._createFrontMaterial(t),this._host._touchSharedMaterials.frontFluentMaterial=this._frontMaterial)):(this._createBackMaterial(t),this._createFrontMaterial(t)),this._createPlateMaterial(t),this._backPlate.material=this._backMaterial,this._textPlate.material=this._plateMaterial,this._isBackplateVisible||(this._backPlate.visibility=0),this._frontPlate&&(this._frontPlate.material=this._frontMaterial),this._rebuildContent()},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._disposeTooltip(),this.onPointerMoveObservable.remove(this._pointerHoverObserver),this.shareMaterials||(this._backMaterial.dispose(),this._frontMaterial.dispose(),this._plateMaterial.dispose(),this._pickedPointObserver&&(this._host.onPickedPointChangedObservable.remove(this._pickedPointObserver),this._pickedPointObserver=null))},e.MODEL_BASE_URL="https://assets.babylonjs.com/meshes/MRTK/",e.MODEL_FILENAME="mrtk-fluent-button.glb",e}(wt),Et=function(){function t(){this.followBehaviorEnabled=!1,this.sixDofDragBehaviorEnabled=!0,this.surfaceMagnetismBehaviorEnabled=!0,this._followBehavior=new h.FollowBehavior,this._sixDofDragBehavior=new h.SixDofDragBehavior,this._surfaceMagnetismBehavior=new h.SurfaceMagnetismBehavior}return Object.defineProperty(t.prototype,"name",{get:function(){return"Default"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"followBehavior",{get:function(){return this._followBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sixDofDragBehavior",{get:function(){return this._sixDofDragBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surfaceMagnetismBehavior",{get:function(){return this._surfaceMagnetismBehavior},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.attach=function(t,e,i){this._scene=t.getScene(),this.attachedNode=t,this._addObservables(),this._followBehavior.attach(t),this._sixDofDragBehavior.attach(t),this._sixDofDragBehavior.draggableMeshes=e||null,this._sixDofDragBehavior.faceCameraOnDragStart=!0,this._surfaceMagnetismBehavior.attach(t,this._scene),i&&(this._surfaceMagnetismBehavior.meshes=i),this._surfaceMagnetismBehavior.enabled=!1},t.prototype.detach=function(){this.attachedNode=null,this._removeObservables(),this._followBehavior.detach(),this._sixDofDragBehavior.detach(),this._surfaceMagnetismBehavior.detach()},t.prototype._addObservables=function(){var t=this;this._onBeforeRenderObserver=this._scene.onBeforeRenderObservable.add((function(){t._followBehavior._enabled=!t._sixDofDragBehavior.isMoving&&t.followBehaviorEnabled})),this._onDragObserver=this._sixDofDragBehavior.onDragObservable.add((function(e){t._sixDofDragBehavior.disableMovement=t._surfaceMagnetismBehavior.findAndUpdateTarget(e.pickInfo)}))},t.prototype._removeObservables=function(){this._scene.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._sixDofDragBehavior.onDragObservable.remove(this._onDragObserver)},t}();h.ShaderStore.ShadersStore.handleVertexShader="precision highp float;attribute vec3 position;uniform vec3 positionOffset;uniform mat4 worldViewProjection;uniform float scale;void main(void) {vec4 vPos=vec4((vec3(position)+positionOffset)*scale,1.0);gl_Position=worldViewProjection*vPos;}";h.ShaderStore.ShadersStore.handlePixelShader="uniform vec3 color;void main(void) {gl_FragColor=vec4(color,1.0);}";var Ft,Dt=function(t){function e(e,i){var o=t.call(this,e,i,"handle",{attributes:["position"],uniforms:["worldViewProjection","color","scale","positionOffset"],needAlphaBlending:!1,needAlphaTesting:!1})||this;return o._hover=!1,o._drag=!1,o._color=new h.Color3,o._scale=1,o._lastTick=-1,o.animationLength=100,o.hoverColor=new h.Color3(0,.467,.84),o.baseColor=new h.Color3(1,1,1),o.hoverScale=.75,o.baseScale=.35,o.dragScale=.55,o._positionOffset=h.Vector3.Zero(),o._updateInterpolationTarget(),o._lastTick=Date.now(),o._onBeforeRender=o.getScene().onBeforeRenderObservable.add((function(){var t=Date.now(),e=t-o._lastTick,i=o._targetScale-o._scale,r=h.TmpColors.Color3[0].copyFrom(o._targetColor).subtractToRef(o._color,h.TmpColors.Color3[0]);o._scale=o._scale+i*e/o.animationLength,r.scaleToRef(e/o.animationLength,r),o._color.addToRef(r,o._color),o.setColor3("color",o._color),o.setFloat("scale",o._scale),o.setVector3("positionOffset",o._positionOffset),o._lastTick=t})),o}return n(e,t),Object.defineProperty(e.prototype,"hover",{get:function(){return this._hover},set:function(t){this._hover=t,this._updateInterpolationTarget()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drag",{get:function(){return this._drag},set:function(t){this._drag=t,this._updateInterpolationTarget()},enumerable:!1,configurable:!0}),e.prototype._updateInterpolationTarget=function(){this.drag?(this._targetColor=this.hoverColor,this._targetScale=this.dragScale):this.hover?(this._targetColor=this.hoverColor,this._targetScale=this.hoverScale):(this._targetColor=this.baseColor,this._targetScale=this.baseScale)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.getScene().onBeforeRenderObservable.remove(this._onBeforeRender)},e}(h.ShaderMaterial);!function(t){t[t.IDLE=0]="IDLE",t[t.HOVER=1]="HOVER",t[t.DRAG=2]="DRAG"}(Ft||(Ft={}));var Lt=function(){function t(t,e){this._state=0,this._materials=[],this._scene=e,this._gizmo=t,this.node=this.createNode(),this.node.reservedDataStore={handle:this}}return Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gizmo",{get:function(){return this._gizmo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hover",{set:function(t){t?this._state|=1:this._state&=-2,this._updateMaterial()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"drag",{set:function(t){t?this._state|=2:this._state&=-3,this._updateMaterial()},enumerable:!1,configurable:!0}),t.prototype._createMaterial=function(t){var e=new Dt("handle",this._scene);return t&&(e._positionOffset=t),e},t.prototype._updateMaterial=function(){for(var t=this._state,e=0,i=this._materials;ei?this.minDimensions.x/t.x:this.minDimensions.y/t.y}this._dimensions.copyFrom(t).scaleInPlace(e),this._updatePivot(),this._positionElements()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"titleBarHeight",{get:function(){return this._titleBarHeight},set:function(t){this._titleBarHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderingGroupId",{get:function(){return this._titleBar.renderingGroupId},set:function(t){this._titleBar.renderingGroupId=t,this._titleBarTitle.renderingGroupId=t,this._contentPlate.renderingGroupId=t,this._backPlate.renderingGroupId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._titleText},set:function(t){this._titleText=t,this._titleTextComponent&&(this._titleTextComponent.text=t)},enumerable:!1,configurable:!0}),e.prototype._applyFacade=function(t){this._contentMaterial.albedoTexture=t,this._resetContentPositionAndZoom(),this._applyContentViewport(),t.attachToMesh(this._contentPlate,!0)},e.prototype._addControl=function(t){t._host=this._host,this._host.utilityLayer&&t._prepareNode(this._host.utilityLayer.utilityLayerScene)},e.prototype._getTypeName=function(){return"HolographicSlate"},e.prototype._positionElements=function(){var t=this._followButton,i=this._closeButton,o=this._titleBar,r=this._titleBarTitle,n=this._contentPlate,a=this._backPlate;if(t&&i&&o){i.scaling.setAll(this.titleBarHeight),t.scaling.setAll(this.titleBarHeight),i.position.copyFromFloats(this.dimensions.x-this.titleBarHeight/2,-this.titleBarHeight/2,0).addInPlace(this.origin),t.position.copyFromFloats(this.dimensions.x-3*this.titleBarHeight/2,-this.titleBarHeight/2,0).addInPlace(this.origin);var s=this.dimensions.y-this.titleBarHeight-this.titleBarMargin,l=n.getScene().useRightHandedSystem;o.scaling.set(this.dimensions.x,this.titleBarHeight,h.Epsilon),r.scaling.set(this.dimensions.x-2*this.titleBarHeight,this.titleBarHeight,h.Epsilon),n.scaling.copyFromFloats(this.dimensions.x,s,h.Epsilon),a.scaling.copyFromFloats(this.dimensions.x,s,h.Epsilon),o.position.copyFromFloats(this.dimensions.x/2,-this.titleBarHeight/2,0).addInPlace(this.origin),r.position.copyFromFloats(this.dimensions.x/2-this.titleBarHeight,-this.titleBarHeight/2,l?h.Epsilon:-h.Epsilon).addInPlace(this.origin),n.position.copyFromFloats(this.dimensions.x/2,-(this.titleBarHeight+this.titleBarMargin+s/2),0).addInPlace(this.origin),a.position.copyFromFloats(this.dimensions.x/2,-(this.titleBarHeight+this.titleBarMargin+s/2),l?-h.Epsilon:h.Epsilon).addInPlace(this.origin),this._titleTextComponent.host.scaleTo(e._DEFAULT_TEXT_RESOLUTION_Y*r.scaling.x/r.scaling.y,e._DEFAULT_TEXT_RESOLUTION_Y);var _=this.dimensions.x/s;this._contentViewport.width=this._contentScaleRatio,this._contentViewport.height=this._contentScaleRatio/_,this._applyContentViewport(),this._gizmo&&this._gizmo.updateBoundingBox()}},e.prototype._applyContentViewport=function(){var t;if((null===(t=this._contentPlate)||void 0===t?void 0:t.material)&&this._contentPlate.material.albedoTexture){var e=this._contentPlate.material.albedoTexture;e.uScale=this._contentScaleRatio,e.vScale=this._contentScaleRatio/this._contentViewport.width*this._contentViewport.height,e.uOffset=this._contentViewport.x,e.vOffset=this._contentViewport.y}},e.prototype._resetContentPositionAndZoom=function(){this._contentViewport.x=0,this._contentViewport.y=1-this._contentViewport.height/this._contentViewport.width,this._contentScaleRatio=1},e.prototype._updatePivot=function(){if(this.mesh){var t=new h.Vector3(.5*this.dimensions.x,.5*-this.dimensions.y,h.Epsilon);t.addInPlace(this.origin),t.z=0;var e=new h.Vector3(0,0,0);h.Vector3.TransformCoordinatesToRef(e,this.mesh.computeWorldMatrix(!0),e),this.mesh.setPivotPoint(t);var i=new h.Vector3(0,0,0);h.Vector3.TransformCoordinatesToRef(i,this.mesh.computeWorldMatrix(!0),i),this.mesh.position.addInPlace(e).subtractInPlace(i)}},e.prototype._createNode=function(t){var i=this,o=new h.Mesh("slate_"+this.name,t);this._titleBar=(0,h.CreateBox)("titleBar_"+this.name,{size:1},t),this._titleBarTitle=(0,h.CreatePlane)("titleText_"+this.name,{size:1},t),this._titleBarTitle.parent=o,this._titleBarTitle.isPickable=!1;var r=lt.CreateForMesh(this._titleBarTitle);if(this._titleTextComponent=new B("titleText_"+this.name,this._titleText),this._titleTextComponent.textWrapping=2,this._titleTextComponent.textHorizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,this._titleTextComponent.color="white",this._titleTextComponent.fontSize=e._DEFAULT_TEXT_RESOLUTION_Y/2,this._titleTextComponent.paddingLeft=e._DEFAULT_TEXT_RESOLUTION_Y/4,r.addControl(this._titleTextComponent),t.useRightHandedSystem){var n=new h.Vector4(0,0,1,1);this._contentPlate=(0,h.CreatePlane)("contentPlate_"+this.name,{size:1,sideOrientation:h.VertexData.BACKSIDE,frontUVs:n},t),this._backPlate=(0,h.CreatePlane)("backPlate_"+this.name,{size:1,sideOrientation:h.VertexData.FRONTSIDE},t)}else n=new h.Vector4(0,0,1,1),this._contentPlate=(0,h.CreatePlane)("contentPlate_"+this.name,{size:1,sideOrientation:h.VertexData.FRONTSIDE,frontUVs:n},t),this._backPlate=(0,h.CreatePlane)("backPlate_"+this.name,{size:1,sideOrientation:h.VertexData.BACKSIDE},t);this._titleBar.parent=o,this._titleBar.isNearGrabbable=!0,this._contentPlate.parent=o,this._backPlate.parent=o,this._attachContentPlateBehavior(),this._addControl(this._followButton),this._addControl(this._closeButton);var a=this._followButton,s=this._closeButton;return a.node.parent=o,s.node.parent=o,this._positionElements(),this._followButton.imageUrl=e.ASSETS_BASE_URL+e.FOLLOW_ICON_FILENAME,this._closeButton.imageUrl=e.ASSETS_BASE_URL+e.CLOSE_ICON_FILENAME,this._followButton.isBackplateVisible=!1,this._closeButton.isBackplateVisible=!1,this._followButton.onToggleObservable.add((function(t){i._defaultBehavior.followBehaviorEnabled=t,i._defaultBehavior.followBehaviorEnabled&&i._defaultBehavior.followBehavior.recenter()})),this._closeButton.onPointerClickObservable.add((function(){i.dispose()})),o.rotationQuaternion=h.Quaternion.Identity(),o.isVisible=!1,o},e.prototype._attachContentPlateBehavior=function(){var t=this;this._contentDragBehavior.attach(this._contentPlate),this._contentDragBehavior.moveAttached=!1,this._contentDragBehavior.useObjectOrientationForDragging=!0,this._contentDragBehavior.updateDragPlane=!1;var e,i,o=new h.Vector3,r=new h.Vector3,n=new h.Vector3,a=new h.Vector3,s=new h.Vector2;this._contentDragBehavior.onDragStartObservable.add((function(s){t.node&&(e=t._contentViewport.clone(),i=t.node.computeWorldMatrix(!0),o.copyFrom(s.dragPlanePoint),r.set(t.dimensions.x,t.dimensions.y,h.Epsilon),r.y-=t.titleBarHeight+t.titleBarMargin,h.Vector3.TransformNormalToRef(r,i,r),n.copyFromFloats(0,1,0),h.Vector3.TransformNormalToRef(n,i,n),a.copyFromFloats(1,0,0),h.Vector3.TransformNormalToRef(a,i,a),n.normalize(),n.scaleInPlace(1/h.Vector3.Dot(n,r)),a.normalize(),a.scaleInPlace(1/h.Vector3.Dot(a,r)))}));var l=new h.Vector3;this._contentDragBehavior.onDragObservable.add((function(i){l.copyFrom(i.dragPlanePoint),l.subtractInPlace(o),s.copyFromFloats(h.Vector3.Dot(l,a),h.Vector3.Dot(l,n)),t._contentViewport.x=h.Scalar.Clamp(e.x-l.x,0,1-t._contentViewport.width*t._contentScaleRatio),t._contentViewport.y=h.Scalar.Clamp(e.y-l.y,0,1-t._contentViewport.height*t._contentScaleRatio),t._applyContentViewport()}))},e.prototype._affectMaterial=function(t){this._titleBarMaterial=new Ct("".concat(this.name," plateMaterial"),t.getScene()),this._contentMaterial=new xt("".concat(this.name," contentMaterial"),t.getScene()),this._contentMaterial.renderBorders=!0,this._backMaterial=new Ct("".concat(this.name," backPlate"),t.getScene()),this._backMaterial.lineWidth=h.Epsilon,this._backMaterial.radius=.005,this._backMaterial.backFaceCulling=!0,this._titleBar.material=this._titleBarMaterial,this._contentPlate.material=this._contentMaterial,this._backPlate.material=this._backMaterial,this._resetContent(),this._applyContentViewport()},e.prototype._prepareNode=function(e){var i=this;t.prototype._prepareNode.call(this,e),this._gizmo=new At(this._host.utilityLayer),this._gizmo.attachedSlate=this,this._defaultBehavior=new Et,this._defaultBehavior.attach(this.node,[this._titleBar]),this._defaultBehavior.sixDofDragBehavior.onDragStartObservable.add((function(){i._followButton.isToggled=!1})),this._positionChangedObserver=this._defaultBehavior.sixDofDragBehavior.onPositionChangedObservable.add((function(){i._gizmo.updateBoundingBox()})),this._updatePivot(),this.resetDefaultAspectAndPose(!1)},e.prototype.resetDefaultAspectAndPose=function(t){if(void 0===t&&(t=!0),this._host&&this._host.utilityLayer&&this.node){var e=this._host.utilityLayer.utilityLayerScene,i=e.activeCamera;if(i){var o=i.getWorldMatrix(),r=h.Vector3.TransformNormal(h.Vector3.Backward(e.useRightHandedSystem),o);this.origin.setAll(0),this._gizmo.updateBoundingBox();var n=this.node.getAbsolutePivotPoint();this.node.position.copyFrom(i.position).subtractInPlace(r).subtractInPlace(n),this.node.rotationQuaternion=h.Quaternion.FromLookDirectionLH(r,new h.Vector3(0,1,0)),t&&(this.dimensions=this.defaultDimensions)}}},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._titleBarMaterial.dispose(),this._contentMaterial.dispose(),this._titleBar.dispose(),this._titleBarTitle.dispose(),this._contentPlate.dispose(),this._backPlate.dispose(),this._followButton.dispose(),this._closeButton.dispose(),this._host.onPickedPointChangedObservable.remove(this._pickedPointObserver),this._defaultBehavior.sixDofDragBehavior.onPositionChangedObservable.remove(this._positionChangedObserver),this._defaultBehavior.detach(),this._gizmo.dispose(),this._contentDragBehavior.detach()},e.ASSETS_BASE_URL="https://assets.babylonjs.com/meshes/MRTK/",e.CLOSE_ICON_FILENAME="IconClose.png",e.FOLLOW_ICON_FILENAME="IconFollowMe.png",e._DEFAULT_TEXT_RESOLUTION_Y=102.4,e}(ft),Qt=function(t){function e(e,i){var o=t.call(this,i)||this;return o._currentMesh=e,o.pointerEnterAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(1.1)},o.pointerOutAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(1/1.1)},o.pointerDownAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(.95)},o.pointerUpAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(1/.95)},o}return n(e,t),e.prototype._getTypeName=function(){return"MeshButton3D"},e.prototype._createNode=function(t){var e=this;return this._currentMesh.getChildMeshes().forEach((function(t){e._injectGUI3DReservedDataStore(t).control=e})),this._currentMesh},e.prototype._affectMaterial=function(t){},e}(gt),Vt=function(t){function e(e){var i=t.call(this,e)||this;return i._isPinned=!1,i._defaultBehavior=new Et,i._dragObserver=i._defaultBehavior.sixDofDragBehavior.onDragObservable.add((function(){i.isPinned=!0})),i.backPlateMargin=1,i}return n(e,t),Object.defineProperty(e.prototype,"defaultBehavior",{get:function(){return this._defaultBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPinned",{get:function(){return this._isPinned},set:function(t){this._pinButton.isToggled===t?(this._isPinned=t,this._defaultBehavior.followBehaviorEnabled=!t):this._pinButton.isToggled=t},enumerable:!1,configurable:!0}),e.prototype._createPinButton=function(t){var i=this,o=new Mt("pin"+this.name,!1);return o.imageUrl=e._ASSETS_BASE_URL+e._PIN_ICON_FILENAME,o.parent=this,o._host=this._host,o.isToggleButton=!0,o.onToggleObservable.add((function(t){i.isPinned=t})),this._host.utilityLayer&&(o._prepareNode(this._host.utilityLayer.utilityLayerScene),o.scaling.scaleInPlace(Pt.MENU_BUTTON_SCALE),o.node&&(o.node.parent=t)),o},e.prototype._createNode=function(e){var i=t.prototype._createNode.call(this,e);return this._pinButton=this._createPinButton(i),this.isPinned=!1,this._defaultBehavior.attach(i,[this._backPlate]),this._defaultBehavior.followBehavior.ignoreCameraPitchAndRoll=!0,this._defaultBehavior.followBehavior.pitchOffset=-15,this._defaultBehavior.followBehavior.minimumDistance=.3,this._defaultBehavior.followBehavior.defaultDistance=.4,this._defaultBehavior.followBehavior.maximumDistance=.6,this._backPlate.isNearGrabbable=!0,i.isVisible=!1,i},e.prototype._finalProcessing=function(){t.prototype._finalProcessing.call(this),this._pinButton.position.copyFromFloats((this._backPlate.scaling.x+Pt.MENU_BUTTON_SCALE)/2,this._backPlate.scaling.y/2,0)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._defaultBehavior.sixDofDragBehavior.onDragObservable.remove(this._dragObserver),this._defaultBehavior.detach()},e._ASSETS_BASE_URL="https://assets.babylonjs.com/meshes/MRTK/",e._PIN_ICON_FILENAME="IconPin.png",e}(Pt),Wt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype._mapGridNode=function(t,e){var i=t.mesh;if(i){t.position=e.clone();var o=h.TmpVectors.Vector3[0];switch(o.copyFrom(e),this.orientation){case bt.FACEORIGIN_ORIENTATION:case bt.FACEFORWARD_ORIENTATION:o.addInPlace(new h.Vector3(0,0,1)),i.lookAt(o);break;case bt.FACEFORWARDREVERSED_ORIENTATION:case bt.FACEORIGINREVERSED_ORIENTATION:o.addInPlace(new h.Vector3(0,0,-1)),i.lookAt(o)}}},e}(mt),Ht=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._iteration=100,e}return n(e,t),Object.defineProperty(e.prototype,"iteration",{get:function(){return this._iteration},set:function(t){var e=this;this._iteration!==t&&(this._iteration=t,h.Tools.SetImmediate((function(){e._arrangeChildren()})))},enumerable:!1,configurable:!0}),e.prototype._mapGridNode=function(t,e){var i=t.mesh,o=this._scatterMapping(e);if(i){switch(this.orientation){case bt.FACEORIGIN_ORIENTATION:case bt.FACEFORWARD_ORIENTATION:i.lookAt(new h.Vector3(0,0,1));break;case bt.FACEFORWARDREVERSED_ORIENTATION:case bt.FACEORIGINREVERSED_ORIENTATION:i.lookAt(new h.Vector3(0,0,-1))}t.position=o}},e.prototype._scatterMapping=function(t){return t.x=(1-2*Math.random())*this._cellWidth,t.y=(1-2*Math.random())*this._cellHeight,t},e.prototype._finalProcessing=function(){for(var t=[],e=0,i=this._children;eo?-1:0}));for(var n=Math.pow(this.margin,2),a=Math.max(this._cellWidth,this._cellHeight),s=h.TmpVectors.Vector2[0],l=h.TmpVectors.Vector3[0],_=0;_0.0) {C=mix(H,S,k);} else {C=mix(H,G,k); }\nreturn C;}\nvoid Sky_Environment_B50(\nvec3 Normal,\nvec3 Reflected,\nvec4 Sky_Color,\nvec4 Horizon_Color,\nvec4 Ground_Color,\nfloat Horizon_Power,\nout vec4 Reflected_Color,\nout vec4 Indirect_Color)\n{Reflected_Color=SampleEnv_Bid50(Reflected,Sky_Color,Horizon_Color,Ground_Color,Horizon_Power);Indirect_Color=mix(Ground_Color,Sky_Color,Normal.y*0.5+0.5);}\nvoid Min_Segment_Distance_B65(\nvec3 P0,\nvec3 P1,\nvec3 Q0,\nvec3 Q1,\nout vec3 NearP,\nout vec3 NearQ,\nout float Distance)\n{vec3 u=P1-P0;vec3 v=Q1-Q0;vec3 w=P0-Q0;float a=dot(u,u);float b=dot(u,v);float c=dot(v,v);float d=dot(u,w);float e=dot(v,w);float D=a*c-b*b;float sD=D;float tD=D;float sc,sN,tc,tN;if (D<0.00001) {sN=0.0;sD=1.0;tN=e;tD=c;} else {sN=(b*e-c*d);tN=(a*e-b*d);if (sN<0.0) {sN=0.0;tN=e;tD=c;} else if (sN>sD) {sN=sD;tN=e+b;tD=c;}}\nif (tN<0.0) {tN=0.0;if (-d<0.0) {sN=0.0;} else if (-d>a) {sN=sD;} else {sN=-d;sD=a;}} else if (tN>tD) {tN=tD;if ((-d+b)<0.0) {sN=0.0;} else if ((-d+b)>a) {sN=sD;} else {sN=(-d+b);sD=a;}}\nsc=abs(sN)<0.000001 ? 0.0 : sN/sD;tc=abs(tN)<0.000001 ? 0.0 : tN/tD;NearP=P0+sc*u;NearQ=Q0+tc*v;Distance=distance(NearP,NearQ);}\nvoid To_XYZ_B74(\nvec3 Vec3,\nout float X,\nout float Y,\nout float Z)\n{X=Vec3.x;Y=Vec3.y;Z=Vec3.z;}\nvoid Finger_Positions_B64(\nvec3 Left_Index_Pos,\nvec3 Right_Index_Pos,\nvec3 Left_Index_Middle_Pos,\nvec3 Right_Index_Middle_Pos,\nout vec3 Left_Index,\nout vec3 Right_Index,\nout vec3 Left_Index_Middle,\nout vec3 Right_Index_Middle)\n{Left_Index= (Use_Global_Left_Index ? Global_Left_Index_Tip_Position.xyz : Left_Index_Pos);Right_Index= (Use_Global_Right_Index ? Global_Right_Index_Tip_Position.xyz : Right_Index_Pos);Left_Index_Middle= (Use_Global_Left_Index ? Global_Left_Index_Middle_Position.xyz : Left_Index_Middle_Pos);Right_Index_Middle= (Use_Global_Right_Index ? Global_Right_Index_Middle_Position.xyz : Right_Index_Middle_Pos);}\nvoid VaryHSV_B108(\nvec3 HSV_In,\nfloat Hue_Shift,\nfloat Saturation_Shift,\nfloat Value_Shift,\nout vec3 HSV_Out)\n{HSV_Out=vec3(fract(HSV_In.x+Hue_Shift),clamp(HSV_In.y+Saturation_Shift,0.0,1.0),clamp(HSV_In.z+Value_Shift,0.0,1.0));}\nvoid Remap_Range_B114(\nfloat In_Min,\nfloat In_Max,\nfloat Out_Min,\nfloat Out_Max,\nfloat In,\nout float Out)\n{Out=mix(Out_Min,Out_Max,clamp((In-In_Min)/(In_Max-In_Min),0.0,1.0));}\nvoid To_HSV_B75(\nvec4 Color,\nout float Hue,\nout float Saturation,\nout float Value,\nout float Alpha,\nout vec3 HSV)\n{vec4 K=vec4(0.0,-1.0/3.0,2.0/3.0,-1.0);vec4 p=Color.g0.0;Result=Position.x<0.0 ? (whichY ? Radius_Top_Left : Radius_Bottom_Left) : (whichY ? Radius_Top_Right : Radius_Bottom_Right);Result*=Radius;}\nvoid Conditional_Float_B36(\nbool Which,\nfloat If_True,\nfloat If_False,\nout float Result)\n{Result=Which ? If_True : If_False;}\nvoid Greater_Than_B37(\nfloat Left,\nfloat Right,\nout bool Not_Greater_Than,\nout bool Greater_Than)\n{Greater_Than=Left>Right;Not_Greater_Than=!Greater_Than;}\nvoid Remap_Range_B105(\nfloat In_Min,\nfloat In_Max,\nfloat Out_Min,\nfloat Out_Max,\nfloat In,\nout float Out)\n{Out=mix(Out_Min,Out_Max,clamp((In-In_Min)/(In_Max-In_Min),0.0,1.0));}\nvoid main()\n{vec2 XY_Q85;XY_Q85=(uv-vec2(0.5,0.5))*_Decal_Scale_XY_+vec2(0.5,0.5);vec3 Tangent_World_Q27;vec3 Tangent_World_N_Q27;float Tangent_Length_Q27;Tangent_World_Q27=(world*vec4(vec3(1,0,0),0.0)).xyz;Tangent_Length_Q27=length(Tangent_World_Q27);Tangent_World_N_Q27=Tangent_World_Q27/Tangent_Length_Q27;vec3 Normal_World_Q60;vec3 Normal_World_N_Q60;float Normal_Length_Q60;Object_To_World_Dir_B60(vec3(0,0,1),Normal_World_Q60,Normal_World_N_Q60,Normal_Length_Q60);float X_Q78;float Y_Q78;float Z_Q78;To_XYZ_B78(position,X_Q78,Y_Q78,Z_Q78);vec3 Nrm_World_Q26;Nrm_World_Q26=normalize((world*vec4(normal,0.0)).xyz);vec3 Binormal_World_Q28;vec3 Binormal_World_N_Q28;float Binormal_Length_Q28;Object_To_World_Dir_B28(vec3(0,1,0),Binormal_World_Q28,Binormal_World_N_Q28,Binormal_Length_Q28);float Anisotropy_Q29=Tangent_Length_Q27/Binormal_Length_Q28;float Result_Q69;Pick_Radius_B69(_Radius_,_Radius_Top_Left_,_Radius_Top_Right_,_Radius_Bottom_Left_,_Radius_Bottom_Right_,position,Result_Q69);float Anisotropy_Q53=Binormal_Length_Q28/Normal_Length_Q60;bool Not_Greater_Than_Q37;bool Greater_Than_Q37;Greater_Than_B37(Z_Q78,0.0,Not_Greater_Than_Q37,Greater_Than_Q37);vec4 Linear_Q101;Linear_Q101.rgb=clamp(_Left_Color_.rgb*_Left_Color_.rgb,0.0,1.0);Linear_Q101.a=_Left_Color_.a;vec4 Linear_Q102;Linear_Q102.rgb=clamp(_Right_Color_.rgb*_Right_Color_.rgb,0.0,1.0);Linear_Q102.a=_Right_Color_.a;vec3 Difference_Q61=vec3(0,0,0)-Normal_World_N_Q60;vec4 Out_Color_Q34=vec4(X_Q78,Y_Q78,Z_Q78,1);float Result_Q36;Conditional_Float_B36(Greater_Than_Q37,_Bevel_Back_,_Bevel_Front_,Result_Q36);float Result_Q94;Conditional_Float_B36(Greater_Than_Q37,_Bevel_Back_Stretch_,_Bevel_Front_Stretch_,Result_Q94);vec3 New_P_Q130;vec2 New_UV_Q130;float Radial_Gradient_Q130;vec3 Radial_Dir_Q130;vec3 New_Normal_Q130;Move_Verts_B130(Anisotropy_Q29,position,Result_Q69,Result_Q36,normal,Anisotropy_Q53,Result_Q94,New_P_Q130,New_UV_Q130,Radial_Gradient_Q130,Radial_Dir_Q130,New_Normal_Q130);float X_Q98;float Y_Q98;X_Q98=New_UV_Q130.x;Y_Q98=New_UV_Q130.y;vec3 Pos_World_Q12;Object_To_World_Pos_B12(New_P_Q130,Pos_World_Q12);vec3 Nrm_World_Q32;Object_To_World_Normal_B32(New_Normal_Q130,Nrm_World_Q32);vec4 Blob_Info_Q23;\n#if BLOB_ENABLE\nBlob_Vertex_B23(Pos_World_Q12,Nrm_World_Q26,Tangent_World_N_Q27,Binormal_World_N_Q28,_Blob_Position_,_Blob_Intensity_,_Blob_Near_Size_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_,_Blob_Fade_,Blob_Info_Q23);\n#else\nBlob_Info_Q23=vec4(0,0,0,0);\n#endif\nvec4 Blob_Info_Q24;\n#if BLOB_ENABLE_2\nBlob_Vertex_B24(Pos_World_Q12,Nrm_World_Q26,Tangent_World_N_Q27,Binormal_World_N_Q28,_Blob_Position_2_,_Blob_Intensity_,_Blob_Near_Size_2_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_2_,_Blob_Fade_2_,Blob_Info_Q24);\n#else\nBlob_Info_Q24=vec4(0,0,0,0);\n#endif\nfloat Out_Q105;Remap_Range_B105(0.0,1.0,0.0,1.0,X_Q98,Out_Q105);float X_Q86;float Y_Q86;float Z_Q86;To_XYZ_B78(Nrm_World_Q32,X_Q86,Y_Q86,Z_Q86);vec4 Color_At_T_Q97=mix(Linear_Q101,Linear_Q102,Out_Q105);float Minus_F_Q87=-Z_Q86;float R_Q99;float G_Q99;float B_Q99;float A_Q99;R_Q99=Color_At_T_Q97.r; G_Q99=Color_At_T_Q97.g; B_Q99=Color_At_T_Q97.b; A_Q99=Color_At_T_Q97.a;float ClampF_Q88=clamp(0.0,Minus_F_Q87,1.0);float Result_Q93;Conditional_Float_B93(_Decal_Front_Only_,ClampF_Q88,1.0,Result_Q93);vec4 Vec4_Q89=vec4(Result_Q93,Radial_Gradient_Q130,G_Q99,B_Q99);vec3 Position=Pos_World_Q12;vec3 Normal=Nrm_World_Q32;vec2 UV=XY_Q85;vec3 Tangent=Tangent_World_N_Q27;vec3 Binormal=Difference_Q61;vec4 Color=Out_Color_Q34;vec4 Extra1=Vec4_Q89;vec4 Extra2=Blob_Info_Q23;vec4 Extra3=Blob_Info_Q24;gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vColor=Color;vExtra1=Extra1;vExtra2=Extra2;vExtra3=Extra3;}";var Gt=function(t){function e(){var e=t.call(this)||this;return e.SKY_ENABLED=!0,e.BLOB_ENABLE_2=!0,e.IRIDESCENCE_ENABLED=!0,e._needNormals=!0,e._needUVs=!0,e.rebuild(),e}return n(e,t),e}(h.MaterialDefines),Ut=function(t){function e(i,o){var r=t.call(this,i,o)||this;return r.radius=.6,r.bevelFront=.6,r.bevelFrontStretch=.077,r.bevelBack=0,r.bevelBackStretch=0,r.radiusTopLeft=1,r.radiusTopRight=1,r.radiusBottomLeft=1,r.radiusBottomRight=1,r.bulgeEnabled=!1,r.bulgeHeight=-.323,r.bulgeRadius=.73,r.sunIntensity=1.102,r.sunTheta=.76,r.sunPhi=.526,r.indirectDiffuse=.658,r.albedo=new h.Color4(.0117647,.505882,.996078,1),r.specular=0,r.shininess=10,r.sharpness=0,r.subsurface=0,r.leftGradientColor=new h.Color4(.0117647,.505882,.996078,1),r.rightGradientColor=new h.Color4(.0117647,.505882,.996078,1),r.reflection=.749,r.frontReflect=0,r.edgeReflect=.09,r.power=8.13,r.skyColor=new h.Color4(.0117647,.964706,.996078,1),r.horizonColor=new h.Color4(.0117647,.333333,.996078,1),r.groundColor=new h.Color4(0,.254902,.996078,1),r.horizonPower=1,r.width=.02,r.fuzz=.5,r.minFuzz=.001,r.clipFade=.01,r.hueShift=0,r.saturationShift=0,r.valueShift=0,r.blobPosition=new h.Vector3(0,0,.1),r.blobIntensity=.5,r.blobNearSize=.01,r.blobFarSize=.03,r.blobNearDistance=0,r.blobFarDistance=.08,r.blobFadeLength=.576,r.blobPulse=0,r.blobFade=1,r.blobPosition2=new h.Vector3(.2,0,.1),r.blobNearSize2=.01,r.blobPulse2=0,r.blobFade2=1,r.blobTexture=new h.Texture("",r.getScene()),r.leftIndexPosition=new h.Vector3(0,0,1),r.rightIndexPosition=new h.Vector3(-1,-1,-1),r.leftIndexMiddlePosition=new h.Vector3(0,0,0),r.rightIndexMiddlePosition=new h.Vector3(0,0,0),r.decalScaleXY=new h.Vector2(1.5,1.5),r.decalFrontOnly=!0,r.rimIntensity=.287,r.rimHueShift=0,r.rimSaturationShift=0,r.rimValueShift=-1,r.iridescenceIntensity=0,r.useGlobalLeftIndex=1,r.useGlobalRightIndex=1,r.globalLeftIndexTipProximity=0,r.globalRightIndexTipProximity=0,r.globalLeftIndexTipPosition=new h.Vector4(.5,0,-.55,1),r.globaRightIndexTipPosition=new h.Vector4(0,0,0,1),r.globalLeftThumbTipPosition=new h.Vector4(.5,0,-.55,1),r.globalRightThumbTipPosition=new h.Vector4(0,0,0,1),r.globalLeftIndexMiddlePosition=new h.Vector4(.5,0,-.55,1),r.globalRightIndexMiddlePosition=new h.Vector4(0,0,0,1),r.alphaMode=h.Constants.ALPHA_DISABLE,r.backFaceCulling=!1,r._blueGradientTexture=new h.Texture(e.BLUE_GRADIENT_TEXTURE_URL,r.getScene(),!0,!1,h.Texture.NEAREST_SAMPLINGMODE),r._decalTexture=new h.Texture("",r.getScene()),r._reflectionMapTexture=new h.Texture("",r.getScene()),r._indirectEnvTexture=new h.Texture("",r.getScene()),r}return n(e,t),e.prototype.needAlphaBlending=function(){return!1},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new Gt);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,h.PrepareDefinesForAttributes)(t,o,!1,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new h.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,h.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[h.VertexBuffer.PositionKind];o.NORMAL&&s.push(h.VertexBuffer.NormalKind),o.UV1&&s.push(h.VertexBuffer.UVKind),o.UV2&&s.push(h.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(h.VertexBuffer.ColorKind),o.TANGENT&&s.push(h.VertexBuffer.TangentKind),(0,h.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","viewProjection","cameraPosition","_Radius_","_Bevel_Front_","_Bevel_Front_Stretch_","_Bevel_Back_","_Bevel_Back_Stretch_","_Radius_Top_Left_","_Radius_Top_Right_","_Radius_Bottom_Left_","_Radius_Bottom_Right_","_Bulge_Enabled_","_Bulge_Height_","_Bulge_Radius_","_Sun_Intensity_","_Sun_Theta_","_Sun_Phi_","_Indirect_Diffuse_","_Albedo_","_Specular_","_Shininess_","_Sharpness_","_Subsurface_","_Left_Color_","_Right_Color_","_Reflection_","_Front_Reflect_","_Edge_Reflect_","_Power_","_Sky_Color_","_Horizon_Color_","_Ground_Color_","_Horizon_Power_","_Reflection_Map_","_Indirect_Environment_","_Width_","_Fuzz_","_Min_Fuzz_","_Clip_Fade_","_Hue_Shift_","_Saturation_Shift_","_Value_Shift_","_Blob_Position_","_Blob_Intensity_","_Blob_Near_Size_","_Blob_Far_Size_","_Blob_Near_Distance_","_Blob_Far_Distance_","_Blob_Fade_Length_","_Blob_Pulse_","_Blob_Fade_","_Blob_Texture_","_Blob_Position_2_","_Blob_Near_Size_2_","_Blob_Pulse_2_","_Blob_Fade_2_","_Left_Index_Pos_","_Right_Index_Pos_","_Left_Index_Middle_Pos_","_Right_Index_Middle_Pos_","_Decal_","_Decal_Scale_XY_","_Decal_Front_Only_","_Rim_Intensity_","_Rim_Texture_","_Rim_Hue_Shift_","_Rim_Saturation_Shift_","_Rim_Value_Shift_","_Iridescence_Intensity_","_Iridescence_Texture_","Use_Global_Left_Index","Use_Global_Right_Index","Global_Left_Index_Tip_Position","Global_Right_Index_Tip_Position","Global_Left_Thumb_Tip_Position","Global_Right_Thumb_Tip_Position","Global_Left_Index_Middle_Position;","Global_Right_Index_Middle_Position","Global_Left_Index_Tip_Proximity","Global_Right_Index_Tip_Proximity"],c=["_Rim_Texture_","_Iridescence_Texture_"],u=[];(0,h.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("mrdlSliderBar",{attributes:s,uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o,this._materialContext)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){if(i.materialDefines){var o=i.effect;o&&(this._activeEffect=o,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",this.getScene().getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",this.getScene().activeCamera.position),this._activeEffect.setFloat("_Radius_",this.radius),this._activeEffect.setFloat("_Bevel_Front_",this.bevelFront),this._activeEffect.setFloat("_Bevel_Front_Stretch_",this.bevelFrontStretch),this._activeEffect.setFloat("_Bevel_Back_",this.bevelBack),this._activeEffect.setFloat("_Bevel_Back_Stretch_",this.bevelBackStretch),this._activeEffect.setFloat("_Radius_Top_Left_",this.radiusTopLeft),this._activeEffect.setFloat("_Radius_Top_Right_",this.radiusTopRight),this._activeEffect.setFloat("_Radius_Bottom_Left_",this.radiusBottomLeft),this._activeEffect.setFloat("_Radius_Bottom_Right_",this.radiusBottomRight),this._activeEffect.setFloat("_Bulge_Enabled_",this.bulgeEnabled?1:0),this._activeEffect.setFloat("_Bulge_Height_",this.bulgeHeight),this._activeEffect.setFloat("_Bulge_Radius_",this.bulgeRadius),this._activeEffect.setFloat("_Sun_Intensity_",this.sunIntensity),this._activeEffect.setFloat("_Sun_Theta_",this.sunTheta),this._activeEffect.setFloat("_Sun_Phi_",this.sunPhi),this._activeEffect.setFloat("_Indirect_Diffuse_",this.indirectDiffuse),this._activeEffect.setDirectColor4("_Albedo_",this.albedo),this._activeEffect.setFloat("_Specular_",this.specular),this._activeEffect.setFloat("_Shininess_",this.shininess),this._activeEffect.setFloat("_Sharpness_",this.sharpness),this._activeEffect.setFloat("_Subsurface_",this.subsurface),this._activeEffect.setDirectColor4("_Left_Color_",this.leftGradientColor),this._activeEffect.setDirectColor4("_Right_Color_",this.rightGradientColor),this._activeEffect.setFloat("_Reflection_",this.reflection),this._activeEffect.setFloat("_Front_Reflect_",this.frontReflect),this._activeEffect.setFloat("_Edge_Reflect_",this.edgeReflect),this._activeEffect.setFloat("_Power_",this.power),this._activeEffect.setDirectColor4("_Sky_Color_",this.skyColor),this._activeEffect.setDirectColor4("_Horizon_Color_",this.horizonColor),this._activeEffect.setDirectColor4("_Ground_Color_",this.groundColor),this._activeEffect.setFloat("_Horizon_Power_",this.horizonPower),this._activeEffect.setTexture("_Reflection_Map_",this._reflectionMapTexture),this._activeEffect.setTexture("_Indirect_Environment_",this._indirectEnvTexture),this._activeEffect.setFloat("_Width_",this.width),this._activeEffect.setFloat("_Fuzz_",this.fuzz),this._activeEffect.setFloat("_Min_Fuzz_",this.minFuzz),this._activeEffect.setFloat("_Clip_Fade_",this.clipFade),this._activeEffect.setFloat("_Hue_Shift_",this.hueShift),this._activeEffect.setFloat("_Saturation_Shift_",this.saturationShift),this._activeEffect.setFloat("_Value_Shift_",this.valueShift),this._activeEffect.setVector3("_Blob_Position_",this.blobPosition),this._activeEffect.setFloat("_Blob_Intensity_",this.blobIntensity),this._activeEffect.setFloat("_Blob_Near_Size_",this.blobNearSize),this._activeEffect.setFloat("_Blob_Far_Size_",this.blobFarSize),this._activeEffect.setFloat("_Blob_Near_Distance_",this.blobNearDistance),this._activeEffect.setFloat("_Blob_Far_Distance_",this.blobFarDistance),this._activeEffect.setFloat("_Blob_Fade_Length_",this.blobFadeLength),this._activeEffect.setFloat("_Blob_Pulse_",this.blobPulse),this._activeEffect.setFloat("_Blob_Fade_",this.blobFade),this._activeEffect.setTexture("_Blob_Texture_",this.blobTexture),this._activeEffect.setVector3("_Blob_Position_2_",this.blobPosition2),this._activeEffect.setFloat("_Blob_Near_Size_2_",this.blobNearSize2),this._activeEffect.setFloat("_Blob_Pulse_2_",this.blobPulse2),this._activeEffect.setFloat("_Blob_Fade_2_",this.blobFade2),this._activeEffect.setVector3("_Left_Index_Pos_",this.leftIndexPosition),this._activeEffect.setVector3("_Right_Index_Pos_",this.rightIndexPosition),this._activeEffect.setVector3("_Left_Index_Middle_Pos_",this.leftIndexMiddlePosition),this._activeEffect.setVector3("_Right_Index_Middle_Pos_",this.rightIndexMiddlePosition),this._activeEffect.setTexture("_Decal_",this._decalTexture),this._activeEffect.setVector2("_Decal_Scale_XY_",this.decalScaleXY),this._activeEffect.setFloat("_Decal_Front_Only_",this.decalFrontOnly?1:0),this._activeEffect.setFloat("_Rim_Intensity_",this.rimIntensity),this._activeEffect.setTexture("_Rim_Texture_",this._blueGradientTexture),this._activeEffect.setFloat("_Rim_Hue_Shift_",this.rimHueShift),this._activeEffect.setFloat("_Rim_Saturation_Shift_",this.rimSaturationShift),this._activeEffect.setFloat("_Rim_Value_Shift_",this.rimValueShift),this._activeEffect.setFloat("_Iridescence_Intensity_",this.iridescenceIntensity),this._activeEffect.setTexture("_Iridescence_Texture_",this._blueGradientTexture),this._activeEffect.setFloat("Use_Global_Left_Index",this.useGlobalLeftIndex),this._activeEffect.setFloat("Use_Global_Right_Index",this.useGlobalRightIndex),this._activeEffect.setVector4("Global_Left_Index_Tip_Position",this.globalLeftIndexTipPosition),this._activeEffect.setVector4("Global_Right_Index_Tip_Position",this.globaRightIndexTipPosition),this._activeEffect.setVector4("Global_Left_Thumb_Tip_Position",this.globalLeftThumbTipPosition),this._activeEffect.setVector4("Global_Right_Thumb_Tip_Position",this.globalRightThumbTipPosition),this._activeEffect.setVector4("Global_Left_Index_Middle_Position",this.globalLeftIndexMiddlePosition),this._activeEffect.setVector4("Global_Right_Index_Middle_Position",this.globalRightIndexMiddlePosition),this._activeEffect.setFloat("Global_Left_Index_Tip_Proximity",this.globalLeftIndexTipProximity),this._activeEffect.setFloat("Global_Right_Index_Tip_Proximity",this.globalRightIndexTipProximity),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),this._reflectionMapTexture.dispose(),this._indirectEnvTexture.dispose(),this._blueGradientTexture.dispose(),this._decalTexture.dispose()},e.prototype.clone=function(t){var i=this;return h.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var e=t.prototype.serialize.call(this);return e.customType="BABYLON.MRDLSliderBarMaterial",e},e.prototype.getClassName=function(){return"MRDLSliderBarMaterial"},e.Parse=function(t,i,o){return h.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},e.BLUE_GRADIENT_TEXTURE_URL="https://assets.babylonjs.com/meshes/MRTK/MRDL/mrtk-mrdl-blue-gradient.png",s([(0,h.serialize)()],e.prototype,"radius",void 0),s([(0,h.serialize)()],e.prototype,"bevelFront",void 0),s([(0,h.serialize)()],e.prototype,"bevelFrontStretch",void 0),s([(0,h.serialize)()],e.prototype,"bevelBack",void 0),s([(0,h.serialize)()],e.prototype,"bevelBackStretch",void 0),s([(0,h.serialize)()],e.prototype,"radiusTopLeft",void 0),s([(0,h.serialize)()],e.prototype,"radiusTopRight",void 0),s([(0,h.serialize)()],e.prototype,"radiusBottomLeft",void 0),s([(0,h.serialize)()],e.prototype,"radiusBottomRight",void 0),s([(0,h.serialize)()],e.prototype,"bulgeEnabled",void 0),s([(0,h.serialize)()],e.prototype,"bulgeHeight",void 0),s([(0,h.serialize)()],e.prototype,"bulgeRadius",void 0),s([(0,h.serialize)()],e.prototype,"sunIntensity",void 0),s([(0,h.serialize)()],e.prototype,"sunTheta",void 0),s([(0,h.serialize)()],e.prototype,"sunPhi",void 0),s([(0,h.serialize)()],e.prototype,"indirectDiffuse",void 0),s([(0,h.serialize)()],e.prototype,"albedo",void 0),s([(0,h.serialize)()],e.prototype,"specular",void 0),s([(0,h.serialize)()],e.prototype,"shininess",void 0),s([(0,h.serialize)()],e.prototype,"sharpness",void 0),s([(0,h.serialize)()],e.prototype,"subsurface",void 0),s([(0,h.serialize)()],e.prototype,"leftGradientColor",void 0),s([(0,h.serialize)()],e.prototype,"rightGradientColor",void 0),s([(0,h.serialize)()],e.prototype,"reflection",void 0),s([(0,h.serialize)()],e.prototype,"frontReflect",void 0),s([(0,h.serialize)()],e.prototype,"edgeReflect",void 0),s([(0,h.serialize)()],e.prototype,"power",void 0),s([(0,h.serialize)()],e.prototype,"skyColor",void 0),s([(0,h.serialize)()],e.prototype,"horizonColor",void 0),s([(0,h.serialize)()],e.prototype,"groundColor",void 0),s([(0,h.serialize)()],e.prototype,"horizonPower",void 0),s([(0,h.serialize)()],e.prototype,"width",void 0),s([(0,h.serialize)()],e.prototype,"fuzz",void 0),s([(0,h.serialize)()],e.prototype,"minFuzz",void 0),s([(0,h.serialize)()],e.prototype,"clipFade",void 0),s([(0,h.serialize)()],e.prototype,"hueShift",void 0),s([(0,h.serialize)()],e.prototype,"saturationShift",void 0),s([(0,h.serialize)()],e.prototype,"valueShift",void 0),s([(0,h.serialize)()],e.prototype,"blobPosition",void 0),s([(0,h.serialize)()],e.prototype,"blobIntensity",void 0),s([(0,h.serialize)()],e.prototype,"blobNearSize",void 0),s([(0,h.serialize)()],e.prototype,"blobFarSize",void 0),s([(0,h.serialize)()],e.prototype,"blobNearDistance",void 0),s([(0,h.serialize)()],e.prototype,"blobFarDistance",void 0),s([(0,h.serialize)()],e.prototype,"blobFadeLength",void 0),s([(0,h.serialize)()],e.prototype,"blobPulse",void 0),s([(0,h.serialize)()],e.prototype,"blobFade",void 0),s([(0,h.serialize)()],e.prototype,"blobPosition2",void 0),s([(0,h.serialize)()],e.prototype,"blobNearSize2",void 0),s([(0,h.serialize)()],e.prototype,"blobPulse2",void 0),s([(0,h.serialize)()],e.prototype,"blobFade2",void 0),s([(0,h.serialize)()],e.prototype,"blobTexture",void 0),s([(0,h.serialize)()],e.prototype,"leftIndexPosition",void 0),s([(0,h.serialize)()],e.prototype,"rightIndexPosition",void 0),s([(0,h.serialize)()],e.prototype,"leftIndexMiddlePosition",void 0),s([(0,h.serialize)()],e.prototype,"rightIndexMiddlePosition",void 0),s([(0,h.serialize)()],e.prototype,"decalScaleXY",void 0),s([(0,h.serialize)()],e.prototype,"decalFrontOnly",void 0),s([(0,h.serialize)()],e.prototype,"rimIntensity",void 0),s([(0,h.serialize)()],e.prototype,"rimHueShift",void 0),s([(0,h.serialize)()],e.prototype,"rimSaturationShift",void 0),s([(0,h.serialize)()],e.prototype,"rimValueShift",void 0),s([(0,h.serialize)()],e.prototype,"iridescenceIntensity",void 0),e}(h.PushMaterial);(0,h.RegisterClass)("BABYLON.GUI.MRDLSliderBarMaterial",Ut);h.ShaderStore.ShadersStore.mrdlSliderThumbPixelShader="uniform vec3 cameraPosition;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vColor;varying vec4 vExtra1;varying vec4 vExtra2;varying vec4 vExtra3;uniform float _Radius_;uniform float _Bevel_Front_;uniform float _Bevel_Front_Stretch_;uniform float _Bevel_Back_;uniform float _Bevel_Back_Stretch_;uniform float _Radius_Top_Left_;uniform float _Radius_Top_Right_;uniform float _Radius_Bottom_Left_;uniform float _Radius_Bottom_Right_;uniform bool _Bulge_Enabled_;uniform float _Bulge_Height_;uniform float _Bulge_Radius_;uniform float _Sun_Intensity_;uniform float _Sun_Theta_;uniform float _Sun_Phi_;uniform float _Indirect_Diffuse_;uniform vec4 _Albedo_;uniform float _Specular_;uniform float _Shininess_;uniform float _Sharpness_;uniform float _Subsurface_;uniform vec4 _Left_Color_;uniform vec4 _Right_Color_;uniform float _Reflection_;uniform float _Front_Reflect_;uniform float _Edge_Reflect_;uniform float _Power_;uniform vec4 _Sky_Color_;uniform vec4 _Horizon_Color_;uniform vec4 _Ground_Color_;uniform float _Horizon_Power_;uniform sampler2D _Reflection_Map_;uniform sampler2D _Indirect_Environment_;uniform float _Width_;uniform float _Fuzz_;uniform float _Min_Fuzz_;uniform float _Clip_Fade_;uniform float _Hue_Shift_;uniform float _Saturation_Shift_;uniform float _Value_Shift_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform sampler2D _Blob_Texture_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform vec3 _Left_Index_Pos_;uniform vec3 _Right_Index_Pos_;uniform vec3 _Left_Index_Middle_Pos_;uniform vec3 _Right_Index_Middle_Pos_;uniform sampler2D _Decal_;uniform vec2 _Decal_Scale_XY_;uniform bool _Decal_Front_Only_;uniform float _Rim_Intensity_;uniform sampler2D _Rim_Texture_;uniform float _Rim_Hue_Shift_;uniform float _Rim_Saturation_Shift_;uniform float _Rim_Value_Shift_;uniform float _Iridescence_Intensity_;uniform sampler2D _Iridescence_Texture_;uniform bool Use_Global_Left_Index;uniform bool Use_Global_Right_Index;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;uniform vec4 Global_Left_Thumb_Tip_Position;uniform vec4 Global_Right_Thumb_Tip_Position;uniform vec4 Global_Left_Index_Middle_Position;uniform vec4 Global_Right_Index_Middle_Position;uniform float Global_Left_Index_Tip_Proximity;uniform float Global_Right_Index_Tip_Proximity;void Blob_Fragment_B180(\nsampler2D Blob_Texture,\nvec4 Blob_Info1,\nvec4 Blob_Info2,\nout vec4 Blob_Color)\n{float k1=dot(Blob_Info1.xy,Blob_Info1.xy);float k2=dot(Blob_Info2.xy,Blob_Info2.xy);vec3 closer=k10.0) {C=mix(H,S,k);} else {C=mix(H,G,k); }\nreturn C;}\nvoid Sky_Environment_B200(\nvec3 Normal,\nvec3 Reflected,\nvec4 Sky_Color,\nvec4 Horizon_Color,\nvec4 Ground_Color,\nfloat Horizon_Power,\nout vec4 Reflected_Color,\nout vec4 Indirect_Color)\n{Reflected_Color=SampleEnv_Bid200(Reflected,Sky_Color,Horizon_Color,Ground_Color,Horizon_Power);Indirect_Color=mix(Ground_Color,Sky_Color,Normal.y*0.5+0.5);}\nvoid Min_Segment_Distance_B215(\nvec3 P0,\nvec3 P1,\nvec3 Q0,\nvec3 Q1,\nout vec3 NearP,\nout vec3 NearQ,\nout float Distance)\n{vec3 u=P1-P0;vec3 v=Q1-Q0;vec3 w=P0-Q0;float a=dot(u,u);float b=dot(u,v);float c=dot(v,v);float d=dot(u,w);float e=dot(v,w);float D=a*c-b*b;float sD=D;float tD=D;float sc,sN,tc,tN;if (D<0.00001) {sN=0.0;sD=1.0;tN=e;tD=c;} else {sN=(b*e-c*d);tN=(a*e-b*d);if (sN<0.0) {sN=0.0;tN=e;tD=c;} else if (sN>sD) {sN=sD;tN=e+b;tD=c;}}\nif (tN<0.0) {tN=0.0;if (-d<0.0) {sN=0.0;} else if (-d>a) {sN=sD;} else {sN=-d;sD=a;}} else if (tN>tD) {tN=tD;if ((-d+b)<0.0) {sN=0.0;} else if ((-d+b)>a) {sN=sD;} else {sN=(-d+b);sD=a;}}\nsc=abs(sN)<0.000001 ? 0.0 : sN/sD;tc=abs(tN)<0.000001 ? 0.0 : tN/tD;NearP=P0+sc*u;NearQ=Q0+tc*v;Distance=distance(NearP,NearQ);}\nvoid To_XYZ_B224(\nvec3 Vec3,\nout float X,\nout float Y,\nout float Z)\n{X=Vec3.x;Y=Vec3.y;Z=Vec3.z;}\nvoid Finger_Positions_B214(\nvec3 Left_Index_Pos,\nvec3 Right_Index_Pos,\nvec3 Left_Index_Middle_Pos,\nvec3 Right_Index_Middle_Pos,\nout vec3 Left_Index,\nout vec3 Right_Index,\nout vec3 Left_Index_Middle,\nout vec3 Right_Index_Middle)\n{Left_Index= (Use_Global_Left_Index ? Global_Left_Index_Tip_Position.xyz : Left_Index_Pos);Right_Index= (Use_Global_Right_Index ? Global_Right_Index_Tip_Position.xyz : Right_Index_Pos);Left_Index_Middle= (Use_Global_Left_Index ? Global_Left_Index_Middle_Position.xyz : Left_Index_Middle_Pos);Right_Index_Middle= (Use_Global_Right_Index ? Global_Right_Index_Middle_Position.xyz : Right_Index_Middle_Pos);}\nvoid VaryHSV_B258(\nvec3 HSV_In,\nfloat Hue_Shift,\nfloat Saturation_Shift,\nfloat Value_Shift,\nout vec3 HSV_Out)\n{HSV_Out=vec3(fract(HSV_In.x+Hue_Shift),clamp(HSV_In.y+Saturation_Shift,0.0,1.0),clamp(HSV_In.z+Value_Shift,0.0,1.0));}\nvoid Remap_Range_B264(\nfloat In_Min,\nfloat In_Max,\nfloat Out_Min,\nfloat Out_Max,\nfloat In,\nout float Out)\n{Out=mix(Out_Min,Out_Max,clamp((In-In_Min)/(In_Max-In_Min),0.0,1.0));}\nvoid To_HSV_B225(\nvec4 Color,\nout float Hue,\nout float Saturation,\nout float Value,\nout float Alpha,\nout vec3 HSV)\n{vec4 K=vec4(0.0,-1.0/3.0,2.0/3.0,-1.0);vec4 p=Color.g0.0;Result=Position.x<0.0 ? (whichY ? Radius_Top_Left : Radius_Bottom_Left) : (whichY ? Radius_Top_Right : Radius_Bottom_Right);Result*=Radius;}\nvoid Conditional_Float_B186(\nbool Which,\nfloat If_True,\nfloat If_False,\nout float Result)\n{Result=Which ? If_True : If_False;}\nvoid Greater_Than_B187(\nfloat Left,\nfloat Right,\nout bool Not_Greater_Than,\nout bool Greater_Than)\n{Greater_Than=Left>Right;Not_Greater_Than=!Greater_Than;}\nvoid Remap_Range_B255(\nfloat In_Min,\nfloat In_Max,\nfloat Out_Min,\nfloat Out_Max,\nfloat In,\nout float Out)\n{Out=mix(Out_Min,Out_Max,clamp((In-In_Min)/(In_Max-In_Min),0.0,1.0));}\nvoid main()\n{vec2 XY_Q235;XY_Q235=(uv-vec2(0.5,0.5))*_Decal_Scale_XY_+vec2(0.5,0.5);vec3 Tangent_World_Q177;vec3 Tangent_World_N_Q177;float Tangent_Length_Q177;Tangent_World_Q177=(world*vec4(vec3(1,0,0),0.0)).xyz;Tangent_Length_Q177=length(Tangent_World_Q177);Tangent_World_N_Q177=Tangent_World_Q177/Tangent_Length_Q177;vec3 Normal_World_Q210;vec3 Normal_World_N_Q210;float Normal_Length_Q210;Object_To_World_Dir_B210(vec3(0,0,1),Normal_World_Q210,Normal_World_N_Q210,Normal_Length_Q210);float X_Q228;float Y_Q228;float Z_Q228;To_XYZ_B228(position,X_Q228,Y_Q228,Z_Q228);vec3 Nrm_World_Q176;Nrm_World_Q176=normalize((world*vec4(normal,0.0)).xyz);vec3 Binormal_World_Q178;vec3 Binormal_World_N_Q178;float Binormal_Length_Q178;Object_To_World_Dir_B178(vec3(0,1,0),Binormal_World_Q178,Binormal_World_N_Q178,Binormal_Length_Q178);float Anisotropy_Q179=Tangent_Length_Q177/Binormal_Length_Q178;float Result_Q219;Pick_Radius_B219(_Radius_,_Radius_Top_Left_,_Radius_Top_Right_,_Radius_Bottom_Left_,_Radius_Bottom_Right_,position,Result_Q219);float Anisotropy_Q203=Binormal_Length_Q178/Normal_Length_Q210;bool Not_Greater_Than_Q187;bool Greater_Than_Q187;Greater_Than_B187(Z_Q228,0.0,Not_Greater_Than_Q187,Greater_Than_Q187);vec4 Linear_Q251;Linear_Q251.rgb=clamp(_Left_Color_.rgb*_Left_Color_.rgb,0.0,1.0);Linear_Q251.a=_Left_Color_.a;vec4 Linear_Q252;Linear_Q252.rgb=clamp(_Right_Color_.rgb*_Right_Color_.rgb,0.0,1.0);Linear_Q252.a=_Right_Color_.a;vec3 Difference_Q211=vec3(0,0,0)-Normal_World_N_Q210;vec4 Out_Color_Q184=vec4(X_Q228,Y_Q228,Z_Q228,1);float Result_Q186;Conditional_Float_B186(Greater_Than_Q187,_Bevel_Back_,_Bevel_Front_,Result_Q186);float Result_Q244;Conditional_Float_B186(Greater_Than_Q187,_Bevel_Back_Stretch_,_Bevel_Front_Stretch_,Result_Q244);vec3 New_P_Q280;vec2 New_UV_Q280;float Radial_Gradient_Q280;vec3 Radial_Dir_Q280;vec3 New_Normal_Q280;Move_Verts_B280(Anisotropy_Q179,position,Result_Q219,Result_Q186,normal,Anisotropy_Q203,Result_Q244,New_P_Q280,New_UV_Q280,Radial_Gradient_Q280,Radial_Dir_Q280,New_Normal_Q280);float X_Q248;float Y_Q248;X_Q248=New_UV_Q280.x;Y_Q248=New_UV_Q280.y;vec3 Pos_World_Q162;Object_To_World_Pos_B162(New_P_Q280,Pos_World_Q162);vec3 Nrm_World_Q182;Object_To_World_Normal_B182(New_Normal_Q280,Nrm_World_Q182);vec4 Blob_Info_Q173;\n#if BLOB_ENABLE\nBlob_Vertex_B173(Pos_World_Q162,Nrm_World_Q176,Tangent_World_N_Q177,Binormal_World_N_Q178,_Blob_Position_,_Blob_Intensity_,_Blob_Near_Size_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_,_Blob_Fade_,Blob_Info_Q173);\n#else\nBlob_Info_Q173=vec4(0,0,0,0);\n#endif\nvec4 Blob_Info_Q174;\n#if BLOB_ENABLE_2\nBlob_Vertex_B174(Pos_World_Q162,Nrm_World_Q176,Tangent_World_N_Q177,Binormal_World_N_Q178,_Blob_Position_2_,_Blob_Intensity_,_Blob_Near_Size_2_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_2_,_Blob_Fade_2_,Blob_Info_Q174);\n#else\nBlob_Info_Q174=vec4(0,0,0,0);\n#endif\nfloat Out_Q255;Remap_Range_B255(0.0,1.0,0.0,1.0,X_Q248,Out_Q255);float X_Q236;float Y_Q236;float Z_Q236;To_XYZ_B228(Nrm_World_Q182,X_Q236,Y_Q236,Z_Q236);vec4 Color_At_T_Q247=mix(Linear_Q251,Linear_Q252,Out_Q255);float Minus_F_Q237=-Z_Q236;float R_Q249;float G_Q249;float B_Q249;float A_Q249;R_Q249=Color_At_T_Q247.r; G_Q249=Color_At_T_Q247.g; B_Q249=Color_At_T_Q247.b; A_Q249=Color_At_T_Q247.a;float ClampF_Q238=clamp(0.0,Minus_F_Q237,1.0);float Result_Q243;Conditional_Float_B243(_Decal_Front_Only_,ClampF_Q238,1.0,Result_Q243);vec4 Vec4_Q239=vec4(Result_Q243,Radial_Gradient_Q280,G_Q249,B_Q249);vec3 Position=Pos_World_Q162;vec3 Normal=Nrm_World_Q182;vec2 UV=XY_Q235;vec3 Tangent=Tangent_World_N_Q177;vec3 Binormal=Difference_Q211;vec4 Color=Out_Color_Q184;vec4 Extra1=Vec4_Q239;vec4 Extra2=Blob_Info_Q173;vec4 Extra3=Blob_Info_Q174;gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vColor=Color;vExtra1=Extra1;vExtra2=Extra2;vExtra3=Extra3;}";var jt=function(t){function e(){var e=t.call(this)||this;return e.SKY_ENABLED=!0,e.BLOB_ENABLE_2=!0,e.IRIDESCENCE_ENABLED=!0,e._needNormals=!0,e._needUVs=!0,e.rebuild(),e}return n(e,t),e}(h.MaterialDefines),Yt=function(t){function e(i,o){var r=t.call(this,i,o)||this;return r.radius=.157,r.bevelFront=.065,r.bevelFrontStretch=.077,r.bevelBack=.031,r.bevelBackStretch=0,r.radiusTopLeft=1,r.radiusTopRight=1,r.radiusBottomLeft=1,r.radiusBottomRight=1,r.bulgeEnabled=!1,r.bulgeHeight=-.323,r.bulgeRadius=.73,r.sunIntensity=2,r.sunTheta=.937,r.sunPhi=.555,r.indirectDiffuse=1,r.albedo=new h.Color4(.0117647,.505882,.996078,1),r.specular=0,r.shininess=10,r.sharpness=0,r.subsurface=.31,r.leftGradientColor=new h.Color4(.0117647,.505882,.996078,1),r.rightGradientColor=new h.Color4(.0117647,.505882,.996078,1),r.reflection=.749,r.frontReflect=0,r.edgeReflect=.09,r.power=8.1,r.skyColor=new h.Color4(.0117647,.960784,.996078,1),r.horizonColor=new h.Color4(.0117647,.333333,.996078,1),r.groundColor=new h.Color4(0,.254902,.996078,1),r.horizonPower=1,r.width=.02,r.fuzz=.5,r.minFuzz=.001,r.clipFade=.01,r.hueShift=0,r.saturationShift=0,r.valueShift=0,r.blobPosition=new h.Vector3(0,0,.1),r.blobIntensity=.5,r.blobNearSize=.01,r.blobFarSize=.03,r.blobNearDistance=0,r.blobFarDistance=.08,r.blobFadeLength=.576,r.blobPulse=0,r.blobFade=1,r.blobPosition2=new h.Vector3(.2,0,.1),r.blobNearSize2=.01,r.blobPulse2=0,r.blobFade2=1,r.blobTexture=new h.Texture("",r.getScene()),r.leftIndexPosition=new h.Vector3(0,0,1),r.rightIndexPosition=new h.Vector3(-1,-1,-1),r.leftIndexMiddlePosition=new h.Vector3(0,0,0),r.rightIndexMiddlePosition=new h.Vector3(0,0,0),r.decalScaleXY=new h.Vector2(1.5,1.5),r.decalFrontOnly=!0,r.rimIntensity=.287,r.rimHueShift=0,r.rimSaturationShift=0,r.rimValueShift=-1,r.iridescenceIntensity=0,r.useGlobalLeftIndex=1,r.useGlobalRightIndex=1,r.globalLeftIndexTipProximity=0,r.globalRightIndexTipProximity=0,r.globalLeftIndexTipPosition=new h.Vector4(.5,0,-.55,1),r.globaRightIndexTipPosition=new h.Vector4(0,0,0,1),r.globalLeftThumbTipPosition=new h.Vector4(.5,0,-.55,1),r.globalRightThumbTipPosition=new h.Vector4(0,0,0,1),r.globalLeftIndexMiddlePosition=new h.Vector4(.5,0,-.55,1),r.globalRightIndexMiddlePosition=new h.Vector4(0,0,0,1),r.alphaMode=h.Constants.ALPHA_DISABLE,r.backFaceCulling=!1,r._blueGradientTexture=new h.Texture(e.BLUE_GRADIENT_TEXTURE_URL,o,!0,!1,h.Texture.NEAREST_SAMPLINGMODE),r._decalTexture=new h.Texture("",r.getScene()),r._reflectionMapTexture=new h.Texture("",r.getScene()),r._indirectEnvTexture=new h.Texture("",r.getScene()),r}return n(e,t),e.prototype.needAlphaBlending=function(){return!1},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new jt);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,h.PrepareDefinesForAttributes)(t,o,!1,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new h.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,h.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[h.VertexBuffer.PositionKind];o.NORMAL&&s.push(h.VertexBuffer.NormalKind),o.UV1&&s.push(h.VertexBuffer.UVKind),o.UV2&&s.push(h.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(h.VertexBuffer.ColorKind),o.TANGENT&&s.push(h.VertexBuffer.TangentKind),(0,h.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","viewProjection","cameraPosition","_Radius_","_Bevel_Front_","_Bevel_Front_Stretch_","_Bevel_Back_","_Bevel_Back_Stretch_","_Radius_Top_Left_","_Radius_Top_Right_","_Radius_Bottom_Left_","_Radius_Bottom_Right_","_Bulge_Enabled_","_Bulge_Height_","_Bulge_Radius_","_Sun_Intensity_","_Sun_Theta_","_Sun_Phi_","_Indirect_Diffuse_","_Albedo_","_Specular_","_Shininess_","_Sharpness_","_Subsurface_","_Left_Color_","_Right_Color_","_Reflection_","_Front_Reflect_","_Edge_Reflect_","_Power_","_Sky_Color_","_Horizon_Color_","_Ground_Color_","_Horizon_Power_","_Reflection_Map_","_Indirect_Environment_","_Width_","_Fuzz_","_Min_Fuzz_","_Clip_Fade_","_Hue_Shift_","_Saturation_Shift_","_Value_Shift_","_Blob_Position_","_Blob_Intensity_","_Blob_Near_Size_","_Blob_Far_Size_","_Blob_Near_Distance_","_Blob_Far_Distance_","_Blob_Fade_Length_","_Blob_Pulse_","_Blob_Fade_","_Blob_Texture_","_Blob_Position_2_","_Blob_Near_Size_2_","_Blob_Pulse_2_","_Blob_Fade_2_","_Left_Index_Pos_","_Right_Index_Pos_","_Left_Index_Middle_Pos_","_Right_Index_Middle_Pos_","_Decal_","_Decal_Scale_XY_","_Decal_Front_Only_","_Rim_Intensity_","_Rim_Texture_","_Rim_Hue_Shift_","_Rim_Saturation_Shift_","_Rim_Value_Shift_","_Iridescence_Intensity_","_Iridescence_Texture_","Use_Global_Left_Index","Use_Global_Right_Index","Global_Left_Index_Tip_Position","Global_Right_Index_Tip_Position","Global_Left_Thumb_Tip_Position","Global_Right_Thumb_Tip_Position","Global_Left_Index_Middle_Position;","Global_Right_Index_Middle_Position","Global_Left_Index_Tip_Proximity","Global_Right_Index_Tip_Proximity"],c=["_Rim_Texture_","_Iridescence_Texture_"],u=[];(0,h.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("mrdlSliderThumb",{attributes:s,uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){if(i.materialDefines){var o=i.effect;o&&(this._activeEffect=o,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",this.getScene().getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",this.getScene().activeCamera.position),this._activeEffect.setFloat("_Radius_",this.radius),this._activeEffect.setFloat("_Bevel_Front_",this.bevelFront),this._activeEffect.setFloat("_Bevel_Front_Stretch_",this.bevelFrontStretch),this._activeEffect.setFloat("_Bevel_Back_",this.bevelBack),this._activeEffect.setFloat("_Bevel_Back_Stretch_",this.bevelBackStretch),this._activeEffect.setFloat("_Radius_Top_Left_",this.radiusTopLeft),this._activeEffect.setFloat("_Radius_Top_Right_",this.radiusTopRight),this._activeEffect.setFloat("_Radius_Bottom_Left_",this.radiusBottomLeft),this._activeEffect.setFloat("_Radius_Bottom_Right_",this.radiusBottomRight),this._activeEffect.setFloat("_Bulge_Enabled_",this.bulgeEnabled?1:0),this._activeEffect.setFloat("_Bulge_Height_",this.bulgeHeight),this._activeEffect.setFloat("_Bulge_Radius_",this.bulgeRadius),this._activeEffect.setFloat("_Sun_Intensity_",this.sunIntensity),this._activeEffect.setFloat("_Sun_Theta_",this.sunTheta),this._activeEffect.setFloat("_Sun_Phi_",this.sunPhi),this._activeEffect.setFloat("_Indirect_Diffuse_",this.indirectDiffuse),this._activeEffect.setDirectColor4("_Albedo_",this.albedo),this._activeEffect.setFloat("_Specular_",this.specular),this._activeEffect.setFloat("_Shininess_",this.shininess),this._activeEffect.setFloat("_Sharpness_",this.sharpness),this._activeEffect.setFloat("_Subsurface_",this.subsurface),this._activeEffect.setDirectColor4("_Left_Color_",this.leftGradientColor),this._activeEffect.setDirectColor4("_Right_Color_",this.rightGradientColor),this._activeEffect.setFloat("_Reflection_",this.reflection),this._activeEffect.setFloat("_Front_Reflect_",this.frontReflect),this._activeEffect.setFloat("_Edge_Reflect_",this.edgeReflect),this._activeEffect.setFloat("_Power_",this.power),this._activeEffect.setDirectColor4("_Sky_Color_",this.skyColor),this._activeEffect.setDirectColor4("_Horizon_Color_",this.horizonColor),this._activeEffect.setDirectColor4("_Ground_Color_",this.groundColor),this._activeEffect.setFloat("_Horizon_Power_",this.horizonPower),this._activeEffect.setTexture("_Reflection_Map_",this._reflectionMapTexture),this._activeEffect.setTexture("_Indirect_Environment_",this._indirectEnvTexture),this._activeEffect.setFloat("_Width_",this.width),this._activeEffect.setFloat("_Fuzz_",this.fuzz),this._activeEffect.setFloat("_Min_Fuzz_",this.minFuzz),this._activeEffect.setFloat("_Clip_Fade_",this.clipFade),this._activeEffect.setFloat("_Hue_Shift_",this.hueShift),this._activeEffect.setFloat("_Saturation_Shift_",this.saturationShift),this._activeEffect.setFloat("_Value_Shift_",this.valueShift),this._activeEffect.setVector3("_Blob_Position_",this.blobPosition),this._activeEffect.setFloat("_Blob_Intensity_",this.blobIntensity),this._activeEffect.setFloat("_Blob_Near_Size_",this.blobNearSize),this._activeEffect.setFloat("_Blob_Far_Size_",this.blobFarSize),this._activeEffect.setFloat("_Blob_Near_Distance_",this.blobNearDistance),this._activeEffect.setFloat("_Blob_Far_Distance_",this.blobFarDistance),this._activeEffect.setFloat("_Blob_Fade_Length_",this.blobFadeLength),this._activeEffect.setFloat("_Blob_Pulse_",this.blobPulse),this._activeEffect.setFloat("_Blob_Fade_",this.blobFade),this._activeEffect.setTexture("_Blob_Texture_",this.blobTexture),this._activeEffect.setVector3("_Blob_Position_2_",this.blobPosition2),this._activeEffect.setFloat("_Blob_Near_Size_2_",this.blobNearSize2),this._activeEffect.setFloat("_Blob_Pulse_2_",this.blobPulse2),this._activeEffect.setFloat("_Blob_Fade_2_",this.blobFade2),this._activeEffect.setVector3("_Left_Index_Pos_",this.leftIndexPosition),this._activeEffect.setVector3("_Right_Index_Pos_",this.rightIndexPosition),this._activeEffect.setVector3("_Left_Index_Middle_Pos_",this.leftIndexMiddlePosition),this._activeEffect.setVector3("_Right_Index_Middle_Pos_",this.rightIndexMiddlePosition),this._activeEffect.setTexture("_Decal_",this._decalTexture),this._activeEffect.setVector2("_Decal_Scale_XY_",this.decalScaleXY),this._activeEffect.setFloat("_Decal_Front_Only_",this.decalFrontOnly?1:0),this._activeEffect.setFloat("_Rim_Intensity_",this.rimIntensity),this._activeEffect.setTexture("_Rim_Texture_",this._blueGradientTexture),this._activeEffect.setFloat("_Rim_Hue_Shift_",this.rimHueShift),this._activeEffect.setFloat("_Rim_Saturation_Shift_",this.rimSaturationShift),this._activeEffect.setFloat("_Rim_Value_Shift_",this.rimValueShift),this._activeEffect.setFloat("_Iridescence_Intensity_",this.iridescenceIntensity),this._activeEffect.setTexture("_Iridescence_Texture_",this._blueGradientTexture),this._activeEffect.setFloat("Use_Global_Left_Index",this.useGlobalLeftIndex),this._activeEffect.setFloat("Use_Global_Right_Index",this.useGlobalRightIndex),this._activeEffect.setVector4("Global_Left_Index_Tip_Position",this.globalLeftIndexTipPosition),this._activeEffect.setVector4("Global_Right_Index_Tip_Position",this.globaRightIndexTipPosition),this._activeEffect.setVector4("Global_Left_Thumb_Tip_Position",this.globalLeftThumbTipPosition),this._activeEffect.setVector4("Global_Right_Thumb_Tip_Position",this.globalRightThumbTipPosition),this._activeEffect.setVector4("Global_Left_Index_Middle_Position",this.globalLeftIndexMiddlePosition),this._activeEffect.setVector4("Global_Right_Index_Middle_Position",this.globalRightIndexMiddlePosition),this._activeEffect.setFloat("Global_Left_Index_Tip_Proximity",this.globalLeftIndexTipProximity),this._activeEffect.setFloat("Global_Right_Index_Tip_Proximity",this.globalRightIndexTipProximity),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),this._reflectionMapTexture.dispose(),this._indirectEnvTexture.dispose(),this._blueGradientTexture.dispose(),this._decalTexture.dispose()},e.prototype.clone=function(t){var i=this;return h.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var e=t.prototype.serialize.call(this);return e.customType="BABYLON.MRDLSliderThumbMaterial",e},e.prototype.getClassName=function(){return"MRDLSliderThumbMaterial"},e.Parse=function(t,i,o){return h.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},e.BLUE_GRADIENT_TEXTURE_URL="https://assets.babylonjs.com/meshes/MRTK/MRDL/mrtk-mrdl-blue-gradient.png",s([(0,h.serialize)()],e.prototype,"radius",void 0),s([(0,h.serialize)()],e.prototype,"bevelFront",void 0),s([(0,h.serialize)()],e.prototype,"bevelFrontStretch",void 0),s([(0,h.serialize)()],e.prototype,"bevelBack",void 0),s([(0,h.serialize)()],e.prototype,"bevelBackStretch",void 0),s([(0,h.serialize)()],e.prototype,"radiusTopLeft",void 0),s([(0,h.serialize)()],e.prototype,"radiusTopRight",void 0),s([(0,h.serialize)()],e.prototype,"radiusBottomLeft",void 0),s([(0,h.serialize)()],e.prototype,"radiusBottomRight",void 0),s([(0,h.serialize)()],e.prototype,"bulgeEnabled",void 0),s([(0,h.serialize)()],e.prototype,"bulgeHeight",void 0),s([(0,h.serialize)()],e.prototype,"bulgeRadius",void 0),s([(0,h.serialize)()],e.prototype,"sunIntensity",void 0),s([(0,h.serialize)()],e.prototype,"sunTheta",void 0),s([(0,h.serialize)()],e.prototype,"sunPhi",void 0),s([(0,h.serialize)()],e.prototype,"indirectDiffuse",void 0),s([(0,h.serialize)()],e.prototype,"albedo",void 0),s([(0,h.serialize)()],e.prototype,"specular",void 0),s([(0,h.serialize)()],e.prototype,"shininess",void 0),s([(0,h.serialize)()],e.prototype,"sharpness",void 0),s([(0,h.serialize)()],e.prototype,"subsurface",void 0),s([(0,h.serialize)()],e.prototype,"leftGradientColor",void 0),s([(0,h.serialize)()],e.prototype,"rightGradientColor",void 0),s([(0,h.serialize)()],e.prototype,"reflection",void 0),s([(0,h.serialize)()],e.prototype,"frontReflect",void 0),s([(0,h.serialize)()],e.prototype,"edgeReflect",void 0),s([(0,h.serialize)()],e.prototype,"power",void 0),s([(0,h.serialize)()],e.prototype,"skyColor",void 0),s([(0,h.serialize)()],e.prototype,"horizonColor",void 0),s([(0,h.serialize)()],e.prototype,"groundColor",void 0),s([(0,h.serialize)()],e.prototype,"horizonPower",void 0),s([(0,h.serialize)()],e.prototype,"width",void 0),s([(0,h.serialize)()],e.prototype,"fuzz",void 0),s([(0,h.serialize)()],e.prototype,"minFuzz",void 0),s([(0,h.serialize)()],e.prototype,"clipFade",void 0),s([(0,h.serialize)()],e.prototype,"hueShift",void 0),s([(0,h.serialize)()],e.prototype,"saturationShift",void 0),s([(0,h.serialize)()],e.prototype,"valueShift",void 0),s([(0,h.serialize)()],e.prototype,"blobPosition",void 0),s([(0,h.serialize)()],e.prototype,"blobIntensity",void 0),s([(0,h.serialize)()],e.prototype,"blobNearSize",void 0),s([(0,h.serialize)()],e.prototype,"blobFarSize",void 0),s([(0,h.serialize)()],e.prototype,"blobNearDistance",void 0),s([(0,h.serialize)()],e.prototype,"blobFarDistance",void 0),s([(0,h.serialize)()],e.prototype,"blobFadeLength",void 0),s([(0,h.serialize)()],e.prototype,"blobPulse",void 0),s([(0,h.serialize)()],e.prototype,"blobFade",void 0),s([(0,h.serialize)()],e.prototype,"blobPosition2",void 0),s([(0,h.serialize)()],e.prototype,"blobNearSize2",void 0),s([(0,h.serialize)()],e.prototype,"blobPulse2",void 0),s([(0,h.serialize)()],e.prototype,"blobFade2",void 0),s([(0,h.serialize)()],e.prototype,"blobTexture",void 0),s([(0,h.serialize)()],e.prototype,"leftIndexPosition",void 0),s([(0,h.serialize)()],e.prototype,"rightIndexPosition",void 0),s([(0,h.serialize)()],e.prototype,"leftIndexMiddlePosition",void 0),s([(0,h.serialize)()],e.prototype,"rightIndexMiddlePosition",void 0),s([(0,h.serialize)()],e.prototype,"decalScaleXY",void 0),s([(0,h.serialize)()],e.prototype,"decalFrontOnly",void 0),s([(0,h.serialize)()],e.prototype,"rimIntensity",void 0),s([(0,h.serialize)()],e.prototype,"rimHueShift",void 0),s([(0,h.serialize)()],e.prototype,"rimSaturationShift",void 0),s([(0,h.serialize)()],e.prototype,"rimValueShift",void 0),s([(0,h.serialize)()],e.prototype,"iridescenceIntensity",void 0),e}(h.PushMaterial);(0,h.RegisterClass)("BABYLON.GUI.MRDLSliderThumbMaterial",Yt);h.ShaderStore.ShadersStore.mrdlBackplatePixelShader="uniform vec3 cameraPosition;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vExtra1;varying vec4 vExtra2;uniform float _Radius_;uniform float _Line_Width_;uniform bool _Absolute_Sizes_;uniform float _Filter_Width_;uniform vec4 _Base_Color_;uniform vec4 _Line_Color_;uniform float _Radius_Top_Left_;uniform float _Radius_Top_Right_;uniform float _Radius_Bottom_Left_;uniform float _Radius_Bottom_Right_;uniform float _Rate_;uniform vec4 _Highlight_Color_;uniform float _Highlight_Width_;uniform vec4 _Highlight_Transform_;uniform float _Highlight_;uniform float _Iridescence_Intensity_;uniform float _Iridescence_Edge_Intensity_;uniform vec4 _Iridescence_Tint_;uniform sampler2D _Iridescent_Map_;uniform float _Angle_;uniform bool _Reflected_;uniform float _Frequency_;uniform float _Vertical_Offset_;uniform vec4 _Gradient_Color_;uniform vec4 _Top_Left_;uniform vec4 _Top_Right_;uniform vec4 _Bottom_Left_;uniform vec4 _Bottom_Right_;uniform float _Edge_Width_;uniform float _Edge_Power_;uniform float _Line_Gradient_Blend_;uniform float _Fade_Out_;void FastLinearTosRGB_B353(\nvec4 Linear,\nout vec4 sRGB)\n{sRGB.rgb=sqrt(clamp(Linear.rgb,0.0,1.0));sRGB.a=Linear.a;}\nvoid Round_Rect_Fragment_B332(\nfloat Radius,\nfloat Line_Width,\nvec4 Line_Color,\nfloat Filter_Width,\nvec2 UV,\nfloat Line_Visibility,\nvec4 Rect_Parms,\nvec4 Fill_Color,\nout vec4 Color)\n{float d=length(max(abs(UV)-Rect_Parms.xy,0.0));float dx=max(fwidth(d)*Filter_Width,0.00001);float g=min(Rect_Parms.z,Rect_Parms.w);float dgrad=max(fwidth(g)*Filter_Width,0.00001);float Inside_Rect=clamp(g/dgrad,0.0,1.0);float inner=clamp((d+dx*0.5-max(Radius-Line_Width,d-dx*0.5))/dx,0.0,1.0);Color=clamp(mix(Fill_Color,Line_Color,inner),0.0,1.0)*Inside_Rect;}\nvoid Iridescence_B343(\nvec3 Position,\nvec3 Normal,\nvec2 UV,\nvec3 Axis,\nvec3 Eye,\nvec4 Tint,\nsampler2D Texture,\nbool Reflected,\nfloat Frequency,\nfloat Vertical_Offset,\nout vec4 Color)\n{vec3 i=normalize(Position-Eye);vec3 r=reflect(i,Normal);float idota=dot(i,Axis);float idotr=dot(i,r);float x=Reflected ? idotr : idota;vec2 xy;xy.x=fract((x*Frequency+1.0)*0.5+UV.y*Vertical_Offset);xy.y=0.5;Color=texture(Texture,xy);Color.rgb*=Tint.rgb;}\nvoid Scale_RGB_B346(\nvec4 Color,\nfloat Scalar,\nout vec4 Result)\n{Result=vec4(Scalar,Scalar,Scalar,1)*Color;}\nvoid Scale_RGB_B344(\nfloat Scalar,\nvec4 Color,\nout vec4 Result)\n{Result=vec4(Scalar,Scalar,Scalar,1)*Color;}\nvoid Line_Fragment_B362(\nvec4 Base_Color,\nvec4 Highlight_Color,\nfloat Highlight_Width,\nvec3 Line_Vertex,\nfloat Highlight,\nout vec4 Line_Color)\n{float k2=1.0-clamp(abs(Line_Vertex.y/Highlight_Width),0.0,1.0);Line_Color=mix(Base_Color,Highlight_Color,Highlight*k2);}\nvoid Edge_B356(\nvec4 RectParms,\nfloat Radius,\nfloat Line_Width,\nvec2 UV,\nfloat Edge_Width,\nfloat Edge_Power,\nout float Result)\n{float d=length(max(abs(UV)-RectParms.xy,0.0));float edge=1.0-clamp((1.0-d/(Radius-Line_Width))/Edge_Width,0.0,1.0);Result=pow(edge,Edge_Power);}\nvoid Gradient_B355(\nvec4 Gradient_Color,\nvec4 Top_Left,\nvec4 Top_Right,\nvec4 Bottom_Left,\nvec4 Bottom_Right,\nvec2 UV,\nout vec4 Result)\n{vec3 top=Top_Left.rgb+(Top_Right.rgb-Top_Left.rgb)*UV.x;vec3 bottom=Bottom_Left.rgb+(Bottom_Right.rgb-Bottom_Left.rgb)*UV.x;Result.rgb=Gradient_Color.rgb*(bottom+(top-bottom)*UV.y);Result.a=1.0;}\nvoid main()\n{float X_Q338;float Y_Q338;float Z_Q338;float W_Q338;X_Q338=vExtra2.x;Y_Q338=vExtra2.y;Z_Q338=vExtra2.z;W_Q338=vExtra2.w;vec4 Color_Q343;\n#if IRIDESCENCE_ENABLE\nIridescence_B343(vPosition,vNormal,vUV,vBinormal,cameraPosition,_Iridescence_Tint_,_Iridescent_Map_,_Reflected_,_Frequency_,_Vertical_Offset_,Color_Q343);\n#else\nColor_Q343=vec4(0,0,0,0);\n#endif\nvec4 Result_Q344;Scale_RGB_B344(_Iridescence_Intensity_,Color_Q343,Result_Q344);vec4 Line_Color_Q362;Line_Fragment_B362(_Line_Color_,_Highlight_Color_,_Highlight_Width_,vTangent,_Highlight_,Line_Color_Q362);float Result_Q356;\n#if EDGE_ONLY\nEdge_B356(vExtra1,Z_Q338,W_Q338,vUV,_Edge_Width_,_Edge_Power_,Result_Q356);\n#else\nResult_Q356=1.0;\n#endif\nvec2 Vec2_Q339=vec2(X_Q338,Y_Q338);vec4 Result_Q355;Gradient_B355(_Gradient_Color_,_Top_Left_,_Top_Right_,_Bottom_Left_,_Bottom_Right_,Vec2_Q339,Result_Q355);vec4 Linear_Q348;Linear_Q348.rgb=clamp(Result_Q355.rgb*Result_Q355.rgb,0.0,1.0);Linear_Q348.a=Result_Q355.a;vec4 Result_Q346;Scale_RGB_B346(Linear_Q348,Result_Q356,Result_Q346);vec4 Sum_Q345=Result_Q346+Result_Q344;vec4 Color_At_T_Q347=mix(Line_Color_Q362,Result_Q346,_Line_Gradient_Blend_);vec4 Base_And_Iridescent_Q350;Base_And_Iridescent_Q350=_Base_Color_+vec4(Sum_Q345.rgb,0.0);vec4 Sum_Q349=Color_At_T_Q347+_Iridescence_Edge_Intensity_*Color_Q343;vec4 Result_Q351=Sum_Q349; Result_Q351.a=1.0;vec4 Color_Q332;Round_Rect_Fragment_B332(Z_Q338,W_Q338,Result_Q351,_Filter_Width_,vUV,1.0,vExtra1,Base_And_Iridescent_Q350,Color_Q332);vec4 Result_Q354=_Fade_Out_*Color_Q332;vec4 sRGB_Q353;FastLinearTosRGB_B353(Result_Q354,sRGB_Q353);vec4 Out_Color=sRGB_Q353;float Clip_Threshold=0.001;bool To_sRGB=false;gl_FragColor=Out_Color;}";h.ShaderStore.ShadersStore.mrdlBackplateVertexShader="uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec3 tangent;uniform float _Radius_;uniform float _Line_Width_;uniform bool _Absolute_Sizes_;uniform float _Filter_Width_;uniform vec4 _Base_Color_;uniform vec4 _Line_Color_;uniform float _Radius_Top_Left_;uniform float _Radius_Top_Right_;uniform float _Radius_Bottom_Left_;uniform float _Radius_Bottom_Right_;uniform float _Rate_;uniform vec4 _Highlight_Color_;uniform float _Highlight_Width_;uniform vec4 _Highlight_Transform_;uniform float _Highlight_;uniform float _Iridescence_Intensity_;uniform float _Iridescence_Edge_Intensity_;uniform vec4 _Iridescence_Tint_;uniform sampler2D _Iridescent_Map_;uniform float _Angle_;uniform bool _Reflected_;uniform float _Frequency_;uniform float _Vertical_Offset_;uniform vec4 _Gradient_Color_;uniform vec4 _Top_Left_;uniform vec4 _Top_Right_;uniform vec4 _Bottom_Left_;uniform vec4 _Bottom_Right_;uniform float _Edge_Width_;uniform float _Edge_Power_;uniform float _Line_Gradient_Blend_;uniform float _Fade_Out_;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vExtra1;varying vec4 vExtra2;void Object_To_World_Pos_B314(\nvec3 Pos_Object,\nout vec3 Pos_World)\n{Pos_World=(world*vec4(Pos_Object,1.0)).xyz;}\nvoid Round_Rect_Vertex_B357(\nvec2 UV,\nfloat Radius,\nfloat Margin,\nfloat Anisotropy,\nfloat Gradient1,\nfloat Gradient2,\nvec3 Normal,\nvec4 Color_Scale_Translate,\nout vec2 Rect_UV,\nout vec4 Rect_Parms,\nout vec2 Scale_XY,\nout vec2 Line_UV,\nout vec2 Color_UV_Info)\n{Scale_XY=vec2(Anisotropy,1.0);Line_UV=(UV-vec2(0.5,0.5));Rect_UV=Line_UV*Scale_XY;Rect_Parms.xy=Scale_XY*0.5-vec2(Radius,Radius)-vec2(Margin,Margin);Rect_Parms.z=Gradient1; \nRect_Parms.w=Gradient2;Color_UV_Info=(Line_UV+vec2(0.5,0.5))*Color_Scale_Translate.xy+Color_Scale_Translate.zw;}\nvoid Line_Vertex_B333(\nvec2 Scale_XY,\nvec2 UV,\nfloat Time,\nfloat Rate,\nvec4 Highlight_Transform,\nout vec3 Line_Vertex)\n{float angle2=(Rate*Time)*2.0*3.1416;float sinAngle2=sin(angle2);float cosAngle2=cos(angle2);vec2 xformUV=UV*Highlight_Transform.xy+Highlight_Transform.zw;Line_Vertex.x=0.0;Line_Vertex.y=cosAngle2*xformUV.x-sinAngle2*xformUV.y;Line_Vertex.z=0.0; }\nvoid PickDir_B334(\nfloat Degrees,\nvec3 DirX,\nvec3 DirY,\nout vec3 Dir)\n{float a=Degrees*3.14159/180.0;Dir=cos(a)*DirX+sin(a)*DirY;}\nvoid Move_Verts_B327(\nfloat Anisotropy,\nvec3 P,\nfloat Radius,\nout vec3 New_P,\nout vec2 New_UV,\nout float Radial_Gradient,\nout vec3 Radial_Dir)\n{vec2 UV=P.xy*2.0+0.5;vec2 center=clamp(UV,0.0,1.0);vec2 delta=UV-center;vec2 r2=2.0*vec2(Radius/Anisotropy,Radius);New_UV=center+r2*(UV-2.0*center+0.5);New_P=vec3(New_UV-0.5,P.z);Radial_Gradient=1.0-length(delta)*2.0;Radial_Dir=vec3(delta*r2,0.0);}\nvoid Pick_Radius_B336(\nfloat Radius,\nfloat Radius_Top_Left,\nfloat Radius_Top_Right,\nfloat Radius_Bottom_Left,\nfloat Radius_Bottom_Right,\nvec3 Position,\nout float Result)\n{bool whichY=Position.y>0.0;Result=Position.x<0.0 ? (whichY ? Radius_Top_Left : Radius_Bottom_Left) : (whichY ? Radius_Top_Right : Radius_Bottom_Right);Result*=Radius;}\nvoid Edge_AA_Vertex_B328(\nvec3 Position_World,\nvec3 Position_Object,\nvec3 Normal_Object,\nvec3 Eye,\nfloat Radial_Gradient,\nvec3 Radial_Dir,\nvec3 Tangent,\nout float Gradient1,\nout float Gradient2)\n{vec3 I=(Eye-Position_World);vec3 T=(vec4(Tangent,0.0)).xyz;float g=(dot(T,I)<0.0) ? 0.0 : 1.0;if (Normal_Object.z==0.0) { \nGradient1=Position_Object.z>0.0 ? g : 1.0;Gradient2=Position_Object.z>0.0 ? 1.0 : g;} else {Gradient1=g+(1.0-g)*(Radial_Gradient);Gradient2=1.0;}}\nvoid Object_To_World_Dir_B330(\nvec3 Dir_Object,\nout vec3 Binormal_World,\nout vec3 Binormal_World_N,\nout float Binormal_Length)\n{Binormal_World=(world*vec4(Dir_Object,0.0)).xyz;Binormal_Length=length(Binormal_World);Binormal_World_N=Binormal_World/Binormal_Length;}\nvoid RelativeOrAbsoluteDetail_B341(\nfloat Nominal_Radius,\nfloat Nominal_LineWidth,\nbool Absolute_Measurements,\nfloat Height,\nout float Radius,\nout float Line_Width)\n{float scale=Absolute_Measurements ? 1.0/Height : 1.0;Radius=Nominal_Radius*scale;Line_Width=Nominal_LineWidth*scale;}\nvoid main()\n{vec3 Nrm_World_Q326;Nrm_World_Q326=normalize((world*vec4(normal,0.0)).xyz);vec3 Tangent_World_Q329;vec3 Tangent_World_N_Q329;float Tangent_Length_Q329;Tangent_World_Q329=(world*vec4(vec3(1,0,0),0.0)).xyz;Tangent_Length_Q329=length(Tangent_World_Q329);Tangent_World_N_Q329=Tangent_World_Q329/Tangent_Length_Q329;vec3 Binormal_World_Q330;vec3 Binormal_World_N_Q330;float Binormal_Length_Q330;Object_To_World_Dir_B330(vec3(0,1,0),Binormal_World_Q330,Binormal_World_N_Q330,Binormal_Length_Q330);float Radius_Q341;float Line_Width_Q341;RelativeOrAbsoluteDetail_B341(_Radius_,_Line_Width_,_Absolute_Sizes_,Binormal_Length_Q330,Radius_Q341,Line_Width_Q341);vec3 Dir_Q334;PickDir_B334(_Angle_,Tangent_World_N_Q329,Binormal_World_N_Q330,Dir_Q334);float Result_Q336;Pick_Radius_B336(Radius_Q341,_Radius_Top_Left_,_Radius_Top_Right_,_Radius_Bottom_Left_,_Radius_Bottom_Right_,position,Result_Q336);float Anisotropy_Q331=Tangent_Length_Q329/Binormal_Length_Q330;vec4 Out_Color_Q337=vec4(Result_Q336,Line_Width_Q341,0,1);vec3 New_P_Q327;vec2 New_UV_Q327;float Radial_Gradient_Q327;vec3 Radial_Dir_Q327;Move_Verts_B327(Anisotropy_Q331,position,Result_Q336,New_P_Q327,New_UV_Q327,Radial_Gradient_Q327,Radial_Dir_Q327);vec3 Pos_World_Q314;Object_To_World_Pos_B314(New_P_Q327,Pos_World_Q314);float Gradient1_Q328;float Gradient2_Q328;\n#if SMOOTH_EDGES\nEdge_AA_Vertex_B328(Pos_World_Q314,position,normal,cameraPosition,Radial_Gradient_Q327,Radial_Dir_Q327,tangent,Gradient1_Q328,Gradient2_Q328);\n#else\nGradient1_Q328=1.0;Gradient2_Q328=1.0;\n#endif\nvec2 Rect_UV_Q357;vec4 Rect_Parms_Q357;vec2 Scale_XY_Q357;vec2 Line_UV_Q357;vec2 Color_UV_Info_Q357;Round_Rect_Vertex_B357(New_UV_Q327,Result_Q336,0.0,Anisotropy_Q331,Gradient1_Q328,Gradient2_Q328,normal,vec4(1,1,0,0),Rect_UV_Q357,Rect_Parms_Q357,Scale_XY_Q357,Line_UV_Q357,Color_UV_Info_Q357);vec3 Line_Vertex_Q333;Line_Vertex_B333(Scale_XY_Q357,Line_UV_Q357,(20.0),_Rate_,_Highlight_Transform_,Line_Vertex_Q333);float X_Q359;float Y_Q359;X_Q359=Color_UV_Info_Q357.x;Y_Q359=Color_UV_Info_Q357.y;vec4 Vec4_Q358=vec4(X_Q359,Y_Q359,Result_Q336,Line_Width_Q341);vec3 Position=Pos_World_Q314;vec3 Normal=Nrm_World_Q326;vec2 UV=Rect_UV_Q357;vec3 Tangent=Line_Vertex_Q333;vec3 Binormal=Dir_Q334;vec4 Color=Out_Color_Q337;vec4 Extra1=Rect_Parms_Q357;vec4 Extra2=Vec4_Q358;vec4 Extra3=vec4(0,0,0,0);gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vExtra1=Extra1;vExtra2=Extra2;}";var Xt=function(t){function e(){var e=t.call(this)||this;return e.IRIDESCENCE_ENABLE=!0,e.SMOOTH_EDGES=!0,e._needNormals=!0,e.rebuild(),e}return n(e,t),e}(h.MaterialDefines),Kt=function(t){function e(i,o){var r=t.call(this,i,o)||this;return r.radius=.3,r.lineWidth=.003,r.absoluteSizes=!1,r._filterWidth=1,r.baseColor=new h.Color4(0,0,0,1),r.lineColor=new h.Color4(.2,.262745,.4,1),r.radiusTopLeft=1,r.radiusTopRight=1,r.radiusBottomLeft=1,r.radiusBottomRight=1,r._rate=0,r.highlightColor=new h.Color4(.239216,.435294,.827451,1),r.highlightWidth=0,r._highlightTransform=new h.Vector4(1,1,0,0),r._highlight=1,r.iridescenceIntensity=.45,r.iridescenceEdgeIntensity=1,r.iridescenceTint=new h.Color4(1,1,1,1),r._angle=-45,r.fadeOut=1,r._reflected=!0,r._frequency=1,r._verticalOffset=0,r.gradientColor=new h.Color4(.74902,.74902,.74902,1),r.topLeftGradientColor=new h.Color4(.00784314,.294118,.580392,1),r.topRightGradientColor=new h.Color4(.305882,0,1,1),r.bottomLeftGradientColor=new h.Color4(.133333,.258824,.992157,1),r.bottomRightGradientColor=new h.Color4(.176471,.176471,.619608,1),r.edgeWidth=.5,r.edgePower=1,r.edgeLineGradientBlend=.5,r.alphaMode=h.Constants.ALPHA_DISABLE,r.backFaceCulling=!1,r._iridescentMapTexture=new h.Texture(e.IRIDESCENT_MAP_TEXTURE_URL,r.getScene(),!0,!1,h.Texture.NEAREST_SAMPLINGMODE),r}return n(e,t),e.prototype.needAlphaBlending=function(){return!1},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new Xt);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,h.PrepareDefinesForAttributes)(t,o,!1,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new h.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,h.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[h.VertexBuffer.PositionKind];o.NORMAL&&s.push(h.VertexBuffer.NormalKind),o.UV1&&s.push(h.VertexBuffer.UVKind),o.UV2&&s.push(h.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(h.VertexBuffer.ColorKind),o.TANGENT&&s.push(h.VertexBuffer.TangentKind),(0,h.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","viewProjection","cameraPosition","_Radius_","_Line_Width_","_Absolute_Sizes_","_Filter_Width_","_Base_Color_","_Line_Color_","_Radius_Top_Left_","_Radius_Top_Right_","_Radius_Bottom_Left_","_Radius_Bottom_Right_","_Rate_","_Highlight_Color_","_Highlight_Width_","_Highlight_Transform_","_Highlight_","_Iridescence_Intensity_","_Iridescence_Edge_Intensity_","_Iridescence_Tint_","_Iridescent_Map_","_Angle_","_Reflected_","_Frequency_","_Vertical_Offset_","_Gradient_Color_","_Top_Left_","_Top_Right_","_Bottom_Left_","_Bottom_Right_","_Edge_Width_","_Edge_Power_","_Line_Gradient_Blend_","_Fade_Out_"],c=["_Iridescent_Map_"],u=[];(0,h.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("mrdlBackplate",{attributes:s,uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){if(i.materialDefines){var o=i.effect;o&&(this._activeEffect=o,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",this.getScene().getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",this.getScene().activeCamera.position),this._activeEffect.setFloat("_Radius_",this.radius),this._activeEffect.setFloat("_Line_Width_",this.lineWidth),this._activeEffect.setFloat("_Absolute_Sizes_",this.absoluteSizes?1:0),this._activeEffect.setFloat("_Filter_Width_",this._filterWidth),this._activeEffect.setDirectColor4("_Base_Color_",this.baseColor),this._activeEffect.setDirectColor4("_Line_Color_",this.lineColor),this._activeEffect.setFloat("_Radius_Top_Left_",this.radiusTopLeft),this._activeEffect.setFloat("_Radius_Top_Right_",this.radiusTopRight),this._activeEffect.setFloat("_Radius_Bottom_Left_",this.radiusBottomLeft),this._activeEffect.setFloat("_Radius_Bottom_Right_",this.radiusBottomRight),this._activeEffect.setFloat("_Rate_",this._rate),this._activeEffect.setDirectColor4("_Highlight_Color_",this.highlightColor),this._activeEffect.setFloat("_Highlight_Width_",this.highlightWidth),this._activeEffect.setVector4("_Highlight_Transform_",this._highlightTransform),this._activeEffect.setFloat("_Highlight_",this._highlight),this._activeEffect.setFloat("_Iridescence_Intensity_",this.iridescenceIntensity),this._activeEffect.setFloat("_Iridescence_Edge_Intensity_",this.iridescenceEdgeIntensity),this._activeEffect.setDirectColor4("_Iridescence_Tint_",this.iridescenceTint),this._activeEffect.setTexture("_Iridescent_Map_",this._iridescentMapTexture),this._activeEffect.setFloat("_Angle_",this._angle),this._activeEffect.setFloat("_Reflected_",this._reflected?1:0),this._activeEffect.setFloat("_Frequency_",this._frequency),this._activeEffect.setFloat("_Vertical_Offset_",this._verticalOffset),this._activeEffect.setDirectColor4("_Gradient_Color_",this.gradientColor),this._activeEffect.setDirectColor4("_Top_Left_",this.topLeftGradientColor),this._activeEffect.setDirectColor4("_Top_Right_",this.topRightGradientColor),this._activeEffect.setDirectColor4("_Bottom_Left_",this.bottomLeftGradientColor),this._activeEffect.setDirectColor4("_Bottom_Right_",this.bottomRightGradientColor),this._activeEffect.setFloat("_Edge_Width_",this.edgeWidth),this._activeEffect.setFloat("_Edge_Power_",this.edgePower),this._activeEffect.setFloat("_Line_Gradient_Blend_",this.edgeLineGradientBlend),this._activeEffect.setFloat("_Fade_Out_",this.fadeOut),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e)},e.prototype.clone=function(t){var i=this;return h.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var e=t.prototype.serialize.call(this);return e.customType="BABYLON.MRDLBackplateMaterial",e},e.prototype.getClassName=function(){return"MRDLBackplateMaterial"},e.Parse=function(t,i,o){return h.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},e.IRIDESCENT_MAP_TEXTURE_URL="https://assets.babylonjs.com/meshes/MRTK/MRDL/mrtk-mrdl-backplate-iridescence.png",s([(0,h.serialize)()],e.prototype,"radius",void 0),s([(0,h.serialize)()],e.prototype,"lineWidth",void 0),s([(0,h.serialize)()],e.prototype,"absoluteSizes",void 0),s([(0,h.serialize)()],e.prototype,"baseColor",void 0),s([(0,h.serialize)()],e.prototype,"lineColor",void 0),s([(0,h.serialize)()],e.prototype,"radiusTopLeft",void 0),s([(0,h.serialize)()],e.prototype,"radiusTopRight",void 0),s([(0,h.serialize)()],e.prototype,"radiusBottomLeft",void 0),s([(0,h.serialize)()],e.prototype,"radiusBottomRight",void 0),s([(0,h.serialize)()],e.prototype,"highlightColor",void 0),s([(0,h.serialize)()],e.prototype,"highlightWidth",void 0),s([(0,h.serialize)()],e.prototype,"iridescenceIntensity",void 0),s([(0,h.serialize)()],e.prototype,"iridescenceEdgeIntensity",void 0),s([(0,h.serialize)()],e.prototype,"iridescenceTint",void 0),s([(0,h.serialize)()],e.prototype,"fadeOut",void 0),s([(0,h.serialize)()],e.prototype,"gradientColor",void 0),s([(0,h.serialize)()],e.prototype,"topLeftGradientColor",void 0),s([(0,h.serialize)()],e.prototype,"topRightGradientColor",void 0),s([(0,h.serialize)()],e.prototype,"bottomLeftGradientColor",void 0),s([(0,h.serialize)()],e.prototype,"bottomRightGradientColor",void 0),s([(0,h.serialize)()],e.prototype,"edgeWidth",void 0),s([(0,h.serialize)()],e.prototype,"edgePower",void 0),s([(0,h.serialize)()],e.prototype,"edgeLineGradientBlend",void 0),e}(h.PushMaterial);(0,h.RegisterClass)("BABYLON.GUI.MRDLBackplateMaterial",Kt);var Zt=function(t){function e(e,i){var o=t.call(this,e)||this;return o.onValueChangedObservable=new h.Observable,o._sliderBackplateVisible=i||!1,o._minimum=0,o._maximum=100,o._step=0,o._value=50,o}return n(e,t),Object.defineProperty(e.prototype,"mesh",{get:function(){return this.node?this._sliderThumb:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minimum",{get:function(){return this._minimum},set:function(t){this._minimum!==t&&(this._minimum=Math.max(t,0),this._value=Math.max(Math.min(this._value,this._maximum),this._minimum))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maximum",{get:function(){return this._maximum},set:function(t){this._maximum!==t&&(this._maximum=Math.max(t,this._minimum),this._value=Math.max(Math.min(this._value,this._maximum),this._minimum))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this._step},set:function(t){this._step!==t&&(this._step=Math.max(Math.min(t,this._maximum-this._minimum),0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){this._value!==t&&(this._value=Math.max(Math.min(t,this._maximum),this._minimum),this._sliderThumb&&(this._sliderThumb.position.x=this._convertToPosition(this.value)),this.onValueChangedObservable.notifyObservers(this._value))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this.node?this._sliderBar.position.x-this._sliderBar.scaling.x/2:-.5},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this.node?this._sliderBar.position.x+this._sliderBar.scaling.x/2:.5},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliderBarMaterial",{get:function(){return this._sliderBarMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliderThumbMaterial",{get:function(){return this._sliderThumbMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliderBackplateMaterial",{get:function(){return this._sliderBackplateMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliderBar",{get:function(){return this._sliderBar},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliderThumb",{get:function(){return this._sliderThumb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliderBackplate",{get:function(){return this._sliderBackplate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isVisible",{set:function(t){var e;this._isVisible!==t&&(this._isVisible=t,null===(e=this.node)||void 0===e||e.setEnabled(t))},enumerable:!1,configurable:!0}),e.prototype._createNode=function(t){var i=this,o=(0,h.CreateBox)("".concat(this.name,"_sliderbackplate"),{width:1,height:1,depth:1},t);return o.isPickable=!1,o.visibility=0,o.scaling=new h.Vector3(1,.5,.8),h.SceneLoader.ImportMeshAsync(void 0,e.MODEL_BASE_URL,e.MODEL_FILENAME,t).then((function(t){t.meshes.forEach((function(t){t.isPickable=!1}));var e=t.meshes[1],r=t.meshes[1].clone("".concat(i.name,"_sliderbar"),o),n=t.meshes[1].clone("".concat(i.name,"_sliderthumb"),o);e.visibility=0,i._sliderBackplateVisible&&(e.visibility=1,e.name="".concat(i.name,"_sliderbackplate"),e.scaling.x=1,e.scaling.z=.2,e.parent=o,i._sliderBackplateMaterial&&(e.material=i._sliderBackplateMaterial),i._sliderBackplate=e),r&&(r.parent=o,r.position.z=-.1,r.scaling=new h.Vector3(.8,.04,.3),i._sliderBarMaterial&&(r.material=i._sliderBarMaterial),i._sliderBar=r),n&&(n.parent=o,n.isPickable=!0,n.position.z=-.115,n.scaling=new h.Vector3(.025,.3,.6),n.position.x=i._convertToPosition(i.value),n.addBehavior(i._createBehavior()),i._sliderThumbMaterial&&(n.material=i._sliderThumbMaterial),i._sliderThumb=n),i._injectGUI3DReservedDataStore(o).control=i,o.getChildMeshes().forEach((function(t){i._injectGUI3DReservedDataStore(t).control=i}))})),this._affectMaterial(o),o},e.prototype._affectMaterial=function(t){var e,i,o;this._sliderBackplateMaterial=null!==(e=this._sliderBackplateMaterial)&&void 0!==e?e:new Kt("".concat(this.name,"_sliderbackplate_material"),t.getScene()),this._sliderBarMaterial=null!==(i=this._sliderBarMaterial)&&void 0!==i?i:new Ut("".concat(this.name,"_sliderbar_material"),t.getScene()),this._sliderThumbMaterial=null!==(o=this._sliderThumbMaterial)&&void 0!==o?o:new Yt("".concat(this.name,"_sliderthumb_material"),t.getScene())},e.prototype._createBehavior=function(){var t=this,e=new h.PointerDragBehavior({dragAxis:h.Vector3.Right()});return e.moveAttached=!1,e.onDragStartObservable.add((function(){t._draggedPosition=t._sliderThumb.position.x})),e.onDragObservable.add((function(e){t._draggedPosition+=e.dragDistance/t.scaling.x,t.value=t._convertToValue(t._draggedPosition)})),e},e.prototype._convertToPosition=function(t){var e=(t-this.minimum)/(this.maximum-this.minimum)*(this.end-this.start)+this.start;return Math.min(Math.max(e,this.start),this.end)},e.prototype._convertToValue=function(t){var e=(t-this.start)/(this.end-this.start)*(this.maximum-this.minimum);return e=this.step?Math.round(e/this.step)*this.step:e,Math.max(Math.min(this.minimum+e,this._maximum),this._minimum)},e.prototype.dispose=function(){var e,i,o,r,n,a;t.prototype.dispose.call(this),null===(e=this._sliderBar)||void 0===e||e.dispose(),null===(i=this._sliderThumb)||void 0===i||i.dispose(),null===(o=this._sliderBarMaterial)||void 0===o||o.dispose(),null===(r=this._sliderThumbMaterial)||void 0===r||r.dispose(),null===(n=this._sliderBackplate)||void 0===n||n.dispose(),null===(a=this._sliderBackplateMaterial)||void 0===a||a.dispose()},e.MODEL_BASE_URL="https://assets.babylonjs.com/meshes/MRTK/",e.MODEL_FILENAME="mrtk-fluent-backplate.glb",e}(dt),qt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._radius=5,e}return n(e,t),Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(t){var e=this;this._radius!==t&&(this._radius=t,h.Tools.SetImmediate((function(){e._arrangeChildren()})))},enumerable:!1,configurable:!0}),e.prototype._mapGridNode=function(t,e){var i=t.mesh;if(i){var o=this._sphericalMapping(e);switch(t.position=o,this.orientation){case bt.FACEORIGIN_ORIENTATION:i.lookAt(new h.Vector3(2*o.x,2*o.y,2*o.z));break;case bt.FACEORIGINREVERSED_ORIENTATION:i.lookAt(new h.Vector3(-o.x,-o.y,-o.z));break;case bt.FACEFORWARD_ORIENTATION:break;case bt.FACEFORWARDREVERSED_ORIENTATION:i.rotate(h.Axis.Y,Math.PI,0)}}},e.prototype._sphericalMapping=function(t){var e=new h.Vector3(0,0,this._radius),i=t.y/this._radius,o=-t.x/this._radius;return h.Matrix.RotationYawPitchRollToRef(o,i,0,h.TmpVectors.Matrix[0]),h.Vector3.TransformNormal(e,h.TmpVectors.Matrix[0])},e}(mt),Jt=function(t){function e(e){void 0===e&&(e=!1);var i=t.call(this)||this;return i._isVertical=!1,i.margin=.1,i._isVertical=e,i}return n(e,t),Object.defineProperty(e.prototype,"isVertical",{get:function(){return this._isVertical},set:function(t){var e=this;this._isVertical!==t&&(this._isVertical=t,h.Tools.SetImmediate((function(){e._arrangeChildren()})))},enumerable:!1,configurable:!0}),e.prototype._arrangeChildren=function(){for(var t,e=0,i=0,o=0,r=[],n=h.Matrix.Invert(this.node.computeWorldMatrix(!0)),a=0,s=this._children;a0?this.margin:0)}},e}(bt),$t=function(t){function e(e,i){var o=t.call(this,i,e)||this;return o._currentMesh=e,o.pointerEnterAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(1.1)},o.pointerOutAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(1/1.1)},o.pointerDownAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(.95)},o.pointerUpAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(1/.95)},o}return n(e,t),e.prototype._getTypeName=function(){return"TouchMeshButton3D"},e.prototype._createNode=function(){var t=this;return this._currentMesh.getChildMeshes().forEach((function(e){t._injectGUI3DReservedDataStore(e).control=t})),this._currentMesh},e.prototype._affectMaterial=function(t){},e}(wt);h.ShaderStore.ShadersStore.mrdlBackglowPixelShader="uniform vec3 cameraPosition;varying vec3 vNormal;varying vec2 vUV;uniform float _Bevel_Radius_;uniform float _Line_Width_;uniform bool _Absolute_Sizes_;uniform float _Tuning_Motion_;uniform float _Motion_;uniform float _Max_Intensity_;uniform float _Intensity_Fade_In_Exponent_;uniform float _Outer_Fuzz_Start_;uniform float _Outer_Fuzz_End_;uniform vec4 _Color_;uniform vec4 _Inner_Color_;uniform float _Blend_Exponent_;uniform float _Falloff_;uniform float _Bias_;float BiasFunc(float b,float v) {return pow(v,log(clamp(b,0.001,0.999))/log(0.5));}\nvoid Fuzzy_Round_Rect_B33(\nfloat Size_X,\nfloat Size_Y,\nfloat Radius_X,\nfloat Radius_Y,\nfloat Line_Width,\nvec2 UV,\nfloat Outer_Fuzz,\nfloat Max_Outer_Fuzz,\nout float Rect_Distance,\nout float Inner_Distance)\n{vec2 halfSize=vec2(Size_X,Size_Y)*0.5;vec2 r=max(min(vec2(Radius_X,Radius_Y),halfSize),vec2(0.001,0.001));float radius=min(r.x,r.y)-Max_Outer_Fuzz;vec2 v=abs(UV);vec2 nearestp=min(v,halfSize-r);float d=distance(nearestp,v);Inner_Distance=clamp(1.0-(radius-d)/Line_Width,0.0,1.0);Rect_Distance=clamp(1.0-(d-radius)/Outer_Fuzz,0.0,1.0)*Inner_Distance;}\nvoid main()\n{float X_Q42;float Y_Q42;X_Q42=vNormal.x;Y_Q42=vNormal.y;float MaxAB_Q24=max(_Tuning_Motion_,_Motion_);float Sqrt_F_Q27=sqrt(MaxAB_Q24);float Power_Q43=pow(MaxAB_Q24,_Intensity_Fade_In_Exponent_);float Value_At_T_Q26=mix(_Outer_Fuzz_Start_,_Outer_Fuzz_End_,Sqrt_F_Q27);float Product_Q23=_Max_Intensity_*Power_Q43;float Rect_Distance_Q33;float Inner_Distance_Q33;Fuzzy_Round_Rect_B33(X_Q42,Y_Q42,_Bevel_Radius_,_Bevel_Radius_,_Line_Width_,vUV,Value_At_T_Q26,_Outer_Fuzz_Start_,Rect_Distance_Q33,Inner_Distance_Q33);float Power_Q44=pow(Inner_Distance_Q33,_Blend_Exponent_);float Result_Q45=pow(BiasFunc(_Bias_,Rect_Distance_Q33),_Falloff_);vec4 Color_At_T_Q25=mix(_Inner_Color_,_Color_,Power_Q44);float Product_Q22=Result_Q45*Product_Q23;vec4 Result_Q28=Product_Q22*Color_At_T_Q25;vec4 Out_Color=Result_Q28;float Clip_Threshold=0.0;gl_FragColor=Out_Color;}";h.ShaderStore.ShadersStore.mrdlBackglowVertexShader="uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;attribute vec3 tangent;uniform float _Bevel_Radius_;uniform float _Line_Width_;uniform bool _Absolute_Sizes_;uniform float _Tuning_Motion_;uniform float _Motion_;uniform float _Max_Intensity_;uniform float _Intensity_Fade_In_Exponent_;uniform float _Outer_Fuzz_Start_;uniform float _Outer_Fuzz_End_;uniform vec4 _Color_;uniform vec4 _Inner_Color_;uniform float _Blend_Exponent_;uniform float _Falloff_;uniform float _Bias_;varying vec3 vNormal;varying vec2 vUV;void main()\n{vec3 Dir_World_Q41=(world*vec4(tangent,0.0)).xyz;vec3 Dir_World_Q40=(world*vec4((cross(normal,tangent)),0.0)).xyz;float MaxAB_Q24=max(_Tuning_Motion_,_Motion_);float Length_Q16=length(Dir_World_Q41);float Length_Q17=length(Dir_World_Q40);bool Greater_Than_Q37=MaxAB_Q24>0.0;vec3 Sizes_Q35;vec2 XY_Q35;Sizes_Q35=(_Absolute_Sizes_ ? vec3(Length_Q16,Length_Q17,0) : vec3(Length_Q16/Length_Q17,1,0));XY_Q35=(uv-vec2(0.5,0.5))*Sizes_Q35.xy;vec3 Result_Q38=Greater_Than_Q37 ? position : vec3(0,0,0);vec3 Pos_World_Q39=(world*vec4(Result_Q38,1.0)).xyz;vec3 Position=Pos_World_Q39;vec3 Normal=Sizes_Q35;vec2 UV=XY_Q35;vec3 Tangent=vec3(0,0,0);vec3 Binormal=vec3(0,0,0);vec4 Color=vec4(1,1,1,1);gl_Position=viewProjection*vec4(Position,1);vNormal=Normal;vUV=UV;}";var te=function(t){function e(){var e=t.call(this)||this;return e._needNormals=!0,e._needUVs=!0,e.rebuild(),e}return n(e,t),e}(h.MaterialDefines),ee=function(t){function e(e,i){var o=t.call(this,e,i)||this;return o.bevelRadius=.16,o.lineWidth=.16,o.absoluteSizes=!1,o.tuningMotion=0,o.motion=1,o.maxIntensity=.7,o.intensityFadeInExponent=2,o.outerFuzzStart=.04,o.outerFuzzEnd=.04,o.color=new h.Color4(.682353,.698039,1,1),o.innerColor=new h.Color4(.356863,.392157,.796078,1),o.blendExponent=1.5,o.falloff=2,o.bias=.5,o.alphaMode=h.Constants.ALPHA_ADD,o.disableDepthWrite=!0,o.backFaceCulling=!1,o}return n(e,t),e.prototype.needAlphaBlending=function(){return!0},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new te);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,h.PrepareDefinesForAttributes)(t,o,!1,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new h.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,h.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[h.VertexBuffer.PositionKind];o.NORMAL&&s.push(h.VertexBuffer.NormalKind),o.UV1&&s.push(h.VertexBuffer.UVKind),o.UV2&&s.push(h.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(h.VertexBuffer.ColorKind),o.TANGENT&&s.push(h.VertexBuffer.TangentKind),(0,h.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","worldView","worldViewProjection","view","projection","viewProjection","cameraPosition","_Bevel_Radius_","_Line_Width_","_Absolute_Sizes_","_Tuning_Motion_","_Motion_","_Max_Intensity_","_Intensity_Fade_In_Exponent_","_Outer_Fuzz_Start_","_Outer_Fuzz_End_","_Color_","_Inner_Color_","_Blend_Exponent_","_Falloff_","_Bias_"],c=[],u=[];(0,h.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("mrdlBackglow",{attributes:s,uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){var o=this.getScene();if(i.materialDefines){var r=i.effect;r&&(this._activeEffect=r,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",o.getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",o.activeCamera.position),this._activeEffect.setFloat("_Bevel_Radius_",this.bevelRadius),this._activeEffect.setFloat("_Line_Width_",this.lineWidth),this._activeEffect.setFloat("_Absolute_Sizes_",this.absoluteSizes?1:0),this._activeEffect.setFloat("_Tuning_Motion_",this.tuningMotion),this._activeEffect.setFloat("_Motion_",this.motion),this._activeEffect.setFloat("_Max_Intensity_",this.maxIntensity),this._activeEffect.setFloat("_Intensity_Fade_In_Exponent_",this.intensityFadeInExponent),this._activeEffect.setFloat("_Outer_Fuzz_Start_",this.outerFuzzStart),this._activeEffect.setFloat("_Outer_Fuzz_End_",this.outerFuzzEnd),this._activeEffect.setDirectColor4("_Color_",this.color),this._activeEffect.setDirectColor4("_Inner_Color_",this.innerColor),this._activeEffect.setFloat("_Blend_Exponent_",this.blendExponent),this._activeEffect.setFloat("_Falloff_",this.falloff),this._activeEffect.setFloat("_Bias_",this.bias),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e)},e.prototype.clone=function(t){var i=this;return h.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var t=h.SerializationHelper.Serialize(this);return t.customType="BABYLON.MRDLBackglowMaterial",t},e.prototype.getClassName=function(){return"MRDLBackglowMaterial"},e.Parse=function(t,i,o){return h.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},s([(0,h.serialize)()],e.prototype,"bevelRadius",void 0),s([(0,h.serialize)()],e.prototype,"lineWidth",void 0),s([(0,h.serialize)()],e.prototype,"absoluteSizes",void 0),s([(0,h.serialize)()],e.prototype,"tuningMotion",void 0),s([(0,h.serialize)()],e.prototype,"motion",void 0),s([(0,h.serialize)()],e.prototype,"maxIntensity",void 0),s([(0,h.serialize)()],e.prototype,"intensityFadeInExponent",void 0),s([(0,h.serialize)()],e.prototype,"outerFuzzStart",void 0),s([(0,h.serialize)()],e.prototype,"outerFuzzEnd",void 0),s([(0,h.serialize)()],e.prototype,"color",void 0),s([(0,h.serialize)()],e.prototype,"innerColor",void 0),s([(0,h.serialize)()],e.prototype,"blendExponent",void 0),s([(0,h.serialize)()],e.prototype,"falloff",void 0),s([(0,h.serialize)()],e.prototype,"bias",void 0),e}(h.PushMaterial);(0,h.RegisterClass)("BABYLON.GUI.MRDLBackglowMaterial",ee);h.ShaderStore.ShadersStore.mrdlFrontplatePixelShader="uniform vec3 cameraPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec4 vExtra1;varying vec4 vExtra2;varying vec4 vExtra3;uniform float _Radius_;uniform float _Line_Width_;uniform bool _Relative_To_Height_;uniform float _Filter_Width_;uniform vec4 _Edge_Color_;uniform float _Fade_Out_;uniform bool _Smooth_Edges_;uniform bool _Blob_Enable_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Inner_Fade_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform float _Blob_Pulse_Max_Size_;uniform bool _Blob_Enable_2_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Inner_Fade_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform float _Gaze_Intensity_;uniform float _Gaze_Focus_;uniform sampler2D _Blob_Texture_;uniform float _Selection_Fuzz_;uniform float _Selected_;uniform float _Selection_Fade_;uniform float _Selection_Fade_Size_;uniform float _Selected_Distance_;uniform float _Selected_Fade_Length_;uniform float _Proximity_Max_Intensity_;uniform float _Proximity_Far_Distance_;uniform float _Proximity_Near_Radius_;uniform float _Proximity_Anisotropy_;uniform bool _Use_Global_Left_Index_;uniform bool _Use_Global_Right_Index_;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;void Scale_Color_B54(\nvec4 Color,\nfloat Scalar,\nout vec4 Result)\n{Result=Scalar*Color;}\nvoid Scale_RGB_B50(\nvec4 Color,\nfloat Scalar,\nout vec4 Result)\n{Result=vec4(Scalar,Scalar,Scalar,1)*Color;}\nvoid Proximity_Fragment_B51(\nfloat Proximity_Max_Intensity,\nfloat Proximity_Near_Radius,\nvec4 Deltas,\nfloat Show_Selection,\nfloat Distance_Fade1,\nfloat Distance_Fade2,\nfloat Strength,\nout float Proximity)\n{float proximity1=(1.0-clamp(length(Deltas.xy)/Proximity_Near_Radius,0.0,1.0))*Distance_Fade1;float proximity2=(1.0-clamp(length(Deltas.zw)/Proximity_Near_Radius,0.0,1.0))*Distance_Fade2;Proximity=Strength*(Proximity_Max_Intensity*max(proximity1,proximity2) *(1.0-Show_Selection)+Show_Selection);}\nvoid Blob_Fragment_B56(\nvec2 UV,\nvec3 Blob_Info,\nsampler2D Blob_Texture,\nout vec4 Blob_Color)\n{float k=dot(UV,UV);Blob_Color=Blob_Info.y*texture(Blob_Texture,vec2(vec2(sqrt(k),Blob_Info.x).x,1.0-vec2(sqrt(k),Blob_Info.x).y))*(1.0-clamp(k,0.0,1.0));}\nvoid Round_Rect_Fragment_B61(\nfloat Radius,\nvec4 Line_Color,\nfloat Filter_Width,\nfloat Line_Visibility,\nvec4 Fill_Color,\nbool Smooth_Edges,\nvec4 Rect_Parms,\nout float Inside_Rect)\n{float d=length(max(abs(Rect_Parms.zw)-Rect_Parms.xy,0.0));float dx=max(fwidth(d)*Filter_Width,0.00001);Inside_Rect=Smooth_Edges ? clamp((Radius-d)/dx,0.0,1.0) : 1.0-step(Radius,d);}\nvoid main()\n{float Is_Quad_Q53;Is_Quad_Q53=vNormal.z;vec4 Blob_Color_Q56;Blob_Fragment_B56(vUV,vTangent,_Blob_Texture_,Blob_Color_Q56);float X_Q52;float Y_Q52;float Z_Q52;float W_Q52;X_Q52=vExtra3.x;Y_Q52=vExtra3.y;Z_Q52=vExtra3.z;W_Q52=vExtra3.w;float Proximity_Q51;Proximity_Fragment_B51(_Proximity_Max_Intensity_,_Proximity_Near_Radius_,vExtra2,X_Q52,Y_Q52,Z_Q52,1.0,Proximity_Q51);float Inside_Rect_Q61;Round_Rect_Fragment_B61(W_Q52,vec4(1,1,1,1),_Filter_Width_,1.0,vec4(0,0,0,0),_Smooth_Edges_,vExtra1,Inside_Rect_Q61);vec4 Result_Q50;Scale_RGB_B50(_Edge_Color_,Proximity_Q51,Result_Q50);vec4 Result_Q47=Inside_Rect_Q61*Blob_Color_Q56;vec4 Color_At_T_Q48=mix(Result_Q50,Result_Q47,Is_Quad_Q53);vec4 Result_Q54;Scale_Color_B54(Color_At_T_Q48,_Fade_Out_,Result_Q54);vec4 Out_Color=Result_Q54;float Clip_Threshold=0.001;bool To_sRGB=false;gl_FragColor=Out_Color;}";h.ShaderStore.ShadersStore.mrdlFrontplateVertexShader="uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;attribute vec3 tangent;attribute vec4 color;uniform float _Radius_;uniform float _Line_Width_;uniform bool _Relative_To_Height_;uniform float _Filter_Width_;uniform vec4 _Edge_Color_;uniform float _Fade_Out_;uniform bool _Smooth_Edges_;uniform bool _Blob_Enable_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Inner_Fade_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform float _Blob_Pulse_Max_Size_;uniform bool _Blob_Enable_2_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Inner_Fade_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform float _Gaze_Intensity_;uniform float _Gaze_Focus_;uniform sampler2D _Blob_Texture_;uniform float _Selection_Fuzz_;uniform float _Selected_;uniform float _Selection_Fade_;uniform float _Selection_Fade_Size_;uniform float _Selected_Distance_;uniform float _Selected_Fade_Length_;uniform float _Proximity_Max_Intensity_;uniform float _Proximity_Far_Distance_;uniform float _Proximity_Near_Radius_;uniform float _Proximity_Anisotropy_;uniform bool _Use_Global_Left_Index_;uniform bool _Use_Global_Right_Index_;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec4 vExtra1;varying vec4 vExtra2;varying vec4 vExtra3;void Blob_Vertex_B40(\nvec3 Position,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nvec3 Blob_Position,\nfloat Intensity,\nfloat Blob_Near_Size,\nfloat Blob_Far_Size,\nfloat Blob_Near_Distance,\nfloat Blob_Far_Distance,\nvec4 Vx_Color,\nvec2 UV,\nvec3 Face_Center,\nvec2 Face_Size,\nvec2 In_UV,\nfloat Blob_Fade_Length,\nfloat Selection_Fade,\nfloat Selection_Fade_Size,\nfloat Inner_Fade,\nfloat Blob_Pulse,\nfloat Blob_Fade,\nfloat Blob_Enabled,\nfloat DistanceOffset,\nout vec3 Out_Position,\nout vec2 Out_UV,\nout vec3 Blob_Info,\nout vec2 Blob_Relative_UV)\n{float blobSize,fadeIn;vec3 Hit_Position;Blob_Info=vec3(0.0,0.0,0.0);float Hit_Distance=dot(Blob_Position-Face_Center,Normal)+DistanceOffset*Blob_Far_Distance;Hit_Position=Blob_Position-Hit_Distance*Normal;float absD=abs(Hit_Distance);float lerpVal=clamp((absD-Blob_Near_Distance)/(Blob_Far_Distance-Blob_Near_Distance),0.0,1.0);fadeIn=1.0-clamp((absD-Blob_Far_Distance)/Blob_Fade_Length,0.0,1.0);float innerFade=1.0-clamp(-Hit_Distance/Inner_Fade,0.0,1.0);float farClip=clamp(1.0-step(Blob_Far_Distance+Blob_Fade_Length,absD),0.0,1.0);float size=mix(Blob_Near_Size,Blob_Far_Size,lerpVal)*farClip;blobSize=mix(size,Selection_Fade_Size,Selection_Fade)*innerFade*Blob_Enabled;Blob_Info.x=lerpVal*0.5+0.5;Blob_Info.y=fadeIn*Intensity*(1.0-Selection_Fade)*Blob_Fade;Blob_Info.x*=(1.0-Blob_Pulse);vec3 delta=Hit_Position-Face_Center;vec2 blobCenterXY=vec2(dot(delta,Tangent),dot(delta,Bitangent));vec2 quadUVin=2.0*UV-1.0; \nvec2 blobXY=blobCenterXY+quadUVin*blobSize;vec2 blobClipped=clamp(blobXY,-Face_Size*0.5,Face_Size*0.5);vec2 blobUV=(blobClipped-blobCenterXY)/max(blobSize,0.0001)*2.0;vec3 blobCorner=Face_Center+blobClipped.x*Tangent+blobClipped.y*Bitangent;Out_Position=mix(Position,blobCorner,Vx_Color.rrr);Out_UV=mix(In_UV,blobUV,Vx_Color.rr);Blob_Relative_UV=blobClipped/Face_Size.y;}\nvoid Round_Rect_Vertex_B36(\nvec2 UV,\nvec3 Tangent,\nvec3 Binormal,\nfloat Radius,\nfloat Anisotropy,\nvec2 Blob_Center_UV,\nout vec2 Rect_UV,\nout vec2 Scale_XY,\nout vec4 Rect_Parms)\n{Scale_XY=vec2(Anisotropy,1.0);Rect_UV=(UV-vec2(0.5,0.5))*Scale_XY;Rect_Parms.xy=Scale_XY*0.5-vec2(Radius,Radius);Rect_Parms.zw=Blob_Center_UV;}\nvec2 ProjectProximity(\nvec3 blobPosition,\nvec3 position,\nvec3 center,\nvec3 dir,\nvec3 xdir,\nvec3 ydir,\nout float vdistance\n)\n{vec3 delta=blobPosition-position;vec2 xy=vec2(dot(delta,xdir),dot(delta,ydir));vdistance=abs(dot(delta,dir));return xy;}\nvoid Proximity_Vertex_B33(\nvec3 Blob_Position,\nvec3 Blob_Position_2,\nvec3 Face_Center,\nvec3 Position,\nfloat Proximity_Far_Distance,\nfloat Relative_Scale,\nfloat Proximity_Anisotropy,\nvec3 Normal,\nvec3 Tangent,\nvec3 Binormal,\nout vec4 Extra,\nout float Distance_To_Face,\nout float Distance_Fade1,\nout float Distance_Fade2)\n{float distz1,distz2;Extra.xy=ProjectProximity(Blob_Position,Position,Face_Center,Normal,Tangent*Proximity_Anisotropy,Binormal,distz1)/Relative_Scale;Extra.zw=ProjectProximity(Blob_Position_2,Position,Face_Center,Normal,Tangent*Proximity_Anisotropy,Binormal,distz2)/Relative_Scale;Distance_To_Face=dot(Normal,Position-Face_Center);Distance_Fade1=1.0-clamp(distz1/Proximity_Far_Distance,0.0,1.0);Distance_Fade2=1.0-clamp(distz2/Proximity_Far_Distance,0.0,1.0);}\nvoid Object_To_World_Pos_B12(\nvec3 Pos_Object,\nout vec3 Pos_World)\n{Pos_World=(world*vec4(Pos_Object,1.0)).xyz;}\nvoid Choose_Blob_B27(\nvec4 Vx_Color,\nvec3 Position1,\nvec3 Position2,\nbool Blob_Enable_1,\nbool Blob_Enable_2,\nfloat Near_Size_1,\nfloat Near_Size_2,\nfloat Blob_Inner_Fade_1,\nfloat Blob_Inner_Fade_2,\nfloat Blob_Pulse_1,\nfloat Blob_Pulse_2,\nfloat Blob_Fade_1,\nfloat Blob_Fade_2,\nout vec3 Position,\nout float Near_Size,\nout float Inner_Fade,\nout float Blob_Enable,\nout float Fade,\nout float Pulse)\n{Position=Position1*(1.0-Vx_Color.g)+Vx_Color.g*Position2;float b1=Blob_Enable_1 ? 1.0 : 0.0;float b2=Blob_Enable_2 ? 1.0 : 0.0;Blob_Enable=b1+(b2-b1)*Vx_Color.g;Pulse=Blob_Pulse_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Pulse_2;Fade=Blob_Fade_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Fade_2;Near_Size=Near_Size_1*(1.0-Vx_Color.g)+Vx_Color.g*Near_Size_2;Inner_Fade=Blob_Inner_Fade_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Inner_Fade_2;}\nvoid Move_Verts_B32(\nvec2 UV,\nfloat Radius,\nfloat Anisotropy,\nfloat Line_Width,\nfloat Visible,\nout vec3 New_P,\nout vec2 New_UV)\n{vec2 xy=2.0*UV-vec2(0.5,0.5);vec2 center=clamp(xy,0.0,1.0);vec2 delta=2.0*(xy-center);float deltaLength=length(delta);vec2 aniso=vec2(1.0/Anisotropy,1.0);center=(center-vec2(0.5,0.5))*(1.0-2.0*Radius*aniso);New_UV=vec2((2.0-2.0*deltaLength)*Visible,0.0);float deltaRadius= (Radius-Line_Width*New_UV.x);New_P.xy=(center+deltaRadius/deltaLength *aniso*delta);New_P.z=0.0;}\nvoid Object_To_World_Dir_B14(\nvec3 Dir_Object,\nout vec3 Binormal_World)\n{Binormal_World=(world*vec4(Dir_Object,0.0)).xyz;}\nvoid Proximity_Visibility_B55(\nfloat Selection,\nvec3 Proximity_Center,\nvec3 Proximity_Center_2,\nfloat Proximity_Far_Distance,\nfloat Proximity_Radius,\nvec3 Face_Center,\nvec3 Normal,\nvec2 Face_Size,\nfloat Gaze,\nout float Width)\n{float boxMaxSize=length(Face_Size)*0.5;float d1=dot(Proximity_Center-Face_Center,Normal);vec3 blob1=Proximity_Center-d1*Normal;float d2=dot(Proximity_Center_2-Face_Center,Normal);vec3 blob2=Proximity_Center_2-d2*Normal;vec3 delta1=blob1-Face_Center;vec3 delta2=blob2-Face_Center;float dist1=dot(delta1,delta1);float dist2=dot(delta2,delta2);float nearestProxDist=sqrt(min(dist1,dist2));Width=(1.0-step(boxMaxSize+Proximity_Radius,nearestProxDist))*(1.0-step(Proximity_Far_Distance,min(d1,d2))*(1.0-step(0.0001,Selection)));Width=max(Gaze,Width);}\nvec2 ramp2(vec2 start,vec2 end,vec2 x)\n{return clamp((x-start)/(end-start),vec2(0.0,0.0),vec2(1.0,1.0));}\nfloat computeSelection(\nvec3 blobPosition,\nvec3 normal,\nvec3 tangent,\nvec3 bitangent,\nvec3 faceCenter,\nvec2 faceSize,\nfloat selectionFuzz,\nfloat farDistance,\nfloat fadeLength\n)\n{vec3 delta=blobPosition-faceCenter;float absD=abs(dot(delta,normal));float fadeIn=1.0-clamp((absD-farDistance)/fadeLength,0.0,1.0);vec2 blobCenterXY=vec2(dot(delta,tangent),dot(delta,bitangent));vec2 innerFace=faceSize*(1.0-selectionFuzz)*0.5;vec2 selectPulse=ramp2(-faceSize*0.5,-innerFace,blobCenterXY)-ramp2(innerFace,faceSize*0.5,blobCenterXY);return selectPulse.x*selectPulse.y*fadeIn;}\nvoid Selection_Vertex_B31(\nvec3 Blob_Position,\nvec3 Blob_Position_2,\nvec3 Face_Center,\nvec2 Face_Size,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nfloat Selection_Fuzz,\nfloat Selected,\nfloat Far_Distance,\nfloat Fade_Length,\nvec3 Active_Face_Dir,\nout float Show_Selection)\n{float select1=computeSelection(Blob_Position,Normal,Tangent,Bitangent,Face_Center,Face_Size,Selection_Fuzz,Far_Distance,Fade_Length);float select2=computeSelection(Blob_Position_2,Normal,Tangent,Bitangent,Face_Center,Face_Size,Selection_Fuzz,Far_Distance,Fade_Length);Show_Selection=mix(max(select1,select2),1.0,Selected);}\nvoid main()\n{vec3 Vec3_Q29=vec3(vec2(0,0).x,vec2(0,0).y,color.r);vec3 Nrm_World_Q24;Nrm_World_Q24=normalize((world*vec4(normal,0.0)).xyz);vec3 Face_Center_Q30;Face_Center_Q30=(world*vec4(vec3(0,0,0),1.0)).xyz;vec3 Tangent_World_Q13;Tangent_World_Q13=(world*vec4(tangent,0.0)).xyz;vec3 Result_Q42;Result_Q42=_Use_Global_Left_Index_ ? Global_Left_Index_Tip_Position.xyz : _Blob_Position_;vec3 Result_Q43;Result_Q43=_Use_Global_Right_Index_ ? Global_Right_Index_Tip_Position.xyz : _Blob_Position_2_;float Value_At_T_Q58=mix(_Blob_Near_Size_,_Blob_Pulse_Max_Size_,_Blob_Pulse_);float Value_At_T_Q59=mix(_Blob_Near_Size_2_,_Blob_Pulse_Max_Size_,_Blob_Pulse_2_);vec3 Cross_Q70=cross(normal,tangent);float Product_Q45=_Gaze_Intensity_*_Gaze_Focus_;float Step_Q46=step(0.0001,Product_Q45);vec3 Tangent_World_N_Q15=normalize(Tangent_World_Q13);vec3 Position_Q27;float Near_Size_Q27;float Inner_Fade_Q27;float Blob_Enable_Q27;float Fade_Q27;float Pulse_Q27;Choose_Blob_B27(color,Result_Q42,Result_Q43,_Blob_Enable_,_Blob_Enable_2_,Value_At_T_Q58,Value_At_T_Q59,_Blob_Inner_Fade_,_Blob_Inner_Fade_2_,_Blob_Pulse_,_Blob_Pulse_2_,_Blob_Fade_,_Blob_Fade_2_,Position_Q27,Near_Size_Q27,Inner_Fade_Q27,Blob_Enable_Q27,Fade_Q27,Pulse_Q27);vec3 Binormal_World_Q14;Object_To_World_Dir_B14(Cross_Q70,Binormal_World_Q14);float Anisotropy_Q21=length(Tangent_World_Q13)/length(Binormal_World_Q14);vec3 Binormal_World_N_Q16=normalize(Binormal_World_Q14);vec2 Face_Size_Q35;float ScaleY_Q35;Face_Size_Q35=vec2(length(Tangent_World_Q13),length(Binormal_World_Q14));ScaleY_Q35=Face_Size_Q35.y;float Out_Radius_Q38;float Out_Line_Width_Q38;Out_Radius_Q38=_Relative_To_Height_ ? _Radius_ : _Radius_/ScaleY_Q35;Out_Line_Width_Q38=_Relative_To_Height_ ? _Line_Width_ : _Line_Width_/ScaleY_Q35;float Show_Selection_Q31;Selection_Vertex_B31(Result_Q42,Result_Q43,Face_Center_Q30,Face_Size_Q35,Nrm_World_Q24,Tangent_World_N_Q15,Binormal_World_N_Q16,_Selection_Fuzz_,_Selected_,_Selected_Distance_,_Selected_Fade_Length_,vec3(0,0,-1),Show_Selection_Q31);float MaxAB_Q41=max(Show_Selection_Q31,Product_Q45);float Width_Q55;Proximity_Visibility_B55(Show_Selection_Q31,Result_Q42,Result_Q43,_Proximity_Far_Distance_,_Proximity_Near_Radius_,Face_Center_Q30,Nrm_World_Q24,Face_Size_Q35,Step_Q46,Width_Q55);vec3 New_P_Q32;vec2 New_UV_Q32;Move_Verts_B32(uv,Out_Radius_Q38,Anisotropy_Q21,Out_Line_Width_Q38,Width_Q55,New_P_Q32,New_UV_Q32);vec3 Pos_World_Q12;Object_To_World_Pos_B12(New_P_Q32,Pos_World_Q12);vec3 Out_Position_Q40;vec2 Out_UV_Q40;vec3 Blob_Info_Q40;vec2 Blob_Relative_UV_Q40;Blob_Vertex_B40(Pos_World_Q12,Nrm_World_Q24,Tangent_World_N_Q15,Binormal_World_N_Q16,Position_Q27,_Blob_Intensity_,Near_Size_Q27,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,color,uv,Face_Center_Q30,Face_Size_Q35,New_UV_Q32,_Blob_Fade_Length_,_Selection_Fade_,_Selection_Fade_Size_,Inner_Fade_Q27,Pulse_Q27,Fade_Q27,Blob_Enable_Q27,0.0,Out_Position_Q40,Out_UV_Q40,Blob_Info_Q40,Blob_Relative_UV_Q40);vec2 Rect_UV_Q36;vec2 Scale_XY_Q36;vec4 Rect_Parms_Q36;Round_Rect_Vertex_B36(New_UV_Q32,Tangent_World_Q13,Binormal_World_Q14,Out_Radius_Q38,Anisotropy_Q21,Blob_Relative_UV_Q40,Rect_UV_Q36,Scale_XY_Q36,Rect_Parms_Q36);vec4 Extra_Q33;float Distance_To_Face_Q33;float Distance_Fade1_Q33;float Distance_Fade2_Q33;Proximity_Vertex_B33(Result_Q42,Result_Q43,Face_Center_Q30,Pos_World_Q12,_Proximity_Far_Distance_,1.0,_Proximity_Anisotropy_,Nrm_World_Q24,Tangent_World_N_Q15,Binormal_World_N_Q16,Extra_Q33,Distance_To_Face_Q33,Distance_Fade1_Q33,Distance_Fade2_Q33);vec4 Vec4_Q37=vec4(MaxAB_Q41,Distance_Fade1_Q33,Distance_Fade2_Q33,Out_Radius_Q38);vec3 Position=Out_Position_Q40;vec3 Normal=Vec3_Q29;vec2 UV=Out_UV_Q40;vec3 Tangent=Blob_Info_Q40;vec3 Binormal=vec3(0,0,0);vec4 Color=vec4(1,1,1,1);vec4 Extra1=Rect_Parms_Q36;vec4 Extra2=Extra_Q33;vec4 Extra3=Vec4_Q37;gl_Position=viewProjection*vec4(Position,1);vNormal=Normal;vUV=UV;vTangent=Tangent;vExtra1=Extra1;vExtra2=Extra2;vExtra3=Extra3;}";var ie=function(t){function e(){var e=t.call(this)||this;return e.SMOOTH_EDGES=!0,e._needNormals=!0,e._needUVs=!0,e.rebuild(),e}return n(e,t),e}(h.MaterialDefines),oe=function(t){function e(i,o){var r=t.call(this,i,o)||this;return r.radius=.12,r.lineWidth=.01,r.relativeToHeight=!1,r._filterWidth=1,r.edgeColor=new h.Color4(.53,.53,.53,1),r.blobEnable=!0,r.blobPosition=new h.Vector3(100,100,100),r.blobIntensity=.5,r.blobNearSize=.032,r.blobFarSize=.048,r.blobNearDistance=.008,r.blobFarDistance=.064,r.blobFadeLength=.04,r.blobInnerFade=.01,r.blobPulse=0,r.blobFade=1,r.blobPulseMaxSize=.05,r.blobEnable2=!0,r.blobPosition2=new h.Vector3(10,10.1,-.6),r.blobNearSize2=.008,r.blobInnerFade2=.1,r.blobPulse2=0,r.blobFade2=1,r.gazeIntensity=.8,r.gazeFocus=0,r.selectionFuzz=.5,r.selected=1,r.selectionFade=.2,r.selectionFadeSize=0,r.selectedDistance=.08,r.selectedFadeLength=.08,r.proximityMaxIntensity=.45,r.proximityFarDistance=.16,r.proximityNearRadius=.016,r.proximityAnisotropy=1,r.useGlobalLeftIndex=!0,r.useGlobalRightIndex=!0,r.fadeOut=1,r.alphaMode=h.Constants.ALPHA_ADD,r.disableDepthWrite=!0,r.backFaceCulling=!1,r._blobTexture=new h.Texture(e.BLOB_TEXTURE_URL,o,!0,!1,h.Texture.NEAREST_SAMPLINGMODE),r}return n(e,t),e.prototype.needAlphaBlending=function(){return!0},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new ie);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,h.PrepareDefinesForAttributes)(t,o,!1,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new h.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,h.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[h.VertexBuffer.PositionKind];o.NORMAL&&s.push(h.VertexBuffer.NormalKind),o.UV1&&s.push(h.VertexBuffer.UVKind),o.UV2&&s.push(h.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(h.VertexBuffer.ColorKind),o.TANGENT&&s.push(h.VertexBuffer.TangentKind),(0,h.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","worldView","worldViewProjection","view","projection","viewProjection","cameraPosition","_Radius_","_Line_Width_","_Relative_To_Height_","_Filter_Width_","_Edge_Color_","_Fade_Out_","_Smooth_Edges_","_Blob_Enable_","_Blob_Position_","_Blob_Intensity_","_Blob_Near_Size_","_Blob_Far_Size_","_Blob_Near_Distance_","_Blob_Far_Distance_","_Blob_Fade_Length_","_Blob_Inner_Fade_","_Blob_Pulse_","_Blob_Fade_","_Blob_Pulse_Max_Size_","_Blob_Enable_2_","_Blob_Position_2_","_Blob_Near_Size_2_","_Blob_Inner_Fade_2_","_Blob_Pulse_2_","_Blob_Fade_2_","_Gaze_Intensity_","_Gaze_Focus_","_Blob_Texture_","_Selection_Fuzz_","_Selected_","_Selection_Fade_","_Selection_Fade_Size_","_Selected_Distance_","_Selected_Fade_Length_","_Proximity_Max_Intensity_","_Proximity_Far_Distance_","_Proximity_Near_Radius_","_Proximity_Anisotropy_","Global_Left_Index_Tip_Position","Global_Right_Index_Tip_Position","_Use_Global_Left_Index_","_Use_Global_Right_Index_"],c=[],u=[];(0,h.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("mrdlFrontplate",{attributes:s,uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){var o=this.getScene();if(i.materialDefines){var r=i.effect;r&&(this._activeEffect=r,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",o.getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",o.activeCamera.position),this._activeEffect.setFloat("_Radius_",this.radius),this._activeEffect.setFloat("_Line_Width_",this.lineWidth),this._activeEffect.setFloat("_Relative_To_Height_",this.relativeToHeight?1:0),this._activeEffect.setFloat("_Filter_Width_",this._filterWidth),this._activeEffect.setDirectColor4("_Edge_Color_",this.edgeColor),this._activeEffect.setFloat("_Fade_Out_",this.fadeOut),this._activeEffect.setFloat("_Blob_Enable_",this.blobEnable?1:0),this._activeEffect.setVector3("_Blob_Position_",this.blobPosition),this._activeEffect.setFloat("_Blob_Intensity_",this.blobIntensity),this._activeEffect.setFloat("_Blob_Near_Size_",this.blobNearSize),this._activeEffect.setFloat("_Blob_Far_Size_",this.blobFarSize),this._activeEffect.setFloat("_Blob_Near_Distance_",this.blobNearDistance),this._activeEffect.setFloat("_Blob_Far_Distance_",this.blobFarDistance),this._activeEffect.setFloat("_Blob_Fade_Length_",this.blobFadeLength),this._activeEffect.setFloat("_Blob_Inner_Fade_",this.blobInnerFade),this._activeEffect.setFloat("_Blob_Pulse_",this.blobPulse),this._activeEffect.setFloat("_Blob_Fade_",this.blobFade),this._activeEffect.setFloat("_Blob_Pulse_Max_Size_",this.blobPulseMaxSize),this._activeEffect.setFloat("_Blob_Enable_2_",this.blobEnable2?1:0),this._activeEffect.setVector3("_Blob_Position_2_",this.blobPosition2),this._activeEffect.setFloat("_Blob_Near_Size_2_",this.blobNearSize2),this._activeEffect.setFloat("_Blob_Inner_Fade_2_",this.blobInnerFade2),this._activeEffect.setFloat("_Blob_Pulse_2_",this.blobPulse2),this._activeEffect.setFloat("_Blob_Fade_2_",this.blobFade2),this._activeEffect.setFloat("_Gaze_Intensity_",this.gazeIntensity),this._activeEffect.setFloat("_Gaze_Focus_",this.gazeFocus),this._activeEffect.setTexture("_Blob_Texture_",this._blobTexture),this._activeEffect.setFloat("_Selection_Fuzz_",this.selectionFuzz),this._activeEffect.setFloat("_Selected_",this.selected),this._activeEffect.setFloat("_Selection_Fade_",this.selectionFade),this._activeEffect.setFloat("_Selection_Fade_Size_",this.selectionFadeSize),this._activeEffect.setFloat("_Selected_Distance_",this.selectedDistance),this._activeEffect.setFloat("_Selected_Fade_Length_",this.selectedFadeLength),this._activeEffect.setFloat("_Proximity_Max_Intensity_",this.proximityMaxIntensity),this._activeEffect.setFloat("_Proximity_Far_Distance_",this.proximityFarDistance),this._activeEffect.setFloat("_Proximity_Near_Radius_",this.proximityNearRadius),this._activeEffect.setFloat("_Proximity_Anisotropy_",this.proximityAnisotropy),this._activeEffect.setFloat("_Use_Global_Left_Index_",this.useGlobalLeftIndex?1:0),this._activeEffect.setFloat("_Use_Global_Right_Index_",this.useGlobalRightIndex?1:0),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e)},e.prototype.clone=function(t){var i=this;return h.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var t=h.SerializationHelper.Serialize(this);return t.customType="BABYLON.MRDLFrontplateMaterial",t},e.prototype.getClassName=function(){return"MRDLFrontplateMaterial"},e.Parse=function(t,i,o){return h.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},e.BLOB_TEXTURE_URL="",s([(0,h.serialize)()],e.prototype,"radius",void 0),s([(0,h.serialize)()],e.prototype,"lineWidth",void 0),s([(0,h.serialize)()],e.prototype,"relativeToHeight",void 0),s([(0,h.serialize)()],e.prototype,"edgeColor",void 0),s([(0,h.serialize)()],e.prototype,"blobEnable",void 0),s([(0,h.serialize)()],e.prototype,"blobPosition",void 0),s([(0,h.serialize)()],e.prototype,"blobIntensity",void 0),s([(0,h.serialize)()],e.prototype,"blobNearSize",void 0),s([(0,h.serialize)()],e.prototype,"blobFarSize",void 0),s([(0,h.serialize)()],e.prototype,"blobNearDistance",void 0),s([(0,h.serialize)()],e.prototype,"blobFarDistance",void 0),s([(0,h.serialize)()],e.prototype,"blobFadeLength",void 0),s([(0,h.serialize)()],e.prototype,"blobInnerFade",void 0),s([(0,h.serialize)()],e.prototype,"blobPulse",void 0),s([(0,h.serialize)()],e.prototype,"blobFade",void 0),s([(0,h.serialize)()],e.prototype,"blobPulseMaxSize",void 0),s([(0,h.serialize)()],e.prototype,"blobEnable2",void 0),s([(0,h.serialize)()],e.prototype,"blobPosition2",void 0),s([(0,h.serialize)()],e.prototype,"blobNearSize2",void 0),s([(0,h.serialize)()],e.prototype,"blobInnerFade2",void 0),s([(0,h.serialize)()],e.prototype,"blobPulse2",void 0),s([(0,h.serialize)()],e.prototype,"blobFade2",void 0),s([(0,h.serialize)()],e.prototype,"gazeIntensity",void 0),s([(0,h.serialize)()],e.prototype,"gazeFocus",void 0),s([(0,h.serialize)()],e.prototype,"selectionFuzz",void 0),s([(0,h.serialize)()],e.prototype,"selected",void 0),s([(0,h.serialize)()],e.prototype,"selectionFade",void 0),s([(0,h.serialize)()],e.prototype,"selectionFadeSize",void 0),s([(0,h.serialize)()],e.prototype,"selectedDistance",void 0),s([(0,h.serialize)()],e.prototype,"selectedFadeLength",void 0),s([(0,h.serialize)()],e.prototype,"proximityMaxIntensity",void 0),s([(0,h.serialize)()],e.prototype,"proximityFarDistance",void 0),s([(0,h.serialize)()],e.prototype,"proximityNearRadius",void 0),s([(0,h.serialize)()],e.prototype,"proximityAnisotropy",void 0),s([(0,h.serialize)()],e.prototype,"useGlobalLeftIndex",void 0),s([(0,h.serialize)()],e.prototype,"useGlobalRightIndex",void 0),e}(h.PushMaterial);(0,h.RegisterClass)("BABYLON.GUI.MRDLFrontplateMaterial",oe);h.ShaderStore.ShadersStore.mrdlInnerquadPixelShader="uniform vec3 cameraPosition;varying vec2 vUV;varying vec3 vTangent;uniform vec4 _Color_;uniform float _Radius_;uniform bool _Fixed_Radius_;uniform float _Filter_Width_;uniform float _Glow_Fraction_;uniform float _Glow_Max_;uniform float _Glow_Falloff_;float FilterStep_Bid194(float edge,float x,float filterWidth)\n{float dx=max(1.0E-5,fwidth(x)*filterWidth);return max((x+dx*0.5-max(edge,x-dx*0.5))/dx,0.0);}\nvoid Round_Rect_B194(\nfloat Size_X,\nfloat Size_Y,\nfloat Radius,\nvec4 Rect_Color,\nfloat Filter_Width,\nvec2 UV,\nfloat Glow_Fraction,\nfloat Glow_Max,\nfloat Glow_Falloff,\nout vec4 Color)\n{vec2 halfSize=vec2(Size_X,Size_Y)*0.5;vec2 r=max(min(vec2(Radius,Radius),halfSize),vec2(0.01,0.01));vec2 v=abs(UV);vec2 nearestp=min(v,halfSize-r);vec2 delta=(v-nearestp)/max(vec2(0.01,0.01),r);float Distance=length(delta);float insideRect=1.0-FilterStep_Bid194(1.0-Glow_Fraction,Distance,Filter_Width);float glow=clamp((1.0-Distance)/Glow_Fraction,0.0,1.0);glow=pow(glow,Glow_Falloff);Color=Rect_Color*max(insideRect,glow*Glow_Max);}\nvoid main()\n{float X_Q192;float Y_Q192;float Z_Q192;X_Q192=vTangent.x;Y_Q192=vTangent.y;Z_Q192=vTangent.z;vec4 Color_Q194;Round_Rect_B194(X_Q192,1.0,Y_Q192,_Color_,_Filter_Width_,vUV,_Glow_Fraction_,_Glow_Max_,_Glow_Falloff_,Color_Q194);vec4 Out_Color=Color_Q194;float Clip_Threshold=0.0;gl_FragColor=Out_Color;}\n";h.ShaderStore.ShadersStore.mrdlInnerquadVertexShader="uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;attribute vec3 tangent;attribute vec4 color;uniform vec4 _Color_;uniform float _Radius_;uniform bool _Fixed_Radius_;uniform float _Filter_Width_;uniform float _Glow_Fraction_;uniform float _Glow_Max_;uniform float _Glow_Falloff_;varying vec2 vUV;varying vec3 vTangent;void main()\n{vec3 Pos_World_Q189;Pos_World_Q189=(world*vec4(position,1.0)).xyz;vec3 Dir_World_Q190;Dir_World_Q190=(world*vec4(tangent,0.0)).xyz;vec3 Dir_World_Q191;Dir_World_Q191=(world*vec4((cross(normal,tangent)),0.0)).xyz;float Length_Q180=length(Dir_World_Q190);float Length_Q181=length(Dir_World_Q191);float Quotient_Q184=Length_Q180/Length_Q181;float Quotient_Q195=_Radius_/Length_Q181;vec2 Result_Q193;Result_Q193=vec2((uv.x-0.5)*Length_Q180/Length_Q181,(uv.y-0.5));float Result_Q198=_Fixed_Radius_ ? Quotient_Q195 : _Radius_;vec3 Vec3_Q183=vec3(Quotient_Q184,Result_Q198,0);vec3 Position=Pos_World_Q189;vec3 Normal=vec3(0,0,0);vec2 UV=Result_Q193;vec3 Tangent=Vec3_Q183;vec3 Binormal=vec3(0,0,0);vec4 Color=color;gl_Position=viewProjection*vec4(Position,1);vUV=UV;vTangent=Tangent;}\n";var re=function(t){function e(){var e=t.call(this)||this;return e._needNormals=!0,e._needUVs=!0,e.rebuild(),e}return n(e,t),e}(h.MaterialDefines),ne=function(t){function e(e,i){var o=t.call(this,e,i)||this;return o.color=new h.Color4(1,1,1,.05),o.radius=.12,o.fixedRadius=!0,o._filterWidth=1,o.glowFraction=0,o.glowMax=.5,o.glowFalloff=2,o.alphaMode=h.Constants.ALPHA_COMBINE,o.backFaceCulling=!1,o}return n(e,t),e.prototype.needAlphaBlending=function(){return!0},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new re);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,h.PrepareDefinesForAttributes)(t,o,!0,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new h.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,h.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[h.VertexBuffer.PositionKind];o.NORMAL&&s.push(h.VertexBuffer.NormalKind),o.UV1&&s.push(h.VertexBuffer.UVKind),o.UV2&&s.push(h.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(h.VertexBuffer.ColorKind),o.TANGENT&&s.push(h.VertexBuffer.TangentKind),(0,h.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","worldView","worldViewProjection","view","projection","viewProjection","cameraPosition","_Color_","_Radius_","_Fixed_Radius_","_Filter_Width_","_Glow_Fraction_","_Glow_Max_","_Glow_Falloff_"],c=[],u=[];(0,h.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("mrdlInnerquad",{attributes:s,uniformsNames:_,uniformBuffersNames:u,samplers:c,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){var o=this.getScene();if(i.materialDefines){var r=i.effect;r&&(this._activeEffect=r,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",o.getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",o.activeCamera.position),this._activeEffect.setDirectColor4("_Color_",this.color),this._activeEffect.setFloat("_Radius_",this.radius),this._activeEffect.setFloat("_Fixed_Radius_",this.fixedRadius?1:0),this._activeEffect.setFloat("_Filter_Width_",this._filterWidth),this._activeEffect.setFloat("_Glow_Fraction_",this.glowFraction),this._activeEffect.setFloat("_Glow_Max_",this.glowMax),this._activeEffect.setFloat("_Glow_Falloff_",this.glowFalloff),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e)},e.prototype.clone=function(t){var i=this;return h.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var t=h.SerializationHelper.Serialize(this);return t.customType="BABYLON.MRDLInnerquadMaterial",t},e.prototype.getClassName=function(){return"MRDLInnerquadMaterial"},e.Parse=function(t,i,o){return h.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},s([(0,h.serialize)()],e.prototype,"color",void 0),s([(0,h.serialize)()],e.prototype,"radius",void 0),s([(0,h.serialize)()],e.prototype,"fixedRadius",void 0),s([(0,h.serialize)()],e.prototype,"glowFraction",void 0),s([(0,h.serialize)()],e.prototype,"glowMax",void 0),s([(0,h.serialize)()],e.prototype,"glowFalloff",void 0),e}(h.PushMaterial);(0,h.RegisterClass)("BABYLON.GUI.MRDLInnerquadMaterial",ne);var ae=function(t){function e(e,i){void 0===i&&(i=!0);var o=t.call(this,e)||this;return o.width=1,o.height=1,o.radius=.14,o.textSizeInPixels=18,o.imageSizeInPixels=40,o.plateMaterialColor=new h.Color3(.4,.4,.4),o.frontPlateDepth=.2,o.backPlateDepth=.04,o.backGlowOffset=.1,o.flatPlaneDepth=.001,o.innerQuadRadius=o.radius-.04,o.innerQuadColor=new h.Color4(0,0,0,0),o.innerQuadToggledColor=new h.Color4(.5197843,.6485234,.9607843,.6),o.innerQuadHoverColor=new h.Color4(1,1,1,.05),o.innerQuadToggledHoverColor=new h.Color4(.5197843,.6485234,.9607843,1),o._isBackplateVisible=!0,o._shareMaterials=!0,o._shareMaterials=i,o.pointerEnterAnimation=function(){o._frontPlate&&o._textPlate&&!o.isToggleButton&&o._performEnterExitAnimation(1),o.isToggleButton&&o._innerQuadMaterial&&(o.isToggled?o._innerQuadMaterial.color=o.innerQuadToggledHoverColor:o._innerQuadMaterial.color=o.innerQuadHoverColor)},o.pointerOutAnimation=function(){o._frontPlate&&o._textPlate&&!o.isToggleButton&&o._performEnterExitAnimation(-.8),o.isToggleButton&&o._innerQuadMaterial&&o._onToggle(o.isToggled)},o.pointerDownAnimation=function(){},o.pointerUpAnimation=function(){},o._pointerClickObserver=o.onPointerClickObservable.add((function(){o._frontPlate&&o._backGlow&&!o.isActiveNearInteraction&&o._performClickAnimation(),o.isToggleButton&&o._innerQuadMaterial&&o._onToggle(o.isToggled)})),o._pointerEnterObserver=o.onPointerEnterObservable.add((function(){o.pointerEnterAnimation()})),o._pointerOutObserver=o.onPointerOutObservable.add((function(){o.pointerOutAnimation()})),o._toggleObserver=o.onToggleObservable.add((function(t){o._innerQuadMaterial.color=t?o.innerQuadToggledColor:o.innerQuadColor})),o}return n(e,t),e.prototype._disposeTooltip=function(){this._tooltipFade=null,this._tooltipTextBlock&&this._tooltipTextBlock.dispose(),this._tooltipTexture&&this._tooltipTexture.dispose(),this._tooltipMesh&&this._tooltipMesh.dispose(),this.onPointerEnterObservable.remove(this._tooltipHoverObserver),this.onPointerOutObservable.remove(this._tooltipOutObserver)},Object.defineProperty(e.prototype,"renderingGroupId",{get:function(){return this._backPlate.renderingGroupId},set:function(t){this._backPlate.renderingGroupId=t,this._textPlate.renderingGroupId=t,this._frontPlate.renderingGroupId=t,this._backGlow.renderingGroupId=t,this._innerQuad.renderingGroupId=t,this._tooltipMesh&&(this._tooltipMesh.renderingGroupId=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mesh",{get:function(){return this._backPlate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tooltipText",{get:function(){var t;return(null===(t=this._tooltipTextBlock)||void 0===t?void 0:t.text)||null},set:function(t){var e=this;if(t){if(!this._tooltipFade){var i=this._backPlate._scene.useRightHandedSystem;this._tooltipMesh=(0,h.CreatePlane)("",{size:1},this._backPlate._scene),this._tooltipMesh.position=h.Vector3.Down().scale(.7).add(h.Vector3.Forward(i).scale(-.15)),this._tooltipMesh.isPickable=!1,this._tooltipMesh.parent=this._frontPlateCollisionMesh,this._tooltipTexture=lt.CreateForMesh(this._tooltipMesh);var o=new I;o.height=.25,o.width=.8,o.cornerRadius=25,o.color="#ffffff",o.thickness=20,o.background="#060668",this._tooltipTexture.addControl(o),this._tooltipTextBlock=new B,this._tooltipTextBlock.color="white",this._tooltipTextBlock.fontSize=100,this._tooltipTexture.addControl(this._tooltipTextBlock),this._tooltipFade=new h.FadeInOutBehavior,this._tooltipFade.delay=500,this._tooltipMesh.addBehavior(this._tooltipFade),this._tooltipHoverObserver=this.onPointerEnterObservable.add((function(){e._tooltipFade&&e._tooltipFade.fadeIn(!0)})),this._tooltipOutObserver=this.onPointerOutObservable.add((function(){e._tooltipFade&&e._tooltipFade.fadeIn(!1)}))}this._tooltipTextBlock&&(this._tooltipTextBlock.text=t)}else this._disposeTooltip()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){this._text!==t&&(this._text=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subtext",{get:function(){return this._subtext},set:function(t){this._subtext!==t&&(this._subtext=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageUrl",{get:function(){return this._imageUrl},set:function(t){this._imageUrl!==t&&(this._imageUrl=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backMaterial",{get:function(){return this._backMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frontMaterial",{get:function(){return this._frontMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backGlowMaterial",{get:function(){return this._backGlowMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"innerQuadMaterial",{get:function(){return this._innerQuadMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"plateMaterial",{get:function(){return this._plateMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shareMaterials",{get:function(){return this._shareMaterials},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isBackplateVisible",{set:function(t){this.mesh&&this._backMaterial&&(t&&!this._isBackplateVisible?this._backPlate.visibility=1:!t&&this._isBackplateVisible&&(this._backPlate.visibility=0)),this._isBackplateVisible=t},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"TouchHolographicButton"},e.prototype._rebuildContent=function(){var t;t=this._getAspectRatio()<=1?this._alignContentVertically():this._alignContentHorizontally(),this.content=t},e.prototype._getAspectRatio=function(){return this.width/this.height},e.prototype._alignContentVertically=function(){var t=new S;if(t.isVertical=!0,(0,h.IsDocumentAvailable)()&&document.createElement&&this._imageUrl){var e=new C;e.source=this._imageUrl,e.heightInPixels=180,e.widthInPixels=100,e.paddingTopInPixels=40,e.paddingBottomInPixels=40,t.addControl(e)}if(this._text){var i=new B;i.text=this._text,i.color="white",i.heightInPixels=30,i.fontSize=24,t.addControl(i)}return t},e.prototype._alignContentHorizontally=function(){var t=240,e=15,i=new I;i.widthInPixels=t,i.heightInPixels=t,i.color="transparent",i.setPaddingInPixels(e,e,e,e),t-=30;var o=new S;if(o.isVertical=!1,o.scaleY=this._getAspectRatio(),(0,h.IsDocumentAvailable)()&&document.createElement&&this._imageUrl){var r=new I("".concat(this.name,"_image"));r.widthInPixels=this.imageSizeInPixels,r.heightInPixels=this.imageSizeInPixels,r.color="transparent",t-=this.imageSizeInPixels;var n=new C;n.source=this._imageUrl,r.addControl(n),o.addControl(r)}if(this._text){var a=new B("".concat(this.name,"_text"));if(a.text=this._text,a.color="white",a.fontSize=this.textSizeInPixels,a.widthInPixels=t,this._imageUrl&&(a.textHorizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,a.paddingLeftInPixels=e),this._subtext){var s=new M;s.addColumnDefinition(1),s.addRowDefinition(.5),s.addRowDefinition(.5),s.widthInPixels=t,s.heightInPixels=45;var l=new B("".concat(this.name,"_subtext"));l.text=this._subtext,l.color="#EEEEEEAB",l.fontSize=.75*this.textSizeInPixels,l.fontWeight="600",this._imageUrl&&(l.textHorizontalAlignment=y.HORIZONTAL_ALIGNMENT_LEFT,l.paddingLeftInPixels=e),s.addControl(a,0),s.addControl(l,1),o.addControl(s)}else o.addControl(a)}return i.addControl(o),i},e.prototype._createNode=function(e){var i;this.name=null!==(i=this.name)&&void 0!==i?i:"TouchHolographicButton";var o=this._createBackPlate(e),r=this._createFrontPlate(e),n=this._createInnerQuad(e),a=this._createBackGlow(e);this._frontPlateCollisionMesh=r,this._textPlate=t.prototype._createNode.call(this,e),this._textPlate.name="".concat(this.name,"_textPlate"),this._textPlate.isPickable=!1,this._textPlate.scaling.x=this.width,this._textPlate.parent=r,this._backPlate=o,this._backPlate.position=h.Vector3.Forward(e.useRightHandedSystem).scale(this.backPlateDepth/2),this._backPlate.isPickable=!1,this._backPlate.addChild(r),this._backPlate.addChild(n),a&&this._backPlate.addChild(a);var s=new h.TransformNode("".concat(this.name,"_root"),e);return this._backPlate.setParent(s),this.collisionMesh=r,this.collidableFrontDirection=this._backPlate.forward.negate(),s},e.prototype._createBackPlate=function(t){var i=this,o=(0,h.CreateBox)("".concat(this.name,"_backPlate"),{},t);return o.isPickable=!1,o.visibility=0,o.scaling.z=.2,h.SceneLoader.ImportMeshAsync(void 0,e.MRTK_ASSET_BASE_URL,e.BACKPLATE_MODEL_FILENAME,t).then((function(t){var e=t.meshes[1];e.visibility=0,i._isBackplateVisible&&(e.visibility=1,e.name="".concat(i.name,"_backPlate"),e.isPickable=!1,e.scaling.x=i.width,e.scaling.y=i.height,e.parent=o),i._backMaterial&&(e.material=i._backMaterial),i._backPlate=e})),o},e.prototype._createFrontPlate=function(t){var i=this,o=(0,h.CreateBox)("".concat(this.name,"_frontPlate"),{width:this.width,height:this.height,depth:this.frontPlateDepth},t);return o.isPickable=!0,o.isNearPickable=!0,o.visibility=0,o.position=h.Vector3.Forward(t.useRightHandedSystem).scale((this.backPlateDepth-this.frontPlateDepth)/2),h.SceneLoader.ImportMeshAsync(void 0,e.MRTK_ASSET_BASE_URL,e.FRONTPLATE_MODEL_FILENAME,t).then((function(e){var r=(0,h.CreateBox)("".concat(i.name,"_collisionPlate"),{width:i.width,height:i.height},t);r.isPickable=!1,r.scaling.z=i.frontPlateDepth,r.visibility=0,r.parent=o,i._collisionPlate=r;var n=e.meshes[1];n.name="".concat(i.name,"_frontPlate"),n.isPickable=!1,n.scaling.x=i.width-i.backGlowOffset,n.scaling.y=i.height-i.backGlowOffset,n.position=h.Vector3.Forward(t.useRightHandedSystem).scale(-.5),n.parent=r,i.isToggleButton&&(n.visibility=0),i._frontMaterial&&(n.material=i._frontMaterial),i._textPlate.scaling.x=1,i._textPlate.parent=n,i._frontPlate=n})),o},e.prototype._createInnerQuad=function(t){var i=this,o=(0,h.CreateBox)("".concat(this.name,"_innerQuad"),{},t);return o.isPickable=!1,o.visibility=0,o.scaling.z=this.flatPlaneDepth,o.position.z+=this.backPlateDepth/2-this.flatPlaneDepth,h.SceneLoader.ImportMeshAsync(void 0,e.MRTK_ASSET_BASE_URL,e.INNERQUAD_MODEL_FILENAME,t).then((function(t){var e=t.meshes[1];e.name="".concat(i.name,"_innerQuad"),e.isPickable=!1,e.scaling.x=i.width-i.backGlowOffset,e.scaling.y=i.height-i.backGlowOffset,e.parent=o,i._innerQuadMaterial&&(e.material=i._innerQuadMaterial),i._innerQuad=e})),o},e.prototype._createBackGlow=function(t){var i=this;if(!this.isToggleButton){var o=(0,h.CreateBox)("".concat(this.name,"_backGlow"),{},t);return o.isPickable=!1,o.visibility=0,o.scaling.z=this.flatPlaneDepth,o.position.z+=this.backPlateDepth/2-2*this.flatPlaneDepth,h.SceneLoader.ImportMeshAsync(void 0,e.MRTK_ASSET_BASE_URL,e.BACKGLOW_MODEL_FILENAME,t).then((function(t){var e=t.meshes[1];e.name="".concat(i.name,"_backGlow"),e.isPickable=!1,e.scaling.x=i.width-i.backGlowOffset,e.scaling.y=i.height-i.backGlowOffset,e.parent=o,i._backGlowMaterial&&(e.material=i._backGlowMaterial),i._backGlow=e})),o}},e.prototype._applyFacade=function(t){this._plateMaterial.emissiveTexture=t,this._plateMaterial.opacityTexture=t,this._plateMaterial.diffuseColor=this.plateMaterialColor},e.prototype._performClickAnimation=function(){for(var t=new h.AnimationGroup("Click Animation Group"),e=0,i=[{name:"backGlowMotion",mesh:this._backGlow,property:"material.motion",keys:[{frame:0,values:[0,0,0]},{frame:20,values:[1,.0144,.0144]},{frame:40,values:[.0027713229489760476,0,0]},{frame:45,values:[.0027713229489760476]}]},{name:"_collisionPlateZSlide",mesh:this._collisionPlate,property:"position.z",keys:[{frame:0,values:[0,0,0]},{frame:20,values:[h.Vector3.Forward(this._collisionPlate._scene.useRightHandedSystem).scale(this.frontPlateDepth/2).z,0,0]},{frame:40,values:[0,.005403332496794331]},{frame:45,values:[0]}]},{name:"_collisionPlateZScale",mesh:this._collisionPlate,property:"scaling.z",keys:[{frame:0,values:[this.frontPlateDepth,0,0]},{frame:20,values:[this.backPlateDepth,0,0]},{frame:40,values:[this.frontPlateDepth,.0054]},{frame:45,values:[this.frontPlateDepth]}]}];e0){var e=t/this._customControlScaling;this._customControlScaling=t,this._rootContainer.children.forEach((function(i){i.scaling.scaleInPlace(e),1!==t&&(i._isScaledByManager=!0)}))}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useRealisticScaling",{get:function(){return this.controlScaling===t.MRTK_REALISTIC_SCALING},set:function(e){this.controlScaling=e?t.MRTK_REALISTIC_SCALING:1},enumerable:!1,configurable:!0}),t.prototype._handlePointerOut=function(t,e){var i=this._lastControlOver[t];i&&(i._onPointerOut(i),delete this._lastControlOver[t]),e&&this._lastControlDown[t]&&(this._lastControlDown[t].forcePointerUp(),delete this._lastControlDown[t]),this.onPickedPointChangedObservable.notifyObservers(null)},t.prototype._doPicking=function(t){var e,i,o;if(!this._utilityLayer||!this._utilityLayer.shouldRender||!this._utilityLayer.utilityLayerScene.activeCamera)return!1;var r=t.event,n=r.pointerId||0,a=r.button,s=t.pickInfo;if(s&&this.onPickingObservable.notifyObservers(s.pickedMesh),!s||!s.hit)return this._handlePointerOut(n,t.type===h.PointerEventTypes.POINTERUP),!1;s.pickedPoint&&this.onPickedPointChangedObservable.notifyObservers(s.pickedPoint);var l=null===(i=null===(e=s.pickedMesh.reservedDataStore)||void 0===e?void 0:e.GUI3D)||void 0===i?void 0:i.control;return l&&!l._processObservables(t.type,s.pickedPoint,(null===(o=s.originMesh)||void 0===o?void 0:o.position)||null,n,a)&&t.type===h.PointerEventTypes.POINTERMOVE&&(this._lastControlOver[n]&&this._lastControlOver[n]._onPointerOut(this._lastControlOver[n]),delete this._lastControlOver[n]),t.type===h.PointerEventTypes.POINTERUP&&(this._lastControlDown[r.pointerId]&&(this._lastControlDown[r.pointerId].forcePointerUp(),delete this._lastControlDown[r.pointerId]),("touch"===r.pointerType||"xr"===r.pointerType&&this._scene.getEngine().hostInformation.isMobile)&&this._handlePointerOut(n,!1)),!0},Object.defineProperty(t.prototype,"rootContainer",{get:function(){return this._rootContainer},enumerable:!1,configurable:!0}),t.prototype.containsControl=function(t){return this._rootContainer.containsControl(t)},t.prototype.addControl=function(t){return this._rootContainer.addControl(t),1!==this._customControlScaling&&(t.scaling.scaleInPlace(this._customControlScaling),t._isScaledByManager=!0),this},t.prototype.removeControl=function(t){return this._rootContainer.removeControl(t),t._isScaledByManager&&(t.scaling.scaleInPlace(1/this._customControlScaling),t._isScaledByManager=!1),this},t.prototype.dispose=function(){for(var t in this._rootContainer.dispose(),this._sharedMaterials)Object.prototype.hasOwnProperty.call(this._sharedMaterials,t)&&this._sharedMaterials[t].dispose();for(var t in this._sharedMaterials={},this._touchSharedMaterials)Object.prototype.hasOwnProperty.call(this._touchSharedMaterials,t)&&this._touchSharedMaterials[t].dispose();this._touchSharedMaterials={},this._pointerOutObserver&&this._utilityLayer&&(this._utilityLayer.onPointerOutObservable.remove(this._pointerOutObserver),this._pointerOutObserver=null),this.onPickedPointChangedObservable.clear(),this.onPickingObservable.clear();var e=this._utilityLayer?this._utilityLayer.utilityLayerScene:null;e&&this._pointerObserver&&(e.onPointerObservable.remove(this._pointerObserver),this._pointerObserver=null),this._scene&&this._sceneDisposeObserver&&(this._scene.onDisposeObservable.remove(this._sceneDisposeObserver),this._sceneDisposeObserver=null),this._utilityLayer&&this._utilityLayer.dispose()},t.MRTK_REALISTIC_SCALING=.032,t}(),le=void 0!==o.g?o.g:"undefined"!=typeof window?window:void 0;void 0!==le&&(le.BABYLON=le.BABYLON||{},le.BABYLON.GUI||(le.BABYLON.GUI=t));const _e=e})(),r.default})())); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("babylonjs")):"function"==typeof define&&define.amd?define("babylonjs-gui",["babylonjs"],e):"object"==typeof exports?exports["babylonjs-gui"]=e(require("babylonjs")):(t.BABYLON=t.BABYLON||{},t.BABYLON.GUI=e(t.BABYLON))}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this,(t=>(()=>{"use strict";var e={597:e=>{e.exports=t}},i={};function o(t){var r=i[t];if(void 0!==r)return r.exports;var n=i[t]={exports:{}};return e[t](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};o.d(r,{default:()=>ue});var n={};o.r(n),o.d(n,{AbstractButton3D:()=>mt,AdvancedDynamicTexture:()=>ct,AdvancedDynamicTextureInstrumentation:()=>ut,BaseGradient:()=>st,BaseSlider:()=>G,Button:()=>R,Button3D:()=>vt,Checkbox:()=>M,CheckboxGroup:()=>Y,ColorPicker:()=>L,Container:()=>B,Container3D:()=>yt,Control:()=>I,Control3D:()=>gt,CornerHandle:()=>Qt,CylinderPanel:()=>Pt,DisplayGrid:()=>rt,Ellipse:()=>k,FluentBackplateMaterial:()=>Ot,FluentButtonMaterial:()=>Et,FluentMaterial:()=>Bt,FluentMaterialDefines:()=>It,FocusableButton:()=>N,GUI3DManager:()=>he,GizmoHandle:()=>At,Grid:()=>D,HandMenu:()=>Tt,HandleMaterial:()=>Nt,HandleState:()=>kt,HolographicBackplate:()=>Rt,HolographicButton:()=>wt,HolographicSlate:()=>Wt,Image:()=>O,ImageBasedSlider:()=>nt,ImageScrollBar:()=>$,InputPassword:()=>z,InputText:()=>F,InputTextArea:()=>A,KeyPropertySet:()=>it,Line:()=>Q,LinearGradient:()=>lt,MRDLBackplateMaterial:()=>Jt,MRDLSliderBarMaterial:()=>Xt,MRDLSliderThumbMaterial:()=>Zt,MathTools:()=>P,Matrix2D:()=>x,Measure:()=>v,MeshButton3D:()=>Ht,MultiLine:()=>W,MultiLinePoint:()=>V,NearMenu:()=>Gt,PlanePanel:()=>Ut,RadialGradient:()=>_t,RadioButton:()=>H,RadioGroup:()=>X,Rectangle:()=>T,ScatterPanel:()=>jt,ScrollBar:()=>J,ScrollViewer:()=>tt,SelectionPanel:()=>Z,SelectorGroup:()=>j,SideHandle:()=>zt,SlateGizmo:()=>Vt,Slider:()=>U,Slider3D:()=>$t,SliderGroup:()=>K,SpherePanel:()=>te,StackPanel:()=>w,StackPanel3D:()=>ee,Style:()=>ht,TextBlock:()=>S,TextWrapper:()=>E,TextWrapping:()=>C,ToggleButton:()=>et,TouchButton3D:()=>Ft,TouchHolographicButton:()=>Dt,TouchHolographicButtonV3:()=>_e,TouchHolographicMenu:()=>Ct,TouchMeshButton3D:()=>ie,ValueAndUnit:()=>f,Vector2WithInfo:()=>y,Vector3WithInfo:()=>pt,VirtualKeyboard:()=>ot,VolumeBasedPanel:()=>xt,XmlLoader:()=>ft,name:()=>at});var a={};o.r(a),o.d(a,{AbstractButton3D:()=>mt,AdvancedDynamicTexture:()=>ct,AdvancedDynamicTextureInstrumentation:()=>ut,BaseGradient:()=>st,BaseSlider:()=>G,Button:()=>R,Button3D:()=>vt,Checkbox:()=>M,CheckboxGroup:()=>Y,ColorPicker:()=>L,Container:()=>B,Container3D:()=>yt,Control:()=>I,Control3D:()=>gt,CornerHandle:()=>Qt,CylinderPanel:()=>Pt,DisplayGrid:()=>rt,Ellipse:()=>k,FluentBackplateMaterial:()=>Ot,FluentButtonMaterial:()=>Et,FluentMaterial:()=>Bt,FluentMaterialDefines:()=>It,FocusableButton:()=>N,GUI3DManager:()=>he,GizmoHandle:()=>At,Grid:()=>D,HandMenu:()=>Tt,HandleMaterial:()=>Nt,HandleState:()=>kt,HolographicBackplate:()=>Rt,HolographicButton:()=>wt,HolographicSlate:()=>Wt,Image:()=>O,ImageBasedSlider:()=>nt,ImageScrollBar:()=>$,InputPassword:()=>z,InputText:()=>F,InputTextArea:()=>A,KeyPropertySet:()=>it,Line:()=>Q,LinearGradient:()=>lt,MRDLBackplateMaterial:()=>Jt,MRDLSliderBarMaterial:()=>Xt,MRDLSliderThumbMaterial:()=>Zt,MathTools:()=>P,Matrix2D:()=>x,Measure:()=>v,MeshButton3D:()=>Ht,MultiLine:()=>W,MultiLinePoint:()=>V,NearMenu:()=>Gt,PlanePanel:()=>Ut,RadialGradient:()=>_t,RadioButton:()=>H,RadioGroup:()=>X,Rectangle:()=>T,ScatterPanel:()=>jt,ScrollBar:()=>J,ScrollViewer:()=>tt,SelectionPanel:()=>Z,SelectorGroup:()=>j,SideHandle:()=>zt,SlateGizmo:()=>Vt,Slider:()=>U,Slider3D:()=>$t,SliderGroup:()=>K,SpherePanel:()=>te,StackPanel:()=>w,StackPanel3D:()=>ee,Style:()=>ht,TextBlock:()=>S,TextWrapper:()=>E,TextWrapping:()=>C,ToggleButton:()=>et,TouchButton3D:()=>Ft,TouchHolographicButton:()=>Dt,TouchHolographicButtonV3:()=>_e,TouchHolographicMenu:()=>Ct,TouchMeshButton3D:()=>ie,ValueAndUnit:()=>f,Vector2WithInfo:()=>y,Vector3WithInfo:()=>pt,VirtualKeyboard:()=>ot,VolumeBasedPanel:()=>xt,XmlLoader:()=>ft,name:()=>at});var s=function(t,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},s(t,e)};function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var _=function(){return _=Object.assign||function(t){for(var e,i=1,o=arguments.length;i=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a}function c(t,e,i,o){return new(i||(i=Promise))((function(r,n){function a(t){try{l(o.next(t))}catch(t){n(t)}}function s(t){try{l(o.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))}function u(t,e){var i,o,r,n,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(s){return function(l){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;n&&(n=0,s[0]&&(a=0)),a;)try{if(i=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]1?this.notRenderable=!0:this.notRenderable=!1}else d.Tools.Error("Cannot move a control to a vector3 if the control is not at root level")},t.prototype.getDescendantsToRef=function(t,e,i){void 0===e&&(e=!1)},t.prototype.getDescendants=function(t,e){var i=[];return this.getDescendantsToRef(i,t,e),i},t.prototype.linkWithMesh=function(e){if(!this._host||this.parent&&this.parent!==this._host._rootContainer)e&&d.Tools.Error("Cannot link a control to a mesh if the control is not at root level");else{var i=this._host._linkedControls.indexOf(this);if(-1!==i)return this._linkedMesh=e,void(e||this._host._linkedControls.splice(i,1));e&&(this.horizontalAlignment=t.HORIZONTAL_ALIGNMENT_LEFT,this.verticalAlignment=t.VERTICAL_ALIGNMENT_TOP,this._linkedMesh=e,this._host._linkedControls.push(this))}},t.prototype.setPadding=function(t,e,i,o){var r=t,n=null!=e?e:r,a=null!=i?i:r,s=null!=o?o:n;this.paddingTop=r,this.paddingRight=n,this.paddingBottom=a,this.paddingLeft=s},t.prototype.setPaddingInPixels=function(t,e,i,o){var r=t,n=null!=e?e:r,a=null!=i?i:r,s=null!=o?o:n;this.paddingTopInPixels=r,this.paddingRightInPixels=n,this.paddingBottomInPixels=a,this.paddingLeftInPixels=s},t.prototype._moveToProjectedPosition=function(t){var e,i=this._left.getValue(this._host),o=this._top.getValue(this._host),r=null===(e=this.parent)||void 0===e?void 0:e._currentMeasure;r&&this._processMeasures(r,this._host.getContext());var n=t.x+this._linkOffsetX.getValue(this._host)-this._currentMeasure.width/2,a=t.y+this._linkOffsetY.getValue(this._host)-this._currentMeasure.height/2,s=this._left.ignoreAdaptiveScaling&&this._top.ignoreAdaptiveScaling;s&&(Math.abs(n-i)<.5&&(n=i),Math.abs(a-o)<.5&&(a=o)),(s||i!==n||o!==a)&&(this.left=n+"px",this.top=a+"px",this._left.ignoreAdaptiveScaling=!0,this._top.ignoreAdaptiveScaling=!0,this._markAsDirty())},t.prototype._offsetLeft=function(t){this._isDirty=!0,this._currentMeasure.left+=t},t.prototype._offsetTop=function(t){this._isDirty=!0,this._currentMeasure.top+=t},t.prototype._markMatrixAsDirty=function(){this._isMatrixDirty=!0,this._flagDescendantsAsMatrixDirty()},t.prototype._flagDescendantsAsMatrixDirty=function(){},t.prototype._intersectsRect=function(t,e){return this._transform(e),!(this._evaluatedMeasure.left>=t.left+t.width||this._evaluatedMeasure.top>=t.top+t.height||this._evaluatedMeasure.left+this._evaluatedMeasure.width<=t.left||this._evaluatedMeasure.top+this._evaluatedMeasure.height<=t.top)},t.prototype._computeAdditionalOffsetX=function(){return 0},t.prototype._computeAdditionalOffsetY=function(){return 0},t.prototype.invalidateRect=function(){if(this._transform(),this.host&&this.host.useInvalidateRectOptimization){this._currentMeasure.transformToRef(this._transformMatrix,this._tmpMeasureA),v.CombineToRef(this._tmpMeasureA,this._prevCurrentMeasureTransformedIntoGlobalSpace,this._tmpMeasureA);var t=this.shadowOffsetX,e=this.shadowOffsetY,i=Math.max(this._previousShadowBlur,this.shadowBlur),o=Math.min(Math.min(t,0)-2*i,0),r=Math.max(Math.max(t,0)+2*i,0),n=Math.min(Math.min(e,0)-2*i,0),a=Math.max(Math.max(e,0)+2*i,0),s=this._computeAdditionalOffsetX(),l=this._computeAdditionalOffsetY();this.host.invalidateRect(Math.floor(this._tmpMeasureA.left+o-s),Math.floor(this._tmpMeasureA.top+n-l),Math.ceil(this._tmpMeasureA.left+this._tmpMeasureA.width+r+s),Math.ceil(this._tmpMeasureA.top+this._tmpMeasureA.height+a+l))}},t.prototype._markAsDirty=function(t){void 0===t&&(t=!1),(this._isVisible||t)&&(this._isDirty=!0,this._markMatrixAsDirty(),this._host&&this._host.markAsDirty())},t.prototype._markAllAsDirty=function(){this._markAsDirty(),this._font&&this._prepareFont()},t.prototype._link=function(t){this._host=t,this._host&&(this.uniqueId=this._host.getScene().getUniqueId())},t.prototype._transform=function(t){if(this._isMatrixDirty||1!==this._scaleX||1!==this._scaleY||0!==this._rotation){var e=this._currentMeasure.width*this._transformCenterX+this._currentMeasure.left,i=this._currentMeasure.height*this._transformCenterY+this._currentMeasure.top;t&&(t.translate(e,i),t.rotate(this._rotation),t.scale(this._scaleX,this._scaleY),t.translate(-e,-i)),(this._isMatrixDirty||this._cachedOffsetX!==e||this._cachedOffsetY!==i)&&(this._cachedOffsetX=e,this._cachedOffsetY=i,this._isMatrixDirty=!1,this._flagDescendantsAsMatrixDirty(),x.ComposeToRef(-e,-i,this._rotation,this._scaleX,this._scaleY,this.parent?this.parent._transformMatrix:null,this._transformMatrix),this._transformMatrix.invertToRef(this._invertTransformMatrix),this._currentMeasure.transformToRef(this._transformMatrix,this._evaluatedMeasure))}},t.prototype._renderHighlight=function(t){this.isHighlighted&&(t.save(),t.strokeStyle=this._highlightColor,t.lineWidth=this._highlightLineWidth,this._renderHighlightSpecific(t),t.restore())},t.prototype._renderHighlightSpecific=function(t){t.strokeRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)},t.prototype._getColor=function(t){return this.gradient?this.gradient.getCanvasGradient(t):this.color},t.prototype._applyStates=function(e){this._isFontSizeInPercentage&&(this._fontSet=!0),this._host&&this._host.useSmallestIdeal&&!this._font&&(this._fontSet=!0),this._fontSet&&(this._prepareFont(),this._fontSet=!1),this._font&&(e.font=this._font),(this._color||this.gradient)&&(e.fillStyle=this._getColor(e)),t.AllowAlphaInheritance?e.globalAlpha*=this._alpha:this._alphaSet&&(e.globalAlpha=this.parent&&!this.parent.renderToIntermediateTexture?this.parent.alpha*this._alpha:this._alpha)},t.prototype._layout=function(t,e){if(!this.isDirty&&(!this.isVisible||this.notRenderable))return!1;if(this._isDirty||!this._cachedParentMeasure.isEqualsTo(t)){this.host._numLayoutCalls++,this._currentMeasure.addAndTransformToRef(this._transformMatrix,0|-this._paddingLeftInPixels,0|-this._paddingTopInPixels,0|this._paddingRightInPixels,0|this._paddingBottomInPixels,this._prevCurrentMeasureTransformedIntoGlobalSpace),e.save(),this._applyStates(e);var i=0;do{this._rebuildLayout=!1,this._processMeasures(t,e),i++}while(this._rebuildLayout&&i<3);i>=3&&d.Logger.Error("Layout cycle detected in GUI (Control name=".concat(this.name,", uniqueId=").concat(this.uniqueId,")")),e.restore(),this.invalidateRect(),this._evaluateClippingState(t)}return this._wasDirty=this._isDirty,this._isDirty=!1,!0},t.prototype._processMeasures=function(t,e){this._tempPaddingMeasure.copyFrom(t),this.parent&&this.parent.descendantsOnlyPadding&&(this._tempPaddingMeasure.left+=this.parent.paddingLeftInPixels,this._tempPaddingMeasure.top+=this.parent.paddingTopInPixels,this._tempPaddingMeasure.width-=this.parent.paddingLeftInPixels+this.parent.paddingRightInPixels,this._tempPaddingMeasure.height-=this.parent.paddingTopInPixels+this.parent.paddingBottomInPixels),this._currentMeasure.copyFrom(this._tempPaddingMeasure),this._preMeasure(this._tempPaddingMeasure,e),this._measure(),this._postMeasure(this._tempPaddingMeasure,e),this._computeAlignment(this._tempPaddingMeasure,e),this._currentMeasure.left=0|this._currentMeasure.left,this._currentMeasure.top=0|this._currentMeasure.top,this._currentMeasure.width=0|this._currentMeasure.width,this._currentMeasure.height=0|this._currentMeasure.height,this._additionalProcessing(this._tempPaddingMeasure,e),this._cachedParentMeasure.copyFrom(this._tempPaddingMeasure),this._currentMeasure.transformToRef(this._transformMatrix,this._evaluatedMeasure),this.onDirtyObservable.hasObservers()&&this.onDirtyObservable.notifyObservers(this)},t.prototype._evaluateClippingState=function(t){if(this._transform(),this._currentMeasure.transformToRef(this._transformMatrix,this._evaluatedMeasure),this.parent&&this.parent.clipChildren){if(t.transformToRef(this.parent._transformMatrix,this._evaluatedParentMeasure),this._evaluatedMeasure.left>this._evaluatedParentMeasure.left+this._evaluatedParentMeasure.width)return void(this._isClipped=!0);if(this._evaluatedMeasure.left+this._evaluatedMeasure.widththis._evaluatedParentMeasure.top+this._evaluatedParentMeasure.height)return void(this._isClipped=!0);if(this._evaluatedMeasure.top+this._evaluatedMeasure.heightthis._currentMeasure.left+this._currentMeasure.width||ethis._currentMeasure.top+this._currentMeasure.height||(this.isPointerBlocker&&(this._host._shouldBlockPointer=!0),0))},t.prototype._processPicking=function(t,e,i,o,r,n,a,s){return!(!this._isEnabled||!this.isHitTestVisible||!this.isVisible||this._doNotRender||!this.contains(t,e)||(this._processObservables(o,t,e,i,r,n,a,s),0))},t.prototype._onPointerMove=function(t,e,i,o){this.onPointerMoveObservable.notifyObservers(e,-1,t,this,o)&&null!=this.parent&&!this.isPointerBlocker&&this.parent._onPointerMove(t,e,i,o)},t.prototype._onPointerEnter=function(t,e){return!(!this._isEnabled||this._enterCount>0||(-1===this._enterCount&&(this._enterCount=0),this._enterCount++,this.onPointerEnterObservable.notifyObservers(this,-1,t,this,e)&&null!=this.parent&&!this.isPointerBlocker&&this.parent._onPointerEnter(t,e),0))},t.prototype._onPointerOut=function(t,e,i){if(void 0===i&&(i=!1),i||this._isEnabled){this._enterCount=0;var o=!0;t.isAscendant(this)||(o=this.onPointerOutObservable.notifyObservers(this,-1,t,this,e)),o&&null!=this.parent&&!this.isPointerBlocker&&this.parent._onPointerOut(t,e,i)}},t.prototype._onPointerDown=function(t,e,i,o,r){return this._onPointerEnter(this,r),-1!==this.tabIndex&&(this.host.focusedControl=this),0===this._downCount&&(this._downCount++,this._downPointerIds[i]=!0,this.onPointerDownObservable.notifyObservers(new y(e,o),-1,t,this,r)&&null!=this.parent&&!this.isPointerBlocker&&this.parent._onPointerDown(t,e,i,o,r),r&&this.uniqueId!==this._host.rootContainer.uniqueId&&this._host._capturedPointerIds.add(r.event.pointerId),!0)},t.prototype._onPointerUp=function(t,e,i,o,r,n){if(this._isEnabled){this._downCount=0,delete this._downPointerIds[i];var a=r;r&&(this._enterCount>0||-1===this._enterCount)&&(a=this.onPointerClickObservable.notifyObservers(new y(e,o),-1,t,this,n)),this.onPointerUpObservable.notifyObservers(new y(e,o),-1,t,this,n)&&null!=this.parent&&!this.isPointerBlocker&&this.parent._onPointerUp(t,e,i,o,a,n),n&&this.uniqueId!==this._host.rootContainer.uniqueId&&this._host._capturedPointerIds.delete(n.event.pointerId)}},t.prototype._forcePointerUp=function(t){if(void 0===t&&(t=null),null!==t)this._onPointerUp(this,d.Vector2.Zero(),t,0,!0);else for(var e in this._downPointerIds)this._onPointerUp(this,d.Vector2.Zero(),+e,0,!0)},t.prototype._onWheelScroll=function(t,e){this._isEnabled&&this.onWheelObservable.notifyObservers(new d.Vector2(t,e))&&null!=this.parent&&this.parent._onWheelScroll(t,e)},t.prototype._onCanvasBlur=function(){},t.prototype._processObservables=function(t,e,i,o,r,n,a,s){if(!this._isEnabled)return!1;if(this._dummyVector2.copyFromFloats(e,i),t===d.PointerEventTypes.POINTERMOVE){this._onPointerMove(this,this._dummyVector2,r,o);var l=this._host._lastControlOver[r];return l&&l!==this&&l._onPointerOut(this,o),l!==this&&this._onPointerEnter(this,o),this._host._lastControlOver[r]=this,!0}return t===d.PointerEventTypes.POINTERDOWN?(this._onPointerDown(this,this._dummyVector2,r,n,o),this._host._registerLastControlDown(this,r),this._host._lastPickedControl=this,!0):t===d.PointerEventTypes.POINTERUP?(this._host._lastControlDown[r]&&this._host._lastControlDown[r]._onPointerUp(this,this._dummyVector2,r,n,!0,o),delete this._host._lastControlDown[r],!0):!(t!==d.PointerEventTypes.POINTERWHEEL||!this._host._lastControlOver[r]||(this._host._lastControlOver[r]._onWheelScroll(a,s),0))},t.prototype._getStyleProperty=function(t,e){var i,o=null!==(i=this._style&&this._style[t])&&void 0!==i?i:this[t];return!o&&this.parent?this.parent._getStyleProperty(t,e):this.parent?o:e},t.prototype._prepareFont=function(){var e,i;(this._font||this._fontSet)&&(this._font=this._getStyleProperty("fontStyle","")+" "+this._getStyleProperty("fontWeight","")+" "+this.fontSizeInPixels+"px "+this._getStyleProperty("fontFamily","Arial"),this._fontOffset=t._GetFontOffset(this._font,null===(i=null===(e=this._host)||void 0===e?void 0:e.getScene())||void 0===i?void 0:i.getEngine()),this.getDescendants().forEach((function(t){return t._markAllAsDirty()})))},t.prototype.isDimensionFullyDefined=function(t){return this.getDimension(t).isPixel},t.prototype.getDimension=function(t){return"width"===t?this._width:this._height},t.prototype.clone=function(t){var e={};this.serialize(e,!0);var i=new(d.Tools.Instantiate("BABYLON.GUI."+e.className));return i.parse(e,t),i},t.prototype.parse=function(t,e,i){var o=this;return this._urlRewriter=i,d.SerializationHelper.Parse((function(){return o}),t,null),this.name=t.name,this._parseFromContent(t,null!=e?e:this._host),this},t.prototype.serialize=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0),(this.isSerializable||e)&&(d.SerializationHelper.Serialize(this,t),t.name=this.name,t.className=this.getClassName(),i&&this._prepareFont(),this._fontFamily&&(t.fontFamily=this._fontFamily),this.fontSize&&(t.fontSize=this.fontSize),this.fontWeight&&(t.fontWeight=this.fontWeight),this.fontStyle&&(t.fontStyle=this.fontStyle),this._gradient&&(t.gradient={},this._gradient.serialize(t.gradient)),d.SerializationHelper.AppendSerializedAnimations(this,t))},t.prototype._parseFromContent=function(t,e,i){var o,r;if(t.fontFamily&&(this.fontFamily=t.fontFamily),t.fontSize&&(this.fontSize=t.fontSize),t.fontWeight&&(this.fontWeight=t.fontWeight),t.fontStyle&&(this.fontStyle=t.fontStyle),t.gradient){var n=d.Tools.Instantiate("BABYLON.GUI."+t.gradient.className);this._gradient=new n,null===(o=this._gradient)||void 0===o||o.parse(t.gradient)}if(t.animations){this.animations=[];for(var a=0;a-1&&this.linkWithMesh(null),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear()},Object.defineProperty(t,"HORIZONTAL_ALIGNMENT_LEFT",{get:function(){return t._HORIZONTAL_ALIGNMENT_LEFT},enumerable:!1,configurable:!0}),Object.defineProperty(t,"HORIZONTAL_ALIGNMENT_RIGHT",{get:function(){return t._HORIZONTAL_ALIGNMENT_RIGHT},enumerable:!1,configurable:!0}),Object.defineProperty(t,"HORIZONTAL_ALIGNMENT_CENTER",{get:function(){return t._HORIZONTAL_ALIGNMENT_CENTER},enumerable:!1,configurable:!0}),Object.defineProperty(t,"VERTICAL_ALIGNMENT_TOP",{get:function(){return t._VERTICAL_ALIGNMENT_TOP},enumerable:!1,configurable:!0}),Object.defineProperty(t,"VERTICAL_ALIGNMENT_BOTTOM",{get:function(){return t._VERTICAL_ALIGNMENT_BOTTOM},enumerable:!1,configurable:!0}),Object.defineProperty(t,"VERTICAL_ALIGNMENT_CENTER",{get:function(){return t._VERTICAL_ALIGNMENT_CENTER},enumerable:!1,configurable:!0}),t._GetFontOffset=function(e,i){if(t._FontHeightSizes[e])return t._FontHeightSizes[e];var o=i||d.EngineStore.LastCreatedEngine;if(!o)throw new Error("Invalid engine. Unable to create a canvas.");var r=o.getFontOffset(e);return t._FontHeightSizes[e]=r,r},t.Parse=function(t,e,i){var o=d.Tools.Instantiate("BABYLON.GUI."+t.className),r=d.SerializationHelper.Parse((function(){var t=new o;return t._urlRewriter=i,t}),t,null);return r.name=t.name,r._parseFromContent(t,e,i),r},t.drawEllipse=function(t,e,i,o,r,n){n.translate(t,e),n.scale(i,o),n.beginPath(),n.arc(0,0,1,0,2*Math.PI*r,r<0),r>=1&&n.closePath(),n.scale(1/i,1/o),n.translate(-t,-e)},t.prototype.isReady=function(){return!0},t.AllowAlphaInheritance=!1,t._ClipMeasure=new v(0,0,0,0),t._HORIZONTAL_ALIGNMENT_LEFT=0,t._HORIZONTAL_ALIGNMENT_RIGHT=1,t._HORIZONTAL_ALIGNMENT_CENTER=2,t._VERTICAL_ALIGNMENT_TOP=0,t._VERTICAL_ALIGNMENT_BOTTOM=1,t._VERTICAL_ALIGNMENT_CENTER=2,t._FontHeightSizes={},t.AddHeader=function(){},h([(0,d.serialize)()],t.prototype,"metadata",void 0),h([(0,d.serialize)()],t.prototype,"isHitTestVisible",void 0),h([(0,d.serialize)()],t.prototype,"isPointerBlocker",void 0),h([(0,d.serialize)()],t.prototype,"isFocusInvisible",void 0),h([(0,d.serialize)()],t.prototype,"clipChildren",null),h([(0,d.serialize)()],t.prototype,"clipContent",null),h([(0,d.serialize)()],t.prototype,"useBitmapCache",void 0),h([(0,d.serialize)()],t.prototype,"shadowOffsetX",null),h([(0,d.serialize)()],t.prototype,"shadowOffsetY",null),h([(0,d.serialize)()],t.prototype,"shadowBlur",null),h([(0,d.serialize)()],t.prototype,"shadowColor",null),h([(0,d.serialize)()],t.prototype,"hoverCursor",void 0),h([(0,d.serialize)()],t.prototype,"fontOffset",null),h([(0,d.serialize)()],t.prototype,"alpha",null),h([(0,d.serialize)()],t.prototype,"isSerializable",void 0),h([(0,d.serialize)()],t.prototype,"scaleX",null),h([(0,d.serialize)()],t.prototype,"scaleY",null),h([(0,d.serialize)()],t.prototype,"rotation",null),h([(0,d.serialize)()],t.prototype,"transformCenterY",null),h([(0,d.serialize)()],t.prototype,"transformCenterX",null),h([(0,d.serialize)()],t.prototype,"horizontalAlignment",null),h([(0,d.serialize)()],t.prototype,"verticalAlignment",null),h([(0,d.serialize)()],t.prototype,"fixedRatio",null),h([(0,d.serialize)()],t.prototype,"fixedRatioMasterIsWidth",null),h([(0,d.serialize)()],t.prototype,"width",null),h([(0,d.serialize)()],t.prototype,"height",null),h([(0,d.serialize)()],t.prototype,"style",null),h([(0,d.serialize)()],t.prototype,"color",null),h([(0,d.serialize)()],t.prototype,"gradient",null),h([(0,d.serialize)()],t.prototype,"zIndex",null),h([(0,d.serialize)()],t.prototype,"notRenderable",null),h([(0,d.serialize)()],t.prototype,"isVisible",null),h([(0,d.serialize)()],t.prototype,"descendantsOnlyPadding",null),h([(0,d.serialize)()],t.prototype,"paddingLeft",null),h([(0,d.serialize)()],t.prototype,"paddingRight",null),h([(0,d.serialize)()],t.prototype,"paddingTop",null),h([(0,d.serialize)()],t.prototype,"paddingBottom",null),h([(0,d.serialize)()],t.prototype,"left",null),h([(0,d.serialize)()],t.prototype,"top",null),h([(0,d.serialize)()],t.prototype,"linkOffsetX",null),h([(0,d.serialize)()],t.prototype,"linkOffsetY",null),h([(0,d.serialize)()],t.prototype,"isEnabled",null),h([(0,d.serialize)()],t.prototype,"disabledColor",null),h([(0,d.serialize)()],t.prototype,"disabledColorItem",null),h([(0,d.serialize)()],t.prototype,"overlapGroup",void 0),h([(0,d.serialize)()],t.prototype,"overlapDeltaMultiplier",void 0),t}();(0,d.RegisterClass)("BABYLON.GUI.Control",I);var B=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._children=new Array,i._measureForChildren=v.Empty(),i._background="",i._backgroundGradient=null,i._adaptWidthToChildren=!1,i._adaptHeightToChildren=!1,i._renderToIntermediateTexture=!1,i._intermediateTexture=null,i.delegatePickingToChildren=!1,i.logLayoutCycleErrors=!1,i.maxLayoutCycle=3,i.onControlAddedObservable=new d.Observable,i.onControlRemovedObservable=new d.Observable,i._inverseTransformMatrix=x.Identity(),i._inverseMeasure=new v(0,0,0,0),i}return l(e,t),Object.defineProperty(e.prototype,"renderToIntermediateTexture",{get:function(){return this._renderToIntermediateTexture},set:function(t){this._renderToIntermediateTexture!==t&&(this._renderToIntermediateTexture=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"adaptHeightToChildren",{get:function(){return this._adaptHeightToChildren},set:function(t){this._adaptHeightToChildren!==t&&(this._adaptHeightToChildren=t,t&&(this.height="100%"),this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"adaptWidthToChildren",{get:function(){return this._adaptWidthToChildren},set:function(t){this._adaptWidthToChildren!==t&&(this._adaptWidthToChildren=t,t&&(this.width="100%"),this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"background",{get:function(){return this._background},set:function(t){this._background!==t&&(this._background=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundGradient",{get:function(){return this._backgroundGradient},set:function(t){this._backgroundGradient!==t&&(this._backgroundGradient=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isReadOnly",{get:function(){return this._isReadOnly},set:function(t){this._isReadOnly=t;for(var e=0,i=this._children;et.zIndex){this._children.splice(o,0,t),i=!0;break}i||this._children.push(t),t.parent=this,e&&t.linkWithMesh(e),this._markAsDirty()},e.prototype._offsetLeft=function(e){t.prototype._offsetLeft.call(this,e);for(var i=0,o=this._children;i=0&&(n+=this.paddingLeftInPixels+this.paddingRightInPixels,this.width!==n+"px"&&(null===(i=this.parent)||void 0===i||i._markAsDirty(),this.width=n+"px",this._width.ignoreAdaptiveScaling=!0,this._rebuildLayout=!0)),this.adaptHeightToChildren&&a>=0&&(a+=this.paddingTopInPixels+this.paddingBottomInPixels,this.height!==a+"px"&&(null===(o=this.parent)||void 0===o||o._markAsDirty(),this.height=a+"px",this._height.ignoreAdaptiveScaling=!0,this._rebuildLayout=!0)),this._postMeasure()}r++}while(this._rebuildLayout&&r=3&&this.logLayoutCycleErrors&&d.Logger.Error("Layout cycle detected in GUI (Container name=".concat(this.name,", uniqueId=").concat(this.uniqueId,")")),e.restore(),this._isDirty&&(this.invalidateRect(),this._isDirty=!1),!0},e.prototype._postMeasure=function(){},e.prototype._draw=function(t,e){var i=this._renderToIntermediateTexture&&this._intermediateTexture,o=i?this._intermediateTexture.getContext():t;i&&(o.save(),o.translate(-this._currentMeasure.left,-this._currentMeasure.top),e?(this._transformMatrix.invertToRef(this._inverseTransformMatrix),e.transformToRef(this._inverseTransformMatrix,this._inverseMeasure),o.clearRect(this._inverseMeasure.left,this._inverseMeasure.top,this._inverseMeasure.width,this._inverseMeasure.height)):o.clearRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)),this._localDraw(o),t.save(),this.clipChildren&&this._clipForChildren(o);for(var r=0,n=this._children;r=0;c--)if((u=this._children[c]).isEnabled&&u.isHitTestVisible&&u.isVisible&&!u.notRenderable&&u.contains(e,i)){h=!0;break}if(!h)return!1}for(c=this._children.length-1;c>=0;c--){var u;if((u=this._children[c])._processPicking(e,i,o,r,n,a,s,l))return u.hoverCursor&&this._host._changeCursor(u.hoverCursor),!0}return!!_&&!!this.isHitTestVisible&&this._processObservables(r,e,i,o,n,a,s,l)},e.prototype._additionalProcessing=function(e,i){t.prototype._additionalProcessing.call(this,e,i),this._measureForChildren.copyFrom(this._currentMeasure)},e.prototype._getAdaptDimTo=function(t){return"width"===t?this.adaptWidthToChildren:this.adaptHeightToChildren},e.prototype.isDimensionFullyDefined=function(e){if(this._getAdaptDimTo(e)){for(var i=0,o=this.children;i=0;i--)this.children[i].dispose();null===(e=this._intermediateTexture)||void 0===e||e.dispose()},e.prototype._parseFromContent=function(e,i,o){var r;if(t.prototype._parseFromContent.call(this,e,i,o),this._link(i),e.backgroundGradient){var n=d.Tools.Instantiate("BABYLON.GUI."+e.backgroundGradient.className);this._backgroundGradient=new n,null===(r=this._backgroundGradient)||void 0===r||r.parse(e.backgroundGradient)}if(e.children)for(var a=0,s=e.children;ar&&(r=a.width)}if(this._resizeToFit){if(0===this._textWrapping||this._forceResizeWidth){var s=Math.ceil(this._paddingLeftInPixels)+Math.ceil(this._paddingRightInPixels)+Math.ceil(r);s!==this._width.getValueInPixel(this._host,this._tempParentMeasure.width)&&(this._width.updateInPlace(s,f.UNITMODE_PIXEL),this._rebuildLayout=!0)}var l=this._paddingTopInPixels+this._paddingBottomInPixels+this._fontOffset.height*this._lines.length|0;if(this._lines.length>0&&0!==this._lineSpacing.internalValue){var _;_=this._lineSpacing.isPixel?this._lineSpacing.getValue(this._host):this._lineSpacing.getValue(this._host)*this._height.getValueInPixel(this._host,this._cachedParentMeasure.height),l+=(this._lines.length-1)*_}l!==this._height.internalValue&&(this._height.updateInPlace(l,f.UNITMODE_PIXEL),this._rebuildLayout=!0)}},e.prototype._drawText=function(t,e,i,o){var r=this._currentMeasure.width,n=0;switch(this._textHorizontalAlignment){case I.HORIZONTAL_ALIGNMENT_LEFT:n=0;break;case I.HORIZONTAL_ALIGNMENT_RIGHT:n=r-e;break;case I.HORIZONTAL_ALIGNMENT_CENTER:n=(r-e)/2}(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(o.shadowColor=this.shadowColor,o.shadowBlur=this.shadowBlur,o.shadowOffsetX=this.shadowOffsetX,o.shadowOffsetY=this.shadowOffsetY),this.outlineWidth&&o.strokeText(t,this._currentMeasure.left+n,i),o.fillText(t,this._currentMeasure.left+n,i),this._underline&&this._drawLine(this._currentMeasure.left+n,i+3,this._currentMeasure.left+n+e,i+3,o),this._lineThrough&&this._drawLine(this._currentMeasure.left+n,i-this.fontSizeInPixels/3,this._currentMeasure.left+n+e,i-this.fontSizeInPixels/3,o)},e.prototype._drawLine=function(t,e,i,o,r){if(r.beginPath(),r.lineWidth=Math.round(.05*this.fontSizeInPixels),r.moveTo(t,e),r.lineTo(i,o),this.outlineWidth&&this.applyOutlineToUnderline)r.stroke(),r.fill();else{var n=r.strokeStyle;r.strokeStyle=r.fillStyle,r.stroke(),r.strokeStyle=n}r.closePath()},e.prototype._draw=function(t){t.save(),this._applyStates(t),this._renderLines(t),t.restore()},e.prototype._applyStates=function(e){t.prototype._applyStates.call(this,e),this.outlineWidth&&(e.lineWidth=this.outlineWidth,e.strokeStyle=this.outlineColor,e.lineJoin="miter",e.miterLimit=2)},e.prototype._breakLines=function(t,e,i){var o,r;this._linesTemp.length=0;var n=4===this._textWrapping?this._parseHTMLText(t,e,i):this.text.split("\n");switch(this._textWrapping){case 1:for(var a=0,s=n;ae?t-e:0,r=t/i;return Math.max(Math.floor(o/r),1)},e.prototype._parseLineEllipsis=function(t,e,i){void 0===t&&(t="");var o=this._getTextMetricsWidth(i.measureText(t)),r=this._getCharsToRemove(o,e,t.length),n=Array.from&&Array.from(t);if(n)for(;n.length&&o>e;)n.splice(n.length-r,r),t="".concat(n.join(""),"…"),o=this._getTextMetricsWidth(i.measureText(t)),r=this._getCharsToRemove(o,e,t.length);else{for(;t.length>2&&o>e;)t=t.slice(0,-r),o=this._getTextMetricsWidth(i.measureText(t+"…")),r=this._getCharsToRemove(o,e,t.length);t+="…"}return{text:t,width:o}},e.prototype._getTextMetricsWidth=function(t){return void 0!==t.actualBoundingBoxLeft?Math.abs(t.actualBoundingBoxLeft)+Math.abs(t.actualBoundingBoxRight):t.width},e.prototype._parseLineWordWrap=function(t,e,i){void 0===t&&(t="");for(var o=[],r=this.wordSplittingFunction?this.wordSplittingFunction(t):t.split(this._wordDivider),n=this._getTextMetricsWidth(i.measureText(t)),a=0;a0?t+this._wordDivider+r[a]:r[0],l=this._getTextMetricsWidth(i.measureText(s));l>e&&a>0?(o.push({text:t,width:n}),t=r[a],n=this._getTextMetricsWidth(i.measureText(t))):(n=l,t=s)}return o.push({text:t,width:n}),o},e.prototype._parseLineWordWrapEllipsis=function(t,e,i,o){void 0===t&&(t="");for(var r=this._parseLineWordWrap(t,e,o),n=1;n<=r.length;n++)if(this._computeHeightForLinesOf(n)>i&&n>1){var a=r[n-2],s=r[n-1];r[n-2]=this._parseLineEllipsis(a.text+this._wordDivider+s.text,e,o);for(var l=r.length-n+1,_=0;_0&&0!==this._lineSpacing.internalValue&&(e+=(t-1)*(this._lineSpacing.isPixel?this._lineSpacing.getValue(this._host):this._lineSpacing.getValue(this._host)*this._height.getValueInPixel(this._host,this._cachedParentMeasure.height))),e},e.prototype.isDimensionFullyDefined=function(e){return!!this.resizeToFit||t.prototype.isDimensionFullyDefined.call(this,e)},e.prototype.computeExpectedHeight=function(){var t,e;if(this.text&&this.widthInPixels){var i=null===(t=d.EngineStore.LastCreatedEngine)||void 0===t?void 0:t.createCanvas(0,0).getContext("2d");if(i){this._applyStates(i),this._fontOffset||(this._fontOffset=I._GetFontOffset(i.font,null===(e=this._host.getScene())||void 0===e?void 0:e.getEngine()));var o=this._lines?this._lines:this._breakLines(this.widthInPixels-this._paddingLeftInPixels-this._paddingRightInPixels,this.heightInPixels-this._paddingTopInPixels-this._paddingBottomInPixels,i);return this._computeHeightForLinesOf(o.length)}}return 0},e.prototype.dispose=function(){var e;t.prototype.dispose.call(this),this.onTextChangedObservable.clear(),null===(e=this._htmlElement)||void 0===e||e.remove(),this._htmlElement=null},h([(0,d.serialize)()],e.prototype,"resizeToFit",null),h([(0,d.serialize)()],e.prototype,"textWrapping",null),h([(0,d.serialize)()],e.prototype,"text",null),h([(0,d.serialize)()],e.prototype,"textHorizontalAlignment",null),h([(0,d.serialize)()],e.prototype,"textVerticalAlignment",null),h([(0,d.serialize)()],e.prototype,"lineSpacing",null),h([(0,d.serialize)()],e.prototype,"outlineWidth",null),h([(0,d.serialize)()],e.prototype,"underline",null),h([(0,d.serialize)()],e.prototype,"lineThrough",null),h([(0,d.serialize)()],e.prototype,"applyOutlineToUnderline",null),h([(0,d.serialize)()],e.prototype,"outlineColor",null),h([(0,d.serialize)()],e.prototype,"wordDivider",null),h([(0,d.serialize)()],e.prototype,"forceResizeWidth",null),e}(I);(0,d.RegisterClass)("BABYLON.GUI.TextBlock",S);var O=function(t){function e(i,o){void 0===o&&(o=null);var r=t.call(this,i)||this;return r.name=i,r._workingCanvas=null,r._loaded=!1,r._stretch=e.STRETCH_FILL,r._source=null,r._autoScale=!1,r._sourceLeft=0,r._sourceTop=0,r._sourceWidth=0,r._sourceHeight=0,r._svgAttributesComputationCompleted=!1,r._isSVG=!1,r._cellWidth=0,r._cellHeight=0,r._cellId=-1,r._populateNinePatchSlicesFromImage=!1,r._imageDataCache={data:null,key:""},r.onImageLoadedObservable=new d.Observable,r.onSVGAttributesComputedObservable=new d.Observable,r.source=o,r}return l(e,t),Object.defineProperty(e.prototype,"isLoaded",{get:function(){return this._loaded},enumerable:!1,configurable:!0}),e.prototype.isReady=function(){return this.isLoaded},Object.defineProperty(e.prototype,"detectPointerOnOpaqueOnly",{get:function(){return this._detectPointerOnOpaqueOnly},set:function(t){this._detectPointerOnOpaqueOnly!==t&&(this._detectPointerOnOpaqueOnly=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliceLeft",{get:function(){return this._sliceLeft},set:function(t){this._sliceLeft!==t&&(this._sliceLeft=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliceRight",{get:function(){return this._sliceRight},set:function(t){this._sliceRight!==t&&(this._sliceRight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliceTop",{get:function(){return this._sliceTop},set:function(t){this._sliceTop!==t&&(this._sliceTop=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliceBottom",{get:function(){return this._sliceBottom},set:function(t){this._sliceBottom!==t&&(this._sliceBottom=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sourceLeft",{get:function(){return this._sourceLeft},set:function(t){this._sourceLeft!==t&&(this._sourceLeft=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sourceTop",{get:function(){return this._sourceTop},set:function(t){this._sourceTop!==t&&(this._sourceTop=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sourceWidth",{get:function(){return this._sourceWidth},set:function(t){this._sourceWidth!==t&&(this._sourceWidth=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sourceHeight",{get:function(){return this._sourceHeight},set:function(t){this._sourceHeight!==t&&(this._sourceHeight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageWidth",{get:function(){return this._imageWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageHeight",{get:function(){return this._imageHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"populateNinePatchSlicesFromImage",{get:function(){return this._populateNinePatchSlicesFromImage},set:function(t){this._populateNinePatchSlicesFromImage!==t&&(this._populateNinePatchSlicesFromImage=t,this._populateNinePatchSlicesFromImage&&this._loaded&&this._extractNinePatchSliceDataFromImage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSVG",{get:function(){return this._isSVG},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"svgAttributesComputationCompleted",{get:function(){return this._svgAttributesComputationCompleted},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoScale",{get:function(){return this._autoScale},set:function(t){this._autoScale!==t&&(this._autoScale=t,t&&this._loaded&&this.synchronizeSizeWithContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stretch",{get:function(){return this._stretch},set:function(t){this._stretch!==t&&(this._stretch=t,this._markAsDirty())},enumerable:!1,configurable:!0}),e.prototype._rotate90=function(t,i){var o,r;void 0===i&&(i=!1);var n=this._domImage.width,a=this._domImage.height,s=(null===(r=null===(o=this._host)||void 0===o?void 0:o.getScene())||void 0===r?void 0:r.getEngine())||d.EngineStore.LastCreatedEngine;if(!s)throw new Error("Invalid engine. Unable to create a canvas.");var l=s.createCanvas(a,n),_=l.getContext("2d");_.translate(l.width/2,l.height/2),_.rotate(t*Math.PI/2),_.drawImage(this._domImage,0,0,n,a,-n/2,-a/2,n,a);var h=l.toDataURL("image/jpg"),c=new e(this.name+"rotated",h);return i&&(c._stretch=this._stretch,c._autoScale=this._autoScale,c._cellId=this._cellId,c._cellWidth=t%1?this._cellHeight:this._cellWidth,c._cellHeight=t%1?this._cellWidth:this._cellHeight),this._handleRotationForSVGImage(this,c,t),this._imageDataCache.data=null,c},e.prototype._handleRotationForSVGImage=function(t,e,i){var o=this;t._isSVG&&(t._svgAttributesComputationCompleted?(this._rotate90SourceProperties(t,e,i),this._markAsDirty()):t.onSVGAttributesComputedObservable.addOnce((function(){o._rotate90SourceProperties(t,e,i),o._markAsDirty()})))},e.prototype._rotate90SourceProperties=function(t,e,i){var o,r,n=t.sourceLeft,a=t.sourceTop,s=t.domImage.width,l=t.domImage.height,_=n,h=a,c=t.sourceWidth,u=t.sourceHeight;if(0!=i){var d=i<0?-1:1;i%=4;for(var f=0;f127&&-1===this._sliceLeft)this._sliceLeft=s;else if(_<127&&this._sliceLeft>-1){this._sliceRight=s;break}this._sliceTop=-1,this._sliceBottom=-1;for(var l=0;l127&&-1===this._sliceTop)this._sliceTop=l;else if(_<127&&this._sliceTop>-1){this._sliceBottom=l;break}}},Object.defineProperty(e.prototype,"domImage",{get:function(){return this._domImage},set:function(t){var e=this;this._domImage=t,this._loaded=!1,this._imageDataCache.data=null,this._domImage.width?this._onImageLoaded():this._domImage.onload=function(){e._onImageLoaded()}},enumerable:!1,configurable:!0}),e.prototype._onImageLoaded=function(){this._imageDataCache.data=null,this._imageWidth=this._domImage.width,this._imageHeight=this._domImage.height,this._loaded=!0,this._populateNinePatchSlicesFromImage&&this._extractNinePatchSliceDataFromImage(),this._autoScale&&this.synchronizeSizeWithContent(),this.onImageLoadedObservable.notifyObservers(this),this._markAsDirty()},Object.defineProperty(e.prototype,"source",{get:function(){return this._source},set:function(t){var i,o,r,n,a,s=this;if(this._urlRewriter&&t&&(t=this._urlRewriter(t)),this._source!==t){this._removeCacheUsage(this._source),this._loaded=!1,this._source=t,this._imageDataCache.data=null,t&&(t=this._svgCheck(t));var l=(null===(o=null===(i=this._host)||void 0===i?void 0:i.getScene())||void 0===o?void 0:o.getEngine())||d.EngineStore.LastCreatedEngine;if(!l)throw new Error("Invalid engine. Unable to create a canvas.");if(t&&e.SourceImgCache.has(t)){var _=e.SourceImgCache.get(t);return this._domImage=_.img,_.timesUsed+=1,void(_.loaded?this._onImageLoaded():_.waitingForLoadCallback.push(this._onImageLoaded.bind(this)))}this._domImage=l.createCanvasImage();var h=this._domImage,c=!1;h.style&&(null===(r=this._source)||void 0===r?void 0:r.endsWith(".svg"))&&(h.style.visibility="hidden",h.style.position="absolute",h.style.top="0",null===(a=null===(n=l.getRenderingCanvas())||void 0===n?void 0:n.parentNode)||void 0===a||a.appendChild(h),c=!0),t&&e.SourceImgCache.set(t,{img:this._domImage,timesUsed:1,loaded:!1,waitingForLoadCallback:[this._onImageLoaded.bind(this)]}),this._domImage.onload=function(){if(t){var i=e.SourceImgCache.get(t);if(i){i.loaded=!0;for(var o=0,r=i.waitingForLoadCallback;o0},e.prototype._getTypeName=function(){return"Image"},e.prototype.synchronizeSizeWithContent=function(){this._loaded&&(this.width=this._domImage.width+"px",this.height=this._domImage.height+"px")},e.prototype._processMeasures=function(i,o){if(this._loaded)switch(this._stretch){case e.STRETCH_NONE:case e.STRETCH_FILL:case e.STRETCH_UNIFORM:case e.STRETCH_NINE_PATCH:break;case e.STRETCH_EXTEND:this._autoScale&&this.synchronizeSizeWithContent(),this.parent&&this.parent.parent&&(this.parent.adaptWidthToChildren=!0,this.parent.adaptHeightToChildren=!0)}t.prototype._processMeasures.call(this,i,o)},e.prototype._prepareWorkingCanvasForOpaqueDetection=function(){var t,e;if(this._detectPointerOnOpaqueOnly){var i=this._currentMeasure.width,o=this._currentMeasure.height;if(!this._workingCanvas){var r=(null===(e=null===(t=this._host)||void 0===t?void 0:t.getScene())||void 0===e?void 0:e.getEngine())||d.EngineStore.LastCreatedEngine;if(!r)throw new Error("Invalid engine. Unable to create a canvas.");this._workingCanvas=r.createCanvas(i,o)}this._workingCanvas.getContext("2d").clearRect(0,0,i,o)}},e.prototype._drawImage=function(t,e,i,o,r,n,a,s,l){if(t.drawImage(this._domImage,e,i,o,r,n,a,s,l),this._detectPointerOnOpaqueOnly){var _=t.getTransform(),h=this._workingCanvas.getContext("2d");h.save();var c=n-this._currentMeasure.left,u=a-this._currentMeasure.top;h.setTransform(_.a,_.b,_.c,_.d,(c+s)/2,(u+l)/2),h.translate(-(c+s)/2,-(u+l)/2),h.drawImage(this._domImage,e,i,o,r,c,u,s,l),h.restore()}},e.prototype._draw=function(t){var i,o,r,n;if(t.save(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),-1==this.cellId)i=this._sourceLeft,o=this._sourceTop,r=this._sourceWidth?this._sourceWidth:this._imageWidth,n=this._sourceHeight?this._sourceHeight:this._imageHeight;else{var a=this._domImage.naturalWidth/this.cellWidth,s=this.cellId/a|0,l=this.cellId%a;i=this.cellWidth*l,o=this.cellHeight*s,r=this.cellWidth,n=this.cellHeight}if(this._prepareWorkingCanvasForOpaqueDetection(),this._applyStates(t),this._loaded)switch(this._stretch){case e.STRETCH_NONE:case e.STRETCH_FILL:this._drawImage(t,i,o,r,n,this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height);break;case e.STRETCH_UNIFORM:var _=this._currentMeasure.width/r,h=this._currentMeasure.height/n,c=Math.min(_,h),u=(this._currentMeasure.width-r*c)/2,d=(this._currentMeasure.height-n*c)/2;this._drawImage(t,i,o,r,n,this._currentMeasure.left+u,this._currentMeasure.top+d,r*c,n*c);break;case e.STRETCH_EXTEND:this._drawImage(t,i,o,r,n,this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height);break;case e.STRETCH_NINE_PATCH:this._renderNinePatch(t,i,o,r,n)}t.restore()},e.prototype._renderNinePatch=function(t,e,i,o,r){var n=this.host.idealWidth?this._width.getValue(this.host)/this.host.idealWidth:this.host.idealHeight?this._height.getValue(this.host)/this.host.idealHeight:1,a=this._sliceLeft,s=this._sliceTop,l=r-this._sliceBottom,_=o-this._sliceRight,h=this._sliceRight-this._sliceLeft,c=this._sliceBottom-this._sliceTop,u=Math.round(a*n),d=Math.round(s*n),f=Math.round(l*n),p=Math.round(_*n),g=Math.round(this._currentMeasure.width)-p-u+2,b=Math.round(this._currentMeasure.height)-f-d+2,m=Math.round(this._currentMeasure.left)+u-1,v=Math.round(this._currentMeasure.top)+d-1,y=Math.round(this._currentMeasure.left+this._currentMeasure.width)-p,x=Math.round(this._currentMeasure.top+this._currentMeasure.height)-f;this._drawImage(t,e,i,a,s,this._currentMeasure.left,this._currentMeasure.top,u,d),this._drawImage(t,e+this._sliceLeft,i,h,s,m+1,this._currentMeasure.top,g-2,d),this._drawImage(t,e+this._sliceRight,i,_,s,y,this._currentMeasure.top,p,d),this._drawImage(t,e,i+this._sliceTop,a,c,this._currentMeasure.left,v+1,u,b-2),this._drawImage(t,e+this._sliceLeft,i+this._sliceTop,h,c,m+1,v+1,g-2,b-2),this._drawImage(t,e+this._sliceRight,i+this._sliceTop,_,c,y,v+1,p,b-2),this._drawImage(t,e,i+this._sliceBottom,a,l,this._currentMeasure.left,x,u,f),this._drawImage(t,e+this.sliceLeft,i+this._sliceBottom,h,l,m+1,x,g-2,f),this._drawImage(t,e+this._sliceRight,i+this._sliceBottom,_,l,y,x,p,f)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.onImageLoadedObservable.clear(),this.onSVGAttributesComputedObservable.clear(),this._removeCacheUsage(this._source)},e.SourceImgCache=new Map,e.STRETCH_NONE=0,e.STRETCH_FILL=1,e.STRETCH_UNIFORM=2,e.STRETCH_EXTEND=3,e.STRETCH_NINE_PATCH=4,h([(0,d.serialize)()],e.prototype,"detectPointerOnOpaqueOnly",null),h([(0,d.serialize)()],e.prototype,"sliceLeft",null),h([(0,d.serialize)()],e.prototype,"sliceRight",null),h([(0,d.serialize)()],e.prototype,"sliceTop",null),h([(0,d.serialize)()],e.prototype,"sliceBottom",null),h([(0,d.serialize)()],e.prototype,"sourceLeft",null),h([(0,d.serialize)()],e.prototype,"sourceTop",null),h([(0,d.serialize)()],e.prototype,"sourceWidth",null),h([(0,d.serialize)()],e.prototype,"sourceHeight",null),h([(0,d.serialize)()],e.prototype,"populateNinePatchSlicesFromImage",null),h([(0,d.serialize)()],e.prototype,"autoScale",null),h([(0,d.serialize)()],e.prototype,"stretch",null),h([(0,d.serialize)()],e.prototype,"source",null),h([(0,d.serialize)()],e.prototype,"cellWidth",null),h([(0,d.serialize)()],e.prototype,"cellHeight",null),h([(0,d.serialize)()],e.prototype,"cellId",null),e}(I);(0,d.RegisterClass)("BABYLON.GUI.Image",O);var R=function(t){function e(e){var i=t.call(this,e)||this;i.name=e,i.thickness=1,i.isPointerBlocker=!0;var o=null;return i.pointerEnterAnimation=function(){o=i.alpha,i.alpha-=.1},i.pointerOutAnimation=function(){null!==o&&(i.alpha=o)},i.pointerDownAnimation=function(){i.scaleX-=.05,i.scaleY-=.05},i.pointerUpAnimation=function(){i.scaleX+=.05,i.scaleY+=.05},i}return l(e,t),Object.defineProperty(e.prototype,"image",{get:function(){return this._image},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textBlock",{get:function(){return this._textBlock},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"Button"},e.prototype._processPicking=function(e,i,o,r,n,a,s,l){if(!this._isEnabled||!this.isHitTestVisible||!this.isVisible||this.notRenderable)return!1;if(!t.prototype.contains.call(this,e,i))return!1;if(this.delegatePickingToChildren){for(var _=!1,h=this._children.length-1;h>=0;h--){var c=this._children[h];if(c.isEnabled&&c.isHitTestVisible&&c.isVisible&&!c.notRenderable&&c.contains(e,i)){_=!0;break}}if(!_)return!1}return this._processObservables(r,e,i,o,n,a,s,l),!0},e.prototype._onPointerEnter=function(e,i){return!!t.prototype._onPointerEnter.call(this,e,i)&&(!this.isReadOnly&&this.pointerEnterAnimation&&this.pointerEnterAnimation(),!0)},e.prototype._onPointerOut=function(e,i,o){void 0===o&&(o=!1),!this.isReadOnly&&this.pointerOutAnimation&&this.pointerOutAnimation(),t.prototype._onPointerOut.call(this,e,i,o)},e.prototype._onPointerDown=function(e,i,o,r,n){return!!t.prototype._onPointerDown.call(this,e,i,o,r,n)&&(!this.isReadOnly&&this.pointerDownAnimation&&this.pointerDownAnimation(),!0)},e.prototype._getRectangleFill=function(t){return this.isEnabled?this._getBackgroundColor(t):this._disabledColor},e.prototype._onPointerUp=function(e,i,o,r,n,a){!this.isReadOnly&&this.pointerUpAnimation&&this.pointerUpAnimation(),t.prototype._onPointerUp.call(this,e,i,o,r,n,a)},e.prototype.serialize=function(e,i){t.prototype.serialize.call(this,e,i),(this.isSerializable||i)&&(this._textBlock&&(e.textBlockName=this._textBlock.name),this._image&&(e.imageName=this._image.name))},e.prototype._parseFromContent=function(e,i){t.prototype._parseFromContent.call(this,e,i),e.textBlockName&&(this._textBlock=this.getChildByName(e.textBlockName)),e.imageName&&(this._image=this.getChildByName(e.imageName))},e.CreateImageButton=function(t,e,i){var o=new this(t),r=new S(t+"_button",e);r.textWrapping=!0,r.textHorizontalAlignment=I.HORIZONTAL_ALIGNMENT_CENTER,r.paddingLeft="20%",o.addControl(r);var n=new O(t+"_icon",i);return n.width="20%",n.stretch=O.STRETCH_UNIFORM,n.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,o.addControl(n),o._image=n,o._textBlock=r,o},e.CreateImageOnlyButton=function(t,e){var i=new this(t),o=new O(t+"_icon",e);return o.stretch=O.STRETCH_FILL,o.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,i.addControl(o),i._image=o,i},e.CreateSimpleButton=function(t,e){var i=new this(t),o=new S(t+"_button",e);return o.textWrapping=!0,o.textHorizontalAlignment=I.HORIZONTAL_ALIGNMENT_CENTER,i.addControl(o),i._textBlock=o,i},e.CreateImageWithCenterTextButton=function(t,e,i){var o=new this(t),r=new O(t+"_icon",i);r.stretch=O.STRETCH_FILL,o.addControl(r);var n=new S(t+"_button",e);return n.textWrapping=!0,n.textHorizontalAlignment=I.HORIZONTAL_ALIGNMENT_CENTER,o.addControl(n),o._image=r,o._textBlock=n,o},e}(T);(0,d.RegisterClass)("BABYLON.GUI.Button",R);var w=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._isVertical=!0,i._manualWidth=!1,i._manualHeight=!1,i._doNotTrackManualChanges=!1,i._spacing=0,i.ignoreLayoutWarnings=!1,i}return l(e,t),Object.defineProperty(e.prototype,"isVertical",{get:function(){return this._isVertical},set:function(t){this._isVertical!==t&&(this._isVertical=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this._spacing},set:function(t){this._spacing!==t&&(this._spacing=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width.toString(this._host)},set:function(t){this._doNotTrackManualChanges||(this._manualWidth=!0),this._width.toString(this._host)!==t&&this._width.fromString(t)&&this._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height.toString(this._host)},set:function(t){this._doNotTrackManualChanges||(this._manualHeight=!0),this._height.toString(this._host)!==t&&this._height.fromString(t)&&this._markAsDirty()},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"StackPanel"},e.prototype._preMeasure=function(e,i){for(var o=0,r=this._children;o=0?Math.min(t,this._characters.length):this._characters.length+Math.max(t,-this._characters.length),void 0===e?e=this._characters.length-t:(isNaN(e)||e<0)&&(e=0);for(var i=[];--e>=0;)i[e]=this._characters[t+e];return i.join("")}return this._text.substr(t,e)},t.prototype.substring=function(t,e){if(this._characters){isNaN(t)?t=0:t>this._characters.length?t=this._characters.length:t<0&&(t=0),void 0===e?e=this._characters.length:isNaN(e)?e=0:e>this._characters.length?e=this._characters.length:e<0&&(e=0);for(var i=[],o=0;t0){if(this.isTextHighlightOn)return this._textWrapper.removePart(this._startHighlightIndex,this._endHighlightIndex),this._textHasChanged(),this.isTextHighlightOn=!1,this._cursorOffset=this._textWrapper.length-this._startHighlightIndex,this._blinkIsEven=!1,void(i&&i.preventDefault());0===this._cursorOffset?this.text=this._textWrapper.substr(0,this._textWrapper.length-1):(r=this._textWrapper.length-this._cursorOffset)>0&&(this._textWrapper.removePart(r-1,r),this._textHasChanged())}return void(i&&i.preventDefault());case 46:if(this.isTextHighlightOn)return this._textWrapper.removePart(this._startHighlightIndex,this._endHighlightIndex),this._textHasChanged(),this.isTextHighlightOn=!1,this._cursorOffset=this._textWrapper.length-this._startHighlightIndex,void(i&&i.preventDefault());if(this._textWrapper.text&&this._textWrapper.length>0&&this._cursorOffset>0){var r=this._textWrapper.length-this._cursorOffset;this._textWrapper.removePart(r,r+1),this._textHasChanged(),this._cursorOffset--}return void(i&&i.preventDefault());case 13:return this._host.focusedControl=null,void(this.isTextHighlightOn=!1);case 35:return this._cursorOffset=0,this._blinkIsEven=!1,this.isTextHighlightOn=!1,void this._markAsDirty();case 36:return this._cursorOffset=this._textWrapper.length,this._blinkIsEven=!1,this.isTextHighlightOn=!1,void this._markAsDirty();case 37:if(this._cursorOffset++,this._cursorOffset>this._textWrapper.length&&(this._cursorOffset=this._textWrapper.length),i&&i.shiftKey){if(this._blinkIsEven=!1,i.ctrlKey||i.metaKey){if(!this.isTextHighlightOn){if(this._textWrapper.length===this._cursorOffset)return;this._endHighlightIndex=this._textWrapper.length-this._cursorOffset+1}return this._startHighlightIndex=0,this._cursorIndex=this._textWrapper.length-this._endHighlightIndex,this._cursorOffset=this._textWrapper.length,this.isTextHighlightOn=!0,void this._markAsDirty()}return this.isTextHighlightOn?-1===this._cursorIndex&&(this._cursorIndex=this._textWrapper.length-this._endHighlightIndex,this._cursorOffset=0===this._startHighlightIndex?this._textWrapper.length:this._textWrapper.length-this._startHighlightIndex+1):(this.isTextHighlightOn=!0,this._cursorIndex=this._cursorOffset>=this._textWrapper.length?this._textWrapper.length:this._cursorOffset-1),this._cursorIndexthis._cursorOffset?(this._endHighlightIndex=this._textWrapper.length-this._cursorOffset,this._startHighlightIndex=this._textWrapper.length-this._cursorIndex):this.isTextHighlightOn=!1,void this._markAsDirty()}return this.isTextHighlightOn&&(this._cursorOffset=this._textWrapper.length-this._startHighlightIndex,this.isTextHighlightOn=!1),i&&(i.ctrlKey||i.metaKey)&&(this._cursorOffset=this._textWrapper.length,i.preventDefault()),this._blinkIsEven=!1,this.isTextHighlightOn=!1,this._cursorIndex=-1,void this._markAsDirty();case 39:if(this._cursorOffset--,this._cursorOffset<0&&(this._cursorOffset=0),i&&i.shiftKey){if(this._blinkIsEven=!1,i.ctrlKey||i.metaKey){if(!this.isTextHighlightOn){if(0===this._cursorOffset)return;this._startHighlightIndex=this._textWrapper.length-this._cursorOffset-1}return this._endHighlightIndex=this._textWrapper.length,this.isTextHighlightOn=!0,this._cursorIndex=this._textWrapper.length-this._startHighlightIndex,this._cursorOffset=0,void this._markAsDirty()}return this.isTextHighlightOn?-1===this._cursorIndex&&(this._cursorIndex=this._textWrapper.length-this._startHighlightIndex,this._cursorOffset=this._textWrapper.length===this._endHighlightIndex?0:this._textWrapper.length-this._endHighlightIndex-1):(this.isTextHighlightOn=!0,this._cursorIndex=this._cursorOffset<=0?0:this._cursorOffset+1),this._cursorIndexthis._cursorOffset?(this._endHighlightIndex=this._textWrapper.length-this._cursorOffset,this._startHighlightIndex=this._textWrapper.length-this._cursorIndex):this.isTextHighlightOn=!1,void this._markAsDirty()}return this.isTextHighlightOn&&(this._cursorOffset=this._textWrapper.length-this._endHighlightIndex,this.isTextHighlightOn=!1),i&&(i.ctrlKey||i.metaKey)&&(this._cursorOffset=0,i.preventDefault()),this._blinkIsEven=!1,this.isTextHighlightOn=!1,this._cursorIndex=-1,void this._markAsDirty()}if(32===t&&(e=null!==(o=null==i?void 0:i.key)&&void 0!==o?o:" "),this._deadKey="Dead"===e,e&&(-1===t||32===t||34===t||39===t||t>47&&t<64||t>64&&t<91||t>159&&t<193||t>218&&t<223||t>95&&t<112)&&(this._currentKey=e,this.onBeforeKeyAddObservable.notifyObservers(this),e=this._currentKey,this._addKey&&!this._deadKey))if(this.isTextHighlightOn)this._textWrapper.removePart(this._startHighlightIndex,this._endHighlightIndex,e),this._textHasChanged(),this._cursorOffset=this._textWrapper.length-(this._startHighlightIndex+1),this.isTextHighlightOn=!1,this._blinkIsEven=!1,this._markAsDirty();else if(0===this._cursorOffset)this.text+=this._deadKey&&(null==i?void 0:i.key)?i.key:e;else{var n=this._textWrapper.length-this._cursorOffset;this._textWrapper.removePart(n,n,e),this._textHasChanged()}}},e.prototype._updateValueFromCursorIndex=function(t){if(this._blinkIsEven=!1,-1===this._cursorIndex)this._cursorIndex=t;else if(this._cursorIndexthis._cursorOffset))return this.isTextHighlightOn=!1,void this._markAsDirty();this._endHighlightIndex=this._textWrapper.length-this._cursorOffset,this._startHighlightIndex=this._textWrapper.length-this._cursorIndex}this.isTextHighlightOn=!0,this._markAsDirty()},e.prototype._processDblClick=function(t){var e,i;this._startHighlightIndex=this._textWrapper.length-this._cursorOffset,this._endHighlightIndex=this._startHighlightIndex;do{i=this._endHighlightIndex0&&this._textWrapper.isWord(this._startHighlightIndex-1)?--this._startHighlightIndex:0}while(e||i);this._cursorOffset=this._textWrapper.length-this._startHighlightIndex,this.isTextHighlightOn=!0,this._clickedCoordinate=null,this._blinkIsEven=!0,this._cursorIndex=-1,this._markAsDirty()},e.prototype._selectAllText=function(){this._blinkIsEven=!0,this.isTextHighlightOn=!0,this._startHighlightIndex=0,this._endHighlightIndex=this._textWrapper.length,this._cursorOffset=this._textWrapper.length,this._cursorIndex=-1,this._markAsDirty()},e.prototype.processKeyboard=function(e){this.processKey(e.keyCode,e.key,e),t.prototype.processKeyboard.call(this,e)},e.prototype._onCopyText=function(t){this.isTextHighlightOn=!1;try{t.clipboardData&&t.clipboardData.setData("text/plain",this._highlightedText)}catch(t){}this._host.clipboardData=this._highlightedText},e.prototype._onCutText=function(t){if(this._highlightedText){this._textWrapper.removePart(this._startHighlightIndex,this._endHighlightIndex),this._textHasChanged(),this.isTextHighlightOn=!1,this._cursorOffset=this._textWrapper.length-this._startHighlightIndex;try{t.clipboardData&&t.clipboardData.setData("text/plain",this._highlightedText)}catch(t){}this._host.clipboardData=this._highlightedText,this._highlightedText=""}},e.prototype._onPasteText=function(t){var e;e=t.clipboardData&&-1!==t.clipboardData.types.indexOf("text/plain")?t.clipboardData.getData("text/plain"):this._host.clipboardData;var i=this._textWrapper.length-this._cursorOffset;this._textWrapper.removePart(i,i,e),this._textHasChanged()},e.prototype._draw=function(t){var e,i=this;t.save(),this._applyStates(t),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),this._isFocused?this._focusedBackground&&(t.fillStyle=this._isEnabled?this._focusedBackground:this._disabledColor,t.fillRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)):this._background&&(t.fillStyle=this._isEnabled?this._background:this._disabledColor,t.fillRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),this._fontOffset&&!this._wasDirty||(this._fontOffset=I._GetFontOffset(t.font,null===(e=this._host.getScene())||void 0===e?void 0:e.getEngine()));var o=this._currentMeasure.left+this._margin.getValueInPixel(this._host,this._tempParentMeasure.width);this.color&&(t.fillStyle=this.color);var r=this._beforeRenderText(this._textWrapper);this._isFocused||this._textWrapper.text||!this._placeholderText||((r=new E).text=this._placeholderText,this._placeholderColor&&(t.fillStyle=this._placeholderColor)),this._textWidth=t.measureText(r.text).width;var n=2*this._margin.getValueInPixel(this._host,this._tempParentMeasure.width);this._autoStretchWidth&&(this.width=Math.min(this._maxWidth.getValueInPixel(this._host,this._tempParentMeasure.width),this._textWidth+n)+"px",this._autoStretchWidth=!0);var a=this._fontOffset.ascent+(this._currentMeasure.height-this._fontOffset.height)/2,s=this._width.getValueInPixel(this._host,this._tempParentMeasure.width)-n;if(t.save(),t.beginPath(),t.rect(o,this._currentMeasure.top+(this._currentMeasure.height-this._fontOffset.height)/2,s+2,this._currentMeasure.height),t.clip(),this._isFocused&&this._textWidth>s){var l=o-this._textWidth+s;this._scrollLeft||(this._scrollLeft=l)}else this._scrollLeft=o;if(this.outlineWidth&&t.strokeText(r.text,this._scrollLeft,this._currentMeasure.top+a),t.fillText(r.text,this._scrollLeft,this._currentMeasure.top+a),this._isFocused){if(this._clickedCoordinate){var _=this._scrollLeft+this._textWidth-this._clickedCoordinate,h=0;this._cursorOffset=0;var c=0;do{this._cursorOffset&&(c=Math.abs(_-h)),this._cursorOffset++,h=t.measureText(r.substr(r.length-this._cursorOffset,this._cursorOffset)).width}while(h<_&&r.length>=this._cursorOffset);Math.abs(_-h)>c&&this._cursorOffset--,this._blinkIsEven=!1,this._clickedCoordinate=null}if(!this._blinkIsEven){var u=r.substr(r.length-this._cursorOffset),d=t.measureText(u).width,f=this._scrollLeft+this._textWidth-d;fo+s&&(this._scrollLeft+=o+s-f,f=o+s,this._markAsDirty()),this.isTextHighlightOn||t.fillRect(f,this._currentMeasure.top+(this._currentMeasure.height-this._fontOffset.height)/2,2,this._fontOffset.height)}if(clearTimeout(this._blinkTimeout),this._blinkTimeout=setTimeout((function(){i._blinkIsEven=!i._blinkIsEven,i._markAsDirty()}),500),this.isTextHighlightOn){clearTimeout(this._blinkTimeout);var p=t.measureText(r.substring(this._startHighlightIndex)).width,g=this._scrollLeft+this._textWidth-p;this._highlightedText=r.substring(this._startHighlightIndex,this._endHighlightIndex);var b=t.measureText(r.substring(this._startHighlightIndex,this._endHighlightIndex)).width;g=this._rowDefinitions.length?null:this._rowDefinitions[t]},e.prototype.getColumnDefinition=function(t){return t<0||t>=this._columnDefinitions.length?null:this._columnDefinitions[t]},e.prototype.addRowDefinition=function(t,e){var i=this;return void 0===e&&(e=!1),this._rowDefinitions.push(new f(t,e?f.UNITMODE_PIXEL:f.UNITMODE_PERCENTAGE)),this._rowDefinitionObservers.push(this._rowDefinitions[this.rowCount-1].onChangedObservable.add((function(){return i._markAsDirty()}))),this._markAsDirty(),this},e.prototype.addColumnDefinition=function(t,e){var i=this;return void 0===e&&(e=!1),this._columnDefinitions.push(new f(t,e?f.UNITMODE_PIXEL:f.UNITMODE_PERCENTAGE)),this._columnDefinitionObservers.push(this._columnDefinitions[this.columnCount-1].onChangedObservable.add((function(){return i._markAsDirty()}))),this._markAsDirty(),this},e.prototype.setRowDefinition=function(t,e,i){var o=this;if(void 0===i&&(i=!1),t<0||t>=this._rowDefinitions.length)return this;var r=this._rowDefinitions[t];return r&&r.isPixel===i&&r.value===e||(this._rowDefinitions[t].onChangedObservable.remove(this._rowDefinitionObservers[t]),this._rowDefinitions[t]=new f(e,i?f.UNITMODE_PIXEL:f.UNITMODE_PERCENTAGE),this._rowDefinitionObservers[t]=this._rowDefinitions[t].onChangedObservable.add((function(){return o._markAsDirty()})),this._markAsDirty()),this},e.prototype.setColumnDefinition=function(t,e,i){var o=this;if(void 0===i&&(i=!1),t<0||t>=this._columnDefinitions.length)return this;var r=this._columnDefinitions[t];return r&&r.isPixel===i&&r.value===e||(this._columnDefinitions[t].onChangedObservable.remove(this._columnDefinitionObservers[t]),this._columnDefinitions[t]=new f(e,i?f.UNITMODE_PIXEL:f.UNITMODE_PERCENTAGE),this._columnDefinitionObservers[t]=this._columnDefinitions[t].onChangedObservable.add((function(){return o._markAsDirty()})),this._markAsDirty()),this},e.prototype.getChildrenAt=function(t,e){var i=this._cells["".concat(t,":").concat(e)];return i?i.children:null},e.prototype.getChildCellInfo=function(t){return t._tag},e.prototype._removeCell=function(e,i){if(e){t.prototype.removeControl.call(this,e);for(var o=0,r=e.children;o=this._columnDefinitions.length)return this;for(var e=0;e=this._rowDefinitions.length)return this;for(var e=0;e=1-e._Epsilon&&(this._value.r=1),this._value.g>=1-e._Epsilon&&(this._value.g=1),this._value.b>=1-e._Epsilon&&(this._value.b=1),this.onValueChangedObservable.notifyObservers(this._value))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width.toString(this._host)},set:function(t){this._width.toString(this._host)!==t&&this._width.fromString(t)&&(0===this._width.getValue(this._host)&&(t="1px",this._width.fromString(t)),this._height.fromString(t),this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height.toString(this._host)},set:function(t){this._height.toString(this._host)!==t&&this._height.fromString(t)&&(0===this._height.getValue(this._host)&&(t="1px",this._height.fromString(t)),this._width.fromString(t),this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.width},set:function(t){this.width=t},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"ColorPicker"},e.prototype._preMeasure=function(t){t.widthl||f150?.04:-.16*(t-50)/100+.2,m=(p-_)/(t-_),a[b+3]=m1-v?255*(1-(m-(1-v))/v):255}}return r.putImageData(n,0,0),o},e.prototype._draw=function(t){t.save(),this._applyStates(t);var e=.5*Math.min(this._currentMeasure.width,this._currentMeasure.height),i=.2*e,o=this._currentMeasure.left,r=this._currentMeasure.top;this._colorWheelCanvas&&this._colorWheelCanvas.width==2*e||(this._colorWheelCanvas=this._createColorWheelCanvas(e,i)),this._updateSquareProps(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.fillRect(this._squareLeft,this._squareTop,this._squareSize,this._squareSize)),t.drawImage(this._colorWheelCanvas,o,r),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),this._drawGradientSquare(this._h,this._squareLeft,this._squareTop,this._squareSize,this._squareSize,t);var n=this._squareLeft+this._squareSize*this._s,a=this._squareTop+this._squareSize*(1-this._v);this._drawCircle(n,a,.04*e,t);var s=e-.5*i;n=o+e+Math.cos((this._h-180)*Math.PI/180)*s,a=r+e+Math.sin((this._h-180)*Math.PI/180)*s,this._drawCircle(n,a,.35*i,t),t.restore()},e.prototype._updateValueFromPointer=function(t,i){if(this._pointerStartedOnWheel){var o=.5*Math.min(this._currentMeasure.width,this._currentMeasure.height),r=o+this._currentMeasure.left,n=o+this._currentMeasure.top;this._h=180*Math.atan2(i-n,t-r)/Math.PI+180}else this._pointerStartedOnSquare&&(this._updateSquareProps(),this._s=(t-this._squareLeft)/this._squareSize,this._v=1-(i-this._squareTop)/this._squareSize,this._s=Math.min(this._s,1),this._s=Math.max(this._s,e._Epsilon),this._v=Math.min(this._v,1),this._v=Math.max(this._v,e._Epsilon));d.Color3.HSVtoRGBToRef(this._h,this._s,this._v,this._tmpColor),this.value=this._tmpColor},e.prototype._isPointOnSquare=function(t,e){this._updateSquareProps();var i=this._squareLeft,o=this._squareTop,r=this._squareSize;return t>=i&&t<=i+r&&e>=o&&e<=o+r},e.prototype._isPointOnWheel=function(t,e){var i=.5*Math.min(this._currentMeasure.width,this._currentMeasure.height),o=i-.2*i,r=t-(i+this._currentMeasure.left),n=e-(i+this._currentMeasure.top),a=r*r+n*n;return a<=i*i&&a>=o*o},e.prototype._onPointerDown=function(e,i,o,r,n){if(!t.prototype._onPointerDown.call(this,e,i,o,r,n))return!1;if(this.isReadOnly)return!0;this._pointerIsDown=!0,this._pointerStartedOnSquare=!1,this._pointerStartedOnWheel=!1,this._invertTransformMatrix.transformCoordinates(i.x,i.y,this._transformedPosition);var a=this._transformedPosition.x,s=this._transformedPosition.y;return this._isPointOnSquare(a,s)?this._pointerStartedOnSquare=!0:this._isPointOnWheel(a,s)&&(this._pointerStartedOnWheel=!0),this._updateValueFromPointer(a,s),this._host._capturingControl[o]=this,this._lastPointerDownId=o,!0},e.prototype._onPointerMove=function(e,i,o,r){if(o==this._lastPointerDownId){if(!this.isReadOnly){this._invertTransformMatrix.transformCoordinates(i.x,i.y,this._transformedPosition);var n=this._transformedPosition.x,a=this._transformedPosition.y;this._pointerIsDown&&this._updateValueFromPointer(n,a)}t.prototype._onPointerMove.call(this,e,i,o,r)}},e.prototype._onPointerUp=function(e,i,o,r,n,a){this._pointerIsDown=!1,delete this._host._capturingControl[o],t.prototype._onPointerUp.call(this,e,i,o,r,n,a)},e.prototype._onCanvasBlur=function(){this._forcePointerUp(),t.prototype._onCanvasBlur.call(this)},e.ShowPickerDialogAsync=function(t,i){return new Promise((function(o){i.pickerWidth=i.pickerWidth||"640px",i.pickerHeight=i.pickerHeight||"400px",i.headerHeight=i.headerHeight||"35px",i.lastColor=i.lastColor||"#000000",i.swatchLimit=i.swatchLimit||20,i.numSwatchesPerLine=i.numSwatchesPerLine||10;var r,n,a,s,l,_,h,c=i.swatchLimit/i.numSwatchesPerLine,u=parseFloat(i.pickerWidth)/i.numSwatchesPerLine,f=Math.floor(.25*u),p=f*(i.numSwatchesPerLine+1),g=Math.floor((parseFloat(i.pickerWidth)-p)/i.numSwatchesPerLine),b=g*c+f*(c+1),m=(parseInt(i.pickerHeight)+b+Math.floor(.25*g)).toString()+"px",v="#c0c0c0",y="#535353",x="#414141",P="515151",B="#555555",C="#454545",O=d.Color3.FromHexString("#dddddd"),w=O.r+O.g+O.b,M="#aaaaaa",E="#ffffff",L=["R","G","B"],k="#454545",N="#f0f0f0",A=!1,z=new D;if(z.name="Dialog Container",z.width=i.pickerWidth,i.savedColors){z.height=m;var Q=parseInt(i.pickerHeight)/parseInt(m);z.addRowDefinition(Q,!1),z.addRowDefinition(1-Q,!1)}else z.height=i.pickerHeight,z.addRowDefinition(1,!1);if(t.addControl(z),i.savedColors){(s=new D).name="Swatch Drawer",s.verticalAlignment=I.VERTICAL_ALIGNMENT_TOP,s.background=y,s.width=i.pickerWidth;var V,W=i.savedColors.length/i.numSwatchesPerLine;V=0==W?0:W+1,s.height=(g*W+V*f).toString()+"px",s.top=Math.floor(.25*g).toString()+"px";for(var H=0;H<2*Math.ceil(i.savedColors.length/i.numSwatchesPerLine)+1;H++)H%2!=0?s.addRowDefinition(g,!0):s.addRowDefinition(f,!0);for(H=0;H<2*i.numSwatchesPerLine+1;H++)H%2!=0?s.addColumnDefinition(g,!0):s.addColumnDefinition(f,!0);z.addControl(s,1,0)}var G=new D;G.name="Picker Panel",G.height=i.pickerHeight;var U=parseInt(i.headerHeight)/parseInt(i.pickerHeight),j=[U,1-U];G.addRowDefinition(j[0],!1),G.addRowDefinition(j[1],!1),z.addControl(G,0,0);var Y=new T;Y.name="Dialogue Header Bar",Y.background="#cccccc",Y.thickness=0,G.addControl(Y,0,0);var X=R.CreateSimpleButton("closeButton","a");X.fontFamily="coreglyphs";var K=d.Color3.FromHexString(Y.background),Z=new d.Color3(1-K.r,1-K.g,1-K.b);X.color=Z.toHexString(),X.fontSize=Math.floor(.6*parseInt(i.headerHeight)),X.textBlock.textVerticalAlignment=I.VERTICAL_ALIGNMENT_CENTER,X.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_RIGHT,X.height=X.width=i.headerHeight,X.background=Y.background,X.thickness=0,X.pointerDownAnimation=function(){},X.pointerUpAnimation=function(){X.background=Y.background},X.pointerEnterAnimation=function(){X.color=Y.background,X.background="red"},X.pointerOutAnimation=function(){X.color=Z.toHexString(),X.background=Y.background},X.onPointerClickObservable.add((function(){Gt(dt.background)})),G.addControl(X,0,0);var q=new D;q.name="Dialogue Body",q.background=y;var J=[.4375,.5625];q.addRowDefinition(1,!1),q.addColumnDefinition(J[0],!1),q.addColumnDefinition(J[1],!1),G.addControl(q,1,0);var $=new D;$.name="Picker Grid",$.addRowDefinition(.85,!1),$.addRowDefinition(.15,!1),q.addControl($,0,0);var tt=new e;tt.name="GUI Color Picker",i.pickerHeighti.pickerHeight?ht:_t;var ct=new S;ct.text="new",ct.name="New Color Label",ct.color=v,ct.fontSize=lt,nt.addControl(ct,1,0);var ut=new T;ut.name="New Color Swatch",ut.background=i.lastColor,ut.thickness=0,st.addControl(ut,0,0);var dt=R.CreateSimpleButton("currentSwatch","");dt.background=i.lastColor,dt.thickness=0,dt.onPointerClickObservable.add((function(){kt(d.Color3.FromHexString(dt.background),dt.name),Qt(!1)})),dt.pointerDownAnimation=function(){},dt.pointerUpAnimation=function(){},dt.pointerEnterAnimation=function(){},dt.pointerOutAnimation=function(){},st.addControl(dt,1,0);var ft=new T;ft.name="Swatch Outline",ft.width=.67,ft.thickness=2,ft.color="#404040",ft.isHitTestVisible=!1,nt.addControl(ft,2,0);var pt=new S;pt.name="Current Color Label",pt.text="current",pt.color=v,pt.fontSize=lt,nt.addControl(pt,3,0);var gt=new D;gt.name="Button Grid",gt.height=.8;var bt=1/3;gt.addRowDefinition(bt,!1),gt.addRowDefinition(bt,!1),gt.addRowDefinition(bt,!1),ot.addControl(gt,0,1);var mt=Math.floor(parseInt(i.pickerWidth)*J[1]*rt[1]*.67).toString()+"px",vt=Math.floor(parseInt(i.pickerHeight)*j[1]*it[0]*(parseFloat(gt.height.toString())/100)*bt*.7).toString()+"px";r=parseFloat(mt)>parseFloat(vt)?Math.floor(.45*parseFloat(vt)):Math.floor(.11*parseFloat(mt));var yt=R.CreateSimpleButton("butOK","OK");yt.width=mt,yt.height=vt,yt.verticalAlignment=I.VERTICAL_ALIGNMENT_CENTER,yt.thickness=2,yt.color=v,yt.fontSize=r,yt.background=y,yt.onPointerEnterObservable.add((function(){yt.background=x})),yt.onPointerOutObservable.add((function(){yt.background=y})),yt.pointerDownAnimation=function(){yt.background=P},yt.pointerUpAnimation=function(){yt.background=x},yt.onPointerClickObservable.add((function(){Qt(!1),Gt(ut.background)})),gt.addControl(yt,0,0);var xt=R.CreateSimpleButton("butCancel","Cancel");xt.width=mt,xt.height=vt,xt.verticalAlignment=I.VERTICAL_ALIGNMENT_CENTER,xt.thickness=2,xt.color=v,xt.fontSize=r,xt.background=y,xt.onPointerEnterObservable.add((function(){xt.background=x})),xt.onPointerOutObservable.add((function(){xt.background=y})),xt.pointerDownAnimation=function(){xt.background=P},xt.pointerUpAnimation=function(){xt.background=x},xt.onPointerClickObservable.add((function(){Qt(!1),Gt(dt.background)})),gt.addControl(xt,1,0),i.savedColors&&((l=R.CreateSimpleButton("butSave","Save")).width=mt,l.height=vt,l.verticalAlignment=I.VERTICAL_ALIGNMENT_CENTER,l.thickness=2,l.fontSize=r,i.savedColors.length0&&Wt(!0),gt.addControl(l,2,0));var Pt=new D;Pt.name="Dialog Lower Right",Pt.addRowDefinition(.02,!1),Pt.addRowDefinition(.63,!1),Pt.addRowDefinition(.21,!1),Pt.addRowDefinition(.14,!1),et.addControl(Pt,1,0);var It=d.Color3.FromHexString(i.lastColor),Bt=new D;for(Bt.name="RGB Values",Bt.width=.82,Bt.verticalAlignment=I.VERTICAL_ALIGNMENT_CENTER,Bt.addRowDefinition(1/3,!1),Bt.addRowDefinition(1/3,!1),Bt.addRowDefinition(1/3,!1),Bt.addColumnDefinition(.1,!1),Bt.addColumnDefinition(.2,!1),Bt.addColumnDefinition(.7,!1),Pt.addControl(Bt,1,0),H=0;H255?i="255":isNaN(parseInt(i))&&(i="0")),h==t.name&&(_=i),""!=i){i=parseInt(i).toString(),t.text=i;var o=d.Color3.FromHexString(ut.background);h==t.name&&kt("r"==e?new d.Color3(parseInt(i)/255,o.g,o.b):"g"==e?new d.Color3(o.r,parseInt(i)/255,o.b):new d.Color3(o.r,o.g,parseInt(i)/255),t.name)}}function At(t,e){var i=t.text;if(/[^0-9.]/g.test(i))t.text=_;else{""!=i&&"."!=i&&0!=parseFloat(i)&&(parseFloat(i)<0?i="0.0":parseFloat(i)>1?i="1.0":isNaN(parseFloat(i))&&(i="0.0")),h==t.name&&(_=i),""!=i&&"."!=i&&0!=parseFloat(i)?(i=parseFloat(i).toString(),t.text=i):i="0.0";var o=d.Color3.FromHexString(ut.background);h==t.name&&kt("r"==e?new d.Color3(parseFloat(i),o.g,o.b):"g"==e?new d.Color3(o.r,parseFloat(i),o.b):new d.Color3(o.r,o.g,parseFloat(i)),t.name)}}function zt(){if(i.savedColors&&i.savedColors[a]){var t;t=A?"b":"";var e=R.CreateSimpleButton("Swatch_"+a,t);e.fontFamily="coreglyphs";var o=d.Color3.FromHexString(i.savedColors[a]),r=o.r+o.g+o.b;e.color=r>w?M:E,e.fontSize=Math.floor(.7*g),e.textBlock.verticalAlignment=I.VERTICAL_ALIGNMENT_CENTER,e.height=e.width=g.toString()+"px",e.background=i.savedColors[a],e.thickness=2;var n=a;return e.pointerDownAnimation=function(){e.thickness=4},e.pointerUpAnimation=function(){e.thickness=3},e.pointerEnterAnimation=function(){e.thickness=3},e.pointerOutAnimation=function(){e.thickness=2},e.onPointerClickObservable.add((function(){var t;A?(t=n,i.savedColors&&i.savedColors.splice(t,1),i.savedColors&&0==i.savedColors.length&&(Wt(!1),A=!1),Vt("",l)):i.savedColors&&kt(d.Color3.FromHexString(i.savedColors[n]),e.name)})),e}return null}function Qt(t){if(void 0!==t&&(A=t),A){for(var e=0;eh*i.numSwatchesPerLine?i.numSwatchesPerLine:i.savedColors.length-(h-1)*i.numSwatchesPerLine;for(var u=Math.min(Math.max(c,0),i.numSwatchesPerLine),d=0,p=1;di.numSwatchesPerLine)){var b=zt();null!=b&&(s.addControl(b,_,p),p+=2,a++)}}i.savedColors.length>=i.swatchLimit?Ht(e,!0):Ht(e,!1)}}function Wt(t){t?((n=R.CreateSimpleButton("butEdit","Edit")).width=mt,n.height=vt,n.left=Math.floor(.1*parseInt(mt)).toString()+"px",n.top=(-1*parseFloat(n.left)).toString()+"px",n.verticalAlignment=I.VERTICAL_ALIGNMENT_BOTTOM,n.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,n.thickness=2,n.color=v,n.fontSize=r,n.background=y,n.onPointerEnterObservable.add((function(){n.background=x})),n.onPointerOutObservable.add((function(){n.background=y})),n.pointerDownAnimation=function(){n.background=P},n.pointerUpAnimation=function(){n.background=x},n.onPointerClickObservable.add((function(){A=!A,Qt()})),$.addControl(n,1,0)):$.removeControl(n)}function Ht(t,e){e?(t.color=B,t.background=C):(t.color=v,t.background=y)}function Gt(e){i.savedColors&&i.savedColors.length>0?o({savedColors:i.savedColors,pickedColor:e}):o({pickedColor:e}),t.removeControl(z)}Dt.text=Lt[1],Dt.color=N,Dt.background=k,Dt.onFocusObservable.add((function(){h=Dt.name,_=Dt.text,Qt(!1)})),Dt.onBlurObservable.add((function(){if(3==Dt.text.length){var t=Dt.text.split("");Dt.text=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]}""==Dt.text&&(Dt.text="000000",kt(d.Color3.FromHexString(Dt.text),"b")),h==Dt.name&&(h="")})),Dt.onTextChangedObservable.add((function(){var t=Dt.text,e=/[^0-9A-F]/i.test(t);if((Dt.text.length>6||e)&&h==Dt.name)Dt.text=_;else{if(Dt.text.length<6)for(var i=6-Dt.text.length,o=0;o0&&Vt("",l)}))},e._Epsilon=1e-6,h([(0,d.serialize)()],e.prototype,"value",null),h([(0,d.serialize)()],e.prototype,"width",null),h([(0,d.serialize)()],e.prototype,"height",null),h([(0,d.serialize)()],e.prototype,"size",null),e}(I);(0,d.RegisterClass)("BABYLON.GUI.ColorPicker",L);var k=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._thickness=1,i._arc=1,i}return l(e,t),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(t){this._thickness!==t&&(this._thickness=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arc",{get:function(){return this._arc},set:function(t){this._arc!==t&&(this._arc=t,this._markAsDirty())},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"Ellipse"},e.prototype._localDraw=function(t){t.save(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),I.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,this._currentMeasure.width/2-this._thickness/2,this._currentMeasure.height/2-this._thickness/2,this._arc,t),(this._backgroundGradient||this._background)&&(t.fillStyle=this._getBackgroundColor(t),t.fill()),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),this._thickness&&(this.color&&(t.strokeStyle=this.color),t.lineWidth=this._thickness,t.stroke()),t.restore()},e.prototype._additionalProcessing=function(e,i){t.prototype._additionalProcessing.call(this,e,i),this._measureForChildren.width-=2*this._thickness,this._measureForChildren.height-=2*this._thickness,this._measureForChildren.left+=this._thickness,this._measureForChildren.top+=this._thickness},e.prototype._clipForChildren=function(t){I.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,this._currentMeasure.width/2,this._currentMeasure.height/2,this._arc,t),t.clip()},e.prototype._renderHighlightSpecific=function(t){I.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,this._currentMeasure.width/2-this._highlightLineWidth/2,this._currentMeasure.height/2-this._highlightLineWidth/2,this._arc,t),t.stroke()},h([(0,d.serialize)()],e.prototype,"thickness",null),h([(0,d.serialize)()],e.prototype,"arc",null),e}(B);(0,d.RegisterClass)("BABYLON.GUI.Ellipse",k);var N=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._unfocusedColor=i.color,i}return l(e,t),e.prototype._onPointerDown=function(e,i,o,r,n){return this.isReadOnly||this.focus(),t.prototype._onPointerDown.call(this,e,i,o,r,n)},e}(R);(0,d.RegisterClass)("BABYLON.GUI.FocusableButton",N);var A=function(t){function e(e,i){void 0===i&&(i="");var o=t.call(this,e)||this;return o.name=e,o._textHorizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,o._textVerticalAlignment=I.VERTICAL_ALIGNMENT_TOP,o._prevText=o.text,o._lineSpacing=new f(0),o._maxHeight=new f(1,f.UNITMODE_PERCENTAGE,!1),o.onLinesReadyObservable=new d.Observable,o.text=i,o.isPointerBlocker=!0,o.onLinesReadyObservable.add((function(){return o._updateCursorPosition()})),o._highlightCursorInfo={initialStartIndex:-1,initialRelativeStartIndex:-1,initialLineIndex:-1},o._cursorInfo={globalStartIndex:0,globalEndIndex:0,relativeEndIndex:0,relativeStartIndex:0,currentLineIndex:0},o}return l(e,t),Object.defineProperty(e.prototype,"autoStretchHeight",{get:function(){return this._autoStretchHeight},set:function(t){this._autoStretchHeight!==t&&(this._autoStretchHeight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{set:function(t){this.fixedRatioMasterIsWidth=!1,this._height.toString(this._host)!==t&&(this._height.fromString(t)&&this._markAsDirty(),this._autoStretchHeight=!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxHeight",{get:function(){return this._maxHeight.toString(this._host)},set:function(t){this._maxHeight.toString(this._host)!==t&&this._maxHeight.fromString(t)&&this._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxHeightInPixels",{get:function(){return this._maxHeight.getValueInPixel(this._host,this._cachedParentMeasure.height)},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"InputTextArea"},e.prototype.processKeyboard=function(t){this.isReadOnly||(this.alternativeProcessKey(t.code,t.key,t),this.onKeyboardEventProcessedObservable.notifyObservers(t))},e.prototype.alternativeProcessKey=function(t,e,i){if(!i||!i.ctrlKey&&!i.metaKey||"c"!==e&&"v"!==e&&"x"!==e){switch(t){case"Period":i&&i.shiftKey&&i.preventDefault();break;case"Backspace":!this._isTextHighlightOn&&this._cursorInfo.globalStartIndex>0&&(this._cursorInfo.globalEndIndex=this._cursorInfo.globalStartIndex,this._cursorInfo.globalStartIndex--),this._prevText=this._textWrapper.text,this._textWrapper.removePart(this._cursorInfo.globalStartIndex,this._cursorInfo.globalEndIndex),this._cursorInfo.globalEndIndex=this._cursorInfo.globalStartIndex,i&&i.preventDefault(),this._blinkIsEven=!1,this._isTextHighlightOn=!1,this._textHasChanged();break;case"Delete":!this._isTextHighlightOn&&this._cursorInfo.globalEndIndexthis._highlightCursorInfo.initialStartIndex?this._cursorInfo.globalEndIndex--:this._cursorInfo.globalStartIndex--:(this._highlightCursorInfo.initialLineIndex=this._cursorInfo.currentLineIndex,this._highlightCursorInfo.initialStartIndex=this._cursorInfo.globalStartIndex,this._highlightCursorInfo.initialRelativeStartIndex=this._cursorInfo.relativeStartIndex,this._cursorInfo.globalEndIndex=this._cursorInfo.globalStartIndex,this._cursorInfo.globalStartIndex--,this._isTextHighlightOn=!0),this._blinkIsEven=!0,void i.preventDefault()):(this._isTextHighlightOn?this._cursorInfo.globalEndIndex=this._cursorInfo.globalStartIndex:i&&(i.ctrlKey||i.metaKey)?(this._cursorInfo.globalStartIndex-=this._cursorInfo.relativeStartIndex,i.preventDefault()):this._cursorInfo.globalStartIndex>0&&this._cursorInfo.globalStartIndex--,this._blinkIsEven=!1,void(this._isTextHighlightOn=!1));case"ArrowRight":if(this._markAsDirty(),i&&i.shiftKey){if(i.ctrlKey||i.metaKey){var o=this._lines[this._cursorInfo.currentLineIndex].text.length-this._cursorInfo.relativeEndIndex-1;this._cursorInfo.globalEndIndex+=o,this._cursorInfo.globalStartIndex=this._highlightCursorInfo.initialStartIndex}return this._isTextHighlightOn?this._cursorInfo.globalStartIndexc&&u>0&&a--,this._isTextHighlightOn?this._cursorInfo.currentLineIndex<=this._highlightCursorInfo.initialLineIndex?(this._cursorInfo.globalStartIndex=a,this._cursorInfo.globalEndIndex=this._highlightCursorInfo.initialStartIndex,this._cursorInfo.relativeEndIndex=this._highlightCursorInfo.initialRelativeStartIndex):this._cursorInfo.globalEndIndex=a:this._cursorInfo.globalStartIndex=a}return void this._markAsDirty();case"ArrowDown":if(this._blinkIsEven=!1,i&&(i.shiftKey?(this._isTextHighlightOn||(this._highlightCursorInfo.initialLineIndex=this._cursorInfo.currentLineIndex,this._highlightCursorInfo.initialStartIndex=this._cursorInfo.globalStartIndex,this._highlightCursorInfo.initialRelativeStartIndex=this._cursorInfo.relativeStartIndex),this._isTextHighlightOn=!0,this._blinkIsEven=!0):this._isTextHighlightOn=!1,i.preventDefault()),this._cursorInfo.currentLineIndex===this._lines.length-1)this._cursorInfo.globalStartIndex=this.text.length;else{r=this._lines[this._cursorInfo.currentLineIndex];var d=this._lines[this._cursorInfo.currentLineIndex+1];a=0,s=0,!this._isTextHighlightOn||this._cursorInfo.currentLineIndexc&&p>0&&a--,this._isTextHighlightOn?this._cursorInfo.currentLineIndexthis._cursorInfo.globalEndIndex&&(this._cursorInfo.globalEndIndex+=this._cursorInfo.globalStartIndex,this._cursorInfo.globalStartIndex=this._cursorInfo.globalEndIndex-this._cursorInfo.globalStartIndex,this._cursorInfo.globalEndIndex-=this._cursorInfo.globalStartIndex)):(this._cursorInfo.globalEndIndex=a,this._cursorInfo.globalStartIndex=this._highlightCursorInfo.initialStartIndex):this._cursorInfo.globalStartIndex=a}return void this._markAsDirty()}if("a"===e&&i&&(i.ctrlKey||i.metaKey))return this._selectAllText(),void i.preventDefault();1===(null==e?void 0:e.length)&&(null==i||i.preventDefault(),this._currentKey=e,this.onBeforeKeyAddObservable.notifyObservers(this),e=this._currentKey,this._addKey&&(this._isTextHighlightOn=!1,this._blinkIsEven=!1,this._prevText=this._textWrapper.text,this._textWrapper.removePart(this._cursorInfo.globalStartIndex,this._cursorInfo.globalEndIndex,e),this._cursorInfo.globalStartIndex+=e.length,this._cursorInfo.globalEndIndex=this._cursorInfo.globalStartIndex,this._textHasChanged()))}},e.prototype._parseLineWordWrap=function(t,e,i){void 0===t&&(t="");for(var o=[],r=t.split(" "),n=0,a=function(a){var s=a>0?t+" "+r[a]:r[0],l=i.measureText(s).width;if(l>e){a>0&&(n=i.measureText(t).width,o.push({text:t,width:n,lineEnding:" "})),t=r[a];var _="";t.split("").map((function(t){i.measureText(_+t).width>e&&(o.push({text:_,width:i.measureText(_).width,lineEnding:""}),_=""),_+=t})),t=_,n=i.measureText(t).width}else n=l,t=s},s=0;se.measureText(t).width?i:t}),""),a=e.measureText(n).width;this.width=Math.min(this._maxWidth.getValueInPixel(this._host,t.width),a+r)+"px",this.autoStretchWidth=!0}if(this._availableWidth=this._width.getValueInPixel(this._host,t.width)-r,this._lines=this._breakLines(this._availableWidth,e),this._contextForBreakLines=e,this._autoStretchHeight){var s=this._lines.length*this._fontOffset.height+2*this._margin.getValueInPixel(this._host,t.height);this.height=Math.min(this._maxHeight.getValueInPixel(this._host,t.height),s)+"px",this._autoStretchHeight=!0}if(this._availableHeight=this._height.getValueInPixel(this._host,t.height)-r,this._isFocused){this._cursorInfo.currentLineIndex=0;for(var l=this._lines[this._cursorInfo.currentLineIndex].text.length+this._lines[this._cursorInfo.currentLineIndex].lineEnding.length,_=0;_+l<=this._cursorInfo.globalStartIndex;)_+=l,this._cursorInfo.currentLineIndexthis._availableWidth){var t=this._clipTextLeft-this._lines[this._cursorInfo.currentLineIndex].width+this._availableWidth;this._scrollLeft||(this._scrollLeft=t)}else this._scrollLeft=this._clipTextLeft;if(this._isFocused){var e=(this._cursorInfo.currentLineIndex+1)*this._fontOffset.height,i=this._clipTextTop-e;this._scrollTop||(this._scrollTop=i)}else this._scrollTop=this._clipTextTop},e.prototype._additionalProcessing=function(){this.highlightedText="",this.onLinesReadyObservable.notifyObservers(this)},e.prototype._drawText=function(t,e,i,o){var r=this._currentMeasure.width,n=this._scrollLeft;switch(this._textHorizontalAlignment){case I.HORIZONTAL_ALIGNMENT_LEFT:n+=0;break;case I.HORIZONTAL_ALIGNMENT_RIGHT:n+=r-e;break;case I.HORIZONTAL_ALIGNMENT_CENTER:n+=(r-e)/2}(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(o.shadowColor=this.shadowColor,o.shadowBlur=this.shadowBlur,o.shadowOffsetX=this.shadowOffsetX,o.shadowOffsetY=this.shadowOffsetY),this.outlineWidth&&o.strokeText(t,this._currentMeasure.left+n,i),o.fillText(t,n,i)},e.prototype._onCopyText=function(t){this._isTextHighlightOn=!1;try{t.clipboardData&&t.clipboardData.setData("text/plain",this._highlightedText)}catch(t){}this._host.clipboardData=this._highlightedText},e.prototype._onCutText=function(t){if(this._highlightedText){try{t.clipboardData&&t.clipboardData.setData("text/plain",this._highlightedText)}catch(t){}this._host.clipboardData=this._highlightedText,this._prevText=this._textWrapper.text,this._textWrapper.removePart(this._cursorInfo.globalStartIndex,this._cursorInfo.globalEndIndex),this._textHasChanged()}},e.prototype._onPasteText=function(e){var i;i=e.clipboardData&&-1!==e.clipboardData.types.indexOf("text/plain")?e.clipboardData.getData("text/plain"):this._host.clipboardData,this._isTextHighlightOn=!1,this._prevText=this._textWrapper.text,this._textWrapper.removePart(this._cursorInfo.globalStartIndex,this._cursorInfo.globalEndIndex,i);var o=i.length-(this._cursorInfo.globalEndIndex-this._cursorInfo.globalStartIndex);this._cursorInfo.globalStartIndex+=o,this._cursorInfo.globalEndIndex=this._cursorInfo.globalStartIndex,this._clickedCoordinateX=null,this._clickedCoordinateY=null,t.prototype._textHasChanged.call(this)},e.prototype._draw=function(t){var e,i;this._computeScroll(),this._scrollLeft=null!==(e=this._scrollLeft)&&void 0!==e?e:0,this._scrollTop=null!==(i=this._scrollTop)&&void 0!==i?i:0,t.save(),this._applyStates(t),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),this._isFocused?this._focusedBackground&&(t.fillStyle=this._isEnabled?this._focusedBackground:this._disabledColor,t.fillRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)):this._background&&(t.fillStyle=this._isEnabled?this._background:this._disabledColor,t.fillRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),this.color&&(t.fillStyle=this.color);var o=this._currentMeasure.height,r=this._currentMeasure.width,n=0;switch(this._textVerticalAlignment){case I.VERTICAL_ALIGNMENT_TOP:n=this._fontOffset.ascent;break;case I.VERTICAL_ALIGNMENT_BOTTOM:n=o-this._fontOffset.height*(this._lines.length-1)-this._fontOffset.descent;break;case I.VERTICAL_ALIGNMENT_CENTER:n=this._fontOffset.ascent+(o-this._fontOffset.height*this._lines.length)/2}t.save(),t.beginPath(),t.fillStyle=this.fontStyle,!this._textWrapper.text&&this.placeholderText&&(t.fillStyle=this._placeholderColor),t.rect(this._clipTextLeft,this._clipTextTop,this._availableWidth+2,this._availableHeight+2),t.clip(),n+=this._scrollTop;for(var a=0;athis._clipTextLeft+this._availableWidth&&(this._scrollLeft+=this._clipTextLeft+this._availableWidth-l,l=this._clipTextLeft+this._availableWidth,this._markAsDirty());var _=this._scrollTop+this._cursorInfo.currentLineIndex*this._fontOffset.height;_this._clipTextTop+this._availableHeight&&this._availableHeight>this._fontOffset.height&&(this._scrollTop+=this._clipTextTop+this._availableHeight-_-this._fontOffset.height,_=this._clipTextTop+this._availableHeight-this._fontOffset.height,this._markAsDirty()),this._isTextHighlightOn||t.fillRect(l,_,2,this._fontOffset.height)}if(this._resetBlinking(),this._isTextHighlightOn){clearTimeout(this._blinkTimeout),this._highlightedText=this.text.substring(this._cursorInfo.globalStartIndex,this._cursorInfo.globalEndIndex),t.globalAlpha=this._highligherOpacity,t.fillStyle=this._textHighlightColor;var h=Math.min(this._cursorInfo.currentLineIndex,this._highlightCursorInfo.initialLineIndex),c=Math.max(this._cursorInfo.currentLineIndex,this._highlightCursorInfo.initialLineIndex),u=this._scrollTop+h*this._fontOffset.height;for(a=h;a<=c;a++){s=this._lines[a];var d=this._scrollLeft;switch(this._textHorizontalAlignment){case I.HORIZONTAL_ALIGNMENT_LEFT:d+=0;break;case I.HORIZONTAL_ALIGNMENT_RIGHT:d+=r-s.width;break;case I.HORIZONTAL_ALIGNMENT_CENTER:d+=(r-s.width)/2}var f=a===h?this._cursorInfo.relativeStartIndex:0,p=a===c?this._cursorInfo.relativeEndIndex:s.text.length,g=t.measureText(s.text.substr(0,f)).width,b=s.text.substring(f,p),m=t.measureText(b).width;t.fillRect(d+g,u,m,this._fontOffset.height),u+=this._fontOffset.height}this._cursorInfo.globalEndIndex===this._cursorInfo.globalStartIndex&&this._resetBlinking()}}t.restore(),this._thickness&&(this._isFocused?this.focusedColor&&(t.strokeStyle=this.focusedColor):this.color&&(t.strokeStyle=this.color),t.lineWidth=this._thickness,t.strokeRect(this._currentMeasure.left+this._thickness/2,this._currentMeasure.top+this._thickness/2,this._currentMeasure.width-this._thickness,this._currentMeasure.height-this._thickness))},e.prototype._resetBlinking=function(){var t=this;clearTimeout(this._blinkTimeout),this._blinkTimeout=setTimeout((function(){t._blinkIsEven=!t._blinkIsEven,t._markAsDirty()}),500)},e.prototype._onPointerDown=function(e,i,o,r,n){return!(!t.prototype._onPointerDown.call(this,e,i,o,r,n)||!this.isReadOnly&&(this._clickedCoordinateX=i.x,this._clickedCoordinateY=i.y,this._isTextHighlightOn=!1,this._highlightedText="",this._isPointerDown=!0,this._host._capturingControl[o]=this,this._host.focusedControl===this?(clearTimeout(this._blinkTimeout),this._markAsDirty(),0):!this._isEnabled||(this._host.focusedControl=this,0)))},e.prototype._onPointerMove=function(e,i,o,r){0===r.event.movementX&&0===r.event.movementY||(this._host.focusedControl===this&&this._isPointerDown&&!this.isReadOnly&&(this._clickedCoordinateX=i.x,this._clickedCoordinateY=i.y,this._isTextHighlightOn||(this._highlightCursorInfo.initialLineIndex=this._cursorInfo.currentLineIndex,this._highlightCursorInfo.initialStartIndex=this._cursorInfo.globalStartIndex,this._highlightCursorInfo.initialRelativeStartIndex=this._cursorInfo.relativeStartIndex,this._isTextHighlightOn=!0),this._markAsDirty()),t.prototype._onPointerMove.call(this,e,i,o,r))},e.prototype._updateCursorPosition=function(){var t;if(this._isFocused)if(!this._textWrapper.text&&this.placeholderText)this._cursorInfo.currentLineIndex=0,this._cursorInfo.globalStartIndex=0,this._cursorInfo.globalEndIndex=0,this._cursorInfo.relativeStartIndex=0,this._cursorInfo.relativeEndIndex=0;else if(this._clickedCoordinateX&&this._clickedCoordinateY){this._isTextHighlightOn||(this._cursorInfo={globalStartIndex:0,globalEndIndex:0,relativeStartIndex:0,relativeEndIndex:0,currentLineIndex:0});var e=0,i=0,o=this._clickedCoordinateY-this._scrollTop,r=Math.floor(o/this._fontOffset.height);this._cursorInfo.currentLineIndex=Math.min(Math.max(r,0),this._lines.length-1);for(var n=0,a=this._clickedCoordinateX-(null!==(t=this._scrollLeft)&&void 0!==t?t:0),s=0,l=0;li;)i++,s=Math.abs(a-n),n=this._contextForBreakLines.measureText(this._lines[this._cursorInfo.currentLineIndex].text.substr(0,i)).width;Math.abs(a-n)>s&&i>0&&i--,e+=i,this._isTextHighlightOn?e=this._highlightCursorInfo.initialStartIndex){for(;c+h<=this._cursorInfo.globalEndIndex;)c+=h,this._cursorInfo.currentLineIndex0&&this._textWrapper.isWord(this._cursorInfo.globalStartIndex-1)?--this._cursorInfo.globalStartIndex:0,i=this._cursorInfo.globalEndIndex1?this.notRenderable=!0:this.notRenderable=!1}else d.Tools.Error("Cannot move a control to a vector3 if the control is not at root level")},e.prototype._moveToProjectedPosition=function(t,e){void 0===e&&(e=!1);var i=t.x+this._linkOffsetX.getValue(this._host)+"px",o=t.y+this._linkOffsetY.getValue(this._host)+"px";e?(this.x2=i,this.y2=o,this._x2.ignoreAdaptiveScaling=!0,this._y2.ignoreAdaptiveScaling=!0):(this.x1=i,this.y1=o,this._x1.ignoreAdaptiveScaling=!0,this._y1.ignoreAdaptiveScaling=!0)},h([(0,d.serialize)()],e.prototype,"dash",null),h([(0,d.serialize)()],e.prototype,"x1",null),h([(0,d.serialize)()],e.prototype,"y1",null),h([(0,d.serialize)()],e.prototype,"x2",null),h([(0,d.serialize)()],e.prototype,"y2",null),h([(0,d.serialize)()],e.prototype,"lineWidth",null),e}(I);(0,d.RegisterClass)("BABYLON.GUI.Line",Q);var V=function(){function t(t){this._multiLine=t,this._x=new f(0),this._y=new f(0),this._point=new d.Vector3(0,0,0)}return Object.defineProperty(t.prototype,"x",{get:function(){return this._x.toString(this._multiLine._host)},set:function(t){this._x.toString(this._multiLine._host)!==t&&this._x.fromString(t)&&this._multiLine._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y.toString(this._multiLine._host)},set:function(t){this._y.toString(this._multiLine._host)!==t&&this._y.fromString(t)&&this._multiLine._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this._control},set:function(t){this._control!==t&&(this._control&&this._controlObserver&&(this._control.onDirtyObservable.remove(this._controlObserver),this._controlObserver=null),this._control=t,this._control&&(this._controlObserver=this._control.onDirtyObservable.add(this._multiLine.onPointUpdate)),this._multiLine._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mesh",{get:function(){return this._mesh},set:function(t){this._mesh!==t&&(this._mesh&&this._meshObserver&&this._mesh.getScene().onAfterCameraRenderObservable.remove(this._meshObserver),this._mesh=t,this._mesh&&(this._meshObserver=this._mesh.getScene().onAfterCameraRenderObservable.add(this._multiLine.onPointUpdate)),this._multiLine._markAsDirty())},enumerable:!1,configurable:!0}),t.prototype.resetLinks=function(){this.control=null,this.mesh=null},t.prototype.translate=function(){return this._point=this._translatePoint(),this._point},t.prototype._translatePoint=function(){if(null!=this._mesh)return this._multiLine._host.getProjectedPositionWithZ(this._mesh.getBoundingInfo().boundingSphere.center,this._mesh.getWorldMatrix());if(null!=this._control)return new d.Vector3(this._control.centerX,this._control.centerY,1-d.Epsilon);var t=this._multiLine._host,e=this._x.getValueInPixel(t,Number(t._canvas.width)),i=this._y.getValueInPixel(t,Number(t._canvas.height));return new d.Vector3(e,i,1-d.Epsilon)},t.prototype.dispose=function(){this.resetLinks()},t}(),W=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._lineWidth=1,i.onPointUpdate=function(){i._markAsDirty()},i._automaticSize=!0,i.isHitTestVisible=!1,i._horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,i._verticalAlignment=I.VERTICAL_ALIGNMENT_TOP,i._dash=[],i._points=[],i}return l(e,t),Object.defineProperty(e.prototype,"dash",{get:function(){return this._dash},set:function(t){this._dash!==t&&(this._dash=t,this._markAsDirty())},enumerable:!1,configurable:!0}),e.prototype.getAt=function(t){return this._points[t]||(this._points[t]=new V(this)),this._points[t]},e.prototype.add=function(){for(var t=this,e=[],i=0;i0;)this.remove(this._points.length-1)},e.prototype.resetLinks=function(){this._points.forEach((function(t){null!=t&&t.resetLinks()}))},Object.defineProperty(e.prototype,"lineWidth",{get:function(){return this._lineWidth},set:function(t){this._lineWidth!==t&&(this._lineWidth=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horizontalAlignment",{set:function(t){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalAlignment",{set:function(t){},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"MultiLine"},e.prototype._draw=function(t){t.save(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),this._applyStates(t),t.strokeStyle=this.color,t.lineWidth=this._lineWidth,t.setLineDash(this._dash),t.beginPath();var e,i=!0;this._points.forEach((function(o){o&&(i?(t.moveTo(o._point.x,o._point.y),i=!1):o._point.z<1&&e.z<1?t.lineTo(o._point.x,o._point.y):t.moveTo(o._point.x,o._point.y),e=o._point)})),t.stroke(),t.restore()},e.prototype._additionalProcessing=function(){var t=this;this._minX=null,this._minY=null,this._maxX=null,this._maxY=null,this._points.forEach((function(e){e&&(e.translate(),(null==t._minX||e._point.xt._maxX)&&(t._maxX=e._point.x),(null==t._maxY||e._point.y>t._maxY)&&(t._maxY=e._point.y))})),null==this._minX&&(this._minX=0),null==this._minY&&(this._minY=0),null==this._maxX&&(this._maxX=0),null==this._maxY&&(this._maxY=0)},e.prototype._measure=function(){null!=this._minX&&null!=this._maxX&&null!=this._minY&&null!=this._maxY&&(this._currentMeasure.width=Math.abs(this._maxX-this._minX)+this._lineWidth,this._currentMeasure.height=Math.abs(this._maxY-this._minY)+this._lineWidth)},e.prototype._computeAlignment=function(){null!=this._minX&&null!=this._minY&&(this._currentMeasure.left=this._minX-this._lineWidth/2,this._currentMeasure.top=this._minY-this._lineWidth/2)},e.prototype.dispose=function(){this.reset(),t.prototype.dispose.call(this)},h([(0,d.serialize)()],e.prototype,"dash",null),e}(I);(0,d.RegisterClass)("BABYLON.GUI.MultiLine",W);var H=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._isChecked=!1,i._background="black",i._checkSizeRatio=.8,i._thickness=1,i.group="",i.onIsCheckedChangedObservable=new d.Observable,i.isPointerBlocker=!0,i}return l(e,t),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(t){this._thickness!==t&&(this._thickness=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"checkSizeRatio",{get:function(){return this._checkSizeRatio},set:function(t){t=Math.max(Math.min(1,t),0),this._checkSizeRatio!==t&&(this._checkSizeRatio=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"background",{get:function(){return this._background},set:function(t){this._background!==t&&(this._background=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isChecked",{get:function(){return this._isChecked},set:function(t){var e=this;this._isChecked!==t&&(this._isChecked=t,this._markAsDirty(),this.onIsCheckedChangedObservable.notifyObservers(t),this._isChecked&&this._host&&this._host.executeOnAllControls((function(t){if(t!==e&&void 0!==t.group){var i=t;i.group===e.group&&(i.isChecked=!1)}})))},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"RadioButton"},e.prototype._draw=function(t){t.save(),this._applyStates(t);var e=this._currentMeasure.width-this._thickness,i=this._currentMeasure.height-this._thickness;if((this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),I.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,this._currentMeasure.width/2-this._thickness/2,this._currentMeasure.height/2-this._thickness/2,1,t),t.fillStyle=this._isEnabled?this._background:this._disabledColor,t.fill(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),t.strokeStyle=this.color,t.lineWidth=this._thickness,t.stroke(),this._isChecked){t.fillStyle=this._isEnabled?this.color:this._disabledColor;var o=e*this._checkSizeRatio,r=i*this._checkSizeRatio;I.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,o/2-this._thickness/2,r/2-this._thickness/2,1,t),t.fill()}t.restore()},e.prototype._onPointerDown=function(e,i,o,r,n){return!!t.prototype._onPointerDown.call(this,e,i,o,r,n)&&(this.isReadOnly||this.isChecked||(this.isChecked=!0),!0)},e.AddRadioButtonWithHeader=function(t,i,o,r){var n=new w;n.isVertical=!1,n.height="30px";var a=new e;a.width="20px",a.height="20px",a.isChecked=o,a.color="green",a.group=i,a.onIsCheckedChangedObservable.add((function(t){return r(a,t)})),n.addControl(a);var s=new S;return s.text=t,s.width="180px",s.paddingLeft="5px",s.textHorizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,s.color="white",n.addControl(s),n},h([(0,d.serialize)()],e.prototype,"thickness",null),h([(0,d.serialize)()],e.prototype,"group",void 0),h([(0,d.serialize)()],e.prototype,"checkSizeRatio",null),h([(0,d.serialize)()],e.prototype,"background",null),h([(0,d.serialize)()],e.prototype,"isChecked",null),e}(I);(0,d.RegisterClass)("BABYLON.GUI.RadioButton",H);var G=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._thumbWidth=new f(20,f.UNITMODE_PIXEL,!1),i._minimum=0,i._maximum=100,i._value=50,i._isVertical=!1,i._barOffset=new f(5,f.UNITMODE_PIXEL,!1),i._isThumbClamped=!1,i._displayThumb=!0,i._step=0,i._lastPointerDownId=-1,i._effectiveBarOffset=0,i.onValueChangedObservable=new d.Observable,i._pointerIsDown=!1,i.isPointerBlocker=!0,i}return l(e,t),Object.defineProperty(e.prototype,"displayThumb",{get:function(){return this._displayThumb},set:function(t){this._displayThumb!==t&&(this._displayThumb=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this._step},set:function(t){this._step!==t&&(this._step=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barOffset",{get:function(){return this._barOffset.toString(this._host)},set:function(t){this._barOffset.toString(this._host)!==t&&this._barOffset.fromString(t)&&this._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barOffsetInPixels",{get:function(){return this._barOffset.getValueInPixel(this._host,this._cachedParentMeasure.width)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbWidth",{get:function(){return this._thumbWidth.toString(this._host)},set:function(t){this._thumbWidth.toString(this._host)!==t&&this._thumbWidth.fromString(t)&&this._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbWidthInPixels",{get:function(){return this._thumbWidth.getValueInPixel(this._host,this._cachedParentMeasure.width)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minimum",{get:function(){return this._minimum},set:function(t){this._minimum!==t&&(this._minimum=t,this._markAsDirty(),this.value=Math.max(Math.min(this.value,this._maximum),this._minimum))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maximum",{get:function(){return this._maximum},set:function(t){this._maximum!==t&&(this._maximum=t,this._markAsDirty(),this.value=Math.max(Math.min(this.value,this._maximum),this._minimum))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){t=Math.max(Math.min(t,this._maximum),this._minimum),this._value!==t&&(this._value=t,this._markAsDirty(),this.onValueChangedObservable.notifyObservers(this._value))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isVertical",{get:function(){return this._isVertical},set:function(t){this._isVertical!==t&&(this._isVertical=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isThumbClamped",{get:function(){return this._isThumbClamped},set:function(t){this._isThumbClamped!==t&&(this._isThumbClamped=t,this._markAsDirty())},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"BaseSlider"},e.prototype._getThumbPosition=function(){return this.isVertical?(this.maximum-this.value)/(this.maximum-this.minimum)*this._backgroundBoxLength:(this.value-this.minimum)/(this.maximum-this.minimum)*this._backgroundBoxLength},e.prototype._getThumbThickness=function(t){var e=0;switch(t){case"circle":e=this._thumbWidth.isPixel?Math.max(this._thumbWidth.getValue(this._host),this._backgroundBoxThickness):this._backgroundBoxThickness*this._thumbWidth.getValue(this._host);break;case"rectangle":e=this._thumbWidth.isPixel?Math.min(this._thumbWidth.getValue(this._host),this._backgroundBoxThickness):this._backgroundBoxThickness*this._thumbWidth.getValue(this._host)}return e},e.prototype._prepareRenderingData=function(t){this._effectiveBarOffset=0,this._renderLeft=this._currentMeasure.left,this._renderTop=this._currentMeasure.top,this._renderWidth=this._currentMeasure.width,this._renderHeight=this._currentMeasure.height,this._backgroundBoxLength=Math.max(this._currentMeasure.width,this._currentMeasure.height),this._backgroundBoxThickness=Math.min(this._currentMeasure.width,this._currentMeasure.height),this._effectiveThumbThickness=this._getThumbThickness(t),this.displayThumb&&(this._backgroundBoxLength-=this._effectiveThumbThickness),this.isVertical&&this._currentMeasure.height=this._selectors.length))return this._selectors[t]},t.prototype.removeSelector=function(t){t<0||t>=this._selectors.length||(this._groupPanel.removeControl(this._selectors[t]),this._selectors.splice(t,1))},t}(),Y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.addCheckbox=function(t,e,i){void 0===e&&(e=function(t){}),void 0===i&&(i=!1),i=i||!1;var o=new M;o.width="20px",o.height="20px",o.color="#364249",o.background="#CCCCCC",o.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,o.onIsCheckedChangedObservable.add((function(t){e(t)}));var r=I.AddHeader(o,t,"200px",{isHorizontal:!0,controlFirst:!0});r.height="30px",r.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,r.left="4px",this.groupPanel.addControl(r),this.selectors.push(r),o.isChecked=i,this.groupPanel.parent&&this.groupPanel.parent.parent&&(o.color=this.groupPanel.parent.parent.buttonColor,o.background=this.groupPanel.parent.parent.buttonBackground)},e.prototype._setSelectorLabel=function(t,e){this.selectors[t].children[1].text=e},e.prototype._setSelectorLabelColor=function(t,e){this.selectors[t].children[1].color=e},e.prototype._setSelectorButtonColor=function(t,e){this.selectors[t].children[0].color=e},e.prototype._setSelectorButtonBackground=function(t,e){this.selectors[t].children[0].background=e},e}(j),X=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectNb=0,e}return l(e,t),e.prototype.addRadio=function(t,e,i){void 0===e&&(e=function(t){}),void 0===i&&(i=!1);var o=this._selectNb++,r=new H;r.name=t,r.width="20px",r.height="20px",r.color="#364249",r.background="#CCCCCC",r.group=this.name,r.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,r.onIsCheckedChangedObservable.add((function(t){t&&e(o)}));var n=I.AddHeader(r,t,"200px",{isHorizontal:!0,controlFirst:!0});n.height="30px",n.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,n.left="4px",this.groupPanel.addControl(n),this.selectors.push(n),r.isChecked=i,this.groupPanel.parent&&this.groupPanel.parent.parent&&(r.color=this.groupPanel.parent.parent.buttonColor,r.background=this.groupPanel.parent.parent.buttonBackground)},e.prototype._setSelectorLabel=function(t,e){this.selectors[t].children[1].text=e},e.prototype._setSelectorLabelColor=function(t,e){this.selectors[t].children[1].color=e},e.prototype._setSelectorButtonColor=function(t,e){this.selectors[t].children[0].color=e},e.prototype._setSelectorButtonBackground=function(t,e){this.selectors[t].children[0].background=e},e}(j),K=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.addSlider=function(t,e,i,o,r,n,a){void 0===e&&(e=function(t){}),void 0===i&&(i="Units"),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===a&&(a=function(t){return 0|t});var s=new U;s.name=i,s.value=n,s.minimum=o,s.maximum=r,s.width=.9,s.height="20px",s.color="#364249",s.background="#CCCCCC",s.borderColor="black",s.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,s.left="4px",s.paddingBottom="4px",s.onValueChangedObservable.add((function(t){s.parent.children[0].text=s.parent.children[0].name+": "+a(t)+" "+s.name,e(t)}));var l=I.AddHeader(s,t+": "+a(n)+" "+i,"30px",{isHorizontal:!1,controlFirst:!1});l.height="60px",l.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,l.left="4px",l.children[0].name=t,this.groupPanel.addControl(l),this.selectors.push(l),this.groupPanel.parent&&this.groupPanel.parent.parent&&(s.color=this.groupPanel.parent.parent.buttonColor,s.background=this.groupPanel.parent.parent.buttonBackground)},e.prototype._setSelectorLabel=function(t,e){this.selectors[t].children[0].name=e,this.selectors[t].children[0].text=e+": "+this.selectors[t].children[1].value+" "+this.selectors[t].children[1].name},e.prototype._setSelectorLabelColor=function(t,e){this.selectors[t].children[0].color=e},e.prototype._setSelectorButtonColor=function(t,e){this.selectors[t].children[1].color=e},e.prototype._setSelectorButtonBackground=function(t,e){this.selectors[t].children[1].background=e},e}(j),Z=function(t){function e(e,i){void 0===i&&(i=[]);var o=t.call(this,e)||this;if(o.name=e,o.groups=i,o._buttonColor="#364249",o._buttonBackground="#CCCCCC",o._headerColor="black",o._barColor="white",o._barHeight="2px",o._spacerHeight="20px",o._bars=new Array,o._groups=i,o.thickness=2,o._panel=new w,o._panel.verticalAlignment=I.VERTICAL_ALIGNMENT_TOP,o._panel.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,o._panel.top=5,o._panel.left=5,o._panel.width=.95,i.length>0){for(var r=0;r0&&this._addSpacer(),this._panel.addControl(t.groupPanel),this._groups.push(t),t.groupPanel.children[0].color=this._headerColor;for(var e=0;e=this._groups.length)){var e=this._groups[t];this._panel.removeControl(e.groupPanel),this._groups.splice(t,1),t=this._groups.length||(this._groups[e].groupPanel.children[0].text=t)},e.prototype.relabel=function(t,e,i){if(!(e<0||e>=this._groups.length)){var o=this._groups[e];i<0||i>=o.selectors.length||o._setSelectorLabel(i,t)}},e.prototype.removeFromGroupSelector=function(t,e){if(!(t<0||t>=this._groups.length)){var i=this._groups[t];e<0||e>=i.selectors.length||i.removeSelector(e)}},e.prototype.addToGroupCheckbox=function(t,e,i,o){void 0===i&&(i=function(){}),void 0===o&&(o=!1),t<0||t>=this._groups.length||this._groups[t].addCheckbox(e,i,o)},e.prototype.addToGroupRadio=function(t,e,i,o){void 0===i&&(i=function(){}),void 0===o&&(o=!1),t<0||t>=this._groups.length||this._groups[t].addRadio(e,i,o)},e.prototype.addToGroupSlider=function(t,e,i,o,r,n,a,s){void 0===i&&(i=function(){}),void 0===o&&(o="Units"),void 0===r&&(r=0),void 0===n&&(n=0),void 0===a&&(a=0),void 0===s&&(s=function(t){return 0|t}),t<0||t>=this._groups.length||this._groups[t].addSlider(e,i,o,r,n,a,s)},e}(T),q=function(t){function e(e){var i=t.call(this,e)||this;return i._freezeControls=!1,i._bucketWidth=0,i._bucketHeight=0,i._buckets={},i}return l(e,t),Object.defineProperty(e.prototype,"freezeControls",{get:function(){return this._freezeControls},set:function(t){if(this._freezeControls!==t){t||this._restoreMeasures(),this._freezeControls=!1;var e=this.host.getSize(),i=e.width,o=e.height,r=this.host.getContext(),n=new v(0,0,i,o);this.host._numLayoutCalls=0,this.host._rootContainer._layout(n,r),t&&(this._updateMeasures(),this._useBuckets()&&this._makeBuckets()),this._freezeControls=t,this.host.markAsDirty()}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucketWidth",{get:function(){return this._bucketWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucketHeight",{get:function(){return this._bucketHeight},enumerable:!1,configurable:!0}),e.prototype.setBucketSizes=function(t,e){this._bucketWidth=t,this._bucketHeight=e,this._useBuckets()?this._freezeControls&&this._makeBuckets():this._buckets={}},e.prototype._useBuckets=function(){return this._bucketWidth>0&&this._bucketHeight>0},e.prototype._makeBuckets=function(){this._buckets={},this._bucketLen=Math.ceil(this.widthInPixels/this._bucketWidth),this._dispatchInBuckets(this._children),this._oldLeft=null,this._oldTop=null},e.prototype._dispatchInBuckets=function(t){for(var e=0;e0&&this._dispatchInBuckets(i._children)}},e.prototype._updateMeasures=function(){var t=0|this.leftInPixels,e=0|this.topInPixels;this._measureForChildren.left-=t,this._measureForChildren.top-=e,this._currentMeasure.left-=t,this._currentMeasure.top-=e,this._customData.origLeftForChildren=this._measureForChildren.left,this._customData.origTopForChildren=this._measureForChildren.top,this._customData.origLeft=this._currentMeasure.left,this._customData.origTop=this._currentMeasure.top,this._updateChildrenMeasures(this._children,t,e)},e.prototype._updateChildrenMeasures=function(t,e,i){for(var o=0;o0&&this._updateChildrenMeasures(r._children,e,i)}},e.prototype._restoreMeasures=function(){var t=0|this.leftInPixels,e=0|this.topInPixels;this._measureForChildren.left=this._customData.origLeftForChildren+t,this._measureForChildren.top=this._customData.origTopForChildren+e,this._currentMeasure.left=this._customData.origLeft+t,this._currentMeasure.top=this._customData.origTop+e},e.prototype._getTypeName=function(){return"ScrollViewerWindow"},e.prototype._additionalProcessing=function(e,i){t.prototype._additionalProcessing.call(this,e,i),this._parentMeasure=e,this._measureForChildren.left=this._currentMeasure.left,this._measureForChildren.top=this._currentMeasure.top,this._measureForChildren.width=e.width,this._measureForChildren.height=e.height},e.prototype._layout=function(e,i){return this._freezeControls?(this.invalidateRect(),!1):t.prototype._layout.call(this,e,i)},e.prototype._scrollChildren=function(t,e,i){for(var o=0;o0&&this._scrollChildren(r._children,e,i)}},e.prototype._scrollChildrenWithBuckets=function(t,e,i,o){for(var r=Math.max(0,Math.floor(-t/this._bucketWidth)),n=Math.floor((-t+this._parentMeasure.width-1)/this._bucketWidth),a=Math.floor((-e+this._parentMeasure.height-1)/this._bucketHeight),s=Math.max(0,Math.floor(-e/this._bucketHeight));s<=a;){for(var l=r;l<=n;++l){var _=s*this._bucketLen+l,h=this._buckets[_];if(h)for(var c=0;cthis._tempMeasure.left+this._tempMeasure.width||ethis._tempMeasure.top+this._tempMeasure.height)&&(this.isVertical?this.value=this.minimum+(1-(e-this._currentMeasure.top)/this._currentMeasure.height)*(this.maximum-this.minimum):this.value=this.minimum+(t-this._currentMeasure.left)/this._currentMeasure.width*(this.maximum-this.minimum)));var o;o=this.isVertical?-(e-this._originY)/(this._currentMeasure.height-this._effectiveThumbThickness):(t-this._originX)/(this._currentMeasure.width-this._effectiveThumbThickness),this.value+=i*o*(this.maximum-this.minimum),this._originX=t,this._originY=e},e.prototype._onPointerDown=function(e,i,o,r,n){return this._first=!0,t.prototype._onPointerDown.call(this,e,i,o,r,n)},e.prototype.serialize=function(e){t.prototype.serialize.call(this,e),this.backgroundGradient&&(e.backgroundGradient={},this.backgroundGradient.serialize(e.backgroundGradient))},e.prototype._parseFromContent=function(e,i){if(t.prototype._parseFromContent.call(this,e,i),e.backgroundGradient){var o=d.Tools.Instantiate("BABYLON.GUI."+e.backgroundGradient.className);this.backgroundGradient=new o,this.backgroundGradient.parse(e.backgroundGradient)}},h([(0,d.serialize)()],e.prototype,"borderColor",null),h([(0,d.serialize)()],e.prototype,"background",null),h([(0,d.serialize)()],e.prototype,"invertScrollDirection",null),e}(G);(0,d.RegisterClass)("BABYLON.GUI.Scrollbar",J);var $=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._thumbLength=.5,i._thumbHeight=1,i._barImageHeight=1,i._tempMeasure=new v(0,0,0,0),i._invertScrollDirection=!1,i.num90RotationInVerticalMode=1,i}return l(e,t),Object.defineProperty(e.prototype,"invertScrollDirection",{get:function(){return this._invertScrollDirection},set:function(t){this._invertScrollDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundImage",{get:function(){return this._backgroundBaseImage},set:function(t){var e=this;this._backgroundBaseImage!==t&&(this._backgroundBaseImage=t,this.isVertical&&0!==this.num90RotationInVerticalMode?t.isLoaded?(this._backgroundImage=t._rotate90(this.num90RotationInVerticalMode,!0),this._markAsDirty()):t.onImageLoadedObservable.addOnce((function(){var i=t._rotate90(e.num90RotationInVerticalMode,!0);e._backgroundImage=i,i.isLoaded||i.onImageLoadedObservable.addOnce((function(){e._markAsDirty()})),e._markAsDirty()})):(this._backgroundImage=t,t&&!t.isLoaded&&t.onImageLoadedObservable.addOnce((function(){e._markAsDirty()})),this._markAsDirty()))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbImage",{get:function(){return this._thumbBaseImage},set:function(t){var e=this;this._thumbBaseImage!==t&&(this._thumbBaseImage=t,this.isVertical&&0!==this.num90RotationInVerticalMode?t.isLoaded?(this._thumbImage=t._rotate90(-this.num90RotationInVerticalMode,!0),this._markAsDirty()):t.onImageLoadedObservable.addOnce((function(){var i=t._rotate90(-e.num90RotationInVerticalMode,!0);e._thumbImage=i,i.isLoaded||i.onImageLoadedObservable.addOnce((function(){e._markAsDirty()})),e._markAsDirty()})):(this._thumbImage=t,t&&!t.isLoaded&&t.onImageLoadedObservable.addOnce((function(){e._markAsDirty()})),this._markAsDirty()))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbLength",{get:function(){return this._thumbLength},set:function(t){this._thumbLength!==t&&(this._thumbLength=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbHeight",{get:function(){return this._thumbHeight},set:function(t){this._thumbLength!==t&&(this._thumbHeight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barImageHeight",{get:function(){return this._barImageHeight},set:function(t){this._barImageHeight!==t&&(this._barImageHeight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"ImageScrollBar"},e.prototype._getThumbThickness=function(){return this._thumbWidth.isPixel?this._thumbWidth.getValue(this._host):this._backgroundBoxThickness*this._thumbWidth.getValue(this._host)},e.prototype._draw=function(t){t.save(),this._applyStates(t),this._prepareRenderingData("rectangle");var e=this._getThumbPosition(),i=this._renderLeft,o=this._renderTop,r=this._renderWidth,n=this._renderHeight;this._backgroundImage&&(this._tempMeasure.copyFromFloats(i,o,r,n),this.isVertical?(this._tempMeasure.copyFromFloats(i+r*(1-this._barImageHeight)*.5,this._currentMeasure.top,r*this._barImageHeight,n),this._tempMeasure.height+=this._effectiveThumbThickness,this._backgroundImage._currentMeasure.copyFrom(this._tempMeasure)):(this._tempMeasure.copyFromFloats(this._currentMeasure.left,o+n*(1-this._barImageHeight)*.5,r,n*this._barImageHeight),this._tempMeasure.width+=this._effectiveThumbThickness,this._backgroundImage._currentMeasure.copyFrom(this._tempMeasure)),this._backgroundImage._draw(t)),this.isVertical?this._tempMeasure.copyFromFloats(i-this._effectiveBarOffset+this._currentMeasure.width*(1-this._thumbHeight)*.5,this._currentMeasure.top+e,this._currentMeasure.width*this._thumbHeight,this._effectiveThumbThickness):this._tempMeasure.copyFromFloats(this._currentMeasure.left+e,this._currentMeasure.top+this._currentMeasure.height*(1-this._thumbHeight)*.5,this._effectiveThumbThickness,this._currentMeasure.height*this._thumbHeight),this._thumbImage&&(this._thumbImage._currentMeasure.copyFrom(this._tempMeasure),this._thumbImage._draw(t)),t.restore()},e.prototype._updateValueFromPointer=function(t,e){0!=this.rotation&&(this._invertTransformMatrix.transformCoordinates(t,e,this._transformedPosition),t=this._transformedPosition.x,e=this._transformedPosition.y);var i=this._invertScrollDirection?-1:1;this._first&&(this._first=!1,this._originX=t,this._originY=e,(tthis._tempMeasure.left+this._tempMeasure.width||ethis._tempMeasure.top+this._tempMeasure.height)&&(this.isVertical?this.value=this.minimum+(1-(e-this._currentMeasure.top)/this._currentMeasure.height)*(this.maximum-this.minimum):this.value=this.minimum+(t-this._currentMeasure.left)/this._currentMeasure.width*(this.maximum-this.minimum)));var o;o=this.isVertical?-(e-this._originY)/(this._currentMeasure.height-this._effectiveThumbThickness):(t-this._originX)/(this._currentMeasure.width-this._effectiveThumbThickness),this.value+=i*o*(this.maximum-this.minimum),this._originX=t,this._originY=e},e.prototype._onPointerDown=function(e,i,o,r,n){return this._first=!0,t.prototype._onPointerDown.call(this,e,i,o,r,n)},h([(0,d.serialize)()],e.prototype,"num90RotationInVerticalMode",void 0),h([(0,d.serialize)()],e.prototype,"invertScrollDirection",null),e}(G),tt=function(t){function e(e,i){var o=t.call(this,e)||this;return o._barSize=20,o._pointerIsOver=!1,o._wheelPrecision=.05,o._thumbLength=.5,o._thumbHeight=1,o._barImageHeight=1,o._horizontalBarImageHeight=1,o._verticalBarImageHeight=1,o._oldWindowContentsWidth=0,o._oldWindowContentsHeight=0,o._forceHorizontalBar=!1,o._forceVerticalBar=!1,o._useImageBar=i||!1,o.onDirtyObservable.add((function(){o._horizontalBarSpace.color=o.color,o._verticalBarSpace.color=o.color,o._dragSpace.color=o.color})),o.onPointerEnterObservable.add((function(){o._pointerIsOver=!0})),o.onPointerOutObservable.add((function(){o._pointerIsOver=!1})),o._grid=new D,o._useImageBar?(o._horizontalBar=new $,o._verticalBar=new $):(o._horizontalBar=new J,o._verticalBar=new J),o._window=new q("scrollViewer_window"),o._window.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,o._window.verticalAlignment=I.VERTICAL_ALIGNMENT_TOP,o._grid.addColumnDefinition(1),o._grid.addColumnDefinition(0,!0),o._grid.addRowDefinition(1),o._grid.addRowDefinition(0,!0),t.prototype.addControl.call(o,o._grid),o._grid.addControl(o._window,0,0),o._verticalBarSpace=new T,o._verticalBarSpace.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,o._verticalBarSpace.verticalAlignment=I.VERTICAL_ALIGNMENT_TOP,o._verticalBarSpace.thickness=1,o._grid.addControl(o._verticalBarSpace,0,1),o._addBar(o._verticalBar,o._verticalBarSpace,!0,Math.PI),o._horizontalBarSpace=new T,o._horizontalBarSpace.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,o._horizontalBarSpace.verticalAlignment=I.VERTICAL_ALIGNMENT_TOP,o._horizontalBarSpace.thickness=1,o._grid.addControl(o._horizontalBarSpace,1,0),o._addBar(o._horizontalBar,o._horizontalBarSpace,!1,0),o._dragSpace=new T,o._dragSpace.thickness=1,o._grid.addControl(o._dragSpace,1,1),o._grid.clipChildren=!1,o._useImageBar||(o.barColor="grey",o.barBackground="transparent"),o}return l(e,t),Object.defineProperty(e.prototype,"horizontalBar",{get:function(){return this._horizontalBar},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalBar",{get:function(){return this._verticalBar},enumerable:!1,configurable:!0}),e.prototype.addControl=function(t){return t?(this._window.addControl(t),this):this},e.prototype.removeControl=function(t){return this._window.removeControl(t),this},Object.defineProperty(e.prototype,"children",{get:function(){return this._window.children},enumerable:!1,configurable:!0}),e.prototype._flagDescendantsAsMatrixDirty=function(){for(var t=0,e=this._children;t1&&(t=1),this._wheelPrecision=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollBackground",{get:function(){return this._horizontalBarSpace.background},set:function(t){this._horizontalBarSpace.background!==t&&(this._horizontalBarSpace.background=t,this._verticalBarSpace.background=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barColor",{get:function(){return this._barColor},set:function(t){this._barColor!==t&&(this._barColor=t,this._horizontalBar.color=t,this._verticalBar.color=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbImage",{get:function(){return this._barImage},set:function(t){if(this._barImage!==t){this._barImage=t;var e=this._horizontalBar,i=this._verticalBar;e.thumbImage=t,i.thumbImage=t}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horizontalThumbImage",{get:function(){return this._horizontalBarImage},set:function(t){this._horizontalBarImage!==t&&(this._horizontalBarImage=t,this._horizontalBar.thumbImage=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalThumbImage",{get:function(){return this._verticalBarImage},set:function(t){this._verticalBarImage!==t&&(this._verticalBarImage=t,this._verticalBar.thumbImage=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barSize",{get:function(){return this._barSize},set:function(t){this._barSize!==t&&(this._barSize=t,this._markAsDirty(),this._horizontalBar.isVisible&&this._grid.setRowDefinition(1,this._barSize,!0),this._verticalBar.isVisible&&this._grid.setColumnDefinition(1,this._barSize,!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbLength",{get:function(){return this._thumbLength},set:function(t){if(this._thumbLength!==t){t<=0&&(t=.1),t>1&&(t=1),this._thumbLength=t;var e=this._horizontalBar,i=this._verticalBar;e.thumbLength=t,i.thumbLength=t,this._markAsDirty()}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbHeight",{get:function(){return this._thumbHeight},set:function(t){if(this._thumbHeight!==t){t<=0&&(t=.1),t>1&&(t=1),this._thumbHeight=t;var e=this._horizontalBar,i=this._verticalBar;e.thumbHeight=t,i.thumbHeight=t,this._markAsDirty()}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barImageHeight",{get:function(){return this._barImageHeight},set:function(t){if(this._barImageHeight!==t){t<=0&&(t=.1),t>1&&(t=1),this._barImageHeight=t;var e=this._horizontalBar,i=this._verticalBar;e.barImageHeight=t,i.barImageHeight=t,this._markAsDirty()}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horizontalBarImageHeight",{get:function(){return this._horizontalBarImageHeight},set:function(t){this._horizontalBarImageHeight!==t&&(t<=0&&(t=.1),t>1&&(t=1),this._horizontalBarImageHeight=t,this._horizontalBar.barImageHeight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalBarImageHeight",{get:function(){return this._verticalBarImageHeight},set:function(t){this._verticalBarImageHeight!==t&&(t<=0&&(t=.1),t>1&&(t=1),this._verticalBarImageHeight=t,this._verticalBar.barImageHeight=t,this._markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barBackground",{get:function(){return this._barBackground},set:function(t){if(this._barBackground!==t){this._barBackground=t;var e=this._horizontalBar,i=this._verticalBar;e.background=t,i.background=t,this._dragSpace.background=t}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"barImage",{get:function(){return this._barBackgroundImage},set:function(t){this._barBackgroundImage=t;var e=this._horizontalBar,i=this._verticalBar;e.backgroundImage=t,i.backgroundImage=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horizontalBarImage",{get:function(){return this._horizontalBarBackgroundImage},set:function(t){this._horizontalBarBackgroundImage=t,this._horizontalBar.backgroundImage=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalBarImage",{get:function(){return this._verticalBarBackgroundImage},set:function(t){this._verticalBarBackgroundImage=t,this._verticalBar.backgroundImage=t},enumerable:!1,configurable:!0}),e.prototype._setWindowPosition=function(t){void 0===t&&(t=!0);var e=this.host.idealRatio,i=this._window._currentMeasure.width,o=this._window._currentMeasure.height;if(t||this._oldWindowContentsWidth!==i||this._oldWindowContentsHeight!==o){this._oldWindowContentsWidth=i,this._oldWindowContentsHeight=o;var r=this._clientWidth-i,n=this._clientHeight-o,a=this._horizontalBar.value/e*r+"px",s=this._verticalBar.value/e*n+"px";a!==this._window.left&&(this._window.left=a,this.freezeControls||(this._rebuildLayout=!0)),s!==this._window.top&&(this._window.top=s,this.freezeControls||(this._rebuildLayout=!0))}},e.prototype._updateScroller=function(){var t=this._window._currentMeasure.width,e=this._window._currentMeasure.height;this._horizontalBar.isVisible&&t<=this._clientWidth&&!this.forceHorizontalBar?(this._grid.setRowDefinition(1,0,!0),this._horizontalBar.isVisible=!1,this._horizontalBar.value=0,this._rebuildLayout=!0):!this._horizontalBar.isVisible&&(t>this._clientWidth||this.forceHorizontalBar)&&(this._grid.setRowDefinition(1,this._barSize,!0),this._horizontalBar.isVisible=!0,this._rebuildLayout=!0),this._verticalBar.isVisible&&e<=this._clientHeight&&!this.forceVerticalBar?(this._grid.setColumnDefinition(1,0,!0),this._verticalBar.isVisible=!1,this._verticalBar.value=0,this._rebuildLayout=!0):!this._verticalBar.isVisible&&(e>this._clientHeight||this.forceVerticalBar)&&(this._grid.setColumnDefinition(1,this._barSize,!0),this._verticalBar.isVisible=!0,this._rebuildLayout=!0),this._buildClientSizes();var i=this.host.idealRatio;this._horizontalBar.thumbWidth=.9*this._thumbLength*(this._clientWidth/i)+"px",this._verticalBar.thumbWidth=.9*this._thumbLength*(this._clientHeight/i)+"px"},e.prototype._link=function(e){t.prototype._link.call(this,e),this._attachWheel()},e.prototype._addBar=function(t,e,i,o){var r=this;t.paddingLeft=0,t.width="100%",t.height="100%",t.barOffset=0,t.value=0,t.maximum=1,t.horizontalAlignment=I.HORIZONTAL_ALIGNMENT_CENTER,t.verticalAlignment=I.VERTICAL_ALIGNMENT_CENTER,t.isVertical=i,t.rotation=o,t.isVisible=!1,e.addControl(t),t.onValueChangedObservable.add((function(){r._setWindowPosition()}))},e.prototype._attachWheel=function(){var t=this;this._host&&!this._onWheelObserver&&(this._onWheelObserver=this.onWheelObservable.add((function(e){t._pointerIsOver&&!t.isReadOnly&&(1==t._verticalBar.isVisible&&(e.y<0&&t._verticalBar.value>0?t._verticalBar.value-=t._wheelPrecision:e.y>0&&t._verticalBar.value0&&t._horizontalBar.value>0&&(t._horizontalBar.value-=t._wheelPrecision)))})))},e.prototype._renderHighlightSpecific=function(e){this.isHighlighted&&(t.prototype._renderHighlightSpecific.call(this,e),this._grid._renderHighlightSpecific(e),e.restore())},e.prototype.dispose=function(){this.onWheelObservable.remove(this._onWheelObserver),this._onWheelObserver=null,t.prototype.dispose.call(this)},h([(0,d.serialize)()],e.prototype,"wheelPrecision",null),h([(0,d.serialize)()],e.prototype,"scrollBackground",null),h([(0,d.serialize)()],e.prototype,"barColor",null),h([(0,d.serialize)()],e.prototype,"barSize",null),h([(0,d.serialize)()],e.prototype,"barBackground",null),e}(T);(0,d.RegisterClass)("BABYLON.GUI.ScrollViewer",tt);var et=function(t){function e(e,i){var o=t.call(this,e)||this;o.name=e,o.onIsActiveChangedObservable=new d.Observable,o.delegatePickingToChildren=!1,o._isActive=!1,o.group=null!=i?i:"",o.thickness=0,o.isPointerBlocker=!0;var r=null;return o.toActiveAnimation=function(){o.thickness=1},o.toInactiveAnimation=function(){o.thickness=0},o.pointerEnterActiveAnimation=function(){r=o.alpha,o.alpha-=.1},o.pointerOutActiveAnimation=function(){null!==r&&(o.alpha=r)},o.pointerDownActiveAnimation=function(){o.scaleX-=.05,o.scaleY-=.05},o.pointerUpActiveAnimation=function(){o.scaleX+=.05,o.scaleY+=.05},o.pointerEnterInactiveAnimation=function(){r=o.alpha,o.alpha-=.1},o.pointerOutInactiveAnimation=function(){null!==r&&(o.alpha=r)},o.pointerDownInactiveAnimation=function(){o.scaleX-=.05,o.scaleY-=.05},o.pointerUpInactiveAnimation=function(){o.scaleX+=.05,o.scaleY+=.05},o}return l(e,t),Object.defineProperty(e.prototype,"group",{get:function(){return this._group},set:function(t){this._group!==t&&(this._group=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isActive",{get:function(){return this._isActive},set:function(t){var e,i,o=this;this._isActive!==t&&(this._isActive=t,this._isActive?null===(e=this.toActiveAnimation)||void 0===e||e.call(this):null===(i=this.toInactiveAnimation)||void 0===i||i.call(this),this._markAsDirty(),this.onIsActiveChangedObservable.notifyObservers(t),this._isActive&&this._host&&this._group&&this._host.executeOnAllControls((function(t){if("ToggleButton"===t.typeName){if(t===o)return;var e=t;e.group===o.group&&(e.isActive=!1)}})))},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"ToggleButton"},e.prototype._processPicking=function(e,i,o,r,n,a,s,l){if(!this._isEnabled||!this.isHitTestVisible||!this.isVisible||this.notRenderable)return!1;if(!t.prototype.contains.call(this,e,i))return!1;if(this.delegatePickingToChildren){for(var _=!1,h=this._children.length-1;h>=0;h--){var c=this._children[h];if(c.isEnabled&&c.isHitTestVisible&&c.isVisible&&!c.notRenderable&&c.contains(e,i)){_=!0;break}}if(!_)return!1}return this._processObservables(r,e,i,o,n,a,s,l),!0},e.prototype._onPointerEnter=function(e,i){return!!t.prototype._onPointerEnter.call(this,e,i)&&(this.isReadOnly||(this._isActive?this.pointerEnterActiveAnimation&&this.pointerEnterActiveAnimation():this.pointerEnterInactiveAnimation&&this.pointerEnterInactiveAnimation()),!0)},e.prototype._onPointerOut=function(e,i,o){void 0===o&&(o=!1),this.isReadOnly||(this._isActive?this.pointerOutActiveAnimation&&this.pointerOutActiveAnimation():this.pointerOutInactiveAnimation&&this.pointerOutInactiveAnimation()),t.prototype._onPointerOut.call(this,e,i,o)},e.prototype._onPointerDown=function(e,i,o,r,n){return!!t.prototype._onPointerDown.call(this,e,i,o,r,n)&&(this.isReadOnly||(this._isActive?this.pointerDownActiveAnimation&&this.pointerDownActiveAnimation():this.pointerDownInactiveAnimation&&this.pointerDownInactiveAnimation()),!0)},e.prototype._onPointerUp=function(e,i,o,r,n,a){this.isReadOnly||(this._isActive?this.pointerUpActiveAnimation&&this.pointerUpActiveAnimation():this.pointerUpInactiveAnimation&&this.pointerUpInactiveAnimation()),t.prototype._onPointerUp.call(this,e,i,o,r,n,a)},e}(T);(0,d.RegisterClass)("BABYLON.GUI.ToggleButton",et);var it=function(){},ot=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onKeyPressObservable=new d.Observable,e.defaultButtonWidth="40px",e.defaultButtonHeight="40px",e.defaultButtonPaddingLeft="2px",e.defaultButtonPaddingRight="2px",e.defaultButtonPaddingTop="2px",e.defaultButtonPaddingBottom="2px",e.defaultButtonColor="#DDD",e.defaultButtonBackground="#070707",e.shiftButtonColor="#7799FF",e.selectedShiftThickness=1,e.shiftState=0,e._currentlyConnectedInputText=null,e._connectedInputTexts=[],e._onKeyPressObserver=null,e}return l(e,t),e.prototype._getTypeName=function(){return"VirtualKeyboard"},e.prototype._createKey=function(t,e){var i=this,o=R.CreateSimpleButton(t,t);return o.width=e&&e.width?e.width:this.defaultButtonWidth,o.height=e&&e.height?e.height:this.defaultButtonHeight,o.color=e&&e.color?e.color:this.defaultButtonColor,o.background=e&&e.background?e.background:this.defaultButtonBackground,o.paddingLeft=e&&e.paddingLeft?e.paddingLeft:this.defaultButtonPaddingLeft,o.paddingRight=e&&e.paddingRight?e.paddingRight:this.defaultButtonPaddingRight,o.paddingTop=e&&e.paddingTop?e.paddingTop:this.defaultButtonPaddingTop,o.paddingBottom=e&&e.paddingBottom?e.paddingBottom:this.defaultButtonPaddingBottom,o.thickness=0,o.isFocusInvisible=!0,o.shadowColor=this.shadowColor,o.shadowBlur=this.shadowBlur,o.shadowOffsetX=this.shadowOffsetX,o.shadowOffsetY=this.shadowOffsetY,o.onPointerUpObservable.add((function(){i.onKeyPressObservable.notifyObservers(t)})),o},e.prototype.addKeysRow=function(t,e){var i=new w;i.isVertical=!1,i.isFocusInvisible=!0;for(var o=null,r=0;ro.heightInPixels)&&(o=a),i.addControl(a)}i.height=o?o.height:this.defaultButtonHeight,this.addControl(i)},e.prototype.applyShiftState=function(t){if(this.children)for(var e=0;e1?this.selectedShiftThickness:0),a.text=t>0?a.text.toUpperCase():a.text.toLowerCase()}}}},Object.defineProperty(e.prototype,"connectedInputText",{get:function(){return this._currentlyConnectedInputText},enumerable:!1,configurable:!0}),e.prototype.connect=function(t){var e=this;if(!this._connectedInputTexts.some((function(e){return e.input===t}))){null===this._onKeyPressObserver&&(this._onKeyPressObserver=this.onKeyPressObservable.add((function(t){if(e._currentlyConnectedInputText){switch(e._currentlyConnectedInputText._host.focusedControl=e._currentlyConnectedInputText,t){case"⇧":return e.shiftState++,e.shiftState>2&&(e.shiftState=0),void e.applyShiftState(e.shiftState);case"←":return void(e._currentlyConnectedInputText instanceof A?e._currentlyConnectedInputText.alternativeProcessKey("Backspace"):e._currentlyConnectedInputText.processKey(8));case"↵":return void(e._currentlyConnectedInputText instanceof A?e._currentlyConnectedInputText.alternativeProcessKey("Enter"):e._currentlyConnectedInputText.processKey(13))}e._currentlyConnectedInputText instanceof A?e._currentlyConnectedInputText.alternativeProcessKey("",e.shiftState?t.toUpperCase():t):e._currentlyConnectedInputText.processKey(-1,e.shiftState?t.toUpperCase():t),1===e.shiftState&&(e.shiftState=0,e.applyShiftState(e.shiftState))}}))),this.isVisible=!1,this._currentlyConnectedInputText=t,t._connectedVirtualKeyboard=this;var i=t.onFocusObservable.add((function(){e._currentlyConnectedInputText=t,t._connectedVirtualKeyboard=e,e.isVisible=!0})),o=t.onBlurObservable.add((function(){t._connectedVirtualKeyboard=null,e._currentlyConnectedInputText=null,e.isVisible=!1}));this._connectedInputTexts.push({input:t,onBlurObserver:o,onFocusObserver:i})}},e.prototype.disconnect=function(t){var e=this;if(t){var i=this._connectedInputTexts.filter((function(e){return e.input===t}));1===i.length&&(this._removeConnectedInputObservables(i[0]),this._connectedInputTexts=this._connectedInputTexts.filter((function(e){return e.input!==t})),this._currentlyConnectedInputText===t&&(this._currentlyConnectedInputText=null))}else this._connectedInputTexts.forEach((function(t){e._removeConnectedInputObservables(t)})),this._connectedInputTexts.length=0;0===this._connectedInputTexts.length&&(this._currentlyConnectedInputText=null,this.onKeyPressObservable.remove(this._onKeyPressObserver),this._onKeyPressObserver=null)},e.prototype._removeConnectedInputObservables=function(t){t.input._connectedVirtualKeyboard=null,t.input.onFocusObservable.remove(t.onFocusObserver),t.input.onBlurObservable.remove(t.onBlurObserver)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.disconnect()},e.CreateDefaultLayout=function(t){var i=new e(t);return i.addKeysRow(["1","2","3","4","5","6","7","8","9","0","←"]),i.addKeysRow(["q","w","e","r","t","y","u","i","o","p"]),i.addKeysRow(["a","s","d","f","g","h","j","k","l",";","'","↵"]),i.addKeysRow(["⇧","z","x","c","v","b","n","m",",",".","/"]),i.addKeysRow([" "],[{width:"200px"}]),i},e.prototype._parseFromContent=function(e,i){var o=this;t.prototype._parseFromContent.call(this,e,i);for(var r=0,n=this.children;r0?(l.focusedControl=null,l._focusProperties.index=0,void(l._focusProperties.total=-1)):(l._focusNextElement(e),void t.event.preventDefault())}l._focusedControl&&(t.type===d.KeyboardEventTypes.KEYDOWN&&l._focusedControl.processKeyboard(t.event),t.skipOnPointerObservable=!0)})),l._rootContainer._link(l),l.hasAlpha=!0,i&&o||(l._resizeObserver=r.getEngine().onResizeObservable.add((function(){return l._onResize()})),l._onResize()),l._texture.isReady=!0,l):l}return l(e,t),Object.defineProperty(e.prototype,"numLayoutCalls",{get:function(){return this._numLayoutCalls},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numRenderCalls",{get:function(){return this._numRenderCalls},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderScale",{get:function(){return this._renderScale},set:function(t){t!==this._renderScale&&(this._renderScale=t,this._onResize())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"background",{get:function(){return this._background},set:function(t){this._background!==t&&(this._background=t,this.markAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"idealWidth",{get:function(){return this._idealWidth},set:function(t){this._idealWidth!==t&&(this._idealWidth=t,this.markAsDirty(),this._rootContainer._markAllAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"idealHeight",{get:function(){return this._idealHeight},set:function(t){this._idealHeight!==t&&(this._idealHeight=t,this.markAsDirty(),this._rootContainer._markAllAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useSmallestIdeal",{get:function(){return this._useSmallestIdeal},set:function(t){this._useSmallestIdeal!==t&&(this._useSmallestIdeal=t,this.markAsDirty(),this._rootContainer._markAllAsDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderAtIdealSize",{get:function(){return this._renderAtIdealSize},set:function(t){this._renderAtIdealSize!==t&&(this._renderAtIdealSize=t,this._onResize())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"idealRatio",{get:function(){var t=0,e=0;return this._idealWidth&&(t=this.getSize().width/this._idealWidth),this._idealHeight&&(e=this.getSize().height/this._idealHeight),this._useSmallestIdeal&&this._idealWidth&&this._idealHeight?window.innerWidth0&&(a=a.add(r.normalize().scale(o/n)))}})),a.length()>0&&(a=a.normalize().scale(i*(null!==(n=t.overlapDeltaMultiplier)&&void 0!==n?n:1)),t.linkOffsetXInPixels+=a.x,t.linkOffsetYInPixels+=a.y)}))},e.prototype.dispose=function(){var e=this.getScene();e&&(this._rootElement=null,e.onBeforeCameraRenderObservable.remove(this._renderObserver),this._resizeObserver&&e.getEngine().onResizeObservable.remove(this._resizeObserver),this._prePointerObserver&&e.onPrePointerObservable.remove(this._prePointerObserver),this._sceneRenderObserver&&e.onBeforeRenderObservable.remove(this._sceneRenderObserver),this._pointerObserver&&e.onPointerObservable.remove(this._pointerObserver),this._preKeyboardObserver&&e.onPreKeyboardObservable.remove(this._preKeyboardObserver),this._canvasPointerOutObserver&&e.getEngine().onCanvasPointerOutObservable.remove(this._canvasPointerOutObserver),this._canvasBlurObserver&&e.getEngine().onCanvasBlurObservable.remove(this._canvasBlurObserver),this._controlAddedObserver&&this._rootContainer.onControlAddedObservable.remove(this._controlAddedObserver),this._controlRemovedObserver&&this._rootContainer.onControlRemovedObservable.remove(this._controlRemovedObserver),this._layerToDispose&&(this._layerToDispose.texture=null,this._layerToDispose.dispose(),this._layerToDispose=null),this._rootContainer.dispose(),this.onClipboardObservable.clear(),this.onControlPickedObservable.clear(),this.onBeginRenderObservable.clear(),this.onEndRenderObservable.clear(),this.onBeginLayoutObservable.clear(),this.onEndLayoutObservable.clear(),this.onGuiReadyObservable.clear(),t.prototype.dispose.call(this))},e.prototype._onResize=function(){var t=this.getScene();if(t){var e=t.getEngine(),i=this.getSize(),o=e.getRenderWidth()*this._renderScale,r=e.getRenderHeight()*this._renderScale;this._renderAtIdealSize&&(this._idealWidth?(r=r*this._idealWidth/o,o=this._idealWidth):this._idealHeight&&(o=o*this._idealHeight/r,r=this._idealHeight)),i.width===o&&i.height===r||(this.scaleTo(o,r),this.markAsDirty(),(this._idealWidth||this._idealHeight)&&this._rootContainer._markAllAsDirty()),this.invalidateRect(0,0,i.width-1,i.height-1)}},e.prototype._getGlobalViewport=function(){var t=this.getSize(),e=this._fullscreenViewport.toGlobal(t.width,t.height),i=Math.round(e.width*(1/this.rootContainer.scaleX)),o=Math.round(e.height*(1/this.rootContainer.scaleY));return e.x+=(e.width-i)/2,e.y+=(e.height-o)/2,e.width=i,e.height=o,e},e.prototype.getProjectedPosition=function(t,e){var i=this.getProjectedPositionWithZ(t,e);return new d.Vector2(i.x,i.y)},e.prototype.getProjectedPositionWithZ=function(t,e){var i=this.getScene();if(!i)return d.Vector3.Zero();var o=this._getGlobalViewport(),r=d.Vector3.Project(t,e,i.getTransformMatrix(),o);return new d.Vector3(r.x,r.y,r.z)},e.prototype._checkUpdate=function(t,i){if(!this._layerToDispose||t.layerMask&this._layerToDispose.layerMask){if(this._isFullscreen&&this._linkedControls.length){var o=this.getScene();if(!o)return;for(var r=this._getGlobalViewport(),n=function(t){if(!t.isVisible)return"continue";var e=t._linkedMesh;if(!e||e.isDisposed())return d.Tools.SetImmediate((function(){t.linkWithMesh(null)})),"continue";var i=e.getBoundingInfo?e.getBoundingInfo().boundingSphere.center:d.Vector3.ZeroReadOnly,n=d.Vector3.Project(i,e.getWorldMatrix(),o.getTransformMatrix(),r);if(n.z<0||n.z>1)return t.notRenderable=!0,"continue";t.notRenderable=!1,a.useInvalidateRectOptimization&&t.invalidateRect(),t._moveToProjectedPosition(n)},a=this,s=0,l=this._linkedControls;sl.width||r>l.height||(t.cameraToUseForPointers=i,e.x=l.x,e.y=l.y,e.width=l.width,e.height=l.height)}))}else n.viewport.toGlobalToRef(a.getRenderWidth(),a.getRenderHeight(),e);else e.x=0,e.y=0,e.width=a.getRenderWidth(),e.height=a.getRenderHeight();var _=o/a.getHardwareScalingLevel()-e.x,h=r/a.getHardwareScalingLevel()-(a.getRenderHeight()-e.y-e.height);if(this._shouldBlockPointer=!1,i){var c=i.event.pointerId||this._defaultMousePointerId;this._doPicking(_,h,i,i.type,c,i.event.button,i.event.deltaX,i.event.deltaY),(this._shouldBlockPointer&&!(i.type&this.skipBlockEvents)||this._capturingControl[c])&&(i.skipOnPointerObservable=!0)}else this._doPicking(_,h,null,d.PointerEventTypes.POINTERMOVE,this._defaultMousePointerId,0);t.cameraToUseForPointers=s},e.prototype.attach=function(){var t=this,e=this.getScene();if(e){var i=new d.Viewport(0,0,0,0);this._prePointerObserver=e.onPrePointerObservable.add((function(o){if((!e.isPointerCaptured(o.event.pointerId)||o.type!==d.PointerEventTypes.POINTERUP||t._capturedPointerIds.has(o.event.pointerId))&&(o.type===d.PointerEventTypes.POINTERMOVE||o.type===d.PointerEventTypes.POINTERUP||o.type===d.PointerEventTypes.POINTERDOWN||o.type===d.PointerEventTypes.POINTERWHEEL)){if(o.type===d.PointerEventTypes.POINTERMOVE){if(e.isPointerCaptured(o.event.pointerId))return;o.event.pointerId&&(t._defaultMousePointerId=o.event.pointerId)}t._translateToPicking(e,i,o)}})),this._attachPickingToSceneRender(e,(function(){return t._translateToPicking(e,i,null)}),!1),this._attachToOnPointerOut(e),this._attachToOnBlur(e)}},e.prototype._focusNextElement=function(t){void 0===t&&(t=!0);var e=[];if(this.executeOnAllControls((function(t){t.isFocusInvisible||!t.isVisible||t.tabIndex<0||e.push(t)})),0!==e.length){e.sort((function(t,e){return 0===t.tabIndex?1:0===e.tabIndex?-1:t.tabIndex-e.tabIndex})),this._focusProperties.total=e.length;var i=-1;this._focusedControl?(i=e.indexOf(this._focusedControl)+(t?1:-1))<0?i=e.length-1:i>=e.length&&(i=0):i=t?0:e.length-1,e[i].focus(),this._focusProperties.index=i}},e.prototype.registerClipboardEvents=function(){self.addEventListener("copy",this._onClipboardCopy,!1),self.addEventListener("cut",this._onClipboardCut,!1),self.addEventListener("paste",this._onClipboardPaste,!1)},e.prototype.unRegisterClipboardEvents=function(){self.removeEventListener("copy",this._onClipboardCopy),self.removeEventListener("cut",this._onClipboardCut),self.removeEventListener("paste",this._onClipboardPaste)},e.prototype._transformUvs=function(t){var e,i=this.getTextureMatrix();if(i.isIdentityAs3x2())e=t;else{var o=d.TmpVectors.Matrix[0];i.getRowToRef(0,d.TmpVectors.Vector4[0]),i.getRowToRef(1,d.TmpVectors.Vector4[1]),i.getRowToRef(2,d.TmpVectors.Vector4[2]);var r=d.TmpVectors.Vector4[0],n=d.TmpVectors.Vector4[1],a=d.TmpVectors.Vector4[2];o.setRowFromFloats(0,r.x,r.y,0,0),o.setRowFromFloats(1,n.x,n.y,0,0),o.setRowFromFloats(2,0,0,1,0),o.setRowFromFloats(3,a.x,a.y,0,1),e=d.TmpVectors.Vector2[0],d.Vector2.TransformToRef(t,o,e)}if((this.wrapU===d.Texture.WRAP_ADDRESSMODE||this.wrapU===d.Texture.MIRROR_ADDRESSMODE)&&e.x>1){var s=e.x-Math.trunc(e.x);this.wrapU===d.Texture.MIRROR_ADDRESSMODE&&Math.trunc(e.x)%2==1&&(s=1-s),e.x=s}if((this.wrapV===d.Texture.WRAP_ADDRESSMODE||this.wrapV===d.Texture.MIRROR_ADDRESSMODE)&&e.y>1){var l=e.y-Math.trunc(e.y);this.wrapV===d.Texture.MIRROR_ADDRESSMODE&&Math.trunc(e.x)%2==1&&(l=1-l),e.y=l}return e},e.prototype.attachToMesh=function(t,e){var i=this;void 0===e&&(e=!0);var o=this.getScene();o&&(this._pointerObserver&&o.onPointerObservable.remove(this._pointerObserver),this._pointerObserver=o.onPointerObservable.add((function(e){if(e.type===d.PointerEventTypes.POINTERMOVE||e.type===d.PointerEventTypes.POINTERUP||e.type===d.PointerEventTypes.POINTERDOWN||e.type===d.PointerEventTypes.POINTERWHEEL){e.type===d.PointerEventTypes.POINTERMOVE&&e.event.pointerId&&(i._defaultMousePointerId=e.event.pointerId);var o=e.event.pointerId||i._defaultMousePointerId;if(e.pickInfo&&e.pickInfo.hit&&e.pickInfo.pickedMesh===t){var r=e.pickInfo.getTextureCoordinates();if(r){r=i._transformUvs(r);var n=i.getSize();i._doPicking(r.x*n.width,(i.applyYInversionOnUpdate?1-r.y:r.y)*n.height,e,e.type,o,e.event.button,e.event.deltaX,e.event.deltaY)}}else if(e.type===d.PointerEventTypes.POINTERUP){if(i._lastControlDown[o]&&i._lastControlDown[o]._forcePointerUp(o),delete i._lastControlDown[o],i.focusedControl){var a=i.focusedControl.keepsFocusWith(),s=!0;if(a)for(var l=0,_=a;l<_.length;l++){var h=_[l];if(i!==h._host){var c=h._host;if(c._lastControlOver[o]&&c._lastControlOver[o].isAscendant(h)){s=!1;break}}}s&&(i.focusedControl=null)}}else e.type===d.PointerEventTypes.POINTERMOVE&&(i._lastControlOver[o]&&i._lastControlOver[o]._onPointerOut(i._lastControlOver[o],e,!0),delete i._lastControlOver[o])}})),t.enablePointerMoveEvents=e,this._attachPickingToSceneRender(o,(function(){var e=i._defaultMousePointerId,r=null==o?void 0:o.pick(o.pointerX,o.pointerY);if(r&&r.hit&&r.pickedMesh===t){var n=r.getTextureCoordinates();if(n){n=i._transformUvs(n);var a=i.getSize();i._doPicking(n.x*a.width,(i.applyYInversionOnUpdate?1-n.y:n.y)*a.height,null,d.PointerEventTypes.POINTERMOVE,e,0)}}else i._lastControlOver[e]&&i._lastControlOver[e]._onPointerOut(i._lastControlOver[e],null,!0),delete i._lastControlOver[e]}),!0),this._attachToOnPointerOut(o),this._attachToOnBlur(o))},e.prototype.moveFocusToControl=function(t){this.focusedControl=t,this._lastPickedControl=t,this._blockNextFocusCheck=!0},e.prototype._manageFocus=function(){if(this._blockNextFocusCheck)return this._blockNextFocusCheck=!1,void(this._lastPickedControl=this._focusedControl);if(this._focusedControl&&this._focusedControl!==this._lastPickedControl){if(this._lastPickedControl.isFocusInvisible)return;this.focusedControl=null}},e.prototype._attachPickingToSceneRender=function(t,e,i){var o=this;this._sceneRenderObserver=t.onBeforeRenderObservable.add((function(){o.checkPointerEveryFrame&&(o._linkedControls.length>0||i)&&e()}))},e.prototype._attachToOnPointerOut=function(t){var e=this;this._canvasPointerOutObserver=t.getEngine().onCanvasPointerOutObservable.add((function(t){e._lastControlOver[t.pointerId]&&e._lastControlOver[t.pointerId]._onPointerOut(e._lastControlOver[t.pointerId],null),delete e._lastControlOver[t.pointerId],e._lastControlDown[t.pointerId]&&e._lastControlDown[t.pointerId]!==e._capturingControl[t.pointerId]&&(e._lastControlDown[t.pointerId]._forcePointerUp(t.pointerId),delete e._lastControlDown[t.pointerId])}))},e.prototype._attachToOnBlur=function(t){var e=this;this._canvasBlurObserver=t.getEngine().onCanvasBlurObservable.add((function(){Object.entries(e._lastControlDown).forEach((function(t){t[1]._onCanvasBlur()})),e.focusedControl=null,e._lastControlDown={}}))},e.prototype.serializeContent=function(){var t=this.getSize(),e={root:{},width:t.width,height:t.height};return this._rootContainer.serialize(e.root),e},e.prototype.parseSerializedObject=function(t,e,i){if(this._rootContainer=I.Parse(t.root,this,i),e){var o=t.width,r=t.height;"number"==typeof o&&"number"==typeof r&&o>=0&&r>=0?this.scaleTo(o,r):this.scaleTo(1920,1080)}},e.prototype.clone=function(t,i){var o=this.getScene();if(!o)return this;var r,n=this.getSize(),a=this.serializeContent();return(r=this._isFullscreen?e.CreateFullscreenUI(null!=t?t:"Clone of "+this.name):i?e.CreateForMesh(i,n.width,n.height):new e(null!=t?t:"Clone of "+this.name,n.width,n.height,o,!this.noMipmap,this.samplingMode)).parseSerializedObject(a),r},e.ParseFromSnippetAsync=function(t,i,o,r){return c(this,void 0,void 0,(function(){var n,a;return u(this,(function(s){switch(s.label){case 0:return n=null!=o?o:e.CreateFullscreenUI("ADT from snippet"),"_BLANK"===t?[2,n]:[4,e._LoadURLContentAsync(e.SnippetUrl+"/"+t.replace(/#/g,"/"),!0)];case 1:return a=s.sent(),n.parseSerializedObject(a,i,r),[2,n]}}))}))},e.prototype.parseFromSnippetAsync=function(t,i,o){return e.ParseFromSnippetAsync(t,i,this,o)},e.ParseFromFileAsync=function(t,i,o,r){return c(this,void 0,void 0,(function(){var n,a;return u(this,(function(s){switch(s.label){case 0:return n=null!=o?o:e.CreateFullscreenUI("ADT from URL"),[4,e._LoadURLContentAsync(t)];case 1:return a=s.sent(),n.parseSerializedObject(a,i,r),[2,n]}}))}))},e.prototype.parseFromURLAsync=function(t,i,o){return e.ParseFromFileAsync(t,i,this,o)},e._LoadURLContentAsync=function(t,e){return void 0===e&&(e=!1),""===t?Promise.reject("No URL provided"):new Promise((function(i,o){var r=new d.WebRequest;r.addEventListener("readystatechange",(function(){if(4==r.readyState)if(200==r.status){var t=void 0;if(e){var n=JSON.parse(JSON.parse(r.responseText).jsonPayload);t=n.encodedGui?new TextDecoder("utf-8").decode((0,d.DecodeBase64ToBinary)(n.encodedGui)):n.gui}else t=r.responseText;var a=JSON.parse(t);i(a)}else o("Unable to load")})),r.open("GET",t),r.send()}))},e._Overlaps=function(t,e){return!(t.centerX>e.centerX+e.widthInPixels||t.centerX+t.widthInPixelse.centerY+e.heightInPixels)},e.CreateForMesh=function(t,i,o,r,n,a,s,l){void 0===i&&(i=1024),void 0===o&&(o=1024),void 0===r&&(r=!0),void 0===n&&(n=!1),void 0===s&&(s=this._CreateMaterial),void 0===l&&(l=d.Texture.TRILINEAR_SAMPLINGMODE);var _=(0,d.RandomGUID)(),h=new e("AdvancedDynamicTexture for ".concat(t.name," [").concat(_,"]"),i,o,t.getScene(),!0,l,a);return s(t,_,h,n),h.attachToMesh(t,r),h},e._CreateMaterial=function(t,e,i,o){var r=(0,d.GetClass)("BABYLON.StandardMaterial");if(!r)throw"StandardMaterial needs to be imported before as it contains a side-effect required by your code.";var n=new r("AdvancedDynamicTextureMaterial for ".concat(t.name," [").concat(e,"]"),t.getScene());n.backFaceCulling=!1,n.diffuseColor=d.Color3.Black(),n.specularColor=d.Color3.Black(),o?(n.diffuseTexture=i,n.emissiveTexture=i,i.hasAlpha=!0):(n.emissiveTexture=i,n.opacityTexture=i),t.material=n},e.CreateForMeshTexture=function(t,i,o,r,n,a){void 0===i&&(i=1024),void 0===o&&(o=1024),void 0===r&&(r=!0),void 0===a&&(a=d.Texture.TRILINEAR_SAMPLINGMODE);var s=new e(t.name+" AdvancedDynamicTexture",i,o,t.getScene(),!0,a,n);return s.attachToMesh(t,r),s},e.CreateFullscreenUI=function(t,i,o,r,n){void 0===i&&(i=!0),void 0===o&&(o=null),void 0===r&&(r=d.Texture.BILINEAR_SAMPLINGMODE),void 0===n&&(n=!1);var a=new e(t,0,0,o,!1,r),s=a.getScene(),l=new d.Layer(t+"_layer",null,s,!i);if(l.texture=a,a._layerToDispose=l,a._isFullscreen=!0,n&&s){var _=1/s.getEngine().getHardwareScalingLevel();a._rootContainer.scaleX=_,a._rootContainer.scaleY=_}return a.attach(),a},e.prototype.scale=function(e){t.prototype.scale.call(this,e),this.markAsDirty()},e.prototype.scaleTo=function(e,i){t.prototype.scaleTo.call(this,e,i),this.markAsDirty()},e.prototype._checkGuiIsReady=function(){this.guiIsReady()&&(this.onGuiReadyObservable.notifyObservers(this),this.onGuiReadyObservable.clear())},e.prototype.guiIsReady=function(){return this._rootContainer.isReady()},e.SnippetUrl=d.Constants.SnippetUrl,e.AllowGPUOptimizations=!0,e}(d.DynamicTexture),ut=function(){function t(t){this.texture=t,this._captureRenderTime=!1,this._renderTime=new d.PerfCounter,this._captureLayoutTime=!1,this._layoutTime=new d.PerfCounter,this._onBeginRenderObserver=null,this._onEndRenderObserver=null,this._onBeginLayoutObserver=null,this._onEndLayoutObserver=null}return Object.defineProperty(t.prototype,"renderTimeCounter",{get:function(){return this._renderTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layoutTimeCounter",{get:function(){return this._layoutTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"captureRenderTime",{get:function(){return this._captureRenderTime},set:function(t){var e=this;t!==this._captureRenderTime&&(this._captureRenderTime=t,t?(this._onBeginRenderObserver=this.texture.onBeginRenderObservable.add((function(){e._renderTime.beginMonitoring()})),this._onEndRenderObserver=this.texture.onEndRenderObservable.add((function(){e._renderTime.endMonitoring(!0)}))):(this.texture.onBeginRenderObservable.remove(this._onBeginRenderObserver),this._onBeginRenderObserver=null,this.texture.onEndRenderObservable.remove(this._onEndRenderObserver),this._onEndRenderObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"captureLayoutTime",{get:function(){return this._captureLayoutTime},set:function(t){var e=this;t!==this._captureLayoutTime&&(this._captureLayoutTime=t,t?(this._onBeginLayoutObserver=this.texture.onBeginLayoutObservable.add((function(){e._layoutTime.beginMonitoring()})),this._onEndLayoutObserver=this.texture.onEndLayoutObservable.add((function(){e._layoutTime.endMonitoring(!0)}))):(this.texture.onBeginLayoutObservable.remove(this._onBeginLayoutObserver),this._onBeginLayoutObserver=null,this.texture.onEndLayoutObservable.remove(this._onEndLayoutObserver),this._onEndLayoutObserver=null))},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.texture.onBeginRenderObservable.remove(this._onBeginRenderObserver),this._onBeginRenderObserver=null,this.texture.onEndRenderObservable.remove(this._onEndRenderObserver),this._onEndRenderObserver=null,this.texture.onBeginLayoutObservable.remove(this._onBeginLayoutObserver),this._onBeginLayoutObserver=null,this.texture.onEndLayoutObservable.remove(this._onEndLayoutObserver),this._onEndLayoutObserver=null,this.texture=null},t}(),dt="XmlLoader Exception : XML file is malformed or corrupted.",ft=function(){function t(t){void 0===t&&(t=null),this._nodes={},this._nodeTypes={element:1,attribute:2,text:3},this._isLoaded=!1,this._objectAttributes={textHorizontalAlignment:1,textVerticalAlignment:2,horizontalAlignment:3,verticalAlignment:4,stretch:5},t&&(this._parentClass=t)}return t.prototype._getChainElement=function(t){var e=window;this._parentClass&&(e=this._parentClass);var i=t;i=i.split(".");for(var o=0;o0&&c>u)throw"XmlLoader Exception : In the Grid element, the number of columns is defined in the first row, do not add more columns in the subsequent rows.";if(0==h){if(!n[f].attributes.getNamedItem("width"))throw"XmlLoader Exception : Width must be defined for all the grid columns in the first row";o=Number(n[f].attributes.getNamedItem("width").nodeValue),_=!!n[f].attributes.getNamedItem("isPixel")&&JSON.parse(n[f].attributes.getNamedItem("isPixel").nodeValue),e.addColumnDefinition(o,_)}a=n[f].children;for(var p=0;p1||(this.onPointerEnterObservable.notifyObservers(this,-1,t,this),this.pointerEnterAnimation&&this.pointerEnterAnimation(),0))},t.prototype._onPointerOut=function(t){this._enterCount--,this._enterCount>0||(this._enterCount=0,this.onPointerOutObservable.notifyObservers(this,-1,t,this),this.pointerOutAnimation&&this.pointerOutAnimation())},t.prototype._onPointerDown=function(t,e,i,o){return this._downCount++,this._downPointerIds[i]=this._downPointerIds[i]+1||1,1===this._downCount&&(this.onPointerDownObservable.notifyObservers(new pt(e,o),-1,t,this),this.pointerDownAnimation&&this.pointerDownAnimation(),!0)},t.prototype._onPointerUp=function(t,e,i,o,r){this._downCount--,this._downPointerIds[i]--,this._downPointerIds[i]<=0&&delete this._downPointerIds[i],this._downCount<0?this._downCount=0:0==this._downCount&&(r&&(this._enterCount>0||-1===this._enterCount)&&this.onPointerClickObservable.notifyObservers(new pt(e,o),-1,t,this),this.onPointerUpObservable.notifyObservers(new pt(e,o),-1,t,this),this.pointerUpAnimation&&this.pointerUpAnimation())},t.prototype.forcePointerUp=function(t){if(void 0===t&&(t=null),null!==t)this._onPointerUp(this,d.Vector3.Zero(),t,0,!0);else{for(var e in this._downPointerIds)this._onPointerUp(this,d.Vector3.Zero(),+e,0,!0);this._downCount>0&&(this._downCount=1,this._onPointerUp(this,d.Vector3.Zero(),0,0,!0))}},t.prototype._processObservables=function(t,e,i,o,r){if(this._isTouchButton3D(this)&&i&&(t=this._generatePointerEventType(t,i,this._downCount)),t===d.PointerEventTypes.POINTERMOVE){this._onPointerMove(this,e);var n=this._host._lastControlOver[o];return n&&n!==this&&n._onPointerOut(this),n!==this&&this._onPointerEnter(this),this._host._lastControlOver[o]=this,!0}return t===d.PointerEventTypes.POINTERDOWN?(this._onPointerDown(this,e,o,r),this._host._lastControlDown[o]=this,this._host._lastPickedControl=this,!0):(t===d.PointerEventTypes.POINTERUP||t===d.PointerEventTypes.POINTERDOUBLETAP)&&(this._host._lastControlDown[o]&&this._host._lastControlDown[o]._onPointerUp(this,e,o,r,!0),delete this._host._lastControlDown[o],!0)},t.prototype._disposeNode=function(){this._node&&(this._node.dispose(),this._node=null)},t.prototype.dispose=function(){this.onPointerDownObservable.clear(),this.onPointerEnterObservable.clear(),this.onPointerMoveObservable.clear(),this.onPointerOutObservable.clear(),this.onPointerUpObservable.clear(),this.onPointerClickObservable.clear(),this._disposeNode();for(var t=0,e=this._behaviors;ti));p++);else for(p=0;pi));f++);u=0;for(var g=0,b=this._children;g0,r.BORDER=this.renderBorders,r.HOVERLIGHT=this.renderHoverLight,this._albedoTexture){if(!this._albedoTexture.isReadyOrNotBlocking())return!1;r.TEXTURE=!0}else r.TEXTURE=!1;var n=o.getEngine();if(r.isDirty){r.markAsProcessed(),o.resetCachedMaterial();var a=[d.VertexBuffer.PositionKind];a.push(d.VertexBuffer.NormalKind),a.push(d.VertexBuffer.UVKind);var s=["world","viewProjection","innerGlowColor","albedoColor","borderWidth","edgeSmoothingValue","scaleFactor","borderMinValue","hoverColor","hoverPosition","hoverRadius","textureMatrix"],l=["albedoSampler"],_=[];(0,d.PrepareUniformsAndSamplersList)({uniformsNames:s,uniformBuffersNames:_,samplers:l,defines:r,maxSimultaneousLights:4});var h=r.toString();e.setEffect(o.getEngine().createEffect("fluent",{attributes:a,uniformsNames:s,uniformBuffersNames:_,samplers:l,defines:h,fallbacks:null,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),r,this._materialContext)}return!(!e.effect||!e.effect.isReady()||(r._renderId=o.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){var o=this.getScene(),r=i.materialDefines;if(r){var n=i.effect;if(n){if(this._activeEffect=n,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",o.getTransformMatrix()),this._mustRebind(o,n,i)&&(this._activeEffect.setColor4("albedoColor",this.albedoColor,this.alpha),r.INNERGLOW&&this._activeEffect.setColor4("innerGlowColor",this.innerGlowColor,this.innerGlowColorIntensity),r.BORDER&&(this._activeEffect.setFloat("borderWidth",this.borderWidth),this._activeEffect.setFloat("edgeSmoothingValue",this.edgeSmoothingValue),this._activeEffect.setFloat("borderMinValue",this.borderMinValue),e.getBoundingInfo().boundingBox.extendSize.multiplyToRef(e.scaling,d.TmpVectors.Vector3[0]),this._activeEffect.setVector3("scaleFactor",d.TmpVectors.Vector3[0])),r.HOVERLIGHT&&(this._activeEffect.setDirectColor4("hoverColor",this.hoverColor),this._activeEffect.setFloat("hoverRadius",this.hoverRadius),this._activeEffect.setVector3("hoverPosition",this.hoverPosition)),r.TEXTURE&&this._albedoTexture)){this._activeEffect.setTexture("albedoSampler",this._albedoTexture);var a=this._albedoTexture.getTextureMatrix();this._activeEffect.setMatrix("textureMatrix",a)}this._afterBind(e,this._activeEffect,i)}}},e.prototype.getActiveTextures=function(){return t.prototype.getActiveTextures.call(this)},e.prototype.hasTexture=function(e){return!!t.prototype.hasTexture.call(this,e)},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e)},e.prototype.clone=function(t){var i=this;return d.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var e=t.prototype.serialize.call(this);return e.customType="BABYLON.GUI.FluentMaterial",e},e.prototype.getClassName=function(){return"FluentMaterial"},e.Parse=function(t,i,o){return d.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},h([(0,d.serialize)(),(0,d.expandToProperty)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"innerGlowColorIntensity",void 0),h([(0,d.serializeAsColor3)()],e.prototype,"innerGlowColor",void 0),h([(0,d.serializeAsColor3)()],e.prototype,"albedoColor",void 0),h([(0,d.serialize)(),(0,d.expandToProperty)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"renderBorders",void 0),h([(0,d.serialize)()],e.prototype,"borderWidth",void 0),h([(0,d.serialize)()],e.prototype,"edgeSmoothingValue",void 0),h([(0,d.serialize)()],e.prototype,"borderMinValue",void 0),h([(0,d.serialize)(),(0,d.expandToProperty)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"renderHoverLight",void 0),h([(0,d.serialize)()],e.prototype,"hoverRadius",void 0),h([(0,d.serializeAsColor4)()],e.prototype,"hoverColor",void 0),h([(0,d.serializeAsVector3)()],e.prototype,"hoverPosition",void 0),h([(0,d.serializeAsTexture)("albedoTexture")],e.prototype,"_albedoTexture",void 0),h([(0,d.expandToProperty)("_markAllSubMeshesAsTexturesAndMiscDirty")],e.prototype,"albedoTexture",void 0),e}(d.PushMaterial);(0,d.RegisterClass)("BABYLON.GUI.FluentMaterial",Bt);var Ct=function(t){function e(e){var i=t.call(this,e)||this;return i._backPlateMargin=1.25,i}return l(e,t),Object.defineProperty(e.prototype,"backPlateMargin",{get:function(){return this._backPlateMargin},set:function(t){var e=this;this._backPlateMargin=t,this._children.length>=1&&(this.children.forEach((function(t){e._updateCurrentMinMax(t.position)})),this._updateMargins())},enumerable:!1,configurable:!0}),e.prototype._createNode=function(t){var e=new d.Mesh("menu_".concat(this.name),t);return this._backPlate=(0,d.CreateBox)("backPlate"+this.name,{size:1},t),this._backPlate.parent=e,e},e.prototype._affectMaterial=function(t){var e=this;this._backPlateMaterial=new Bt(this.name+"backPlateMaterial",t.getScene()),this._backPlateMaterial.albedoColor=new d.Color3(.08,.15,.55),this._backPlateMaterial.renderBorders=!0,this._backPlateMaterial.renderHoverLight=!0,this._pickedPointObserver=this._host.onPickedPointChangedObservable.add((function(t){t?(e._backPlateMaterial.hoverPosition=t,e._backPlateMaterial.hoverColor.a=1):e._backPlateMaterial.hoverColor.a=0})),this._backPlate.material=this._backPlateMaterial},e.prototype._mapGridNode=function(t,e){t.mesh&&(t.position=e.clone(),this._updateCurrentMinMax(e))},e.prototype._finalProcessing=function(){this._updateMargins()},e.prototype._updateCurrentMinMax=function(t){this._currentMin||(this._currentMin=t.clone(),this._currentMax=t.clone()),this._currentMin.minimizeInPlace(t),this._currentMax.maximizeInPlace(t)},e.prototype._updateMargins=function(){if(this._children.length>0){this._currentMin.addInPlaceFromFloats(-this._cellWidth/2,-this._cellHeight/2,0),this._currentMax.addInPlaceFromFloats(this._cellWidth/2,this._cellHeight/2,0);var t=this._currentMax.subtract(this._currentMin);this._backPlate.scaling.x=t.x+this._cellWidth*this.backPlateMargin,this._backPlate.scaling.y=t.y+this._cellHeight*this.backPlateMargin,this._backPlate.scaling.z=.001;for(var e=0;e0.0 ? g : 1.0;Gradient2=Position_Object.z>0.0 ? 1.0 : g;} else {Gradient1=g+(1.0-g)*(Radial_Gradient);Gradient2=1.0;}}\nvoid Pick_Radius_B144(\nfloat Radius,\nfloat Radius_Top_Left,\nfloat Radius_Top_Right,\nfloat Radius_Bottom_Left,\nfloat Radius_Bottom_Right,\nvec3 Position,\nout float Result)\n{bool whichY=Position.y>0.0;Result=Position.x<0.0 ? (whichY ? Radius_Top_Left : Radius_Bottom_Left) : (whichY ? Radius_Top_Right : Radius_Bottom_Right);Result*=Radius;}\nvoid main()\n{vec3 Nrm_World_Q128;Nrm_World_Q128=normalize((world*vec4(normal,0.0)).xyz);vec3 Tangent_World_Q131;vec3 Tangent_World_N_Q131;float Tangent_Length_Q131;Tangent_World_Q131=(world*vec4(vec3(1,0,0),0.0)).xyz;Tangent_Length_Q131=length(Tangent_World_Q131);Tangent_World_N_Q131=Tangent_World_Q131/Tangent_Length_Q131;vec3 Binormal_World_Q132;vec3 Binormal_World_N_Q132;float Binormal_Length_Q132;Object_To_World_Dir_B132(vec3(0,1,0),Binormal_World_Q132,Binormal_World_N_Q132,Binormal_Length_Q132);float Anisotropy_Q133=Tangent_Length_Q131/Binormal_Length_Q132;vec3 Result_Q177;Result_Q177=mix(_Blob_Position_,Global_Left_Index_Tip_Position.xyz,float(_Use_Global_Left_Index_));vec3 Result_Q178;Result_Q178=mix(_Blob_Position_2_,Global_Right_Index_Tip_Position.xyz,float(_Use_Global_Right_Index_));float Result_Q144;Pick_Radius_B144(_Radius_,_Radius_Top_Left_,_Radius_Top_Right_,_Radius_Bottom_Left_,_Radius_Bottom_Right_,position,Result_Q144);vec3 Dir_Q140;PickDir_B140(_Angle_,Tangent_World_N_Q131,Binormal_World_N_Q132,Dir_Q140);float Radius_Q147;float Line_Width_Q147;RelativeOrAbsoluteDetail_B147(Result_Q144,_Line_Width_,_Absolute_Sizes_,Binormal_Length_Q132,Radius_Q147,Line_Width_Q147);vec4 Out_Color_Q145=vec4(Radius_Q147,Line_Width_Q147,0,1);vec3 New_P_Q129;vec2 New_UV_Q129;float Radial_Gradient_Q129;vec3 Radial_Dir_Q129;Move_Verts_B129(Anisotropy_Q133,position,Radius_Q147,New_P_Q129,New_UV_Q129,Radial_Gradient_Q129,Radial_Dir_Q129);vec3 Pos_World_Q115;Object_To_World_Pos_B115(New_P_Q129,Pos_World_Q115);vec4 Blob_Info_Q180;\n#if BLOB_ENABLE\nBlob_Vertex_B180(Pos_World_Q115,Nrm_World_Q128,Tangent_World_N_Q131,Binormal_World_N_Q132,Result_Q177,_Blob_Intensity_,_Blob_Near_Size_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_,_Blob_Fade_,Blob_Info_Q180);\n#else\nBlob_Info_Q180=vec4(0,0,0,0);\n#endif\nvec4 Blob_Info_Q181;\n#if BLOB_ENABLE_2\nBlob_Vertex_B180(Pos_World_Q115,Nrm_World_Q128,Tangent_World_N_Q131,Binormal_World_N_Q132,Result_Q178,_Blob_Intensity_,_Blob_Near_Size_2_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_2_,_Blob_Fade_2_,Blob_Info_Q181);\n#else\nBlob_Info_Q181=vec4(0,0,0,0);\n#endif\nfloat Gradient1_Q130;float Gradient2_Q130;\n#if SMOOTH_EDGES\nEdge_AA_Vertex_B130(Pos_World_Q115,position,normal,cameraPosition,Radial_Gradient_Q129,Radial_Dir_Q129,tangent,Gradient1_Q130,Gradient2_Q130);\n#else\nGradient1_Q130=1.0;Gradient2_Q130=1.0;\n#endif\nvec2 Rect_UV_Q139;vec4 Rect_Parms_Q139;vec2 Scale_XY_Q139;vec2 Line_UV_Q139;Round_Rect_Vertex_B139(New_UV_Q129,Radius_Q147,0.0,Anisotropy_Q133,Gradient1_Q130,Gradient2_Q130,Rect_UV_Q139,Rect_Parms_Q139,Scale_XY_Q139,Line_UV_Q139);vec3 Line_Vertex_Q135;Line_Vertex_B135(Scale_XY_Q139,Line_UV_Q139,0.0,_Rate_,_Highlight_Transform_,Line_Vertex_Q135);vec3 Position=Pos_World_Q115;vec3 Normal=Dir_Q140;vec2 UV=Rect_UV_Q139;vec3 Tangent=Line_Vertex_Q135;vec3 Binormal=Nrm_World_Q128;vec4 Color=Out_Color_Q145;vec4 Extra1=Rect_Parms_Q139;vec4 Extra2=Blob_Info_Q180;vec4 Extra3=Blob_Info_Q181;gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vColor=Color;vExtra1=Extra1;vExtra2=Extra2;vExtra3=Extra3;}";var St=function(t){function e(){var e=t.call(this)||this;return e.BLOB_ENABLE=!0,e.BLOB_ENABLE_2=!0,e.SMOOTH_EDGES=!0,e.IRIDESCENT_MAP_ENABLE=!0,e._needNormals=!0,e.rebuild(),e}return l(e,t),e}(d.MaterialDefines),Ot=function(t){function e(i,o){var r=t.call(this,i,o)||this;return r.radius=.03,r.lineWidth=.01,r.absoluteSizes=!1,r._filterWidth=1,r.baseColor=new d.Color4(.0392157,.0666667,.207843,1),r.lineColor=new d.Color4(.14902,.133333,.384314,1),r.blobIntensity=.98,r.blobFarSize=.04,r.blobNearDistance=0,r.blobFarDistance=.08,r.blobFadeLength=.08,r.blobNearSize=.22,r.blobPulse=0,r.blobFade=0,r.blobNearSize2=.22,r.blobPulse2=0,r.blobFade2=0,r._rate=.135,r.highlightColor=new d.Color4(.98,.98,.98,1),r.highlightWidth=.25,r._highlightTransform=new d.Vector4(1,1,0,0),r._highlight=1,r.iridescenceIntensity=0,r.iridescenceEdgeIntensity=1,r._angle=-45,r.fadeOut=1,r._reflected=!0,r._frequency=1,r._verticalOffset=0,r.globalLeftIndexTipPosition=d.Vector3.Zero(),r._globalLeftIndexTipPosition4=d.Vector4.Zero(),r.globalRightIndexTipPosition=d.Vector3.Zero(),r._globalRightIndexTipPosition4=d.Vector4.Zero(),r.alphaMode=d.Constants.ALPHA_DISABLE,r.backFaceCulling=!1,r._blobTexture=new d.Texture(e.BLOB_TEXTURE_URL,r.getScene(),!0,!1,d.Texture.NEAREST_SAMPLINGMODE),r._iridescentMap=new d.Texture(e.IM_TEXTURE_URL,r.getScene(),!0,!1,d.Texture.NEAREST_SAMPLINGMODE),r}return l(e,t),e.prototype.needAlphaBlending=function(){return!1},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new St);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,d.PrepareDefinesForAttributes)(t,o,!1,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new d.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,d.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[d.VertexBuffer.PositionKind];o.NORMAL&&s.push(d.VertexBuffer.NormalKind),o.UV1&&s.push(d.VertexBuffer.UVKind),o.UV2&&s.push(d.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(d.VertexBuffer.ColorKind),o.TANGENT&&s.push(d.VertexBuffer.TangentKind),(0,d.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","viewProjection","cameraPosition","_Radius_","_Line_Width_","_Absolute_Sizes_","_Filter_Width_","_Base_Color_","_Line_Color_","_Radius_Top_Left_","_Radius_Top_Right_","_Radius_Bottom_Left_","_Radius_Bottom_Right_","_Blob_Position_","_Blob_Intensity_","_Blob_Near_Size_","_Blob_Far_Size_","_Blob_Near_Distance_","_Blob_Far_Distance_","_Blob_Fade_Length_","_Blob_Pulse_","_Blob_Fade_","_Blob_Texture_","_Blob_Position_2_","_Blob_Near_Size_2_","_Blob_Pulse_2_","_Blob_Fade_2_","_Rate_","_Highlight_Color_","_Highlight_Width_","_Highlight_Transform_","_Highlight_","_Iridescence_Intensity_","_Iridescence_Edge_Intensity_","_Angle_","_Fade_Out_","_Reflected_","_Frequency_","_Vertical_Offset_","_Iridescent_Map_","_Use_Global_Left_Index_","_Use_Global_Right_Index_","Global_Left_Index_Tip_Position","Global_Right_Index_Tip_Position"],h=["_Blob_Texture_","_Iridescent_Map_"],c=[];(0,d.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("fluentBackplate",{attributes:s,uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o,this._materialContext)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){var o,r;if(i.materialDefines){var n=i.effect;n&&(this._activeEffect=n,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",this.getScene().getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",null!==(r=null===(o=this.getScene().activeCamera)||void 0===o?void 0:o.position)&&void 0!==r?r:d.Vector3.ZeroReadOnly),this._activeEffect.setFloat("_Radius_",this.radius),this._activeEffect.setFloat("_Line_Width_",this.lineWidth),this._activeEffect.setFloat("_Absolute_Sizes_",this.absoluteSizes?1:0),this._activeEffect.setFloat("_Filter_Width_",this._filterWidth),this._activeEffect.setDirectColor4("_Base_Color_",this.baseColor),this._activeEffect.setDirectColor4("_Line_Color_",this.lineColor),this._activeEffect.setFloat("_Radius_Top_Left_",1),this._activeEffect.setFloat("_Radius_Top_Right_",1),this._activeEffect.setFloat("_Radius_Bottom_Left_",1),this._activeEffect.setFloat("_Radius_Bottom_Right_",1),this._activeEffect.setFloat("_Blob_Intensity_",this.blobIntensity),this._activeEffect.setFloat("_Blob_Near_Size_",this.blobNearSize),this._activeEffect.setFloat("_Blob_Far_Size_",this.blobFarSize),this._activeEffect.setFloat("_Blob_Near_Distance_",this.blobNearDistance),this._activeEffect.setFloat("_Blob_Far_Distance_",this.blobFarDistance),this._activeEffect.setFloat("_Blob_Fade_Length_",this.blobFadeLength),this._activeEffect.setFloat("_Blob_Pulse_",this.blobPulse),this._activeEffect.setFloat("_Blob_Fade_",this.blobFade),this._activeEffect.setTexture("_Blob_Texture_",this._blobTexture),this._activeEffect.setFloat("_Blob_Near_Size_2_",this.blobNearSize2),this._activeEffect.setFloat("_Blob_Pulse_2_",this.blobPulse2),this._activeEffect.setFloat("_Blob_Fade_2_",this.blobFade2),this._activeEffect.setFloat("_Rate_",this._rate),this._activeEffect.setDirectColor4("_Highlight_Color_",this.highlightColor),this._activeEffect.setFloat("_Highlight_Width_",this.highlightWidth),this._activeEffect.setVector4("_Highlight_Transform_",this._highlightTransform),this._activeEffect.setFloat("_Highlight_",this._highlight),this._activeEffect.setFloat("_Iridescence_Intensity_",this.iridescenceIntensity),this._activeEffect.setFloat("_Iridescence_Edge_Intensity_",this.iridescenceEdgeIntensity),this._activeEffect.setFloat("_Angle_",this._angle),this._activeEffect.setFloat("_Fade_Out_",this.fadeOut),this._activeEffect.setFloat("_Reflected_",this._reflected?1:0),this._activeEffect.setFloat("_Frequency_",this._frequency),this._activeEffect.setFloat("_Vertical_Offset_",this._verticalOffset),this._activeEffect.setTexture("_Iridescent_Map_",this._iridescentMap),this._activeEffect.setFloat("_Use_Global_Left_Index_",1),this._activeEffect.setFloat("_Use_Global_Right_Index_",1),this._globalLeftIndexTipPosition4.set(this.globalLeftIndexTipPosition.x,this.globalLeftIndexTipPosition.y,this.globalLeftIndexTipPosition.z,1),this._activeEffect.setVector4("Global_Left_Index_Tip_Position",this._globalLeftIndexTipPosition4),this._globalRightIndexTipPosition4.set(this.globalRightIndexTipPosition.x,this.globalRightIndexTipPosition.y,this.globalRightIndexTipPosition.z,1),this._activeEffect.setVector4("Global_Right_Index_Tip_Position",this._globalRightIndexTipPosition4),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),this._blobTexture.dispose(),this._iridescentMap.dispose()},e.prototype.clone=function(t){var i=this;return d.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var e=t.prototype.serialize.call(this);return e.customType="BABYLON.FluentBackplateMaterial",e},e.prototype.getClassName=function(){return"FluentBackplateMaterial"},e.Parse=function(t,i,o){return d.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},e.BLOB_TEXTURE_URL="https://assets.babylonjs.com/meshes/MRTK/mrtk-fluent-backplate-blob.png",e.IM_TEXTURE_URL="https://assets.babylonjs.com/meshes/MRTK/mrtk-fluent-backplate-iridescence.png",h([(0,d.serialize)()],e.prototype,"radius",void 0),h([(0,d.serialize)()],e.prototype,"lineWidth",void 0),h([(0,d.serialize)()],e.prototype,"absoluteSizes",void 0),h([(0,d.serialize)()],e.prototype,"baseColor",void 0),h([(0,d.serialize)()],e.prototype,"lineColor",void 0),h([(0,d.serialize)()],e.prototype,"blobIntensity",void 0),h([(0,d.serialize)()],e.prototype,"blobFarSize",void 0),h([(0,d.serialize)()],e.prototype,"blobNearDistance",void 0),h([(0,d.serialize)()],e.prototype,"blobFarDistance",void 0),h([(0,d.serialize)()],e.prototype,"blobFadeLength",void 0),h([(0,d.serialize)()],e.prototype,"blobNearSize",void 0),h([(0,d.serialize)()],e.prototype,"blobPulse",void 0),h([(0,d.serialize)()],e.prototype,"blobFade",void 0),h([(0,d.serialize)()],e.prototype,"blobNearSize2",void 0),h([(0,d.serialize)()],e.prototype,"blobPulse2",void 0),h([(0,d.serialize)()],e.prototype,"blobFade2",void 0),h([(0,d.serialize)()],e.prototype,"highlightColor",void 0),h([(0,d.serialize)()],e.prototype,"highlightWidth",void 0),h([(0,d.serialize)()],e.prototype,"iridescenceIntensity",void 0),h([(0,d.serialize)()],e.prototype,"iridescenceEdgeIntensity",void 0),h([(0,d.serialize)()],e.prototype,"fadeOut",void 0),h([(0,d.serializeAsVector3)()],e.prototype,"globalLeftIndexTipPosition",void 0),h([(0,d.serializeAsVector3)()],e.prototype,"globalRightIndexTipPosition",void 0),e}(d.PushMaterial);(0,d.RegisterClass)("BABYLON.GUI.FluentBackplateMaterial",Ot);var Rt=function(t){function e(e,i){void 0===i&&(i=!0);var o=t.call(this,e)||this;return o._shareMaterials=i,o}return l(e,t),Object.defineProperty(e.prototype,"renderingGroupId",{get:function(){return this._model.renderingGroupId},set:function(t){this._model.renderingGroupId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"material",{get:function(){return this._material},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shareMaterials",{get:function(){return this._shareMaterials},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"HolographicBackplate"},e.prototype._createNode=function(t){var i,o=this,r=(0,d.CreateBox)((null!==(i=this.name)&&void 0!==i?i:"HolographicBackplate")+"_CollisionMesh",{width:1,height:1,depth:1},t);return r.isPickable=!0,r.visibility=0,d.SceneLoader.ImportMeshAsync(void 0,e.MODEL_BASE_URL,e.MODEL_FILENAME,t).then((function(t){var e=t.meshes[1];e.name="".concat(o.name,"_frontPlate"),e.isPickable=!1,e.parent=r,o._material&&(e.material=o._material),o._model=e})),r},e.prototype._createMaterial=function(t){this._material=new Ot(this.name+" Material",t.getScene())},e.prototype._affectMaterial=function(t){this._shareMaterials?this._host._touchSharedMaterials.fluentBackplateMaterial?this._material=this._host._touchSharedMaterials.fluentBackplateMaterial:(this._createMaterial(t),this._host._touchSharedMaterials.fluentBackplateMaterial=this._material):this._createMaterial(t)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.shareMaterials||this._material.dispose(),this._model.dispose()},e.MODEL_BASE_URL="https://assets.babylonjs.com/meshes/MRTK/",e.MODEL_FILENAME="mrtk-fluent-backplate.glb",e}(gt),wt=function(t){function e(e,i){void 0===i&&(i=!0);var o=t.call(this,e)||this;return o._shareMaterials=!0,o._shareMaterials=i,o.pointerEnterAnimation=function(){o.mesh&&o._frontPlate.setEnabled(!0)},o.pointerOutAnimation=function(){o.mesh&&o._frontPlate.setEnabled(!1)},o}return l(e,t),e.prototype._disposeTooltip=function(){this._tooltipFade=null,this._tooltipTextBlock&&this._tooltipTextBlock.dispose(),this._tooltipTexture&&this._tooltipTexture.dispose(),this._tooltipMesh&&this._tooltipMesh.dispose(),this.onPointerEnterObservable.remove(this._tooltipHoverObserver),this.onPointerOutObservable.remove(this._tooltipOutObserver)},Object.defineProperty(e.prototype,"renderingGroupId",{get:function(){return this._backPlate.renderingGroupId},set:function(t){this._backPlate.renderingGroupId=t,this._textPlate.renderingGroupId=t,this._frontPlate.renderingGroupId=t,this._tooltipMesh&&(this._tooltipMesh.renderingGroupId=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tooltipText",{get:function(){return this._tooltipTextBlock?this._tooltipTextBlock.text:null},set:function(t){var e=this;if(t){if(!this._tooltipFade){var i=this._backPlate._scene.useRightHandedSystem;this._tooltipMesh=(0,d.CreatePlane)("",{size:1},this._backPlate._scene);var o=(0,d.CreatePlane)("",{size:1,sideOrientation:d.Mesh.DOUBLESIDE},this._backPlate._scene),r=new d.StandardMaterial("",this._backPlate._scene);r.diffuseColor=d.Color3.FromHexString("#212121"),o.material=r,o.isPickable=!1,this._tooltipMesh.addChild(o),o.position=d.Vector3.Forward(i).scale(.05),this._tooltipMesh.scaling.y=1/3,this._tooltipMesh.position=d.Vector3.Up().scale(.7).add(d.Vector3.Forward(i).scale(-.15)),this._tooltipMesh.isPickable=!1,this._tooltipMesh.parent=this._backPlate,this._tooltipTexture=ct.CreateForMesh(this._tooltipMesh),this._tooltipTextBlock=new S,this._tooltipTextBlock.scaleY=3,this._tooltipTextBlock.color="white",this._tooltipTextBlock.fontSize=130,this._tooltipTexture.addControl(this._tooltipTextBlock),this._tooltipFade=new d.FadeInOutBehavior,this._tooltipFade.delay=500,this._tooltipMesh.addBehavior(this._tooltipFade),this._tooltipHoverObserver=this.onPointerEnterObservable.add((function(){e._tooltipFade&&e._tooltipFade.fadeIn(!0)})),this._tooltipOutObserver=this.onPointerOutObservable.add((function(){e._tooltipFade&&e._tooltipFade.fadeIn(!1)}))}this._tooltipTextBlock&&(this._tooltipTextBlock.text=t)}else this._disposeTooltip()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){this._text!==t&&(this._text=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageUrl",{get:function(){return this._imageUrl},set:function(t){this._imageUrl!==t&&(this._imageUrl=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backMaterial",{get:function(){return this._backMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frontMaterial",{get:function(){return this._frontMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"plateMaterial",{get:function(){return this._plateMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shareMaterials",{get:function(){return this._shareMaterials},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"HolographicButton"},e.prototype._rebuildContent=function(){this._disposeFacadeTexture();var t=new w;if(t.isVertical=!0,(0,d.IsDocumentAvailable)()&&document.createElement&&this._imageUrl){var e=new O;e.source=this._imageUrl,e.paddingTop="40px",e.height="180px",e.width="100px",e.paddingBottom="40px",t.addControl(e)}if(this._text){var i=new S;i.text=this._text,i.color="white",i.height="30px",i.fontSize=24,t.addControl(i)}this._frontPlate&&(this.content=t)},e.prototype._createNode=function(e){return this._backPlate=(0,d.CreateBox)(this.name+"BackMesh",{width:1,height:1,depth:.08},e),this._frontPlate=(0,d.CreateBox)(this.name+"FrontMesh",{width:1,height:1,depth:.08},e),this._frontPlate.parent=this._backPlate,this._frontPlate.position=d.Vector3.Forward(e.useRightHandedSystem).scale(-.08),this._frontPlate.isPickable=!1,this._frontPlate.setEnabled(!1),this._textPlate=t.prototype._createNode.call(this,e),this._textPlate.parent=this._backPlate,this._textPlate.position=d.Vector3.Forward(e.useRightHandedSystem).scale(-.08),this._textPlate.isPickable=!1,this._backPlate},e.prototype._applyFacade=function(t){this._plateMaterial.emissiveTexture=t,this._plateMaterial.opacityTexture=t},e.prototype._createBackMaterial=function(t){var e=this;this._backMaterial=new Bt(this.name+"Back Material",t.getScene()),this._backMaterial.renderHoverLight=!0,this._pickedPointObserver=this._host.onPickedPointChangedObservable.add((function(t){t?(e._backMaterial.hoverPosition=t,e._backMaterial.hoverColor.a=1):e._backMaterial.hoverColor.a=0}))},e.prototype._createFrontMaterial=function(t){this._frontMaterial=new Bt(this.name+"Front Material",t.getScene()),this._frontMaterial.innerGlowColorIntensity=0,this._frontMaterial.alpha=.5,this._frontMaterial.renderBorders=!0},e.prototype._createPlateMaterial=function(t){this._plateMaterial=new d.StandardMaterial(this.name+"Plate Material",t.getScene()),this._plateMaterial.specularColor=d.Color3.Black()},e.prototype._affectMaterial=function(t){this._shareMaterials?(this._host._sharedMaterials.backFluentMaterial?this._backMaterial=this._host._sharedMaterials.backFluentMaterial:(this._createBackMaterial(t),this._host._sharedMaterials.backFluentMaterial=this._backMaterial),this._host._sharedMaterials.frontFluentMaterial?this._frontMaterial=this._host._sharedMaterials.frontFluentMaterial:(this._createFrontMaterial(t),this._host._sharedMaterials.frontFluentMaterial=this._frontMaterial)):(this._createBackMaterial(t),this._createFrontMaterial(t)),this._createPlateMaterial(t),this._backPlate.material=this._backMaterial,this._frontPlate.material=this._frontMaterial,this._textPlate.material=this._plateMaterial,this._rebuildContent()},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._disposeTooltip(),this.shareMaterials||(this._backMaterial.dispose(),this._frontMaterial.dispose(),this._plateMaterial.dispose(),this._pickedPointObserver&&(this._host.onPickedPointChangedObservable.remove(this._pickedPointObserver),this._pickedPointObserver=null))},e}(vt);d.ShaderStore.ShadersStore.fluentButtonPixelShader="uniform vec3 cameraPosition;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vColor;varying vec4 vExtra1;uniform float _Edge_Width_;uniform vec4 _Edge_Color_;uniform bool _Relative_Width_;uniform float _Proximity_Max_Intensity_;uniform float _Proximity_Far_Distance_;uniform float _Proximity_Near_Radius_;uniform float _Proximity_Anisotropy_;uniform float _Selection_Fuzz_;uniform float _Selected_;uniform float _Selection_Fade_;uniform float _Selection_Fade_Size_;uniform float _Selected_Distance_;uniform float _Selected_Fade_Length_;uniform bool _Blob_Enable_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Inner_Fade_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform sampler2D _Blob_Texture_;uniform bool _Blob_Enable_2_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Inner_Fade_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform vec3 _Active_Face_Dir_;uniform vec3 _Active_Face_Up_;uniform bool Enable_Fade;uniform float _Fade_Width_;uniform bool _Smooth_Active_Face_;uniform bool _Show_Frame_;uniform bool _Use_Blob_Texture_;uniform bool Use_Global_Left_Index;uniform bool Use_Global_Right_Index;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;uniform vec4 Global_Left_Thumb_Tip_Position;uniform vec4 Global_Right_Thumb_Tip_Position;uniform float Global_Left_Index_Tip_Proximity;uniform float Global_Right_Index_Tip_Proximity;void Holo_Edge_Fragment_B35(\nvec4 Edges,\nfloat Edge_Width,\nout float NotEdge)\n{vec2 c=vec2(min(Edges.r,Edges.g),min(Edges.b,Edges.a));vec2 df=fwidth(c)*Edge_Width;vec2 g=clamp(c/df,0.0,1.0);NotEdge=g.x*g.y;}\nvoid Blob_Fragment_B39(\nvec2 UV,\nvec3 Blob_Info,\nsampler2D Blob_Texture,\nout vec4 Blob_Color)\n{float k=dot(UV,UV);Blob_Color=Blob_Info.y*texture(Blob_Texture,vec2(vec2(sqrt(k),Blob_Info.x).x,1.0-vec2(sqrt(k),Blob_Info.x).y))*(1.0-clamp(k,0.0,1.0));}\nvec2 FilterStep(vec2 Edge,vec2 X)\n{vec2 dX=max(fwidth(X),vec2(0.00001,0.00001));return clamp( (X+dX-max(Edge,X-dX))/(dX*2.0),0.0,1.0);}\nvoid Wireframe_Fragment_B59(\nvec3 Widths,\nvec2 UV,\nfloat Proximity,\nvec4 Edge_Color,\nout vec4 Wireframe)\n{vec2 c=min(UV,vec2(1.0,1.0)-UV);vec2 g=FilterStep(Widths.xy*0.5,c); \nWireframe=(1.0-min(g.x,g.y))*Proximity*Edge_Color;}\nvoid Proximity_B53(\nvec3 Proximity_Center,\nvec3 Proximity_Center_2,\nfloat Proximity_Max_Intensity,\nfloat Proximity_Near_Radius,\nvec3 Position,\nvec3 Show_Selection,\nvec4 Extra1,\nfloat Dist_To_Face,\nfloat Intensity,\nout float Proximity)\n{vec2 delta1=Extra1.xy;vec2 delta2=Extra1.zw;float d2=sqrt(min(dot(delta1,delta1),dot(delta2,delta2))+Dist_To_Face*Dist_To_Face);Proximity=Intensity*Proximity_Max_Intensity*(1.0-clamp(d2/Proximity_Near_Radius,0.0,1.0))*(1.0-Show_Selection.x)+Show_Selection.x;}\nvoid To_XYZ_B46(\nvec3 Vec3,\nout float X,\nout float Y,\nout float Z)\n{X=Vec3.x;Y=Vec3.y;Z=Vec3.z;}\nvoid main()\n{float NotEdge_Q35;\n#if ENABLE_FADE\nHolo_Edge_Fragment_B35(vColor,_Fade_Width_,NotEdge_Q35);\n#else\nNotEdge_Q35=1.0;\n#endif\nvec4 Blob_Color_Q39;float k=dot(vUV,vUV);vec2 blobTextureCoord=vec2(vec2(sqrt(k),vTangent.x).x,1.0-vec2(sqrt(k),vTangent.x).y);vec4 blobColor=mix(vec4(1.0,1.0,1.0,1.0)*step(1.0-vTangent.x,clamp(sqrt(k)+0.1,0.0,1.0)),texture(_Blob_Texture_,blobTextureCoord),float(_Use_Blob_Texture_));Blob_Color_Q39=vTangent.y*blobColor*(1.0-clamp(k,0.0,1.0));float Is_Quad_Q24;Is_Quad_Q24=vNormal.z;vec3 Blob_Position_Q41= mix(_Blob_Position_,Global_Left_Index_Tip_Position.xyz,float(Use_Global_Left_Index));vec3 Blob_Position_Q42= mix(_Blob_Position_2_,Global_Right_Index_Tip_Position.xyz,float(Use_Global_Right_Index));float X_Q46;float Y_Q46;float Z_Q46;To_XYZ_B46(vBinormal,X_Q46,Y_Q46,Z_Q46);float Proximity_Q53;Proximity_B53(Blob_Position_Q41,Blob_Position_Q42,_Proximity_Max_Intensity_,_Proximity_Near_Radius_,vPosition,vBinormal,vExtra1,Y_Q46,Z_Q46,Proximity_Q53);vec4 Wireframe_Q59;Wireframe_Fragment_B59(vNormal,vUV,Proximity_Q53,_Edge_Color_,Wireframe_Q59);vec4 Wire_Or_Blob_Q23=mix(Wireframe_Q59,Blob_Color_Q39,Is_Quad_Q24);vec4 Result_Q22;Result_Q22=mix(Wire_Or_Blob_Q23,vec4(0.3,0.3,0.3,0.3),float(_Show_Frame_));vec4 Final_Color_Q37=NotEdge_Q35*Result_Q22;vec4 Out_Color=Final_Color_Q37;float Clip_Threshold=0.0;bool To_sRGB=false;gl_FragColor=Out_Color;}";d.ShaderStore.ShadersStore.fluentButtonVertexShader="uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;attribute vec3 tangent;attribute vec4 color;uniform float _Edge_Width_;uniform vec4 _Edge_Color_;uniform float _Proximity_Max_Intensity_;uniform float _Proximity_Far_Distance_;uniform float _Proximity_Near_Radius_;uniform float _Proximity_Anisotropy_;uniform float _Selection_Fuzz_;uniform float _Selected_;uniform float _Selection_Fade_;uniform float _Selection_Fade_Size_;uniform float _Selected_Distance_;uniform float _Selected_Fade_Length_;uniform bool _Blob_Enable_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Inner_Fade_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform sampler2D _Blob_Texture_;uniform bool _Blob_Enable_2_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Inner_Fade_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform vec3 _Active_Face_Dir_;uniform vec3 _Active_Face_Up_;uniform bool _Enable_Fade_;uniform float _Fade_Width_;uniform bool _Smooth_Active_Face_;uniform bool _Show_Frame_;uniform bool Use_Global_Left_Index;uniform bool Use_Global_Right_Index;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;uniform vec4 Global_Left_Thumb_Tip_Position;uniform vec4 Global_Right_Thumb_Tip_Position;uniform float Global_Left_Index_Tip_Proximity;uniform float Global_Right_Index_Tip_Proximity;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vColor;varying vec4 vExtra1;void Blob_Vertex_B47(\nvec3 Position,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nvec3 Blob_Position,\nfloat Intensity,\nfloat Blob_Near_Size,\nfloat Blob_Far_Size,\nfloat Blob_Near_Distance,\nfloat Blob_Far_Distance,\nvec4 Vx_Color,\nvec2 UV,\nvec3 Face_Center,\nvec2 Face_Size,\nvec2 In_UV,\nfloat Blob_Fade_Length,\nfloat Selection_Fade,\nfloat Selection_Fade_Size,\nfloat Inner_Fade,\nvec3 Active_Face_Center,\nfloat Blob_Pulse,\nfloat Blob_Fade,\nfloat Blob_Enabled,\nout vec3 Out_Position,\nout vec2 Out_UV,\nout vec3 Blob_Info)\n{float blobSize,fadeIn;vec3 Hit_Position;Blob_Info=vec3(0.0,0.0,0.0);float Hit_Distance=dot(Blob_Position-Face_Center,Normal);Hit_Position=Blob_Position-Hit_Distance*Normal;float absD=abs(Hit_Distance);float lerpVal=clamp((absD-Blob_Near_Distance)/(Blob_Far_Distance-Blob_Near_Distance),0.0,1.0);fadeIn=1.0-clamp((absD-Blob_Far_Distance)/Blob_Fade_Length,0.0,1.0);float innerFade=1.0-clamp(-Hit_Distance/Inner_Fade,0.0,1.0);float farClip=clamp(1.0-step(Blob_Far_Distance+Blob_Fade_Length,absD),0.0,1.0);float size=mix(Blob_Near_Size,Blob_Far_Size,lerpVal)*farClip;blobSize=mix(size,Selection_Fade_Size,Selection_Fade)*innerFade*Blob_Enabled;Blob_Info.x=lerpVal*0.5+0.5;Blob_Info.y=fadeIn*Intensity*(1.0-Selection_Fade)*Blob_Fade;Blob_Info.x*=(1.0-Blob_Pulse);vec3 delta=Hit_Position-Face_Center;vec2 blobCenterXY=vec2(dot(delta,Tangent),dot(delta,Bitangent));vec2 quadUVin=2.0*UV-1.0; \nvec2 blobXY=blobCenterXY+quadUVin*blobSize;vec2 blobClipped=clamp(blobXY,-Face_Size*0.5,Face_Size*0.5);vec2 blobUV=(blobClipped-blobCenterXY)/max(blobSize,0.0001)*2.0;vec3 blobCorner=Face_Center+blobClipped.x*Tangent+blobClipped.y*Bitangent;Out_Position=mix(Position,blobCorner,Vx_Color.rrr);Out_UV=mix(In_UV,blobUV,Vx_Color.rr);}\nvec2 ProjectProximity(\nvec3 blobPosition,\nvec3 position,\nvec3 center,\nvec3 dir,\nvec3 xdir,\nvec3 ydir,\nout float vdistance\n)\n{vec3 delta=blobPosition-position;vec2 xy=vec2(dot(delta,xdir),dot(delta,ydir));vdistance=abs(dot(delta,dir));return xy;}\nvoid Proximity_Vertex_B66(\nvec3 Blob_Position,\nvec3 Blob_Position_2,\nvec3 Active_Face_Center,\nvec3 Active_Face_Dir,\nvec3 Position,\nfloat Proximity_Far_Distance,\nfloat Relative_Scale,\nfloat Proximity_Anisotropy,\nvec3 Up,\nout vec4 Extra1,\nout float Distance_To_Face,\nout float Intensity)\n{vec3 Active_Face_Dir_X=normalize(cross(Active_Face_Dir,Up));vec3 Active_Face_Dir_Y=cross(Active_Face_Dir,Active_Face_Dir_X);float distz1,distz2;Extra1.xy=ProjectProximity(Blob_Position,Position,Active_Face_Center,Active_Face_Dir,Active_Face_Dir_X*Proximity_Anisotropy,Active_Face_Dir_Y,distz1)/Relative_Scale;Extra1.zw=ProjectProximity(Blob_Position_2,Position,Active_Face_Center,Active_Face_Dir,Active_Face_Dir_X*Proximity_Anisotropy,Active_Face_Dir_Y,distz2)/Relative_Scale;Distance_To_Face=dot(Active_Face_Dir,Position-Active_Face_Center);Intensity=1.0-clamp(min(distz1,distz2)/Proximity_Far_Distance,0.0,1.0);}\nvoid Holo_Edge_Vertex_B44(\nvec3 Incident,\nvec3 Normal,\nvec2 UV,\nvec3 Tangent,\nvec3 Bitangent,\nbool Smooth_Active_Face,\nfloat Active,\nout vec4 Holo_Edges)\n{float NdotI=dot(Incident,Normal);vec2 flip=(UV-vec2(0.5,0.5));float udot=dot(Incident,Tangent)*flip.x*NdotI;float uval=1.0-float(udot>0.0);float vdot=-dot(Incident,Bitangent)*flip.y*NdotI;float vval=1.0-float(vdot>0.0);float Smooth_And_Active=step(1.0,float(Smooth_Active_Face && Active>0.0));uval=mix(uval,max(1.0,uval),Smooth_And_Active); \nvval=mix(vval,max(1.0,vval),Smooth_And_Active);Holo_Edges=vec4(1.0,1.0,1.0,1.0)-vec4(uval*UV.x,uval*(1.0-UV.x),vval*UV.y,vval*(1.0-UV.y));}\nvoid Object_To_World_Pos_B13(\nvec3 Pos_Object,\nout vec3 Pos_World)\n{Pos_World=(world*vec4(Pos_Object,1.0)).xyz;}\nvoid Choose_Blob_B38(\nvec4 Vx_Color,\nvec3 Position1,\nvec3 Position2,\nbool Blob_Enable_1,\nbool Blob_Enable_2,\nfloat Near_Size_1,\nfloat Near_Size_2,\nfloat Blob_Inner_Fade_1,\nfloat Blob_Inner_Fade_2,\nfloat Blob_Pulse_1,\nfloat Blob_Pulse_2,\nfloat Blob_Fade_1,\nfloat Blob_Fade_2,\nout vec3 Position,\nout float Near_Size,\nout float Inner_Fade,\nout float Blob_Enable,\nout float Fade,\nout float Pulse)\n{Position=Position1*(1.0-Vx_Color.g)+Vx_Color.g*Position2;float b1=float(Blob_Enable_1);float b2=float(Blob_Enable_2);Blob_Enable=b1+(b2-b1)*Vx_Color.g;Pulse=Blob_Pulse_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Pulse_2;Fade=Blob_Fade_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Fade_2;Near_Size=Near_Size_1*(1.0-Vx_Color.g)+Vx_Color.g*Near_Size_2;Inner_Fade=Blob_Inner_Fade_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Inner_Fade_2;}\nvoid Wireframe_Vertex_B51(\nvec3 Position,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nfloat Edge_Width,\nvec2 Face_Size,\nout vec3 Wire_Vx_Pos,\nout vec2 UV,\nout vec2 Widths)\n{Widths.xy=Edge_Width/Face_Size;float x=dot(Position,Tangent);float y=dot(Position,Bitangent);float dx=0.5-abs(x);float newx=(0.5-dx*Widths.x*2.0)*sign(x);float dy=0.5-abs(y);float newy=(0.5-dy*Widths.y*2.0)*sign(y);Wire_Vx_Pos=Normal*0.5+newx*Tangent+newy*Bitangent;UV.x=dot(Wire_Vx_Pos,Tangent)+0.5;UV.y=dot(Wire_Vx_Pos,Bitangent)+0.5;}\nvec2 ramp2(vec2 start,vec2 end,vec2 x)\n{return clamp((x-start)/(end-start),vec2(0.0,0.0),vec2(1.0,1.0));}\nfloat computeSelection(\nvec3 blobPosition,\nvec3 normal,\nvec3 tangent,\nvec3 bitangent,\nvec3 faceCenter,\nvec2 faceSize,\nfloat selectionFuzz,\nfloat farDistance,\nfloat fadeLength\n)\n{vec3 delta=blobPosition-faceCenter;float absD=abs(dot(delta,normal));float fadeIn=1.0-clamp((absD-farDistance)/fadeLength,0.0,1.0);vec2 blobCenterXY=vec2(dot(delta,tangent),dot(delta,bitangent));vec2 innerFace=faceSize*(1.0-selectionFuzz)*0.5;vec2 selectPulse=ramp2(-faceSize*0.5,-innerFace,blobCenterXY)-ramp2(innerFace,faceSize*0.5,blobCenterXY);return selectPulse.x*selectPulse.y*fadeIn;}\nvoid Selection_Vertex_B48(\nvec3 Blob_Position,\nvec3 Blob_Position_2,\nvec3 Face_Center,\nvec2 Face_Size,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nfloat Selection_Fuzz,\nfloat Selected,\nfloat Far_Distance,\nfloat Fade_Length,\nvec3 Active_Face_Dir,\nout float Show_Selection)\n{float select1=computeSelection(Blob_Position,Normal,Tangent,Bitangent,Face_Center,Face_Size,Selection_Fuzz,Far_Distance,Fade_Length);float select2=computeSelection(Blob_Position_2,Normal,Tangent,Bitangent,Face_Center,Face_Size,Selection_Fuzz,Far_Distance,Fade_Length);float Active=max(0.0,dot(Active_Face_Dir,Normal));Show_Selection=mix(max(select1,select2),1.0,Selected)*Active;}\nvoid Proximity_Visibility_B54(\nfloat Selection,\nvec3 Proximity_Center,\nvec3 Proximity_Center_2,\nfloat Input_Width,\nfloat Proximity_Far_Distance,\nfloat Proximity_Radius,\nvec3 Active_Face_Center,\nvec3 Active_Face_Dir,\nout float Width)\n{vec3 boxEdges=(world*vec4(vec3(0.5,0.5,0.5),0.0)).xyz;float boxMaxSize=length(boxEdges);float d1=dot(Proximity_Center-Active_Face_Center,Active_Face_Dir);vec3 blob1=Proximity_Center-d1*Active_Face_Dir;float d2=dot(Proximity_Center_2-Active_Face_Center,Active_Face_Dir);vec3 blob2=Proximity_Center_2-d2*Active_Face_Dir;vec3 delta1=blob1-Active_Face_Center;vec3 delta2=blob2-Active_Face_Center;float dist1=dot(delta1,delta1);float dist2=dot(delta2,delta2);float nearestProxDist=sqrt(min(dist1,dist2));Width=Input_Width*(1.0-step(boxMaxSize+Proximity_Radius,nearestProxDist))*(1.0-step(Proximity_Far_Distance,min(d1,d2))*(1.0-step(0.0001,Selection)));}\nvoid Object_To_World_Dir_B67(\nvec3 Dir_Object,\nout vec3 Dir_World)\n{Dir_World=(world*vec4(Dir_Object,0.0)).xyz;}\nvoid main()\n{vec3 Active_Face_Center_Q49;Active_Face_Center_Q49=(world*vec4(_Active_Face_Dir_*0.5,1.0)).xyz;vec3 Blob_Position_Q41= mix(_Blob_Position_,Global_Left_Index_Tip_Position.xyz,float(Use_Global_Left_Index));vec3 Blob_Position_Q42= mix(_Blob_Position_2_,Global_Right_Index_Tip_Position.xyz,float(Use_Global_Right_Index));vec3 Active_Face_Dir_Q64=normalize((world*vec4(_Active_Face_Dir_,0.0)).xyz);float Relative_Scale_Q57;\n#if RELATIVE_WIDTH\nRelative_Scale_Q57=length((world*vec4(vec3(0,1,0),0.0)).xyz);\n#else\nRelative_Scale_Q57=1.0;\n#endif\nvec3 Tangent_World_Q30;Tangent_World_Q30=(world*vec4(tangent,0.0)).xyz;vec3 Binormal_World_Q31;Binormal_World_Q31=(world*vec4((cross(normal,tangent)),0.0)).xyz;vec3 Normal_World_Q60;Normal_World_Q60=(world*vec4(normal,0.0)).xyz;vec3 Result_Q18=0.5*normal;vec3 Dir_World_Q67;Object_To_World_Dir_B67(_Active_Face_Up_,Dir_World_Q67);float Product_Q56=_Edge_Width_*Relative_Scale_Q57;vec3 Normal_World_N_Q29=normalize(Normal_World_Q60);vec3 Tangent_World_N_Q28=normalize(Tangent_World_Q30);vec3 Binormal_World_N_Q32=normalize(Binormal_World_Q31);vec3 Position_Q38;float Near_Size_Q38;float Inner_Fade_Q38;float Blob_Enable_Q38;float Fade_Q38;float Pulse_Q38;Choose_Blob_B38(color,Blob_Position_Q41,Blob_Position_Q42,_Blob_Enable_,_Blob_Enable_2_,_Blob_Near_Size_,_Blob_Near_Size_2_,_Blob_Inner_Fade_,_Blob_Inner_Fade_2_,_Blob_Pulse_,_Blob_Pulse_2_,_Blob_Fade_,_Blob_Fade_2_,Position_Q38,Near_Size_Q38,Inner_Fade_Q38,Blob_Enable_Q38,Fade_Q38,Pulse_Q38);vec3 Face_Center_Q33;Face_Center_Q33=(world*vec4(Result_Q18,1.0)).xyz;vec2 Face_Size_Q50=vec2(length(Tangent_World_Q30),length(Binormal_World_Q31));float Show_Selection_Q48;Selection_Vertex_B48(Blob_Position_Q41,Blob_Position_Q42,Face_Center_Q33,Face_Size_Q50,Normal_World_N_Q29,Tangent_World_N_Q28,Binormal_World_N_Q32,_Selection_Fuzz_,_Selected_,_Selected_Distance_,_Selected_Fade_Length_,Active_Face_Dir_Q64,Show_Selection_Q48);vec3 Normalized_Q72=normalize(Dir_World_Q67);float Active_Q34=max(0.0,dot(Active_Face_Dir_Q64,Normal_World_N_Q29));float Width_Q54;Proximity_Visibility_B54(Show_Selection_Q48,Blob_Position_Q41,Blob_Position_Q42,Product_Q56,_Proximity_Far_Distance_,_Proximity_Near_Radius_,Active_Face_Center_Q49,Active_Face_Dir_Q64,Width_Q54);vec3 Wire_Vx_Pos_Q51;vec2 UV_Q51;vec2 Widths_Q51;Wireframe_Vertex_B51(position,normal,tangent,(cross(normal,tangent)),Width_Q54,Face_Size_Q50,Wire_Vx_Pos_Q51,UV_Q51,Widths_Q51);vec3 Vec3_Q27=vec3(Widths_Q51.x,Widths_Q51.y,color.r);vec3 Pos_World_Q13;Object_To_World_Pos_B13(Wire_Vx_Pos_Q51,Pos_World_Q13);vec3 Incident_Q36=normalize(Pos_World_Q13-cameraPosition);vec3 Out_Position_Q47;vec2 Out_UV_Q47;vec3 Blob_Info_Q47;Blob_Vertex_B47(Pos_World_Q13,Normal_World_N_Q29,Tangent_World_N_Q28,Binormal_World_N_Q32,Position_Q38,_Blob_Intensity_,Near_Size_Q38,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,color,uv,Face_Center_Q33,Face_Size_Q50,UV_Q51,_Blob_Fade_Length_,_Selection_Fade_,_Selection_Fade_Size_,Inner_Fade_Q38,Active_Face_Center_Q49,Pulse_Q38,Fade_Q38,Blob_Enable_Q38,Out_Position_Q47,Out_UV_Q47,Blob_Info_Q47);vec4 Extra1_Q66;float Distance_To_Face_Q66;float Intensity_Q66;Proximity_Vertex_B66(Blob_Position_Q41,Blob_Position_Q42,Active_Face_Center_Q49,Active_Face_Dir_Q64,Pos_World_Q13,_Proximity_Far_Distance_,Relative_Scale_Q57,_Proximity_Anisotropy_,Normalized_Q72,Extra1_Q66,Distance_To_Face_Q66,Intensity_Q66);vec4 Holo_Edges_Q44;Holo_Edge_Vertex_B44(Incident_Q36,Normal_World_N_Q29,uv,Tangent_World_Q30,Binormal_World_Q31,_Smooth_Active_Face_,Active_Q34,Holo_Edges_Q44);vec3 Vec3_Q19=vec3(Show_Selection_Q48,Distance_To_Face_Q66,Intensity_Q66);vec3 Position=Out_Position_Q47;vec2 UV=Out_UV_Q47;vec3 Tangent=Blob_Info_Q47;vec3 Binormal=Vec3_Q19;vec3 Normal=Vec3_Q27;vec4 Extra1=Extra1_Q66;vec4 Color=Holo_Edges_Q44;gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vColor=Color;vExtra1=Extra1;}";var Mt=function(t){function e(){var e=t.call(this)||this;return e.RELATIVE_WIDTH=!0,e.ENABLE_FADE=!0,e._needNormals=!0,e._needUVs=!0,e.rebuild(),e}return l(e,t),e}(d.MaterialDefines),Et=function(t){function e(i,o){var r=t.call(this,i,o)||this;return r.edgeWidth=.04,r.edgeColor=new d.Color4(.592157,.592157,.592157,1),r.proximityMaxIntensity=.45,r.proximityFarDistance=.16,r.proximityNearRadius=1.5,r.proximityAnisotropy=1,r.selectionFuzz=.5,r.selected=0,r.selectionFade=0,r.selectionFadeSize=.3,r.selectedDistance=.08,r.selectedFadeLength=.08,r.blobIntensity=.5,r.blobFarSize=.05,r.blobNearDistance=0,r.blobFarDistance=.08,r.blobFadeLength=.08,r.leftBlobEnable=!0,r.leftBlobNearSize=.025,r.leftBlobPulse=0,r.leftBlobFade=1,r.leftBlobInnerFade=.01,r.rightBlobEnable=!0,r.rightBlobNearSize=.025,r.rightBlobPulse=0,r.rightBlobFade=1,r.rightBlobInnerFade=.01,r.activeFaceDir=new d.Vector3(0,0,-1),r.activeFaceUp=new d.Vector3(0,1,0),r.enableFade=!0,r.fadeWidth=1.5,r.smoothActiveFace=!0,r.showFrame=!1,r.useBlobTexture=!0,r.globalLeftIndexTipPosition=d.Vector3.Zero(),r.globalRightIndexTipPosition=d.Vector3.Zero(),r.alphaMode=d.Constants.ALPHA_ADD,r.disableDepthWrite=!0,r.backFaceCulling=!1,r._blobTexture=new d.Texture(e.BLOB_TEXTURE_URL,r.getScene(),!0,!1,d.Texture.NEAREST_SAMPLINGMODE),r}return l(e,t),e.prototype.needAlphaBlending=function(){return!0},e.prototype.needAlphaTesting=function(){return!0},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new Mt);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,d.PrepareDefinesForAttributes)(t,o,!0,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new d.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,d.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[d.VertexBuffer.PositionKind];o.NORMAL&&s.push(d.VertexBuffer.NormalKind),o.UV1&&s.push(d.VertexBuffer.UVKind),o.UV2&&s.push(d.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(d.VertexBuffer.ColorKind),o.TANGENT&&s.push(d.VertexBuffer.TangentKind),(0,d.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","viewProjection","cameraPosition","_Edge_Width_","_Edge_Color_","_Relative_Width_","_Proximity_Max_Intensity_","_Proximity_Far_Distance_","_Proximity_Near_Radius_","_Proximity_Anisotropy_","_Selection_Fuzz_","_Selected_","_Selection_Fade_","_Selection_Fade_Size_","_Selected_Distance_","_Selected_Fade_Length_","_Blob_Enable_","_Blob_Position_","_Blob_Intensity_","_Blob_Near_Size_","_Blob_Far_Size_","_Blob_Near_Distance_","_Blob_Far_Distance_","_Blob_Fade_Length_","_Blob_Inner_Fade_","_Blob_Pulse_","_Blob_Fade_","_Blob_Texture_","_Blob_Enable_2_","_Blob_Position_2_","_Blob_Near_Size_2_","_Blob_Inner_Fade_2_","_Blob_Pulse_2_","_Blob_Fade_2_","_Active_Face_Dir_","_Active_Face_Up_","_Enable_Fade_","_Fade_Width_","_Smooth_Active_Face_","_Show_Frame_","_Use_Blob_Texture_","Use_Global_Left_Index","Use_Global_Right_Index","Global_Left_Index_Tip_Position","Global_Right_Index_Tip_Position","Global_Left_Thumb_Tip_Position","Global_Right_Thumb_Tip_Position","Global_Left_Index_Tip_Proximity","Global_Right_Index_Tip_Proximity"],h=["_Blob_Texture_"],c=[];(0,d.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("fluentButton",{attributes:s,uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o,this._materialContext)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){var o=this.getScene();if(i.materialDefines){var r=i.effect;r&&(this._activeEffect=r,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",o.getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",o.activeCamera.position),this._activeEffect.setTexture("_Blob_Texture_",this._blobTexture),this._activeEffect.setFloat("_Edge_Width_",this.edgeWidth),this._activeEffect.setColor4("_Edge_Color_",new d.Color3(this.edgeColor.r,this.edgeColor.g,this.edgeColor.b),this.edgeColor.a),this._activeEffect.setFloat("_Proximity_Max_Intensity_",this.proximityMaxIntensity),this._activeEffect.setFloat("_Proximity_Far_Distance_",this.proximityFarDistance),this._activeEffect.setFloat("_Proximity_Near_Radius_",this.proximityNearRadius),this._activeEffect.setFloat("_Proximity_Anisotropy_",this.proximityAnisotropy),this._activeEffect.setFloat("_Selection_Fuzz_",this.selectionFuzz),this._activeEffect.setFloat("_Selected_",this.selected),this._activeEffect.setFloat("_Selection_Fade_",this.selectionFade),this._activeEffect.setFloat("_Selection_Fade_Size_",this.selectionFadeSize),this._activeEffect.setFloat("_Selected_Distance_",this.selectedDistance),this._activeEffect.setFloat("_Selected_Fade_Length_",this.selectedFadeLength),this._activeEffect.setFloat("_Blob_Enable_",this.leftBlobEnable?1:0),this._activeEffect.setFloat("_Blob_Intensity_",this.blobIntensity),this._activeEffect.setFloat("_Blob_Near_Size_",this.leftBlobNearSize),this._activeEffect.setFloat("_Blob_Far_Size_",this.blobFarSize),this._activeEffect.setFloat("_Blob_Near_Distance_",this.blobNearDistance),this._activeEffect.setFloat("_Blob_Far_Distance_",this.blobFarDistance),this._activeEffect.setFloat("_Blob_Fade_Length_",this.blobFadeLength),this._activeEffect.setFloat("_Blob_Inner_Fade_",this.leftBlobInnerFade),this._activeEffect.setFloat("_Blob_Pulse_",this.leftBlobPulse),this._activeEffect.setFloat("_Blob_Fade_",this.leftBlobFade),this._activeEffect.setFloat("_Blob_Enable_2_",this.rightBlobEnable?1:0),this._activeEffect.setFloat("_Blob_Near_Size_2_",this.rightBlobNearSize),this._activeEffect.setFloat("_Blob_Inner_Fade_2_",this.rightBlobInnerFade),this._activeEffect.setFloat("_Blob_Pulse_2_",this.rightBlobPulse),this._activeEffect.setFloat("_Blob_Fade_2_",this.rightBlobFade),this._activeEffect.setVector3("_Active_Face_Dir_",this.activeFaceDir),this._activeEffect.setVector3("_Active_Face_Up_",this.activeFaceUp),this._activeEffect.setFloat("_Fade_Width_",this.fadeWidth),this._activeEffect.setFloat("_Smooth_Active_Face_",this.smoothActiveFace?1:0),this._activeEffect.setFloat("_Show_Frame_",this.showFrame?1:0),this._activeEffect.setFloat("_Use_Blob_Texture_",this.useBlobTexture?1:0),this._activeEffect.setFloat("Use_Global_Left_Index",1),this._activeEffect.setFloat("Use_Global_Right_Index",1),this._activeEffect.setVector4("Global_Left_Index_Tip_Position",new d.Vector4(this.globalLeftIndexTipPosition.x,this.globalLeftIndexTipPosition.y,this.globalLeftIndexTipPosition.z,1)),this._activeEffect.setVector4("Global_Right_Index_Tip_Position",new d.Vector4(this.globalRightIndexTipPosition.x,this.globalRightIndexTipPosition.y,this.globalRightIndexTipPosition.z,1)),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e)},e.prototype.clone=function(t){var i=this;return d.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var e=t.prototype.serialize.call(this);return e.customType="BABYLON.FluentButtonMaterial",e},e.prototype.getClassName=function(){return"FluentButtonMaterial"},e.Parse=function(t,i,o){return d.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},e.BLOB_TEXTURE_URL="https://assets.babylonjs.com/meshes/MRTK/mrtk-fluent-button-blob.png",h([(0,d.serialize)()],e.prototype,"edgeWidth",void 0),h([(0,d.serializeAsColor4)()],e.prototype,"edgeColor",void 0),h([(0,d.serialize)()],e.prototype,"proximityMaxIntensity",void 0),h([(0,d.serialize)()],e.prototype,"proximityFarDistance",void 0),h([(0,d.serialize)()],e.prototype,"proximityNearRadius",void 0),h([(0,d.serialize)()],e.prototype,"proximityAnisotropy",void 0),h([(0,d.serialize)()],e.prototype,"selectionFuzz",void 0),h([(0,d.serialize)()],e.prototype,"selected",void 0),h([(0,d.serialize)()],e.prototype,"selectionFade",void 0),h([(0,d.serialize)()],e.prototype,"selectionFadeSize",void 0),h([(0,d.serialize)()],e.prototype,"selectedDistance",void 0),h([(0,d.serialize)()],e.prototype,"selectedFadeLength",void 0),h([(0,d.serialize)()],e.prototype,"blobIntensity",void 0),h([(0,d.serialize)()],e.prototype,"blobFarSize",void 0),h([(0,d.serialize)()],e.prototype,"blobNearDistance",void 0),h([(0,d.serialize)()],e.prototype,"blobFarDistance",void 0),h([(0,d.serialize)()],e.prototype,"blobFadeLength",void 0),h([(0,d.serialize)()],e.prototype,"leftBlobEnable",void 0),h([(0,d.serialize)()],e.prototype,"leftBlobNearSize",void 0),h([(0,d.serialize)()],e.prototype,"leftBlobPulse",void 0),h([(0,d.serialize)()],e.prototype,"leftBlobFade",void 0),h([(0,d.serialize)()],e.prototype,"leftBlobInnerFade",void 0),h([(0,d.serialize)()],e.prototype,"rightBlobEnable",void 0),h([(0,d.serialize)()],e.prototype,"rightBlobNearSize",void 0),h([(0,d.serialize)()],e.prototype,"rightBlobPulse",void 0),h([(0,d.serialize)()],e.prototype,"rightBlobFade",void 0),h([(0,d.serialize)()],e.prototype,"rightBlobInnerFade",void 0),h([(0,d.serializeAsVector3)()],e.prototype,"activeFaceDir",void 0),h([(0,d.serializeAsVector3)()],e.prototype,"activeFaceUp",void 0),h([(0,d.serialize)()],e.prototype,"enableFade",void 0),h([(0,d.serialize)()],e.prototype,"fadeWidth",void 0),h([(0,d.serialize)()],e.prototype,"smoothActiveFace",void 0),h([(0,d.serialize)()],e.prototype,"showFrame",void 0),h([(0,d.serialize)()],e.prototype,"useBlobTexture",void 0),h([(0,d.serializeAsVector3)()],e.prototype,"globalLeftIndexTipPosition",void 0),h([(0,d.serializeAsVector3)()],e.prototype,"globalRightIndexTipPosition",void 0),e}(d.PushMaterial);(0,d.RegisterClass)("BABYLON.GUI.FluentButtonMaterial",Et);var Ft=function(t){function e(e,i){var o=t.call(this,e)||this;return o._isNearPressed=!1,o._interactionSurfaceHeight=0,o._isToggleButton=!1,o._toggleState=!1,o._toggleButtonCallback=function(){o._onToggle(!o._toggleState)},o.onToggleObservable=new d.Observable,o.collidableFrontDirection=d.Vector3.Zero(),i&&(o.collisionMesh=i),o}return l(e,t),Object.defineProperty(e.prototype,"isActiveNearInteraction",{get:function(){return this._isNearPressed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"collidableFrontDirection",{get:function(){if(this._collisionMesh){var t=d.TmpVectors.Vector3[0];return d.Vector3.TransformNormalToRef(this._collidableFrontDirection,this._collisionMesh.getWorldMatrix(),t),t.normalize()}return this._collidableFrontDirection},set:function(t){if(this._collidableFrontDirection=t.normalize(),this._collisionMesh){var e=d.TmpVectors.Matrix[0];e.copyFrom(this._collisionMesh.getWorldMatrix()),e.invert(),d.Vector3.TransformNormalToRef(this._collidableFrontDirection,e,this._collidableFrontDirection),this._collidableFrontDirection.normalize()}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"collisionMesh",{set:function(t){var e,i=this;this._collisionMesh&&(this._collisionMesh.isNearPickable=!1,(null===(e=this._collisionMesh.reservedDataStore)||void 0===e?void 0:e.GUI3D)&&(this._collisionMesh.reservedDataStore.GUI3D={}),this._collisionMesh.getChildMeshes().forEach((function(t){var e;t.isNearPickable=!1,(null===(e=t.reservedDataStore)||void 0===e?void 0:e.GUI3D)&&(t.reservedDataStore.GUI3D={})}))),this._collisionMesh=t,this._injectGUI3DReservedDataStore(this._collisionMesh).control=this,this._collisionMesh.isNearPickable=!0,this._collisionMesh.getChildMeshes().forEach((function(t){i._injectGUI3DReservedDataStore(t).control=i,t.isNearPickable=!0})),this.collidableFrontDirection=t.forward},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isToggleButton",{get:function(){return this._isToggleButton},set:function(t){t!==this._isToggleButton&&(this._isToggleButton=t,t?this.onPointerUpObservable.add(this._toggleButtonCallback):(this.onPointerUpObservable.removeCallback(this._toggleButtonCallback),this._toggleState&&this._onToggle(!1)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isToggled",{get:function(){return this._toggleState},set:function(t){this._isToggleButton&&this._toggleState!==t&&this._onToggle(t)},enumerable:!1,configurable:!0}),e.prototype._onToggle=function(t){this._toggleState=t,this.onToggleObservable.notifyObservers(t)},e.prototype._isInteractionInFrontOfButton=function(t){return this._getInteractionHeight(t,this._collisionMesh.getAbsolutePosition())>0},e.prototype.getPressDepth=function(t){if(!this._isNearPressed)return 0;var e=this._getInteractionHeight(t,this._collisionMesh.getAbsolutePosition());return this._interactionSurfaceHeight-e},e.prototype._getInteractionHeight=function(t,e){var i=this.collidableFrontDirection;if(0===i.length())return d.Vector3.Distance(t,e);var o=d.Vector3.Dot(e,i);return d.Vector3.Dot(t,i)-o},e.prototype._generatePointerEventType=function(t,e,i){if(t===d.PointerEventTypes.POINTERDOWN||t===d.PointerEventTypes.POINTERMOVE){if(!this._isInteractionInFrontOfButton(e))return d.PointerEventTypes.POINTERMOVE;this._isNearPressed=!0,this._interactionSurfaceHeight=this._getInteractionHeight(e,this._collisionMesh.getAbsolutePosition())}if(t===d.PointerEventTypes.POINTERUP){if(0==i)return d.PointerEventTypes.POINTERMOVE;this._isNearPressed=!1}return t},e.prototype._getTypeName=function(){return"TouchButton3D"},e.prototype._createNode=function(e){return t.prototype._createNode.call(this,e)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.onPointerUpObservable.removeCallback(this._toggleButtonCallback),this.onToggleObservable.clear(),this._collisionMesh&&this._collisionMesh.dispose()},e}(vt),Dt=function(t){function e(e,i){void 0===i&&(i=!0);var o=t.call(this,e)||this;return o._shareMaterials=!0,o._isBackplateVisible=!0,o._frontPlateDepth=.5,o._backPlateDepth=.04,o._backplateColor=new d.Color3(.08,.15,.55),o._backplateToggledColor=new d.Color3(.25,.4,.95),o._shareMaterials=i,o.pointerEnterAnimation=function(){o._frontMaterial.leftBlobEnable=!0,o._frontMaterial.rightBlobEnable=!0},o.pointerOutAnimation=function(){o._frontMaterial.leftBlobEnable=!1,o._frontMaterial.rightBlobEnable=!1},o.pointerDownAnimation=function(){o._frontPlate&&!o.isActiveNearInteraction&&(o._frontPlate.scaling.z=.2*o._frontPlateDepth,o._frontPlate.position=d.Vector3.Forward(o._frontPlate._scene.useRightHandedSystem).scale((o._frontPlateDepth-.2*o._frontPlateDepth)/2),o._textPlate.position=d.Vector3.Forward(o._textPlate._scene.useRightHandedSystem).scale(-(o._backPlateDepth+.2*o._frontPlateDepth)/2))},o.pointerUpAnimation=function(){o._frontPlate&&(o._frontPlate.scaling.z=o._frontPlateDepth,o._frontPlate.position=d.Vector3.Forward(o._frontPlate._scene.useRightHandedSystem).scale((o._frontPlateDepth-o._frontPlateDepth)/2),o._textPlate.position=d.Vector3.Forward(o._textPlate._scene.useRightHandedSystem).scale(-(o._backPlateDepth+o._frontPlateDepth)/2))},o.onPointerMoveObservable.add((function(t){if(o._frontPlate&&o.isActiveNearInteraction){var e=d.Vector3.Zero();if(o._backPlate.getWorldMatrix().decompose(e,void 0,void 0)){var i=o._getInteractionHeight(t,o._backPlate.getAbsolutePosition())/e.z;i=d.Scalar.Clamp(i-o._backPlateDepth/2,.2*o._frontPlateDepth,o._frontPlateDepth),o._frontPlate.scaling.z=i,o._frontPlate.position=d.Vector3.Forward(o._frontPlate._scene.useRightHandedSystem).scale((o._frontPlateDepth-i)/2),o._textPlate.position=d.Vector3.Forward(o._textPlate._scene.useRightHandedSystem).scale(-(o._backPlateDepth+i)/2)}}})),o._pointerHoverObserver=o.onPointerMoveObservable.add((function(t){o._frontMaterial.globalLeftIndexTipPosition=t})),o}return l(e,t),e.prototype._disposeTooltip=function(){this._tooltipFade=null,this._tooltipTextBlock&&this._tooltipTextBlock.dispose(),this._tooltipTexture&&this._tooltipTexture.dispose(),this._tooltipMesh&&this._tooltipMesh.dispose(),this.onPointerEnterObservable.remove(this._tooltipHoverObserver),this.onPointerOutObservable.remove(this._tooltipOutObserver)},Object.defineProperty(e.prototype,"renderingGroupId",{get:function(){return this._backPlate.renderingGroupId},set:function(t){this._backPlate.renderingGroupId=t,this._textPlate.renderingGroupId=t,this._frontPlate.renderingGroupId=t,this._tooltipMesh&&(this._tooltipMesh.renderingGroupId=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mesh",{get:function(){return this._backPlate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tooltipText",{get:function(){return this._tooltipTextBlock?this._tooltipTextBlock.text:null},set:function(t){var e=this;if(t){if(!this._tooltipFade){var i=this._backPlate._scene.useRightHandedSystem;this._tooltipMesh=(0,d.CreatePlane)("",{size:1},this._backPlate._scene);var o=(0,d.CreatePlane)("",{size:1,sideOrientation:d.Mesh.DOUBLESIDE},this._backPlate._scene),r=new d.StandardMaterial("",this._backPlate._scene);r.diffuseColor=d.Color3.FromHexString("#212121"),o.material=r,o.isPickable=!1,this._tooltipMesh.addChild(o),o.position=d.Vector3.Forward(i).scale(.05),this._tooltipMesh.scaling.y=1/3,this._tooltipMesh.position=d.Vector3.Up().scale(.7).add(d.Vector3.Forward(i).scale(-.15)),this._tooltipMesh.isPickable=!1,this._tooltipMesh.parent=this._backPlate,this._tooltipTexture=ct.CreateForMesh(this._tooltipMesh),this._tooltipTextBlock=new S,this._tooltipTextBlock.scaleY=3,this._tooltipTextBlock.color="white",this._tooltipTextBlock.fontSize=130,this._tooltipTexture.addControl(this._tooltipTextBlock),this._tooltipFade=new d.FadeInOutBehavior,this._tooltipFade.delay=500,this._tooltipMesh.addBehavior(this._tooltipFade),this._tooltipHoverObserver=this.onPointerEnterObservable.add((function(){e._tooltipFade&&e._tooltipFade.fadeIn(!0)})),this._tooltipOutObserver=this.onPointerOutObservable.add((function(){e._tooltipFade&&e._tooltipFade.fadeIn(!1)}))}this._tooltipTextBlock&&(this._tooltipTextBlock.text=t)}else this._disposeTooltip()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){this._text!==t&&(this._text=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageUrl",{get:function(){return this._imageUrl},set:function(t){this._imageUrl!==t&&(this._imageUrl=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backMaterial",{get:function(){return this._backMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frontMaterial",{get:function(){return this._frontMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"plateMaterial",{get:function(){return this._plateMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shareMaterials",{get:function(){return this._shareMaterials},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isBackplateVisible",{set:function(t){this.mesh&&this._backMaterial&&(t&&!this._isBackplateVisible?this._backPlate.visibility=1:!t&&this._isBackplateVisible&&(this._backPlate.visibility=0)),this._isBackplateVisible=t},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"TouchHolographicButton"},e.prototype._rebuildContent=function(){this._disposeFacadeTexture();var t=new w;if(t.isVertical=!0,(0,d.IsDocumentAvailable)()&&document.createElement&&this._imageUrl){var e=new O;e.source=this._imageUrl,e.paddingTop="40px",e.height="180px",e.width="100px",e.paddingBottom="40px",t.addControl(e)}if(this._text){var i=new S;i.text=this._text,i.color="white",i.height="30px",i.fontSize=24,t.addControl(i)}this.content=t},e.prototype._createNode=function(i){var o,r=this;this.name=null!==(o=this.name)&&void 0!==o?o:"TouchHolographicButton";var n=(0,d.CreateBox)("".concat(this.name,"_collisionMesh"),{width:1,height:1,depth:this._frontPlateDepth},i);n.isPickable=!0,n.isNearPickable=!0,n.visibility=0,n.position=d.Vector3.Forward(i.useRightHandedSystem).scale(-this._frontPlateDepth/2),d.SceneLoader.ImportMeshAsync(void 0,e.MODEL_BASE_URL,e.MODEL_FILENAME,i).then((function(t){var e=(0,d.CreateBox)("${this.name}_alphaMesh",{width:1,height:1,depth:1},i);e.isPickable=!1,e.material=new d.StandardMaterial("${this.name}_alphaMesh_material",i),e.material.alpha=.15;var o=t.meshes[1];o.name="".concat(r.name,"_frontPlate"),o.isPickable=!1,o.scaling.z=r._frontPlateDepth,e.parent=o,o.parent=n,r._frontMaterial&&(o.material=r._frontMaterial),r._frontPlate=o})),this._backPlate=(0,d.CreateBox)("".concat(this.name,"_backPlate"),{width:1,height:1,depth:this._backPlateDepth},i),this._backPlate.position=d.Vector3.Forward(i.useRightHandedSystem).scale(this._backPlateDepth/2),this._backPlate.isPickable=!1,this._textPlate=t.prototype._createNode.call(this,i),this._textPlate.name="".concat(this.name,"_textPlate"),this._textPlate.isPickable=!1,this._textPlate.position=d.Vector3.Forward(i.useRightHandedSystem).scale(-this._frontPlateDepth/2),this._backPlate.addChild(n),this._backPlate.addChild(this._textPlate);var a=new d.TransformNode("{this.name}_root",i);return this._backPlate.setParent(a),this.collisionMesh=n,this.collidableFrontDirection=this._backPlate.forward.negate(),a},e.prototype._applyFacade=function(t){this._plateMaterial.emissiveTexture=t,this._plateMaterial.opacityTexture=t,this._plateMaterial.diffuseColor=new d.Color3(.4,.4,.4)},e.prototype._createBackMaterial=function(t){this._backMaterial=new Bt(this.name+"backPlateMaterial",t.getScene()),this._backMaterial.albedoColor=this._backplateColor,this._backMaterial.renderBorders=!0,this._backMaterial.renderHoverLight=!1},e.prototype._createFrontMaterial=function(t){this._frontMaterial=new Et(this.name+"Front Material",t.getScene())},e.prototype._createPlateMaterial=function(t){this._plateMaterial=new d.StandardMaterial(this.name+"Plate Material",t.getScene()),this._plateMaterial.specularColor=d.Color3.Black()},e.prototype._onToggle=function(e){this._backMaterial&&(this._backMaterial.albedoColor=e?this._backplateToggledColor:this._backplateColor),t.prototype._onToggle.call(this,e)},e.prototype._affectMaterial=function(t){this._shareMaterials?(this._host._touchSharedMaterials.backFluentMaterial?this._backMaterial=this._host._touchSharedMaterials.backFluentMaterial:(this._createBackMaterial(t),this._host._touchSharedMaterials.backFluentMaterial=this._backMaterial),this._host._touchSharedMaterials.frontFluentMaterial?this._frontMaterial=this._host._touchSharedMaterials.frontFluentMaterial:(this._createFrontMaterial(t),this._host._touchSharedMaterials.frontFluentMaterial=this._frontMaterial)):(this._createBackMaterial(t),this._createFrontMaterial(t)),this._createPlateMaterial(t),this._backPlate.material=this._backMaterial,this._textPlate.material=this._plateMaterial,this._isBackplateVisible||(this._backPlate.visibility=0),this._frontPlate&&(this._frontPlate.material=this._frontMaterial),this._rebuildContent()},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._disposeTooltip(),this.onPointerMoveObservable.remove(this._pointerHoverObserver),this.shareMaterials||(this._backMaterial.dispose(),this._frontMaterial.dispose(),this._plateMaterial.dispose(),this._pickedPointObserver&&(this._host.onPickedPointChangedObservable.remove(this._pickedPointObserver),this._pickedPointObserver=null))},e.MODEL_BASE_URL="https://assets.babylonjs.com/meshes/MRTK/",e.MODEL_FILENAME="mrtk-fluent-button.glb",e}(Ft),Lt=function(){function t(){this.followBehaviorEnabled=!1,this.sixDofDragBehaviorEnabled=!0,this.surfaceMagnetismBehaviorEnabled=!0,this._followBehavior=new d.FollowBehavior,this._sixDofDragBehavior=new d.SixDofDragBehavior,this._surfaceMagnetismBehavior=new d.SurfaceMagnetismBehavior}return Object.defineProperty(t.prototype,"name",{get:function(){return"Default"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"followBehavior",{get:function(){return this._followBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sixDofDragBehavior",{get:function(){return this._sixDofDragBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surfaceMagnetismBehavior",{get:function(){return this._surfaceMagnetismBehavior},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.attach=function(t,e,i){this._scene=t.getScene(),this.attachedNode=t,this._addObservables(),this._followBehavior.attach(t),this._sixDofDragBehavior.attach(t),this._sixDofDragBehavior.draggableMeshes=e||null,this._sixDofDragBehavior.faceCameraOnDragStart=!0,this._surfaceMagnetismBehavior.attach(t,this._scene),i&&(this._surfaceMagnetismBehavior.meshes=i),this._surfaceMagnetismBehavior.enabled=!1},t.prototype.detach=function(){this.attachedNode=null,this._removeObservables(),this._followBehavior.detach(),this._sixDofDragBehavior.detach(),this._surfaceMagnetismBehavior.detach()},t.prototype._addObservables=function(){var t=this;this._onBeforeRenderObserver=this._scene.onBeforeRenderObservable.add((function(){t._followBehavior._enabled=!t._sixDofDragBehavior.isMoving&&t.followBehaviorEnabled})),this._onDragObserver=this._sixDofDragBehavior.onDragObservable.add((function(e){t._sixDofDragBehavior.disableMovement=t._surfaceMagnetismBehavior.findAndUpdateTarget(e.pickInfo)}))},t.prototype._removeObservables=function(){this._scene.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._sixDofDragBehavior.onDragObservable.remove(this._onDragObserver)},t}();d.ShaderStore.ShadersStore.handleVertexShader="precision highp float;attribute vec3 position;uniform vec3 positionOffset;uniform mat4 worldViewProjection;uniform float scale;void main(void) {vec4 vPos=vec4((vec3(position)+positionOffset)*scale,1.0);gl_Position=worldViewProjection*vPos;}";d.ShaderStore.ShadersStore.handlePixelShader="uniform vec3 color;void main(void) {gl_FragColor=vec4(color,1.0);}";var kt,Nt=function(t){function e(e,i){var o=t.call(this,e,i,"handle",{attributes:["position"],uniforms:["worldViewProjection","color","scale","positionOffset"],needAlphaBlending:!1,needAlphaTesting:!1})||this;return o._hover=!1,o._drag=!1,o._color=new d.Color3,o._scale=1,o._lastTick=-1,o.animationLength=100,o.hoverColor=new d.Color3(0,.467,.84),o.baseColor=new d.Color3(1,1,1),o.hoverScale=.75,o.baseScale=.35,o.dragScale=.55,o._positionOffset=d.Vector3.Zero(),o._updateInterpolationTarget(),o._lastTick=Date.now(),o._onBeforeRender=o.getScene().onBeforeRenderObservable.add((function(){var t=Date.now(),e=t-o._lastTick,i=o._targetScale-o._scale,r=d.TmpColors.Color3[0].copyFrom(o._targetColor).subtractToRef(o._color,d.TmpColors.Color3[0]);o._scale=o._scale+i*e/o.animationLength,r.scaleToRef(e/o.animationLength,r),o._color.addToRef(r,o._color),o.setColor3("color",o._color),o.setFloat("scale",o._scale),o.setVector3("positionOffset",o._positionOffset),o._lastTick=t})),o}return l(e,t),Object.defineProperty(e.prototype,"hover",{get:function(){return this._hover},set:function(t){this._hover=t,this._updateInterpolationTarget()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drag",{get:function(){return this._drag},set:function(t){this._drag=t,this._updateInterpolationTarget()},enumerable:!1,configurable:!0}),e.prototype._updateInterpolationTarget=function(){this.drag?(this._targetColor=this.hoverColor,this._targetScale=this.dragScale):this.hover?(this._targetColor=this.hoverColor,this._targetScale=this.hoverScale):(this._targetColor=this.baseColor,this._targetScale=this.baseScale)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.getScene().onBeforeRenderObservable.remove(this._onBeforeRender)},e}(d.ShaderMaterial);!function(t){t[t.IDLE=0]="IDLE",t[t.HOVER=1]="HOVER",t[t.DRAG=2]="DRAG"}(kt||(kt={}));var At=function(){function t(t,e){this._state=0,this._materials=[],this._scene=e,this._gizmo=t,this.node=this.createNode(),this.node.reservedDataStore={handle:this}}return Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gizmo",{get:function(){return this._gizmo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hover",{set:function(t){t?this._state|=1:this._state&=-2,this._updateMaterial()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"drag",{set:function(t){t?this._state|=2:this._state&=-3,this._updateMaterial()},enumerable:!1,configurable:!0}),t.prototype._createMaterial=function(t){var e=new Nt("handle",this._scene);return t&&(e._positionOffset=t),e},t.prototype._updateMaterial=function(){for(var t=this._state,e=0,i=this._materials;ei?this.minDimensions.x/t.x:this.minDimensions.y/t.y}this._dimensions.copyFrom(t).scaleInPlace(e),this._updatePivot(),this._positionElements()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"titleBarHeight",{get:function(){return this._titleBarHeight},set:function(t){this._titleBarHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderingGroupId",{get:function(){return this._titleBar.renderingGroupId},set:function(t){this._titleBar.renderingGroupId=t,this._titleBarTitle.renderingGroupId=t,this._contentPlate.renderingGroupId=t,this._backPlate.renderingGroupId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._titleText},set:function(t){this._titleText=t,this._titleTextComponent&&(this._titleTextComponent.text=t)},enumerable:!1,configurable:!0}),e.prototype._applyFacade=function(t){this._contentMaterial.albedoTexture=t,this._resetContentPositionAndZoom(),this._applyContentViewport(),t.attachToMesh(this._contentPlate,!0)},e.prototype._addControl=function(t){t._host=this._host,this._host.utilityLayer&&t._prepareNode(this._host.utilityLayer.utilityLayerScene)},e.prototype._getTypeName=function(){return"HolographicSlate"},e.prototype._positionElements=function(){var t=this._followButton,i=this._closeButton,o=this._titleBar,r=this._titleBarTitle,n=this._contentPlate,a=this._backPlate;if(t&&i&&o){i.scaling.setAll(this.titleBarHeight),t.scaling.setAll(this.titleBarHeight),i.position.copyFromFloats(this.dimensions.x-this.titleBarHeight/2,-this.titleBarHeight/2,0).addInPlace(this.origin),t.position.copyFromFloats(this.dimensions.x-3*this.titleBarHeight/2,-this.titleBarHeight/2,0).addInPlace(this.origin);var s=this.dimensions.y-this.titleBarHeight-this.titleBarMargin,l=n.getScene().useRightHandedSystem;o.scaling.set(this.dimensions.x,this.titleBarHeight,d.Epsilon),r.scaling.set(this.dimensions.x-2*this.titleBarHeight,this.titleBarHeight,d.Epsilon),n.scaling.copyFromFloats(this.dimensions.x,s,d.Epsilon),a.scaling.copyFromFloats(this.dimensions.x,s,d.Epsilon),o.position.copyFromFloats(this.dimensions.x/2,-this.titleBarHeight/2,0).addInPlace(this.origin),r.position.copyFromFloats(this.dimensions.x/2-this.titleBarHeight,-this.titleBarHeight/2,l?d.Epsilon:-d.Epsilon).addInPlace(this.origin),n.position.copyFromFloats(this.dimensions.x/2,-(this.titleBarHeight+this.titleBarMargin+s/2),0).addInPlace(this.origin),a.position.copyFromFloats(this.dimensions.x/2,-(this.titleBarHeight+this.titleBarMargin+s/2),l?-d.Epsilon:d.Epsilon).addInPlace(this.origin),this._titleTextComponent.host.scaleTo(e._DEFAULT_TEXT_RESOLUTION_Y*r.scaling.x/r.scaling.y,e._DEFAULT_TEXT_RESOLUTION_Y);var _=this.dimensions.x/s;this._contentViewport.width=this._contentScaleRatio,this._contentViewport.height=this._contentScaleRatio/_,this._applyContentViewport(),this._gizmo&&this._gizmo.updateBoundingBox()}},e.prototype._applyContentViewport=function(){var t;if((null===(t=this._contentPlate)||void 0===t?void 0:t.material)&&this._contentPlate.material.albedoTexture){var e=this._contentPlate.material.albedoTexture;e.uScale=this._contentScaleRatio,e.vScale=this._contentScaleRatio/this._contentViewport.width*this._contentViewport.height,e.uOffset=this._contentViewport.x,e.vOffset=this._contentViewport.y}},e.prototype._resetContentPositionAndZoom=function(){this._contentViewport.x=0,this._contentViewport.y=1-this._contentViewport.height/this._contentViewport.width,this._contentScaleRatio=1},e.prototype._updatePivot=function(){if(this.mesh){var t=new d.Vector3(.5*this.dimensions.x,.5*-this.dimensions.y,d.Epsilon);t.addInPlace(this.origin),t.z=0;var e=new d.Vector3(0,0,0);d.Vector3.TransformCoordinatesToRef(e,this.mesh.computeWorldMatrix(!0),e),this.mesh.setPivotPoint(t);var i=new d.Vector3(0,0,0);d.Vector3.TransformCoordinatesToRef(i,this.mesh.computeWorldMatrix(!0),i),this.mesh.position.addInPlace(e).subtractInPlace(i)}},e.prototype._createNode=function(t){var i=this,o=new d.Mesh("slate_"+this.name,t);this._titleBar=(0,d.CreateBox)("titleBar_"+this.name,{size:1},t),this._titleBarTitle=(0,d.CreatePlane)("titleText_"+this.name,{size:1},t),this._titleBarTitle.parent=o,this._titleBarTitle.isPickable=!1;var r=ct.CreateForMesh(this._titleBarTitle);if(this._titleTextComponent=new S("titleText_"+this.name,this._titleText),this._titleTextComponent.textWrapping=2,this._titleTextComponent.textHorizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,this._titleTextComponent.color="white",this._titleTextComponent.fontSize=e._DEFAULT_TEXT_RESOLUTION_Y/2,this._titleTextComponent.paddingLeft=e._DEFAULT_TEXT_RESOLUTION_Y/4,r.addControl(this._titleTextComponent),t.useRightHandedSystem){var n=new d.Vector4(0,0,1,1);this._contentPlate=(0,d.CreatePlane)("contentPlate_"+this.name,{size:1,sideOrientation:d.VertexData.BACKSIDE,frontUVs:n},t),this._backPlate=(0,d.CreatePlane)("backPlate_"+this.name,{size:1,sideOrientation:d.VertexData.FRONTSIDE},t)}else n=new d.Vector4(0,0,1,1),this._contentPlate=(0,d.CreatePlane)("contentPlate_"+this.name,{size:1,sideOrientation:d.VertexData.FRONTSIDE,frontUVs:n},t),this._backPlate=(0,d.CreatePlane)("backPlate_"+this.name,{size:1,sideOrientation:d.VertexData.BACKSIDE},t);this._titleBar.parent=o,this._titleBar.isNearGrabbable=!0,this._contentPlate.parent=o,this._backPlate.parent=o,this._attachContentPlateBehavior(),this._addControl(this._followButton),this._addControl(this._closeButton);var a=this._followButton,s=this._closeButton;return a.node.parent=o,s.node.parent=o,this._positionElements(),this._followButton.imageUrl=e.ASSETS_BASE_URL+e.FOLLOW_ICON_FILENAME,this._closeButton.imageUrl=e.ASSETS_BASE_URL+e.CLOSE_ICON_FILENAME,this._followButton.isBackplateVisible=!1,this._closeButton.isBackplateVisible=!1,this._followButton.onToggleObservable.add((function(t){i._defaultBehavior.followBehaviorEnabled=t,i._defaultBehavior.followBehaviorEnabled&&i._defaultBehavior.followBehavior.recenter()})),this._closeButton.onPointerClickObservable.add((function(){i.dispose()})),o.rotationQuaternion=d.Quaternion.Identity(),o.isVisible=!1,o},e.prototype._attachContentPlateBehavior=function(){var t=this;this._contentDragBehavior.attach(this._contentPlate),this._contentDragBehavior.moveAttached=!1,this._contentDragBehavior.useObjectOrientationForDragging=!0,this._contentDragBehavior.updateDragPlane=!1;var e,i,o=new d.Vector3,r=new d.Vector3,n=new d.Vector3,a=new d.Vector3,s=new d.Vector2;this._contentDragBehavior.onDragStartObservable.add((function(s){t.node&&(e=t._contentViewport.clone(),i=t.node.computeWorldMatrix(!0),o.copyFrom(s.dragPlanePoint),r.set(t.dimensions.x,t.dimensions.y,d.Epsilon),r.y-=t.titleBarHeight+t.titleBarMargin,d.Vector3.TransformNormalToRef(r,i,r),n.copyFromFloats(0,1,0),d.Vector3.TransformNormalToRef(n,i,n),a.copyFromFloats(1,0,0),d.Vector3.TransformNormalToRef(a,i,a),n.normalize(),n.scaleInPlace(1/d.Vector3.Dot(n,r)),a.normalize(),a.scaleInPlace(1/d.Vector3.Dot(a,r)))}));var l=new d.Vector3;this._contentDragBehavior.onDragObservable.add((function(i){l.copyFrom(i.dragPlanePoint),l.subtractInPlace(o),s.copyFromFloats(d.Vector3.Dot(l,a),d.Vector3.Dot(l,n)),t._contentViewport.x=d.Scalar.Clamp(e.x-l.x,0,1-t._contentViewport.width*t._contentScaleRatio),t._contentViewport.y=d.Scalar.Clamp(e.y-l.y,0,1-t._contentViewport.height*t._contentScaleRatio),t._applyContentViewport()}))},e.prototype._affectMaterial=function(t){this._titleBarMaterial=new Ot("".concat(this.name," plateMaterial"),t.getScene()),this._contentMaterial=new Bt("".concat(this.name," contentMaterial"),t.getScene()),this._contentMaterial.renderBorders=!0,this._backMaterial=new Ot("".concat(this.name," backPlate"),t.getScene()),this._backMaterial.lineWidth=d.Epsilon,this._backMaterial.radius=.005,this._backMaterial.backFaceCulling=!0,this._titleBar.material=this._titleBarMaterial,this._contentPlate.material=this._contentMaterial,this._backPlate.material=this._backMaterial,this._resetContent(),this._applyContentViewport()},e.prototype._prepareNode=function(e){var i=this;t.prototype._prepareNode.call(this,e),this._gizmo=new Vt(this._host.utilityLayer),this._gizmo.attachedSlate=this,this._defaultBehavior=new Lt,this._defaultBehavior.attach(this.node,[this._titleBar]),this._defaultBehavior.sixDofDragBehavior.onDragStartObservable.add((function(){i._followButton.isToggled=!1})),this._positionChangedObserver=this._defaultBehavior.sixDofDragBehavior.onPositionChangedObservable.add((function(){i._gizmo.updateBoundingBox()})),this._updatePivot(),this.resetDefaultAspectAndPose(!1)},e.prototype.resetDefaultAspectAndPose=function(t){if(void 0===t&&(t=!0),this._host&&this._host.utilityLayer&&this.node){var e=this._host.utilityLayer.utilityLayerScene,i=e.activeCamera;if(i){var o=i.getWorldMatrix(),r=d.Vector3.TransformNormal(d.Vector3.Backward(e.useRightHandedSystem),o);this.origin.setAll(0),this._gizmo.updateBoundingBox();var n=this.node.getAbsolutePivotPoint();this.node.position.copyFrom(i.position).subtractInPlace(r).subtractInPlace(n),this.node.rotationQuaternion=d.Quaternion.FromLookDirectionLH(r,new d.Vector3(0,1,0)),t&&(this.dimensions=this.defaultDimensions)}}},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._titleBarMaterial.dispose(),this._contentMaterial.dispose(),this._titleBar.dispose(),this._titleBarTitle.dispose(),this._contentPlate.dispose(),this._backPlate.dispose(),this._followButton.dispose(),this._closeButton.dispose(),this._host.onPickedPointChangedObservable.remove(this._pickedPointObserver),this._defaultBehavior.sixDofDragBehavior.onPositionChangedObservable.remove(this._positionChangedObserver),this._defaultBehavior.detach(),this._gizmo.dispose(),this._contentDragBehavior.detach()},e.ASSETS_BASE_URL="https://assets.babylonjs.com/meshes/MRTK/",e.CLOSE_ICON_FILENAME="IconClose.png",e.FOLLOW_ICON_FILENAME="IconFollowMe.png",e._DEFAULT_TEXT_RESOLUTION_Y=102.4,e}(bt),Ht=function(t){function e(e,i){var o=t.call(this,i)||this;return o._currentMesh=e,o.pointerEnterAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(1.1)},o.pointerOutAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(1/1.1)},o.pointerDownAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(.95)},o.pointerUpAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(1/.95)},o}return l(e,t),e.prototype._getTypeName=function(){return"MeshButton3D"},e.prototype._createNode=function(t){var e=this;return this._currentMesh.getChildMeshes().forEach((function(t){e._injectGUI3DReservedDataStore(t).control=e})),this._currentMesh},e.prototype._affectMaterial=function(t){},e}(vt),Gt=function(t){function e(e){var i=t.call(this,e)||this;return i._isPinned=!1,i._defaultBehavior=new Lt,i._dragObserver=i._defaultBehavior.sixDofDragBehavior.onDragObservable.add((function(){i.isPinned=!0})),i.backPlateMargin=1,i}return l(e,t),Object.defineProperty(e.prototype,"defaultBehavior",{get:function(){return this._defaultBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPinned",{get:function(){return this._isPinned},set:function(t){this._pinButton.isToggled===t?(this._isPinned=t,this._defaultBehavior.followBehaviorEnabled=!t):this._pinButton.isToggled=t},enumerable:!1,configurable:!0}),e.prototype._createPinButton=function(t){var i=this,o=new Dt("pin"+this.name,!1);return o.imageUrl=e._ASSETS_BASE_URL+e._PIN_ICON_FILENAME,o.parent=this,o._host=this._host,o.isToggleButton=!0,o.onToggleObservable.add((function(t){i.isPinned=t})),this._host.utilityLayer&&(o._prepareNode(this._host.utilityLayer.utilityLayerScene),o.scaling.scaleInPlace(Ct.MENU_BUTTON_SCALE),o.node&&(o.node.parent=t)),o},e.prototype._createNode=function(e){var i=t.prototype._createNode.call(this,e);return this._pinButton=this._createPinButton(i),this.isPinned=!1,this._defaultBehavior.attach(i,[this._backPlate]),this._defaultBehavior.followBehavior.ignoreCameraPitchAndRoll=!0,this._defaultBehavior.followBehavior.pitchOffset=-15,this._defaultBehavior.followBehavior.minimumDistance=.3,this._defaultBehavior.followBehavior.defaultDistance=.4,this._defaultBehavior.followBehavior.maximumDistance=.6,this._backPlate.isNearGrabbable=!0,i.isVisible=!1,i},e.prototype._finalProcessing=function(){t.prototype._finalProcessing.call(this),this._pinButton.position.copyFromFloats((this._backPlate.scaling.x+Ct.MENU_BUTTON_SCALE)/2,this._backPlate.scaling.y/2,0)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._defaultBehavior.sixDofDragBehavior.onDragObservable.remove(this._dragObserver),this._defaultBehavior.detach()},e._ASSETS_BASE_URL="https://assets.babylonjs.com/meshes/MRTK/",e._PIN_ICON_FILENAME="IconPin.png",e}(Ct),Ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype._mapGridNode=function(t,e){var i=t.mesh;if(i){t.position=e.clone();var o=d.TmpVectors.Vector3[0];switch(o.copyFrom(e),this.orientation){case yt.FACEORIGIN_ORIENTATION:case yt.FACEFORWARD_ORIENTATION:o.addInPlace(new d.Vector3(0,0,1)),i.lookAt(o);break;case yt.FACEFORWARDREVERSED_ORIENTATION:case yt.FACEORIGINREVERSED_ORIENTATION:o.addInPlace(new d.Vector3(0,0,-1)),i.lookAt(o)}}},e}(xt),jt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._iteration=100,e}return l(e,t),Object.defineProperty(e.prototype,"iteration",{get:function(){return this._iteration},set:function(t){var e=this;this._iteration!==t&&(this._iteration=t,d.Tools.SetImmediate((function(){e._arrangeChildren()})))},enumerable:!1,configurable:!0}),e.prototype._mapGridNode=function(t,e){var i=t.mesh,o=this._scatterMapping(e);if(i){switch(this.orientation){case yt.FACEORIGIN_ORIENTATION:case yt.FACEFORWARD_ORIENTATION:i.lookAt(new d.Vector3(0,0,1));break;case yt.FACEFORWARDREVERSED_ORIENTATION:case yt.FACEORIGINREVERSED_ORIENTATION:i.lookAt(new d.Vector3(0,0,-1))}t.position=o}},e.prototype._scatterMapping=function(t){return t.x=(1-2*Math.random())*this._cellWidth,t.y=(1-2*Math.random())*this._cellHeight,t},e.prototype._finalProcessing=function(){for(var t=[],e=0,i=this._children;eo?-1:0}));for(var n=Math.pow(this.margin,2),a=Math.max(this._cellWidth,this._cellHeight),s=d.TmpVectors.Vector2[0],l=d.TmpVectors.Vector3[0],_=0;_0.0) {C=mix(H,S,k);} else {C=mix(H,G,k); }\nreturn C;}\nvoid Sky_Environment_B50(\nvec3 Normal,\nvec3 Reflected,\nvec4 Sky_Color,\nvec4 Horizon_Color,\nvec4 Ground_Color,\nfloat Horizon_Power,\nout vec4 Reflected_Color,\nout vec4 Indirect_Color)\n{Reflected_Color=SampleEnv_Bid50(Reflected,Sky_Color,Horizon_Color,Ground_Color,Horizon_Power);Indirect_Color=mix(Ground_Color,Sky_Color,Normal.y*0.5+0.5);}\nvoid Min_Segment_Distance_B65(\nvec3 P0,\nvec3 P1,\nvec3 Q0,\nvec3 Q1,\nout vec3 NearP,\nout vec3 NearQ,\nout float Distance)\n{vec3 u=P1-P0;vec3 v=Q1-Q0;vec3 w=P0-Q0;float a=dot(u,u);float b=dot(u,v);float c=dot(v,v);float d=dot(u,w);float e=dot(v,w);float D=a*c-b*b;float sD=D;float tD=D;float sc,sN,tc,tN;if (D<0.00001) {sN=0.0;sD=1.0;tN=e;tD=c;} else {sN=(b*e-c*d);tN=(a*e-b*d);if (sN<0.0) {sN=0.0;tN=e;tD=c;} else if (sN>sD) {sN=sD;tN=e+b;tD=c;}}\nif (tN<0.0) {tN=0.0;if (-d<0.0) {sN=0.0;} else if (-d>a) {sN=sD;} else {sN=-d;sD=a;}} else if (tN>tD) {tN=tD;if ((-d+b)<0.0) {sN=0.0;} else if ((-d+b)>a) {sN=sD;} else {sN=(-d+b);sD=a;}}\nsc=abs(sN)<0.000001 ? 0.0 : sN/sD;tc=abs(tN)<0.000001 ? 0.0 : tN/tD;NearP=P0+sc*u;NearQ=Q0+tc*v;Distance=distance(NearP,NearQ);}\nvoid To_XYZ_B74(\nvec3 Vec3,\nout float X,\nout float Y,\nout float Z)\n{X=Vec3.x;Y=Vec3.y;Z=Vec3.z;}\nvoid Finger_Positions_B64(\nvec3 Left_Index_Pos,\nvec3 Right_Index_Pos,\nvec3 Left_Index_Middle_Pos,\nvec3 Right_Index_Middle_Pos,\nout vec3 Left_Index,\nout vec3 Right_Index,\nout vec3 Left_Index_Middle,\nout vec3 Right_Index_Middle)\n{Left_Index= (Use_Global_Left_Index ? Global_Left_Index_Tip_Position.xyz : Left_Index_Pos);Right_Index= (Use_Global_Right_Index ? Global_Right_Index_Tip_Position.xyz : Right_Index_Pos);Left_Index_Middle= (Use_Global_Left_Index ? Global_Left_Index_Middle_Position.xyz : Left_Index_Middle_Pos);Right_Index_Middle= (Use_Global_Right_Index ? Global_Right_Index_Middle_Position.xyz : Right_Index_Middle_Pos);}\nvoid VaryHSV_B108(\nvec3 HSV_In,\nfloat Hue_Shift,\nfloat Saturation_Shift,\nfloat Value_Shift,\nout vec3 HSV_Out)\n{HSV_Out=vec3(fract(HSV_In.x+Hue_Shift),clamp(HSV_In.y+Saturation_Shift,0.0,1.0),clamp(HSV_In.z+Value_Shift,0.0,1.0));}\nvoid Remap_Range_B114(\nfloat In_Min,\nfloat In_Max,\nfloat Out_Min,\nfloat Out_Max,\nfloat In,\nout float Out)\n{Out=mix(Out_Min,Out_Max,clamp((In-In_Min)/(In_Max-In_Min),0.0,1.0));}\nvoid To_HSV_B75(\nvec4 Color,\nout float Hue,\nout float Saturation,\nout float Value,\nout float Alpha,\nout vec3 HSV)\n{vec4 K=vec4(0.0,-1.0/3.0,2.0/3.0,-1.0);vec4 p=Color.g0.0;Result=Position.x<0.0 ? (whichY ? Radius_Top_Left : Radius_Bottom_Left) : (whichY ? Radius_Top_Right : Radius_Bottom_Right);Result*=Radius;}\nvoid Conditional_Float_B36(\nbool Which,\nfloat If_True,\nfloat If_False,\nout float Result)\n{Result=Which ? If_True : If_False;}\nvoid Greater_Than_B37(\nfloat Left,\nfloat Right,\nout bool Not_Greater_Than,\nout bool Greater_Than)\n{Greater_Than=Left>Right;Not_Greater_Than=!Greater_Than;}\nvoid Remap_Range_B105(\nfloat In_Min,\nfloat In_Max,\nfloat Out_Min,\nfloat Out_Max,\nfloat In,\nout float Out)\n{Out=mix(Out_Min,Out_Max,clamp((In-In_Min)/(In_Max-In_Min),0.0,1.0));}\nvoid main()\n{vec2 XY_Q85;XY_Q85=(uv-vec2(0.5,0.5))*_Decal_Scale_XY_+vec2(0.5,0.5);vec3 Tangent_World_Q27;vec3 Tangent_World_N_Q27;float Tangent_Length_Q27;Tangent_World_Q27=(world*vec4(vec3(1,0,0),0.0)).xyz;Tangent_Length_Q27=length(Tangent_World_Q27);Tangent_World_N_Q27=Tangent_World_Q27/Tangent_Length_Q27;vec3 Normal_World_Q60;vec3 Normal_World_N_Q60;float Normal_Length_Q60;Object_To_World_Dir_B60(vec3(0,0,1),Normal_World_Q60,Normal_World_N_Q60,Normal_Length_Q60);float X_Q78;float Y_Q78;float Z_Q78;To_XYZ_B78(position,X_Q78,Y_Q78,Z_Q78);vec3 Nrm_World_Q26;Nrm_World_Q26=normalize((world*vec4(normal,0.0)).xyz);vec3 Binormal_World_Q28;vec3 Binormal_World_N_Q28;float Binormal_Length_Q28;Object_To_World_Dir_B28(vec3(0,1,0),Binormal_World_Q28,Binormal_World_N_Q28,Binormal_Length_Q28);float Anisotropy_Q29=Tangent_Length_Q27/Binormal_Length_Q28;float Result_Q69;Pick_Radius_B69(_Radius_,_Radius_Top_Left_,_Radius_Top_Right_,_Radius_Bottom_Left_,_Radius_Bottom_Right_,position,Result_Q69);float Anisotropy_Q53=Binormal_Length_Q28/Normal_Length_Q60;bool Not_Greater_Than_Q37;bool Greater_Than_Q37;Greater_Than_B37(Z_Q78,0.0,Not_Greater_Than_Q37,Greater_Than_Q37);vec4 Linear_Q101;Linear_Q101.rgb=clamp(_Left_Color_.rgb*_Left_Color_.rgb,0.0,1.0);Linear_Q101.a=_Left_Color_.a;vec4 Linear_Q102;Linear_Q102.rgb=clamp(_Right_Color_.rgb*_Right_Color_.rgb,0.0,1.0);Linear_Q102.a=_Right_Color_.a;vec3 Difference_Q61=vec3(0,0,0)-Normal_World_N_Q60;vec4 Out_Color_Q34=vec4(X_Q78,Y_Q78,Z_Q78,1);float Result_Q36;Conditional_Float_B36(Greater_Than_Q37,_Bevel_Back_,_Bevel_Front_,Result_Q36);float Result_Q94;Conditional_Float_B36(Greater_Than_Q37,_Bevel_Back_Stretch_,_Bevel_Front_Stretch_,Result_Q94);vec3 New_P_Q130;vec2 New_UV_Q130;float Radial_Gradient_Q130;vec3 Radial_Dir_Q130;vec3 New_Normal_Q130;Move_Verts_B130(Anisotropy_Q29,position,Result_Q69,Result_Q36,normal,Anisotropy_Q53,Result_Q94,New_P_Q130,New_UV_Q130,Radial_Gradient_Q130,Radial_Dir_Q130,New_Normal_Q130);float X_Q98;float Y_Q98;X_Q98=New_UV_Q130.x;Y_Q98=New_UV_Q130.y;vec3 Pos_World_Q12;Object_To_World_Pos_B12(New_P_Q130,Pos_World_Q12);vec3 Nrm_World_Q32;Object_To_World_Normal_B32(New_Normal_Q130,Nrm_World_Q32);vec4 Blob_Info_Q23;\n#if BLOB_ENABLE\nBlob_Vertex_B23(Pos_World_Q12,Nrm_World_Q26,Tangent_World_N_Q27,Binormal_World_N_Q28,_Blob_Position_,_Blob_Intensity_,_Blob_Near_Size_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_,_Blob_Fade_,Blob_Info_Q23);\n#else\nBlob_Info_Q23=vec4(0,0,0,0);\n#endif\nvec4 Blob_Info_Q24;\n#if BLOB_ENABLE_2\nBlob_Vertex_B24(Pos_World_Q12,Nrm_World_Q26,Tangent_World_N_Q27,Binormal_World_N_Q28,_Blob_Position_2_,_Blob_Intensity_,_Blob_Near_Size_2_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_2_,_Blob_Fade_2_,Blob_Info_Q24);\n#else\nBlob_Info_Q24=vec4(0,0,0,0);\n#endif\nfloat Out_Q105;Remap_Range_B105(0.0,1.0,0.0,1.0,X_Q98,Out_Q105);float X_Q86;float Y_Q86;float Z_Q86;To_XYZ_B78(Nrm_World_Q32,X_Q86,Y_Q86,Z_Q86);vec4 Color_At_T_Q97=mix(Linear_Q101,Linear_Q102,Out_Q105);float Minus_F_Q87=-Z_Q86;float R_Q99;float G_Q99;float B_Q99;float A_Q99;R_Q99=Color_At_T_Q97.r; G_Q99=Color_At_T_Q97.g; B_Q99=Color_At_T_Q97.b; A_Q99=Color_At_T_Q97.a;float ClampF_Q88=clamp(0.0,Minus_F_Q87,1.0);float Result_Q93;Conditional_Float_B93(_Decal_Front_Only_,ClampF_Q88,1.0,Result_Q93);vec4 Vec4_Q89=vec4(Result_Q93,Radial_Gradient_Q130,G_Q99,B_Q99);vec3 Position=Pos_World_Q12;vec3 Normal=Nrm_World_Q32;vec2 UV=XY_Q85;vec3 Tangent=Tangent_World_N_Q27;vec3 Binormal=Difference_Q61;vec4 Color=Out_Color_Q34;vec4 Extra1=Vec4_Q89;vec4 Extra2=Blob_Info_Q23;vec4 Extra3=Blob_Info_Q24;gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vColor=Color;vExtra1=Extra1;vExtra2=Extra2;vExtra3=Extra3;}";var Yt=function(t){function e(){var e=t.call(this)||this;return e.SKY_ENABLED=!0,e.BLOB_ENABLE_2=!0,e.IRIDESCENCE_ENABLED=!0,e._needNormals=!0,e._needUVs=!0,e.rebuild(),e}return l(e,t),e}(d.MaterialDefines),Xt=function(t){function e(i,o){var r=t.call(this,i,o)||this;return r.radius=.6,r.bevelFront=.6,r.bevelFrontStretch=.077,r.bevelBack=0,r.bevelBackStretch=0,r.radiusTopLeft=1,r.radiusTopRight=1,r.radiusBottomLeft=1,r.radiusBottomRight=1,r.bulgeEnabled=!1,r.bulgeHeight=-.323,r.bulgeRadius=.73,r.sunIntensity=1.102,r.sunTheta=.76,r.sunPhi=.526,r.indirectDiffuse=.658,r.albedo=new d.Color4(.0117647,.505882,.996078,1),r.specular=0,r.shininess=10,r.sharpness=0,r.subsurface=0,r.leftGradientColor=new d.Color4(.0117647,.505882,.996078,1),r.rightGradientColor=new d.Color4(.0117647,.505882,.996078,1),r.reflection=.749,r.frontReflect=0,r.edgeReflect=.09,r.power=8.13,r.skyColor=new d.Color4(.0117647,.964706,.996078,1),r.horizonColor=new d.Color4(.0117647,.333333,.996078,1),r.groundColor=new d.Color4(0,.254902,.996078,1),r.horizonPower=1,r.width=.02,r.fuzz=.5,r.minFuzz=.001,r.clipFade=.01,r.hueShift=0,r.saturationShift=0,r.valueShift=0,r.blobPosition=new d.Vector3(0,0,.1),r.blobIntensity=.5,r.blobNearSize=.01,r.blobFarSize=.03,r.blobNearDistance=0,r.blobFarDistance=.08,r.blobFadeLength=.576,r.blobPulse=0,r.blobFade=1,r.blobPosition2=new d.Vector3(.2,0,.1),r.blobNearSize2=.01,r.blobPulse2=0,r.blobFade2=1,r.blobTexture=new d.Texture("",r.getScene()),r.leftIndexPosition=new d.Vector3(0,0,1),r.rightIndexPosition=new d.Vector3(-1,-1,-1),r.leftIndexMiddlePosition=new d.Vector3(0,0,0),r.rightIndexMiddlePosition=new d.Vector3(0,0,0),r.decalScaleXY=new d.Vector2(1.5,1.5),r.decalFrontOnly=!0,r.rimIntensity=.287,r.rimHueShift=0,r.rimSaturationShift=0,r.rimValueShift=-1,r.iridescenceIntensity=0,r.useGlobalLeftIndex=1,r.useGlobalRightIndex=1,r.globalLeftIndexTipProximity=0,r.globalRightIndexTipProximity=0,r.globalLeftIndexTipPosition=new d.Vector4(.5,0,-.55,1),r.globaRightIndexTipPosition=new d.Vector4(0,0,0,1),r.globalLeftThumbTipPosition=new d.Vector4(.5,0,-.55,1),r.globalRightThumbTipPosition=new d.Vector4(0,0,0,1),r.globalLeftIndexMiddlePosition=new d.Vector4(.5,0,-.55,1),r.globalRightIndexMiddlePosition=new d.Vector4(0,0,0,1),r.alphaMode=d.Constants.ALPHA_DISABLE,r.backFaceCulling=!1,r._blueGradientTexture=new d.Texture(e.BLUE_GRADIENT_TEXTURE_URL,r.getScene(),!0,!1,d.Texture.NEAREST_SAMPLINGMODE),r._decalTexture=new d.Texture("",r.getScene()),r._reflectionMapTexture=new d.Texture("",r.getScene()),r._indirectEnvTexture=new d.Texture("",r.getScene()),r}return l(e,t),e.prototype.needAlphaBlending=function(){return!1},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new Yt);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,d.PrepareDefinesForAttributes)(t,o,!1,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new d.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,d.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[d.VertexBuffer.PositionKind];o.NORMAL&&s.push(d.VertexBuffer.NormalKind),o.UV1&&s.push(d.VertexBuffer.UVKind),o.UV2&&s.push(d.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(d.VertexBuffer.ColorKind),o.TANGENT&&s.push(d.VertexBuffer.TangentKind),(0,d.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","viewProjection","cameraPosition","_Radius_","_Bevel_Front_","_Bevel_Front_Stretch_","_Bevel_Back_","_Bevel_Back_Stretch_","_Radius_Top_Left_","_Radius_Top_Right_","_Radius_Bottom_Left_","_Radius_Bottom_Right_","_Bulge_Enabled_","_Bulge_Height_","_Bulge_Radius_","_Sun_Intensity_","_Sun_Theta_","_Sun_Phi_","_Indirect_Diffuse_","_Albedo_","_Specular_","_Shininess_","_Sharpness_","_Subsurface_","_Left_Color_","_Right_Color_","_Reflection_","_Front_Reflect_","_Edge_Reflect_","_Power_","_Sky_Color_","_Horizon_Color_","_Ground_Color_","_Horizon_Power_","_Reflection_Map_","_Indirect_Environment_","_Width_","_Fuzz_","_Min_Fuzz_","_Clip_Fade_","_Hue_Shift_","_Saturation_Shift_","_Value_Shift_","_Blob_Position_","_Blob_Intensity_","_Blob_Near_Size_","_Blob_Far_Size_","_Blob_Near_Distance_","_Blob_Far_Distance_","_Blob_Fade_Length_","_Blob_Pulse_","_Blob_Fade_","_Blob_Texture_","_Blob_Position_2_","_Blob_Near_Size_2_","_Blob_Pulse_2_","_Blob_Fade_2_","_Left_Index_Pos_","_Right_Index_Pos_","_Left_Index_Middle_Pos_","_Right_Index_Middle_Pos_","_Decal_","_Decal_Scale_XY_","_Decal_Front_Only_","_Rim_Intensity_","_Rim_Texture_","_Rim_Hue_Shift_","_Rim_Saturation_Shift_","_Rim_Value_Shift_","_Iridescence_Intensity_","_Iridescence_Texture_","Use_Global_Left_Index","Use_Global_Right_Index","Global_Left_Index_Tip_Position","Global_Right_Index_Tip_Position","Global_Left_Thumb_Tip_Position","Global_Right_Thumb_Tip_Position","Global_Left_Index_Middle_Position;","Global_Right_Index_Middle_Position","Global_Left_Index_Tip_Proximity","Global_Right_Index_Tip_Proximity"],h=["_Rim_Texture_","_Iridescence_Texture_"],c=[];(0,d.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("mrdlSliderBar",{attributes:s,uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o,this._materialContext)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){if(i.materialDefines){var o=i.effect;o&&(this._activeEffect=o,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",this.getScene().getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",this.getScene().activeCamera.position),this._activeEffect.setFloat("_Radius_",this.radius),this._activeEffect.setFloat("_Bevel_Front_",this.bevelFront),this._activeEffect.setFloat("_Bevel_Front_Stretch_",this.bevelFrontStretch),this._activeEffect.setFloat("_Bevel_Back_",this.bevelBack),this._activeEffect.setFloat("_Bevel_Back_Stretch_",this.bevelBackStretch),this._activeEffect.setFloat("_Radius_Top_Left_",this.radiusTopLeft),this._activeEffect.setFloat("_Radius_Top_Right_",this.radiusTopRight),this._activeEffect.setFloat("_Radius_Bottom_Left_",this.radiusBottomLeft),this._activeEffect.setFloat("_Radius_Bottom_Right_",this.radiusBottomRight),this._activeEffect.setFloat("_Bulge_Enabled_",this.bulgeEnabled?1:0),this._activeEffect.setFloat("_Bulge_Height_",this.bulgeHeight),this._activeEffect.setFloat("_Bulge_Radius_",this.bulgeRadius),this._activeEffect.setFloat("_Sun_Intensity_",this.sunIntensity),this._activeEffect.setFloat("_Sun_Theta_",this.sunTheta),this._activeEffect.setFloat("_Sun_Phi_",this.sunPhi),this._activeEffect.setFloat("_Indirect_Diffuse_",this.indirectDiffuse),this._activeEffect.setDirectColor4("_Albedo_",this.albedo),this._activeEffect.setFloat("_Specular_",this.specular),this._activeEffect.setFloat("_Shininess_",this.shininess),this._activeEffect.setFloat("_Sharpness_",this.sharpness),this._activeEffect.setFloat("_Subsurface_",this.subsurface),this._activeEffect.setDirectColor4("_Left_Color_",this.leftGradientColor),this._activeEffect.setDirectColor4("_Right_Color_",this.rightGradientColor),this._activeEffect.setFloat("_Reflection_",this.reflection),this._activeEffect.setFloat("_Front_Reflect_",this.frontReflect),this._activeEffect.setFloat("_Edge_Reflect_",this.edgeReflect),this._activeEffect.setFloat("_Power_",this.power),this._activeEffect.setDirectColor4("_Sky_Color_",this.skyColor),this._activeEffect.setDirectColor4("_Horizon_Color_",this.horizonColor),this._activeEffect.setDirectColor4("_Ground_Color_",this.groundColor),this._activeEffect.setFloat("_Horizon_Power_",this.horizonPower),this._activeEffect.setTexture("_Reflection_Map_",this._reflectionMapTexture),this._activeEffect.setTexture("_Indirect_Environment_",this._indirectEnvTexture),this._activeEffect.setFloat("_Width_",this.width),this._activeEffect.setFloat("_Fuzz_",this.fuzz),this._activeEffect.setFloat("_Min_Fuzz_",this.minFuzz),this._activeEffect.setFloat("_Clip_Fade_",this.clipFade),this._activeEffect.setFloat("_Hue_Shift_",this.hueShift),this._activeEffect.setFloat("_Saturation_Shift_",this.saturationShift),this._activeEffect.setFloat("_Value_Shift_",this.valueShift),this._activeEffect.setVector3("_Blob_Position_",this.blobPosition),this._activeEffect.setFloat("_Blob_Intensity_",this.blobIntensity),this._activeEffect.setFloat("_Blob_Near_Size_",this.blobNearSize),this._activeEffect.setFloat("_Blob_Far_Size_",this.blobFarSize),this._activeEffect.setFloat("_Blob_Near_Distance_",this.blobNearDistance),this._activeEffect.setFloat("_Blob_Far_Distance_",this.blobFarDistance),this._activeEffect.setFloat("_Blob_Fade_Length_",this.blobFadeLength),this._activeEffect.setFloat("_Blob_Pulse_",this.blobPulse),this._activeEffect.setFloat("_Blob_Fade_",this.blobFade),this._activeEffect.setTexture("_Blob_Texture_",this.blobTexture),this._activeEffect.setVector3("_Blob_Position_2_",this.blobPosition2),this._activeEffect.setFloat("_Blob_Near_Size_2_",this.blobNearSize2),this._activeEffect.setFloat("_Blob_Pulse_2_",this.blobPulse2),this._activeEffect.setFloat("_Blob_Fade_2_",this.blobFade2),this._activeEffect.setVector3("_Left_Index_Pos_",this.leftIndexPosition),this._activeEffect.setVector3("_Right_Index_Pos_",this.rightIndexPosition),this._activeEffect.setVector3("_Left_Index_Middle_Pos_",this.leftIndexMiddlePosition),this._activeEffect.setVector3("_Right_Index_Middle_Pos_",this.rightIndexMiddlePosition),this._activeEffect.setTexture("_Decal_",this._decalTexture),this._activeEffect.setVector2("_Decal_Scale_XY_",this.decalScaleXY),this._activeEffect.setFloat("_Decal_Front_Only_",this.decalFrontOnly?1:0),this._activeEffect.setFloat("_Rim_Intensity_",this.rimIntensity),this._activeEffect.setTexture("_Rim_Texture_",this._blueGradientTexture),this._activeEffect.setFloat("_Rim_Hue_Shift_",this.rimHueShift),this._activeEffect.setFloat("_Rim_Saturation_Shift_",this.rimSaturationShift),this._activeEffect.setFloat("_Rim_Value_Shift_",this.rimValueShift),this._activeEffect.setFloat("_Iridescence_Intensity_",this.iridescenceIntensity),this._activeEffect.setTexture("_Iridescence_Texture_",this._blueGradientTexture),this._activeEffect.setFloat("Use_Global_Left_Index",this.useGlobalLeftIndex),this._activeEffect.setFloat("Use_Global_Right_Index",this.useGlobalRightIndex),this._activeEffect.setVector4("Global_Left_Index_Tip_Position",this.globalLeftIndexTipPosition),this._activeEffect.setVector4("Global_Right_Index_Tip_Position",this.globaRightIndexTipPosition),this._activeEffect.setVector4("Global_Left_Thumb_Tip_Position",this.globalLeftThumbTipPosition),this._activeEffect.setVector4("Global_Right_Thumb_Tip_Position",this.globalRightThumbTipPosition),this._activeEffect.setVector4("Global_Left_Index_Middle_Position",this.globalLeftIndexMiddlePosition),this._activeEffect.setVector4("Global_Right_Index_Middle_Position",this.globalRightIndexMiddlePosition),this._activeEffect.setFloat("Global_Left_Index_Tip_Proximity",this.globalLeftIndexTipProximity),this._activeEffect.setFloat("Global_Right_Index_Tip_Proximity",this.globalRightIndexTipProximity),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),this._reflectionMapTexture.dispose(),this._indirectEnvTexture.dispose(),this._blueGradientTexture.dispose(),this._decalTexture.dispose()},e.prototype.clone=function(t){var i=this;return d.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var e=t.prototype.serialize.call(this);return e.customType="BABYLON.MRDLSliderBarMaterial",e},e.prototype.getClassName=function(){return"MRDLSliderBarMaterial"},e.Parse=function(t,i,o){return d.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},e.BLUE_GRADIENT_TEXTURE_URL="https://assets.babylonjs.com/meshes/MRTK/MRDL/mrtk-mrdl-blue-gradient.png",h([(0,d.serialize)()],e.prototype,"radius",void 0),h([(0,d.serialize)()],e.prototype,"bevelFront",void 0),h([(0,d.serialize)()],e.prototype,"bevelFrontStretch",void 0),h([(0,d.serialize)()],e.prototype,"bevelBack",void 0),h([(0,d.serialize)()],e.prototype,"bevelBackStretch",void 0),h([(0,d.serialize)()],e.prototype,"radiusTopLeft",void 0),h([(0,d.serialize)()],e.prototype,"radiusTopRight",void 0),h([(0,d.serialize)()],e.prototype,"radiusBottomLeft",void 0),h([(0,d.serialize)()],e.prototype,"radiusBottomRight",void 0),h([(0,d.serialize)()],e.prototype,"bulgeEnabled",void 0),h([(0,d.serialize)()],e.prototype,"bulgeHeight",void 0),h([(0,d.serialize)()],e.prototype,"bulgeRadius",void 0),h([(0,d.serialize)()],e.prototype,"sunIntensity",void 0),h([(0,d.serialize)()],e.prototype,"sunTheta",void 0),h([(0,d.serialize)()],e.prototype,"sunPhi",void 0),h([(0,d.serialize)()],e.prototype,"indirectDiffuse",void 0),h([(0,d.serialize)()],e.prototype,"albedo",void 0),h([(0,d.serialize)()],e.prototype,"specular",void 0),h([(0,d.serialize)()],e.prototype,"shininess",void 0),h([(0,d.serialize)()],e.prototype,"sharpness",void 0),h([(0,d.serialize)()],e.prototype,"subsurface",void 0),h([(0,d.serialize)()],e.prototype,"leftGradientColor",void 0),h([(0,d.serialize)()],e.prototype,"rightGradientColor",void 0),h([(0,d.serialize)()],e.prototype,"reflection",void 0),h([(0,d.serialize)()],e.prototype,"frontReflect",void 0),h([(0,d.serialize)()],e.prototype,"edgeReflect",void 0),h([(0,d.serialize)()],e.prototype,"power",void 0),h([(0,d.serialize)()],e.prototype,"skyColor",void 0),h([(0,d.serialize)()],e.prototype,"horizonColor",void 0),h([(0,d.serialize)()],e.prototype,"groundColor",void 0),h([(0,d.serialize)()],e.prototype,"horizonPower",void 0),h([(0,d.serialize)()],e.prototype,"width",void 0),h([(0,d.serialize)()],e.prototype,"fuzz",void 0),h([(0,d.serialize)()],e.prototype,"minFuzz",void 0),h([(0,d.serialize)()],e.prototype,"clipFade",void 0),h([(0,d.serialize)()],e.prototype,"hueShift",void 0),h([(0,d.serialize)()],e.prototype,"saturationShift",void 0),h([(0,d.serialize)()],e.prototype,"valueShift",void 0),h([(0,d.serialize)()],e.prototype,"blobPosition",void 0),h([(0,d.serialize)()],e.prototype,"blobIntensity",void 0),h([(0,d.serialize)()],e.prototype,"blobNearSize",void 0),h([(0,d.serialize)()],e.prototype,"blobFarSize",void 0),h([(0,d.serialize)()],e.prototype,"blobNearDistance",void 0),h([(0,d.serialize)()],e.prototype,"blobFarDistance",void 0),h([(0,d.serialize)()],e.prototype,"blobFadeLength",void 0),h([(0,d.serialize)()],e.prototype,"blobPulse",void 0),h([(0,d.serialize)()],e.prototype,"blobFade",void 0),h([(0,d.serialize)()],e.prototype,"blobPosition2",void 0),h([(0,d.serialize)()],e.prototype,"blobNearSize2",void 0),h([(0,d.serialize)()],e.prototype,"blobPulse2",void 0),h([(0,d.serialize)()],e.prototype,"blobFade2",void 0),h([(0,d.serialize)()],e.prototype,"blobTexture",void 0),h([(0,d.serialize)()],e.prototype,"leftIndexPosition",void 0),h([(0,d.serialize)()],e.prototype,"rightIndexPosition",void 0),h([(0,d.serialize)()],e.prototype,"leftIndexMiddlePosition",void 0),h([(0,d.serialize)()],e.prototype,"rightIndexMiddlePosition",void 0),h([(0,d.serialize)()],e.prototype,"decalScaleXY",void 0),h([(0,d.serialize)()],e.prototype,"decalFrontOnly",void 0),h([(0,d.serialize)()],e.prototype,"rimIntensity",void 0),h([(0,d.serialize)()],e.prototype,"rimHueShift",void 0),h([(0,d.serialize)()],e.prototype,"rimSaturationShift",void 0),h([(0,d.serialize)()],e.prototype,"rimValueShift",void 0),h([(0,d.serialize)()],e.prototype,"iridescenceIntensity",void 0),e}(d.PushMaterial);(0,d.RegisterClass)("BABYLON.GUI.MRDLSliderBarMaterial",Xt);d.ShaderStore.ShadersStore.mrdlSliderThumbPixelShader="uniform vec3 cameraPosition;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vColor;varying vec4 vExtra1;varying vec4 vExtra2;varying vec4 vExtra3;uniform float _Radius_;uniform float _Bevel_Front_;uniform float _Bevel_Front_Stretch_;uniform float _Bevel_Back_;uniform float _Bevel_Back_Stretch_;uniform float _Radius_Top_Left_;uniform float _Radius_Top_Right_;uniform float _Radius_Bottom_Left_;uniform float _Radius_Bottom_Right_;uniform bool _Bulge_Enabled_;uniform float _Bulge_Height_;uniform float _Bulge_Radius_;uniform float _Sun_Intensity_;uniform float _Sun_Theta_;uniform float _Sun_Phi_;uniform float _Indirect_Diffuse_;uniform vec4 _Albedo_;uniform float _Specular_;uniform float _Shininess_;uniform float _Sharpness_;uniform float _Subsurface_;uniform vec4 _Left_Color_;uniform vec4 _Right_Color_;uniform float _Reflection_;uniform float _Front_Reflect_;uniform float _Edge_Reflect_;uniform float _Power_;uniform vec4 _Sky_Color_;uniform vec4 _Horizon_Color_;uniform vec4 _Ground_Color_;uniform float _Horizon_Power_;uniform sampler2D _Reflection_Map_;uniform sampler2D _Indirect_Environment_;uniform float _Width_;uniform float _Fuzz_;uniform float _Min_Fuzz_;uniform float _Clip_Fade_;uniform float _Hue_Shift_;uniform float _Saturation_Shift_;uniform float _Value_Shift_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform sampler2D _Blob_Texture_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform vec3 _Left_Index_Pos_;uniform vec3 _Right_Index_Pos_;uniform vec3 _Left_Index_Middle_Pos_;uniform vec3 _Right_Index_Middle_Pos_;uniform sampler2D _Decal_;uniform vec2 _Decal_Scale_XY_;uniform bool _Decal_Front_Only_;uniform float _Rim_Intensity_;uniform sampler2D _Rim_Texture_;uniform float _Rim_Hue_Shift_;uniform float _Rim_Saturation_Shift_;uniform float _Rim_Value_Shift_;uniform float _Iridescence_Intensity_;uniform sampler2D _Iridescence_Texture_;uniform bool Use_Global_Left_Index;uniform bool Use_Global_Right_Index;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;uniform vec4 Global_Left_Thumb_Tip_Position;uniform vec4 Global_Right_Thumb_Tip_Position;uniform vec4 Global_Left_Index_Middle_Position;uniform vec4 Global_Right_Index_Middle_Position;uniform float Global_Left_Index_Tip_Proximity;uniform float Global_Right_Index_Tip_Proximity;void Blob_Fragment_B180(\nsampler2D Blob_Texture,\nvec4 Blob_Info1,\nvec4 Blob_Info2,\nout vec4 Blob_Color)\n{float k1=dot(Blob_Info1.xy,Blob_Info1.xy);float k2=dot(Blob_Info2.xy,Blob_Info2.xy);vec3 closer=k10.0) {C=mix(H,S,k);} else {C=mix(H,G,k); }\nreturn C;}\nvoid Sky_Environment_B200(\nvec3 Normal,\nvec3 Reflected,\nvec4 Sky_Color,\nvec4 Horizon_Color,\nvec4 Ground_Color,\nfloat Horizon_Power,\nout vec4 Reflected_Color,\nout vec4 Indirect_Color)\n{Reflected_Color=SampleEnv_Bid200(Reflected,Sky_Color,Horizon_Color,Ground_Color,Horizon_Power);Indirect_Color=mix(Ground_Color,Sky_Color,Normal.y*0.5+0.5);}\nvoid Min_Segment_Distance_B215(\nvec3 P0,\nvec3 P1,\nvec3 Q0,\nvec3 Q1,\nout vec3 NearP,\nout vec3 NearQ,\nout float Distance)\n{vec3 u=P1-P0;vec3 v=Q1-Q0;vec3 w=P0-Q0;float a=dot(u,u);float b=dot(u,v);float c=dot(v,v);float d=dot(u,w);float e=dot(v,w);float D=a*c-b*b;float sD=D;float tD=D;float sc,sN,tc,tN;if (D<0.00001) {sN=0.0;sD=1.0;tN=e;tD=c;} else {sN=(b*e-c*d);tN=(a*e-b*d);if (sN<0.0) {sN=0.0;tN=e;tD=c;} else if (sN>sD) {sN=sD;tN=e+b;tD=c;}}\nif (tN<0.0) {tN=0.0;if (-d<0.0) {sN=0.0;} else if (-d>a) {sN=sD;} else {sN=-d;sD=a;}} else if (tN>tD) {tN=tD;if ((-d+b)<0.0) {sN=0.0;} else if ((-d+b)>a) {sN=sD;} else {sN=(-d+b);sD=a;}}\nsc=abs(sN)<0.000001 ? 0.0 : sN/sD;tc=abs(tN)<0.000001 ? 0.0 : tN/tD;NearP=P0+sc*u;NearQ=Q0+tc*v;Distance=distance(NearP,NearQ);}\nvoid To_XYZ_B224(\nvec3 Vec3,\nout float X,\nout float Y,\nout float Z)\n{X=Vec3.x;Y=Vec3.y;Z=Vec3.z;}\nvoid Finger_Positions_B214(\nvec3 Left_Index_Pos,\nvec3 Right_Index_Pos,\nvec3 Left_Index_Middle_Pos,\nvec3 Right_Index_Middle_Pos,\nout vec3 Left_Index,\nout vec3 Right_Index,\nout vec3 Left_Index_Middle,\nout vec3 Right_Index_Middle)\n{Left_Index= (Use_Global_Left_Index ? Global_Left_Index_Tip_Position.xyz : Left_Index_Pos);Right_Index= (Use_Global_Right_Index ? Global_Right_Index_Tip_Position.xyz : Right_Index_Pos);Left_Index_Middle= (Use_Global_Left_Index ? Global_Left_Index_Middle_Position.xyz : Left_Index_Middle_Pos);Right_Index_Middle= (Use_Global_Right_Index ? Global_Right_Index_Middle_Position.xyz : Right_Index_Middle_Pos);}\nvoid VaryHSV_B258(\nvec3 HSV_In,\nfloat Hue_Shift,\nfloat Saturation_Shift,\nfloat Value_Shift,\nout vec3 HSV_Out)\n{HSV_Out=vec3(fract(HSV_In.x+Hue_Shift),clamp(HSV_In.y+Saturation_Shift,0.0,1.0),clamp(HSV_In.z+Value_Shift,0.0,1.0));}\nvoid Remap_Range_B264(\nfloat In_Min,\nfloat In_Max,\nfloat Out_Min,\nfloat Out_Max,\nfloat In,\nout float Out)\n{Out=mix(Out_Min,Out_Max,clamp((In-In_Min)/(In_Max-In_Min),0.0,1.0));}\nvoid To_HSV_B225(\nvec4 Color,\nout float Hue,\nout float Saturation,\nout float Value,\nout float Alpha,\nout vec3 HSV)\n{vec4 K=vec4(0.0,-1.0/3.0,2.0/3.0,-1.0);vec4 p=Color.g0.0;Result=Position.x<0.0 ? (whichY ? Radius_Top_Left : Radius_Bottom_Left) : (whichY ? Radius_Top_Right : Radius_Bottom_Right);Result*=Radius;}\nvoid Conditional_Float_B186(\nbool Which,\nfloat If_True,\nfloat If_False,\nout float Result)\n{Result=Which ? If_True : If_False;}\nvoid Greater_Than_B187(\nfloat Left,\nfloat Right,\nout bool Not_Greater_Than,\nout bool Greater_Than)\n{Greater_Than=Left>Right;Not_Greater_Than=!Greater_Than;}\nvoid Remap_Range_B255(\nfloat In_Min,\nfloat In_Max,\nfloat Out_Min,\nfloat Out_Max,\nfloat In,\nout float Out)\n{Out=mix(Out_Min,Out_Max,clamp((In-In_Min)/(In_Max-In_Min),0.0,1.0));}\nvoid main()\n{vec2 XY_Q235;XY_Q235=(uv-vec2(0.5,0.5))*_Decal_Scale_XY_+vec2(0.5,0.5);vec3 Tangent_World_Q177;vec3 Tangent_World_N_Q177;float Tangent_Length_Q177;Tangent_World_Q177=(world*vec4(vec3(1,0,0),0.0)).xyz;Tangent_Length_Q177=length(Tangent_World_Q177);Tangent_World_N_Q177=Tangent_World_Q177/Tangent_Length_Q177;vec3 Normal_World_Q210;vec3 Normal_World_N_Q210;float Normal_Length_Q210;Object_To_World_Dir_B210(vec3(0,0,1),Normal_World_Q210,Normal_World_N_Q210,Normal_Length_Q210);float X_Q228;float Y_Q228;float Z_Q228;To_XYZ_B228(position,X_Q228,Y_Q228,Z_Q228);vec3 Nrm_World_Q176;Nrm_World_Q176=normalize((world*vec4(normal,0.0)).xyz);vec3 Binormal_World_Q178;vec3 Binormal_World_N_Q178;float Binormal_Length_Q178;Object_To_World_Dir_B178(vec3(0,1,0),Binormal_World_Q178,Binormal_World_N_Q178,Binormal_Length_Q178);float Anisotropy_Q179=Tangent_Length_Q177/Binormal_Length_Q178;float Result_Q219;Pick_Radius_B219(_Radius_,_Radius_Top_Left_,_Radius_Top_Right_,_Radius_Bottom_Left_,_Radius_Bottom_Right_,position,Result_Q219);float Anisotropy_Q203=Binormal_Length_Q178/Normal_Length_Q210;bool Not_Greater_Than_Q187;bool Greater_Than_Q187;Greater_Than_B187(Z_Q228,0.0,Not_Greater_Than_Q187,Greater_Than_Q187);vec4 Linear_Q251;Linear_Q251.rgb=clamp(_Left_Color_.rgb*_Left_Color_.rgb,0.0,1.0);Linear_Q251.a=_Left_Color_.a;vec4 Linear_Q252;Linear_Q252.rgb=clamp(_Right_Color_.rgb*_Right_Color_.rgb,0.0,1.0);Linear_Q252.a=_Right_Color_.a;vec3 Difference_Q211=vec3(0,0,0)-Normal_World_N_Q210;vec4 Out_Color_Q184=vec4(X_Q228,Y_Q228,Z_Q228,1);float Result_Q186;Conditional_Float_B186(Greater_Than_Q187,_Bevel_Back_,_Bevel_Front_,Result_Q186);float Result_Q244;Conditional_Float_B186(Greater_Than_Q187,_Bevel_Back_Stretch_,_Bevel_Front_Stretch_,Result_Q244);vec3 New_P_Q280;vec2 New_UV_Q280;float Radial_Gradient_Q280;vec3 Radial_Dir_Q280;vec3 New_Normal_Q280;Move_Verts_B280(Anisotropy_Q179,position,Result_Q219,Result_Q186,normal,Anisotropy_Q203,Result_Q244,New_P_Q280,New_UV_Q280,Radial_Gradient_Q280,Radial_Dir_Q280,New_Normal_Q280);float X_Q248;float Y_Q248;X_Q248=New_UV_Q280.x;Y_Q248=New_UV_Q280.y;vec3 Pos_World_Q162;Object_To_World_Pos_B162(New_P_Q280,Pos_World_Q162);vec3 Nrm_World_Q182;Object_To_World_Normal_B182(New_Normal_Q280,Nrm_World_Q182);vec4 Blob_Info_Q173;\n#if BLOB_ENABLE\nBlob_Vertex_B173(Pos_World_Q162,Nrm_World_Q176,Tangent_World_N_Q177,Binormal_World_N_Q178,_Blob_Position_,_Blob_Intensity_,_Blob_Near_Size_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_,_Blob_Fade_,Blob_Info_Q173);\n#else\nBlob_Info_Q173=vec4(0,0,0,0);\n#endif\nvec4 Blob_Info_Q174;\n#if BLOB_ENABLE_2\nBlob_Vertex_B174(Pos_World_Q162,Nrm_World_Q176,Tangent_World_N_Q177,Binormal_World_N_Q178,_Blob_Position_2_,_Blob_Intensity_,_Blob_Near_Size_2_,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,_Blob_Fade_Length_,_Blob_Pulse_2_,_Blob_Fade_2_,Blob_Info_Q174);\n#else\nBlob_Info_Q174=vec4(0,0,0,0);\n#endif\nfloat Out_Q255;Remap_Range_B255(0.0,1.0,0.0,1.0,X_Q248,Out_Q255);float X_Q236;float Y_Q236;float Z_Q236;To_XYZ_B228(Nrm_World_Q182,X_Q236,Y_Q236,Z_Q236);vec4 Color_At_T_Q247=mix(Linear_Q251,Linear_Q252,Out_Q255);float Minus_F_Q237=-Z_Q236;float R_Q249;float G_Q249;float B_Q249;float A_Q249;R_Q249=Color_At_T_Q247.r; G_Q249=Color_At_T_Q247.g; B_Q249=Color_At_T_Q247.b; A_Q249=Color_At_T_Q247.a;float ClampF_Q238=clamp(0.0,Minus_F_Q237,1.0);float Result_Q243;Conditional_Float_B243(_Decal_Front_Only_,ClampF_Q238,1.0,Result_Q243);vec4 Vec4_Q239=vec4(Result_Q243,Radial_Gradient_Q280,G_Q249,B_Q249);vec3 Position=Pos_World_Q162;vec3 Normal=Nrm_World_Q182;vec2 UV=XY_Q235;vec3 Tangent=Tangent_World_N_Q177;vec3 Binormal=Difference_Q211;vec4 Color=Out_Color_Q184;vec4 Extra1=Vec4_Q239;vec4 Extra2=Blob_Info_Q173;vec4 Extra3=Blob_Info_Q174;gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vColor=Color;vExtra1=Extra1;vExtra2=Extra2;vExtra3=Extra3;}";var Kt=function(t){function e(){var e=t.call(this)||this;return e.SKY_ENABLED=!0,e.BLOB_ENABLE_2=!0,e.IRIDESCENCE_ENABLED=!0,e._needNormals=!0,e._needUVs=!0,e.rebuild(),e}return l(e,t),e}(d.MaterialDefines),Zt=function(t){function e(i,o){var r=t.call(this,i,o)||this;return r.radius=.157,r.bevelFront=.065,r.bevelFrontStretch=.077,r.bevelBack=.031,r.bevelBackStretch=0,r.radiusTopLeft=1,r.radiusTopRight=1,r.radiusBottomLeft=1,r.radiusBottomRight=1,r.bulgeEnabled=!1,r.bulgeHeight=-.323,r.bulgeRadius=.73,r.sunIntensity=2,r.sunTheta=.937,r.sunPhi=.555,r.indirectDiffuse=1,r.albedo=new d.Color4(.0117647,.505882,.996078,1),r.specular=0,r.shininess=10,r.sharpness=0,r.subsurface=.31,r.leftGradientColor=new d.Color4(.0117647,.505882,.996078,1),r.rightGradientColor=new d.Color4(.0117647,.505882,.996078,1),r.reflection=.749,r.frontReflect=0,r.edgeReflect=.09,r.power=8.1,r.skyColor=new d.Color4(.0117647,.960784,.996078,1),r.horizonColor=new d.Color4(.0117647,.333333,.996078,1),r.groundColor=new d.Color4(0,.254902,.996078,1),r.horizonPower=1,r.width=.02,r.fuzz=.5,r.minFuzz=.001,r.clipFade=.01,r.hueShift=0,r.saturationShift=0,r.valueShift=0,r.blobPosition=new d.Vector3(0,0,.1),r.blobIntensity=.5,r.blobNearSize=.01,r.blobFarSize=.03,r.blobNearDistance=0,r.blobFarDistance=.08,r.blobFadeLength=.576,r.blobPulse=0,r.blobFade=1,r.blobPosition2=new d.Vector3(.2,0,.1),r.blobNearSize2=.01,r.blobPulse2=0,r.blobFade2=1,r.blobTexture=new d.Texture("",r.getScene()),r.leftIndexPosition=new d.Vector3(0,0,1),r.rightIndexPosition=new d.Vector3(-1,-1,-1),r.leftIndexMiddlePosition=new d.Vector3(0,0,0),r.rightIndexMiddlePosition=new d.Vector3(0,0,0),r.decalScaleXY=new d.Vector2(1.5,1.5),r.decalFrontOnly=!0,r.rimIntensity=.287,r.rimHueShift=0,r.rimSaturationShift=0,r.rimValueShift=-1,r.iridescenceIntensity=0,r.useGlobalLeftIndex=1,r.useGlobalRightIndex=1,r.globalLeftIndexTipProximity=0,r.globalRightIndexTipProximity=0,r.globalLeftIndexTipPosition=new d.Vector4(.5,0,-.55,1),r.globaRightIndexTipPosition=new d.Vector4(0,0,0,1),r.globalLeftThumbTipPosition=new d.Vector4(.5,0,-.55,1),r.globalRightThumbTipPosition=new d.Vector4(0,0,0,1),r.globalLeftIndexMiddlePosition=new d.Vector4(.5,0,-.55,1),r.globalRightIndexMiddlePosition=new d.Vector4(0,0,0,1),r.alphaMode=d.Constants.ALPHA_DISABLE,r.backFaceCulling=!1,r._blueGradientTexture=new d.Texture(e.BLUE_GRADIENT_TEXTURE_URL,o,!0,!1,d.Texture.NEAREST_SAMPLINGMODE),r._decalTexture=new d.Texture("",r.getScene()),r._reflectionMapTexture=new d.Texture("",r.getScene()),r._indirectEnvTexture=new d.Texture("",r.getScene()),r}return l(e,t),e.prototype.needAlphaBlending=function(){return!1},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new Kt);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,d.PrepareDefinesForAttributes)(t,o,!1,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new d.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,d.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[d.VertexBuffer.PositionKind];o.NORMAL&&s.push(d.VertexBuffer.NormalKind),o.UV1&&s.push(d.VertexBuffer.UVKind),o.UV2&&s.push(d.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(d.VertexBuffer.ColorKind),o.TANGENT&&s.push(d.VertexBuffer.TangentKind),(0,d.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","viewProjection","cameraPosition","_Radius_","_Bevel_Front_","_Bevel_Front_Stretch_","_Bevel_Back_","_Bevel_Back_Stretch_","_Radius_Top_Left_","_Radius_Top_Right_","_Radius_Bottom_Left_","_Radius_Bottom_Right_","_Bulge_Enabled_","_Bulge_Height_","_Bulge_Radius_","_Sun_Intensity_","_Sun_Theta_","_Sun_Phi_","_Indirect_Diffuse_","_Albedo_","_Specular_","_Shininess_","_Sharpness_","_Subsurface_","_Left_Color_","_Right_Color_","_Reflection_","_Front_Reflect_","_Edge_Reflect_","_Power_","_Sky_Color_","_Horizon_Color_","_Ground_Color_","_Horizon_Power_","_Reflection_Map_","_Indirect_Environment_","_Width_","_Fuzz_","_Min_Fuzz_","_Clip_Fade_","_Hue_Shift_","_Saturation_Shift_","_Value_Shift_","_Blob_Position_","_Blob_Intensity_","_Blob_Near_Size_","_Blob_Far_Size_","_Blob_Near_Distance_","_Blob_Far_Distance_","_Blob_Fade_Length_","_Blob_Pulse_","_Blob_Fade_","_Blob_Texture_","_Blob_Position_2_","_Blob_Near_Size_2_","_Blob_Pulse_2_","_Blob_Fade_2_","_Left_Index_Pos_","_Right_Index_Pos_","_Left_Index_Middle_Pos_","_Right_Index_Middle_Pos_","_Decal_","_Decal_Scale_XY_","_Decal_Front_Only_","_Rim_Intensity_","_Rim_Texture_","_Rim_Hue_Shift_","_Rim_Saturation_Shift_","_Rim_Value_Shift_","_Iridescence_Intensity_","_Iridescence_Texture_","Use_Global_Left_Index","Use_Global_Right_Index","Global_Left_Index_Tip_Position","Global_Right_Index_Tip_Position","Global_Left_Thumb_Tip_Position","Global_Right_Thumb_Tip_Position","Global_Left_Index_Middle_Position;","Global_Right_Index_Middle_Position","Global_Left_Index_Tip_Proximity","Global_Right_Index_Tip_Proximity"],h=["_Rim_Texture_","_Iridescence_Texture_"],c=[];(0,d.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("mrdlSliderThumb",{attributes:s,uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){if(i.materialDefines){var o=i.effect;o&&(this._activeEffect=o,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",this.getScene().getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",this.getScene().activeCamera.position),this._activeEffect.setFloat("_Radius_",this.radius),this._activeEffect.setFloat("_Bevel_Front_",this.bevelFront),this._activeEffect.setFloat("_Bevel_Front_Stretch_",this.bevelFrontStretch),this._activeEffect.setFloat("_Bevel_Back_",this.bevelBack),this._activeEffect.setFloat("_Bevel_Back_Stretch_",this.bevelBackStretch),this._activeEffect.setFloat("_Radius_Top_Left_",this.radiusTopLeft),this._activeEffect.setFloat("_Radius_Top_Right_",this.radiusTopRight),this._activeEffect.setFloat("_Radius_Bottom_Left_",this.radiusBottomLeft),this._activeEffect.setFloat("_Radius_Bottom_Right_",this.radiusBottomRight),this._activeEffect.setFloat("_Bulge_Enabled_",this.bulgeEnabled?1:0),this._activeEffect.setFloat("_Bulge_Height_",this.bulgeHeight),this._activeEffect.setFloat("_Bulge_Radius_",this.bulgeRadius),this._activeEffect.setFloat("_Sun_Intensity_",this.sunIntensity),this._activeEffect.setFloat("_Sun_Theta_",this.sunTheta),this._activeEffect.setFloat("_Sun_Phi_",this.sunPhi),this._activeEffect.setFloat("_Indirect_Diffuse_",this.indirectDiffuse),this._activeEffect.setDirectColor4("_Albedo_",this.albedo),this._activeEffect.setFloat("_Specular_",this.specular),this._activeEffect.setFloat("_Shininess_",this.shininess),this._activeEffect.setFloat("_Sharpness_",this.sharpness),this._activeEffect.setFloat("_Subsurface_",this.subsurface),this._activeEffect.setDirectColor4("_Left_Color_",this.leftGradientColor),this._activeEffect.setDirectColor4("_Right_Color_",this.rightGradientColor),this._activeEffect.setFloat("_Reflection_",this.reflection),this._activeEffect.setFloat("_Front_Reflect_",this.frontReflect),this._activeEffect.setFloat("_Edge_Reflect_",this.edgeReflect),this._activeEffect.setFloat("_Power_",this.power),this._activeEffect.setDirectColor4("_Sky_Color_",this.skyColor),this._activeEffect.setDirectColor4("_Horizon_Color_",this.horizonColor),this._activeEffect.setDirectColor4("_Ground_Color_",this.groundColor),this._activeEffect.setFloat("_Horizon_Power_",this.horizonPower),this._activeEffect.setTexture("_Reflection_Map_",this._reflectionMapTexture),this._activeEffect.setTexture("_Indirect_Environment_",this._indirectEnvTexture),this._activeEffect.setFloat("_Width_",this.width),this._activeEffect.setFloat("_Fuzz_",this.fuzz),this._activeEffect.setFloat("_Min_Fuzz_",this.minFuzz),this._activeEffect.setFloat("_Clip_Fade_",this.clipFade),this._activeEffect.setFloat("_Hue_Shift_",this.hueShift),this._activeEffect.setFloat("_Saturation_Shift_",this.saturationShift),this._activeEffect.setFloat("_Value_Shift_",this.valueShift),this._activeEffect.setVector3("_Blob_Position_",this.blobPosition),this._activeEffect.setFloat("_Blob_Intensity_",this.blobIntensity),this._activeEffect.setFloat("_Blob_Near_Size_",this.blobNearSize),this._activeEffect.setFloat("_Blob_Far_Size_",this.blobFarSize),this._activeEffect.setFloat("_Blob_Near_Distance_",this.blobNearDistance),this._activeEffect.setFloat("_Blob_Far_Distance_",this.blobFarDistance),this._activeEffect.setFloat("_Blob_Fade_Length_",this.blobFadeLength),this._activeEffect.setFloat("_Blob_Pulse_",this.blobPulse),this._activeEffect.setFloat("_Blob_Fade_",this.blobFade),this._activeEffect.setTexture("_Blob_Texture_",this.blobTexture),this._activeEffect.setVector3("_Blob_Position_2_",this.blobPosition2),this._activeEffect.setFloat("_Blob_Near_Size_2_",this.blobNearSize2),this._activeEffect.setFloat("_Blob_Pulse_2_",this.blobPulse2),this._activeEffect.setFloat("_Blob_Fade_2_",this.blobFade2),this._activeEffect.setVector3("_Left_Index_Pos_",this.leftIndexPosition),this._activeEffect.setVector3("_Right_Index_Pos_",this.rightIndexPosition),this._activeEffect.setVector3("_Left_Index_Middle_Pos_",this.leftIndexMiddlePosition),this._activeEffect.setVector3("_Right_Index_Middle_Pos_",this.rightIndexMiddlePosition),this._activeEffect.setTexture("_Decal_",this._decalTexture),this._activeEffect.setVector2("_Decal_Scale_XY_",this.decalScaleXY),this._activeEffect.setFloat("_Decal_Front_Only_",this.decalFrontOnly?1:0),this._activeEffect.setFloat("_Rim_Intensity_",this.rimIntensity),this._activeEffect.setTexture("_Rim_Texture_",this._blueGradientTexture),this._activeEffect.setFloat("_Rim_Hue_Shift_",this.rimHueShift),this._activeEffect.setFloat("_Rim_Saturation_Shift_",this.rimSaturationShift),this._activeEffect.setFloat("_Rim_Value_Shift_",this.rimValueShift),this._activeEffect.setFloat("_Iridescence_Intensity_",this.iridescenceIntensity),this._activeEffect.setTexture("_Iridescence_Texture_",this._blueGradientTexture),this._activeEffect.setFloat("Use_Global_Left_Index",this.useGlobalLeftIndex),this._activeEffect.setFloat("Use_Global_Right_Index",this.useGlobalRightIndex),this._activeEffect.setVector4("Global_Left_Index_Tip_Position",this.globalLeftIndexTipPosition),this._activeEffect.setVector4("Global_Right_Index_Tip_Position",this.globaRightIndexTipPosition),this._activeEffect.setVector4("Global_Left_Thumb_Tip_Position",this.globalLeftThumbTipPosition),this._activeEffect.setVector4("Global_Right_Thumb_Tip_Position",this.globalRightThumbTipPosition),this._activeEffect.setVector4("Global_Left_Index_Middle_Position",this.globalLeftIndexMiddlePosition),this._activeEffect.setVector4("Global_Right_Index_Middle_Position",this.globalRightIndexMiddlePosition),this._activeEffect.setFloat("Global_Left_Index_Tip_Proximity",this.globalLeftIndexTipProximity),this._activeEffect.setFloat("Global_Right_Index_Tip_Proximity",this.globalRightIndexTipProximity),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),this._reflectionMapTexture.dispose(),this._indirectEnvTexture.dispose(),this._blueGradientTexture.dispose(),this._decalTexture.dispose()},e.prototype.clone=function(t){var i=this;return d.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var e=t.prototype.serialize.call(this);return e.customType="BABYLON.MRDLSliderThumbMaterial",e},e.prototype.getClassName=function(){return"MRDLSliderThumbMaterial"},e.Parse=function(t,i,o){return d.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},e.BLUE_GRADIENT_TEXTURE_URL="https://assets.babylonjs.com/meshes/MRTK/MRDL/mrtk-mrdl-blue-gradient.png",h([(0,d.serialize)()],e.prototype,"radius",void 0),h([(0,d.serialize)()],e.prototype,"bevelFront",void 0),h([(0,d.serialize)()],e.prototype,"bevelFrontStretch",void 0),h([(0,d.serialize)()],e.prototype,"bevelBack",void 0),h([(0,d.serialize)()],e.prototype,"bevelBackStretch",void 0),h([(0,d.serialize)()],e.prototype,"radiusTopLeft",void 0),h([(0,d.serialize)()],e.prototype,"radiusTopRight",void 0),h([(0,d.serialize)()],e.prototype,"radiusBottomLeft",void 0),h([(0,d.serialize)()],e.prototype,"radiusBottomRight",void 0),h([(0,d.serialize)()],e.prototype,"bulgeEnabled",void 0),h([(0,d.serialize)()],e.prototype,"bulgeHeight",void 0),h([(0,d.serialize)()],e.prototype,"bulgeRadius",void 0),h([(0,d.serialize)()],e.prototype,"sunIntensity",void 0),h([(0,d.serialize)()],e.prototype,"sunTheta",void 0),h([(0,d.serialize)()],e.prototype,"sunPhi",void 0),h([(0,d.serialize)()],e.prototype,"indirectDiffuse",void 0),h([(0,d.serialize)()],e.prototype,"albedo",void 0),h([(0,d.serialize)()],e.prototype,"specular",void 0),h([(0,d.serialize)()],e.prototype,"shininess",void 0),h([(0,d.serialize)()],e.prototype,"sharpness",void 0),h([(0,d.serialize)()],e.prototype,"subsurface",void 0),h([(0,d.serialize)()],e.prototype,"leftGradientColor",void 0),h([(0,d.serialize)()],e.prototype,"rightGradientColor",void 0),h([(0,d.serialize)()],e.prototype,"reflection",void 0),h([(0,d.serialize)()],e.prototype,"frontReflect",void 0),h([(0,d.serialize)()],e.prototype,"edgeReflect",void 0),h([(0,d.serialize)()],e.prototype,"power",void 0),h([(0,d.serialize)()],e.prototype,"skyColor",void 0),h([(0,d.serialize)()],e.prototype,"horizonColor",void 0),h([(0,d.serialize)()],e.prototype,"groundColor",void 0),h([(0,d.serialize)()],e.prototype,"horizonPower",void 0),h([(0,d.serialize)()],e.prototype,"width",void 0),h([(0,d.serialize)()],e.prototype,"fuzz",void 0),h([(0,d.serialize)()],e.prototype,"minFuzz",void 0),h([(0,d.serialize)()],e.prototype,"clipFade",void 0),h([(0,d.serialize)()],e.prototype,"hueShift",void 0),h([(0,d.serialize)()],e.prototype,"saturationShift",void 0),h([(0,d.serialize)()],e.prototype,"valueShift",void 0),h([(0,d.serialize)()],e.prototype,"blobPosition",void 0),h([(0,d.serialize)()],e.prototype,"blobIntensity",void 0),h([(0,d.serialize)()],e.prototype,"blobNearSize",void 0),h([(0,d.serialize)()],e.prototype,"blobFarSize",void 0),h([(0,d.serialize)()],e.prototype,"blobNearDistance",void 0),h([(0,d.serialize)()],e.prototype,"blobFarDistance",void 0),h([(0,d.serialize)()],e.prototype,"blobFadeLength",void 0),h([(0,d.serialize)()],e.prototype,"blobPulse",void 0),h([(0,d.serialize)()],e.prototype,"blobFade",void 0),h([(0,d.serialize)()],e.prototype,"blobPosition2",void 0),h([(0,d.serialize)()],e.prototype,"blobNearSize2",void 0),h([(0,d.serialize)()],e.prototype,"blobPulse2",void 0),h([(0,d.serialize)()],e.prototype,"blobFade2",void 0),h([(0,d.serialize)()],e.prototype,"blobTexture",void 0),h([(0,d.serialize)()],e.prototype,"leftIndexPosition",void 0),h([(0,d.serialize)()],e.prototype,"rightIndexPosition",void 0),h([(0,d.serialize)()],e.prototype,"leftIndexMiddlePosition",void 0),h([(0,d.serialize)()],e.prototype,"rightIndexMiddlePosition",void 0),h([(0,d.serialize)()],e.prototype,"decalScaleXY",void 0),h([(0,d.serialize)()],e.prototype,"decalFrontOnly",void 0),h([(0,d.serialize)()],e.prototype,"rimIntensity",void 0),h([(0,d.serialize)()],e.prototype,"rimHueShift",void 0),h([(0,d.serialize)()],e.prototype,"rimSaturationShift",void 0),h([(0,d.serialize)()],e.prototype,"rimValueShift",void 0),h([(0,d.serialize)()],e.prototype,"iridescenceIntensity",void 0),e}(d.PushMaterial);(0,d.RegisterClass)("BABYLON.GUI.MRDLSliderThumbMaterial",Zt);d.ShaderStore.ShadersStore.mrdlBackplatePixelShader="uniform vec3 cameraPosition;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vExtra1;varying vec4 vExtra2;uniform float _Radius_;uniform float _Line_Width_;uniform bool _Absolute_Sizes_;uniform float _Filter_Width_;uniform vec4 _Base_Color_;uniform vec4 _Line_Color_;uniform float _Radius_Top_Left_;uniform float _Radius_Top_Right_;uniform float _Radius_Bottom_Left_;uniform float _Radius_Bottom_Right_;uniform float _Rate_;uniform vec4 _Highlight_Color_;uniform float _Highlight_Width_;uniform vec4 _Highlight_Transform_;uniform float _Highlight_;uniform float _Iridescence_Intensity_;uniform float _Iridescence_Edge_Intensity_;uniform vec4 _Iridescence_Tint_;uniform sampler2D _Iridescent_Map_;uniform float _Angle_;uniform bool _Reflected_;uniform float _Frequency_;uniform float _Vertical_Offset_;uniform vec4 _Gradient_Color_;uniform vec4 _Top_Left_;uniform vec4 _Top_Right_;uniform vec4 _Bottom_Left_;uniform vec4 _Bottom_Right_;uniform float _Edge_Width_;uniform float _Edge_Power_;uniform float _Line_Gradient_Blend_;uniform float _Fade_Out_;void FastLinearTosRGB_B353(\nvec4 Linear,\nout vec4 sRGB)\n{sRGB.rgb=sqrt(clamp(Linear.rgb,0.0,1.0));sRGB.a=Linear.a;}\nvoid Round_Rect_Fragment_B332(\nfloat Radius,\nfloat Line_Width,\nvec4 Line_Color,\nfloat Filter_Width,\nvec2 UV,\nfloat Line_Visibility,\nvec4 Rect_Parms,\nvec4 Fill_Color,\nout vec4 Color)\n{float d=length(max(abs(UV)-Rect_Parms.xy,0.0));float dx=max(fwidth(d)*Filter_Width,0.00001);float g=min(Rect_Parms.z,Rect_Parms.w);float dgrad=max(fwidth(g)*Filter_Width,0.00001);float Inside_Rect=clamp(g/dgrad,0.0,1.0);float inner=clamp((d+dx*0.5-max(Radius-Line_Width,d-dx*0.5))/dx,0.0,1.0);Color=clamp(mix(Fill_Color,Line_Color,inner),0.0,1.0)*Inside_Rect;}\nvoid Iridescence_B343(\nvec3 Position,\nvec3 Normal,\nvec2 UV,\nvec3 Axis,\nvec3 Eye,\nvec4 Tint,\nsampler2D Texture,\nbool Reflected,\nfloat Frequency,\nfloat Vertical_Offset,\nout vec4 Color)\n{vec3 i=normalize(Position-Eye);vec3 r=reflect(i,Normal);float idota=dot(i,Axis);float idotr=dot(i,r);float x=Reflected ? idotr : idota;vec2 xy;xy.x=fract((x*Frequency+1.0)*0.5+UV.y*Vertical_Offset);xy.y=0.5;Color=texture(Texture,xy);Color.rgb*=Tint.rgb;}\nvoid Scale_RGB_B346(\nvec4 Color,\nfloat Scalar,\nout vec4 Result)\n{Result=vec4(Scalar,Scalar,Scalar,1)*Color;}\nvoid Scale_RGB_B344(\nfloat Scalar,\nvec4 Color,\nout vec4 Result)\n{Result=vec4(Scalar,Scalar,Scalar,1)*Color;}\nvoid Line_Fragment_B362(\nvec4 Base_Color,\nvec4 Highlight_Color,\nfloat Highlight_Width,\nvec3 Line_Vertex,\nfloat Highlight,\nout vec4 Line_Color)\n{float k2=1.0-clamp(abs(Line_Vertex.y/Highlight_Width),0.0,1.0);Line_Color=mix(Base_Color,Highlight_Color,Highlight*k2);}\nvoid Edge_B356(\nvec4 RectParms,\nfloat Radius,\nfloat Line_Width,\nvec2 UV,\nfloat Edge_Width,\nfloat Edge_Power,\nout float Result)\n{float d=length(max(abs(UV)-RectParms.xy,0.0));float edge=1.0-clamp((1.0-d/(Radius-Line_Width))/Edge_Width,0.0,1.0);Result=pow(edge,Edge_Power);}\nvoid Gradient_B355(\nvec4 Gradient_Color,\nvec4 Top_Left,\nvec4 Top_Right,\nvec4 Bottom_Left,\nvec4 Bottom_Right,\nvec2 UV,\nout vec4 Result)\n{vec3 top=Top_Left.rgb+(Top_Right.rgb-Top_Left.rgb)*UV.x;vec3 bottom=Bottom_Left.rgb+(Bottom_Right.rgb-Bottom_Left.rgb)*UV.x;Result.rgb=Gradient_Color.rgb*(bottom+(top-bottom)*UV.y);Result.a=1.0;}\nvoid main()\n{float X_Q338;float Y_Q338;float Z_Q338;float W_Q338;X_Q338=vExtra2.x;Y_Q338=vExtra2.y;Z_Q338=vExtra2.z;W_Q338=vExtra2.w;vec4 Color_Q343;\n#if IRIDESCENCE_ENABLE\nIridescence_B343(vPosition,vNormal,vUV,vBinormal,cameraPosition,_Iridescence_Tint_,_Iridescent_Map_,_Reflected_,_Frequency_,_Vertical_Offset_,Color_Q343);\n#else\nColor_Q343=vec4(0,0,0,0);\n#endif\nvec4 Result_Q344;Scale_RGB_B344(_Iridescence_Intensity_,Color_Q343,Result_Q344);vec4 Line_Color_Q362;Line_Fragment_B362(_Line_Color_,_Highlight_Color_,_Highlight_Width_,vTangent,_Highlight_,Line_Color_Q362);float Result_Q356;\n#if EDGE_ONLY\nEdge_B356(vExtra1,Z_Q338,W_Q338,vUV,_Edge_Width_,_Edge_Power_,Result_Q356);\n#else\nResult_Q356=1.0;\n#endif\nvec2 Vec2_Q339=vec2(X_Q338,Y_Q338);vec4 Result_Q355;Gradient_B355(_Gradient_Color_,_Top_Left_,_Top_Right_,_Bottom_Left_,_Bottom_Right_,Vec2_Q339,Result_Q355);vec4 Linear_Q348;Linear_Q348.rgb=clamp(Result_Q355.rgb*Result_Q355.rgb,0.0,1.0);Linear_Q348.a=Result_Q355.a;vec4 Result_Q346;Scale_RGB_B346(Linear_Q348,Result_Q356,Result_Q346);vec4 Sum_Q345=Result_Q346+Result_Q344;vec4 Color_At_T_Q347=mix(Line_Color_Q362,Result_Q346,_Line_Gradient_Blend_);vec4 Base_And_Iridescent_Q350;Base_And_Iridescent_Q350=_Base_Color_+vec4(Sum_Q345.rgb,0.0);vec4 Sum_Q349=Color_At_T_Q347+_Iridescence_Edge_Intensity_*Color_Q343;vec4 Result_Q351=Sum_Q349; Result_Q351.a=1.0;vec4 Color_Q332;Round_Rect_Fragment_B332(Z_Q338,W_Q338,Result_Q351,_Filter_Width_,vUV,1.0,vExtra1,Base_And_Iridescent_Q350,Color_Q332);vec4 Result_Q354=_Fade_Out_*Color_Q332;vec4 sRGB_Q353;FastLinearTosRGB_B353(Result_Q354,sRGB_Q353);vec4 Out_Color=sRGB_Q353;float Clip_Threshold=0.001;bool To_sRGB=false;gl_FragColor=Out_Color;}";d.ShaderStore.ShadersStore.mrdlBackplateVertexShader="uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec3 tangent;uniform float _Radius_;uniform float _Line_Width_;uniform bool _Absolute_Sizes_;uniform float _Filter_Width_;uniform vec4 _Base_Color_;uniform vec4 _Line_Color_;uniform float _Radius_Top_Left_;uniform float _Radius_Top_Right_;uniform float _Radius_Bottom_Left_;uniform float _Radius_Bottom_Right_;uniform float _Rate_;uniform vec4 _Highlight_Color_;uniform float _Highlight_Width_;uniform vec4 _Highlight_Transform_;uniform float _Highlight_;uniform float _Iridescence_Intensity_;uniform float _Iridescence_Edge_Intensity_;uniform vec4 _Iridescence_Tint_;uniform sampler2D _Iridescent_Map_;uniform float _Angle_;uniform bool _Reflected_;uniform float _Frequency_;uniform float _Vertical_Offset_;uniform vec4 _Gradient_Color_;uniform vec4 _Top_Left_;uniform vec4 _Top_Right_;uniform vec4 _Bottom_Left_;uniform vec4 _Bottom_Right_;uniform float _Edge_Width_;uniform float _Edge_Power_;uniform float _Line_Gradient_Blend_;uniform float _Fade_Out_;varying vec3 vPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec3 vBinormal;varying vec4 vExtra1;varying vec4 vExtra2;void Object_To_World_Pos_B314(\nvec3 Pos_Object,\nout vec3 Pos_World)\n{Pos_World=(world*vec4(Pos_Object,1.0)).xyz;}\nvoid Round_Rect_Vertex_B357(\nvec2 UV,\nfloat Radius,\nfloat Margin,\nfloat Anisotropy,\nfloat Gradient1,\nfloat Gradient2,\nvec3 Normal,\nvec4 Color_Scale_Translate,\nout vec2 Rect_UV,\nout vec4 Rect_Parms,\nout vec2 Scale_XY,\nout vec2 Line_UV,\nout vec2 Color_UV_Info)\n{Scale_XY=vec2(Anisotropy,1.0);Line_UV=(UV-vec2(0.5,0.5));Rect_UV=Line_UV*Scale_XY;Rect_Parms.xy=Scale_XY*0.5-vec2(Radius,Radius)-vec2(Margin,Margin);Rect_Parms.z=Gradient1; \nRect_Parms.w=Gradient2;Color_UV_Info=(Line_UV+vec2(0.5,0.5))*Color_Scale_Translate.xy+Color_Scale_Translate.zw;}\nvoid Line_Vertex_B333(\nvec2 Scale_XY,\nvec2 UV,\nfloat Time,\nfloat Rate,\nvec4 Highlight_Transform,\nout vec3 Line_Vertex)\n{float angle2=(Rate*Time)*2.0*3.1416;float sinAngle2=sin(angle2);float cosAngle2=cos(angle2);vec2 xformUV=UV*Highlight_Transform.xy+Highlight_Transform.zw;Line_Vertex.x=0.0;Line_Vertex.y=cosAngle2*xformUV.x-sinAngle2*xformUV.y;Line_Vertex.z=0.0; }\nvoid PickDir_B334(\nfloat Degrees,\nvec3 DirX,\nvec3 DirY,\nout vec3 Dir)\n{float a=Degrees*3.14159/180.0;Dir=cos(a)*DirX+sin(a)*DirY;}\nvoid Move_Verts_B327(\nfloat Anisotropy,\nvec3 P,\nfloat Radius,\nout vec3 New_P,\nout vec2 New_UV,\nout float Radial_Gradient,\nout vec3 Radial_Dir)\n{vec2 UV=P.xy*2.0+0.5;vec2 center=clamp(UV,0.0,1.0);vec2 delta=UV-center;vec2 r2=2.0*vec2(Radius/Anisotropy,Radius);New_UV=center+r2*(UV-2.0*center+0.5);New_P=vec3(New_UV-0.5,P.z);Radial_Gradient=1.0-length(delta)*2.0;Radial_Dir=vec3(delta*r2,0.0);}\nvoid Pick_Radius_B336(\nfloat Radius,\nfloat Radius_Top_Left,\nfloat Radius_Top_Right,\nfloat Radius_Bottom_Left,\nfloat Radius_Bottom_Right,\nvec3 Position,\nout float Result)\n{bool whichY=Position.y>0.0;Result=Position.x<0.0 ? (whichY ? Radius_Top_Left : Radius_Bottom_Left) : (whichY ? Radius_Top_Right : Radius_Bottom_Right);Result*=Radius;}\nvoid Edge_AA_Vertex_B328(\nvec3 Position_World,\nvec3 Position_Object,\nvec3 Normal_Object,\nvec3 Eye,\nfloat Radial_Gradient,\nvec3 Radial_Dir,\nvec3 Tangent,\nout float Gradient1,\nout float Gradient2)\n{vec3 I=(Eye-Position_World);vec3 T=(vec4(Tangent,0.0)).xyz;float g=(dot(T,I)<0.0) ? 0.0 : 1.0;if (Normal_Object.z==0.0) { \nGradient1=Position_Object.z>0.0 ? g : 1.0;Gradient2=Position_Object.z>0.0 ? 1.0 : g;} else {Gradient1=g+(1.0-g)*(Radial_Gradient);Gradient2=1.0;}}\nvoid Object_To_World_Dir_B330(\nvec3 Dir_Object,\nout vec3 Binormal_World,\nout vec3 Binormal_World_N,\nout float Binormal_Length)\n{Binormal_World=(world*vec4(Dir_Object,0.0)).xyz;Binormal_Length=length(Binormal_World);Binormal_World_N=Binormal_World/Binormal_Length;}\nvoid RelativeOrAbsoluteDetail_B341(\nfloat Nominal_Radius,\nfloat Nominal_LineWidth,\nbool Absolute_Measurements,\nfloat Height,\nout float Radius,\nout float Line_Width)\n{float scale=Absolute_Measurements ? 1.0/Height : 1.0;Radius=Nominal_Radius*scale;Line_Width=Nominal_LineWidth*scale;}\nvoid main()\n{vec3 Nrm_World_Q326;Nrm_World_Q326=normalize((world*vec4(normal,0.0)).xyz);vec3 Tangent_World_Q329;vec3 Tangent_World_N_Q329;float Tangent_Length_Q329;Tangent_World_Q329=(world*vec4(vec3(1,0,0),0.0)).xyz;Tangent_Length_Q329=length(Tangent_World_Q329);Tangent_World_N_Q329=Tangent_World_Q329/Tangent_Length_Q329;vec3 Binormal_World_Q330;vec3 Binormal_World_N_Q330;float Binormal_Length_Q330;Object_To_World_Dir_B330(vec3(0,1,0),Binormal_World_Q330,Binormal_World_N_Q330,Binormal_Length_Q330);float Radius_Q341;float Line_Width_Q341;RelativeOrAbsoluteDetail_B341(_Radius_,_Line_Width_,_Absolute_Sizes_,Binormal_Length_Q330,Radius_Q341,Line_Width_Q341);vec3 Dir_Q334;PickDir_B334(_Angle_,Tangent_World_N_Q329,Binormal_World_N_Q330,Dir_Q334);float Result_Q336;Pick_Radius_B336(Radius_Q341,_Radius_Top_Left_,_Radius_Top_Right_,_Radius_Bottom_Left_,_Radius_Bottom_Right_,position,Result_Q336);float Anisotropy_Q331=Tangent_Length_Q329/Binormal_Length_Q330;vec4 Out_Color_Q337=vec4(Result_Q336,Line_Width_Q341,0,1);vec3 New_P_Q327;vec2 New_UV_Q327;float Radial_Gradient_Q327;vec3 Radial_Dir_Q327;Move_Verts_B327(Anisotropy_Q331,position,Result_Q336,New_P_Q327,New_UV_Q327,Radial_Gradient_Q327,Radial_Dir_Q327);vec3 Pos_World_Q314;Object_To_World_Pos_B314(New_P_Q327,Pos_World_Q314);float Gradient1_Q328;float Gradient2_Q328;\n#if SMOOTH_EDGES\nEdge_AA_Vertex_B328(Pos_World_Q314,position,normal,cameraPosition,Radial_Gradient_Q327,Radial_Dir_Q327,tangent,Gradient1_Q328,Gradient2_Q328);\n#else\nGradient1_Q328=1.0;Gradient2_Q328=1.0;\n#endif\nvec2 Rect_UV_Q357;vec4 Rect_Parms_Q357;vec2 Scale_XY_Q357;vec2 Line_UV_Q357;vec2 Color_UV_Info_Q357;Round_Rect_Vertex_B357(New_UV_Q327,Result_Q336,0.0,Anisotropy_Q331,Gradient1_Q328,Gradient2_Q328,normal,vec4(1,1,0,0),Rect_UV_Q357,Rect_Parms_Q357,Scale_XY_Q357,Line_UV_Q357,Color_UV_Info_Q357);vec3 Line_Vertex_Q333;Line_Vertex_B333(Scale_XY_Q357,Line_UV_Q357,(20.0),_Rate_,_Highlight_Transform_,Line_Vertex_Q333);float X_Q359;float Y_Q359;X_Q359=Color_UV_Info_Q357.x;Y_Q359=Color_UV_Info_Q357.y;vec4 Vec4_Q358=vec4(X_Q359,Y_Q359,Result_Q336,Line_Width_Q341);vec3 Position=Pos_World_Q314;vec3 Normal=Nrm_World_Q326;vec2 UV=Rect_UV_Q357;vec3 Tangent=Line_Vertex_Q333;vec3 Binormal=Dir_Q334;vec4 Color=Out_Color_Q337;vec4 Extra1=Rect_Parms_Q357;vec4 Extra2=Vec4_Q358;vec4 Extra3=vec4(0,0,0,0);gl_Position=viewProjection*vec4(Position,1);vPosition=Position;vNormal=Normal;vUV=UV;vTangent=Tangent;vBinormal=Binormal;vExtra1=Extra1;vExtra2=Extra2;}";var qt=function(t){function e(){var e=t.call(this)||this;return e.IRIDESCENCE_ENABLE=!0,e.SMOOTH_EDGES=!0,e._needNormals=!0,e.rebuild(),e}return l(e,t),e}(d.MaterialDefines),Jt=function(t){function e(i,o){var r=t.call(this,i,o)||this;return r.radius=.3,r.lineWidth=.003,r.absoluteSizes=!1,r._filterWidth=1,r.baseColor=new d.Color4(0,0,0,1),r.lineColor=new d.Color4(.2,.262745,.4,1),r.radiusTopLeft=1,r.radiusTopRight=1,r.radiusBottomLeft=1,r.radiusBottomRight=1,r._rate=0,r.highlightColor=new d.Color4(.239216,.435294,.827451,1),r.highlightWidth=0,r._highlightTransform=new d.Vector4(1,1,0,0),r._highlight=1,r.iridescenceIntensity=.45,r.iridescenceEdgeIntensity=1,r.iridescenceTint=new d.Color4(1,1,1,1),r._angle=-45,r.fadeOut=1,r._reflected=!0,r._frequency=1,r._verticalOffset=0,r.gradientColor=new d.Color4(.74902,.74902,.74902,1),r.topLeftGradientColor=new d.Color4(.00784314,.294118,.580392,1),r.topRightGradientColor=new d.Color4(.305882,0,1,1),r.bottomLeftGradientColor=new d.Color4(.133333,.258824,.992157,1),r.bottomRightGradientColor=new d.Color4(.176471,.176471,.619608,1),r.edgeWidth=.5,r.edgePower=1,r.edgeLineGradientBlend=.5,r.alphaMode=d.Constants.ALPHA_DISABLE,r.backFaceCulling=!1,r._iridescentMapTexture=new d.Texture(e.IRIDESCENT_MAP_TEXTURE_URL,r.getScene(),!0,!1,d.Texture.NEAREST_SAMPLINGMODE),r}return l(e,t),e.prototype.needAlphaBlending=function(){return!1},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new qt);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,d.PrepareDefinesForAttributes)(t,o,!1,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new d.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,d.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[d.VertexBuffer.PositionKind];o.NORMAL&&s.push(d.VertexBuffer.NormalKind),o.UV1&&s.push(d.VertexBuffer.UVKind),o.UV2&&s.push(d.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(d.VertexBuffer.ColorKind),o.TANGENT&&s.push(d.VertexBuffer.TangentKind),(0,d.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","viewProjection","cameraPosition","_Radius_","_Line_Width_","_Absolute_Sizes_","_Filter_Width_","_Base_Color_","_Line_Color_","_Radius_Top_Left_","_Radius_Top_Right_","_Radius_Bottom_Left_","_Radius_Bottom_Right_","_Rate_","_Highlight_Color_","_Highlight_Width_","_Highlight_Transform_","_Highlight_","_Iridescence_Intensity_","_Iridescence_Edge_Intensity_","_Iridescence_Tint_","_Iridescent_Map_","_Angle_","_Reflected_","_Frequency_","_Vertical_Offset_","_Gradient_Color_","_Top_Left_","_Top_Right_","_Bottom_Left_","_Bottom_Right_","_Edge_Width_","_Edge_Power_","_Line_Gradient_Blend_","_Fade_Out_"],h=["_Iridescent_Map_"],c=[];(0,d.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("mrdlBackplate",{attributes:s,uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){if(i.materialDefines){var o=i.effect;o&&(this._activeEffect=o,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",this.getScene().getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",this.getScene().activeCamera.position),this._activeEffect.setFloat("_Radius_",this.radius),this._activeEffect.setFloat("_Line_Width_",this.lineWidth),this._activeEffect.setFloat("_Absolute_Sizes_",this.absoluteSizes?1:0),this._activeEffect.setFloat("_Filter_Width_",this._filterWidth),this._activeEffect.setDirectColor4("_Base_Color_",this.baseColor),this._activeEffect.setDirectColor4("_Line_Color_",this.lineColor),this._activeEffect.setFloat("_Radius_Top_Left_",this.radiusTopLeft),this._activeEffect.setFloat("_Radius_Top_Right_",this.radiusTopRight),this._activeEffect.setFloat("_Radius_Bottom_Left_",this.radiusBottomLeft),this._activeEffect.setFloat("_Radius_Bottom_Right_",this.radiusBottomRight),this._activeEffect.setFloat("_Rate_",this._rate),this._activeEffect.setDirectColor4("_Highlight_Color_",this.highlightColor),this._activeEffect.setFloat("_Highlight_Width_",this.highlightWidth),this._activeEffect.setVector4("_Highlight_Transform_",this._highlightTransform),this._activeEffect.setFloat("_Highlight_",this._highlight),this._activeEffect.setFloat("_Iridescence_Intensity_",this.iridescenceIntensity),this._activeEffect.setFloat("_Iridescence_Edge_Intensity_",this.iridescenceEdgeIntensity),this._activeEffect.setDirectColor4("_Iridescence_Tint_",this.iridescenceTint),this._activeEffect.setTexture("_Iridescent_Map_",this._iridescentMapTexture),this._activeEffect.setFloat("_Angle_",this._angle),this._activeEffect.setFloat("_Reflected_",this._reflected?1:0),this._activeEffect.setFloat("_Frequency_",this._frequency),this._activeEffect.setFloat("_Vertical_Offset_",this._verticalOffset),this._activeEffect.setDirectColor4("_Gradient_Color_",this.gradientColor),this._activeEffect.setDirectColor4("_Top_Left_",this.topLeftGradientColor),this._activeEffect.setDirectColor4("_Top_Right_",this.topRightGradientColor),this._activeEffect.setDirectColor4("_Bottom_Left_",this.bottomLeftGradientColor),this._activeEffect.setDirectColor4("_Bottom_Right_",this.bottomRightGradientColor),this._activeEffect.setFloat("_Edge_Width_",this.edgeWidth),this._activeEffect.setFloat("_Edge_Power_",this.edgePower),this._activeEffect.setFloat("_Line_Gradient_Blend_",this.edgeLineGradientBlend),this._activeEffect.setFloat("_Fade_Out_",this.fadeOut),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e)},e.prototype.clone=function(t){var i=this;return d.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var e=t.prototype.serialize.call(this);return e.customType="BABYLON.MRDLBackplateMaterial",e},e.prototype.getClassName=function(){return"MRDLBackplateMaterial"},e.Parse=function(t,i,o){return d.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},e.IRIDESCENT_MAP_TEXTURE_URL="https://assets.babylonjs.com/meshes/MRTK/MRDL/mrtk-mrdl-backplate-iridescence.png",h([(0,d.serialize)()],e.prototype,"radius",void 0),h([(0,d.serialize)()],e.prototype,"lineWidth",void 0),h([(0,d.serialize)()],e.prototype,"absoluteSizes",void 0),h([(0,d.serialize)()],e.prototype,"baseColor",void 0),h([(0,d.serialize)()],e.prototype,"lineColor",void 0),h([(0,d.serialize)()],e.prototype,"radiusTopLeft",void 0),h([(0,d.serialize)()],e.prototype,"radiusTopRight",void 0),h([(0,d.serialize)()],e.prototype,"radiusBottomLeft",void 0),h([(0,d.serialize)()],e.prototype,"radiusBottomRight",void 0),h([(0,d.serialize)()],e.prototype,"highlightColor",void 0),h([(0,d.serialize)()],e.prototype,"highlightWidth",void 0),h([(0,d.serialize)()],e.prototype,"iridescenceIntensity",void 0),h([(0,d.serialize)()],e.prototype,"iridescenceEdgeIntensity",void 0),h([(0,d.serialize)()],e.prototype,"iridescenceTint",void 0),h([(0,d.serialize)()],e.prototype,"fadeOut",void 0),h([(0,d.serialize)()],e.prototype,"gradientColor",void 0),h([(0,d.serialize)()],e.prototype,"topLeftGradientColor",void 0),h([(0,d.serialize)()],e.prototype,"topRightGradientColor",void 0),h([(0,d.serialize)()],e.prototype,"bottomLeftGradientColor",void 0),h([(0,d.serialize)()],e.prototype,"bottomRightGradientColor",void 0),h([(0,d.serialize)()],e.prototype,"edgeWidth",void 0),h([(0,d.serialize)()],e.prototype,"edgePower",void 0),h([(0,d.serialize)()],e.prototype,"edgeLineGradientBlend",void 0),e}(d.PushMaterial);(0,d.RegisterClass)("BABYLON.GUI.MRDLBackplateMaterial",Jt);var $t=function(t){function e(e,i){var o=t.call(this,e)||this;return o.onValueChangedObservable=new d.Observable,o._sliderBackplateVisible=i||!1,o._minimum=0,o._maximum=100,o._step=0,o._value=50,o}return l(e,t),Object.defineProperty(e.prototype,"mesh",{get:function(){return this.node?this._sliderThumb:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minimum",{get:function(){return this._minimum},set:function(t){this._minimum!==t&&(this._minimum=Math.max(t,0),this._value=Math.max(Math.min(this._value,this._maximum),this._minimum))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maximum",{get:function(){return this._maximum},set:function(t){this._maximum!==t&&(this._maximum=Math.max(t,this._minimum),this._value=Math.max(Math.min(this._value,this._maximum),this._minimum))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this._step},set:function(t){this._step!==t&&(this._step=Math.max(Math.min(t,this._maximum-this._minimum),0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){this._value!==t&&(this._value=Math.max(Math.min(t,this._maximum),this._minimum),this._sliderThumb&&(this._sliderThumb.position.x=this._convertToPosition(this.value)),this.onValueChangedObservable.notifyObservers(this._value))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this.node?this._sliderBar.position.x-this._sliderBar.scaling.x/2:-.5},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this.node?this._sliderBar.position.x+this._sliderBar.scaling.x/2:.5},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliderBarMaterial",{get:function(){return this._sliderBarMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliderThumbMaterial",{get:function(){return this._sliderThumbMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliderBackplateMaterial",{get:function(){return this._sliderBackplateMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliderBar",{get:function(){return this._sliderBar},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliderThumb",{get:function(){return this._sliderThumb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliderBackplate",{get:function(){return this._sliderBackplate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isVisible",{set:function(t){var e;this._isVisible!==t&&(this._isVisible=t,null===(e=this.node)||void 0===e||e.setEnabled(t))},enumerable:!1,configurable:!0}),e.prototype._createNode=function(t){var i=this,o=(0,d.CreateBox)("".concat(this.name,"_sliderbackplate"),{width:1,height:1,depth:1},t);return o.isPickable=!1,o.visibility=0,o.scaling=new d.Vector3(1,.5,.8),d.SceneLoader.ImportMeshAsync(void 0,e.MODEL_BASE_URL,e.MODEL_FILENAME,t).then((function(t){t.meshes.forEach((function(t){t.isPickable=!1}));var e=t.meshes[1],r=t.meshes[1].clone("".concat(i.name,"_sliderbar"),o),n=t.meshes[1].clone("".concat(i.name,"_sliderthumb"),o);e.visibility=0,i._sliderBackplateVisible&&(e.visibility=1,e.name="".concat(i.name,"_sliderbackplate"),e.scaling.x=1,e.scaling.z=.2,e.parent=o,i._sliderBackplateMaterial&&(e.material=i._sliderBackplateMaterial),i._sliderBackplate=e),r&&(r.parent=o,r.position.z=-.1,r.scaling=new d.Vector3(.8,.04,.3),i._sliderBarMaterial&&(r.material=i._sliderBarMaterial),i._sliderBar=r),n&&(n.parent=o,n.isPickable=!0,n.position.z=-.115,n.scaling=new d.Vector3(.025,.3,.6),n.position.x=i._convertToPosition(i.value),n.addBehavior(i._createBehavior()),i._sliderThumbMaterial&&(n.material=i._sliderThumbMaterial),i._sliderThumb=n),i._injectGUI3DReservedDataStore(o).control=i,o.getChildMeshes().forEach((function(t){i._injectGUI3DReservedDataStore(t).control=i}))})),this._affectMaterial(o),o},e.prototype._affectMaterial=function(t){var e,i,o;this._sliderBackplateMaterial=null!==(e=this._sliderBackplateMaterial)&&void 0!==e?e:new Jt("".concat(this.name,"_sliderbackplate_material"),t.getScene()),this._sliderBarMaterial=null!==(i=this._sliderBarMaterial)&&void 0!==i?i:new Xt("".concat(this.name,"_sliderbar_material"),t.getScene()),this._sliderThumbMaterial=null!==(o=this._sliderThumbMaterial)&&void 0!==o?o:new Zt("".concat(this.name,"_sliderthumb_material"),t.getScene())},e.prototype._createBehavior=function(){var t=this,e=new d.PointerDragBehavior({dragAxis:d.Vector3.Right()});return e.moveAttached=!1,e.onDragStartObservable.add((function(){t._draggedPosition=t._sliderThumb.position.x})),e.onDragObservable.add((function(e){t._draggedPosition+=e.dragDistance/t.scaling.x,t.value=t._convertToValue(t._draggedPosition)})),e},e.prototype._convertToPosition=function(t){var e=(t-this.minimum)/(this.maximum-this.minimum)*(this.end-this.start)+this.start;return Math.min(Math.max(e,this.start),this.end)},e.prototype._convertToValue=function(t){var e=(t-this.start)/(this.end-this.start)*(this.maximum-this.minimum);return e=this.step?Math.round(e/this.step)*this.step:e,Math.max(Math.min(this.minimum+e,this._maximum),this._minimum)},e.prototype.dispose=function(){var e,i,o,r,n,a;t.prototype.dispose.call(this),null===(e=this._sliderBar)||void 0===e||e.dispose(),null===(i=this._sliderThumb)||void 0===i||i.dispose(),null===(o=this._sliderBarMaterial)||void 0===o||o.dispose(),null===(r=this._sliderThumbMaterial)||void 0===r||r.dispose(),null===(n=this._sliderBackplate)||void 0===n||n.dispose(),null===(a=this._sliderBackplateMaterial)||void 0===a||a.dispose()},e.MODEL_BASE_URL="https://assets.babylonjs.com/meshes/MRTK/",e.MODEL_FILENAME="mrtk-fluent-backplate.glb",e}(gt),te=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._radius=5,e}return l(e,t),Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(t){var e=this;this._radius!==t&&(this._radius=t,d.Tools.SetImmediate((function(){e._arrangeChildren()})))},enumerable:!1,configurable:!0}),e.prototype._mapGridNode=function(t,e){var i=t.mesh;if(i){var o=this._sphericalMapping(e);switch(t.position=o,this.orientation){case yt.FACEORIGIN_ORIENTATION:i.lookAt(new d.Vector3(2*o.x,2*o.y,2*o.z));break;case yt.FACEORIGINREVERSED_ORIENTATION:i.lookAt(new d.Vector3(-o.x,-o.y,-o.z));break;case yt.FACEFORWARD_ORIENTATION:break;case yt.FACEFORWARDREVERSED_ORIENTATION:i.rotate(d.Axis.Y,Math.PI,0)}}},e.prototype._sphericalMapping=function(t){var e=new d.Vector3(0,0,this._radius),i=t.y/this._radius,o=-t.x/this._radius;return d.Matrix.RotationYawPitchRollToRef(o,i,0,d.TmpVectors.Matrix[0]),d.Vector3.TransformNormal(e,d.TmpVectors.Matrix[0])},e}(xt),ee=function(t){function e(e){void 0===e&&(e=!1);var i=t.call(this)||this;return i._isVertical=!1,i.margin=.1,i._isVertical=e,i}return l(e,t),Object.defineProperty(e.prototype,"isVertical",{get:function(){return this._isVertical},set:function(t){var e=this;this._isVertical!==t&&(this._isVertical=t,d.Tools.SetImmediate((function(){e._arrangeChildren()})))},enumerable:!1,configurable:!0}),e.prototype._arrangeChildren=function(){for(var t,e=0,i=0,o=0,r=[],n=d.Matrix.Invert(this.node.computeWorldMatrix(!0)),a=0,s=this._children;a0?this.margin:0)}},e}(yt),ie=function(t){function e(e,i){var o=t.call(this,i,e)||this;return o._currentMesh=e,o.pointerEnterAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(1.1)},o.pointerOutAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(1/1.1)},o.pointerDownAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(.95)},o.pointerUpAnimation=function(){o.mesh&&o.mesh.scaling.scaleInPlace(1/.95)},o}return l(e,t),e.prototype._getTypeName=function(){return"TouchMeshButton3D"},e.prototype._createNode=function(){var t=this;return this._currentMesh.getChildMeshes().forEach((function(e){t._injectGUI3DReservedDataStore(e).control=t})),this._currentMesh},e.prototype._affectMaterial=function(t){},e}(Ft);d.ShaderStore.ShadersStore.mrdlBackglowPixelShader="uniform vec3 cameraPosition;varying vec3 vNormal;varying vec2 vUV;uniform float _Bevel_Radius_;uniform float _Line_Width_;uniform bool _Absolute_Sizes_;uniform float _Tuning_Motion_;uniform float _Motion_;uniform float _Max_Intensity_;uniform float _Intensity_Fade_In_Exponent_;uniform float _Outer_Fuzz_Start_;uniform float _Outer_Fuzz_End_;uniform vec4 _Color_;uniform vec4 _Inner_Color_;uniform float _Blend_Exponent_;uniform float _Falloff_;uniform float _Bias_;float BiasFunc(float b,float v) {return pow(v,log(clamp(b,0.001,0.999))/log(0.5));}\nvoid Fuzzy_Round_Rect_B33(\nfloat Size_X,\nfloat Size_Y,\nfloat Radius_X,\nfloat Radius_Y,\nfloat Line_Width,\nvec2 UV,\nfloat Outer_Fuzz,\nfloat Max_Outer_Fuzz,\nout float Rect_Distance,\nout float Inner_Distance)\n{vec2 halfSize=vec2(Size_X,Size_Y)*0.5;vec2 r=max(min(vec2(Radius_X,Radius_Y),halfSize),vec2(0.001,0.001));float radius=min(r.x,r.y)-Max_Outer_Fuzz;vec2 v=abs(UV);vec2 nearestp=min(v,halfSize-r);float d=distance(nearestp,v);Inner_Distance=clamp(1.0-(radius-d)/Line_Width,0.0,1.0);Rect_Distance=clamp(1.0-(d-radius)/Outer_Fuzz,0.0,1.0)*Inner_Distance;}\nvoid main()\n{float X_Q42;float Y_Q42;X_Q42=vNormal.x;Y_Q42=vNormal.y;float MaxAB_Q24=max(_Tuning_Motion_,_Motion_);float Sqrt_F_Q27=sqrt(MaxAB_Q24);float Power_Q43=pow(MaxAB_Q24,_Intensity_Fade_In_Exponent_);float Value_At_T_Q26=mix(_Outer_Fuzz_Start_,_Outer_Fuzz_End_,Sqrt_F_Q27);float Product_Q23=_Max_Intensity_*Power_Q43;float Rect_Distance_Q33;float Inner_Distance_Q33;Fuzzy_Round_Rect_B33(X_Q42,Y_Q42,_Bevel_Radius_,_Bevel_Radius_,_Line_Width_,vUV,Value_At_T_Q26,_Outer_Fuzz_Start_,Rect_Distance_Q33,Inner_Distance_Q33);float Power_Q44=pow(Inner_Distance_Q33,_Blend_Exponent_);float Result_Q45=pow(BiasFunc(_Bias_,Rect_Distance_Q33),_Falloff_);vec4 Color_At_T_Q25=mix(_Inner_Color_,_Color_,Power_Q44);float Product_Q22=Result_Q45*Product_Q23;vec4 Result_Q28=Product_Q22*Color_At_T_Q25;vec4 Out_Color=Result_Q28;float Clip_Threshold=0.0;gl_FragColor=Out_Color;}";d.ShaderStore.ShadersStore.mrdlBackglowVertexShader="uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;attribute vec3 tangent;uniform float _Bevel_Radius_;uniform float _Line_Width_;uniform bool _Absolute_Sizes_;uniform float _Tuning_Motion_;uniform float _Motion_;uniform float _Max_Intensity_;uniform float _Intensity_Fade_In_Exponent_;uniform float _Outer_Fuzz_Start_;uniform float _Outer_Fuzz_End_;uniform vec4 _Color_;uniform vec4 _Inner_Color_;uniform float _Blend_Exponent_;uniform float _Falloff_;uniform float _Bias_;varying vec3 vNormal;varying vec2 vUV;void main()\n{vec3 Dir_World_Q41=(world*vec4(tangent,0.0)).xyz;vec3 Dir_World_Q40=(world*vec4((cross(normal,tangent)),0.0)).xyz;float MaxAB_Q24=max(_Tuning_Motion_,_Motion_);float Length_Q16=length(Dir_World_Q41);float Length_Q17=length(Dir_World_Q40);bool Greater_Than_Q37=MaxAB_Q24>0.0;vec3 Sizes_Q35;vec2 XY_Q35;Sizes_Q35=(_Absolute_Sizes_ ? vec3(Length_Q16,Length_Q17,0) : vec3(Length_Q16/Length_Q17,1,0));XY_Q35=(uv-vec2(0.5,0.5))*Sizes_Q35.xy;vec3 Result_Q38=Greater_Than_Q37 ? position : vec3(0,0,0);vec3 Pos_World_Q39=(world*vec4(Result_Q38,1.0)).xyz;vec3 Position=Pos_World_Q39;vec3 Normal=Sizes_Q35;vec2 UV=XY_Q35;vec3 Tangent=vec3(0,0,0);vec3 Binormal=vec3(0,0,0);vec4 Color=vec4(1,1,1,1);gl_Position=viewProjection*vec4(Position,1);vNormal=Normal;vUV=UV;}";var oe=function(t){function e(){var e=t.call(this)||this;return e._needNormals=!0,e._needUVs=!0,e.rebuild(),e}return l(e,t),e}(d.MaterialDefines),re=function(t){function e(e,i){var o=t.call(this,e,i)||this;return o.bevelRadius=.16,o.lineWidth=.16,o.absoluteSizes=!1,o.tuningMotion=0,o.motion=1,o.maxIntensity=.7,o.intensityFadeInExponent=2,o.outerFuzzStart=.04,o.outerFuzzEnd=.04,o.color=new d.Color4(.682353,.698039,1,1),o.innerColor=new d.Color4(.356863,.392157,.796078,1),o.blendExponent=1.5,o.falloff=2,o.bias=.5,o.alphaMode=d.Constants.ALPHA_ADD,o.disableDepthWrite=!0,o.backFaceCulling=!1,o}return l(e,t),e.prototype.needAlphaBlending=function(){return!0},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new oe);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,d.PrepareDefinesForAttributes)(t,o,!1,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new d.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,d.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[d.VertexBuffer.PositionKind];o.NORMAL&&s.push(d.VertexBuffer.NormalKind),o.UV1&&s.push(d.VertexBuffer.UVKind),o.UV2&&s.push(d.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(d.VertexBuffer.ColorKind),o.TANGENT&&s.push(d.VertexBuffer.TangentKind),(0,d.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","worldView","worldViewProjection","view","projection","viewProjection","cameraPosition","_Bevel_Radius_","_Line_Width_","_Absolute_Sizes_","_Tuning_Motion_","_Motion_","_Max_Intensity_","_Intensity_Fade_In_Exponent_","_Outer_Fuzz_Start_","_Outer_Fuzz_End_","_Color_","_Inner_Color_","_Blend_Exponent_","_Falloff_","_Bias_"],h=[],c=[];(0,d.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("mrdlBackglow",{attributes:s,uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){var o=this.getScene();if(i.materialDefines){var r=i.effect;r&&(this._activeEffect=r,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",o.getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",o.activeCamera.position),this._activeEffect.setFloat("_Bevel_Radius_",this.bevelRadius),this._activeEffect.setFloat("_Line_Width_",this.lineWidth),this._activeEffect.setFloat("_Absolute_Sizes_",this.absoluteSizes?1:0),this._activeEffect.setFloat("_Tuning_Motion_",this.tuningMotion),this._activeEffect.setFloat("_Motion_",this.motion),this._activeEffect.setFloat("_Max_Intensity_",this.maxIntensity),this._activeEffect.setFloat("_Intensity_Fade_In_Exponent_",this.intensityFadeInExponent),this._activeEffect.setFloat("_Outer_Fuzz_Start_",this.outerFuzzStart),this._activeEffect.setFloat("_Outer_Fuzz_End_",this.outerFuzzEnd),this._activeEffect.setDirectColor4("_Color_",this.color),this._activeEffect.setDirectColor4("_Inner_Color_",this.innerColor),this._activeEffect.setFloat("_Blend_Exponent_",this.blendExponent),this._activeEffect.setFloat("_Falloff_",this.falloff),this._activeEffect.setFloat("_Bias_",this.bias),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e)},e.prototype.clone=function(t){var i=this;return d.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var t=d.SerializationHelper.Serialize(this);return t.customType="BABYLON.MRDLBackglowMaterial",t},e.prototype.getClassName=function(){return"MRDLBackglowMaterial"},e.Parse=function(t,i,o){return d.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},h([(0,d.serialize)()],e.prototype,"bevelRadius",void 0),h([(0,d.serialize)()],e.prototype,"lineWidth",void 0),h([(0,d.serialize)()],e.prototype,"absoluteSizes",void 0),h([(0,d.serialize)()],e.prototype,"tuningMotion",void 0),h([(0,d.serialize)()],e.prototype,"motion",void 0),h([(0,d.serialize)()],e.prototype,"maxIntensity",void 0),h([(0,d.serialize)()],e.prototype,"intensityFadeInExponent",void 0),h([(0,d.serialize)()],e.prototype,"outerFuzzStart",void 0),h([(0,d.serialize)()],e.prototype,"outerFuzzEnd",void 0),h([(0,d.serialize)()],e.prototype,"color",void 0),h([(0,d.serialize)()],e.prototype,"innerColor",void 0),h([(0,d.serialize)()],e.prototype,"blendExponent",void 0),h([(0,d.serialize)()],e.prototype,"falloff",void 0),h([(0,d.serialize)()],e.prototype,"bias",void 0),e}(d.PushMaterial);(0,d.RegisterClass)("BABYLON.GUI.MRDLBackglowMaterial",re);d.ShaderStore.ShadersStore.mrdlFrontplatePixelShader="uniform vec3 cameraPosition;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec4 vExtra1;varying vec4 vExtra2;varying vec4 vExtra3;uniform float _Radius_;uniform float _Line_Width_;uniform bool _Relative_To_Height_;uniform float _Filter_Width_;uniform vec4 _Edge_Color_;uniform float _Fade_Out_;uniform bool _Smooth_Edges_;uniform bool _Blob_Enable_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Inner_Fade_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform float _Blob_Pulse_Max_Size_;uniform bool _Blob_Enable_2_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Inner_Fade_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform float _Gaze_Intensity_;uniform float _Gaze_Focus_;uniform sampler2D _Blob_Texture_;uniform float _Selection_Fuzz_;uniform float _Selected_;uniform float _Selection_Fade_;uniform float _Selection_Fade_Size_;uniform float _Selected_Distance_;uniform float _Selected_Fade_Length_;uniform float _Proximity_Max_Intensity_;uniform float _Proximity_Far_Distance_;uniform float _Proximity_Near_Radius_;uniform float _Proximity_Anisotropy_;uniform bool _Use_Global_Left_Index_;uniform bool _Use_Global_Right_Index_;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;void Scale_Color_B54(\nvec4 Color,\nfloat Scalar,\nout vec4 Result)\n{Result=Scalar*Color;}\nvoid Scale_RGB_B50(\nvec4 Color,\nfloat Scalar,\nout vec4 Result)\n{Result=vec4(Scalar,Scalar,Scalar,1)*Color;}\nvoid Proximity_Fragment_B51(\nfloat Proximity_Max_Intensity,\nfloat Proximity_Near_Radius,\nvec4 Deltas,\nfloat Show_Selection,\nfloat Distance_Fade1,\nfloat Distance_Fade2,\nfloat Strength,\nout float Proximity)\n{float proximity1=(1.0-clamp(length(Deltas.xy)/Proximity_Near_Radius,0.0,1.0))*Distance_Fade1;float proximity2=(1.0-clamp(length(Deltas.zw)/Proximity_Near_Radius,0.0,1.0))*Distance_Fade2;Proximity=Strength*(Proximity_Max_Intensity*max(proximity1,proximity2) *(1.0-Show_Selection)+Show_Selection);}\nvoid Blob_Fragment_B56(\nvec2 UV,\nvec3 Blob_Info,\nsampler2D Blob_Texture,\nout vec4 Blob_Color)\n{float k=dot(UV,UV);Blob_Color=Blob_Info.y*texture(Blob_Texture,vec2(vec2(sqrt(k),Blob_Info.x).x,1.0-vec2(sqrt(k),Blob_Info.x).y))*(1.0-clamp(k,0.0,1.0));}\nvoid Round_Rect_Fragment_B61(\nfloat Radius,\nvec4 Line_Color,\nfloat Filter_Width,\nfloat Line_Visibility,\nvec4 Fill_Color,\nbool Smooth_Edges,\nvec4 Rect_Parms,\nout float Inside_Rect)\n{float d=length(max(abs(Rect_Parms.zw)-Rect_Parms.xy,0.0));float dx=max(fwidth(d)*Filter_Width,0.00001);Inside_Rect=Smooth_Edges ? clamp((Radius-d)/dx,0.0,1.0) : 1.0-step(Radius,d);}\nvoid main()\n{float Is_Quad_Q53;Is_Quad_Q53=vNormal.z;vec4 Blob_Color_Q56;Blob_Fragment_B56(vUV,vTangent,_Blob_Texture_,Blob_Color_Q56);float X_Q52;float Y_Q52;float Z_Q52;float W_Q52;X_Q52=vExtra3.x;Y_Q52=vExtra3.y;Z_Q52=vExtra3.z;W_Q52=vExtra3.w;float Proximity_Q51;Proximity_Fragment_B51(_Proximity_Max_Intensity_,_Proximity_Near_Radius_,vExtra2,X_Q52,Y_Q52,Z_Q52,1.0,Proximity_Q51);float Inside_Rect_Q61;Round_Rect_Fragment_B61(W_Q52,vec4(1,1,1,1),_Filter_Width_,1.0,vec4(0,0,0,0),_Smooth_Edges_,vExtra1,Inside_Rect_Q61);vec4 Result_Q50;Scale_RGB_B50(_Edge_Color_,Proximity_Q51,Result_Q50);vec4 Result_Q47=Inside_Rect_Q61*Blob_Color_Q56;vec4 Color_At_T_Q48=mix(Result_Q50,Result_Q47,Is_Quad_Q53);vec4 Result_Q54;Scale_Color_B54(Color_At_T_Q48,_Fade_Out_,Result_Q54);vec4 Out_Color=Result_Q54;float Clip_Threshold=0.001;bool To_sRGB=false;gl_FragColor=Out_Color;}";d.ShaderStore.ShadersStore.mrdlFrontplateVertexShader="uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;attribute vec3 tangent;attribute vec4 color;uniform float _Radius_;uniform float _Line_Width_;uniform bool _Relative_To_Height_;uniform float _Filter_Width_;uniform vec4 _Edge_Color_;uniform float _Fade_Out_;uniform bool _Smooth_Edges_;uniform bool _Blob_Enable_;uniform vec3 _Blob_Position_;uniform float _Blob_Intensity_;uniform float _Blob_Near_Size_;uniform float _Blob_Far_Size_;uniform float _Blob_Near_Distance_;uniform float _Blob_Far_Distance_;uniform float _Blob_Fade_Length_;uniform float _Blob_Inner_Fade_;uniform float _Blob_Pulse_;uniform float _Blob_Fade_;uniform float _Blob_Pulse_Max_Size_;uniform bool _Blob_Enable_2_;uniform vec3 _Blob_Position_2_;uniform float _Blob_Near_Size_2_;uniform float _Blob_Inner_Fade_2_;uniform float _Blob_Pulse_2_;uniform float _Blob_Fade_2_;uniform float _Gaze_Intensity_;uniform float _Gaze_Focus_;uniform sampler2D _Blob_Texture_;uniform float _Selection_Fuzz_;uniform float _Selected_;uniform float _Selection_Fade_;uniform float _Selection_Fade_Size_;uniform float _Selected_Distance_;uniform float _Selected_Fade_Length_;uniform float _Proximity_Max_Intensity_;uniform float _Proximity_Far_Distance_;uniform float _Proximity_Near_Radius_;uniform float _Proximity_Anisotropy_;uniform bool _Use_Global_Left_Index_;uniform bool _Use_Global_Right_Index_;uniform vec4 Global_Left_Index_Tip_Position;uniform vec4 Global_Right_Index_Tip_Position;varying vec3 vNormal;varying vec2 vUV;varying vec3 vTangent;varying vec4 vExtra1;varying vec4 vExtra2;varying vec4 vExtra3;void Blob_Vertex_B40(\nvec3 Position,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nvec3 Blob_Position,\nfloat Intensity,\nfloat Blob_Near_Size,\nfloat Blob_Far_Size,\nfloat Blob_Near_Distance,\nfloat Blob_Far_Distance,\nvec4 Vx_Color,\nvec2 UV,\nvec3 Face_Center,\nvec2 Face_Size,\nvec2 In_UV,\nfloat Blob_Fade_Length,\nfloat Selection_Fade,\nfloat Selection_Fade_Size,\nfloat Inner_Fade,\nfloat Blob_Pulse,\nfloat Blob_Fade,\nfloat Blob_Enabled,\nfloat DistanceOffset,\nout vec3 Out_Position,\nout vec2 Out_UV,\nout vec3 Blob_Info,\nout vec2 Blob_Relative_UV)\n{float blobSize,fadeIn;vec3 Hit_Position;Blob_Info=vec3(0.0,0.0,0.0);float Hit_Distance=dot(Blob_Position-Face_Center,Normal)+DistanceOffset*Blob_Far_Distance;Hit_Position=Blob_Position-Hit_Distance*Normal;float absD=abs(Hit_Distance);float lerpVal=clamp((absD-Blob_Near_Distance)/(Blob_Far_Distance-Blob_Near_Distance),0.0,1.0);fadeIn=1.0-clamp((absD-Blob_Far_Distance)/Blob_Fade_Length,0.0,1.0);float innerFade=1.0-clamp(-Hit_Distance/Inner_Fade,0.0,1.0);float farClip=clamp(1.0-step(Blob_Far_Distance+Blob_Fade_Length,absD),0.0,1.0);float size=mix(Blob_Near_Size,Blob_Far_Size,lerpVal)*farClip;blobSize=mix(size,Selection_Fade_Size,Selection_Fade)*innerFade*Blob_Enabled;Blob_Info.x=lerpVal*0.5+0.5;Blob_Info.y=fadeIn*Intensity*(1.0-Selection_Fade)*Blob_Fade;Blob_Info.x*=(1.0-Blob_Pulse);vec3 delta=Hit_Position-Face_Center;vec2 blobCenterXY=vec2(dot(delta,Tangent),dot(delta,Bitangent));vec2 quadUVin=2.0*UV-1.0; \nvec2 blobXY=blobCenterXY+quadUVin*blobSize;vec2 blobClipped=clamp(blobXY,-Face_Size*0.5,Face_Size*0.5);vec2 blobUV=(blobClipped-blobCenterXY)/max(blobSize,0.0001)*2.0;vec3 blobCorner=Face_Center+blobClipped.x*Tangent+blobClipped.y*Bitangent;Out_Position=mix(Position,blobCorner,Vx_Color.rrr);Out_UV=mix(In_UV,blobUV,Vx_Color.rr);Blob_Relative_UV=blobClipped/Face_Size.y;}\nvoid Round_Rect_Vertex_B36(\nvec2 UV,\nvec3 Tangent,\nvec3 Binormal,\nfloat Radius,\nfloat Anisotropy,\nvec2 Blob_Center_UV,\nout vec2 Rect_UV,\nout vec2 Scale_XY,\nout vec4 Rect_Parms)\n{Scale_XY=vec2(Anisotropy,1.0);Rect_UV=(UV-vec2(0.5,0.5))*Scale_XY;Rect_Parms.xy=Scale_XY*0.5-vec2(Radius,Radius);Rect_Parms.zw=Blob_Center_UV;}\nvec2 ProjectProximity(\nvec3 blobPosition,\nvec3 position,\nvec3 center,\nvec3 dir,\nvec3 xdir,\nvec3 ydir,\nout float vdistance\n)\n{vec3 delta=blobPosition-position;vec2 xy=vec2(dot(delta,xdir),dot(delta,ydir));vdistance=abs(dot(delta,dir));return xy;}\nvoid Proximity_Vertex_B33(\nvec3 Blob_Position,\nvec3 Blob_Position_2,\nvec3 Face_Center,\nvec3 Position,\nfloat Proximity_Far_Distance,\nfloat Relative_Scale,\nfloat Proximity_Anisotropy,\nvec3 Normal,\nvec3 Tangent,\nvec3 Binormal,\nout vec4 Extra,\nout float Distance_To_Face,\nout float Distance_Fade1,\nout float Distance_Fade2)\n{float distz1,distz2;Extra.xy=ProjectProximity(Blob_Position,Position,Face_Center,Normal,Tangent*Proximity_Anisotropy,Binormal,distz1)/Relative_Scale;Extra.zw=ProjectProximity(Blob_Position_2,Position,Face_Center,Normal,Tangent*Proximity_Anisotropy,Binormal,distz2)/Relative_Scale;Distance_To_Face=dot(Normal,Position-Face_Center);Distance_Fade1=1.0-clamp(distz1/Proximity_Far_Distance,0.0,1.0);Distance_Fade2=1.0-clamp(distz2/Proximity_Far_Distance,0.0,1.0);}\nvoid Object_To_World_Pos_B12(\nvec3 Pos_Object,\nout vec3 Pos_World)\n{Pos_World=(world*vec4(Pos_Object,1.0)).xyz;}\nvoid Choose_Blob_B27(\nvec4 Vx_Color,\nvec3 Position1,\nvec3 Position2,\nbool Blob_Enable_1,\nbool Blob_Enable_2,\nfloat Near_Size_1,\nfloat Near_Size_2,\nfloat Blob_Inner_Fade_1,\nfloat Blob_Inner_Fade_2,\nfloat Blob_Pulse_1,\nfloat Blob_Pulse_2,\nfloat Blob_Fade_1,\nfloat Blob_Fade_2,\nout vec3 Position,\nout float Near_Size,\nout float Inner_Fade,\nout float Blob_Enable,\nout float Fade,\nout float Pulse)\n{Position=Position1*(1.0-Vx_Color.g)+Vx_Color.g*Position2;float b1=Blob_Enable_1 ? 1.0 : 0.0;float b2=Blob_Enable_2 ? 1.0 : 0.0;Blob_Enable=b1+(b2-b1)*Vx_Color.g;Pulse=Blob_Pulse_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Pulse_2;Fade=Blob_Fade_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Fade_2;Near_Size=Near_Size_1*(1.0-Vx_Color.g)+Vx_Color.g*Near_Size_2;Inner_Fade=Blob_Inner_Fade_1*(1.0-Vx_Color.g)+Vx_Color.g*Blob_Inner_Fade_2;}\nvoid Move_Verts_B32(\nvec2 UV,\nfloat Radius,\nfloat Anisotropy,\nfloat Line_Width,\nfloat Visible,\nout vec3 New_P,\nout vec2 New_UV)\n{vec2 xy=2.0*UV-vec2(0.5,0.5);vec2 center=clamp(xy,0.0,1.0);vec2 delta=2.0*(xy-center);float deltaLength=length(delta);vec2 aniso=vec2(1.0/Anisotropy,1.0);center=(center-vec2(0.5,0.5))*(1.0-2.0*Radius*aniso);New_UV=vec2((2.0-2.0*deltaLength)*Visible,0.0);float deltaRadius= (Radius-Line_Width*New_UV.x);New_P.xy=(center+deltaRadius/deltaLength *aniso*delta);New_P.z=0.0;}\nvoid Object_To_World_Dir_B14(\nvec3 Dir_Object,\nout vec3 Binormal_World)\n{Binormal_World=(world*vec4(Dir_Object,0.0)).xyz;}\nvoid Proximity_Visibility_B55(\nfloat Selection,\nvec3 Proximity_Center,\nvec3 Proximity_Center_2,\nfloat Proximity_Far_Distance,\nfloat Proximity_Radius,\nvec3 Face_Center,\nvec3 Normal,\nvec2 Face_Size,\nfloat Gaze,\nout float Width)\n{float boxMaxSize=length(Face_Size)*0.5;float d1=dot(Proximity_Center-Face_Center,Normal);vec3 blob1=Proximity_Center-d1*Normal;float d2=dot(Proximity_Center_2-Face_Center,Normal);vec3 blob2=Proximity_Center_2-d2*Normal;vec3 delta1=blob1-Face_Center;vec3 delta2=blob2-Face_Center;float dist1=dot(delta1,delta1);float dist2=dot(delta2,delta2);float nearestProxDist=sqrt(min(dist1,dist2));Width=(1.0-step(boxMaxSize+Proximity_Radius,nearestProxDist))*(1.0-step(Proximity_Far_Distance,min(d1,d2))*(1.0-step(0.0001,Selection)));Width=max(Gaze,Width);}\nvec2 ramp2(vec2 start,vec2 end,vec2 x)\n{return clamp((x-start)/(end-start),vec2(0.0,0.0),vec2(1.0,1.0));}\nfloat computeSelection(\nvec3 blobPosition,\nvec3 normal,\nvec3 tangent,\nvec3 bitangent,\nvec3 faceCenter,\nvec2 faceSize,\nfloat selectionFuzz,\nfloat farDistance,\nfloat fadeLength\n)\n{vec3 delta=blobPosition-faceCenter;float absD=abs(dot(delta,normal));float fadeIn=1.0-clamp((absD-farDistance)/fadeLength,0.0,1.0);vec2 blobCenterXY=vec2(dot(delta,tangent),dot(delta,bitangent));vec2 innerFace=faceSize*(1.0-selectionFuzz)*0.5;vec2 selectPulse=ramp2(-faceSize*0.5,-innerFace,blobCenterXY)-ramp2(innerFace,faceSize*0.5,blobCenterXY);return selectPulse.x*selectPulse.y*fadeIn;}\nvoid Selection_Vertex_B31(\nvec3 Blob_Position,\nvec3 Blob_Position_2,\nvec3 Face_Center,\nvec2 Face_Size,\nvec3 Normal,\nvec3 Tangent,\nvec3 Bitangent,\nfloat Selection_Fuzz,\nfloat Selected,\nfloat Far_Distance,\nfloat Fade_Length,\nvec3 Active_Face_Dir,\nout float Show_Selection)\n{float select1=computeSelection(Blob_Position,Normal,Tangent,Bitangent,Face_Center,Face_Size,Selection_Fuzz,Far_Distance,Fade_Length);float select2=computeSelection(Blob_Position_2,Normal,Tangent,Bitangent,Face_Center,Face_Size,Selection_Fuzz,Far_Distance,Fade_Length);Show_Selection=mix(max(select1,select2),1.0,Selected);}\nvoid main()\n{vec3 Vec3_Q29=vec3(vec2(0,0).x,vec2(0,0).y,color.r);vec3 Nrm_World_Q24;Nrm_World_Q24=normalize((world*vec4(normal,0.0)).xyz);vec3 Face_Center_Q30;Face_Center_Q30=(world*vec4(vec3(0,0,0),1.0)).xyz;vec3 Tangent_World_Q13;Tangent_World_Q13=(world*vec4(tangent,0.0)).xyz;vec3 Result_Q42;Result_Q42=_Use_Global_Left_Index_ ? Global_Left_Index_Tip_Position.xyz : _Blob_Position_;vec3 Result_Q43;Result_Q43=_Use_Global_Right_Index_ ? Global_Right_Index_Tip_Position.xyz : _Blob_Position_2_;float Value_At_T_Q58=mix(_Blob_Near_Size_,_Blob_Pulse_Max_Size_,_Blob_Pulse_);float Value_At_T_Q59=mix(_Blob_Near_Size_2_,_Blob_Pulse_Max_Size_,_Blob_Pulse_2_);vec3 Cross_Q70=cross(normal,tangent);float Product_Q45=_Gaze_Intensity_*_Gaze_Focus_;float Step_Q46=step(0.0001,Product_Q45);vec3 Tangent_World_N_Q15=normalize(Tangent_World_Q13);vec3 Position_Q27;float Near_Size_Q27;float Inner_Fade_Q27;float Blob_Enable_Q27;float Fade_Q27;float Pulse_Q27;Choose_Blob_B27(color,Result_Q42,Result_Q43,_Blob_Enable_,_Blob_Enable_2_,Value_At_T_Q58,Value_At_T_Q59,_Blob_Inner_Fade_,_Blob_Inner_Fade_2_,_Blob_Pulse_,_Blob_Pulse_2_,_Blob_Fade_,_Blob_Fade_2_,Position_Q27,Near_Size_Q27,Inner_Fade_Q27,Blob_Enable_Q27,Fade_Q27,Pulse_Q27);vec3 Binormal_World_Q14;Object_To_World_Dir_B14(Cross_Q70,Binormal_World_Q14);float Anisotropy_Q21=length(Tangent_World_Q13)/length(Binormal_World_Q14);vec3 Binormal_World_N_Q16=normalize(Binormal_World_Q14);vec2 Face_Size_Q35;float ScaleY_Q35;Face_Size_Q35=vec2(length(Tangent_World_Q13),length(Binormal_World_Q14));ScaleY_Q35=Face_Size_Q35.y;float Out_Radius_Q38;float Out_Line_Width_Q38;Out_Radius_Q38=_Relative_To_Height_ ? _Radius_ : _Radius_/ScaleY_Q35;Out_Line_Width_Q38=_Relative_To_Height_ ? _Line_Width_ : _Line_Width_/ScaleY_Q35;float Show_Selection_Q31;Selection_Vertex_B31(Result_Q42,Result_Q43,Face_Center_Q30,Face_Size_Q35,Nrm_World_Q24,Tangent_World_N_Q15,Binormal_World_N_Q16,_Selection_Fuzz_,_Selected_,_Selected_Distance_,_Selected_Fade_Length_,vec3(0,0,-1),Show_Selection_Q31);float MaxAB_Q41=max(Show_Selection_Q31,Product_Q45);float Width_Q55;Proximity_Visibility_B55(Show_Selection_Q31,Result_Q42,Result_Q43,_Proximity_Far_Distance_,_Proximity_Near_Radius_,Face_Center_Q30,Nrm_World_Q24,Face_Size_Q35,Step_Q46,Width_Q55);vec3 New_P_Q32;vec2 New_UV_Q32;Move_Verts_B32(uv,Out_Radius_Q38,Anisotropy_Q21,Out_Line_Width_Q38,Width_Q55,New_P_Q32,New_UV_Q32);vec3 Pos_World_Q12;Object_To_World_Pos_B12(New_P_Q32,Pos_World_Q12);vec3 Out_Position_Q40;vec2 Out_UV_Q40;vec3 Blob_Info_Q40;vec2 Blob_Relative_UV_Q40;Blob_Vertex_B40(Pos_World_Q12,Nrm_World_Q24,Tangent_World_N_Q15,Binormal_World_N_Q16,Position_Q27,_Blob_Intensity_,Near_Size_Q27,_Blob_Far_Size_,_Blob_Near_Distance_,_Blob_Far_Distance_,color,uv,Face_Center_Q30,Face_Size_Q35,New_UV_Q32,_Blob_Fade_Length_,_Selection_Fade_,_Selection_Fade_Size_,Inner_Fade_Q27,Pulse_Q27,Fade_Q27,Blob_Enable_Q27,0.0,Out_Position_Q40,Out_UV_Q40,Blob_Info_Q40,Blob_Relative_UV_Q40);vec2 Rect_UV_Q36;vec2 Scale_XY_Q36;vec4 Rect_Parms_Q36;Round_Rect_Vertex_B36(New_UV_Q32,Tangent_World_Q13,Binormal_World_Q14,Out_Radius_Q38,Anisotropy_Q21,Blob_Relative_UV_Q40,Rect_UV_Q36,Scale_XY_Q36,Rect_Parms_Q36);vec4 Extra_Q33;float Distance_To_Face_Q33;float Distance_Fade1_Q33;float Distance_Fade2_Q33;Proximity_Vertex_B33(Result_Q42,Result_Q43,Face_Center_Q30,Pos_World_Q12,_Proximity_Far_Distance_,1.0,_Proximity_Anisotropy_,Nrm_World_Q24,Tangent_World_N_Q15,Binormal_World_N_Q16,Extra_Q33,Distance_To_Face_Q33,Distance_Fade1_Q33,Distance_Fade2_Q33);vec4 Vec4_Q37=vec4(MaxAB_Q41,Distance_Fade1_Q33,Distance_Fade2_Q33,Out_Radius_Q38);vec3 Position=Out_Position_Q40;vec3 Normal=Vec3_Q29;vec2 UV=Out_UV_Q40;vec3 Tangent=Blob_Info_Q40;vec3 Binormal=vec3(0,0,0);vec4 Color=vec4(1,1,1,1);vec4 Extra1=Rect_Parms_Q36;vec4 Extra2=Extra_Q33;vec4 Extra3=Vec4_Q37;gl_Position=viewProjection*vec4(Position,1);vNormal=Normal;vUV=UV;vTangent=Tangent;vExtra1=Extra1;vExtra2=Extra2;vExtra3=Extra3;}";var ne=function(t){function e(){var e=t.call(this)||this;return e.SMOOTH_EDGES=!0,e._needNormals=!0,e._needUVs=!0,e.rebuild(),e}return l(e,t),e}(d.MaterialDefines),ae=function(t){function e(i,o){var r=t.call(this,i,o)||this;return r.radius=.12,r.lineWidth=.01,r.relativeToHeight=!1,r._filterWidth=1,r.edgeColor=new d.Color4(.53,.53,.53,1),r.blobEnable=!0,r.blobPosition=new d.Vector3(100,100,100),r.blobIntensity=.5,r.blobNearSize=.032,r.blobFarSize=.048,r.blobNearDistance=.008,r.blobFarDistance=.064,r.blobFadeLength=.04,r.blobInnerFade=.01,r.blobPulse=0,r.blobFade=1,r.blobPulseMaxSize=.05,r.blobEnable2=!0,r.blobPosition2=new d.Vector3(10,10.1,-.6),r.blobNearSize2=.008,r.blobInnerFade2=.1,r.blobPulse2=0,r.blobFade2=1,r.gazeIntensity=.8,r.gazeFocus=0,r.selectionFuzz=.5,r.selected=1,r.selectionFade=.2,r.selectionFadeSize=0,r.selectedDistance=.08,r.selectedFadeLength=.08,r.proximityMaxIntensity=.45,r.proximityFarDistance=.16,r.proximityNearRadius=.016,r.proximityAnisotropy=1,r.useGlobalLeftIndex=!0,r.useGlobalRightIndex=!0,r.fadeOut=1,r.alphaMode=d.Constants.ALPHA_ADD,r.disableDepthWrite=!0,r.backFaceCulling=!1,r._blobTexture=new d.Texture(e.BLOB_TEXTURE_URL,o,!0,!1,d.Texture.NEAREST_SAMPLINGMODE),r}return l(e,t),e.prototype.needAlphaBlending=function(){return!0},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new ne);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,d.PrepareDefinesForAttributes)(t,o,!1,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new d.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,d.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[d.VertexBuffer.PositionKind];o.NORMAL&&s.push(d.VertexBuffer.NormalKind),o.UV1&&s.push(d.VertexBuffer.UVKind),o.UV2&&s.push(d.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(d.VertexBuffer.ColorKind),o.TANGENT&&s.push(d.VertexBuffer.TangentKind),(0,d.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","worldView","worldViewProjection","view","projection","viewProjection","cameraPosition","_Radius_","_Line_Width_","_Relative_To_Height_","_Filter_Width_","_Edge_Color_","_Fade_Out_","_Smooth_Edges_","_Blob_Enable_","_Blob_Position_","_Blob_Intensity_","_Blob_Near_Size_","_Blob_Far_Size_","_Blob_Near_Distance_","_Blob_Far_Distance_","_Blob_Fade_Length_","_Blob_Inner_Fade_","_Blob_Pulse_","_Blob_Fade_","_Blob_Pulse_Max_Size_","_Blob_Enable_2_","_Blob_Position_2_","_Blob_Near_Size_2_","_Blob_Inner_Fade_2_","_Blob_Pulse_2_","_Blob_Fade_2_","_Gaze_Intensity_","_Gaze_Focus_","_Blob_Texture_","_Selection_Fuzz_","_Selected_","_Selection_Fade_","_Selection_Fade_Size_","_Selected_Distance_","_Selected_Fade_Length_","_Proximity_Max_Intensity_","_Proximity_Far_Distance_","_Proximity_Near_Radius_","_Proximity_Anisotropy_","Global_Left_Index_Tip_Position","Global_Right_Index_Tip_Position","_Use_Global_Left_Index_","_Use_Global_Right_Index_"],h=[],c=[];(0,d.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("mrdlFrontplate",{attributes:s,uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){var o=this.getScene();if(i.materialDefines){var r=i.effect;r&&(this._activeEffect=r,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",o.getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",o.activeCamera.position),this._activeEffect.setFloat("_Radius_",this.radius),this._activeEffect.setFloat("_Line_Width_",this.lineWidth),this._activeEffect.setFloat("_Relative_To_Height_",this.relativeToHeight?1:0),this._activeEffect.setFloat("_Filter_Width_",this._filterWidth),this._activeEffect.setDirectColor4("_Edge_Color_",this.edgeColor),this._activeEffect.setFloat("_Fade_Out_",this.fadeOut),this._activeEffect.setFloat("_Blob_Enable_",this.blobEnable?1:0),this._activeEffect.setVector3("_Blob_Position_",this.blobPosition),this._activeEffect.setFloat("_Blob_Intensity_",this.blobIntensity),this._activeEffect.setFloat("_Blob_Near_Size_",this.blobNearSize),this._activeEffect.setFloat("_Blob_Far_Size_",this.blobFarSize),this._activeEffect.setFloat("_Blob_Near_Distance_",this.blobNearDistance),this._activeEffect.setFloat("_Blob_Far_Distance_",this.blobFarDistance),this._activeEffect.setFloat("_Blob_Fade_Length_",this.blobFadeLength),this._activeEffect.setFloat("_Blob_Inner_Fade_",this.blobInnerFade),this._activeEffect.setFloat("_Blob_Pulse_",this.blobPulse),this._activeEffect.setFloat("_Blob_Fade_",this.blobFade),this._activeEffect.setFloat("_Blob_Pulse_Max_Size_",this.blobPulseMaxSize),this._activeEffect.setFloat("_Blob_Enable_2_",this.blobEnable2?1:0),this._activeEffect.setVector3("_Blob_Position_2_",this.blobPosition2),this._activeEffect.setFloat("_Blob_Near_Size_2_",this.blobNearSize2),this._activeEffect.setFloat("_Blob_Inner_Fade_2_",this.blobInnerFade2),this._activeEffect.setFloat("_Blob_Pulse_2_",this.blobPulse2),this._activeEffect.setFloat("_Blob_Fade_2_",this.blobFade2),this._activeEffect.setFloat("_Gaze_Intensity_",this.gazeIntensity),this._activeEffect.setFloat("_Gaze_Focus_",this.gazeFocus),this._activeEffect.setTexture("_Blob_Texture_",this._blobTexture),this._activeEffect.setFloat("_Selection_Fuzz_",this.selectionFuzz),this._activeEffect.setFloat("_Selected_",this.selected),this._activeEffect.setFloat("_Selection_Fade_",this.selectionFade),this._activeEffect.setFloat("_Selection_Fade_Size_",this.selectionFadeSize),this._activeEffect.setFloat("_Selected_Distance_",this.selectedDistance),this._activeEffect.setFloat("_Selected_Fade_Length_",this.selectedFadeLength),this._activeEffect.setFloat("_Proximity_Max_Intensity_",this.proximityMaxIntensity),this._activeEffect.setFloat("_Proximity_Far_Distance_",this.proximityFarDistance),this._activeEffect.setFloat("_Proximity_Near_Radius_",this.proximityNearRadius),this._activeEffect.setFloat("_Proximity_Anisotropy_",this.proximityAnisotropy),this._activeEffect.setFloat("_Use_Global_Left_Index_",this.useGlobalLeftIndex?1:0),this._activeEffect.setFloat("_Use_Global_Right_Index_",this.useGlobalRightIndex?1:0),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e)},e.prototype.clone=function(t){var i=this;return d.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var t=d.SerializationHelper.Serialize(this);return t.customType="BABYLON.MRDLFrontplateMaterial",t},e.prototype.getClassName=function(){return"MRDLFrontplateMaterial"},e.Parse=function(t,i,o){return d.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},e.BLOB_TEXTURE_URL="",h([(0,d.serialize)()],e.prototype,"radius",void 0),h([(0,d.serialize)()],e.prototype,"lineWidth",void 0),h([(0,d.serialize)()],e.prototype,"relativeToHeight",void 0),h([(0,d.serialize)()],e.prototype,"edgeColor",void 0),h([(0,d.serialize)()],e.prototype,"blobEnable",void 0),h([(0,d.serialize)()],e.prototype,"blobPosition",void 0),h([(0,d.serialize)()],e.prototype,"blobIntensity",void 0),h([(0,d.serialize)()],e.prototype,"blobNearSize",void 0),h([(0,d.serialize)()],e.prototype,"blobFarSize",void 0),h([(0,d.serialize)()],e.prototype,"blobNearDistance",void 0),h([(0,d.serialize)()],e.prototype,"blobFarDistance",void 0),h([(0,d.serialize)()],e.prototype,"blobFadeLength",void 0),h([(0,d.serialize)()],e.prototype,"blobInnerFade",void 0),h([(0,d.serialize)()],e.prototype,"blobPulse",void 0),h([(0,d.serialize)()],e.prototype,"blobFade",void 0),h([(0,d.serialize)()],e.prototype,"blobPulseMaxSize",void 0),h([(0,d.serialize)()],e.prototype,"blobEnable2",void 0),h([(0,d.serialize)()],e.prototype,"blobPosition2",void 0),h([(0,d.serialize)()],e.prototype,"blobNearSize2",void 0),h([(0,d.serialize)()],e.prototype,"blobInnerFade2",void 0),h([(0,d.serialize)()],e.prototype,"blobPulse2",void 0),h([(0,d.serialize)()],e.prototype,"blobFade2",void 0),h([(0,d.serialize)()],e.prototype,"gazeIntensity",void 0),h([(0,d.serialize)()],e.prototype,"gazeFocus",void 0),h([(0,d.serialize)()],e.prototype,"selectionFuzz",void 0),h([(0,d.serialize)()],e.prototype,"selected",void 0),h([(0,d.serialize)()],e.prototype,"selectionFade",void 0),h([(0,d.serialize)()],e.prototype,"selectionFadeSize",void 0),h([(0,d.serialize)()],e.prototype,"selectedDistance",void 0),h([(0,d.serialize)()],e.prototype,"selectedFadeLength",void 0),h([(0,d.serialize)()],e.prototype,"proximityMaxIntensity",void 0),h([(0,d.serialize)()],e.prototype,"proximityFarDistance",void 0),h([(0,d.serialize)()],e.prototype,"proximityNearRadius",void 0),h([(0,d.serialize)()],e.prototype,"proximityAnisotropy",void 0),h([(0,d.serialize)()],e.prototype,"useGlobalLeftIndex",void 0),h([(0,d.serialize)()],e.prototype,"useGlobalRightIndex",void 0),e}(d.PushMaterial);(0,d.RegisterClass)("BABYLON.GUI.MRDLFrontplateMaterial",ae);d.ShaderStore.ShadersStore.mrdlInnerquadPixelShader="uniform vec3 cameraPosition;varying vec2 vUV;varying vec3 vTangent;uniform vec4 _Color_;uniform float _Radius_;uniform bool _Fixed_Radius_;uniform float _Filter_Width_;uniform float _Glow_Fraction_;uniform float _Glow_Max_;uniform float _Glow_Falloff_;float FilterStep_Bid194(float edge,float x,float filterWidth)\n{float dx=max(1.0E-5,fwidth(x)*filterWidth);return max((x+dx*0.5-max(edge,x-dx*0.5))/dx,0.0);}\nvoid Round_Rect_B194(\nfloat Size_X,\nfloat Size_Y,\nfloat Radius,\nvec4 Rect_Color,\nfloat Filter_Width,\nvec2 UV,\nfloat Glow_Fraction,\nfloat Glow_Max,\nfloat Glow_Falloff,\nout vec4 Color)\n{vec2 halfSize=vec2(Size_X,Size_Y)*0.5;vec2 r=max(min(vec2(Radius,Radius),halfSize),vec2(0.01,0.01));vec2 v=abs(UV);vec2 nearestp=min(v,halfSize-r);vec2 delta=(v-nearestp)/max(vec2(0.01,0.01),r);float Distance=length(delta);float insideRect=1.0-FilterStep_Bid194(1.0-Glow_Fraction,Distance,Filter_Width);float glow=clamp((1.0-Distance)/Glow_Fraction,0.0,1.0);glow=pow(glow,Glow_Falloff);Color=Rect_Color*max(insideRect,glow*Glow_Max);}\nvoid main()\n{float X_Q192;float Y_Q192;float Z_Q192;X_Q192=vTangent.x;Y_Q192=vTangent.y;Z_Q192=vTangent.z;vec4 Color_Q194;Round_Rect_B194(X_Q192,1.0,Y_Q192,_Color_,_Filter_Width_,vUV,_Glow_Fraction_,_Glow_Max_,_Glow_Falloff_,Color_Q194);vec4 Out_Color=Color_Q194;float Clip_Threshold=0.0;gl_FragColor=Out_Color;}\n";d.ShaderStore.ShadersStore.mrdlInnerquadVertexShader="uniform mat4 world;uniform mat4 viewProjection;uniform vec3 cameraPosition;attribute vec3 position;attribute vec3 normal;attribute vec2 uv;attribute vec3 tangent;attribute vec4 color;uniform vec4 _Color_;uniform float _Radius_;uniform bool _Fixed_Radius_;uniform float _Filter_Width_;uniform float _Glow_Fraction_;uniform float _Glow_Max_;uniform float _Glow_Falloff_;varying vec2 vUV;varying vec3 vTangent;void main()\n{vec3 Pos_World_Q189;Pos_World_Q189=(world*vec4(position,1.0)).xyz;vec3 Dir_World_Q190;Dir_World_Q190=(world*vec4(tangent,0.0)).xyz;vec3 Dir_World_Q191;Dir_World_Q191=(world*vec4((cross(normal,tangent)),0.0)).xyz;float Length_Q180=length(Dir_World_Q190);float Length_Q181=length(Dir_World_Q191);float Quotient_Q184=Length_Q180/Length_Q181;float Quotient_Q195=_Radius_/Length_Q181;vec2 Result_Q193;Result_Q193=vec2((uv.x-0.5)*Length_Q180/Length_Q181,(uv.y-0.5));float Result_Q198=_Fixed_Radius_ ? Quotient_Q195 : _Radius_;vec3 Vec3_Q183=vec3(Quotient_Q184,Result_Q198,0);vec3 Position=Pos_World_Q189;vec3 Normal=vec3(0,0,0);vec2 UV=Result_Q193;vec3 Tangent=Vec3_Q183;vec3 Binormal=vec3(0,0,0);vec4 Color=color;gl_Position=viewProjection*vec4(Position,1);vUV=UV;vTangent=Tangent;}\n";var se=function(t){function e(){var e=t.call(this)||this;return e._needNormals=!0,e._needUVs=!0,e.rebuild(),e}return l(e,t),e}(d.MaterialDefines),le=function(t){function e(e,i){var o=t.call(this,e,i)||this;return o.color=new d.Color4(1,1,1,.05),o.radius=.12,o.fixedRadius=!0,o._filterWidth=1,o.glowFraction=0,o.glowMax=.5,o.glowFalloff=2,o.alphaMode=d.Constants.ALPHA_COMBINE,o.backFaceCulling=!1,o}return l(e,t),e.prototype.needAlphaBlending=function(){return!0},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e){var i=e._drawWrapper;if(this.isFrozen&&i.effect&&i._wasPreviouslyReady)return!0;e.materialDefines||(e.materialDefines=new se);var o=e.materialDefines,r=this.getScene();if(this._isReadyForSubMesh(e))return!0;var n=r.getEngine();if((0,d.PrepareDefinesForAttributes)(t,o,!0,!1),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var a=new d.EffectFallbacks;o.FOG&&a.addFallback(1,"FOG"),(0,d.HandleFallbacksForShadows)(o,a),o.IMAGEPROCESSINGPOSTPROCESS=r.imageProcessingConfiguration.applyByPostProcess;var s=[d.VertexBuffer.PositionKind];o.NORMAL&&s.push(d.VertexBuffer.NormalKind),o.UV1&&s.push(d.VertexBuffer.UVKind),o.UV2&&s.push(d.VertexBuffer.UV2Kind),o.VERTEXCOLOR&&s.push(d.VertexBuffer.ColorKind),o.TANGENT&&s.push(d.VertexBuffer.TangentKind),(0,d.PrepareAttributesForInstances)(s,o);var l=o.toString(),_=["world","worldView","worldViewProjection","view","projection","viewProjection","cameraPosition","_Color_","_Radius_","_Fixed_Radius_","_Filter_Width_","_Glow_Fraction_","_Glow_Max_","_Glow_Falloff_"],h=[],c=[];(0,d.PrepareUniformsAndSamplersList)({uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:o,maxSimultaneousLights:4}),e.setEffect(r.getEngine().createEffect("mrdlInnerquad",{attributes:s,uniformsNames:_,uniformBuffersNames:c,samplers:h,defines:l,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},n),o)}return!(!e.effect||!e.effect.isReady()||(o._renderId=r.getRenderId(),i._wasPreviouslyReady=!0,0))},e.prototype.bindForSubMesh=function(t,e,i){var o=this.getScene();if(i.materialDefines){var r=i.effect;r&&(this._activeEffect=r,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix("viewProjection",o.getTransformMatrix()),this._activeEffect.setVector3("cameraPosition",o.activeCamera.position),this._activeEffect.setDirectColor4("_Color_",this.color),this._activeEffect.setFloat("_Radius_",this.radius),this._activeEffect.setFloat("_Fixed_Radius_",this.fixedRadius?1:0),this._activeEffect.setFloat("_Filter_Width_",this._filterWidth),this._activeEffect.setFloat("_Glow_Fraction_",this.glowFraction),this._activeEffect.setFloat("_Glow_Max_",this.glowMax),this._activeEffect.setFloat("_Glow_Falloff_",this.glowFalloff),this._afterBind(e,this._activeEffect,i))}},e.prototype.getAnimatables=function(){return[]},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e)},e.prototype.clone=function(t){var i=this;return d.SerializationHelper.Clone((function(){return new e(t,i.getScene())}),this)},e.prototype.serialize=function(){var t=d.SerializationHelper.Serialize(this);return t.customType="BABYLON.MRDLInnerquadMaterial",t},e.prototype.getClassName=function(){return"MRDLInnerquadMaterial"},e.Parse=function(t,i,o){return d.SerializationHelper.Parse((function(){return new e(t.name,i)}),t,i,o)},h([(0,d.serialize)()],e.prototype,"color",void 0),h([(0,d.serialize)()],e.prototype,"radius",void 0),h([(0,d.serialize)()],e.prototype,"fixedRadius",void 0),h([(0,d.serialize)()],e.prototype,"glowFraction",void 0),h([(0,d.serialize)()],e.prototype,"glowMax",void 0),h([(0,d.serialize)()],e.prototype,"glowFalloff",void 0),e}(d.PushMaterial);(0,d.RegisterClass)("BABYLON.GUI.MRDLInnerquadMaterial",le);var _e=function(t){function e(e,i){void 0===i&&(i=!0);var o=t.call(this,e)||this;return o.width=1,o.height=1,o.radius=.14,o.textSizeInPixels=18,o.imageSizeInPixels=40,o.plateMaterialColor=new d.Color3(.4,.4,.4),o.frontPlateDepth=.2,o.backPlateDepth=.04,o.backGlowOffset=.1,o.flatPlaneDepth=.001,o.innerQuadRadius=o.radius-.04,o.innerQuadColor=new d.Color4(0,0,0,0),o.innerQuadToggledColor=new d.Color4(.5197843,.6485234,.9607843,.6),o.innerQuadHoverColor=new d.Color4(1,1,1,.05),o.innerQuadToggledHoverColor=new d.Color4(.5197843,.6485234,.9607843,1),o._isBackplateVisible=!0,o._shareMaterials=!0,o._shareMaterials=i,o.pointerEnterAnimation=function(){o._frontPlate&&o._textPlate&&!o.isToggleButton&&o._performEnterExitAnimation(1),o.isToggleButton&&o._innerQuadMaterial&&(o.isToggled?o._innerQuadMaterial.color=o.innerQuadToggledHoverColor:o._innerQuadMaterial.color=o.innerQuadHoverColor)},o.pointerOutAnimation=function(){o._frontPlate&&o._textPlate&&!o.isToggleButton&&o._performEnterExitAnimation(-.8),o.isToggleButton&&o._innerQuadMaterial&&o._onToggle(o.isToggled)},o.pointerDownAnimation=function(){},o.pointerUpAnimation=function(){},o._pointerClickObserver=o.onPointerClickObservable.add((function(){o._frontPlate&&o._backGlow&&!o.isActiveNearInteraction&&o._performClickAnimation(),o.isToggleButton&&o._innerQuadMaterial&&o._onToggle(o.isToggled)})),o._pointerEnterObserver=o.onPointerEnterObservable.add((function(){o.pointerEnterAnimation()})),o._pointerOutObserver=o.onPointerOutObservable.add((function(){o.pointerOutAnimation()})),o._toggleObserver=o.onToggleObservable.add((function(t){o._innerQuadMaterial.color=t?o.innerQuadToggledColor:o.innerQuadColor})),o}return l(e,t),e.prototype._disposeTooltip=function(){this._tooltipFade=null,this._tooltipTextBlock&&this._tooltipTextBlock.dispose(),this._tooltipTexture&&this._tooltipTexture.dispose(),this._tooltipMesh&&this._tooltipMesh.dispose(),this.onPointerEnterObservable.remove(this._tooltipHoverObserver),this.onPointerOutObservable.remove(this._tooltipOutObserver)},Object.defineProperty(e.prototype,"renderingGroupId",{get:function(){return this._backPlate.renderingGroupId},set:function(t){this._backPlate.renderingGroupId=t,this._textPlate.renderingGroupId=t,this._frontPlate.renderingGroupId=t,this._backGlow.renderingGroupId=t,this._innerQuad.renderingGroupId=t,this._tooltipMesh&&(this._tooltipMesh.renderingGroupId=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mesh",{get:function(){return this._backPlate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tooltipText",{get:function(){var t;return(null===(t=this._tooltipTextBlock)||void 0===t?void 0:t.text)||null},set:function(t){var e=this;if(t){if(!this._tooltipFade){var i=this._backPlate._scene.useRightHandedSystem;this._tooltipMesh=(0,d.CreatePlane)("",{size:1},this._backPlate._scene),this._tooltipMesh.position=d.Vector3.Down().scale(.7).add(d.Vector3.Forward(i).scale(-.15)),this._tooltipMesh.isPickable=!1,this._tooltipMesh.parent=this._frontPlateCollisionMesh,this._tooltipTexture=ct.CreateForMesh(this._tooltipMesh);var o=new T;o.height=.25,o.width=.8,o.cornerRadius=25,o.color="#ffffff",o.thickness=20,o.background="#060668",this._tooltipTexture.addControl(o),this._tooltipTextBlock=new S,this._tooltipTextBlock.color="white",this._tooltipTextBlock.fontSize=100,this._tooltipTexture.addControl(this._tooltipTextBlock),this._tooltipFade=new d.FadeInOutBehavior,this._tooltipFade.delay=500,this._tooltipMesh.addBehavior(this._tooltipFade),this._tooltipHoverObserver=this.onPointerEnterObservable.add((function(){e._tooltipFade&&e._tooltipFade.fadeIn(!0)})),this._tooltipOutObserver=this.onPointerOutObservable.add((function(){e._tooltipFade&&e._tooltipFade.fadeIn(!1)}))}this._tooltipTextBlock&&(this._tooltipTextBlock.text=t)}else this._disposeTooltip()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){this._text!==t&&(this._text=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subtext",{get:function(){return this._subtext},set:function(t){this._subtext!==t&&(this._subtext=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageUrl",{get:function(){return this._imageUrl},set:function(t){this._imageUrl!==t&&(this._imageUrl=t,this._rebuildContent())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backMaterial",{get:function(){return this._backMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frontMaterial",{get:function(){return this._frontMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backGlowMaterial",{get:function(){return this._backGlowMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"innerQuadMaterial",{get:function(){return this._innerQuadMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"plateMaterial",{get:function(){return this._plateMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shareMaterials",{get:function(){return this._shareMaterials},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isBackplateVisible",{set:function(t){this.mesh&&this._backMaterial&&(t&&!this._isBackplateVisible?this._backPlate.visibility=1:!t&&this._isBackplateVisible&&(this._backPlate.visibility=0)),this._isBackplateVisible=t},enumerable:!1,configurable:!0}),e.prototype._getTypeName=function(){return"TouchHolographicButton"},e.prototype._rebuildContent=function(){var t;t=this._getAspectRatio()<=1?this._alignContentVertically():this._alignContentHorizontally(),this.content=t},e.prototype._getAspectRatio=function(){return this.width/this.height},e.prototype._alignContentVertically=function(){var t=new w;if(t.isVertical=!0,(0,d.IsDocumentAvailable)()&&document.createElement&&this._imageUrl){var e=new O;e.source=this._imageUrl,e.heightInPixels=180,e.widthInPixels=100,e.paddingTopInPixels=40,e.paddingBottomInPixels=40,t.addControl(e)}if(this._text){var i=new S;i.text=this._text,i.color="white",i.heightInPixels=30,i.fontSize=24,t.addControl(i)}return t},e.prototype._alignContentHorizontally=function(){var t=240,e=15,i=new T;i.widthInPixels=t,i.heightInPixels=t,i.color="transparent",i.setPaddingInPixels(e,e,e,e),t-=30;var o=new w;if(o.isVertical=!1,o.scaleY=this._getAspectRatio(),(0,d.IsDocumentAvailable)()&&document.createElement&&this._imageUrl){var r=new T("".concat(this.name,"_image"));r.widthInPixels=this.imageSizeInPixels,r.heightInPixels=this.imageSizeInPixels,r.color="transparent",t-=this.imageSizeInPixels;var n=new O;n.source=this._imageUrl,r.addControl(n),o.addControl(r)}if(this._text){var a=new S("".concat(this.name,"_text"));if(a.text=this._text,a.color="white",a.fontSize=this.textSizeInPixels,a.widthInPixels=t,this._imageUrl&&(a.textHorizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,a.paddingLeftInPixels=e),this._subtext){var s=new D;s.addColumnDefinition(1),s.addRowDefinition(.5),s.addRowDefinition(.5),s.widthInPixels=t,s.heightInPixels=45;var l=new S("".concat(this.name,"_subtext"));l.text=this._subtext,l.color="#EEEEEEAB",l.fontSize=.75*this.textSizeInPixels,l.fontWeight="600",this._imageUrl&&(l.textHorizontalAlignment=I.HORIZONTAL_ALIGNMENT_LEFT,l.paddingLeftInPixels=e),s.addControl(a,0),s.addControl(l,1),o.addControl(s)}else o.addControl(a)}return i.addControl(o),i},e.prototype._createNode=function(e){var i;this.name=null!==(i=this.name)&&void 0!==i?i:"TouchHolographicButton";var o=this._createBackPlate(e),r=this._createFrontPlate(e),n=this._createInnerQuad(e),a=this._createBackGlow(e);this._frontPlateCollisionMesh=r,this._textPlate=t.prototype._createNode.call(this,e),this._textPlate.name="".concat(this.name,"_textPlate"),this._textPlate.isPickable=!1,this._textPlate.scaling.x=this.width,this._textPlate.parent=r,this._backPlate=o,this._backPlate.position=d.Vector3.Forward(e.useRightHandedSystem).scale(this.backPlateDepth/2),this._backPlate.isPickable=!1,this._backPlate.addChild(r),this._backPlate.addChild(n),a&&this._backPlate.addChild(a);var s=new d.TransformNode("".concat(this.name,"_root"),e);return this._backPlate.setParent(s),this.collisionMesh=r,this.collidableFrontDirection=this._backPlate.forward.negate(),s},e.prototype._createBackPlate=function(t){var i=this,o=(0,d.CreateBox)("".concat(this.name,"_backPlate"),{},t);return o.isPickable=!1,o.visibility=0,o.scaling.z=.2,d.SceneLoader.ImportMeshAsync(void 0,e.MRTK_ASSET_BASE_URL,e.BACKPLATE_MODEL_FILENAME,t).then((function(t){var e=t.meshes[1];e.visibility=0,i._isBackplateVisible&&(e.visibility=1,e.name="".concat(i.name,"_backPlate"),e.isPickable=!1,e.scaling.x=i.width,e.scaling.y=i.height,e.parent=o),i._backMaterial&&(e.material=i._backMaterial),i._backPlate=e})),o},e.prototype._createFrontPlate=function(t){var i=this,o=(0,d.CreateBox)("".concat(this.name,"_frontPlate"),{width:this.width,height:this.height,depth:this.frontPlateDepth},t);return o.isPickable=!0,o.isNearPickable=!0,o.visibility=0,o.position=d.Vector3.Forward(t.useRightHandedSystem).scale((this.backPlateDepth-this.frontPlateDepth)/2),d.SceneLoader.ImportMeshAsync(void 0,e.MRTK_ASSET_BASE_URL,e.FRONTPLATE_MODEL_FILENAME,t).then((function(e){var r=(0,d.CreateBox)("".concat(i.name,"_collisionPlate"),{width:i.width,height:i.height},t);r.isPickable=!1,r.scaling.z=i.frontPlateDepth,r.visibility=0,r.parent=o,i._collisionPlate=r;var n=e.meshes[1];n.name="".concat(i.name,"_frontPlate"),n.isPickable=!1,n.scaling.x=i.width-i.backGlowOffset,n.scaling.y=i.height-i.backGlowOffset,n.position=d.Vector3.Forward(t.useRightHandedSystem).scale(-.5),n.parent=r,i.isToggleButton&&(n.visibility=0),i._frontMaterial&&(n.material=i._frontMaterial),i._textPlate.scaling.x=1,i._textPlate.parent=n,i._frontPlate=n})),o},e.prototype._createInnerQuad=function(t){var i=this,o=(0,d.CreateBox)("".concat(this.name,"_innerQuad"),{},t);return o.isPickable=!1,o.visibility=0,o.scaling.z=this.flatPlaneDepth,o.position.z+=this.backPlateDepth/2-this.flatPlaneDepth,d.SceneLoader.ImportMeshAsync(void 0,e.MRTK_ASSET_BASE_URL,e.INNERQUAD_MODEL_FILENAME,t).then((function(t){var e=t.meshes[1];e.name="".concat(i.name,"_innerQuad"),e.isPickable=!1,e.scaling.x=i.width-i.backGlowOffset,e.scaling.y=i.height-i.backGlowOffset,e.parent=o,i._innerQuadMaterial&&(e.material=i._innerQuadMaterial),i._innerQuad=e})),o},e.prototype._createBackGlow=function(t){var i=this;if(!this.isToggleButton){var o=(0,d.CreateBox)("".concat(this.name,"_backGlow"),{},t);return o.isPickable=!1,o.visibility=0,o.scaling.z=this.flatPlaneDepth,o.position.z+=this.backPlateDepth/2-2*this.flatPlaneDepth,d.SceneLoader.ImportMeshAsync(void 0,e.MRTK_ASSET_BASE_URL,e.BACKGLOW_MODEL_FILENAME,t).then((function(t){var e=t.meshes[1];e.name="".concat(i.name,"_backGlow"),e.isPickable=!1,e.scaling.x=i.width-i.backGlowOffset,e.scaling.y=i.height-i.backGlowOffset,e.parent=o,i._backGlowMaterial&&(e.material=i._backGlowMaterial),i._backGlow=e})),o}},e.prototype._applyFacade=function(t){this._plateMaterial.emissiveTexture=t,this._plateMaterial.opacityTexture=t,this._plateMaterial.diffuseColor=this.plateMaterialColor},e.prototype._performClickAnimation=function(){for(var t=new d.AnimationGroup("Click Animation Group"),e=0,i=[{name:"backGlowMotion",mesh:this._backGlow,property:"material.motion",keys:[{frame:0,values:[0,0,0]},{frame:20,values:[1,.0144,.0144]},{frame:40,values:[.0027713229489760476,0,0]},{frame:45,values:[.0027713229489760476]}]},{name:"_collisionPlateZSlide",mesh:this._collisionPlate,property:"position.z",keys:[{frame:0,values:[0,0,0]},{frame:20,values:[d.Vector3.Forward(this._collisionPlate._scene.useRightHandedSystem).scale(this.frontPlateDepth/2).z,0,0]},{frame:40,values:[0,.005403332496794331]},{frame:45,values:[0]}]},{name:"_collisionPlateZScale",mesh:this._collisionPlate,property:"scaling.z",keys:[{frame:0,values:[this.frontPlateDepth,0,0]},{frame:20,values:[this.backPlateDepth,0,0]},{frame:40,values:[this.frontPlateDepth,.0054]},{frame:45,values:[this.frontPlateDepth]}]}];e0){var e=t/this._customControlScaling;this._customControlScaling=t,this._rootContainer.children.forEach((function(i){i.scaling.scaleInPlace(e),1!==t&&(i._isScaledByManager=!0)}))}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useRealisticScaling",{get:function(){return this.controlScaling===t.MRTK_REALISTIC_SCALING},set:function(e){this.controlScaling=e?t.MRTK_REALISTIC_SCALING:1},enumerable:!1,configurable:!0}),t.prototype._handlePointerOut=function(t,e){var i=this._lastControlOver[t];i&&(i._onPointerOut(i),delete this._lastControlOver[t]),e&&this._lastControlDown[t]&&(this._lastControlDown[t].forcePointerUp(),delete this._lastControlDown[t]),this.onPickedPointChangedObservable.notifyObservers(null)},t.prototype._doPicking=function(t){var e,i,o;if(!this._utilityLayer||!this._utilityLayer.shouldRender||!this._utilityLayer.utilityLayerScene.activeCamera)return!1;var r=t.event,n=r.pointerId||0,a=r.button,s=t.pickInfo;if(s&&this.onPickingObservable.notifyObservers(s.pickedMesh),!s||!s.hit)return this._handlePointerOut(n,t.type===d.PointerEventTypes.POINTERUP),!1;s.pickedPoint&&this.onPickedPointChangedObservable.notifyObservers(s.pickedPoint);var l=null===(i=null===(e=s.pickedMesh.reservedDataStore)||void 0===e?void 0:e.GUI3D)||void 0===i?void 0:i.control;return l&&!l._processObservables(t.type,s.pickedPoint,(null===(o=s.originMesh)||void 0===o?void 0:o.position)||null,n,a)&&t.type===d.PointerEventTypes.POINTERMOVE&&(this._lastControlOver[n]&&this._lastControlOver[n]._onPointerOut(this._lastControlOver[n]),delete this._lastControlOver[n]),t.type===d.PointerEventTypes.POINTERUP&&(this._lastControlDown[r.pointerId]&&(this._lastControlDown[r.pointerId].forcePointerUp(),delete this._lastControlDown[r.pointerId]),("touch"===r.pointerType||"xr"===r.pointerType&&this._scene.getEngine().hostInformation.isMobile)&&this._handlePointerOut(n,!1)),!0},Object.defineProperty(t.prototype,"rootContainer",{get:function(){return this._rootContainer},enumerable:!1,configurable:!0}),t.prototype.containsControl=function(t){return this._rootContainer.containsControl(t)},t.prototype.addControl=function(t){return this._rootContainer.addControl(t),1!==this._customControlScaling&&(t.scaling.scaleInPlace(this._customControlScaling),t._isScaledByManager=!0),this},t.prototype.removeControl=function(t){return this._rootContainer.removeControl(t),t._isScaledByManager&&(t.scaling.scaleInPlace(1/this._customControlScaling),t._isScaledByManager=!1),this},t.prototype.dispose=function(){for(var t in this._rootContainer.dispose(),this._sharedMaterials)Object.prototype.hasOwnProperty.call(this._sharedMaterials,t)&&this._sharedMaterials[t].dispose();for(var t in this._sharedMaterials={},this._touchSharedMaterials)Object.prototype.hasOwnProperty.call(this._touchSharedMaterials,t)&&this._touchSharedMaterials[t].dispose();this._touchSharedMaterials={},this._pointerOutObserver&&this._utilityLayer&&(this._utilityLayer.onPointerOutObservable.remove(this._pointerOutObserver),this._pointerOutObserver=null),this.onPickedPointChangedObservable.clear(),this.onPickingObservable.clear();var e=this._utilityLayer?this._utilityLayer.utilityLayerScene:null;e&&this._pointerObserver&&(e.onPointerObservable.remove(this._pointerObserver),this._pointerObserver=null),this._scene&&this._sceneDisposeObserver&&(this._scene.onDisposeObservable.remove(this._sceneDisposeObserver),this._sceneDisposeObserver=null),this._utilityLayer&&this._utilityLayer.dispose()},t.MRTK_REALISTIC_SCALING=.032,t}(),ce=void 0!==o.g?o.g:"undefined"!=typeof window?window:void 0;void 0!==ce&&(ce.BABYLON=ce.BABYLON||{},ce.BABYLON.GUI||(ce.BABYLON.GUI=n));const ue=a;return r.default})())); //# sourceMappingURL=babylon.gui.min.js.map \ No newline at end of file diff --git a/libs/babylon.inspector.bundle.js b/libs/babylon.inspector.bundle.js index ba48d95d..c3ae729e 100644 --- a/libs/babylon.inspector.bundle.js +++ b/libs/babylon.inspector.bundle.js @@ -1,3 +1,3 @@ /*! For license information please see babylon.inspector.bundle.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babylonjs"),require("babylonjs-materials"),require("babylonjs"),require("babylonjs-gui"),require("babylonjs-gui-editor"),require("babylonjs-loaders"),require("babylonjs-serializers")):"function"==typeof define&&define.amd?define("babylonjs-inspector",["babylonjs","babylonjs-materials","babylonjs","babylonjs-gui","babylonjs-gui-editor","babylonjs-loaders","babylonjs-serializers"],t):"object"==typeof exports?exports["babylonjs-inspector"]=t(require("babylonjs"),require("babylonjs-materials"),require("babylonjs"),require("babylonjs-gui"),require("babylonjs-gui-editor"),require("babylonjs-loaders"),require("babylonjs-serializers")):e.INSPECTOR=t(e.BABYLON,e.BABYLON,e.BABYLON.Debug,e.BABYLON.GUI,e.BABYLON,e.BABYLON,e.BABYLON)}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this,((e,t,r,n,s,o,a)=>(()=>{var i={729:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r(3234),s=r.n(n),o=r(7474),a=r.n(o),i=r(1721),l=r.n(i),p=new URL(r(4149),r.b),c=a()(s()),d=l()(p);c.push([e.id,`#inspector-host{position:absolute;right:0px;top:0px;bottom:0px}#__resizable_base__{display:none}#actionTabs{background:#333;height:100%;margin:0;padding:0;display:grid;grid-template-rows:auto 1fr;font:14px "Arial";overflow:hidden}#actionTabs .hoverIcon:hover{opacity:.8}#actionTabs #header{height:30px;font-size:16px;color:#fff;background:#222;grid-row:1;text-align:center;display:grid;grid-template-columns:30px 1fr 50px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#actionTabs #header #logo{grid-column:1;width:24px;height:24px;display:flex;align-self:center;justify-self:center}#actionTabs #header #back{grid-column:1;display:grid;align-self:center;justify-self:center;cursor:pointer}#actionTabs #header #title{grid-column:2;display:grid;align-items:center;text-align:center}#actionTabs #header #commands{grid-column:3;display:grid;align-items:center;grid-template-columns:1fr 1fr}#actionTabs #header #commands .expand{grid-column:1;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs #header #commands .close{grid-column:2;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabsMenu{display:grid;grid-row:2;grid-template-rows:40px 1fr;font:14px "Arial";overflow:hidden}#actionTabs .tabsMenu .labels{grid-row:1;display:flex;align-items:center;justify-items:center;border-bottom:1px solid #fff;margin:0;padding:0}#actionTabs .tabsMenu .labels .label{font-size:24px;color:#fff;width:40px;display:flex;align-content:center;justify-content:center;border:1px solid rgba(0,0,0,0);border-bottom:none;background:#333;padding:5px;height:28px;cursor:pointer}#actionTabs .tabsMenu .labels .label.active{border-color:#fff;border-bottom:2px solid rgba(0,0,0,0);margin-bottom:-2px}#actionTabs .tabsMenu .panes{grid-row:2;display:grid;grid-template-rows:100%;overflow:hidden}#actionTabs .tabsMenu .panes .infoMessage{opacity:.5;color:#fff;margin:15px 5px 0px 5px}#actionTabs .tabsMenu .panes .gradient-step{display:grid;grid-template-rows:100%;grid-template-columns:20px 30px 40px auto 20px 30px;padding-top:5px;padding-left:5px;padding-bottom:5px;align-items:center}#actionTabs .tabsMenu .panes .gradient-step .step{grid-row:1;grid-column:1}#actionTabs .tabsMenu .panes .gradient-step .color1{height:100%}#actionTabs .tabsMenu .panes .gradient-step .color2{height:100%;padding-left:5px}#actionTabs .tabsMenu .panes .gradient-step .factor1{grid-row:1;grid-column:2;cursor:pointer}#actionTabs .tabsMenu .panes .gradient-step .factor2{padding-left:5px;grid-row:1;grid-column:3;cursor:pointer}#actionTabs .tabsMenu .panes .gradient-step .factor2 .grayed{background:gray;border-color:gray}#actionTabs .tabsMenu .panes .gradient-step .numeric-input{width:calc(100% - 5px)}#actionTabs .tabsMenu .panes .gradient-step .icon{cursor:pointer}#actionTabs .tabsMenu .panes .gradient-step .step-value{margin-left:5px;grid-row:1;grid-column:3;text-align:right;margin-right:5px}#actionTabs .tabsMenu .panes .gradient-step .step-slider{grid-row:1;grid-column:4;display:grid;justify-content:stretch;align-content:center;margin-right:12px}#actionTabs .tabsMenu .panes .gradient-step .step-slider input{width:100%}#actionTabs .tabsMenu .panes .gradient-step .step-slider .range:hover{opacity:1}#actionTabs .tabsMenu .panes .gradient-step .step-slider .range{-webkit-appearance:none;height:6px;background:#d3d3d3;border-radius:5px;outline:none;opacity:.7;-webkit-transition:.2s;transition:opacity .2s}#actionTabs .tabsMenu .panes .gradient-step .step-slider .range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:14px;border-radius:50%;background:#337ab7;cursor:pointer}#actionTabs .tabsMenu .panes .gradient-step .step-slider .range::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:#337ab7;cursor:pointer}#actionTabs .tabsMenu .panes .gradient-step .gradient-copy{grid-row:1;grid-column:5;display:grid;align-content:center;justify-content:center}#actionTabs .tabsMenu .panes .gradient-step .gradient-copy .img{height:20px;width:20px}#actionTabs .tabsMenu .panes .gradient-step .gradient-copy .img:hover{cursor:pointer}#actionTabs .tabsMenu .panes .gradient-step .gradient-delete{grid-row:1;grid-column:6;display:grid;align-content:center;justify-content:center}#actionTabs .tabsMenu .panes .gradient-step .gradient-delete .img{height:20px;width:20px}#actionTabs .tabsMenu .panes .gradient-step .gradient-delete .img:hover{cursor:pointer}#actionTabs .tabsMenu .panes .pane{color:#fff;overflow-x:hidden;overflow-y:auto;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#actionTabs .tabsMenu .panes .pane .animation-info{border-left:#adff2f 3px solid;margin-left:5px;padding-left:5px !important}#actionTabs .tabsMenu .panes .pane .underline{border-bottom:.5px solid rgba(255,255,255,.5)}#actionTabs .tabsMenu .panes .pane .textureLinkLine{display:grid;grid-template-columns:auto 1fr}#actionTabs .tabsMenu .panes .pane .textureLinkLine .debug{grid-column:1;margin-left:5px;margin-right:5px;display:block;align-items:center;justify-items:center;cursor:pointer;opacity:.5}#actionTabs .tabsMenu .panes .pane .textureLinkLine .debug.selected{opacity:1}#actionTabs .tabsMenu .panes .pane .textureLinkLine .textLine{grid-column:2}#actionTabs .tabsMenu .panes .pane .textureLinkLine .actionIcon{display:inline-block;margin-top:6px;margin-right:4px}#actionTabs .tabsMenu .panes .pane .messageLine{text-align:center;font-size:12px;font-style:italic;opacity:.6}#actionTabs .tabsMenu .panes .pane .iconMessageLine{padding-left:2px;height:30px;display:grid;grid-template-columns:30px 1fr}#actionTabs .tabsMenu .panes .pane .iconMessageLine .icon{grid-column:1;display:grid;align-items:center;justify-items:center}#actionTabs .tabsMenu .panes .pane .iconMessageLine .value{grid-column:2;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .color-picker{height:calc(100% - 8px);margin:4px;width:100%}#actionTabs .tabsMenu .panes .pane .color-picker .color-rect{height:calc(100% - 4px);border:2px #fff solid;cursor:pointer;min-height:18px}#actionTabs .tabsMenu .panes .pane .color-picker .color-picker-cover{position:fixed;top:0px;right:0px;bottom:0px;left:0px;z-index:100}#actionTabs .tabsMenu .panes .pane .color-picker .color-picker-float{position:absolute}#actionTabs .tabsMenu .panes .pane .linkButtonLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr auto 20px}#actionTabs .tabsMenu .panes .pane .linkButtonLine .link{grid-column:1;display:flex;align-items:center;text-decoration:underline;cursor:pointer}#actionTabs .tabsMenu .panes .pane .linkButtonLine .link-button{grid-column:2}#actionTabs .tabsMenu .panes .pane .linkButtonLine .link-button button{background:#222;border:1px solid #337ab7;margin:5px 10px 5px 10px;color:#fff;padding:4px 5px;opacity:.9;cursor:pointer}#actionTabs .tabsMenu .panes .pane .linkButtonLine .link-button button:hover{opacity:1}#actionTabs .tabsMenu .panes .pane .linkButtonLine .link-button button:active{background:#282828}#actionTabs .tabsMenu .panes .pane .linkButtonLine .link-button button:focus{border:1px solid #337ab7;outline:0px}#actionTabs .tabsMenu .panes .pane .linkButtonLine .link-icon{grid-column:3;display:grid;align-content:center}#actionTabs .tabsMenu .panes .pane .textLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr auto}#actionTabs .tabsMenu .panes .pane .textLine.indented{grid-template-columns:100%}#actionTabs .tabsMenu .panes .pane .textLine.indented .link-value{grid-column:1;text-align:start;margin-left:20px;opacity:.6;max-width:unset}#actionTabs .tabsMenu .panes .pane .textLine.indented .value{grid-column:1;text-align:start;margin-left:20px;opacity:.6;max-width:unset}#actionTabs .tabsMenu .panes .pane .textLine.reduced-opacity{opacity:.6;padding-left:25px}#actionTabs .tabsMenu .panes .pane .textLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .textLine .link-value{grid-column:2;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:end;opacity:.8;margin:5px;margin-top:7px;max-width:140px;text-decoration:underline;cursor:pointer}#actionTabs .tabsMenu .panes .pane .textLine .value{grid-column:2;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:end;opacity:.8;margin:5px;margin-top:7px;max-width:200px;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}#actionTabs .tabsMenu .panes .pane .textLine .value.check{color:green}#actionTabs .tabsMenu .panes .pane .textLine .value.uncheck{color:red}#actionTabs .tabsMenu .panes .pane .gradient-container{margin-top:3px}#actionTabs .tabsMenu .panes .pane .gradient-container .gradient-label{height:30px;display:grid;align-content:center}#actionTabs .tabsMenu .panes .pane .gradient-container .gradient-step{display:grid;grid-template-rows:100%;grid-template-columns:25px 50px 55px 40px auto 20px 5px;padding-top:5px;padding-left:5px;padding-bottom:5px;align-items:center;border-left:orange 3px solid}#actionTabs .tabsMenu .panes .pane .gradient-container .gradient-step .step{grid-row:1;grid-column:1}#actionTabs .tabsMenu .panes .pane .gradient-container .gradient-step .color1{height:100%}#actionTabs .tabsMenu .panes .pane .gradient-container .gradient-step .color2{height:100%;padding-left:5px}#actionTabs .tabsMenu .panes .pane .gradient-container .gradient-step .factor1{grid-row:1;grid-column:2;cursor:pointer}#actionTabs .tabsMenu .panes .pane .gradient-container .gradient-step .factor2{padding-left:5px;grid-row:1;grid-column:3;cursor:pointer}#actionTabs .tabsMenu .panes .pane .gradient-container .gradient-step .factor2 .grayed{background:gray;border-color:gray}#actionTabs .tabsMenu .panes .pane .gradient-container .gradient-step .numeric-input{width:calc(100% - 5px)}#actionTabs .tabsMenu .panes .pane .gradient-container .gradient-step .step-value{margin-left:5px;grid-row:1;grid-column:4;text-align:right;margin-right:5px}#actionTabs .tabsMenu .panes .pane .gradient-container .gradient-step .step-slider{grid-row:1;grid-column:5;display:grid;justify-content:stretch;align-content:center;margin-right:5px}#actionTabs .tabsMenu .panes .pane .gradient-container .gradient-step .step-slider input{width:100%}#actionTabs .tabsMenu .panes .pane .gradient-container .gradient-step .gradient-delete{grid-row:1;grid-column:6;display:grid;align-content:center;justify-content:center}#actionTabs .tabsMenu .panes .pane .textInputLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr 120px}#actionTabs .tabsMenu .panes .pane .textInputLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .textInputLine .value{display:flex;align-items:center;grid-column:2}#actionTabs .tabsMenu .panes .pane .textInputLine .value input{width:110px}#actionTabs .tabsMenu .panes .pane .buttonLine{height:30px;display:grid;align-items:center;justify-items:stretch}#actionTabs .tabsMenu .panes .pane .buttonLine input[type=file]{display:none}#actionTabs .tabsMenu .panes .pane .buttonLine .file-upload{background:#222;border:1px solid #337ab7;margin:5px 10px 5px 10px;color:#fff;padding:4px 5px;font-size:13px;opacity:.9;cursor:pointer;text-align:center}#actionTabs .tabsMenu .panes .pane .buttonLine .file-upload:hover{opacity:1}#actionTabs .tabsMenu .panes .pane .buttonLine .file-upload:active{transform:scale(0.98);transform-origin:.5 .5}#actionTabs .tabsMenu .panes .pane .buttonLine button{background:#222;border:1px solid #337ab7;margin:5px 10px 5px 10px;color:#fff;padding:4px 5px;opacity:.9;cursor:pointer}#actionTabs .tabsMenu .panes .pane .buttonLine button:hover{opacity:1}#actionTabs .tabsMenu .panes .pane .buttonLine button:active{background:#282828}#actionTabs .tabsMenu .panes .pane .buttonLine button:focus{border:1px solid #337ab7;outline:0px}#actionTabs .tabsMenu .panes .pane .radioLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr 24px}#actionTabs .tabsMenu .panes .pane .radioLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .radioLine .radioContainer{grid-column:2;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .radioLine .radioContainer .radio{display:none}#actionTabs .tabsMenu .panes .pane .radioLine .radioContainer .radio:checked+label:before{border-color:#337ab7}#actionTabs .tabsMenu .panes .pane .radioLine .radioContainer .radio:checked+label:after{transform:scale(1)}#actionTabs .tabsMenu .panes .pane .radioLine .radioContainer .labelForRadio{display:inline-block;height:14px;position:relative;padding:0 24px;margin-bottom:0;cursor:pointer;vertical-align:bottom}#actionTabs .tabsMenu .panes .pane .radioLine .radioContainer .labelForRadio:before,#actionTabs .tabsMenu .panes .pane .radioLine .radioContainer .labelForRadio:after{position:absolute;content:"";border-radius:50%;transition:all .3s ease;transition-property:transform,border-color}#actionTabs .tabsMenu .panes .pane .radioLine .radioContainer .labelForRadio:before{left:0px;top:0;width:16px;height:16px;border:2px solid #fff}#actionTabs .tabsMenu .panes .pane .radioLine .radioContainer .labelForRadio:after{top:6px;left:6px;width:8px;height:8px;transform:scale(0);background:#337ab7}#actionTabs .tabsMenu .panes .pane .radioLine .copy{grid-column:3;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabsMenu .panes .pane .radioLine .copy img{height:100%}#actionTabs .tabsMenu .panes .pane .vector3Line{padding-left:2px;display:grid}#actionTabs .tabsMenu .panes .pane .vector3Line .firstLine{display:grid;grid-template-columns:1fr auto 20px;height:30px}#actionTabs .tabsMenu .panes .pane .vector3Line .firstLine .label{grid-column:1;display:flex;align-items:center;white-space:nowrap;overflow:hidden}#actionTabs .tabsMenu .panes .pane .vector3Line .firstLine .vector{grid-column:2;display:flex;align-items:center;text-align:right;opacity:.8;padding-left:5px}#actionTabs .tabsMenu .panes .pane .vector3Line .firstLine .expand{grid-column:3;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabsMenu .panes .pane .vector3Line .firstLine .copy{grid-column:4;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabsMenu .panes .pane .vector3Line .firstLine .copy img{height:100%}#actionTabs .tabsMenu .panes .pane .vector3Line .secondLine{display:grid;padding-right:5px;border-left:1px solid #337ab7}#actionTabs .tabsMenu .panes .pane .vector3Line .secondLine .numeric{display:grid;grid-template-columns:1fr auto}#actionTabs .tabsMenu .panes .pane .vector3Line .secondLine .numeric-label{text-align:right;grid-column:1;display:flex;align-items:center;justify-self:right;margin-right:10px}#actionTabs .tabsMenu .panes .pane .vector3Line .secondLine .numeric-value{width:120px;grid-column:2;display:flex;align-items:center;border:1px solid #337ab7}#actionTabs .tabsMenu .panes .pane .checkBoxLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr auto 20px 10px}#actionTabs .tabsMenu .panes .pane .checkBoxLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .checkBoxLine .checkBox{grid-column:2;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .checkBoxLine .checkBox .lbl{position:relative;display:block;height:14px;width:34px;margin-right:5px;background:#898989;border-radius:100px;cursor:pointer;transition:all .3s ease}#actionTabs .tabsMenu .panes .pane .checkBoxLine .checkBox .lbl.checked{background:#337ab7}#actionTabs .tabsMenu .panes .pane .checkBoxLine .checkBox .lbl:after{position:absolute;left:3px;top:2px;display:block;width:10px;height:10px;border-radius:100px;background:#fff;box-shadow:0px 3px 3px rgba(0,0,0,.05);content:"";transition:all .15s ease}#actionTabs .tabsMenu .panes .pane .checkBoxLine .checkBox .lbl:after.checked{left:20px;background:#164975}#actionTabs .tabsMenu .panes .pane .checkBoxLine .checkBox .lbl.checked:after{position:absolute;top:2px;display:block;width:10px;height:10px;border-radius:100px;background:#fff;box-shadow:0px 3px 3px rgba(0,0,0,.05);content:"";transition:all .15s ease;left:20px;background:#164975}#actionTabs .tabsMenu .panes .pane .checkBoxLine .checkBox .lbl:active:after{transform:scale(1.15, 0.85)}#actionTabs .tabsMenu .panes .pane .checkBoxLine .checkBox .hidden{display:none}#actionTabs .tabsMenu .panes .pane .checkBoxLine .checkBox .icon{display:none}#actionTabs .tabsMenu .panes .pane .checkBoxLine .copy{grid-column:3;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabsMenu .panes .pane .checkBoxLine .copy img{height:100%}#actionTabs .tabsMenu .panes .pane .textureLine{display:grid;grid-template-rows:30px auto}#actionTabs .tabsMenu .panes .pane .textureLine .control{margin-top:2px;grid-row:1;display:grid;grid-template-columns:1fr 40px 40px 40px 40px 40px 1fr}#actionTabs .tabsMenu .panes .pane .textureLine .control .red{grid-column:2}#actionTabs .tabsMenu .panes .pane .textureLine .control .green{grid-column:3}#actionTabs .tabsMenu .panes .pane .textureLine .control .blue{grid-column:4}#actionTabs .tabsMenu .panes .pane .textureLine .control .alpha{grid-column:5}#actionTabs .tabsMenu .panes .pane .textureLine .control .all{grid-column:6}#actionTabs .tabsMenu .panes .pane .textureLine .control3D{margin-top:2px;grid-row:1;display:grid;grid-template-columns:1fr 40px 40px 40px 40px 40px 40px 1fr}#actionTabs .tabsMenu .panes .pane .textureLine .control3D .px{grid-column:2}#actionTabs .tabsMenu .panes .pane .textureLine .control3D .nx{grid-column:3}#actionTabs .tabsMenu .panes .pane .textureLine .control3D .py{grid-column:4}#actionTabs .tabsMenu .panes .pane .textureLine .control3D .ny{grid-column:5}#actionTabs .tabsMenu .panes .pane .textureLine .control3D .pz{grid-column:6}#actionTabs .tabsMenu .panes .pane .textureLine .control3D .nz{grid-column:7}#actionTabs .tabsMenu .panes .pane .textureLine .command{border:1px solid rgba(0,0,0,0);background:rgba(0,0,0,0);color:#fff}#actionTabs .tabsMenu .panes .pane .textureLine .selected{border:1px solid #337ab7}#actionTabs .tabsMenu .panes .pane .textureLine .preview{grid-row:2;display:grid;align-self:center;justify-self:center;height:256px;width:256px;margin-top:5px;margin-bottom:5px;border:1px solid #fff;background-size:32px 32px;background-color:#fff;background-image:url(${d})}#actionTabs .tabsMenu .panes .pane .gltf-extension-property{margin-left:30px;border-left:1px solid #337ab7}#actionTabs .tabsMenu .panes .pane .floatLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr 120px}#actionTabs .tabsMenu .panes .pane .floatLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .floatLine .value{grid-column:2;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .floatLine .value input{width:110px}#actionTabs .tabsMenu .panes .pane .floatLine .copy{grid-column:3;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabsMenu .panes .pane .floatLine .copy img{height:100%}#actionTabs .tabsMenu .panes .pane .sliderLine{padding-left:2px;height:30px;display:grid;grid-template-rows:100%;grid-template-columns:1fr 50px auto}#actionTabs .tabsMenu .panes .pane .sliderLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .sliderLine .withMargins{margin-left:5px}#actionTabs .tabsMenu .panes .pane .sliderLine .floatLine{padding-left:2px}#actionTabs .tabsMenu .panes .pane .sliderLine .floatLine .short{grid-column:1;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .sliderLine .floatLine .short input{width:35px}#actionTabs .tabsMenu .panes .pane .sliderLine .floatLine .short input::-webkit-outer-spin-button,#actionTabs .tabsMenu .panes .pane .sliderLine .floatLine .short input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#actionTabs .tabsMenu .panes .pane .sliderLine .floatLine .short input[type=number]{-moz-appearance:textfield}#actionTabs .tabsMenu .panes .pane .sliderLine .slider{grid-column:3;grid-row:1;margin-right:5px;width:90%;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .sliderLine .slider .range{-webkit-appearance:none;width:100%;height:6px;background:#d3d3d3;border-radius:5px;outline:none;opacity:.7;-webkit-transition:.2s;transition:opacity .2s}#actionTabs .tabsMenu .panes .pane .sliderLine .slider .range:hover{opacity:1}#actionTabs .tabsMenu .panes .pane .sliderLine .slider .range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:14px;border-radius:50%;background:#337ab7;cursor:pointer}#actionTabs .tabsMenu .panes .pane .sliderLine .slider .range::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:#337ab7;cursor:pointer}#actionTabs .tabsMenu .panes .pane .sliderLine .floatLine .copy{display:none}#actionTabs .tabsMenu .panes .pane .sliderLine .copy{grid-column:4;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabsMenu .panes .pane .sliderLine .copy img{height:100%}#actionTabs .tabsMenu .panes .pane .color3Line{padding-left:2px;display:grid}#actionTabs .tabsMenu .panes .pane .color3Line .firstLine{height:30px;display:grid;grid-template-columns:1fr auto 20px}#actionTabs .tabsMenu .panes .pane .color3Line .firstLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .color3Line .firstLine .color3{grid-column:2;width:50px;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .color3Line .firstLine .color3 input[type=color]{-webkit-appearance:none;border:1px solid rgba(255,255,255,.5);padding:0;width:30px;height:20px}#actionTabs .tabsMenu .panes .pane .color3Line .firstLine .color3 input[type=color]::-webkit-color-swatch-wrapper{padding:0}#actionTabs .tabsMenu .panes .pane .color3Line .firstLine .color3 input[type=color]::-webkit-color-swatch{border:none}#actionTabs .tabsMenu .panes .pane .color3Line .firstLine .color3 input{margin-right:5px}#actionTabs .tabsMenu .panes .pane .color3Line .firstLine .expand{grid-column:3;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabsMenu .panes .pane .color3Line .firstLine .copy{grid-column:4;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabsMenu .panes .pane .color3Line .firstLine .copy img{height:100%}#actionTabs .tabsMenu .panes .pane .color3Line .secondLine{display:grid;padding-right:5px;border-left:1px solid #337ab7}#actionTabs .tabsMenu .panes .pane .color3Line .secondLine .numeric{display:grid;grid-template-columns:1fr auto}#actionTabs .tabsMenu .panes .pane .color3Line .secondLine .numeric-label{text-align:right;grid-column:1;display:flex;align-items:center;justify-self:right;margin-right:10px}#actionTabs .tabsMenu .panes .pane .color3Line .secondLine .numeric-value{width:120px;grid-column:2;display:flex;align-items:center;border:1px solid #337ab7}#actionTabs .tabsMenu .panes .pane .listLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr auto 20px 10px}#actionTabs .tabsMenu .panes .pane .listLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .listLine .options{grid-column:2;display:flex;align-items:center;margin-right:5px}#actionTabs .tabsMenu .panes .pane .listLine .options select{width:115px}#actionTabs .tabsMenu .panes .pane .listLine .copy{grid-column:3;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabsMenu .panes .pane .listLine .copy img{height:100%}#actionTabs .tabsMenu .panes .pane .paneContainer{margin-top:3px;display:grid;grid-template-rows:100%;grid-template-columns:100%}#actionTabs .tabsMenu .panes .pane .paneContainer .paneList{border-left:3px solid rgba(0,0,0,0)}#actionTabs .tabsMenu .panes .pane .paneContainer:hover .paneList{border-left:3px solid rgba(51,122,183,.8)}#actionTabs .tabsMenu .panes .pane .paneContainer:hover .paneContainer-content .header .title{border-left:3px solid #337ab7}#actionTabs .tabsMenu .panes .pane .paneContainer .paneContainer-highlight-border{grid-row:1;grid-column:1;opacity:1;border:3px solid red;margin-bottom:-5px;z-index:100;transition:opacity 250ms;pointer-events:none}#actionTabs .tabsMenu .panes .pane .paneContainer .paneContainer-highlight-border.transparent{opacity:0}#actionTabs .tabsMenu .panes .pane .paneContainer .paneContainer-content{grid-row:1;grid-column:1}#actionTabs .tabsMenu .panes .pane .paneContainer .paneContainer-content .header{display:grid;grid-template-columns:1fr auto;background:#555;height:30px;padding-right:5px;cursor:pointer}#actionTabs .tabsMenu .panes .pane .paneContainer .paneContainer-content .header .title{border-left:3px solid rgba(0,0,0,0);padding-left:5px;grid-column:1;display:flex;align-items:center}#actionTabs .tabsMenu .panes .pane .paneContainer .paneContainer-content .header .collapse{grid-column:2;display:flex;align-items:center;justify-items:center;transform-origin:center}#actionTabs .tabsMenu .panes .pane .paneContainer .paneContainer-content .header .collapse.closed{transform:rotate(180deg)}#actionTabs .tabsMenu .panes .pane .paneContainer .paneContainer-content .paneList>div:not(:last-child){border-bottom:.5px solid rgba(255,255,255,.1)}#actionTabs .tabsMenu .panes .pane .paneContainer .paneContainer-content .fragment>div:not(:last-child){border-bottom:.5px solid rgba(255,255,255,.1)}`,"",{version:3,sources:["webpack://./../../../dev/inspector/dist/components/actionTabs/actionTabs.scss"],names:[],mappings:"AAEA,gBACI,iBAAA,CACA,SAAA,CACA,OAAA,CACA,UAAA,CAGJ,oBACI,YAAA,CAGJ,YACI,eAAA,CACA,WAAA,CACA,QAAA,CACA,SAAA,CACA,YAAA,CACA,2BAAA,CACA,iBAAA,CACA,eAAA,CAEA,6BACI,UAAA,CAGJ,oBACI,WAAA,CACA,cAAA,CACA,UAAA,CACA,eAAA,CACA,UAAA,CACA,iBAAA,CACA,YAAA,CACA,mCAAA,CACA,wBAAA,CACA,qBAAA,CACA,oBAAA,CACA,gBAAA,CAEA,0BACI,aAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,iBAAA,CACA,mBAAA,CAGJ,0BACI,aAAA,CACA,YAAA,CACA,iBAAA,CACA,mBAAA,CACA,cAAA,CAGJ,2BACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,iBAAA,CAGJ,8BACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CAEA,sCACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CAGJ,qCACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CAKZ,sBACI,YAAA,CACA,UAAA,CACA,2BAAA,CACA,iBAAA,CACA,eAAA,CAEA,8BACI,UAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,4BAAA,CACA,QAAA,CACA,SAAA,CAEA,qCACI,cAAA,CACA,UAAA,CACA,UAAA,CACA,YAAA,CACA,oBAAA,CACA,sBAAA,CACA,8BAAA,CACA,kBAAA,CACA,eAAA,CACA,WAAA,CACA,WAAA,CACA,cAAA,CAEA,4CACI,iBAAA,CACA,qCAAA,CACA,kBAAA,CAKZ,6BACI,UAAA,CACA,YAAA,CACA,uBAAA,CAEA,eAAA,CAEA,0CACI,UAAA,CACA,UAAA,CACA,uBAAA,CAGJ,4CACI,YAAA,CACA,uBAAA,CACA,mDAAA,CACA,eAAA,CACA,gBAAA,CACA,kBAAA,CACA,kBAAA,CAEA,kDACI,UAAA,CACA,aAAA,CAGJ,oDACI,WAAA,CAGJ,oDACI,WAAA,CACA,gBAAA,CAGJ,qDACI,UAAA,CACA,aAAA,CACA,cAAA,CAGJ,qDACI,gBAAA,CACA,UAAA,CACA,aAAA,CACA,cAAA,CAEA,6DACI,eAAA,CACA,iBAAA,CAIR,2DACI,sBAAA,CAGJ,kDACI,cAAA,CAGJ,wDACI,eAAA,CACA,UAAA,CACA,aAAA,CACA,gBAAA,CACA,gBAAA,CAGJ,yDACI,UAAA,CACA,aAAA,CACA,YAAA,CACA,uBAAA,CACA,oBAAA,CACA,iBAAA,CAEA,+DACI,UAAA,CAEJ,sEACI,SAAA,CAGJ,gEACI,uBAAA,CACA,UAAA,CACA,kBAAA,CACA,iBAAA,CACA,YAAA,CACA,UAAA,CACA,sBAAA,CACA,sBAAA,CAEJ,sFACI,uBAAA,CACA,eAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,kBAAA,CACA,cAAA,CAGJ,kFACI,UAAA,CACA,WAAA,CACA,iBAAA,CACA,kBAAA,CACA,cAAA,CAIR,2DACI,UAAA,CACA,aAAA,CACA,YAAA,CACA,oBAAA,CACA,sBAAA,CAEA,gEACI,WAAA,CACA,UAAA,CAEJ,sEACI,cAAA,CAGR,6DACI,UAAA,CACA,aAAA,CACA,YAAA,CACA,oBAAA,CACA,sBAAA,CACA,kEACI,WAAA,CACA,UAAA,CAEJ,wEACI,cAAA,CAKZ,mCACI,UAAA,CAEA,iBAAA,CACA,eAAA,CACA,WAAA,CAEA,wBAAA,CACA,qBAAA,CACA,oBAAA,CACA,gBAAA,CAEA,mDACI,6BAAA,CACA,eAAA,CACA,2BAAA,CAGJ,8CACI,6CAAA,CAGJ,oDACI,YAAA,CACA,8BAAA,CAEA,2DACI,aAAA,CACA,eAAA,CACA,gBAAA,CACA,aAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CACA,UAAA,CAEA,oEACI,SAAA,CAIR,8DACI,aAAA,CAGJ,gEACI,oBAAA,CACA,cAAA,CACA,gBAAA,CAIR,gDACI,iBAAA,CACA,cAAA,CACA,iBAAA,CACA,UAAA,CAGJ,oDACI,gBA5UA,CA6UA,WAAA,CACA,YAAA,CACA,8BAAA,CAEA,0DACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CAGJ,2DACI,aAAA,CACA,YAAA,CACA,kBAAA,CAIR,iDACI,uBAAA,CACA,UAAA,CACA,UAAA,CAEA,6DACI,uBAAA,CACA,qBAAA,CACA,cAAA,CACA,eAAA,CAGJ,qEACI,cAAA,CACA,OAAA,CACA,SAAA,CACA,UAAA,CACA,QAAA,CACA,WAAA,CAGJ,qEACI,iBAAA,CAIR,mDACI,gBA1XA,CA2XA,WAAA,CACA,YAAA,CACA,mCAAA,CAEA,yDACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,yBAAA,CACA,cAAA,CAGJ,gEACI,aAAA,CAEA,uEACI,eAAA,CACA,wBAAA,CACA,wBAAA,CACA,UAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CAGJ,6EACI,SAAA,CAGJ,8EACI,kBAAA,CAGJ,6EACI,wBAAA,CACA,WAAA,CAIR,8DACI,aAAA,CACA,YAAA,CACA,oBAAA,CAIR,6CACI,gBA1aA,CA2aA,WAAA,CACA,YAAA,CACA,8BAAA,CAEA,sDACI,0BAAA,CAEA,kEACI,aAAA,CACA,gBAAA,CACA,gBAAA,CACA,UAAA,CACA,eAAA,CAGJ,6DACI,aAAA,CACA,gBAAA,CACA,gBAAA,CACA,UAAA,CACA,eAAA,CAIR,6DACI,UAAA,CACA,iBAAA,CAGJ,oDACI,aAAA,CACA,YAAA,CACA,kBAAA,CAGJ,yDACI,aAAA,CACA,kBAAA,CACA,sBAAA,CACA,eAAA,CACA,cAAA,CACA,UAAA,CACA,UAAA,CACA,cAAA,CACA,eAAA,CACA,yBAAA,CACA,cAAA,CAGJ,oDACI,aAAA,CACA,kBAAA,CACA,sBAAA,CACA,eAAA,CACA,cAAA,CACA,UAAA,CACA,UAAA,CACA,cAAA,CACA,eAAA,CACA,wBAAA,CACA,qBAAA,CACA,oBAAA,CACA,gBAAA,CAEA,0DACI,WAAA,CAGJ,4DACI,SAAA,CAKZ,uDACI,cAAA,CAEA,uEACI,WAAA,CACA,YAAA,CACA,oBAAA,CAGJ,sEACI,YAAA,CACA,uBAAA,CACA,uDAAA,CACA,eAAA,CACA,gBAAA,CACA,kBAAA,CACA,kBAAA,CACA,4BAAA,CAEA,4EACI,UAAA,CACA,aAAA,CAGJ,8EACI,WAAA,CAGJ,8EACI,WAAA,CACA,gBAAA,CAGJ,+EACI,UAAA,CACA,aAAA,CACA,cAAA,CAGJ,+EACI,gBAAA,CACA,UAAA,CACA,aAAA,CACA,cAAA,CAEA,uFACI,eAAA,CACA,iBAAA,CAIR,qFACI,sBAAA,CAGJ,kFACI,eAAA,CACA,UAAA,CACA,aAAA,CACA,gBAAA,CACA,gBAAA,CAGJ,mFACI,UAAA,CACA,aAAA,CACA,YAAA,CACA,uBAAA,CACA,oBAAA,CACA,gBAAA,CAEA,yFACI,UAAA,CAIR,uFACI,UAAA,CACA,aAAA,CACA,YAAA,CACA,oBAAA,CACA,sBAAA,CAKZ,kDACI,gBA5kBA,CA6kBA,WAAA,CACA,YAAA,CACA,+BAAA,CAEA,yDACI,aAAA,CACA,YAAA,CACA,kBAAA,CAGJ,yDACI,YAAA,CACA,kBAAA,CACA,aAAA,CAEA,+DACI,WAAA,CAKZ,+CACI,WAAA,CACA,YAAA,CACA,kBAAA,CACA,qBAAA,CAEA,gEACI,YAAA,CAGJ,4DACI,eAAA,CACA,wBAAA,CACA,wBAAA,CACA,UAAA,CACA,eAAA,CACA,cAAA,CACA,UAAA,CACA,cAAA,CACA,iBAAA,CAGJ,kEACI,SAAA,CAGJ,mEACI,qBAAA,CACA,sBAAA,CAGJ,sDACI,eAAA,CACA,wBAAA,CACA,wBAAA,CACA,UAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CAGJ,4DACI,SAAA,CAGJ,6DACI,kBAAA,CAGJ,4DACI,wBAAA,CACA,WAAA,CAIR,8CACI,gBA1pBA,CA2pBA,WAAA,CACA,YAAA,CACA,8BAAA,CAEA,qDACI,aAAA,CACA,YAAA,CACA,kBAAA,CAGJ,8DACI,aAAA,CACA,YAAA,CACA,kBAAA,CAEA,qEACI,YAAA,CAEA,0FACI,oBAAA,CAEJ,yFACI,kBAAA,CAIR,6EACI,oBAAA,CACA,WAAA,CACA,iBAAA,CACA,cAAA,CACA,eAAA,CACA,cAAA,CACA,qBAAA,CACA,uKAEI,iBAAA,CACA,UAAA,CACA,iBAAA,CACA,uBAAA,CACA,0CAAA,CAEJ,oFACI,QAAA,CACA,KAAA,CACA,UAAA,CACA,WAAA,CACA,qBAAA,CAEJ,mFACI,OAAA,CACA,QAAA,CACA,SAAA,CACA,UAAA,CACA,kBAAA,CACA,kBAAA,CAKZ,oDACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CACA,wDACI,WAAA,CAKZ,gDACI,gBApuBA,CAquBA,YAAA,CAEA,2DACI,YAAA,CACA,mCAAA,CACA,WAAA,CAEA,kEACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,eAAA,CAGJ,mEACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,gBAAA,CACA,UAAA,CACA,gBAAA,CAGJ,mEACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CAGJ,iEACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CACA,qEACI,WAAA,CAKZ,4DACI,YAAA,CACA,iBAAA,CACA,6BAAA,CAEA,qEACI,YAAA,CACA,8BAAA,CAGJ,2EACI,gBAAA,CACA,aAAA,CACA,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,iBAAA,CAGJ,2EACI,WAAA,CACA,aAAA,CACA,YAAA,CACA,kBAAA,CACA,wBAAA,CAKZ,iDACI,gBA/yBA,CAgzBA,WAAA,CACA,YAAA,CACA,wCAAA,CAEA,wDACI,aAAA,CACA,YAAA,CACA,kBAAA,CAGJ,2DACI,aAAA,CAEA,YAAA,CACA,kBAAA,CAEA,gEACI,iBAAA,CACA,aAAA,CACA,WAAA,CACA,UAAA,CACA,gBAAA,CACA,kBAAA,CACA,mBAAA,CACA,cAAA,CACA,uBAAA,CAEA,wEACI,kBAAA,CAIR,sEACI,iBAAA,CACA,QAAA,CACA,OAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,mBAAA,CACA,eAAA,CACA,sCAAA,CACA,UAAA,CACA,wBAAA,CAEA,8EACI,SAAA,CACA,kBAAA,CAIR,8EACI,iBAAA,CACA,OAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,mBAAA,CACA,eAAA,CACA,sCAAA,CACA,UAAA,CACA,wBAAA,CACA,SAAA,CACA,kBAAA,CAGJ,6EACI,2BAAA,CAGJ,mEACI,YAAA,CAGJ,iEACI,YAAA,CAIR,uDACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CACA,2DACI,WAAA,CAKZ,gDACI,YAAA,CACA,4BAAA,CAEA,yDACI,cAAA,CACA,UAAA,CACA,YAAA,CACA,sDAAA,CAEA,8DACI,aAAA,CAGJ,gEACI,aAAA,CAGJ,+DACI,aAAA,CAGJ,gEACI,aAAA,CAGJ,8DACI,aAAA,CAIR,2DACI,cAAA,CACA,UAAA,CACA,YAAA,CACA,2DAAA,CAEA,+DACI,aAAA,CAGJ,+DACI,aAAA,CAGJ,+DACI,aAAA,CAGJ,+DACI,aAAA,CAGJ,+DACI,aAAA,CAGJ,+DACI,aAAA,CAIR,yDACI,8BAAA,CACA,wBAAA,CACA,UAAA,CAGJ,0DACI,wBAAA,CAGJ,yDACI,UAAA,CACA,YAAA,CACA,iBAAA,CACA,mBAAA,CACA,YAAA,CACA,WAAA,CACA,cAAA,CACA,iBAAA,CACA,qBAAA,CACA,yBAAA,CACA,qBAAA,CACA,wDAAA,CAIR,4DACI,gBAAA,CACA,6BAAA,CAGJ,8CACI,gBAz+BA,CA0+BA,WAAA,CACA,YAAA,CACA,+BAAA,CAEA,qDACI,aAAA,CACA,YAAA,CACA,kBAAA,CAGJ,qDACI,aAAA,CAEA,YAAA,CACA,kBAAA,CAEA,2DACI,WAAA,CAIR,oDACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CACA,wDACI,WAAA,CAKZ,+CACI,gBA5gCA,CA6gCA,WAAA,CACA,YAAA,CACA,uBAAA,CACA,mCAAA,CAEA,sDACI,aAAA,CACA,YAAA,CACA,kBAAA,CAGJ,4DACI,eAAA,CAGJ,0DACI,gBA7hCJ,CA+hCI,iEACI,aAAA,CACA,YAAA,CACA,kBAAA,CAEA,uEACI,UAAA,CAGJ,oMAEI,uBAAA,CACA,QAAA,CAGJ,oFACI,yBAAA,CAKZ,uDACI,aAAA,CACA,UAAA,CACA,gBAAA,CACA,SAAA,CACA,YAAA,CACA,kBAAA,CAEA,8DACI,uBAAA,CACA,UAAA,CACA,UAAA,CACA,kBAAA,CACA,iBAAA,CACA,YAAA,CACA,UAAA,CACA,sBAAA,CACA,sBAAA,CAGJ,oEACI,SAAA,CAGJ,oFACI,uBAAA,CACA,eAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,kBAAA,CACA,cAAA,CAGJ,gFACI,UAAA,CACA,WAAA,CACA,iBAAA,CACA,kBAAA,CACA,cAAA,CAKJ,gEACI,YAAA,CAIR,qDACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CACA,yDACI,WAAA,CAKZ,+CACI,gBAlnCA,CAmnCA,YAAA,CAEA,0DACI,WAAA,CACA,YAAA,CACA,mCAAA,CAEA,iEACI,aAAA,CACA,YAAA,CACA,kBAAA,CAGJ,kEACI,aAAA,CACA,UAAA,CAEA,YAAA,CACA,kBAAA,CAEA,oFACI,uBAAA,CACA,qCAAA,CACA,SAAA,CACA,UAAA,CACA,WAAA,CAEJ,kHACI,SAAA,CAEJ,0GACI,WAAA,CAGJ,wEACI,gBAAA,CAIR,kEACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CAGJ,gEACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CACA,oEACI,WAAA,CAKZ,2DACI,YAAA,CACA,iBAAA,CACA,6BAAA,CAEA,oEACI,YAAA,CACA,8BAAA,CAGJ,0EACI,gBAAA,CACA,aAAA,CACA,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,iBAAA,CAGJ,0EACI,WAAA,CACA,aAAA,CACA,YAAA,CACA,kBAAA,CACA,wBAAA,CAKZ,6CACI,gBA5sCA,CA6sCA,WAAA,CACA,YAAA,CACA,wCAAA,CAEA,oDACI,aAAA,CACA,YAAA,CACA,kBAAA,CAGJ,sDACI,aAAA,CAEA,YAAA,CACA,kBAAA,CACA,gBAAA,CAEA,6DACI,WAAA,CAIR,mDACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CACA,uDACI,WAAA,CAKZ,kDACI,cAAA,CACA,YAAA,CACA,uBAAA,CACA,0BAAA,CAEA,4DACI,mCAAA,CAIA,kEACI,yCAAA,CAKI,8FACI,6BAAA,CAMhB,kFACI,UAAA,CACA,aAAA,CACA,SAAA,CACA,oBAAA,CACA,kBAAA,CACA,WAAA,CACA,wBAAA,CACA,mBAAA,CAEA,8FACI,SAAA,CAIR,yEACI,UAAA,CACA,aAAA,CAEA,iFACI,YAAA,CACA,8BAAA,CACA,eAAA,CACA,WAAA,CACA,iBAAA,CACA,cAAA,CAEA,wFACI,mCAAA,CACA,gBAAA,CACA,aAAA,CACA,YAAA,CACA,kBAAA,CAGJ,2FACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,uBAAA,CAEA,kGACI,wBAAA,CAKZ,wGACI,6CAAA,CAGJ,wGACI,6CAAA",sourcesContent:['$line-padding-left: 2px;\r\n\r\n#inspector-host {\r\n position: absolute;\r\n right: 0px;\r\n top: 0px;\r\n bottom: 0px;\r\n}\r\n\r\n#__resizable_base__ {\r\n display: none;\r\n}\r\n\r\n#actionTabs {\r\n background: #333333;\r\n height: 100%;\r\n margin: 0;\r\n padding: 0;\r\n display: grid;\r\n grid-template-rows: auto 1fr;\r\n font: 14px "Arial";\r\n overflow: hidden;\r\n\r\n .hoverIcon:hover {\r\n opacity: 0.8;\r\n }\r\n\r\n #header {\r\n height: 30px;\r\n font-size: 16px;\r\n color: white;\r\n background: #222222;\r\n grid-row: 1;\r\n text-align: center;\r\n display: grid;\r\n grid-template-columns: 30px 1fr 50px;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n\r\n #logo {\r\n grid-column: 1;\r\n width: 24px;\r\n height: 24px;\r\n display: flex;\r\n align-self: center;\r\n justify-self: center;\r\n }\r\n\r\n #back {\r\n grid-column: 1;\r\n display: grid;\r\n align-self: center;\r\n justify-self: center;\r\n cursor: pointer;\r\n }\r\n\r\n #title {\r\n grid-column: 2;\r\n display: grid;\r\n align-items: center;\r\n text-align: center;\r\n }\r\n\r\n #commands {\r\n grid-column: 3;\r\n display: grid;\r\n align-items: center;\r\n grid-template-columns: 1fr 1fr;\r\n\r\n .expand {\r\n grid-column: 1;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n }\r\n\r\n .close {\r\n grid-column: 2;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n }\r\n }\r\n }\r\n\r\n .tabsMenu {\r\n display: grid;\r\n grid-row: 2;\r\n grid-template-rows: 40px 1fr;\r\n font: 14px "Arial";\r\n overflow: hidden;\r\n\r\n .labels {\r\n grid-row: 1;\r\n display: flex;\r\n align-items: center;\r\n justify-items: center;\r\n border-bottom: 1px solid #ffffff;\r\n margin: 0;\r\n padding: 0;\r\n\r\n .label {\r\n font-size: 24px;\r\n color: white;\r\n width: 40px;\r\n display: flex;\r\n align-content: center;\r\n justify-content: center;\r\n border: 1px solid transparent;\r\n border-bottom: none;\r\n background: #333333;\r\n padding: 5px;\r\n height: 28px;\r\n cursor: pointer;\r\n\r\n &.active {\r\n border-color: #ffffff;\r\n border-bottom: 2px solid transparent;\r\n margin-bottom: -2px;\r\n }\r\n }\r\n }\r\n\r\n .panes {\r\n grid-row: 2;\r\n display: grid;\r\n grid-template-rows: 100%;\r\n\r\n overflow: hidden;\r\n\r\n .infoMessage {\r\n opacity: 0.5;\r\n color: white;\r\n margin: 15px 5px 0px 5px;\r\n }\r\n\r\n .gradient-step {\r\n display: grid;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 20px 30px 40px auto 20px 30px;\r\n padding-top: 5px;\r\n padding-left: 5px;\r\n padding-bottom: 5px;\r\n align-items: center;\r\n\r\n .step {\r\n grid-row: 1;\r\n grid-column: 1;\r\n }\r\n\r\n .color1 {\r\n height: 100%;\r\n }\r\n\r\n .color2 {\r\n height: 100%;\r\n padding-left: 5px;\r\n }\r\n\r\n .factor1 {\r\n grid-row: 1;\r\n grid-column: 2;\r\n cursor: pointer;\r\n }\r\n\r\n .factor2 {\r\n padding-left: 5px;\r\n grid-row: 1;\r\n grid-column: 3;\r\n cursor: pointer;\r\n\r\n .grayed {\r\n background: gray;\r\n border-color: gray;\r\n }\r\n }\r\n\r\n .numeric-input {\r\n width: calc(100% - 5px);\r\n }\r\n\r\n .icon {\r\n cursor: pointer;\r\n }\r\n\r\n .step-value {\r\n margin-left: 5px;\r\n grid-row: 1;\r\n grid-column: 3;\r\n text-align: right;\r\n margin-right: 5px;\r\n }\r\n\r\n .step-slider {\r\n grid-row: 1;\r\n grid-column: 4;\r\n display: grid;\r\n justify-content: stretch;\r\n align-content: center;\r\n margin-right: 12px;\r\n\r\n input {\r\n width: 100%;\r\n }\r\n .range:hover {\r\n opacity: 1;\r\n }\r\n\r\n .range {\r\n -webkit-appearance: none;\r\n height: 6px;\r\n background: #d3d3d3;\r\n border-radius: 5px;\r\n outline: none;\r\n opacity: 0.7;\r\n -webkit-transition: 0.2s;\r\n transition: opacity 0.2s;\r\n }\r\n .range::-webkit-slider-thumb {\r\n -webkit-appearance: none;\r\n appearance: none;\r\n width: 14px;\r\n height: 14px;\r\n border-radius: 50%;\r\n background: rgb(51, 122, 183);\r\n cursor: pointer;\r\n }\r\n\r\n .range::-moz-range-thumb {\r\n width: 14px;\r\n height: 14px;\r\n border-radius: 50%;\r\n background: rgb(51, 122, 183);\r\n cursor: pointer;\r\n }\r\n }\r\n\r\n .gradient-copy {\r\n grid-row: 1;\r\n grid-column: 5;\r\n display: grid;\r\n align-content: center;\r\n justify-content: center;\r\n\r\n .img {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n .img:hover {\r\n cursor: pointer;\r\n }\r\n }\r\n .gradient-delete {\r\n grid-row: 1;\r\n grid-column: 6;\r\n display: grid;\r\n align-content: center;\r\n justify-content: center;\r\n .img {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n .img:hover {\r\n cursor: pointer;\r\n }\r\n }\r\n }\r\n\r\n .pane {\r\n color: white;\r\n\r\n overflow-x: hidden;\r\n overflow-y: auto;\r\n height: 100%;\r\n\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n\r\n .animation-info {\r\n border-left: greenyellow 3px solid;\r\n margin-left: 5px;\r\n padding-left: 5px !important;\r\n }\r\n\r\n .underline {\r\n border-bottom: 0.5px solid rgba(255, 255, 255, 0.5);\r\n }\r\n\r\n .textureLinkLine {\r\n display: grid;\r\n grid-template-columns: auto 1fr;\r\n\r\n .debug {\r\n grid-column: 1;\r\n margin-left: 5px;\r\n margin-right: 5px;\r\n display: block;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n opacity: 0.5;\r\n\r\n &.selected {\r\n opacity: 1;\r\n }\r\n }\r\n\r\n .textLine {\r\n grid-column: 2;\r\n }\r\n\r\n .actionIcon {\r\n display: inline-block;\r\n margin-top: 6px;\r\n margin-right: 4px;\r\n }\r\n }\r\n\r\n .messageLine {\r\n text-align: center;\r\n font-size: 12px;\r\n font-style: italic;\r\n opacity: 0.6;\r\n }\r\n\r\n .iconMessageLine {\r\n padding-left: $line-padding-left;\r\n height: 30px;\r\n display: grid;\r\n grid-template-columns: 30px 1fr;\r\n\r\n .icon {\r\n grid-column: 1;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n }\r\n\r\n .value {\r\n grid-column: 2;\r\n display: flex;\r\n align-items: center;\r\n }\r\n }\r\n\r\n .color-picker {\r\n height: calc(100% - 8px);\r\n margin: 4px;\r\n width: 100%;\r\n\r\n .color-rect {\r\n height: calc(100% - 4px);\r\n border: 2px white solid;\r\n cursor: pointer;\r\n min-height: 18px;\r\n }\r\n\r\n .color-picker-cover {\r\n position: fixed;\r\n top: 0px;\r\n right: 0px;\r\n bottom: 0px;\r\n left: 0px;\r\n z-index: 100;\r\n }\r\n\r\n .color-picker-float {\r\n position: absolute;\r\n }\r\n }\r\n\r\n .linkButtonLine {\r\n padding-left: $line-padding-left;\r\n height: 30px;\r\n display: grid;\r\n grid-template-columns: 1fr auto 20px;\r\n\r\n .link {\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n text-decoration: underline;\r\n cursor: pointer;\r\n }\r\n\r\n .link-button {\r\n grid-column: 2;\r\n\r\n button {\r\n background: #222222;\r\n border: 1px solid rgb(51, 122, 183);\r\n margin: 5px 10px 5px 10px;\r\n color: white;\r\n padding: 4px 5px;\r\n opacity: 0.9;\r\n cursor: pointer;\r\n }\r\n\r\n button:hover {\r\n opacity: 1;\r\n }\r\n\r\n button:active {\r\n background: #282828;\r\n }\r\n\r\n button:focus {\r\n border: 1px solid rgb(51, 122, 183);\r\n outline: 0px;\r\n }\r\n }\r\n\r\n .link-icon {\r\n grid-column: 3;\r\n display: grid;\r\n align-content: center;\r\n }\r\n }\r\n\r\n .textLine {\r\n padding-left: $line-padding-left;\r\n height: 30px;\r\n display: grid;\r\n grid-template-columns: 1fr auto;\r\n\r\n &.indented {\r\n grid-template-columns: 100%;\r\n\r\n .link-value {\r\n grid-column: 1;\r\n text-align: start;\r\n margin-left: 20px;\r\n opacity: 0.6;\r\n max-width: unset;\r\n }\r\n\r\n .value {\r\n grid-column: 1;\r\n text-align: start;\r\n margin-left: 20px;\r\n opacity: 0.6;\r\n max-width: unset;\r\n }\r\n }\r\n\r\n &.reduced-opacity {\r\n opacity: 0.6;\r\n padding-left: 25px;\r\n }\r\n\r\n .label {\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .link-value {\r\n grid-column: 2;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n text-align: end;\r\n opacity: 0.8;\r\n margin: 5px;\r\n margin-top: 7px;\r\n max-width: 140px;\r\n text-decoration: underline;\r\n cursor: pointer;\r\n }\r\n\r\n .value {\r\n grid-column: 2;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n text-align: end;\r\n opacity: 0.8;\r\n margin: 5px;\r\n margin-top: 7px;\r\n max-width: 200px;\r\n -webkit-user-select: text;\r\n -moz-user-select: text;\r\n -ms-user-select: text;\r\n user-select: text;\r\n\r\n &.check {\r\n color: green;\r\n }\r\n\r\n &.uncheck {\r\n color: red;\r\n }\r\n }\r\n }\r\n\r\n .gradient-container {\r\n margin-top: 3px;\r\n\r\n .gradient-label {\r\n height: 30px;\r\n display: grid;\r\n align-content: center;\r\n }\r\n\r\n .gradient-step {\r\n display: grid;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 25px 50px 55px 40px auto 20px 5px;\r\n padding-top: 5px;\r\n padding-left: 5px;\r\n padding-bottom: 5px;\r\n align-items: center;\r\n border-left: orange 3px solid;\r\n\r\n .step {\r\n grid-row: 1;\r\n grid-column: 1;\r\n }\r\n\r\n .color1 {\r\n height: 100%;\r\n }\r\n\r\n .color2 {\r\n height: 100%;\r\n padding-left: 5px;\r\n }\r\n\r\n .factor1 {\r\n grid-row: 1;\r\n grid-column: 2;\r\n cursor: pointer;\r\n }\r\n\r\n .factor2 {\r\n padding-left: 5px;\r\n grid-row: 1;\r\n grid-column: 3;\r\n cursor: pointer;\r\n\r\n .grayed {\r\n background: gray;\r\n border-color: gray;\r\n }\r\n }\r\n\r\n .numeric-input {\r\n width: calc(100% - 5px);\r\n }\r\n\r\n .step-value {\r\n margin-left: 5px;\r\n grid-row: 1;\r\n grid-column: 4;\r\n text-align: right;\r\n margin-right: 5px;\r\n }\r\n\r\n .step-slider {\r\n grid-row: 1;\r\n grid-column: 5;\r\n display: grid;\r\n justify-content: stretch;\r\n align-content: center;\r\n margin-right: 5px;\r\n\r\n input {\r\n width: 100%;\r\n }\r\n }\r\n\r\n .gradient-delete {\r\n grid-row: 1;\r\n grid-column: 6;\r\n display: grid;\r\n align-content: center;\r\n justify-content: center;\r\n }\r\n }\r\n }\r\n\r\n .textInputLine {\r\n padding-left: $line-padding-left;\r\n height: 30px;\r\n display: grid;\r\n grid-template-columns: 1fr 120px;\r\n\r\n .label {\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .value {\r\n display: flex;\r\n align-items: center;\r\n grid-column: 2;\r\n\r\n input {\r\n width: 110px;\r\n }\r\n }\r\n }\r\n\r\n .buttonLine {\r\n height: 30px;\r\n display: grid;\r\n align-items: center;\r\n justify-items: stretch;\r\n\r\n input[type="file"] {\r\n display: none;\r\n }\r\n\r\n .file-upload {\r\n background: #222222;\r\n border: 1px solid rgb(51, 122, 183);\r\n margin: 5px 10px 5px 10px;\r\n color: white;\r\n padding: 4px 5px;\r\n font-size: 13px;\r\n opacity: 0.9;\r\n cursor: pointer;\r\n text-align: center;\r\n }\r\n\r\n .file-upload:hover {\r\n opacity: 1;\r\n }\r\n\r\n .file-upload:active {\r\n transform: scale(0.98);\r\n transform-origin: 0.5 0.5;\r\n }\r\n\r\n button {\r\n background: #222222;\r\n border: 1px solid rgb(51, 122, 183);\r\n margin: 5px 10px 5px 10px;\r\n color: white;\r\n padding: 4px 5px;\r\n opacity: 0.9;\r\n cursor: pointer;\r\n }\r\n\r\n button:hover {\r\n opacity: 1;\r\n }\r\n\r\n button:active {\r\n background: #282828;\r\n }\r\n\r\n button:focus {\r\n border: 1px solid rgb(51, 122, 183);\r\n outline: 0px;\r\n }\r\n }\r\n\r\n .radioLine {\r\n padding-left: $line-padding-left;\r\n height: 30px;\r\n display: grid;\r\n grid-template-columns: 1fr 24px;\r\n\r\n .label {\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .radioContainer {\r\n grid-column: 2;\r\n display: flex;\r\n align-items: center;\r\n\r\n .radio {\r\n display: none;\r\n\r\n &:checked + label:before {\r\n border-color: rgb(51, 122, 183);\r\n }\r\n &:checked + label:after {\r\n transform: scale(1);\r\n }\r\n }\r\n\r\n .labelForRadio {\r\n display: inline-block;\r\n height: 14px;\r\n position: relative;\r\n padding: 0 24px;\r\n margin-bottom: 0;\r\n cursor: pointer;\r\n vertical-align: bottom;\r\n &:before,\r\n &:after {\r\n position: absolute;\r\n content: "";\r\n border-radius: 50%;\r\n transition: all 0.3s ease;\r\n transition-property: transform, border-color;\r\n }\r\n &:before {\r\n left: 0px;\r\n top: 0;\r\n width: 16px;\r\n height: 16px;\r\n border: 2px solid white;\r\n }\r\n &:after {\r\n top: 6px;\r\n left: 6px;\r\n width: 8px;\r\n height: 8px;\r\n transform: scale(0);\r\n background: rgb(51, 122, 183);\r\n }\r\n }\r\n }\r\n\r\n .copy {\r\n grid-column: 3;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n img {\r\n height: 100%;\r\n }\r\n }\r\n }\r\n\r\n .vector3Line {\r\n padding-left: $line-padding-left;\r\n display: grid;\r\n\r\n .firstLine {\r\n display: grid;\r\n grid-template-columns: 1fr auto 20px;\r\n height: 30px;\r\n\r\n .label {\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n }\r\n\r\n .vector {\r\n grid-column: 2;\r\n display: flex;\r\n align-items: center;\r\n text-align: right;\r\n opacity: 0.8;\r\n padding-left: 5px;\r\n }\r\n\r\n .expand {\r\n grid-column: 3;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n }\r\n\r\n .copy {\r\n grid-column: 4;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n img {\r\n height: 100%;\r\n }\r\n }\r\n }\r\n\r\n .secondLine {\r\n display: grid;\r\n padding-right: 5px;\r\n border-left: 1px solid rgb(51, 122, 183);\r\n\r\n .numeric {\r\n display: grid;\r\n grid-template-columns: 1fr auto;\r\n }\r\n\r\n .numeric-label {\r\n text-align: right;\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n justify-self: right;\r\n margin-right: 10px;\r\n }\r\n\r\n .numeric-value {\r\n width: 120px;\r\n grid-column: 2;\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid rgb(51, 122, 183);\r\n }\r\n }\r\n }\r\n\r\n .checkBoxLine {\r\n padding-left: $line-padding-left;\r\n height: 30px;\r\n display: grid;\r\n grid-template-columns: 1fr auto 20px 10px;\r\n\r\n .label {\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .checkBox {\r\n grid-column: 2;\r\n\r\n display: flex;\r\n align-items: center;\r\n\r\n .lbl {\r\n position: relative;\r\n display: block;\r\n height: 14px;\r\n width: 34px;\r\n margin-right: 5px;\r\n background: #898989;\r\n border-radius: 100px;\r\n cursor: pointer;\r\n transition: all 0.3s ease;\r\n\r\n &.checked {\r\n background: rgb(51, 122, 183);\r\n }\r\n }\r\n\r\n .lbl:after {\r\n position: absolute;\r\n left: 3px;\r\n top: 2px;\r\n display: block;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 100px;\r\n background: #fff;\r\n box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.05);\r\n content: "";\r\n transition: all 0.15s ease;\r\n\r\n &.checked {\r\n left: 20px;\r\n background: rgb(22, 73, 117);\r\n }\r\n }\r\n\r\n .lbl.checked:after {\r\n position: absolute;\r\n top: 2px;\r\n display: block;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 100px;\r\n background: #fff;\r\n box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.05);\r\n content: "";\r\n transition: all 0.15s ease;\r\n left: 20px;\r\n background: rgb(22, 73, 117);\r\n }\r\n\r\n .lbl:active:after {\r\n transform: scale(1.15, 0.85);\r\n }\r\n\r\n .hidden {\r\n display: none;\r\n }\r\n\r\n .icon {\r\n display: none;\r\n }\r\n }\r\n\r\n .copy {\r\n grid-column: 3;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n img {\r\n height: 100%;\r\n }\r\n }\r\n }\r\n\r\n .textureLine {\r\n display: grid;\r\n grid-template-rows: 30px auto;\r\n\r\n .control {\r\n margin-top: 2px;\r\n grid-row: 1;\r\n display: grid;\r\n grid-template-columns: 1fr 40px 40px 40px 40px 40px 1fr;\r\n\r\n .red {\r\n grid-column: 2;\r\n }\r\n\r\n .green {\r\n grid-column: 3;\r\n }\r\n\r\n .blue {\r\n grid-column: 4;\r\n }\r\n\r\n .alpha {\r\n grid-column: 5;\r\n }\r\n\r\n .all {\r\n grid-column: 6;\r\n }\r\n }\r\n\r\n .control3D {\r\n margin-top: 2px;\r\n grid-row: 1;\r\n display: grid;\r\n grid-template-columns: 1fr 40px 40px 40px 40px 40px 40px 1fr;\r\n\r\n .px {\r\n grid-column: 2;\r\n }\r\n\r\n .nx {\r\n grid-column: 3;\r\n }\r\n\r\n .py {\r\n grid-column: 4;\r\n }\r\n\r\n .ny {\r\n grid-column: 5;\r\n }\r\n\r\n .pz {\r\n grid-column: 6;\r\n }\r\n\r\n .nz {\r\n grid-column: 7;\r\n }\r\n }\r\n\r\n .command {\r\n border: 1px solid transparent;\r\n background: transparent;\r\n color: white;\r\n }\r\n\r\n .selected {\r\n border: 1px solid rgb(51, 122, 183);\r\n }\r\n\r\n .preview {\r\n grid-row: 2;\r\n display: grid;\r\n align-self: center;\r\n justify-self: center;\r\n height: 256px;\r\n width: 256px;\r\n margin-top: 5px;\r\n margin-bottom: 5px;\r\n border: 1px solid white;\r\n background-size: 32px 32px;\r\n background-color: white;\r\n background-image: url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 2 2\'%3E%3Cpath fill=\'rgba(1.0,1.0,1.0,0.3)\' fill-rule=\'evenodd\' d=\'M0 0h1v1H0V0zm1 1h1v1H1V1z\'/%3E%3C/svg%3E");\r\n }\r\n }\r\n\r\n .gltf-extension-property {\r\n margin-left: 30px;\r\n border-left: 1px solid rgb(51, 122, 183);\r\n }\r\n\r\n .floatLine {\r\n padding-left: $line-padding-left;\r\n height: 30px;\r\n display: grid;\r\n grid-template-columns: 1fr 120px;\r\n\r\n .label {\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .value {\r\n grid-column: 2;\r\n\r\n display: flex;\r\n align-items: center;\r\n\r\n input {\r\n width: 110px;\r\n }\r\n }\r\n\r\n .copy {\r\n grid-column: 3;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n img {\r\n height: 100%;\r\n }\r\n }\r\n }\r\n\r\n .sliderLine {\r\n padding-left: $line-padding-left;\r\n height: 30px;\r\n display: grid;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 1fr 50px auto;\r\n\r\n .label {\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .withMargins {\r\n margin-left: 5px;\r\n }\r\n\r\n .floatLine {\r\n padding-left: $line-padding-left;\r\n\r\n .short {\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n\r\n input {\r\n width: 35px;\r\n }\r\n\r\n input::-webkit-outer-spin-button,\r\n input::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n }\r\n\r\n input[type="number"] {\r\n -moz-appearance: textfield;\r\n }\r\n }\r\n }\r\n\r\n .slider {\r\n grid-column: 3;\r\n grid-row: 1;\r\n margin-right: 5px;\r\n width: 90%;\r\n display: flex;\r\n align-items: center;\r\n\r\n .range {\r\n -webkit-appearance: none;\r\n width: 100%;\r\n height: 6px;\r\n background: #d3d3d3;\r\n border-radius: 5px;\r\n outline: none;\r\n opacity: 0.7;\r\n -webkit-transition: 0.2s;\r\n transition: opacity 0.2s;\r\n }\r\n\r\n .range:hover {\r\n opacity: 1;\r\n }\r\n\r\n .range::-webkit-slider-thumb {\r\n -webkit-appearance: none;\r\n appearance: none;\r\n width: 14px;\r\n height: 14px;\r\n border-radius: 50%;\r\n background: rgb(51, 122, 183);\r\n cursor: pointer;\r\n }\r\n\r\n .range::-moz-range-thumb {\r\n width: 14px;\r\n height: 14px;\r\n border-radius: 50%;\r\n background: rgb(51, 122, 183);\r\n cursor: pointer;\r\n }\r\n }\r\n\r\n .floatLine {\r\n .copy {\r\n display: none;\r\n }\r\n }\r\n\r\n .copy {\r\n grid-column: 4;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n img {\r\n height: 100%;\r\n }\r\n }\r\n }\r\n\r\n .color3Line {\r\n padding-left: $line-padding-left;\r\n display: grid;\r\n\r\n .firstLine {\r\n height: 30px;\r\n display: grid;\r\n grid-template-columns: 1fr auto 20px;\r\n\r\n .label {\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .color3 {\r\n grid-column: 2;\r\n width: 50px;\r\n\r\n display: flex;\r\n align-items: center;\r\n\r\n input[type="color"] {\r\n -webkit-appearance: none;\r\n border: 1px solid rgba(255, 255, 255, 0.5);\r\n padding: 0;\r\n width: 30px;\r\n height: 20px;\r\n }\r\n input[type="color"]::-webkit-color-swatch-wrapper {\r\n padding: 0;\r\n }\r\n input[type="color"]::-webkit-color-swatch {\r\n border: none;\r\n }\r\n\r\n input {\r\n margin-right: 5px;\r\n }\r\n }\r\n\r\n .expand {\r\n grid-column: 3;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n }\r\n\r\n .copy {\r\n grid-column: 4;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n img {\r\n height: 100%;\r\n }\r\n }\r\n }\r\n\r\n .secondLine {\r\n display: grid;\r\n padding-right: 5px;\r\n border-left: 1px solid rgb(51, 122, 183);\r\n\r\n .numeric {\r\n display: grid;\r\n grid-template-columns: 1fr auto;\r\n }\r\n\r\n .numeric-label {\r\n text-align: right;\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n justify-self: right;\r\n margin-right: 10px;\r\n }\r\n\r\n .numeric-value {\r\n width: 120px;\r\n grid-column: 2;\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid rgb(51, 122, 183);\r\n }\r\n }\r\n }\r\n\r\n .listLine {\r\n padding-left: $line-padding-left;\r\n height: 30px;\r\n display: grid;\r\n grid-template-columns: 1fr auto 20px 10px;\r\n\r\n .label {\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .options {\r\n grid-column: 2;\r\n\r\n display: flex;\r\n align-items: center;\r\n margin-right: 5px;\r\n\r\n select {\r\n width: 115px;\r\n }\r\n }\r\n\r\n .copy {\r\n grid-column: 3;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n img {\r\n height: 100%;\r\n }\r\n }\r\n }\r\n\r\n .paneContainer {\r\n margin-top: 3px;\r\n display: grid;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 100%;\r\n\r\n .paneList {\r\n border-left: 3px solid transparent;\r\n }\r\n\r\n &:hover {\r\n .paneList {\r\n border-left: 3px solid rgba(51, 122, 183, 0.8);\r\n }\r\n\r\n .paneContainer-content {\r\n .header {\r\n .title {\r\n border-left: 3px solid rgb(51, 122, 183);\r\n }\r\n }\r\n }\r\n }\r\n\r\n .paneContainer-highlight-border {\r\n grid-row: 1;\r\n grid-column: 1;\r\n opacity: 1;\r\n border: 3px solid red;\r\n margin-bottom: -5px;\r\n z-index: 100;\r\n transition: opacity 250ms;\r\n pointer-events: none;\r\n\r\n &.transparent {\r\n opacity: 0;\r\n }\r\n }\r\n\r\n .paneContainer-content {\r\n grid-row: 1;\r\n grid-column: 1;\r\n\r\n .header {\r\n display: grid;\r\n grid-template-columns: 1fr auto;\r\n background: #555555;\r\n height: 30px;\r\n padding-right: 5px;\r\n cursor: pointer;\r\n\r\n .title {\r\n border-left: 3px solid transparent;\r\n padding-left: 5px;\r\n grid-column: 1;\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .collapse {\r\n grid-column: 2;\r\n display: flex;\r\n align-items: center;\r\n justify-items: center;\r\n transform-origin: center;\r\n\r\n &.closed {\r\n transform: rotate(180deg);\r\n }\r\n }\r\n }\r\n\r\n .paneList > div:not(:last-child) {\r\n border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);\r\n }\r\n\r\n .fragment > div:not(:last-child) {\r\n border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n'],sourceRoot:""}]),c.locals={};const h=c},5030:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(3234),s=r.n(n),o=r(7474),a=r.n(o)()(s());a.push([e.id,'#performance-viewer{display:grid;height:100%;width:100%;grid-template-columns:300px 1fr;font-family:"acumin-pro"}#performance-viewer .performancePlayheadButton{grid-area:liveButton;height:30px;width:100px;justify-self:right;background-color:#dcdfe1;color:#2e3f47;outline:2px #2e3f47;margin:5px;position:absolute;top:10px;right:10px}#performance-viewer #performance-viewer-sidebar{display:flex;flex-direction:column;overflow-y:scroll;border:2px solid gray}#performance-viewer #performance-viewer-sidebar .sidebar-item{display:grid;width:100%;height:30px;font-size:14px;padding:2.5px 0px;align-items:center}#performance-viewer #performance-viewer-sidebar .header{color:#fff;grid-template-columns:10px 9fr 1fr 10px}#performance-viewer #performance-viewer-sidebar .header .category{grid-column:2}#performance-viewer #performance-viewer-sidebar .header .value{grid-column:3}#performance-viewer #performance-viewer-sidebar .version-header{background-color:#2e3f47;color:#fff;grid-template-columns:10px 1fr 1fr 10px;font-size:14px;height:35px}#performance-viewer #performance-viewer-sidebar .version-header .category{grid-column:2}#performance-viewer #performance-viewer-sidebar .version-header .value{grid-column:3;display:flex;justify-content:end}#performance-viewer #performance-viewer-sidebar .category-header{background-color:#4a5960;text-transform:uppercase;font-size:14px;height:30px}#performance-viewer #performance-viewer-sidebar .category-header .checkBoxLine{color:#dcdfe1}#performance-viewer #performance-viewer-sidebar .measure{color:#000;grid-template-columns:18px 6fr 1fr;font-family:"acumin-pro-condensed"}#performance-viewer #performance-viewer-sidebar .measure .category{display:grid;grid-template-columns:18px 7px 18px 10px 1fr;grid-column:2;align-items:center}#performance-viewer #performance-viewer-sidebar .measure .category .color-picker{grid-column:3}#performance-viewer #performance-viewer-sidebar .measure .category .sidebar-item-label{grid-column:5}#performance-viewer #performance-viewer-sidebar .measure .value{grid-column:3}#performance-viewer #performance-viewer-sidebar .measure:nth-child(odd){background-color:#dcdfe1}#performance-viewer #performance-viewer-sidebar .measure:nth-child(even){background-color:#ebedee}#performance-viewer #performance-viewer-sidebar .checkBoxLine{color:#4a5960;width:100%;height:100%;display:flex;justify-content:center;align-items:center}#performance-viewer #performance-viewer-sidebar .checkBoxLine .disabled{color:#d3d3d3}#performance-viewer #performance-viewer-sidebar .color-picker{width:100%}#performance-viewer #performance-viewer-sidebar .color-picker .color-rect{height:18px;width:18px;cursor:pointer}#performance-viewer #performance-viewer-sidebar .color-picker .color-picker-cover{position:fixed;top:0px;right:0px;bottom:0px;left:0px;z-index:100}#performance-viewer #performance-viewer-sidebar .color-picker .color-picker-float{position:absolute}#performance-viewer #performance-viewer-sidebar .color-picker .color-picker-float .color-picker-container{width:200px}',"",{version:3,sources:["webpack://./../../../dev/inspector/dist/components/actionTabs/tabs/performanceViewer/scss/performanceViewer.scss"],names:[],mappings:"AAGA,oBACI,YAAA,CACA,WAAA,CACA,UAAA,CACA,+BAAA,CACA,wBAAA,CAEA,+CACI,oBAAA,CACA,WAZO,CAaP,WAAA,CACA,kBAAA,CACA,wBAAA,CACA,aAAA,CACA,mBAAA,CACA,UAAA,CACA,iBAAA,CACA,QAAA,CACA,UAAA,CAGJ,gDACI,YAAA,CACA,qBAAA,CACA,iBAAA,CAEA,qBAAA,CAEA,8DACI,YAAA,CACA,UAAA,CACA,WAAA,CACA,cAAA,CACA,iBAAA,CACA,kBAAA,CAGJ,wDACI,UAAA,CACA,uCAAA,CAEA,kEACI,aAAA,CAGJ,+DACI,aAAA,CAIR,gEACI,wBAAA,CACA,UAAA,CACA,uCAAA,CACA,cAAA,CACA,WAAA,CAEA,0EACI,aAAA,CAGJ,uEACI,aAAA,CACA,YAAA,CACA,mBAAA,CAKR,iEACI,wBAAA,CACA,wBAAA,CACA,cAAA,CACA,WAAA,CAEA,+EACI,aAAA,CAIR,yDACI,UAAA,CACA,kCAAA,CACA,kCAAA,CAEA,mEACI,YAAA,CACA,4CAAA,CACA,aAAA,CACA,kBAAA,CAEA,iFACI,aAAA,CAGJ,uFACI,aAAA,CAIR,gEACI,aAAA,CAKR,wEACI,wBAAA,CAIJ,yEACI,wBAAA,CAGJ,8DACI,aAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,wEACI,aAAA,CAIR,8DACI,UAAA,CAEA,0EACI,WArIH,CAsIG,UAtIH,CAuIG,cAAA,CAGJ,kFACI,cAAA,CACA,OAAA,CACA,SAAA,CACA,UAAA,CACA,QAAA,CACA,WAAA,CAGJ,kFACI,iBAAA,CAEA,0GACI,WAAA",sourcesContent:['$buttonHeight: 30px;\r\n$squareSize: 18px;\r\n\r\n#performance-viewer {\r\n display: grid;\r\n height: 100%;\r\n width: 100%;\r\n grid-template-columns: 300px 1fr;\r\n font-family: "acumin-pro";\r\n\r\n .performancePlayheadButton {\r\n grid-area: liveButton;\r\n height: $buttonHeight;\r\n width: 100px;\r\n justify-self: right;\r\n background-color: #dcdfe1;\r\n color: #2e3f47;\r\n outline: 2px #2e3f47;\r\n margin: 5px;\r\n position: absolute;\r\n top: 10px;\r\n right: 10px;\r\n }\r\n\r\n #performance-viewer-sidebar {\r\n display: flex;\r\n flex-direction: column;\r\n overflow-y: scroll;\r\n\r\n border: 2px solid gray;\r\n\r\n .sidebar-item {\r\n display: grid;\r\n width: 100%;\r\n height: 30px;\r\n font-size: 14px;\r\n padding: 2.5px 0px;\r\n align-items: center;\r\n }\r\n\r\n .header {\r\n color: white;\r\n grid-template-columns: 10px 9fr 1fr 10px;\r\n\r\n .category {\r\n grid-column: 2;\r\n }\r\n\r\n .value {\r\n grid-column: 3;\r\n }\r\n }\r\n\r\n .version-header {\r\n background-color: #2e3f47;\r\n color: white;\r\n grid-template-columns: 10px 1fr 1fr 10px;\r\n font-size: 14px;\r\n height: 35px; // with padding, we get 40px\r\n\r\n .category {\r\n grid-column: 2;\r\n }\r\n\r\n .value {\r\n grid-column: 3;\r\n display: flex;\r\n justify-content: end;\r\n }\r\n }\r\n\r\n // mid-dark color\r\n .category-header {\r\n background-color: #4a5960;\r\n text-transform: uppercase;\r\n font-size: 14px;\r\n height: 30px;\r\n\r\n .checkBoxLine {\r\n color: #dcdfe1;\r\n }\r\n }\r\n\r\n .measure {\r\n color: black;\r\n grid-template-columns: $squareSize 6fr 1fr;\r\n font-family: "acumin-pro-condensed";\r\n\r\n .category {\r\n display: grid;\r\n grid-template-columns: $squareSize 7px $squareSize 10px 1fr;\r\n grid-column: 2;\r\n align-items: center;\r\n\r\n .color-picker {\r\n grid-column: 3;\r\n }\r\n\r\n .sidebar-item-label {\r\n grid-column: 5;\r\n }\r\n }\r\n\r\n .value {\r\n grid-column: 3;\r\n }\r\n }\r\n\r\n //darker color\r\n .measure:nth-child(odd) {\r\n background-color: #dcdfe1;\r\n }\r\n\r\n // lighter color\r\n .measure:nth-child(even) {\r\n background-color: #ebedee;\r\n }\r\n\r\n .checkBoxLine {\r\n color: #4a5960;\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n .disabled {\r\n color: lightgray;\r\n }\r\n }\r\n\r\n .color-picker {\r\n width: 100%;\r\n\r\n .color-rect {\r\n height: $squareSize;\r\n width: $squareSize;\r\n cursor: pointer;\r\n }\r\n\r\n .color-picker-cover {\r\n position: fixed;\r\n top: 0px;\r\n right: 0px;\r\n bottom: 0px;\r\n left: 0px;\r\n z-index: 100;\r\n }\r\n\r\n .color-picker-float {\r\n position: absolute;\r\n\r\n .color-picker-container {\r\n width: 200px;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n'],sourceRoot:""}]),a.locals={};const i=a},2685:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(3234),s=r.n(n),o=r(7474),a=r.n(o)()(s());a.push([e.id,'#bottom-bar{display:grid;grid-template-rows:100%;grid-template-columns:10px 210px 10px 1fr 10px 61px 10px}#bottom-bar #bottom-bar-total{grid-row:1;grid-column:6;color:#fff;background:#222;height:25px;align-self:center;font-size:12pt}#bottom-bar #bottom-bar-total #clip-range{width:100%}#bottom-bar .control-button .control-button-image{display:unset}#bottom-bar .control-button .control-button-hover-image{display:none}#bottom-bar .control-button:hover{cursor:pointer}#bottom-bar .control-button:hover .control-button-image{display:none}#bottom-bar .control-button:hover .control-button-hover-image{display:unset}#bottom-bar .control-button:active{transform-origin:50% 50%;transform:scale(0.96)}#bottom-bar #media-player{grid-row:1;grid-column:2;display:grid;align-self:center;justify-self:center;grid-template-rows:100%;grid-template-columns:23px 23px 23px 23px 23px 23px 23px}#bottom-bar #media-player #start-key{grid-row:1;grid-column:1}#bottom-bar #media-player #prev-frame{grid-row:1;grid-column:2}#bottom-bar #media-player #first-key{grid-row:1;grid-column:3}#bottom-bar #media-player #rev-key{grid-row:1;grid-column:4}#bottom-bar #media-player #fwd-key{grid-row:1;grid-column:5}#bottom-bar #media-player #next-key{grid-row:1;grid-column:6}#bottom-bar #media-player #next-frame{grid-row:1;grid-column:7}#bottom-bar #media-player #end-key{grid-row:1;grid-column:8}#bottom-bar #range-selector{grid-row:1;grid-column:4;background:#222;width:100%;height:calc(100% - 20px);margin:10px 0;position:relative}#bottom-bar #range-selector #range-scrollbar{position:absolute;left:2px;top:2px;right:2px;bottom:2px;background:#666;display:grid;grid-template-rows:100%;grid-template-columns:20px auto 1fr auto 20px;color:#222;font-family:"acumin-pro-condensed";font-size:14px;min-width:70px}#bottom-bar #range-selector #range-scrollbar #left-handle{grid-row:1;grid-column:1}#bottom-bar #range-selector #range-scrollbar #right-handle{grid-row:1;grid-column:5}#bottom-bar #range-selector #range-scrollbar #from-key{grid-row:1;grid-column:2;align-self:center;justify-self:center;user-select:none;pointer-events:none}#bottom-bar #range-selector #range-scrollbar #to-key{grid-row:1;grid-column:4;align-self:center;justify-self:center;user-select:none;pointer-events:none}#bottom-bar #range-selector #range-scrollbar .handle{width:20px;align-self:center;justify-self:center;cursor:pointer;user-select:none}#bottom-bar #range-selector #range-scrollbar .handle img{pointer-events:none}',"",{version:3,sources:["webpack://./../../../dev/inspector/dist/components/actionTabs/tabs/propertyGrids/animations/curveEditor/scss/bottomBar.scss"],names:[],mappings:"AAAA,YACI,YAAA,CACA,uBAAA,CACA,wDAAA,CAEA,8BACI,UAAA,CACA,aAAA,CACA,UAAA,CACA,eAAA,CACA,WAAA,CACA,iBAAA,CACA,cAAA,CAEA,0CACI,UAAA,CAKJ,kDACI,aAAA,CAGJ,wDACI,YAAA,CAGJ,kCACI,cAAA,CAEA,wDACI,YAAA,CAGJ,8DACI,aAAA,CAIR,mCACI,wBAAA,CACA,qBAAA,CAIR,0BACI,UAAA,CACA,aAAA,CACA,YAAA,CACA,iBAAA,CACA,mBAAA,CACA,uBAAA,CACA,wDAAA,CAEA,qCACI,UAAA,CACA,aAAA,CAGJ,sCACI,UAAA,CACA,aAAA,CAGJ,qCACI,UAAA,CACA,aAAA,CAGJ,mCACI,UAAA,CACA,aAAA,CAGJ,mCACI,UAAA,CACA,aAAA,CAGJ,oCACI,UAAA,CACA,aAAA,CAGJ,sCACI,UAAA,CACA,aAAA,CAGJ,mCACI,UAAA,CACA,aAAA,CAIR,4BACI,UAAA,CACA,aAAA,CACA,eAAA,CACA,UAAA,CACA,wBAAA,CACA,aAAA,CACA,iBAAA,CAEA,6CACI,iBAAA,CACA,QAAA,CACA,OAAA,CACA,SAAA,CACA,UAAA,CACA,eAAA,CACA,YAAA,CACA,uBAAA,CACA,6CAAA,CACA,UAAA,CACA,kCAAA,CACA,cAAA,CACA,cAAA,CAEA,0DACI,UAAA,CACA,aAAA,CAGJ,2DACI,UAAA,CACA,aAAA,CAGJ,uDACI,UAAA,CACA,aAAA,CACA,iBAAA,CACA,mBAAA,CACA,gBAAA,CACA,mBAAA,CAGJ,qDACI,UAAA,CACA,aAAA,CACA,iBAAA,CACA,mBAAA,CACA,gBAAA,CACA,mBAAA,CAGJ,qDACI,UAAA,CACA,iBAAA,CACA,mBAAA,CACA,cAAA,CACA,gBAAA,CAEA,yDACI,mBAAA",sourcesContent:['#bottom-bar {\r\n display: grid;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 10px 210px 10px 1fr 10px 61px 10px;\r\n\r\n #bottom-bar-total {\r\n grid-row: 1;\r\n grid-column: 6;\r\n color: white;\r\n background: #222222;\r\n height: 25px;\r\n align-self: center;\r\n font-size: 12pt;\r\n\r\n #clip-range {\r\n width: 100%;\r\n }\r\n }\r\n\r\n .control-button {\r\n .control-button-image {\r\n display: unset;\r\n }\r\n\r\n .control-button-hover-image {\r\n display: none;\r\n }\r\n\r\n &:hover {\r\n cursor: pointer;\r\n\r\n .control-button-image {\r\n display: none;\r\n }\r\n\r\n .control-button-hover-image {\r\n display: unset;\r\n }\r\n }\r\n\r\n &:active {\r\n transform-origin: 50% 50%;\r\n transform: scale(0.96);\r\n }\r\n }\r\n\r\n #media-player {\r\n grid-row: 1;\r\n grid-column: 2;\r\n display: grid;\r\n align-self: center;\r\n justify-self: center;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 23px 23px 23px 23px 23px 23px 23px;\r\n\r\n #start-key {\r\n grid-row: 1;\r\n grid-column: 1;\r\n }\r\n\r\n #prev-frame {\r\n grid-row: 1;\r\n grid-column: 2;\r\n }\r\n\r\n #first-key {\r\n grid-row: 1;\r\n grid-column: 3;\r\n }\r\n\r\n #rev-key {\r\n grid-row: 1;\r\n grid-column: 4;\r\n }\r\n\r\n #fwd-key {\r\n grid-row: 1;\r\n grid-column: 5;\r\n }\r\n\r\n #next-key {\r\n grid-row: 1;\r\n grid-column: 6;\r\n }\r\n\r\n #next-frame {\r\n grid-row: 1;\r\n grid-column: 7;\r\n }\r\n\r\n #end-key {\r\n grid-row: 1;\r\n grid-column: 8;\r\n }\r\n }\r\n\r\n #range-selector {\r\n grid-row: 1;\r\n grid-column: 4;\r\n background: #222222;\r\n width: 100%;\r\n height: calc(100% - 20px);\r\n margin: 10px 0;\r\n position: relative;\r\n\r\n #range-scrollbar {\r\n position: absolute;\r\n left: 2px;\r\n top: 2px;\r\n right: 2px;\r\n bottom: 2px;\r\n background: #666666;\r\n display: grid;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 20px auto 1fr auto 20px;\r\n color: #222222;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 14px;\r\n min-width: 70px;\r\n\r\n #left-handle {\r\n grid-row: 1;\r\n grid-column: 1;\r\n }\r\n\r\n #right-handle {\r\n grid-row: 1;\r\n grid-column: 5;\r\n }\r\n\r\n #from-key {\r\n grid-row: 1;\r\n grid-column: 2;\r\n align-self: center;\r\n justify-self: center;\r\n user-select: none;\r\n pointer-events: none;\r\n }\r\n\r\n #to-key {\r\n grid-row: 1;\r\n grid-column: 4;\r\n align-self: center;\r\n justify-self: center;\r\n user-select: none;\r\n pointer-events: none;\r\n }\r\n\r\n .handle {\r\n width: 20px;\r\n align-self: center;\r\n justify-self: center;\r\n cursor: pointer;\r\n user-select: none;\r\n\r\n img {\r\n pointer-events: none;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n'],sourceRoot:""}]),a.locals={};const i=a},7159:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(3234),s=r.n(n),o=r(7474),a=r.n(o)()(s());a.push([e.id,'#canvas-zone{display:grid;grid-template-columns:100%;grid-template-rows:30px 1fr 10px 40px;overflow:hidden;position:relative}#canvas-zone #graph{grid-column:1;grid-row:2;width:100%;height:100%;background:#222;display:grid;grid-template-columns:100%;grid-template-rows:100%;overflow:hidden;position:relative}#canvas-zone #graph #svg-graph-grid{grid-column:1;grid-row:1;width:100%;height:100%;pointer-events:none;z-index:1}#canvas-zone #graph #svg-graph-grid:focus{outline:none}#canvas-zone #graph #svg-graph-horizontal{grid-column:1;grid-row:1;margin-left:40px;width:calc(100% - 40px);height:100%;pointer-events:none;z-index:1}#canvas-zone #graph #svg-graph-horizontal:focus{outline:none}#canvas-zone #graph #dark-rectangle{grid-column:1;grid-row:1;margin-left:40px;width:calc(100% - 40px);height:100%;background:#111;opacity:.2;pointer-events:none;position:absolute}#canvas-zone #graph #block-rectangle{grid-column:1;grid-row:1;width:40px;height:100%;background:#222;z-index:1}#canvas-zone #graph #svg-graph-curves{grid-column:1;grid-row:1;margin-left:40px;width:calc(100% - 40px);height:100%;z-index:2}#canvas-zone #graph #svg-graph-curves:focus{outline:none}#canvas-zone #graph #selection-rectangle{grid-column:1;grid-row:1;width:calc(100% - 40px);height:100%;pointer-events:none;position:absolute;left:40px;visibility:hidden;border:1px dashed #fff}#canvas-zone #range-frame-bar{grid-column:1;grid-row:4;width:100%;height:100%;background:#222;pointer-events:none;display:grid;grid-template-rows:100%;grid-template-columns:100%;pointer-events:none;user-select:none}#canvas-zone #range-frame-bar #svg-range-frames{grid-column:1;grid-row:1;width:100%;height:100%}#canvas-zone #frame-bar{grid-column:1;grid-row:1;width:100%;height:100%;background:#222;pointer-events:none;display:grid;grid-template-rows:100%;grid-template-columns:40px 1fr}#canvas-zone #frame-bar #angle-unit{grid-column:1;grid-row:1;background:#111}#canvas-zone #frame-bar #frames{grid-column:1/3;grid-row:1;width:100%;height:100%;display:grid;grid-template-rows:100%;grid-template-columns:100%}#canvas-zone #frame-bar #frames #svg-frames{margin-left:40px;grid-column:1;grid-row:1;width:calc(100% - 40px);height:100%}#canvas-zone #play-head-control{grid-column:1;grid-row:1;position:absolute;height:30px;left:40px;width:calc(100% - 40px)}#canvas-zone #play-head-control-2{grid-column:1;grid-row:4;position:absolute;height:30px;left:0px;width:100%}#canvas-zone #play-head{grid-column:1;grid-row:1/3;position:absolute;top:0;height:calc(100% - 5px);width:22px;margin-left:40px;display:grid;grid-template-columns:100%;grid-template-rows:22px 1fr;transform:translateX(-50%);pointer-events:none;z-index:3}#canvas-zone #play-head #play-head-bar{grid-row:2;grid-column:1;justify-self:center;width:1.5px;background:#fff;height:100%;pointer-events:none}#canvas-zone #play-head #play-head-circle{grid-row:1;grid-column:1;width:22px;height:22px;border-radius:50%;background:#fff;font-family:"acumin-pro-condensed";font-size:8pt;display:grid;align-content:center;justify-content:center;color:#555;cursor:pointer}#canvas-zone #angle-mode{grid-column:1;grid-row:1;width:40px;height:100%;z-index:1;background:#222}',"",{version:3,sources:["webpack://./../../../dev/inspector/dist/components/actionTabs/tabs/propertyGrids/animations/curveEditor/scss/canvas.scss"],names:[],mappings:"AAAA,aACI,YAAA,CACA,0BAAA,CACA,qCAAA,CACA,eAAA,CACA,iBAAA,CAEA,oBACI,aAAA,CACA,UAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CACA,YAAA,CACA,0BAAA,CACA,uBAAA,CACA,eAAA,CACA,iBAAA,CAEA,oCACI,aAAA,CACA,UAAA,CACA,UAAA,CACA,WAAA,CACA,mBAAA,CAKA,SAAA,CAHA,0CACI,YAAA,CAKR,0CACI,aAAA,CACA,UAAA,CACA,gBAAA,CACA,uBAAA,CACA,WAAA,CACA,mBAAA,CAKA,SAAA,CAHA,gDACI,YAAA,CAKR,oCACI,aAAA,CACA,UAAA,CACA,gBAAA,CACA,uBAAA,CACA,WAAA,CACA,eAAA,CACA,UAAA,CACA,mBAAA,CACA,iBAAA,CAGJ,qCACI,aAAA,CACA,UAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CACA,SAAA,CAGJ,sCACI,aAAA,CACA,UAAA,CACA,gBAAA,CACA,uBAAA,CACA,WAAA,CACA,SAAA,CAEA,4CACI,YAAA,CAIR,yCACI,aAAA,CACA,UAAA,CACA,uBAAA,CACA,WAAA,CACA,mBAAA,CACA,iBAAA,CACA,SAAA,CACA,iBAAA,CAEA,sBAAA,CAIR,8BACI,aAAA,CACA,UAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CACA,mBAAA,CACA,YAAA,CACA,uBAAA,CACA,0BAAA,CACA,mBAAA,CACA,gBAAA,CAEA,gDACI,aAAA,CACA,UAAA,CACA,UAAA,CACA,WAAA,CAIR,wBACI,aAAA,CACA,UAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CACA,mBAAA,CAEA,YAAA,CACA,uBAAA,CACA,8BAAA,CAEA,oCACI,aAAA,CACA,UAAA,CACA,eAAA,CAGJ,gCACI,eAAA,CAEA,UAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,uBAAA,CACA,0BAAA,CAEA,4CACI,gBAAA,CACA,aAAA,CACA,UAAA,CACA,uBAAA,CACA,WAAA,CAKZ,gCACI,aAAA,CACA,UAAA,CACA,iBAAA,CACA,WAAA,CACA,SAAA,CACA,uBAAA,CAGJ,kCACI,aAAA,CACA,UAAA,CACA,iBAAA,CACA,WAAA,CACA,QAAA,CACA,UAAA,CAGJ,wBACI,aAAA,CACA,YAAA,CACA,iBAAA,CACA,KAAA,CACA,uBAAA,CACA,UAAA,CACA,gBAAA,CACA,YAAA,CACA,0BAAA,CACA,2BAAA,CACA,0BAAA,CACA,mBAAA,CACA,SAAA,CAEA,uCACI,UAAA,CACA,aAAA,CACA,mBAAA,CACA,WAAA,CACA,eAAA,CACA,WAAA,CACA,mBAAA,CAGJ,0CACI,UAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,eAAA,CACA,kCAAA,CACA,aAAA,CACA,YAAA,CACA,oBAAA,CACA,sBAAA,CACA,UAAA,CACA,cAAA,CAIR,yBACI,aAAA,CACA,UAAA,CACA,UAAA,CACA,WAAA,CACA,SAAA,CACA,eAAA",sourcesContent:['#canvas-zone {\r\n display: grid;\r\n grid-template-columns: 100%;\r\n grid-template-rows: 30px 1fr 10px 40px;\r\n overflow: hidden;\r\n position: relative;\r\n\r\n #graph {\r\n grid-column: 1;\r\n grid-row: 2;\r\n width: 100%;\r\n height: 100%;\r\n background: #222222;\r\n display: grid;\r\n grid-template-columns: 100%;\r\n grid-template-rows: 100%;\r\n overflow: hidden;\r\n position: relative;\r\n\r\n #svg-graph-grid {\r\n grid-column: 1;\r\n grid-row: 1;\r\n width: 100%;\r\n height: 100%;\r\n pointer-events: none;\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n z-index: 1;\r\n }\r\n\r\n #svg-graph-horizontal {\r\n grid-column: 1;\r\n grid-row: 1;\r\n margin-left: 40px;\r\n width: calc(100% - 40px);\r\n height: 100%;\r\n pointer-events: none;\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n z-index: 1;\r\n }\r\n\r\n #dark-rectangle {\r\n grid-column: 1;\r\n grid-row: 1;\r\n margin-left: 40px;\r\n width: calc(100% - 40px);\r\n height: 100%;\r\n background: #111111;\r\n opacity: 0.2;\r\n pointer-events: none;\r\n position: absolute;\r\n }\r\n\r\n #block-rectangle {\r\n grid-column: 1;\r\n grid-row: 1;\r\n width: 40px;\r\n height: 100%;\r\n background: #222222;\r\n z-index: 1;\r\n }\r\n\r\n #svg-graph-curves {\r\n grid-column: 1;\r\n grid-row: 1;\r\n margin-left: 40px;\r\n width: calc(100% - 40px);\r\n height: 100%;\r\n z-index: 2;\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n }\r\n\r\n #selection-rectangle {\r\n grid-column: 1;\r\n grid-row: 1;\r\n width: calc(100% - 40px);\r\n height: 100%;\r\n pointer-events: none;\r\n position: absolute;\r\n left: 40px;\r\n visibility: hidden;\r\n\r\n border: 1px dashed white;\r\n }\r\n }\r\n\r\n #range-frame-bar {\r\n grid-column: 1;\r\n grid-row: 4;\r\n width: 100%;\r\n height: 100%;\r\n background: #222222;\r\n pointer-events: none;\r\n display: grid;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 100%;\r\n pointer-events: none;\r\n user-select: none;\r\n\r\n #svg-range-frames {\r\n grid-column: 1;\r\n grid-row: 1;\r\n width: 100%;\r\n height: 100%;\r\n }\r\n }\r\n\r\n #frame-bar {\r\n grid-column: 1;\r\n grid-row: 1;\r\n width: 100%;\r\n height: 100%;\r\n background: #222222;\r\n pointer-events: none;\r\n\r\n display: grid;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 40px 1fr;\r\n\r\n #angle-unit {\r\n grid-column: 1;\r\n grid-row: 1;\r\n background: #111111;\r\n }\r\n\r\n #frames {\r\n grid-column: 1 / 3;\r\n\r\n grid-row: 1;\r\n width: 100%;\r\n height: 100%;\r\n display: grid;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 100%;\r\n\r\n #svg-frames {\r\n margin-left: 40px;\r\n grid-column: 1;\r\n grid-row: 1;\r\n width: calc(100% - 40px);\r\n height: 100%;\r\n }\r\n }\r\n }\r\n\r\n #play-head-control {\r\n grid-column: 1;\r\n grid-row: 1;\r\n position: absolute;\r\n height: 30px;\r\n left: 40px;\r\n width: calc(100% - 40px);\r\n }\r\n\r\n #play-head-control-2 {\r\n grid-column: 1;\r\n grid-row: 4;\r\n position: absolute;\r\n height: 30px;\r\n left: 0px;\r\n width: 100%;\r\n }\r\n\r\n #play-head {\r\n grid-column: 1;\r\n grid-row: 1 / 3;\r\n position: absolute;\r\n top: 0;\r\n height: calc(100% - 5px);\r\n width: 22px;\r\n margin-left: 40px;\r\n display: grid;\r\n grid-template-columns: 100%;\r\n grid-template-rows: 22px 1fr;\r\n transform: translateX(-50%);\r\n pointer-events: none;\r\n z-index: 3;\r\n\r\n #play-head-bar {\r\n grid-row: 2;\r\n grid-column: 1;\r\n justify-self: center;\r\n width: 1.5px;\r\n background: #ffffff;\r\n height: 100%;\r\n pointer-events: none;\r\n }\r\n\r\n #play-head-circle {\r\n grid-row: 1;\r\n grid-column: 1;\r\n width: 22px;\r\n height: 22px;\r\n border-radius: 50%;\r\n background: #ffffff;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 8pt;\r\n display: grid;\r\n align-content: center;\r\n justify-content: center;\r\n color: #555555;\r\n cursor: pointer;\r\n }\r\n }\r\n\r\n #angle-mode {\r\n grid-column: 1;\r\n grid-row: 1;\r\n width: 40px;\r\n height: 100%;\r\n z-index: 1;\r\n background: #222222;\r\n }\r\n}\r\n'],sourceRoot:""}]),a.locals={};const i=a},2667:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(3234),s=r.n(n),o=r(7474),a=r.n(o)()(s());a.push([e.id,'#curve-editor{background:#333;width:100%;height:100%;display:grid;grid-template-rows:40px calc(100% - 85px) 45px;grid-template-columns:10px 210px 10px 1fr 10px}#curve-editor #top-bar{background:#333;grid-row:1;grid-column:1/6;width:100%;height:100%}#curve-editor #bottom-bar{background:#333;grid-row:3;grid-column:1/6;width:100%;height:100%}#curve-editor #canvas-zone{grid-row:2;grid-column:4;width:100%;height:100%;background:#333}#curve-editor #sidebar{grid-row:2;grid-column:2;width:100%;height:100%;background:#111}#curve-editor .action-button:hover{background:#666;color:#fff;cursor:pointer}#curve-editor .action-button.active{background:#111}#curve-editor .action-button:active{transform-origin:50% 50%;transform:scale(0.96)}#curve-editor .push-button{cursor:pointer}#curve-editor .push-button.active{background:#666}#curve-editor .text-input{color:#fff;background:#000;font-family:"acumin-pro-condensed";font-size:11pt;border:0;margin:3px 1px;text-align:end;padding-right:4px}#curve-editor .text-input:focus{outline:none}#curve-editor .text-input:disabled{background:#444;border:#555 solid 1px}',"",{version:3,sources:["webpack://./../../../dev/inspector/dist/components/actionTabs/tabs/propertyGrids/animations/curveEditor/scss/curveEditor.scss"],names:[],mappings:"AAAA,cACI,eAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,8CAAA,CACA,8CAAA,CAEA,uBACI,eAAA,CACA,UAAA,CACA,eAAA,CACA,UAAA,CACA,WAAA,CAGJ,0BACI,eAAA,CACA,UAAA,CACA,eAAA,CACA,UAAA,CACA,WAAA,CAGJ,2BACI,UAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CAGJ,uBACI,UAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CAIA,mCACI,eAAA,CACA,UAAA,CACA,cAAA,CAGJ,oCACI,eAAA,CAGJ,oCACI,wBAAA,CACA,qBAAA,CAIR,2BACI,cAAA,CACA,kCACI,eAAA,CAIR,0BACI,UAAA,CACA,eAAA,CACA,kCAAA,CACA,cAAA,CACA,QAAA,CACA,cAAA,CACA,cAAA,CACA,iBAAA,CAEA,gCACI,YAAA,CAGJ,mCACI,eAAA,CACA,qBAAA",sourcesContent:['#curve-editor {\r\n background: #333333;\r\n width: 100%;\r\n height: 100%;\r\n display: grid;\r\n grid-template-rows: 40px calc(100% - 85px) 45px;\r\n grid-template-columns: 10px 210px 10px 1fr 10px;\r\n\r\n #top-bar {\r\n background: #333333;\r\n grid-row: 1;\r\n grid-column: 1 / 6;\r\n width: 100%;\r\n height: 100%;\r\n }\r\n\r\n #bottom-bar {\r\n background: #333333;\r\n grid-row: 3;\r\n grid-column: 1 / 6;\r\n width: 100%;\r\n height: 100%;\r\n }\r\n\r\n #canvas-zone {\r\n grid-row: 2;\r\n grid-column: 4;\r\n width: 100%;\r\n height: 100%;\r\n background: #333333;\r\n }\r\n\r\n #sidebar {\r\n grid-row: 2;\r\n grid-column: 2;\r\n width: 100%;\r\n height: 100%;\r\n background: #111111;\r\n }\r\n\r\n .action-button {\r\n &:hover {\r\n background: #666666;\r\n color: white;\r\n cursor: pointer;\r\n }\r\n\r\n &.active {\r\n background: #111111;\r\n }\r\n\r\n &:active {\r\n transform-origin: 50% 50%;\r\n transform: scale(0.96);\r\n }\r\n }\r\n\r\n .push-button {\r\n cursor: pointer;\r\n &.active {\r\n background: #666666;\r\n }\r\n }\r\n\r\n .text-input {\r\n color: white;\r\n background: #000000;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 11pt;\r\n border: 0;\r\n margin: 3px 1px;\r\n text-align: end;\r\n padding-right: 4px;\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n &:disabled {\r\n background: #444444;\r\n border: #555555 solid 1px;\r\n }\r\n }\r\n}\r\n'],sourceRoot:""}]),a.locals={};const i=a},9465:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(3234),s=r.n(n),o=r(7474),a=r.n(o)()(s());a.push([e.id,'#sideBar{display:grid;grid-template-columns:100%;grid-template-rows:30px 1fr}#sideBar #menu-bar{background:#252525;grid-row:1;grid-column:1;width:100%;height:100%;display:grid;grid-template-rows:100%;grid-template-columns:30px 30px 30px 30px 1fr 52px 3px}#sideBar #menu-bar.small{grid-template-columns:0px 0px 30px 30px 1fr 52px 3px}#sideBar #menu-bar #add-animation{grid-row:1;grid-column:1}#sideBar #menu-bar #load-animation{grid-row:1;grid-column:2}#sideBar #menu-bar #save-animation{grid-row:1;grid-column:3}#sideBar #menu-bar #edit-animation{grid-row:1;grid-column:4}#sideBar #menu-bar #framerate-animation{grid-row:1;grid-column:6}#sideBar .simple-button{width:80px;height:20px;color:#fff;font-family:"acumin-pro-condensed";font-size:10pt;background:#444;border:0;line-height:12px;cursor:pointer;align-self:center;justify-self:center;border-radius:0}#sideBar .simple-button:active{transform-origin:center;transform:scale(0.95)}#sideBar #save-animation-pane{width:100%;height:100%;display:grid;grid-template-columns:100%;grid-template-rows:1fr 40px auto}#sideBar #save-animation-pane #save-animation-list{grid-row:1;grid-column:1;width:100%;height:100%;display:flex;flex-direction:column;padding-top:5px}#sideBar #save-animation-pane #save-animation-list .save-animation-list-entry{height:20px;margin-left:10px;display:flex;align-content:center;color:#fff;font-family:"acumin-pro-condensed";font-size:10pt;line-height:15px}#sideBar #save-animation-pane #save-animation-buttons{grid-row:2;grid-column:1;width:100%;height:100%;display:grid;grid-template-rows:100%;grid-template-columns:10px 1fr 10px 1fr 10px;align-items:center}#sideBar #save-animation-pane #save-animation-buttons #save-snippet{grid-row:1;grid-column:2}#sideBar #save-animation-pane #save-animation-buttons #save-file{grid-row:1;grid-column:4}#sideBar #save-animation-pane #save-animation-snippet{grid-row:3;grid-column:1;width:calc(100% - 31px);height:20px;align-content:center;color:#fff;font-family:"acumin-pro-condensed";font-size:10pt;padding-left:31px;background:#252525}#sideBar #load-animation-pane{width:100%;height:100%;display:grid;grid-template-columns:75px 1fr;grid-template-rows:10px 20px 10px 20px 10px 20px 1fr auto;color:#fff;font-family:"acumin-pro-condensed";font-size:10pt}#sideBar #load-animation-pane #load-animation-snippet-id-label{grid-row:2;grid-column:1;justify-self:end;margin-right:10px}#sideBar #load-animation-pane #load-animation-local-file-label{grid-row:6;grid-column:1;justify-self:end;margin-right:10px}#sideBar #load-animation-pane #load-snippet-id{grid-row:2;grid-column:2;margin-right:10px;border:0;background:#252525;width:127px;color:#fff;font-family:"acumin-pro-condensed";font-size:10pt}#sideBar #load-animation-pane #load-snippet{grid-row:4;grid-column:2;width:60px;justify-self:left}#sideBar #load-animation-pane input[type=file]{display:none}#sideBar #load-animation-pane #file-snippet-label{grid-row:6;grid-column:2;width:60px;justify-self:left;text-align:center;line-height:18px}#sideBar #load-animation-pane #load-animation-snippet{grid-row:8;grid-column:1/3;width:calc(100% - 31px);height:20px;align-content:center;color:#fff;font-family:"acumin-pro-condensed";font-size:10pt;padding-left:31px;background:#252525}#sideBar #add-animation-pane{grid-column:1;grid-row:2;width:100%;height:100%;display:grid;grid-template-columns:75px 1fr;grid-template-rows:10px 20px 10px 20px 10px 20px 10px 20px 10px 20px 10px 20px 1fr;color:#fff;font-family:"acumin-pro-condensed";font-size:10pt}#sideBar #add-animation-pane .input-text{border:0;background:#252525;width:127px;color:#fff;font-family:"acumin-pro-condensed";font-size:10pt}#sideBar #add-animation-pane .option{background:#252525;color:#fff;border:0}#sideBar #add-animation-pane #add-animation-display-name-label{grid-row:2;grid-column:1;justify-self:end;margin-right:10px}#sideBar #add-animation-pane #add-animation-mode-label{grid-row:4;grid-column:1;justify-self:end;margin-right:10px}#sideBar #add-animation-pane #add-animation-property-label{grid-row:6;grid-column:1;justify-self:end;margin-right:10px}#sideBar #add-animation-pane #add-animation-type-label{grid-row:8;grid-column:1;justify-self:end;margin-right:10px}#sideBar #add-animation-pane #add-animation-loop-mode-label{grid-row:10;grid-column:1;justify-self:end;margin-right:10px}#sideBar #add-animation-pane #add-animation-name{grid-row:2;grid-column:2;margin-right:10px}#sideBar #add-animation-pane #add-animation-mode{grid-row:4;grid-column:2;margin-right:10px;width:calc(100% - 10px)}#sideBar #add-animation-pane #add-animation-property{grid-row:6;grid-column:2;margin-right:10px;width:calc(100% - 10px)}#sideBar #add-animation-pane #add-animation-type{grid-row:8;grid-column:2;margin-right:10px}#sideBar #add-animation-pane #add-animation-loop-mode{grid-row:10;grid-column:2;margin-right:10px}#sideBar #add-animation-pane #add-animation{grid-row:12;grid-column:2;justify-self:left}#sideBar #edit-animation-pane{grid-column:1;grid-row:2;width:100%;height:100%;display:grid;grid-template-columns:75px 1fr;grid-template-rows:10px 20px 10px 20px 10px 20px 10px 20px 1fr;color:#fff;font-family:"acumin-pro-condensed";font-size:10pt;background:#111}#sideBar #edit-animation-pane .input-text{border:0;background:#252525;width:127px;color:#fff;font-family:"acumin-pro-condensed";font-size:10pt}#sideBar #edit-animation-pane .option{background:#252525;color:#fff;border:0}#sideBar #edit-animation-pane #edit-animation-display-name-label{grid-row:2;grid-column:1;justify-self:end;margin-right:10px}#sideBar #edit-animation-pane #edit-animation-property-label{grid-row:4;grid-column:1;justify-self:end;margin-right:10px}#sideBar #edit-animation-pane #edit-animation-loop-mode-label{grid-row:6;grid-column:1;justify-self:end;margin-right:10px}#sideBar #edit-animation-pane #edit-animation-name{grid-row:2;grid-column:2;margin-right:10px}#sideBar #edit-animation-pane #edit-animation-property{grid-row:4;grid-column:2;margin-right:10px}#sideBar #edit-animation-pane #edit-animation-loop-mode{grid-row:6;grid-column:2;margin-right:10px}#sideBar #edit-animation-pane #edit-animation{grid-row:8;grid-column:1/3;display:grid;grid-template-columns:50% 50%;grid-template-rows:100%}#sideBar #edit-animation-pane #edit-animation #edit-animation-ok{grid-row:1;grid-column:1}#sideBar #edit-animation-pane #edit-animation #edit-animation-cancel{grid-row:1;grid-column:2}#sideBar #animation-list{background:#111;grid-row:2;grid-column:1;width:100%;height:100%}#sideBar #animation-list .animation-entry{height:20px;display:grid;grid-template-columns:20px 10px 1fr 20px 20px;grid-template-rows:100%}#sideBar #animation-list .animation-entry.isActive{background:#444}#sideBar #animation-list .animation-entry .animation-active-indicator{grid-row:1;grid-column:1;display:grid;margin:5px;padding-top:2px}#sideBar #animation-list .animation-entry .animation-chevron{grid-row:1;grid-column:2;display:grid;align-content:center;padding-top:5px;cursor:pointer}#sideBar #animation-list .animation-entry .animation-chevron .animation-chevron-image.collapsed{transform-origin:50% 50%;transform:rotateZ(-90deg)}#sideBar #animation-list .animation-entry .animation-name{cursor:pointer;grid-row:1;grid-column:3;font-family:"acumin-pro-condensed";font-size:10.5pt;color:#fff;display:grid;align-self:center;margin-left:5px;user-select:none}#sideBar #animation-list .animation-entry .animation-options{grid-row:1;grid-column:4}#sideBar #animation-list .animation-entry .animation-delete{grid-row:1;grid-column:5}',"",{version:3,sources:["webpack://./../../../dev/inspector/dist/components/actionTabs/tabs/propertyGrids/animations/curveEditor/scss/sideBar.scss"],names:[],mappings:"AAAA,SACI,YAAA,CACA,0BAAA,CACA,2BAAA,CAEA,mBACI,kBAAA,CACA,UAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,uBAAA,CACA,sDAAA,CAEA,yBACI,oDAAA,CAGJ,kCACI,UAAA,CACA,aAAA,CAGJ,mCACI,UAAA,CACA,aAAA,CAGJ,mCACI,UAAA,CACA,aAAA,CAGJ,mCACI,UAAA,CACA,aAAA,CAGJ,wCACI,UAAA,CACA,aAAA,CAIR,wBACI,UAAA,CACA,WAAA,CACA,UAAA,CACA,kCAAA,CACA,cAAA,CACA,eAAA,CACA,QAAA,CACA,gBAAA,CACA,cAAA,CACA,iBAAA,CACA,mBAAA,CACA,eAAA,CAEA,+BACI,uBAAA,CACA,qBAAA,CAIR,8BACI,UAAA,CACA,WAAA,CACA,YAAA,CACA,0BAAA,CACA,gCAAA,CAEA,mDACI,UAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,qBAAA,CACA,eAAA,CAEA,8EACI,WAAA,CACA,gBAAA,CACA,YAAA,CACA,oBAAA,CACA,UAAA,CAEA,kCAAA,CACA,cAAA,CACA,gBAAA,CAIR,sDACI,UAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,uBAAA,CACA,4CAAA,CACA,kBAAA,CAEA,oEACI,UAAA,CACA,aAAA,CAGJ,iEACI,UAAA,CACA,aAAA,CAIR,sDACI,UAAA,CACA,aAAA,CACA,uBAAA,CACA,WAAA,CACA,oBAAA,CACA,UAAA,CACA,kCAAA,CACA,cAAA,CACA,iBAAA,CACA,kBAAA,CAIR,8BACI,UAAA,CACA,WAAA,CACA,YAAA,CACA,8BAAA,CACA,yDAAA,CACA,UAAA,CACA,kCAAA,CACA,cAAA,CAEA,+DACI,UAAA,CACA,aAAA,CACA,gBAAA,CACA,iBAAA,CAGJ,+DACI,UAAA,CACA,aAAA,CACA,gBAAA,CACA,iBAAA,CAGJ,+CACI,UAAA,CACA,aAAA,CACA,iBAAA,CACA,QAAA,CACA,kBAAA,CACA,WAAA,CACA,UAAA,CACA,kCAAA,CACA,cAAA,CAGJ,4CACI,UAAA,CACA,aAAA,CACA,UAAA,CACA,iBAAA,CAGJ,+CACI,YAAA,CAGJ,kDACI,UAAA,CACA,aAAA,CACA,UAAA,CACA,iBAAA,CACA,iBAAA,CACA,gBAAA,CAGJ,sDACI,UAAA,CACA,eAAA,CACA,uBAAA,CACA,WAAA,CACA,oBAAA,CACA,UAAA,CACA,kCAAA,CACA,cAAA,CACA,iBAAA,CACA,kBAAA,CAIR,6BACI,aAAA,CACA,UAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,8BAAA,CACA,kFAAA,CACA,UAAA,CACA,kCAAA,CACA,cAAA,CAEA,yCACI,QAAA,CACA,kBAAA,CACA,WAAA,CACA,UAAA,CACA,kCAAA,CACA,cAAA,CAGJ,qCACI,kBAAA,CACA,UAAA,CACA,QAAA,CAGJ,+DACI,UAAA,CACA,aAAA,CACA,gBAAA,CACA,iBAAA,CAGJ,uDACI,UAAA,CACA,aAAA,CACA,gBAAA,CACA,iBAAA,CAGJ,2DACI,UAAA,CACA,aAAA,CACA,gBAAA,CACA,iBAAA,CAGJ,uDACI,UAAA,CACA,aAAA,CACA,gBAAA,CACA,iBAAA,CAGJ,4DACI,WAAA,CACA,aAAA,CACA,gBAAA,CACA,iBAAA,CAGJ,iDACI,UAAA,CACA,aAAA,CACA,iBAAA,CAGJ,iDACI,UAAA,CACA,aAAA,CACA,iBAAA,CACA,uBAAA,CAGJ,qDACI,UAAA,CACA,aAAA,CACA,iBAAA,CACA,uBAAA,CAGJ,iDACI,UAAA,CACA,aAAA,CACA,iBAAA,CAGJ,sDACI,WAAA,CACA,aAAA,CACA,iBAAA,CAGJ,4CACI,WAAA,CACA,aAAA,CACA,iBAAA,CAIR,8BACI,aAAA,CACA,UAAA,CAEA,UAAA,CACA,WAAA,CACA,YAAA,CACA,8BAAA,CACA,8DAAA,CACA,UAAA,CACA,kCAAA,CACA,cAAA,CACA,eAAA,CAEA,0CACI,QAAA,CACA,kBAAA,CACA,WAAA,CACA,UAAA,CACA,kCAAA,CACA,cAAA,CAGJ,sCACI,kBAAA,CACA,UAAA,CACA,QAAA,CAGJ,iEACI,UAAA,CACA,aAAA,CACA,gBAAA,CACA,iBAAA,CAGJ,6DACI,UAAA,CACA,aAAA,CACA,gBAAA,CACA,iBAAA,CAGJ,8DACI,UAAA,CACA,aAAA,CACA,gBAAA,CACA,iBAAA,CAGJ,mDACI,UAAA,CACA,aAAA,CACA,iBAAA,CAGJ,uDACI,UAAA,CACA,aAAA,CACA,iBAAA,CAGJ,wDACI,UAAA,CACA,aAAA,CACA,iBAAA,CAGJ,8CACI,UAAA,CACA,eAAA,CACA,YAAA,CACA,6BAAA,CACA,uBAAA,CAEA,iEACI,UAAA,CACA,aAAA,CAGJ,qEACI,UAAA,CACA,aAAA,CAKZ,yBACI,eAAA,CACA,UAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CAEA,0CACI,WAAA,CACA,YAAA,CACA,6CAAA,CACA,uBAAA,CAEA,mDACI,eAAA,CAGJ,sEACI,UAAA,CACA,aAAA,CACA,YAAA,CACA,UAAA,CACA,eAAA,CAGJ,6DACI,UAAA,CACA,aAAA,CACA,YAAA,CACA,oBAAA,CACA,eAAA,CACA,cAAA,CAGI,gGACI,wBAAA,CACA,yBAAA,CAKZ,0DACI,cAAA,CACA,UAAA,CACA,aAAA,CACA,kCAAA,CACA,gBAAA,CACA,UAAA,CACA,YAAA,CACA,iBAAA,CACA,eAAA,CACA,gBAAA,CAGJ,6DACI,UAAA,CACA,aAAA,CAGJ,4DACI,UAAA,CACA,aAAA",sourcesContent:['#sideBar {\r\n display: grid;\r\n grid-template-columns: 100%;\r\n grid-template-rows: 30px 1fr;\r\n\r\n #menu-bar {\r\n background: #252525;\r\n grid-row: 1;\r\n grid-column: 1;\r\n width: 100%;\r\n height: 100%;\r\n display: grid;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 30px 30px 30px 30px 1fr 52px 3px;\r\n\r\n &.small {\r\n grid-template-columns: 0px 0px 30px 30px 1fr 52px 3px;\r\n }\r\n\r\n #add-animation {\r\n grid-row: 1;\r\n grid-column: 1;\r\n }\r\n\r\n #load-animation {\r\n grid-row: 1;\r\n grid-column: 2;\r\n }\r\n\r\n #save-animation {\r\n grid-row: 1;\r\n grid-column: 3;\r\n }\r\n\r\n #edit-animation {\r\n grid-row: 1;\r\n grid-column: 4;\r\n }\r\n\r\n #framerate-animation {\r\n grid-row: 1;\r\n grid-column: 6;\r\n }\r\n }\r\n\r\n .simple-button {\r\n width: 80px;\r\n height: 20px;\r\n color: white;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 10pt;\r\n background: #444444;\r\n border: 0;\r\n line-height: 12px;\r\n cursor: pointer;\r\n align-self: center;\r\n justify-self: center;\r\n border-radius: 0;\r\n\r\n &:active {\r\n transform-origin: center;\r\n transform: scale(0.95);\r\n }\r\n }\r\n\r\n #save-animation-pane {\r\n width: 100%;\r\n height: 100%;\r\n display: grid;\r\n grid-template-columns: 100%;\r\n grid-template-rows: 1fr 40px auto;\r\n\r\n #save-animation-list {\r\n grid-row: 1;\r\n grid-column: 1;\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n padding-top: 5px;\r\n\r\n .save-animation-list-entry {\r\n height: 20px;\r\n margin-left: 10px;\r\n display: flex;\r\n align-content: center;\r\n color: white;\r\n\r\n font-family: "acumin-pro-condensed";\r\n font-size: 10pt;\r\n line-height: 15px;\r\n }\r\n }\r\n\r\n #save-animation-buttons {\r\n grid-row: 2;\r\n grid-column: 1;\r\n width: 100%;\r\n height: 100%;\r\n display: grid;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 10px 1fr 10px 1fr 10px;\r\n align-items: center;\r\n\r\n #save-snippet {\r\n grid-row: 1;\r\n grid-column: 2;\r\n }\r\n\r\n #save-file {\r\n grid-row: 1;\r\n grid-column: 4;\r\n }\r\n }\r\n\r\n #save-animation-snippet {\r\n grid-row: 3;\r\n grid-column: 1;\r\n width: calc(100% - 31px);\r\n height: 20px;\r\n align-content: center;\r\n color: white;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 10pt;\r\n padding-left: 31px;\r\n background: #252525;\r\n }\r\n }\r\n\r\n #load-animation-pane {\r\n width: 100%;\r\n height: 100%;\r\n display: grid;\r\n grid-template-columns: 75px 1fr;\r\n grid-template-rows: 10px 20px 10px 20px 10px 20px 1fr auto;\r\n color: white;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 10pt;\r\n\r\n #load-animation-snippet-id-label {\r\n grid-row: 2;\r\n grid-column: 1;\r\n justify-self: end;\r\n margin-right: 10px;\r\n }\r\n\r\n #load-animation-local-file-label {\r\n grid-row: 6;\r\n grid-column: 1;\r\n justify-self: end;\r\n margin-right: 10px;\r\n }\r\n\r\n #load-snippet-id {\r\n grid-row: 2;\r\n grid-column: 2;\r\n margin-right: 10px;\r\n border: 0;\r\n background: #252525;\r\n width: 127px;\r\n color: white;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 10pt;\r\n }\r\n\r\n #load-snippet {\r\n grid-row: 4;\r\n grid-column: 2;\r\n width: 60px;\r\n justify-self: left;\r\n }\r\n\r\n input[type="file"] {\r\n display: none;\r\n }\r\n\r\n #file-snippet-label {\r\n grid-row: 6;\r\n grid-column: 2;\r\n width: 60px;\r\n justify-self: left;\r\n text-align: center;\r\n line-height: 18px;\r\n }\r\n\r\n #load-animation-snippet {\r\n grid-row: 8;\r\n grid-column: 1 / 3;\r\n width: calc(100% - 31px);\r\n height: 20px;\r\n align-content: center;\r\n color: white;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 10pt;\r\n padding-left: 31px;\r\n background: #252525;\r\n }\r\n }\r\n\r\n #add-animation-pane {\r\n grid-column: 1;\r\n grid-row: 2;\r\n width: 100%;\r\n height: 100%;\r\n display: grid;\r\n grid-template-columns: 75px 1fr;\r\n grid-template-rows: 10px 20px 10px 20px 10px 20px 10px 20px 10px 20px 10px 20px 1fr;\r\n color: white;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 10pt;\r\n\r\n .input-text {\r\n border: 0;\r\n background: #252525;\r\n width: 127px;\r\n color: white;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 10pt;\r\n }\r\n\r\n .option {\r\n background: #252525;\r\n color: white;\r\n border: 0;\r\n }\r\n\r\n #add-animation-display-name-label {\r\n grid-row: 2;\r\n grid-column: 1;\r\n justify-self: end;\r\n margin-right: 10px;\r\n }\r\n\r\n #add-animation-mode-label {\r\n grid-row: 4;\r\n grid-column: 1;\r\n justify-self: end;\r\n margin-right: 10px;\r\n }\r\n\r\n #add-animation-property-label {\r\n grid-row: 6;\r\n grid-column: 1;\r\n justify-self: end;\r\n margin-right: 10px;\r\n }\r\n\r\n #add-animation-type-label {\r\n grid-row: 8;\r\n grid-column: 1;\r\n justify-self: end;\r\n margin-right: 10px;\r\n }\r\n\r\n #add-animation-loop-mode-label {\r\n grid-row: 10;\r\n grid-column: 1;\r\n justify-self: end;\r\n margin-right: 10px;\r\n }\r\n\r\n #add-animation-name {\r\n grid-row: 2;\r\n grid-column: 2;\r\n margin-right: 10px;\r\n }\r\n\r\n #add-animation-mode {\r\n grid-row: 4;\r\n grid-column: 2;\r\n margin-right: 10px;\r\n width: calc(100% - 10px);\r\n }\r\n\r\n #add-animation-property {\r\n grid-row: 6;\r\n grid-column: 2;\r\n margin-right: 10px;\r\n width: calc(100% - 10px);\r\n }\r\n\r\n #add-animation-type {\r\n grid-row: 8;\r\n grid-column: 2;\r\n margin-right: 10px;\r\n }\r\n\r\n #add-animation-loop-mode {\r\n grid-row: 10;\r\n grid-column: 2;\r\n margin-right: 10px;\r\n }\r\n\r\n #add-animation {\r\n grid-row: 12;\r\n grid-column: 2;\r\n justify-self: left;\r\n }\r\n }\r\n\r\n #edit-animation-pane {\r\n grid-column: 1;\r\n grid-row: 2;\r\n\r\n width: 100%;\r\n height: 100%;\r\n display: grid;\r\n grid-template-columns: 75px 1fr;\r\n grid-template-rows: 10px 20px 10px 20px 10px 20px 10px 20px 1fr;\r\n color: white;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 10pt;\r\n background: #111111;\r\n\r\n .input-text {\r\n border: 0;\r\n background: #252525;\r\n width: 127px;\r\n color: white;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 10pt;\r\n }\r\n\r\n .option {\r\n background: #252525;\r\n color: white;\r\n border: 0;\r\n }\r\n\r\n #edit-animation-display-name-label {\r\n grid-row: 2;\r\n grid-column: 1;\r\n justify-self: end;\r\n margin-right: 10px;\r\n }\r\n\r\n #edit-animation-property-label {\r\n grid-row: 4;\r\n grid-column: 1;\r\n justify-self: end;\r\n margin-right: 10px;\r\n }\r\n\r\n #edit-animation-loop-mode-label {\r\n grid-row: 6;\r\n grid-column: 1;\r\n justify-self: end;\r\n margin-right: 10px;\r\n }\r\n\r\n #edit-animation-name {\r\n grid-row: 2;\r\n grid-column: 2;\r\n margin-right: 10px;\r\n }\r\n\r\n #edit-animation-property {\r\n grid-row: 4;\r\n grid-column: 2;\r\n margin-right: 10px;\r\n }\r\n\r\n #edit-animation-loop-mode {\r\n grid-row: 6;\r\n grid-column: 2;\r\n margin-right: 10px;\r\n }\r\n\r\n #edit-animation {\r\n grid-row: 8;\r\n grid-column: 1 / 3;\r\n display: grid;\r\n grid-template-columns: 50% 50%;\r\n grid-template-rows: 100%;\r\n\r\n #edit-animation-ok {\r\n grid-row: 1;\r\n grid-column: 1;\r\n }\r\n\r\n #edit-animation-cancel {\r\n grid-row: 1;\r\n grid-column: 2;\r\n }\r\n }\r\n }\r\n\r\n #animation-list {\r\n background: #111111;\r\n grid-row: 2;\r\n grid-column: 1;\r\n width: 100%;\r\n height: 100%;\r\n\r\n .animation-entry {\r\n height: 20px;\r\n display: grid;\r\n grid-template-columns: 20px 10px 1fr 20px 20px;\r\n grid-template-rows: 100%;\r\n\r\n &.isActive {\r\n background: #444444;\r\n }\r\n\r\n .animation-active-indicator {\r\n grid-row: 1;\r\n grid-column: 1;\r\n display: grid;\r\n margin: 5px;\r\n padding-top: 2px;\r\n }\r\n\r\n .animation-chevron {\r\n grid-row: 1;\r\n grid-column: 2;\r\n display: grid;\r\n align-content: center;\r\n padding-top: 5px;\r\n cursor: pointer;\r\n\r\n .animation-chevron-image {\r\n &.collapsed {\r\n transform-origin: 50% 50%;\r\n transform: rotateZ(-90deg);\r\n }\r\n }\r\n }\r\n\r\n .animation-name {\r\n cursor: pointer;\r\n grid-row: 1;\r\n grid-column: 3;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 10.5pt;\r\n color: white;\r\n display: grid;\r\n align-self: center;\r\n margin-left: 5px;\r\n user-select: none;\r\n }\r\n\r\n .animation-options {\r\n grid-row: 1;\r\n grid-column: 4;\r\n }\r\n\r\n .animation-delete {\r\n grid-row: 1;\r\n grid-column: 5;\r\n }\r\n }\r\n }\r\n}\r\n'],sourceRoot:""}]),a.locals={};const i=a},2063:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(3234),s=r.n(n),o=r(7474),a=r.n(o)()(s());a.push([e.id,'#top-bar{display:grid;grid-template-columns:40px 200px 75px 8px 75px 8px 40px 40px 40px 40px 40px 40px 40px 40px 1fr 40px;grid-template-rows:100%}#top-bar .disabled{opacity:20%;pointer-events:none}#top-bar #top-bar-logo{grid-row:1;grid-column:1}#top-bar #top-bar-parent-name{grid-row:1;grid-column:2;font-family:"acumin-pro-condensed";font-size:15pt;color:#fff;display:grid;align-content:center;padding-bottom:5px}#top-bar #key-frame{grid-row:1;grid-column:3;height:24px;display:grid;align-self:center}#top-bar #key-value{grid-row:1;grid-column:5;height:24px;display:grid;align-self:center}#top-bar #new-key{grid-row:1;grid-column:7}#top-bar #frame-canvas{grid-row:1;grid-column:8}#top-bar #flatten-tangent{grid-row:1;grid-column:9}#top-bar #linear-tangent{grid-row:1;grid-column:10}#top-bar #break-tangent{grid-row:1;grid-column:11}#top-bar #unify-tangent{grid-row:1;grid-column:12}#top-bar #step-tangent{grid-row:1;grid-column:13}',"",{version:3,sources:["webpack://./../../../dev/inspector/dist/components/actionTabs/tabs/propertyGrids/animations/curveEditor/scss/topBar.scss"],names:[],mappings:"AAAA,SACI,YAAA,CACA,mGAAA,CACA,uBAAA,CAEA,mBACI,WAAA,CACA,mBAAA,CAGJ,uBACI,UAAA,CACA,aAAA,CAGJ,8BACI,UAAA,CACA,aAAA,CACA,kCAAA,CACA,cAAA,CACA,UAAA,CACA,YAAA,CACA,oBAAA,CACA,kBAAA,CAGJ,oBACI,UAAA,CACA,aAAA,CACA,WAAA,CACA,YAAA,CACA,iBAAA,CAGJ,oBACI,UAAA,CACA,aAAA,CACA,WAAA,CACA,YAAA,CACA,iBAAA,CAGJ,kBACI,UAAA,CACA,aAAA,CAGJ,uBACI,UAAA,CACA,aAAA,CAGJ,0BACI,UAAA,CACA,aAAA,CAGJ,yBACI,UAAA,CACA,cAAA,CAGJ,wBACI,UAAA,CACA,cAAA,CAGJ,wBACI,UAAA,CACA,cAAA,CAGJ,uBACI,UAAA,CACA,cAAA",sourcesContent:['#top-bar {\r\n display: grid;\r\n grid-template-columns: 40px 200px 75px 8px 75px 8px 40px 40px 40px 40px 40px 40px 40px 40px 1fr 40px;\r\n grid-template-rows: 100%;\r\n\r\n .disabled {\r\n opacity: 20%;\r\n pointer-events: none;\r\n }\r\n\r\n #top-bar-logo {\r\n grid-row: 1;\r\n grid-column: 1;\r\n }\r\n\r\n #top-bar-parent-name {\r\n grid-row: 1;\r\n grid-column: 2;\r\n font-family: "acumin-pro-condensed";\r\n font-size: 15pt;\r\n color: white;\r\n display: grid;\r\n align-content: center;\r\n padding-bottom: 5px;\r\n }\r\n\r\n #key-frame {\r\n grid-row: 1;\r\n grid-column: 3;\r\n height: 24px;\r\n display: grid;\r\n align-self: center;\r\n }\r\n\r\n #key-value {\r\n grid-row: 1;\r\n grid-column: 5;\r\n height: 24px;\r\n display: grid;\r\n align-self: center;\r\n }\r\n\r\n #new-key {\r\n grid-row: 1;\r\n grid-column: 7;\r\n }\r\n\r\n #frame-canvas {\r\n grid-row: 1;\r\n grid-column: 8;\r\n }\r\n\r\n #flatten-tangent {\r\n grid-row: 1;\r\n grid-column: 9;\r\n }\r\n\r\n #linear-tangent {\r\n grid-row: 1;\r\n grid-column: 10;\r\n }\r\n\r\n #break-tangent {\r\n grid-row: 1;\r\n grid-column: 11;\r\n }\r\n\r\n #unify-tangent {\r\n grid-row: 1;\r\n grid-column: 12;\r\n }\r\n\r\n #step-tangent {\r\n grid-row: 1;\r\n grid-column: 13;\r\n }\r\n}\r\n'],sourceRoot:""}]),a.locals={};const i=a},2181:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(3234),s=r.n(n),o=r(7474),a=r.n(o)()(s());a.push([e.id,'#texture-editor{height:100%;width:100%;color:#fff;background-color:#1e1e1e;font-family:"acumin-pro-condensed"}#texture-editor .icon{width:40px;height:40px}#texture-editor .icon.button{background-color:#333}#texture-editor .icon.button:hover{background-color:#4a4a4a;cursor:pointer}#texture-editor .icon.button.active{background-color:#666}#texture-editor .icon.button:active{background-color:#837c7c}#texture-editor .has-tooltip{display:inline-block}#texture-editor .has-tooltip .tooltip{visibility:hidden;background-color:#fff;z-index:1;position:absolute;opacity:0;transition:opacity .5s;line-height:normal;font-size:14px;padding:0px 5px;color:#000}#texture-editor .has-tooltip:hover .tooltip{visibility:visible;opacity:1}#texture-editor #properties{width:100%;height:40px;display:flex;align-items:center;font-size:12px;color:#fff;user-select:none;background-color:#333}#texture-editor #properties .tab{display:inline-flex;line-height:40px;height:40px;flex-shrink:0;flex-grow:0;border-right:2px solid #1e1e1e;background-color:#333}#texture-editor #properties #left{overflow:hidden;height:40px;flex-grow:1;flex-shrink:1;display:flex;flex-wrap:wrap}#texture-editor #properties #left #dimensions-tab form{display:flex}#texture-editor #properties #left #dimensions-tab label{margin-left:15px;font-size:15px;color:#afafaf}#texture-editor #properties #left #dimensions-tab label input{width:40px;height:24px;background-color:#000;color:#fff;border:0;font-size:12px;text-align:"left";font-family:"acumin-pro-condensed";font-size:15px;padding-left:8px}#texture-editor #properties #left #dimensions-tab label:last-of-type{margin-right:8px}#texture-editor #properties #right-tab{margin-right:0;flex-grow:0;flex-shrink:0}#texture-editor #properties #right-tab input[type=file]{display:none}#texture-editor #properties .pixel-data{width:45px;color:#afafaf;display:flex;justify-content:space-between;font-size:15px}#texture-editor #properties .pixel-data:first-of-type{margin-left:15px}#texture-editor #properties .pixel-data:last-of-type{padding-right:15px}#texture-editor #properties .pixel-data .value{display:inline-block;width:30px;color:#fff}#texture-editor #toolbar{position:absolute;top:60px;left:0;width:40px;display:flex;flex-direction:column;justify-content:left}#texture-editor #toolbar #tools{display:flex;flex-direction:column}#texture-editor #toolbar #add-tool{position:relative}#texture-editor #toolbar #add-tool #add-tool-popup{background-color:#333;width:348px;margin-left:40px;position:absolute;top:0px;height:40px;padding-left:4px;line-height:40px;user-select:none}#texture-editor #toolbar #add-tool #add-tool-popup button{background:#222;border:1px solid #337ab7;margin:5px 10px 5px 10px;color:#fff;padding:4px 5px;opacity:.9;cursor:pointer}#texture-editor #toolbar #color{margin-top:8px}#texture-editor #toolbar #color #active-color-bg{border-radius:50%;width:20px;height:20px;margin:10px;position:relative;background-image:linear-gradient(45deg, #808080 25%, transparent 25%),linear-gradient(-45deg, #808080 25%, transparent 25%),linear-gradient(45deg, transparent 75%, #808080 75%),linear-gradient(-45deg, transparent 75%, #808080 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0px}#texture-editor #toolbar #color #active-color{width:20px;height:20px;position:absolute;top:0;left:0;border-radius:50%}#texture-editor #toolbar #color-picker{position:absolute;margin-left:40px}#texture-editor #channels-bar{position:absolute;top:60px;right:0;width:80px;background:#666;user-select:none}#texture-editor #channels-bar .channel{color:#fff;border-bottom:2px solid #232323;width:80px;height:40px;font-size:16px;display:flex;align-items:center}#texture-editor #channels-bar .channel.uneditable{background:#333}#texture-editor #channels-bar .channel:hover{cursor:pointer}#texture-editor #channels-bar .channel:last-of-type{border-bottom:none}#texture-editor #canvas-ui{width:100%;height:calc(100% - 70px);outline:none}#texture-editor #tool-ui{background-color:#333;position:absolute;right:0;bottom:30px}#texture-editor #tool-ui label{display:flex;flex-direction:column;align-items:center}#texture-editor #tool-ui input[type=range]{background:#d3d3d3}#texture-editor #bottom-bar{height:30px;width:100%;background-color:#333;font-size:14px;user-select:none;line-height:30px;position:relative}#texture-editor #bottom-bar #file-url{left:30px;position:absolute}#texture-editor #bottom-bar #mip-level{right:30px;position:absolute}',"",{version:3,sources:["webpack://./../../../dev/inspector/dist/components/actionTabs/tabs/propertyGrids/materials/textures/textureEditor.scss"],names:[],mappings:"AAAA,gBACI,WAAA,CACA,UAAA,CACA,UAAA,CACA,wBAAA,CACA,kCAAA,CAEA,sBACI,UAAA,CACA,WAAA,CACA,6BACI,qBAAA,CACA,mCACI,wBAAA,CACA,cAAA,CAGJ,oCACI,qBAAA,CAGJ,oCACI,wBAAA,CAKZ,6BACI,oBAAA,CACA,sCACI,iBAAA,CACA,qBAAA,CACA,SAAA,CACA,iBAAA,CACA,SAAA,CACA,sBAAA,CACA,kBAAA,CACA,cAAA,CACA,eAAA,CACA,UAAA,CAGJ,4CACI,kBAAA,CACA,SAAA,CAIR,4BACI,UAAA,CACA,WAAA,CAEA,YAAA,CACA,kBAAA,CACA,cAAA,CACA,UAAA,CACA,gBAAA,CACA,qBAAA,CAEA,iCACI,mBAAA,CACA,gBAAA,CACA,WAAA,CACA,aAAA,CACA,WAAA,CACA,8BAAA,CACA,qBAAA,CAEJ,kCACI,eAAA,CACA,WAAA,CACA,WAAA,CACA,aAAA,CACA,YAAA,CACA,cAAA,CAEI,uDACI,YAAA,CAEJ,wDACI,gBAAA,CACA,cAAA,CACA,aAAA,CACA,8DACI,UAAA,CACA,WAAA,CACA,qBAAA,CACA,UAAA,CACA,QAAA,CACA,cAAA,CACA,iBAAA,CACA,kCAAA,CACA,cAAA,CACA,gBAAA,CAGJ,qEACI,gBAAA,CAKhB,uCACI,cAAA,CACA,WAAA,CACA,aAAA,CAEA,wDACI,YAAA,CAIR,wCAOI,UAAA,CACA,aAAA,CACA,YAAA,CACA,6BAAA,CAMA,cAAA,CAfA,sDACI,gBAAA,CAEJ,qDACI,kBAAA,CAMJ,+CACI,oBAAA,CACA,UAAA,CACA,UAAA,CAMZ,yBACI,iBAAA,CACA,QAAA,CACA,MAAA,CACA,UAAA,CACA,YAAA,CACA,qBAAA,CACA,oBAAA,CAEA,gCACI,YAAA,CACA,qBAAA,CAGJ,mCACI,iBAAA,CACA,mDACI,qBAAA,CACA,WAAA,CACA,gBAAA,CACA,iBAAA,CACA,OAAA,CACA,WAAA,CACA,gBAAA,CACA,gBAAA,CACA,gBAAA,CACA,0DACI,eAAA,CACA,wBAAA,CACA,wBAAA,CACA,UAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CAKZ,gCACI,cAAA,CACA,iDACI,iBAAA,CACA,UAAA,CACA,WAAA,CACA,WAAA,CACA,iBAAA,CACA,sOAAA,CAEA,yBAAA,CACA,mDACI,CAKR,8CACI,UAAA,CACA,WAAA,CACA,iBAAA,CACA,KAAA,CACA,MAAA,CACA,iBAAA,CAGR,uCACI,iBAAA,CACA,gBAAA,CAIR,8BACI,iBAAA,CACA,QAAA,CACA,OAAA,CACA,UAAA,CACA,eAAA,CAsBA,gBAAA,CArBA,uCACI,UAAA,CACA,+BAAA,CACA,UAAA,CACA,WAAA,CACA,cAAA,CACA,YAAA,CACA,kBAAA,CAEA,kDACI,eAAA,CAGJ,6CACI,cAAA,CAGJ,oDACI,kBAAA,CAMZ,2BACI,UAAA,CACA,wBAAA,CACA,YAAA,CAGJ,yBACI,qBAAA,CACA,iBAAA,CACA,OAAA,CACA,WAAA,CAEA,+BACI,YAAA,CACA,qBAAA,CACA,kBAAA,CAGJ,2CACI,kBAAA,CAIR,4BACI,WAAA,CACA,UAAA,CACA,qBAAA,CACA,cAAA,CACA,gBAAA,CACA,gBAAA,CACA,iBAAA,CACA,sCACI,SAAA,CACA,iBAAA,CAEJ,uCACI,UAAA,CACA,iBAAA",sourcesContent:['#texture-editor {\r\n height: 100%;\r\n width: 100%;\r\n color: white;\r\n background-color: #1e1e1e;\r\n font-family: "acumin-pro-condensed";\r\n\r\n .icon {\r\n width: 40px;\r\n height: 40px;\r\n &.button {\r\n background-color: #333333;\r\n &:hover {\r\n background-color: #4a4a4a;\r\n cursor: pointer;\r\n }\r\n // When the button is selected - className=\'active\'\r\n &.active {\r\n background-color: #666666;\r\n }\r\n // When the button is clicked\r\n &:active {\r\n background-color: #837c7c;\r\n }\r\n }\r\n }\r\n\r\n .has-tooltip {\r\n display: inline-block;\r\n .tooltip {\r\n visibility: hidden;\r\n background-color: rgb(255, 255, 255);\r\n z-index: 1;\r\n position: absolute;\r\n opacity: 0;\r\n transition: opacity 0.5s;\r\n line-height: normal;\r\n font-size: 14px;\r\n padding: 0px 5px;\r\n color: black;\r\n }\r\n\r\n &:hover .tooltip {\r\n visibility: visible;\r\n opacity: 1;\r\n }\r\n }\r\n\r\n #properties {\r\n width: 100%;\r\n height: 40px;\r\n\r\n display: flex;\r\n align-items: center;\r\n font-size: 12px;\r\n color: white;\r\n user-select: none;\r\n background-color: #333333;\r\n\r\n .tab {\r\n display: inline-flex;\r\n line-height: 40px;\r\n height: 40px;\r\n flex-shrink: 0;\r\n flex-grow: 0;\r\n border-right: 2px solid #1e1e1e;\r\n background-color: #333333;\r\n }\r\n #left {\r\n overflow: hidden;\r\n height: 40px;\r\n flex-grow: 1;\r\n flex-shrink: 1;\r\n display: flex;\r\n flex-wrap: wrap;\r\n #dimensions-tab {\r\n form {\r\n display: flex;\r\n }\r\n label {\r\n margin-left: 15px;\r\n font-size: 15px;\r\n color: #afafaf;\r\n input {\r\n width: 40px;\r\n height: 24px;\r\n background-color: #000000;\r\n color: #ffffff;\r\n border: 0;\r\n font-size: 12px;\r\n text-align: "left";\r\n font-family: "acumin-pro-condensed";\r\n font-size: 15px;\r\n padding-left: 8px;\r\n }\r\n\r\n &:last-of-type {\r\n margin-right: 8px;\r\n }\r\n }\r\n }\r\n }\r\n #right-tab {\r\n margin-right: 0;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n\r\n input[type="file"] {\r\n display: none;\r\n }\r\n }\r\n\r\n .pixel-data {\r\n &:first-of-type {\r\n margin-left: 15px;\r\n }\r\n &:last-of-type {\r\n padding-right: 15px;\r\n }\r\n width: 45px;\r\n color: #afafaf;\r\n display: flex;\r\n justify-content: space-between;\r\n .value {\r\n display: inline-block;\r\n width: 30px;\r\n color: white;\r\n }\r\n font-size: 15px;\r\n }\r\n }\r\n\r\n #toolbar {\r\n position: absolute;\r\n top: 60px;\r\n left: 0;\r\n width: 40px;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: left;\r\n\r\n #tools {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n\r\n #add-tool {\r\n position: relative;\r\n #add-tool-popup {\r\n background-color: #333333;\r\n width: 348px;\r\n margin-left: 40px;\r\n position: absolute;\r\n top: 0px;\r\n height: 40px;\r\n padding-left: 4px;\r\n line-height: 40px;\r\n user-select: none;\r\n button {\r\n background: #222222;\r\n border: 1px solid rgb(51, 122, 183);\r\n margin: 5px 10px 5px 10px;\r\n color: white;\r\n padding: 4px 5px;\r\n opacity: 0.9;\r\n cursor: pointer;\r\n }\r\n }\r\n }\r\n\r\n #color {\r\n margin-top: 8px;\r\n #active-color-bg {\r\n border-radius: 50%;\r\n width: 20px;\r\n height: 20px;\r\n margin: 10px;\r\n position: relative;\r\n background-image: linear-gradient(45deg, #808080 25%, transparent 25%), linear-gradient(-45deg, #808080 25%, transparent 25%),\r\n linear-gradient(45deg, transparent 75%, #808080 75%), linear-gradient(-45deg, transparent 75%, #808080 75%);\r\n background-size: 20px 20px;\r\n background-position:\r\n 0 0,\r\n 0 10px,\r\n 10px -10px,\r\n -10px 0px;\r\n }\r\n #active-color {\r\n width: 20px;\r\n height: 20px;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n border-radius: 50%;\r\n }\r\n }\r\n #color-picker {\r\n position: absolute;\r\n margin-left: 40px;\r\n }\r\n }\r\n\r\n #channels-bar {\r\n position: absolute;\r\n top: 60px;\r\n right: 0;\r\n width: 80px;\r\n background: #666666;\r\n .channel {\r\n color: white;\r\n border-bottom: 2px solid #232323;\r\n width: 80px;\r\n height: 40px;\r\n font-size: 16px;\r\n display: flex;\r\n align-items: center;\r\n\r\n &.uneditable {\r\n background: #333333;\r\n }\r\n\r\n &:hover {\r\n cursor: pointer;\r\n }\r\n\r\n &:last-of-type {\r\n border-bottom: none;\r\n }\r\n }\r\n user-select: none;\r\n }\r\n\r\n #canvas-ui {\r\n width: 100%;\r\n height: calc(100% - 70px);\r\n outline: none;\r\n }\r\n\r\n #tool-ui {\r\n background-color: #333;\r\n position: absolute;\r\n right: 0;\r\n bottom: 30px;\r\n\r\n label {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n }\r\n\r\n input[type="range"] {\r\n background: #d3d3d3;\r\n }\r\n }\r\n\r\n #bottom-bar {\r\n height: 30px;\r\n width: 100%;\r\n background-color: #333333;\r\n font-size: 14px;\r\n user-select: none;\r\n line-height: 30px;\r\n position: relative;\r\n #file-url {\r\n left: 30px;\r\n position: absolute;\r\n }\r\n #mip-level {\r\n right: 30px;\r\n position: absolute;\r\n }\r\n }\r\n}\r\n'],sourceRoot:""}]),a.locals={};const i=a},8335:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(3234),s=r.n(n),o=r(7474),a=r.n(o)()(s());a.push([e.id,"#metadata-container textarea{display:block;margin:4px;width:calc(100% - 14px);min-height:100px;max-height:500px;resize:vertical}.meta-string textarea{background:#fe9}.meta-json textarea{background:#9df}.meta-object textarea{background:#d9f}.meta-object-protect textarea{background:#b0b0b0}.buttonLine.disabled{opacity:20%;pointer-events:none}.copy-root{display:grid;justify-content:end;height:30px}.copy-container{height:30px;width:30px;cursor:pointer}.hoverIcon:hover{opacity:.8}.type-status{padding:5px 15px}","",{version:3,sources:["webpack://./../../../dev/inspector/dist/components/actionTabs/tabs/propertyGrids/metadata/metadataPropertyGrid.scss"],names:[],mappings:"AACI,6BACI,aAAA,CACA,UAAA,CACA,uBAAA,CACA,gBAAA,CACA,gBAAA,CACA,eAAA,CAKJ,sBACI,eAAA,CAKJ,oBACI,eAAA,CAKJ,sBACI,eAAA,CAKJ,8BACI,kBAAA,CAKJ,qBACI,WAAA,CACA,mBAAA,CAIR,WACI,YAAA,CACA,mBAAA,CACA,WAAA,CAGJ,gBACI,WAAA,CACA,UAAA,CACA,cAAA,CAGJ,iBACI,UAAA,CAGJ,aACI,gBAAA",sourcesContent:["#metadata-container {\r\n textarea {\r\n display: block;\r\n margin: 4px;\r\n width: calc(100% - 14px);\r\n min-height: 100px;\r\n max-height: 500px;\r\n resize: vertical;\r\n }\r\n}\r\n\r\n.meta-string {\r\n textarea {\r\n background: #ffee99;\r\n }\r\n}\r\n\r\n.meta-json {\r\n textarea {\r\n background: #99ddff;\r\n }\r\n}\r\n\r\n.meta-object {\r\n textarea {\r\n background: #dd99ff;\r\n }\r\n}\r\n\r\n.meta-object-protect {\r\n textarea {\r\n background: #b0b0b0;\r\n }\r\n}\r\n\r\n.buttonLine {\r\n &.disabled {\r\n opacity: 20%;\r\n pointer-events: none;\r\n }\r\n}\r\n\r\n.copy-root {\r\n display: grid;\r\n justify-content: end;\r\n height: 30px;\r\n}\r\n\r\n.copy-container {\r\n height: 30px;\r\n width: 30px;\r\n cursor: pointer;\r\n}\r\n\r\n.hoverIcon:hover {\r\n opacity: 0.8;\r\n}\r\n\r\n.type-status {\r\n padding: 5px 15px;\r\n}\r\n"],sourceRoot:""}]),a.locals={};const i=a},8555:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(3234),s=r.n(n),o=r(7474),a=r.n(o)()(s());a.push([e.id,'#embed-host{position:absolute;right:0px;top:0px;bottom:0px;z-index:10}#__resizable_base__{display:none}#embed{background:#333;height:100%;margin:0;padding:0;display:grid;grid-template-rows:30px 1fr;font:14px "Arial";overflow:hidden}#embed #header{font-size:16px;color:#fff;background:#222;grid-row:1;text-align:center;display:grid;grid-template-columns:30px 1fr 50px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#embed #header #logo{grid-column:1;width:24px;height:24px;display:flex;align-self:center;justify-self:center}#embed #header #back{grid-column:1;display:grid;align-self:center;justify-self:center;cursor:pointer}#embed #header #title{grid-column:2;display:grid;align-items:center;text-align:center}#embed #header #commands{grid-column:3;display:grid;align-items:center;grid-template-columns:1fr 1fr}#embed #header #commands .expand{grid-column:1;display:grid;align-items:center;justify-items:center;cursor:pointer}#embed #header #commands .close{grid-column:2;display:grid;align-items:center;justify-items:center;cursor:pointer}#embed #split{grid-row:2;overflow:hidden}#embed #split.splitPopup{display:grid;grid-template-rows:300px 2px 1fr}#embed #split.splitPopup .panes{margin-bottom:1px}#embed #split #topPart{grid-row:1;overflow:hidden;display:grid;grid-auto-rows:100%}#embed #split #separator{grid-row:2;background:#fff;opacity:.1}#embed #split #bottomPart{overflow:hidden;grid-row:3;display:grid;grid-auto-rows:100%}#embed #split .gutter.gutter-vertical{background-image:none;background:#444;cursor:row-resize}',"",{version:3,sources:["webpack://./../../../dev/inspector/dist/components/embedHost/embedHost.scss"],names:[],mappings:"AAAA,YACI,iBAAA,CACA,SAAA,CACA,OAAA,CACA,UAAA,CACA,UAAA,CAGJ,oBACI,YAAA,CAGJ,OACI,eAAA,CACA,WAAA,CACA,QAAA,CACA,SAAA,CACA,YAAA,CACA,2BAAA,CACA,iBAAA,CACA,eAAA,CAEA,eACI,cAAA,CACA,UAAA,CACA,eAAA,CACA,UAAA,CACA,iBAAA,CACA,YAAA,CACA,mCAAA,CACA,wBAAA,CACA,qBAAA,CACA,oBAAA,CACA,gBAAA,CAEA,qBACI,aAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,iBAAA,CACA,mBAAA,CAGJ,qBACI,aAAA,CACA,YAAA,CACA,iBAAA,CACA,mBAAA,CACA,cAAA,CAGJ,sBACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,iBAAA,CAGJ,yBACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CAEA,iCACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CAGJ,gCACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CAKZ,cACI,UAAA,CACA,eAAA,CAEA,yBACI,YAAA,CACA,gCAAA,CAEA,gCACI,iBAAA,CAIR,uBACI,UAAA,CACA,eAAA,CACA,YAAA,CACA,mBAAA,CAGJ,yBACI,UAAA,CACA,eAAA,CACA,UAAA,CAGJ,0BACI,eAAA,CACA,UAAA,CACA,YAAA,CACA,mBAAA,CAGJ,sCACI,qBAAA,CACA,eAAA,CACA,iBAAA",sourcesContent:['#embed-host {\r\n position: absolute;\r\n right: 0px;\r\n top: 0px;\r\n bottom: 0px;\r\n z-index: 10;\r\n}\r\n\r\n#__resizable_base__ {\r\n display: none;\r\n}\r\n\r\n#embed {\r\n background: #333333;\r\n height: 100%;\r\n margin: 0;\r\n padding: 0;\r\n display: grid;\r\n grid-template-rows: 30px 1fr;\r\n font: 14px "Arial";\r\n overflow: hidden;\r\n\r\n #header {\r\n font-size: 16px;\r\n color: white;\r\n background: #222222;\r\n grid-row: 1;\r\n text-align: center;\r\n display: grid;\r\n grid-template-columns: 30px 1fr 50px;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n\r\n #logo {\r\n grid-column: 1;\r\n width: 24px;\r\n height: 24px;\r\n display: flex;\r\n align-self: center;\r\n justify-self: center;\r\n }\r\n\r\n #back {\r\n grid-column: 1;\r\n display: grid;\r\n align-self: center;\r\n justify-self: center;\r\n cursor: pointer;\r\n }\r\n\r\n #title {\r\n grid-column: 2;\r\n display: grid;\r\n align-items: center;\r\n text-align: center;\r\n }\r\n\r\n #commands {\r\n grid-column: 3;\r\n display: grid;\r\n align-items: center;\r\n grid-template-columns: 1fr 1fr;\r\n\r\n .expand {\r\n grid-column: 1;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n }\r\n\r\n .close {\r\n grid-column: 2;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n }\r\n }\r\n }\r\n\r\n #split {\r\n grid-row: 2;\r\n overflow: hidden;\r\n\r\n &.splitPopup {\r\n display: grid;\r\n grid-template-rows: 300px 2px 1fr;\r\n\r\n .panes {\r\n margin-bottom: 1px;\r\n }\r\n }\r\n\r\n #topPart {\r\n grid-row: 1;\r\n overflow: hidden;\r\n display: grid;\r\n grid-auto-rows: 100%;\r\n }\r\n\r\n #separator {\r\n grid-row: 2;\r\n background: white;\r\n opacity: 0.1;\r\n }\r\n\r\n #bottomPart {\r\n overflow: hidden;\r\n grid-row: 3;\r\n display: grid;\r\n grid-auto-rows: 100%;\r\n }\r\n\r\n .gutter.gutter-vertical {\r\n background-image: none;\r\n background: #444444;\r\n cursor: row-resize;\r\n }\r\n }\r\n}\r\n'],sourceRoot:""}]),a.locals={};const i=a},6771:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(3234),s=r.n(n),o=r(7474),a=r.n(o)()(s());a.push([e.id,'#scene-explorer-host{position:absolute;left:0px;top:0px;bottom:0px}#scene-explorer-host:focus{outline:none}#__resizable_base__{display:none}.context-menu{background:#222}.context-menu .react-contextmenu-item{padding:10px;cursor:pointer}.context-menu .react-contextmenu-item:hover{background:#555}.react-contextmenu.context-menu.react-contextmenu--visible{z-index:99;transform:scale(1)}#sceneExplorer{background:#333;height:100%;margin:0;padding:0;display:grid;grid-template-rows:auto 1fr;font:14px "Arial"}#sceneExplorer:focus{outline:none}#sceneExplorer #header{height:30px;font-size:16px;color:#fff;background:#222;grid-row:1;text-align:center;display:grid;grid-template-columns:30px 1fr 50px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#sceneExplorer #header #logo{position:relative;grid-column:1;width:24px;height:24px;left:0;display:flex;align-self:center;justify-self:center}#sceneExplorer #header #title{grid-column:2;display:grid;align-items:center;text-align:center}#sceneExplorer #header #commands{grid-column:3;display:grid;align-items:center;grid-template-columns:1fr 1fr}#sceneExplorer #header #commands .expand{grid-column:1;display:grid;align-items:center;justify-items:center;cursor:pointer}#sceneExplorer #header #commands .close{grid-column:2;display:grid;align-items:center;justify-items:center;cursor:pointer}#sceneExplorer #tree{grid-row:2;overflow-x:hidden;overflow-y:auto}#sceneExplorer .filter{display:flex;align-items:stretch}#sceneExplorer .filter input{width:100%;margin:10px 40px 5px 40px;display:block;border:none;padding:0;border-bottom:solid 1px #337ab7;background:linear-gradient(to bottom, rgba(255, 255, 255, 0) 96%, rgb(51, 122, 183) 4%);background-position:-1000px 0;background-size:1000px 100%;background-repeat:no-repeat;color:#fff}#sceneExplorer .filter input::placeholder{color:#d3d3d3}#sceneExplorer .filter input:focus{box-shadow:none;outline:none;background-position:0 0}#sceneExplorer .groupContainer{margin-left:0px;color:#fff;margin-top:0px;margin-bottom:0px;height:24px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-self:center;display:grid;align-items:center}#sceneExplorer .groupContainer:hover{background:#444}#sceneExplorer .groupContainer .expandableHeader{display:grid;grid-template-columns:1fr 20px}#sceneExplorer .groupContainer .expandableHeader .text{grid-column:1;display:grid;grid-template-columns:20px 1fr}#sceneExplorer .groupContainer .expandableHeader .text .arrow{grid-column:1;margin-left:0px;color:#fff;cursor:pointer;display:inline-block;margin-right:6px;opacity:.5}#sceneExplorer .groupContainer .expandableHeader .text .text-value{grid-column:2;display:flex;align-items:center}#sceneExplorer .groupContainer .expandableHeader .expandAll{opacity:.5;grid-column:2;margin-right:10px}#sceneExplorer .icon{display:grid;align-items:center;justify-items:center;cursor:pointer}#sceneExplorer .itemContainer{margin-left:0px;color:#fff;margin-top:0px;margin-bottom:0px;height:24px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:grid;grid-template-columns:20px 1fr}#sceneExplorer .itemContainer:hover{background:#444}#sceneExplorer .itemContainer.selected{background:#bbb;color:#000}#sceneExplorer .itemContainer .isNotActive{opacity:.3}#sceneExplorer .itemContainer .arrow{grid-column:1;color:#fff;opacity:.6}#sceneExplorer .itemContainer .popup{width:200px;visibility:hidden;background-color:#444;color:#fff;border:1px solid rgba(255,255,255,.5);position:absolute;z-index:1;margin-left:-180px;box-sizing:border-box}#sceneExplorer .itemContainer .popup.show{visibility:visible}#sceneExplorer .itemContainer .popup:focus{outline:none}#sceneExplorer .itemContainer .popup .popupMenu{padding:6px 5px 5px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;height:18px}#sceneExplorer .itemContainer .popup .popupMenu:hover{background:#fff;color:#333}#sceneExplorer .itemContainer .sceneNode{grid-column:2;margin-left:-10px;display:grid;grid-template-columns:1fr 20px 20px 20px 20px 10px 20px 20px auto 5px;align-items:center;cursor:pointer}#sceneExplorer .itemContainer .sceneNode .sceneTitle{grid-column:1;margin-right:5px;display:flex;align-items:center;height:24px}#sceneExplorer .itemContainer .sceneNode .translation{grid-column:2;opacity:.6}#sceneExplorer .itemContainer .sceneNode .translation.selected{opacity:1}#sceneExplorer .itemContainer .sceneNode .rotation{grid-column:3;opacity:.6}#sceneExplorer .itemContainer .sceneNode .rotation.selected{opacity:1}#sceneExplorer .itemContainer .sceneNode .scaling{grid-column:4;opacity:.6}#sceneExplorer .itemContainer .sceneNode .scaling.selected{opacity:1}#sceneExplorer .itemContainer .sceneNode .bounding{grid-column:5;opacity:.6}#sceneExplorer .itemContainer .sceneNode .bounding.selected{opacity:1}#sceneExplorer .itemContainer .sceneNode .separator{grid-column:6;margin-left:5px;width:5px;display:flex;align-items:center;height:18px;border-left:solid 1px #337ab7}#sceneExplorer .itemContainer .sceneNode .pickingMode{grid-column:7;opacity:.6}#sceneExplorer .itemContainer .sceneNode .pickingMode.selected{opacity:1}#sceneExplorer .itemContainer .sceneNode .coordinates{grid-column:8;opacity:.6}#sceneExplorer .itemContainer .sceneNode .coordinates.selected{opacity:1}#sceneExplorer .itemContainer .sceneNode .refresh{grid-column:9}#sceneExplorer .itemContainer .sceneNode .extensions{width:20px;grid-column:10}#sceneExplorer .itemContainer .targetedAnimationTools{grid-column:2;width:100%;display:grid;grid-template-columns:1fr auto 5px;align-items:center;min-width:0}#sceneExplorer .itemContainer .targetedAnimationTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .animationGroupTools{grid-column:2;width:100%;display:grid;grid-template-columns:1fr auto 5px;align-items:center;min-width:0}#sceneExplorer .itemContainer .animationGroupTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .soundTools{grid-column:2;width:100%;display:grid;grid-template-columns:1fr auto 5px;align-items:center;min-width:0}#sceneExplorer .itemContainer .soundTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .meshTools{grid-column:2;width:100%;display:grid;grid-template-columns:1fr auto 20px 20px auto 5px;align-items:center;min-width:0}#sceneExplorer .itemContainer .meshTools .edit{width:20px;grid-column:2}#sceneExplorer .itemContainer .meshTools .bounding-box{grid-column:3;opacity:.5}#sceneExplorer .itemContainer .meshTools .bounding-box.selected{opacity:1}#sceneExplorer .itemContainer .meshTools .visibility{grid-column:4}#sceneExplorer .itemContainer .meshTools .extensions{width:20px;grid-column:5}#sceneExplorer .itemContainer .cameraTools{grid-column:2;display:grid;grid-template-columns:1fr 20px 20px auto 5px;align-items:center}#sceneExplorer .itemContainer .cameraTools .activeCamera{grid-column:2}#sceneExplorer .itemContainer .cameraTools .enableGizmo{grid-column:3}#sceneExplorer .itemContainer .cameraTools .extensions{width:20px;grid-column:4}#sceneExplorer .itemContainer .lightTools{grid-column:2;display:grid;grid-template-columns:1fr 20px 20px auto 5px;align-items:center}#sceneExplorer .itemContainer .lightTools .visibility{grid-column:2}#sceneExplorer .itemContainer .lightTools .enableGizmo{grid-column:3}#sceneExplorer .itemContainer .lightTools .extensions{width:20px;grid-column:4}#sceneExplorer .itemContainer .spriteTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .spriteTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .spriteManagerTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .spriteManagerTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .materialTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .materialTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .materialTools .icon{display:grid;align-items:center;justify-items:center;cursor:pointer}#sceneExplorer .itemContainer .particleSystemTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .particleSystemTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .effectLayerTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .effectLayerTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .postProcessTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .postProcessTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .renderingPipelineTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .renderingPipelineTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .textureTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .textureTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .adtextureTools{grid-column:2;display:grid;grid-template-columns:1fr 20px 20px auto 5px;align-items:center}#sceneExplorer .itemContainer .adtextureTools .edit{grid-column:2}#sceneExplorer .itemContainer .adtextureTools .pickingMode{grid-column:3;opacity:.6}#sceneExplorer .itemContainer .adtextureTools .pickingMode.selected{opacity:1}#sceneExplorer .itemContainer .adtextureTools .extensions{width:20px;grid-column:3}#sceneExplorer .itemContainer .controlTools{grid-column:2;display:grid;grid-template-columns:1fr 20px 20px auto 5px;align-items:center}#sceneExplorer .itemContainer .controlTools .highlight{grid-column:2}#sceneExplorer .itemContainer .controlTools .visibility{grid-column:3}#sceneExplorer .itemContainer .controlTools .extensions{width:20px;grid-column:4}#sceneExplorer .itemContainer .transformNodeTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .transformNodeTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .skeletonTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .skeletonTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .title{grid-column:1;background:rgba(0,0,0,0);white-space:nowrap;overflow:hidden;min-width:0;margin-right:5px;display:grid;align-items:center;grid-template-columns:25px 1fr;height:24px;cursor:pointer}#sceneExplorer .itemContainer .title .titleIcon{grid-column:1;display:grid;align-items:center;justify-items:center}#sceneExplorer .itemContainer .title .titleText{grid-column:2;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}',"",{version:3,sources:["webpack://./../../../dev/inspector/dist/components/sceneExplorer/sceneExplorer.scss"],names:[],mappings:"AAAA,qBACI,iBAAA,CACA,QAAA,CACA,OAAA,CACA,UAAA,CAEA,2BACI,YAAA,CAIR,oBACI,YAAA,CAGJ,cACI,eAAA,CAEA,sCACI,YAAA,CACA,cAAA,CAEA,4CACI,eAAA,CAKZ,2DACI,UAAA,CACA,kBAAA,CAGJ,eACI,eAAA,CACA,WAAA,CACA,QAAA,CACA,SAAA,CACA,YAAA,CACA,2BAAA,CACA,iBAAA,CAEA,qBACI,YAAA,CAGJ,uBACI,WAAA,CACA,cAAA,CACA,UAAA,CACA,eAAA,CACA,UAAA,CACA,iBAAA,CACA,YAAA,CACA,mCAAA,CACA,wBAAA,CACA,qBAAA,CACA,oBAAA,CACA,gBAAA,CAEA,6BACI,iBAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,MAAA,CACA,YAAA,CACA,iBAAA,CACA,mBAAA,CAGJ,8BACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,iBAAA,CAGJ,iCACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CAEA,yCACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CAGJ,wCACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CAKZ,qBACI,UAAA,CAEA,iBAAA,CACA,eAAA,CAGJ,uBACI,YAAA,CACA,mBAAA,CAEA,6BACI,UAAA,CACA,yBAAA,CACA,aAAA,CACA,WAAA,CACA,SAAA,CACA,+BAAA,CACA,uFAAA,CACA,6BAAA,CACA,2BAAA,CACA,2BAAA,CACA,UAAA,CAGJ,0CACI,aAAA,CAGJ,mCACI,eAAA,CACA,YAAA,CACA,uBAAA,CAIR,+BACI,eAAA,CACA,UAAA,CACA,cAAA,CACA,iBAAA,CACA,WAAA,CAEA,wBAAA,CACA,qBAAA,CACA,oBAAA,CACA,gBAAA,CAEA,iBAAA,CACA,YAAA,CACA,kBAAA,CAEA,qCACI,eAAA,CAGJ,iDACI,YAAA,CACA,8BAAA,CAEA,uDACI,aAAA,CACA,YAAA,CACA,8BAAA,CAEA,8DACI,aAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CACA,oBAAA,CACA,gBAAA,CACA,UAAA,CAGJ,mEACI,aAAA,CACA,YAAA,CACA,kBAAA,CAIR,4DACI,UAAA,CACA,aAAA,CACA,iBAAA,CAKZ,qBACI,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CAGJ,8BACI,eAAA,CACA,UAAA,CACA,cAAA,CACA,iBAAA,CACA,WAAA,CACA,wBAAA,CACA,qBAAA,CACA,oBAAA,CACA,gBAAA,CACA,YAAA,CACA,8BAAA,CAEA,oCACI,eAAA,CAGJ,uCACI,eAAA,CACA,UAAA,CAGJ,2CACI,UAAA,CAGJ,qCACI,aAAA,CACA,UAAA,CACA,UAAA,CAGJ,qCACI,WAAA,CACA,iBAAA,CACA,qBAAA,CACA,UAAA,CACA,qCAAA,CACA,iBAAA,CACA,SAAA,CACA,kBAAA,CACA,qBAAA,CAEA,0CACI,kBAAA,CAGJ,2CACI,YAAA,CAGJ,gDACI,wBAAA,CACA,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,WAAA,CAEA,sDACI,eAAA,CACA,UAAA,CAKZ,yCACI,aAAA,CACA,iBAAA,CACA,YAAA,CACA,qEAAA,CACA,kBAAA,CACA,cAAA,CAEA,qDACI,aAAA,CACA,gBAAA,CACA,YAAA,CACA,kBAAA,CACA,WAAA,CAGJ,sDACI,aAAA,CACA,UAAA,CAEA,+DACI,SAAA,CAIR,mDACI,aAAA,CACA,UAAA,CAEA,4DACI,SAAA,CAIR,kDACI,aAAA,CACA,UAAA,CACA,2DACI,SAAA,CAIR,mDACI,aAAA,CACA,UAAA,CACA,4DACI,SAAA,CAIR,oDACI,aAAA,CACA,eAAA,CACA,SAAA,CACA,YAAA,CACA,kBAAA,CACA,WAAA,CACA,6BAAA,CAGJ,sDACI,aAAA,CACA,UAAA,CAEA,+DACI,SAAA,CAIR,sDACI,aAAA,CACA,UAAA,CAEA,+DACI,SAAA,CAIR,kDACI,aAAA,CAGJ,qDACI,UAAA,CACA,cAAA,CAIR,sDACI,aAAA,CACA,UAAA,CACA,YAAA,CACA,kCAAA,CACA,kBAAA,CACA,WAAA,CAEA,kEACI,UAAA,CACA,aAAA,CAIR,mDACI,aAAA,CACA,UAAA,CACA,YAAA,CACA,kCAAA,CACA,kBAAA,CACA,WAAA,CAEA,+DACI,UAAA,CACA,aAAA,CAIR,0CACI,aAAA,CACA,UAAA,CACA,YAAA,CACA,kCAAA,CACA,kBAAA,CACA,WAAA,CAEA,sDACI,UAAA,CACA,aAAA,CAIR,yCACI,aAAA,CACA,UAAA,CACA,YAAA,CACA,iDAAA,CACA,kBAAA,CACA,WAAA,CAEA,+CACI,UAAA,CACA,aAAA,CAGJ,uDACI,aAAA,CACA,UAAA,CAEA,gEACI,SAAA,CAIR,qDACI,aAAA,CAGJ,qDACI,UAAA,CACA,aAAA,CAIR,2CACI,aAAA,CACA,YAAA,CACA,4CAAA,CACA,kBAAA,CAEA,yDACI,aAAA,CAGJ,wDACI,aAAA,CAGJ,uDACI,UAAA,CACA,aAAA,CAIR,0CACI,aAAA,CACA,YAAA,CACA,4CAAA,CACA,kBAAA,CAEA,sDACI,aAAA,CAGJ,uDACI,aAAA,CAGJ,sDACI,UAAA,CACA,aAAA,CAIR,2CACI,aAAA,CACA,YAAA,CACA,kCAAA,CACA,kBAAA,CAEA,uDACI,UAAA,CACA,aAAA,CAIR,kDACI,aAAA,CACA,YAAA,CACA,kCAAA,CACA,kBAAA,CAEA,8DACI,UAAA,CACA,aAAA,CAIR,6CACI,aAAA,CACA,YAAA,CACA,kCAAA,CACA,kBAAA,CAEA,yDACI,UAAA,CACA,aAAA,CAGJ,mDACI,YAAA,CACA,kBAAA,CACA,oBAAA,CACA,cAAA,CAIR,mDACI,aAAA,CACA,YAAA,CACA,kCAAA,CACA,kBAAA,CAEA,+DACI,UAAA,CACA,aAAA,CAIR,gDACI,aAAA,CACA,YAAA,CACA,kCAAA,CACA,kBAAA,CAEA,4DACI,UAAA,CACA,aAAA,CAIR,gDACI,aAAA,CACA,YAAA,CACA,kCAAA,CACA,kBAAA,CAEA,4DACI,UAAA,CACA,aAAA,CAIR,sDACI,aAAA,CACA,YAAA,CACA,kCAAA,CACA,kBAAA,CAEA,kEACI,UAAA,CACA,aAAA,CAIR,4CACI,aAAA,CACA,YAAA,CACA,kCAAA,CACA,kBAAA,CAEA,wDACI,UAAA,CACA,aAAA,CAIR,8CACI,aAAA,CACA,YAAA,CACA,4CAAA,CACA,kBAAA,CAEA,oDACI,aAAA,CAGJ,2DACI,aAAA,CACA,UAAA,CAEA,oEACI,SAAA,CAIR,0DACI,UAAA,CACA,aAAA,CAIR,4CACI,aAAA,CACA,YAAA,CACA,4CAAA,CACA,kBAAA,CAEA,uDACI,aAAA,CAGJ,wDACI,aAAA,CAGJ,wDACI,UAAA,CACA,aAAA,CAIR,kDACI,aAAA,CACA,YAAA,CACA,kCAAA,CACA,kBAAA,CAEA,8DACI,UAAA,CACA,aAAA,CAIR,6CACI,aAAA,CACA,YAAA,CACA,kCAAA,CACA,kBAAA,CAEA,yDACI,UAAA,CACA,aAAA,CAIR,qCACI,aAAA,CACA,wBAAA,CACA,kBAAA,CACA,eAAA,CACA,WAAA,CACA,gBAAA,CACA,YAAA,CACA,kBAAA,CACA,8BAAA,CACA,WAAA,CACA,cAAA,CAEA,gDACI,aAAA,CACA,YAAA,CACA,kBAAA,CACA,oBAAA,CAGJ,gDACI,aAAA,CACA,kBAAA,CACA,sBAAA,CACA,eAAA",sourcesContent:['#scene-explorer-host {\r\n position: absolute;\r\n left: 0px;\r\n top: 0px;\r\n bottom: 0px;\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n}\r\n\r\n#__resizable_base__ {\r\n display: none;\r\n}\r\n\r\n.context-menu {\r\n background: #222222;\r\n\r\n .react-contextmenu-item {\r\n padding: 10px;\r\n cursor: pointer;\r\n\r\n &:hover {\r\n background: #555555;\r\n }\r\n }\r\n}\r\n\r\n.react-contextmenu.context-menu.react-contextmenu--visible {\r\n z-index: 99;\r\n transform: scale(1);\r\n}\r\n\r\n#sceneExplorer {\r\n background: #333333;\r\n height: 100%;\r\n margin: 0;\r\n padding: 0;\r\n display: grid;\r\n grid-template-rows: auto 1fr;\r\n font: 14px "Arial";\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n #header {\r\n height: 30px;\r\n font-size: 16px;\r\n color: white;\r\n background: #222222;\r\n grid-row: 1;\r\n text-align: center;\r\n display: grid;\r\n grid-template-columns: 30px 1fr 50px;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n\r\n #logo {\r\n position: relative;\r\n grid-column: 1;\r\n width: 24px;\r\n height: 24px;\r\n left: 0;\r\n display: flex;\r\n align-self: center;\r\n justify-self: center;\r\n }\r\n\r\n #title {\r\n grid-column: 2;\r\n display: grid;\r\n align-items: center;\r\n text-align: center;\r\n }\r\n\r\n #commands {\r\n grid-column: 3;\r\n display: grid;\r\n align-items: center;\r\n grid-template-columns: 1fr 1fr;\r\n\r\n .expand {\r\n grid-column: 1;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n }\r\n\r\n .close {\r\n grid-column: 2;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n }\r\n }\r\n }\r\n\r\n #tree {\r\n grid-row: 2;\r\n\r\n overflow-x: hidden;\r\n overflow-y: auto;\r\n }\r\n\r\n .filter {\r\n display: flex;\r\n align-items: stretch;\r\n\r\n input {\r\n width: 100%;\r\n margin: 10px 40px 5px 40px;\r\n display: block;\r\n border: none;\r\n padding: 0;\r\n border-bottom: solid 1px rgb(51, 122, 183);\r\n background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 96%, rgb(51, 122, 183) 4%);\r\n background-position: -1000px 0;\r\n background-size: 1000px 100%;\r\n background-repeat: no-repeat;\r\n color: white;\r\n }\r\n\r\n input::placeholder {\r\n color: lightgray;\r\n }\r\n\r\n input:focus {\r\n box-shadow: none;\r\n outline: none;\r\n background-position: 0 0;\r\n }\r\n }\r\n\r\n .groupContainer {\r\n margin-left: 0px;\r\n color: white;\r\n margin-top: 0px;\r\n margin-bottom: 0px;\r\n height: 24px;\r\n\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n\r\n align-self: center;\r\n display: grid;\r\n align-items: center;\r\n\r\n &:hover {\r\n background: #444444;\r\n }\r\n\r\n .expandableHeader {\r\n display: grid;\r\n grid-template-columns: 1fr 20px;\r\n\r\n .text {\r\n grid-column: 1;\r\n display: grid;\r\n grid-template-columns: 20px 1fr;\r\n\r\n .arrow {\r\n grid-column: 1;\r\n margin-left: 0px;\r\n color: white;\r\n cursor: pointer;\r\n display: inline-block;\r\n margin-right: 6px;\r\n opacity: 0.5;\r\n }\r\n\r\n .text-value {\r\n grid-column: 2;\r\n display: flex;\r\n align-items: center;\r\n }\r\n }\r\n\r\n .expandAll {\r\n opacity: 0.5;\r\n grid-column: 2;\r\n margin-right: 10px;\r\n }\r\n }\r\n }\r\n\r\n .icon {\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n }\r\n\r\n .itemContainer {\r\n margin-left: 0px;\r\n color: white;\r\n margin-top: 0px;\r\n margin-bottom: 0px;\r\n height: 24px;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n display: grid;\r\n grid-template-columns: 20px 1fr;\r\n\r\n &:hover {\r\n background: #444444;\r\n }\r\n\r\n &.selected {\r\n background: #bbbbbb;\r\n color: black;\r\n }\r\n\r\n .isNotActive {\r\n opacity: 0.3;\r\n }\r\n\r\n .arrow {\r\n grid-column: 1;\r\n color: white;\r\n opacity: 0.6;\r\n }\r\n\r\n .popup {\r\n width: 200px;\r\n visibility: hidden;\r\n background-color: #444444;\r\n color: #fff;\r\n border: 1px solid rgba(255, 255, 255, 0.5);\r\n position: absolute;\r\n z-index: 1;\r\n margin-left: -180px;\r\n box-sizing: border-box;\r\n\r\n &.show {\r\n visibility: visible;\r\n }\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n .popupMenu {\r\n padding: 6px 5px 5px 10px;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n height: 18px;\r\n\r\n &:hover {\r\n background: white;\r\n color: #333333;\r\n }\r\n }\r\n }\r\n\r\n .sceneNode {\r\n grid-column: 2;\r\n margin-left: -10px;\r\n display: grid;\r\n grid-template-columns: 1fr 20px 20px 20px 20px 10px 20px 20px auto 5px;\r\n align-items: center;\r\n cursor: pointer;\r\n\r\n .sceneTitle {\r\n grid-column: 1;\r\n margin-right: 5px;\r\n display: flex;\r\n align-items: center;\r\n height: 24px;\r\n }\r\n\r\n .translation {\r\n grid-column: 2;\r\n opacity: 0.6;\r\n\r\n &.selected {\r\n opacity: 1;\r\n }\r\n }\r\n\r\n .rotation {\r\n grid-column: 3;\r\n opacity: 0.6;\r\n\r\n &.selected {\r\n opacity: 1;\r\n }\r\n }\r\n\r\n .scaling {\r\n grid-column: 4;\r\n opacity: 0.6;\r\n &.selected {\r\n opacity: 1;\r\n }\r\n }\r\n\r\n .bounding {\r\n grid-column: 5;\r\n opacity: 0.6;\r\n &.selected {\r\n opacity: 1;\r\n }\r\n }\r\n\r\n .separator {\r\n grid-column: 6;\r\n margin-left: 5px;\r\n width: 5px;\r\n display: flex;\r\n align-items: center;\r\n height: 18px;\r\n border-left: solid 1px rgb(51, 122, 183);\r\n }\r\n\r\n .pickingMode {\r\n grid-column: 7;\r\n opacity: 0.6;\r\n\r\n &.selected {\r\n opacity: 1;\r\n }\r\n }\r\n\r\n .coordinates {\r\n grid-column: 8;\r\n opacity: 0.6;\r\n\r\n &.selected {\r\n opacity: 1;\r\n }\r\n }\r\n\r\n .refresh {\r\n grid-column: 9;\r\n }\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 10;\r\n }\r\n }\r\n\r\n .targetedAnimationTools {\r\n grid-column: 2;\r\n width: 100%;\r\n display: grid;\r\n grid-template-columns: 1fr auto 5px;\r\n align-items: center;\r\n min-width: 0;\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n }\r\n\r\n .animationGroupTools {\r\n grid-column: 2;\r\n width: 100%;\r\n display: grid;\r\n grid-template-columns: 1fr auto 5px;\r\n align-items: center;\r\n min-width: 0;\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n }\r\n\r\n .soundTools {\r\n grid-column: 2;\r\n width: 100%;\r\n display: grid;\r\n grid-template-columns: 1fr auto 5px;\r\n align-items: center;\r\n min-width: 0;\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n }\r\n\r\n .meshTools {\r\n grid-column: 2;\r\n width: 100%;\r\n display: grid;\r\n grid-template-columns: 1fr auto 20px 20px auto 5px;\r\n align-items: center;\r\n min-width: 0;\r\n\r\n .edit {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n\r\n .bounding-box {\r\n grid-column: 3;\r\n opacity: 0.5;\r\n\r\n &.selected {\r\n opacity: 1;\r\n }\r\n }\r\n\r\n .visibility {\r\n grid-column: 4;\r\n }\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 5;\r\n }\r\n }\r\n\r\n .cameraTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr 20px 20px auto 5px;\r\n align-items: center;\r\n\r\n .activeCamera {\r\n grid-column: 2;\r\n }\r\n\r\n .enableGizmo {\r\n grid-column: 3;\r\n }\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 4;\r\n }\r\n }\r\n\r\n .lightTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr 20px 20px auto 5px;\r\n align-items: center;\r\n\r\n .visibility {\r\n grid-column: 2;\r\n }\r\n\r\n .enableGizmo {\r\n grid-column: 3;\r\n }\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 4;\r\n }\r\n }\r\n\r\n .spriteTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr auto 5px;\r\n align-items: center;\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n }\r\n\r\n .spriteManagerTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr auto 5px;\r\n align-items: center;\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n }\r\n\r\n .materialTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr auto 5px;\r\n align-items: center;\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n\r\n .icon {\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n cursor: pointer;\r\n }\r\n }\r\n\r\n .particleSystemTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr auto 5px;\r\n align-items: center;\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n }\r\n\r\n .effectLayerTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr auto 5px;\r\n align-items: center;\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n }\r\n\r\n .postProcessTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr auto 5px;\r\n align-items: center;\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n }\r\n\r\n .renderingPipelineTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr auto 5px;\r\n align-items: center;\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n }\r\n\r\n .textureTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr auto 5px;\r\n align-items: center;\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n }\r\n\r\n .adtextureTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr 20px 20px auto 5px;\r\n align-items: center;\r\n\r\n .edit {\r\n grid-column: 2;\r\n }\r\n\r\n .pickingMode {\r\n grid-column: 3;\r\n opacity: 0.6;\r\n\r\n &.selected {\r\n opacity: 1;\r\n }\r\n }\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 3;\r\n }\r\n }\r\n\r\n .controlTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr 20px 20px auto 5px;\r\n align-items: center;\r\n\r\n .highlight {\r\n grid-column: 2;\r\n }\r\n\r\n .visibility {\r\n grid-column: 3;\r\n }\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 4;\r\n }\r\n }\r\n\r\n .transformNodeTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr auto 5px;\r\n align-items: center;\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n }\r\n\r\n .skeletonTools {\r\n grid-column: 2;\r\n display: grid;\r\n grid-template-columns: 1fr auto 5px;\r\n align-items: center;\r\n\r\n .extensions {\r\n width: 20px;\r\n grid-column: 2;\r\n }\r\n }\r\n\r\n .title {\r\n grid-column: 1;\r\n background: transparent;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n min-width: 0;\r\n margin-right: 5px;\r\n display: grid;\r\n align-items: center;\r\n grid-template-columns: 25px 1fr;\r\n height: 24px;\r\n cursor: pointer;\r\n\r\n .titleIcon {\r\n grid-column: 1;\r\n display: grid;\r\n align-items: center;\r\n justify-items: center;\r\n }\r\n\r\n .titleText {\r\n grid-column: 2;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n }\r\n }\r\n }\r\n}\r\n'],sourceRoot:""}]),a.locals={};const i=a},5228:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(3234),s=r.n(n),o=r(7474),a=r.n(o)()(s());a.push([e.id,'.color-picker-container{width:320px;height:300px;background-color:#fff;display:grid;grid-template-columns:100%;grid-template-rows:50% 50px 60px 40px 1fr auto;font-family:"acumin-pro-condensed";font-weight:normal;font-size:14px}.color-picker-container.with-hints{height:380px}.color-picker-container .color-picker-saturation{grid-row:1;grid-column:1;display:grid;grid-template-columns:100%;grid-template-rows:100%;position:relative;cursor:pointer}.color-picker-container .color-picker-saturation .color-picker-saturation-white{grid-row:1;grid-column:1;background:-webkit-linear-gradient(to right, #fff, rgba(255, 255, 255, 0));background:linear-gradient(to right, #fff, rgba(255, 255, 255, 0))}.color-picker-container .color-picker-saturation .color-picker-saturation-black{grid-row:1;grid-column:1;background:-webkit-linear-gradient(to top, #000, rgba(0, 0, 0, 0));background:linear-gradient(to top, #000, rgba(0, 0, 0, 0))}.color-picker-container .color-picker-saturation .color-picker-saturation-cursor{pointer-events:none;width:4px;height:4px;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);border-radius:50%;transform:translate(-2px, -2px);position:absolute}.color-picker-container .color-picker-hue{grid-row:2;grid-column:1;display:grid;margin:10px;grid-template-columns:24% 76%;grid-template-rows:100%}.color-picker-container .color-picker-hue .color-picker-hue-color{grid-row:1;grid-column:1;align-self:center;justify-self:center;width:30px;height:30px;border-radius:15px;border:1px solid #000}.color-picker-container .color-picker-hue .color-picker-hue-slider{grid-row:1;grid-column:2;align-self:center;height:16px;position:relative;cursor:pointer;background:linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);background:-webkit-linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)}.color-picker-container .color-picker-hue .color-picker-hue-slider .color-picker-hue-cursor{pointer-events:none;width:8px;height:18px;transform:translate(-4px, -2px);background-color:#f8f8f8;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);position:absolute}.color-picker-container .color-picker-component{display:grid;margin:5px;grid-template-columns:100%;grid-template-rows:50% 50%}.color-picker-container .color-picker-component .color-picker-component-value{justify-self:center;align-self:center;grid-row:1;grid-column:1;margin-bottom:4px}.color-picker-container .color-picker-component .color-picker-component-value input{width:50px}.color-picker-container .color-picker-component .color-picker-component-label{justify-self:center;align-self:center;grid-row:2;grid-column:1;color:#000}.color-picker-container .color-picker-rgb{grid-row:3;grid-column:1;display:grid;margin:10px;grid-template-columns:20% 6.66% 20% 6.66% 20% 6.66% 20%;grid-template-rows:100%}.color-picker-container .red{grid-row:1;grid-column:1}.color-picker-container .green{grid-row:1;grid-column:3}.color-picker-container .blue{grid-row:1;grid-column:5}.color-picker-container .alpha{grid-row:1;grid-column:7}.color-picker-container .alpha.grayed{opacity:.5}.color-picker-container .color-picker-hex{grid-row:4;grid-column:1;display:grid;grid-template-columns:20% 80%;grid-template-rows:100%}.color-picker-container .color-picker-hex .color-picker-hex-label{justify-self:center;align-self:center;grid-row:1;grid-column:1;margin-left:10px;color:#000}.color-picker-container .color-picker-hex .color-picker-hex-value{justify-self:left;align-self:center;grid-row:1;grid-column:2;margin-left:10px;margin-right:10px}.color-picker-container .color-picker-hex .color-picker-hex-value input{width:70px}.color-picker-container .color-picker-warning{color:#000;font-size:11px;padding:4px;justify-self:left;align-self:center;grid-row:6;grid-column:1}',"",{version:3,sources:["webpack://./../../../dev/sharedUiComponents/dist/colorPicker/colorPicker.scss"],names:[],mappings:"AAAA,wBACI,WAAA,CACA,YAAA,CACA,qBAAA,CACA,YAAA,CACA,0BAAA,CACA,8CAAA,CACA,kCAAA,CACA,kBAAA,CACA,cAAA,CAEA,mCACI,YAAA,CAGJ,iDACI,UAAA,CACA,aAAA,CACA,YAAA,CACA,0BAAA,CACA,uBAAA,CACA,iBAAA,CACA,cAAA,CAEA,gFACI,UAAA,CACA,aAAA,CAEA,0EAAA,CACA,kEAAA,CAGJ,gFACI,UAAA,CACA,aAAA,CAEA,kEAAA,CACA,0DAAA,CAGJ,iFACI,mBAAA,CACA,SAAA,CACA,UAAA,CACA,uFACI,CAGJ,iBAAA,CACA,+BAAA,CACA,iBAAA,CAIR,0CACI,UAAA,CACA,aAAA,CACA,YAAA,CACA,WAAA,CACA,6BAAA,CACA,uBAAA,CAEA,kEACI,UAAA,CACA,aAAA,CACA,iBAAA,CACA,mBAAA,CACA,UAAA,CACA,WAAA,CACA,kBAAA,CACA,qBAAA,CAGJ,mEACI,UAAA,CACA,aAAA,CACA,iBAAA,CACA,WAAA,CACA,iBAAA,CACA,cAAA,CAEA,0GAAA,CACA,kHAAA,CAEA,4FACI,mBAAA,CACA,SAAA,CACA,WAAA,CACA,+BAAA,CACA,wBAAA,CACA,sCAAA,CACA,iBAAA,CAKZ,gDACI,YAAA,CACA,UAAA,CACA,0BAAA,CACA,0BAAA,CAEA,8EACI,mBAAA,CACA,iBAAA,CACA,UAAA,CACA,aAAA,CACA,iBAAA,CAEA,oFACI,UAAA,CAIR,8EACI,mBAAA,CACA,iBAAA,CACA,UAAA,CACA,aAAA,CACA,UAAA,CAIR,0CACI,UAAA,CACA,aAAA,CACA,YAAA,CACA,WAAA,CACA,uDAAA,CACA,uBAAA,CAGJ,6BACI,UAAA,CACA,aAAA,CAGJ,+BACI,UAAA,CACA,aAAA,CAGJ,8BACI,UAAA,CACA,aAAA,CAGJ,+BACI,UAAA,CACA,aAAA,CAEA,sCACI,UAAA,CAIR,0CACI,UAAA,CACA,aAAA,CACA,YAAA,CACA,6BAAA,CACA,uBAAA,CAEA,kEACI,mBAAA,CACA,iBAAA,CACA,UAAA,CACA,aAAA,CACA,gBAAA,CACA,UAAA,CAGJ,kEACI,iBAAA,CACA,iBAAA,CACA,UAAA,CACA,aAAA,CACA,gBAAA,CACA,iBAAA,CAEA,wEACI,UAAA,CAKZ,8CACI,UAAA,CACA,cAAA,CACA,WAAA,CACA,iBAAA,CACA,iBAAA,CACA,UAAA,CACA,aAAA",sourcesContent:['.color-picker-container {\r\n width: 320px;\r\n height: 300px;\r\n background-color: white;\r\n display: grid;\r\n grid-template-columns: 100%;\r\n grid-template-rows: 50% 50px 60px 40px 1fr auto;\r\n font-family: "acumin-pro-condensed";\r\n font-weight: normal;\r\n font-size: 14px;\r\n\r\n &.with-hints {\r\n height: 380px;\r\n }\r\n\r\n .color-picker-saturation {\r\n grid-row: 1;\r\n grid-column: 1;\r\n display: grid;\r\n grid-template-columns: 100%;\r\n grid-template-rows: 100%;\r\n position: relative;\r\n cursor: pointer;\r\n\r\n .color-picker-saturation-white {\r\n grid-row: 1;\r\n grid-column: 1;\r\n\r\n background: -webkit-linear-gradient(to right, #fff, rgba(255, 255, 255, 0));\r\n background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));\r\n }\r\n\r\n .color-picker-saturation-black {\r\n grid-row: 1;\r\n grid-column: 1;\r\n\r\n background: -webkit-linear-gradient(to top, #000, rgba(0, 0, 0, 0));\r\n background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));\r\n }\r\n\r\n .color-picker-saturation-cursor {\r\n pointer-events: none;\r\n width: 4px;\r\n height: 4px;\r\n box-shadow:\r\n 0 0 0 1.5px #fff,\r\n inset 0 0 1px 1px rgba(0, 0, 0, 0.3),\r\n 0 0 1px 2px rgba(0, 0, 0, 0.4);\r\n border-radius: 50%;\r\n transform: translate(-2px, -2px);\r\n position: absolute;\r\n }\r\n }\r\n\r\n .color-picker-hue {\r\n grid-row: 2;\r\n grid-column: 1;\r\n display: grid;\r\n margin: 10px;\r\n grid-template-columns: 24% 76%;\r\n grid-template-rows: 100%;\r\n\r\n .color-picker-hue-color {\r\n grid-row: 1;\r\n grid-column: 1;\r\n align-self: center;\r\n justify-self: center;\r\n width: 30px;\r\n height: 30px;\r\n border-radius: 15px;\r\n border: 1px solid black;\r\n }\r\n\r\n .color-picker-hue-slider {\r\n grid-row: 1;\r\n grid-column: 2;\r\n align-self: center;\r\n height: 16px;\r\n position: relative;\r\n cursor: pointer;\r\n\r\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\r\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\r\n\r\n .color-picker-hue-cursor {\r\n pointer-events: none;\r\n width: 8px;\r\n height: 18px;\r\n transform: translate(-4px, -2px);\r\n background-color: rgb(248, 248, 248);\r\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);\r\n position: absolute;\r\n }\r\n }\r\n }\r\n\r\n .color-picker-component {\r\n display: grid;\r\n margin: 5px;\r\n grid-template-columns: 100%;\r\n grid-template-rows: 50% 50%;\r\n\r\n .color-picker-component-value {\r\n justify-self: center;\r\n align-self: center;\r\n grid-row: 1;\r\n grid-column: 1;\r\n margin-bottom: 4px;\r\n\r\n input {\r\n width: 50px;\r\n }\r\n }\r\n\r\n .color-picker-component-label {\r\n justify-self: center;\r\n align-self: center;\r\n grid-row: 2;\r\n grid-column: 1;\r\n color: black;\r\n }\r\n }\r\n\r\n .color-picker-rgb {\r\n grid-row: 3;\r\n grid-column: 1;\r\n display: grid;\r\n margin: 10px;\r\n grid-template-columns: 20% 6.66% 20% 6.66% 20% 6.66% 20%;\r\n grid-template-rows: 100%;\r\n }\r\n\r\n .red {\r\n grid-row: 1;\r\n grid-column: 1;\r\n }\r\n\r\n .green {\r\n grid-row: 1;\r\n grid-column: 3;\r\n }\r\n\r\n .blue {\r\n grid-row: 1;\r\n grid-column: 5;\r\n }\r\n\r\n .alpha {\r\n grid-row: 1;\r\n grid-column: 7;\r\n\r\n &.grayed {\r\n opacity: 0.5;\r\n }\r\n }\r\n\r\n .color-picker-hex {\r\n grid-row: 4;\r\n grid-column: 1;\r\n display: grid;\r\n grid-template-columns: 20% 80%;\r\n grid-template-rows: 100%;\r\n\r\n .color-picker-hex-label {\r\n justify-self: center;\r\n align-self: center;\r\n grid-row: 1;\r\n grid-column: 1;\r\n margin-left: 10px;\r\n color: black;\r\n }\r\n\r\n .color-picker-hex-value {\r\n justify-self: left;\r\n align-self: center;\r\n grid-row: 1;\r\n grid-column: 2;\r\n margin-left: 10px;\r\n margin-right: 10px;\r\n\r\n input {\r\n width: 70px;\r\n }\r\n }\r\n }\r\n\r\n .color-picker-warning {\r\n color: black;\r\n font-size: 11px;\r\n padding: 4px;\r\n justify-self: left;\r\n align-self: center;\r\n grid-row: 6;\r\n grid-column: 1;\r\n }\r\n}\r\n'],sourceRoot:""}]),a.locals={};const i=a},7474:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,s,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var i=0;i0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),s&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=s):c[4]="".concat(s)),t.push(c))}},t}},1721:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},3234:e=>{"use strict";e.exports=function(e){var t=e[1],r=e[3];if(!r)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),o="/*# ".concat(s," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},1684:function(e){e.exports=function(e){function t(n){if(r[n])return r[n].exports;var s=r[n]={exports:{},id:n,loaded:!1};return e[n].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var n,s,o={}.hasOwnProperty,a=[].indexOf||function(e){for(var t=0,r=this.length;t0&&r.data&&(this.groups.has(r.data)?this.groups.get(r.data).push(s):this.groups.set(r.data,[s])),this.frames.push(r)},t.prototype.render=function(){var e,t,r;if(this.running)throw new Error("Already running");if(null==this.options.width||null==this.options.height)throw new Error("Width and height must be set prior to rendering");if(this.running=!0,this.nextFrame=0,this.finishedFrames=0,this.imageParts=function(){var e,t,r;for(r=[],e=0,t=this.frames.length;0<=t?et;0<=t?++e:--e)r.push(null);return r}.call(this),t=this.spawnWorkers(),!0===this.options.globalPalette)this.renderNextFrame();else for(e=0,r=t;0<=r?er;0<=r?++e:--e)this.renderNextFrame();return this.emit("start"),this.emit("progress",0)},t.prototype.abort=function(){for(var e;null!=(e=this.activeWorkers.shift());)this.log("killing active worker"),e.terminate();return this.running=!1,this.emit("abort")},t.prototype.spawnWorkers=function(){var e,t,r;return e=Math.min(this.options.workers,this.frames.length),function(){r=[];for(var n=t=this.freeWorkers.length;t<=e?ne;t<=e?n++:n--)r.push(n);return r}.apply(this).forEach(function(e){return function(t){var r;return e.log("spawning worker "+t),(r=new Worker(e.options.workerScript)).onmessage=function(t){return e.activeWorkers.splice(e.activeWorkers.indexOf(r),1),e.freeWorkers.push(r),e.frameFinished(t.data,!1)},e.freeWorkers.push(r)}}(this)),e},t.prototype.frameFinished=function(e,t){var r,n,s,o;if(this.finishedFrames++,t?(r=this.frames.indexOf(e),n=this.groups.get(e.data)[0],this.log("frame "+(r+1)+" is duplicate of "+n+" - "+this.activeWorkers.length+" active"),this.imageParts[r]={indexOfFirstInGroup:n}):(this.log("frame "+(e.index+1)+" finished - "+this.activeWorkers.length+" active"),this.emit("progress",this.finishedFrames/this.frames.length),this.imageParts[e.index]=e),!0===this.options.globalPalette&&!t&&(this.options.globalPalette=e.globalPalette,this.log("global palette analyzed"),this.frames.length>2))for(s=1,o=this.freeWorkers.length;1<=o?so;1<=o?++s:--s)this.renderNextFrame();return a.call(this.imageParts,null)>=0?this.renderNextFrame():this.finishRendering()},t.prototype.finishRendering=function(){var e,t,r,n,s,o,a,i,l,p,c,d,h,u,b,g,m,A,C,f;for(s=o=0,p=(m=this.imageParts).length;o=this.frames.length))return e=this.frames[this.nextFrame++],(t=this.frames.indexOf(e))>0&&this.groups.has(e.data)&&this.groups.get(e.data)[0]!==t?void setTimeout(function(t){return function(){return t.frameFinished(e,!0)}}(this),0):(n=this.freeWorkers.shift(),r=this.getTask(e),this.log("starting frame "+(r.index+1)+" of "+this.frames.length),this.activeWorkers.push(n),n.postMessage(r))},t.prototype.getContextData=function(e){return e.getImageData(0,0,this.options.width,this.options.height).data},t.prototype.getImageData=function(e){var t;return null==this._canvas&&(this._canvas=document.createElement("canvas"),this._canvas.width=this.options.width,this._canvas.height=this.options.height),(t=this._canvas.getContext("2d")).setFill=this.options.background,t.fillRect(0,0,this.options.width,this.options.height),t.drawImage(e,0,0),this.getContextData(t)},t.prototype.getTask=function(e){var t,r;if(r={index:t=this.frames.indexOf(e),last:t===this.frames.length-1,delay:e.delay,transparent:e.transparent,width:this.options.width,height:this.options.height,quality:this.options.quality,dither:this.options.dither,globalPalette:this.options.globalPalette,repeat:this.options.repeat,canTransfer:!0},null!=e.data)r.data=e.data;else if(null!=e.context)r.data=this.getContextData(e.context);else{if(null==e.image)throw new Error("Invalid frame");r.data=this.getImageData(e.image)}return r},t.prototype.log=function(e){if(this.options.debug)return console.log(e)},t}(n),e.exports=s},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function s(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,a,i,l,p;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(o(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),r.apply(this,i)}else if(s(r))for(i=Array.prototype.slice.call(arguments,1),a=(p=r.slice()).length,l=0;l0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),s||(s=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var s=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,o,a,i;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(r=this._events[e]).length,o=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(i=a;i-- >0;)if(r[i]===t||r[i].listener&&r[i].listener===t){o=i;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){var r,n,s,o,a;a=navigator.userAgent.toLowerCase(),o=navigator.platform.toLowerCase(),s="ie"===(r=a.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,"unknown",0])[1]&&document.documentMode,(n={name:"version"===r[1]?r[3]:r[1],version:s||parseFloat("opera"===r[1]&&r[4]?r[4]:r[2]),platform:{name:a.match(/ip(?:ad|od|hone)/)?"ios":(a.match(/(?:webos|android)/)||o.match(/mac|win|linux/)||["other"])[0]}})[n.name]=!0,n[n.name+parseInt(n.version,10)]=!0,n.platform[n.platform.name]=!0,e.exports=n}])},772:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,s){for(var o,a,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l{"use strict";var n=r(8565);function s(){}function o(){}o.resetWarningCache=s,e.exports=function(){function e(e,t,r,s,o,a){if(a!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:s};return r.PropTypes=r,r}},764:(e,t,r)=>{e.exports=r(878)()},8565:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},315:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var s={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(s,a,i):s[a]=e[a]}return s.default=e,r&&r.set(e,s),s}(r(7460)),o=i(r(764)),a=i(r(1122));function i(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(l,e);var t,r,o,i=(r=l,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(r);if(o){var s=d(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}(this,e)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),h(c(t=i.call(this,e)),"handleKeyNavigation",(function(e){if(!1!==t.state.isVisible)switch(e.keyCode){case 37:case 27:e.preventDefault(),t.hideMenu(e);break;case 38:e.preventDefault(),t.selectChildren(!0);break;case 40:e.preventDefault(),t.selectChildren(!1);break;case 39:t.tryToOpenSubMenu(e);break;case 13:e.preventDefault(),t.tryToOpenSubMenu(e);var r=t.seletedItemRef&&t.seletedItemRef.props&&t.seletedItemRef.props.disabled;t.seletedItemRef&&t.seletedItemRef.ref instanceof HTMLElement&&!r?t.seletedItemRef.ref.click():t.hideMenu(e)}})),h(c(t),"handleForceClose",(function(){t.setState({forceSubMenuOpen:!1})})),h(c(t),"tryToOpenSubMenu",(function(e){t.state.selectedItem&&t.state.selectedItem.type===t.getSubMenuType()&&(e.preventDefault(),t.setState({forceSubMenuOpen:!0}))})),h(c(t),"selectChildren",(function(e){var r=t.state.selectedItem,n=[],o=0,i={};if(s.default.Children.forEach(t.props.children,(function e(r,l){r&&([a.default,t.getSubMenuType()].indexOf(r.type)<0?s.default.Children.forEach(r.props.children,e):r.props.divider||(r.props.disabled&&(++o,i[l]=!0),n.push(r)))})),o!==n.length){var l=function(t){var r=t;do{e?--r:++r,r<0?r=n.length-1:r>=n.length&&(r=0)}while(r!==t&&i[r]);return r===t?null:r}(n.indexOf(r));null!==l&&t.setState({selectedItem:n[l],forceSubMenuOpen:!1})}})),h(c(t),"onChildMouseMove",(function(e){t.state.selectedItem!==e&&t.setState({selectedItem:e,forceSubMenuOpen:!1})})),h(c(t),"onChildMouseLeave",(function(){t.setState({selectedItem:null,forceSubMenuOpen:!1})})),h(c(t),"renderChildren",(function(e){return s.default.Children.map(e,(function(e){var r={};return s.default.isValidElement(e)?[a.default,t.getSubMenuType()].indexOf(e.type)<0?(r.children=t.renderChildren(e.props.children),s.default.cloneElement(e,r)):(r.onMouseLeave=t.onChildMouseLeave.bind(c(t)),e.type===t.getSubMenuType()&&(r.forceOpen=t.state.forceSubMenuOpen&&t.state.selectedItem===e,r.forceClose=t.handleForceClose,r.parentKeyNavigationHandler=t.handleKeyNavigation),e.props.divider||t.state.selectedItem!==e?(r.onMouseMove=function(){return t.onChildMouseMove(e)},s.default.cloneElement(e,r)):(r.selected=!0,r.ref=function(e){t.seletedItemRef=e},s.default.cloneElement(e,r))):e}))})),t.seletedItemRef=null,t.state={selectedItem:null,forceSubMenuOpen:!1},t}return t=l,Object.defineProperty(t,"prototype",{writable:!1}),t}(s.Component);t.default=u,h(u,"propTypes",{children:o.default.node.isRequired})},6824:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=u(r(7460)),o=u(r(764)),a=u(r(3368)),i=u(r(772)),l=u(r(9225)),p=u(r(315)),c=u(r(2349)),d=r(5451),h=r(3645);function u(e){return e&&e.__esModule?e:{default:e}}function b(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n={top:r,left:e};if(!t.menu)return n;var s=window,o=s.innerWidth,a=s.innerHeight,i=t.menu.getBoundingClientRect();return r+i.height>a&&(n.top-=i.height),e+i.width>o&&(n.left-=i.width),n.top<0&&(n.top=i.height0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n={top:r,left:e};if(!t.menu)return n;var s=window,o=s.innerWidth,a=s.innerHeight,i=t.menu.getBoundingClientRect();return n.left=e-i.width,r+i.height>a&&(n.top-=i.height),n.left<0&&(n.left+=i.width),n.top<0&&(n.top=i.heighto&&(n.left=i.width{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var s={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(s,a,i):s[a]=e[a]}return s.default=e,r&&r.set(e,s),s}(r(7460)),o=c(r(764)),a=c(r(3368)),i=c(r(772)),l=r(5451),p=r(3645);function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function h(e,t){for(var r=0;r=0&&0===t.button&&(t.persist(),t.stopPropagation(),e.mouseDownTimeoutId=setTimeout((function(){return e.handleContextClick(t)}),e.props.holdToDisplay)),(0,p.callIfExists)(e.props.attributes.onMouseDown,t)})),m(b(e),"handleMouseUp",(function(t){0===t.button&&clearTimeout(e.mouseDownTimeoutId),(0,p.callIfExists)(e.props.attributes.onMouseUp,t)})),m(b(e),"handleMouseOut",(function(t){0===t.button&&clearTimeout(e.mouseDownTimeoutId),(0,p.callIfExists)(e.props.attributes.onMouseOut,t)})),m(b(e),"handleTouchstart",(function(t){e.touchHandled=!1,e.props.holdToDisplay>=0&&(t.persist(),t.stopPropagation(),e.touchstartTimeoutId=setTimeout((function(){e.handleContextClick(t),e.touchHandled=!0}),e.props.holdToDisplay)),(0,p.callIfExists)(e.props.attributes.onTouchStart,t)})),m(b(e),"handleTouchEnd",(function(t){e.touchHandled&&t.preventDefault(),clearTimeout(e.touchstartTimeoutId),(0,p.callIfExists)(e.props.attributes.onTouchEnd,t)})),m(b(e),"handleContextMenu",(function(t){t.button===e.props.mouseButton&&e.handleContextClick(t),(0,p.callIfExists)(e.props.attributes.onContextMenu,t)})),m(b(e),"handleMouseClick",(function(t){t.button===e.props.mouseButton&&e.handleContextClick(t),(0,p.callIfExists)(e.props.attributes.onClick,t)})),m(b(e),"handleContextClick",(function(t){if(!(e.props.disable||e.props.disableIfShiftIsPressed&&t.shiftKey)){t.preventDefault(),t.stopPropagation();var r=t.clientX||t.touches&&t.touches[0].pageX,n=t.clientY||t.touches&&t.touches[0].pageY;e.props.posX&&(r-=e.props.posX),e.props.posY&&(n-=e.props.posY),(0,l.hideMenu)();var s=(0,p.callIfExists)(e.props.collect,e.props),o={position:{x:r,y:n},target:e.elem,id:e.props.id};s&&"function"==typeof s.then?s.then((function(e){o.data=(0,i.default)({},e,{target:t.target}),(0,l.showMenu)(o)})):(o.data=(0,i.default)({},s,{target:t.target}),(0,l.showMenu)(o))}})),m(b(e),"elemRef",(function(t){e.elem=t})),e}return t=A,(r=[{key:"render",value:function(){var e=this.props,t=e.renderTag,r=e.attributes,n=e.children,o=(0,i.default)({},r,{className:(0,a.default)(p.cssClasses.menuWrapper,r.className),onContextMenu:this.handleContextMenu,onClick:this.handleMouseClick,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchStart:this.handleTouchstart,onTouchEnd:this.handleTouchEnd,onMouseOut:this.handleMouseOut,ref:this.elemRef});return s.default.createElement(t,o,n)}}])&&h(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),A}(s.Component);t.default=A,m(A,"propTypes",{id:o.default.string.isRequired,children:o.default.node.isRequired,attributes:o.default.object,collect:o.default.func,disable:o.default.bool,holdToDisplay:o.default.number,posX:o.default.number,posY:o.default.number,renderTag:o.default.elementType,mouseButton:o.default.number,disableIfShiftIsPressed:o.default.bool}),m(A,"defaultProps",{attributes:{},collect:function(){return null},disable:!1,holdToDisplay:1e3,renderTag:"div",posX:0,posY:0,mouseButton:2,disableIfShiftIsPressed:!1})},1122:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var s={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(s,a,i):s[a]=e[a]}return s.default=e,r&&r.set(e,s),s}(r(7460)),o=c(r(764)),a=c(r(3368)),i=c(r(772)),l=r(5451),p=r(3645);function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function h(){return h=Object.assign||function(e){for(var t=1;t{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=h(r(7460)),o=h(r(764)),a=h(r(3368)),i=h(r(772)),l=r(5451),p=h(r(315)),c=r(3645),d=h(r(9225));function h(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign||function(e){for(var t=1;tn?o.bottom=0:o.top=0,s.righte?n.bottom=0:n.top=0,r.left<0?n.left="100%":n.right="100%",n})),C(m(t),"hideMenu",(function(e){e.preventDefault(),t.hideSubMenu(e)})),C(m(t),"hideSubMenu",(function(e){e.detail&&e.detail.id&&t.menu&&e.detail.id!==t.menu.id||(t.props.forceOpen&&t.props.forceClose(),t.setState({visible:!1,selectedItem:null}),t.unregisterHandlers())})),C(m(t),"handleClick",(function(e){e.preventDefault(),t.props.disabled||((0,c.callIfExists)(t.props.onClick,e,(0,i.default)({},t.props.data,c.store.data),c.store.target),t.props.onClick&&!t.props.preventCloseOnClick&&(0,l.hideMenu)())})),C(m(t),"handleMouseEnter",(function(){t.closetimer&&clearTimeout(t.closetimer),t.props.disabled||t.state.visible||(t.opentimer=setTimeout((function(){return t.setState({visible:!0,selectedItem:null})}),t.props.hoverDelay))})),C(m(t),"handleMouseLeave",(function(){t.opentimer&&clearTimeout(t.opentimer),t.state.visible&&(t.closetimer=setTimeout((function(){return t.setState({visible:!1,selectedItem:null})}),t.props.hoverDelay))})),C(m(t),"menuRef",(function(e){t.menu=e})),C(m(t),"subMenuRef",(function(e){t.subMenu=e})),C(m(t),"registerHandlers",(function(){document.removeEventListener("keydown",t.props.parentKeyNavigationHandler),document.addEventListener("keydown",t.handleKeyNavigation)})),C(m(t),"unregisterHandlers",(function(e){document.removeEventListener("keydown",t.handleKeyNavigation),e||document.addEventListener("keydown",t.props.parentKeyNavigationHandler)})),t.state=(0,i.default)({},t.state,{visible:!1}),t}return t=f,(r=[{key:"componentDidMount",value:function(){this.listenId=d.default.register((function(){}),this.hideSubMenu)}},{key:"getSubMenuType",value:function(){return f}},{key:"shouldComponentUpdate",value:function(e,t){return this.isVisibilityChange=!(this.state.visible===t.visible&&this.props.forceOpen===e.forceOpen||this.state.visible&&e.forceOpen||this.props.forceOpen&&t.visible),!0}},{key:"componentDidUpdate",value:function(){var e=this;this.isVisibilityChange&&(this.props.forceOpen||this.state.visible?(window.requestAnimationFrame||setTimeout)((function(){var t=e.props.rtl?e.getRTLMenuPosition():e.getMenuPosition();e.subMenu.style.removeProperty("top"),e.subMenu.style.removeProperty("bottom"),e.subMenu.style.removeProperty("left"),e.subMenu.style.removeProperty("right"),(0,c.hasOwnProp)(t,"top")&&(e.subMenu.style.top=t.top),(0,c.hasOwnProp)(t,"left")&&(e.subMenu.style.left=t.left),(0,c.hasOwnProp)(t,"bottom")&&(e.subMenu.style.bottom=t.bottom),(0,c.hasOwnProp)(t,"right")&&(e.subMenu.style.right=t.right),e.subMenu.classList.add(c.cssClasses.menuVisible),e.registerHandlers(),e.setState({selectedItem:null})})):(this.subMenu.addEventListener("transitionend",(function t(){e.subMenu.removeEventListener("transitionend",t),e.subMenu.style.removeProperty("bottom"),e.subMenu.style.removeProperty("right"),e.subMenu.style.top=0,e.subMenu.style.left="100%",e.unregisterHandlers()})),this.subMenu.classList.remove(c.cssClasses.menuVisible)))}},{key:"componentWillUnmount",value:function(){this.listenId&&d.default.unregister(this.listenId),this.opentimer&&clearTimeout(this.opentimer),this.closetimer&&clearTimeout(this.closetimer),this.unregisterHandlers(!0)}},{key:"render",value:function(){var e,t=this.props,r=t.children,n=t.attributes,o=t.disabled,i=t.title,l=t.selected,p=this.state.visible,d={ref:this.menuRef,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,className:(0,a.default)(c.cssClasses.menuItem,c.cssClasses.subMenu,n.listClassName),style:{position:"relative"}},h={className:(0,a.default)(c.cssClasses.menuItem,n.className,(e={},C(e,(0,a.default)(c.cssClasses.menuItemDisabled,n.disabledClassName),o),C(e,(0,a.default)(c.cssClasses.menuItemActive,n.visibleClassName),p),C(e,(0,a.default)(c.cssClasses.menuItemSelected,n.selectedClassName),l),e)),onMouseMove:this.props.onMouseMove,onMouseOut:this.props.onMouseOut,onClick:this.handleClick},b={ref:this.subMenuRef,style:{position:"absolute",transition:"opacity 1ms",top:0,left:"100%"},className:(0,a.default)(c.cssClasses.menu,this.props.className)};return s.default.createElement("nav",u({},d,{role:"menuitem",tabIndex:"-1","aria-haspopup":"true"}),s.default.createElement("div",u({},n,h),i),s.default.createElement("nav",u({},b,{role:"menu",tabIndex:"-1"}),this.renderChildren(r)))}}])&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(p.default);t.default=f,C(f,"propTypes",{children:o.default.node.isRequired,attributes:o.default.object,title:o.default.node.isRequired,className:o.default.string,disabled:o.default.bool,hoverDelay:o.default.number,rtl:o.default.bool,selected:o.default.bool,onMouseMove:o.default.func,onMouseOut:o.default.func,forceOpen:o.default.bool,forceClose:o.default.func,parentKeyNavigationHandler:o.default.func}),C(f,"defaultProps",{disabled:!1,hoverDelay:500,attributes:{},className:"",rtl:!1,selected:!1,onMouseMove:function(){return null},onMouseOut:function(){return null},forceOpen:!1,forceClose:function(){return null},parentKeyNavigationHandler:function(){return null}})},5451:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MENU_SHOW=t.MENU_HIDE=void 0,t.dispatchGlobalEvent=l,t.hideMenu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;l(i,(0,s.default)({},e,{type:i}),t)},t.showMenu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;l(a,(0,s.default)({},e,{type:a}),t)};var n,s=(n=r(772))&&n.__esModule?n:{default:n},o=r(3645),a="REACT_CONTEXTMENU_SHOW";t.MENU_SHOW=a;var i="REACT_CONTEXTMENU_HIDE";function l(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;"function"==typeof window.CustomEvent?r=new window.CustomEvent(e,{detail:t}):(r=document.createEvent("CustomEvent")).initCustomEvent(e,!1,!0,t),n&&(n.dispatchEvent(r),(0,s.default)(o.store,t))}t.MENU_HIDE=i},857:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){return function(r){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(C,r);var o,i,l,g,m=(o=C,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=u(o);if(i){var r=u(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}(this,e)});function C(t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,C),b(h(r=m.call(this,t)),"handleShow",(function(t){if(t.detail.id===e){var n=t.detail.data,s={};for(var o in n)A.includes(o)||(s[o]=n[o]);r.setState({trigger:s})}})),b(h(r),"handleHide",(function(){r.setState({trigger:null})})),r.state={trigger:null},r}return l=C,(g=[{key:"componentDidMount",value:function(){this.listenId=a.default.register(this.handleShow,this.handleHide)}},{key:"componentWillUnmount",value:function(){this.listenId&&a.default.unregister(this.listenId)}},{key:"render",value:function(){return s.default.createElement(t,p({},this.props,{id:e,trigger:this.state.trigger}))}}])&&c(l.prototype,g),Object.defineProperty(l,"prototype",{writable:!1}),C}(s.Component)}};var s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var s={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(s,a,i):s[a]=e[a]}return s.default=e,r&&r.set(e,s),s}(r(7460)),o=i(r(774)),a=i(r(9225));function i(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}function p(){return p=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(5451),s=r(3645);function o(e,t){for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callIfExists=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{"use strict";Object.defineProperty(t,"tz",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Rc",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"Dr",{enumerable:!0,get:function(){return o.default}});var n=a(r(6824)),s=a(r(774)),o=a(r(1122));a(r(2349)),a(r(857)),r(5451);function a(e){return e&&e.__esModule?e:{default:e}}},3903:(e,t,r)=>{"use strict";var n=r(7460),s=r(772),o=r(9798);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r