lexgui 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  var LX = {
9
- version: "0.6.1",
9
+ version: "0.6.3",
10
10
  ready: false,
11
11
  components: [], // Specific pre-build components
12
12
  signals: {}, // Events and triggers
@@ -718,7 +718,7 @@ function makeCodeSnippet( code, size, options = { } )
718
718
  }
719
719
  else if( l.constructor == Array ) // It's a range
720
720
  {
721
- for( let i = ( l[0] - 1 ); i <= ( l[1] - 1 ); i++ )
721
+ for( let i = ( l[ 0 ] - 1 ); i <= ( l[ 1 ] - 1 ); i++ )
722
722
  {
723
723
  code.childNodes[ i ].classList.add( "added" );
724
724
  }
@@ -737,7 +737,7 @@ function makeCodeSnippet( code, size, options = { } )
737
737
  }
738
738
  else if( l.constructor == Array ) // It's a range
739
739
  {
740
- for( let i = ( l[0] - 1 ); i <= ( l[1] - 1 ); i++ )
740
+ for( let i = ( l[ 0 ] - 1 ); i <= ( l[ 1 ] - 1 ); i++ )
741
741
  {
742
742
  code.childNodes[ i ].classList.add( "removed" );
743
743
  }
@@ -857,6 +857,7 @@ function makeIcon( iconName, options = { } )
857
857
 
858
858
  // Resolve variant
859
859
  const requestedVariant = options.variant ?? "regular";
860
+ data = ( ( requestedVariant == "solid" ) ? LX.ICONS[ `${ iconName }@solid` ] : data ) ?? data;
860
861
  const variant = data[ 3 ];
861
862
 
862
863
  // Create internal icon if variant is the same as requested, there's no lucide/fallback data or if variant is "regular" (default)
@@ -1018,6 +1019,9 @@ class vec2 {
1018
1019
  nrm ( v0 = new vec2() ) { v0.set( this.x, this.y ); return v0.mul( 1.0 / this.len(), v0 ); }
1019
1020
  dst ( v ) { return v.sub( this ).len(); }
1020
1021
  clp ( min, max, v0 = new vec2() ) { v0.set( clamp( this.x, min, max ), clamp( this.y, min, max ) ); return v0; }
1022
+
1023
+ fromArray ( array ) { this.x = array[ 0 ]; this.y = array[ 1 ]; }
1024
+ toArray () { return this.xy }
1021
1025
  };
1022
1026
 
1023
1027
  LX.vec2 = vec2;
@@ -1501,9 +1505,12 @@ async function init( options = { } )
1501
1505
  this.main_area = new Area( { id: options.id ?? 'mainarea' } );
1502
1506
  }
1503
1507
 
1504
- if( ( options.autoTheme ?? true ) && window.matchMedia && window.matchMedia( "(prefers-color-scheme: light)" ).matches )
1508
+ if( ( options.autoTheme ?? true ) )
1505
1509
  {
1506
- LX.setTheme( "light" );
1510
+ if( window.matchMedia && window.matchMedia( "(prefers-color-scheme: light)" ).matches )
1511
+ {
1512
+ LX.setTheme( "light" );
1513
+ }
1507
1514
 
1508
1515
  window.matchMedia( "(prefers-color-scheme: dark)" ).addEventListener( "change", event => {
1509
1516
  LX.setTheme( event.matches ? "dark" : "light" );
@@ -1916,13 +1923,10 @@ function asTooltip( trigger, content, options = {} )
1916
1923
  } );
1917
1924
 
1918
1925
  trigger.addEventListener( "mouseleave", function(e) {
1919
- if( !tooltipDom ) return;
1920
-
1921
- tooltipDom.dataset[ "closed" ] = true;
1922
-
1923
- doAsync( () => {
1926
+ if( tooltipDom )
1927
+ {
1924
1928
  tooltipDom.remove();
1925
- }, 300 )
1929
+ }
1926
1930
  } )
1927
1931
  }
1928
1932
 
@@ -2996,7 +3000,7 @@ class Calendar {
2996
3000
 
2997
3001
  constructor( dateString, options = {} ) {
2998
3002
 
2999
- this.root = LX.makeContainer( ["256px", "auto"], "border p-3 bg-primary rounded-lg text-md" );
3003
+ this.root = LX.makeContainer( ["256px", "auto"], "p-1 text-md" );
3000
3004
 
3001
3005
  this.onChange = options.onChange;
3002
3006
  this.untilToday = options.untilToday;
@@ -4025,7 +4029,7 @@ class Area {
4025
4029
  {
4026
4030
  for( let i = 0; i < float.length; i++ )
4027
4031
  {
4028
- const t = float[i];
4032
+ const t = float[ i ];
4029
4033
  switch( t )
4030
4034
  {
4031
4035
  case 'h': break;
@@ -5656,8 +5660,9 @@ class Widget {
5656
5660
  static TABLE = 34;
5657
5661
  static TABS = 35;
5658
5662
  static DATE = 36;
5659
- static LABEL = 37;
5660
- static BLANK = 38;
5663
+ static MAP2D = 37;
5664
+ static LABEL = 38;
5665
+ static BLANK = 39;
5661
5666
 
5662
5667
  static NO_CONTEXT_TYPES = [
5663
5668
  Widget.BUTTON,
@@ -5780,8 +5785,17 @@ class Widget {
5780
5785
  }
5781
5786
 
5782
5787
  _canPaste() {
5783
- return this.type === Widget.CUSTOM ? navigator.clipboard.customIdx !== undefined && this.customIdx == navigator.clipboard.customIdx :
5784
- navigator.clipboard.type === this.type;
5788
+ let pasteAllowed = this.type === Widget.CUSTOM ?
5789
+ ( navigator.clipboard.customIdx !== undefined && this.customIdx == navigator.clipboard.customIdx ) : navigator.clipboard.type === this.type;
5790
+
5791
+ pasteAllowed &= ( this.disabled !== true );
5792
+
5793
+ if( this.onAllowPaste )
5794
+ {
5795
+ pasteAllowed = this.onAllowPaste( pasteAllowed );
5796
+ }
5797
+
5798
+ return pasteAllowed;
5785
5799
  }
5786
5800
 
5787
5801
  _trigger( event, callback, scope = this ) {
@@ -5818,7 +5832,7 @@ class Widget {
5818
5832
  if (a == null || b == null) return false;
5819
5833
  if (a.length !== b.length) return false;
5820
5834
  for (var i = 0; i < a.length; ++i) {
5821
- if (a[i] !== b[i]) return false;
5835
+ if (a[ i ] !== b[ i ]) return false;
5822
5836
  }
5823
5837
  return true;
5824
5838
  })( value, this._initialValue ) : ( value == this._initialValue );
@@ -5893,6 +5907,7 @@ class Widget {
5893
5907
  case Widget.TABLE: return "Table";
5894
5908
  case Widget.TABS: return "Tabs";
5895
5909
  case Widget.DATE: return "Date";
5910
+ case Widget.MAP2D: return "Map2D";
5896
5911
  case Widget.LABEL: return "Label";
5897
5912
  case Widget.BLANK: return "Blank";
5898
5913
  case Widget.CUSTOM: return this.customName;
@@ -6098,12 +6113,14 @@ class NodeTree {
6098
6113
  const nodeFilterInput = this.domEl.querySelector( ".lexnodetreefilter" );
6099
6114
 
6100
6115
  node.children = node.children ?? [];
6116
+
6101
6117
  if( nodeFilterInput && nodeFilterInput.value != "" && !node.id.includes( nodeFilterInput.value ) )
6102
6118
  {
6103
6119
  for( var i = 0; i < node.children.length; ++i )
6104
6120
  {
6105
6121
  this._createItem( node, node.children[ i ], level + 1, selectedId );
6106
6122
  }
6123
+
6107
6124
  return;
6108
6125
  }
6109
6126
 
@@ -6448,7 +6465,7 @@ class NodeTree {
6448
6465
 
6449
6466
  const index = dragged.parent.children.findIndex(n => n.id == dragged.id);
6450
6467
  const removed = dragged.parent.children.splice(index, 1);
6451
- target.children.push( removed[0] );
6468
+ target.children.push( removed[ 0 ] );
6452
6469
  that.refresh();
6453
6470
  delete window.__tree_node_dragged;
6454
6471
  });
@@ -6528,13 +6545,14 @@ class NodeTree {
6528
6545
  inputContainer.appendChild( visibilityBtn.root );
6529
6546
  }
6530
6547
 
6531
- const _hasChild = function( parent, id ) {
6532
- if( !parent.length ) return;
6533
- for( var c of parent.children )
6548
+ const _hasChild = function( node, id ) {
6549
+ if( node.id == id ) return true;
6550
+ let found = false;
6551
+ for( var c of ( node?.children ?? [] ) )
6534
6552
  {
6535
- if( c.id == id ) return true;
6536
- return _hasChild( c, id );
6553
+ found |= _hasChild( c, id );
6537
6554
  }
6555
+ return found;
6538
6556
  };
6539
6557
 
6540
6558
  const exists = _hasChild( node, selectedId );
@@ -6561,6 +6579,7 @@ class NodeTree {
6561
6579
 
6562
6580
  this.data = newData ?? this.data;
6563
6581
  this.domEl.querySelector( "ul" ).innerHTML = "";
6582
+
6564
6583
  if( this.data.constructor === Object )
6565
6584
  {
6566
6585
  this._createItem( null, this.data, 0, selectedId );
@@ -6590,15 +6609,14 @@ class NodeTree {
6590
6609
  this.refresh( null, id );
6591
6610
 
6592
6611
  this.domEl.querySelectorAll( ".selected" ).forEach( i => i.classList.remove( "selected" ) );
6593
- this.selected.length = 0;
6594
6612
 
6595
- var el = this.domEl.querySelector( "#" + id );
6596
- if( el )
6597
- {
6598
- el.classList.add( "selected" );
6599
- this.selected = [ el.treeData ];
6600
- el.focus();
6601
- }
6613
+ // Element should exist, since tree was refreshed to show it
6614
+ const el = this.domEl.querySelector( "#" + id );
6615
+ console.assert( el, "NodeTree: Can't select node " + id );
6616
+
6617
+ el.classList.add( "selected" );
6618
+ this.selected = [ el.treeData ];
6619
+ el.focus();
6602
6620
  }
6603
6621
  }
6604
6622
 
@@ -6636,7 +6654,7 @@ class Title extends Widget {
6636
6654
  // Note: Titles are not registered in Panel.widgets by now
6637
6655
  super( Widget.TITLE, null, null, options );
6638
6656
 
6639
- this.root.className = "lextitle";
6657
+ this.root.className = `lextitle ${ this.root.className }`;
6640
6658
 
6641
6659
  if( options.icon )
6642
6660
  {
@@ -6859,8 +6877,16 @@ class TextArea extends Widget {
6859
6877
 
6860
6878
  container.appendChild( wValue );
6861
6879
 
6862
- if( options.disabled ?? false ) wValue.setAttribute( "disabled", true );
6863
- if( options.placeholder ) wValue.setAttribute( "placeholder", options.placeholder );
6880
+ if( options.disabled ?? false )
6881
+ {
6882
+ this.disabled = true;
6883
+ wValue.setAttribute( "disabled", true );
6884
+ }
6885
+
6886
+ if( options.placeholder )
6887
+ {
6888
+ wValue.setAttribute( "placeholder", options.placeholder );
6889
+ }
6864
6890
 
6865
6891
  const trigger = options.trigger ?? "default";
6866
6892
 
@@ -6950,7 +6976,7 @@ class Button extends Widget {
6950
6976
 
6951
6977
  var wValue = document.createElement( 'button' );
6952
6978
  wValue.title = options.tooltip ? "" : ( options.title ?? "" );
6953
- wValue.className = "lexbutton " + ( options.buttonClass ?? "" );
6979
+ wValue.className = "lexbutton p-1 " + ( options.buttonClass ?? "" );
6954
6980
 
6955
6981
  this.root.appendChild( wValue );
6956
6982
 
@@ -6978,6 +7004,7 @@ class Button extends Widget {
6978
7004
 
6979
7005
  if( options.disabled )
6980
7006
  {
7007
+ this.disabled = true;
6981
7008
  wValue.setAttribute( "disabled", true );
6982
7009
  }
6983
7010
 
@@ -7574,7 +7601,7 @@ class Select extends Widget {
7574
7601
  this.unfocus_event = true;
7575
7602
  setTimeout( () => delete this.unfocus_event, 200 );
7576
7603
  }
7577
- else if ( e.relatedTarget && ( e.relatedTarget.tagName == "INPUT" || e.relatedTarget.classList.contains("lexoptions") ) )
7604
+ else if ( e.relatedTarget && listDialog.contains( e.relatedTarget ) )
7578
7605
  {
7579
7606
  return;
7580
7607
  }
@@ -8206,7 +8233,7 @@ class Tags extends Widget {
8206
8233
 
8207
8234
  for( let i = 0; i < value.length; ++i )
8208
8235
  {
8209
- const tagName = value[i];
8236
+ const tagName = value[ i ];
8210
8237
  const tag = document.createElement('span');
8211
8238
  tag.className = "lextag";
8212
8239
  tag.innerHTML = tagName;
@@ -8470,7 +8497,7 @@ class RadioGroup extends Widget {
8470
8497
  container.appendChild( optionItem );
8471
8498
 
8472
8499
  const optionButton = document.createElement( 'button' );
8473
- optionButton.className = "lexbutton";
8500
+ optionButton.className = "flex p-0 rounded-lg cursor-pointer";
8474
8501
  optionButton.disabled = options.disabled ?? false;
8475
8502
  optionItem.appendChild( optionButton );
8476
8503
 
@@ -8773,7 +8800,7 @@ class NumberInput extends Widget {
8773
8800
  box.className = "numberbox";
8774
8801
  container.appendChild( box );
8775
8802
 
8776
- let valueBox = LX.makeContainer( [ "auto", "100%" ], "relative flex flex-row", "", box );
8803
+ let valueBox = LX.makeContainer( [ "auto", "100%" ], "relative flex flex-row cursor-text", "", box );
8777
8804
 
8778
8805
  let vecinput = document.createElement( 'input' );
8779
8806
  vecinput.id = "number_" + simple_guidGenerator();
@@ -8803,7 +8830,7 @@ class NumberInput extends Widget {
8803
8830
 
8804
8831
  if( options.disabled )
8805
8832
  {
8806
- vecinput.disabled = true;
8833
+ this.disabled = vecinput.disabled = true;
8807
8834
  }
8808
8835
 
8809
8836
  // Add slider below
@@ -8876,7 +8903,7 @@ class NumberInput extends Widget {
8876
8903
 
8877
8904
  let innerMouseDown = e => {
8878
8905
 
8879
- if( document.activeElement == vecinput )
8906
+ if( ( document.activeElement == vecinput ) || ( e.button != LX.MOUSE_LEFT_CLICK ) )
8880
8907
  {
8881
8908
  return;
8882
8909
  }
@@ -8891,7 +8918,7 @@ class NumberInput extends Widget {
8891
8918
 
8892
8919
  if( !document.pointerLockElement )
8893
8920
  {
8894
- vecinput.requestPointerLock();
8921
+ valueBox.requestPointerLock();
8895
8922
  }
8896
8923
 
8897
8924
  if( options.onPress )
@@ -8936,7 +8963,7 @@ class NumberInput extends Widget {
8936
8963
  }
8937
8964
  }
8938
8965
 
8939
- vecinput.addEventListener( "mousedown", innerMouseDown );
8966
+ valueBox.addEventListener( "mousedown", innerMouseDown );
8940
8967
 
8941
8968
  doAsync( this.onResize.bind( this ) );
8942
8969
  }
@@ -8959,7 +8986,7 @@ class Vector extends Widget {
8959
8986
  super( Widget.VECTOR, name, [].concat( value ), options );
8960
8987
 
8961
8988
  this.onGetValue = () => {
8962
- let inputs = this.root.querySelectorAll( "input" );
8989
+ let inputs = this.root.querySelectorAll( "input[type='number']" );
8963
8990
  let value = [];
8964
8991
  for( var v of inputs )
8965
8992
  {
@@ -9001,6 +9028,7 @@ class Vector extends Widget {
9001
9028
  container.className = "lexvector";
9002
9029
  this.root.appendChild( container );
9003
9030
 
9031
+ this.disabled = ( options.disabled ?? false );
9004
9032
  const that = this;
9005
9033
 
9006
9034
  for( let i = 0; i < numComponents; ++i )
@@ -9031,7 +9059,7 @@ class Vector extends Widget {
9031
9059
  const dragIcon = LX.makeIcon( "MoveVertical", { iconClass: "drag-icon hidden-opacity", svgClass: "sm" } );
9032
9060
  box.appendChild( dragIcon );
9033
9061
 
9034
- if( options.disabled )
9062
+ if( this.disabled )
9035
9063
  {
9036
9064
  vecinput.disabled = true;
9037
9065
  }
@@ -9091,7 +9119,7 @@ class Vector extends Widget {
9091
9119
 
9092
9120
  function innerMouseDown( e )
9093
9121
  {
9094
- if( document.activeElement == vecinput )
9122
+ if( ( document.activeElement == vecinput ) || ( e.button != LX.MOUSE_LEFT_CLICK ) )
9095
9123
  {
9096
9124
  return;
9097
9125
  }
@@ -9106,7 +9134,7 @@ class Vector extends Widget {
9106
9134
 
9107
9135
  if( !document.pointerLockElement )
9108
9136
  {
9109
- vecinput.requestPointerLock();
9137
+ box.requestPointerLock();
9110
9138
  }
9111
9139
 
9112
9140
  if( options.onPress )
@@ -9163,7 +9191,7 @@ class Vector extends Widget {
9163
9191
  }
9164
9192
  }
9165
9193
 
9166
- vecinput.addEventListener( "mousedown", innerMouseDown );
9194
+ box.addEventListener( "mousedown", innerMouseDown );
9167
9195
  container.appendChild( box );
9168
9196
  }
9169
9197
 
@@ -10096,35 +10124,91 @@ class Table extends Widget {
10096
10124
  if( this.customFilters )
10097
10125
  {
10098
10126
  const icon = LX.makeIcon( "CirclePlus", { svgClass: "sm" } );
10127
+ const separatorHtml = `<div class="lexcontainer border-right self-center mx-1" style="width: 1px; height: 70%;"></div>`;
10099
10128
 
10100
10129
  for( let f of this.customFilters )
10101
10130
  {
10102
- const customFilterBtn = new Button(null, icon.innerHTML + f.name, ( v ) => {
10131
+ f.widget = new Button(null, icon.innerHTML + f.name, ( v ) => {
10132
+
10133
+ const spanName = f.widget.root.querySelector( "span" );
10103
10134
 
10104
- const menuOptions = f.options.map( ( colName, idx ) => {
10105
- const item = {
10106
- name: colName,
10107
- checked: !!this.activeCustomFilters[ colName ],
10108
- callback: (key, v, dom) => {
10109
- if( v ) { this.activeCustomFilters[ key ] = f.name; }
10110
- else {
10111
- delete this.activeCustomFilters[ key ];
10135
+ if( f.options )
10136
+ {
10137
+ const menuOptions = f.options.map( ( colName, idx ) => {
10138
+ const item = {
10139
+ name: colName,
10140
+ checked: !!this.activeCustomFilters[ colName ],
10141
+ callback: (key, v, dom) => {
10142
+ if( v ) { this.activeCustomFilters[ key ] = f.name; }
10143
+ else {
10144
+ delete this.activeCustomFilters[ key ];
10145
+ }
10146
+ const activeFilters = Object.keys( this.activeCustomFilters ).filter( k => this.activeCustomFilters[ k ] == f.name );
10147
+ const filterBadgesHtml = activeFilters.reduce( ( acc, key ) => acc += LX.badge( key, "bg-tertiary fg-secondary text-sm border-0" ), "" );
10148
+ spanName.innerHTML = icon.innerHTML + f.name + ( activeFilters.length ? separatorHtml : "" ) + filterBadgesHtml;
10149
+ this.refresh();
10112
10150
  }
10113
- this.refresh();
10114
10151
  }
10152
+ return item;
10153
+ } );
10154
+ new DropdownMenu( f.widget.root, menuOptions, { side: "bottom", align: "start" });
10155
+ }
10156
+ else if( f.type == "range" )
10157
+ {
10158
+ console.assert( f.min != undefined && f.max != undefined, "Range filter needs min and max values!" );
10159
+ const container = LX.makeContainer( ["240px", "auto"], "text-md" );
10160
+ const panel = new Panel();
10161
+ LX.makeContainer( ["100%", "auto"], "px-3 p-2 pb-0 text-md font-medium", f.name, container );
10162
+
10163
+ f.start = f.start ?? f.min;
10164
+ f.end = f.end ?? f.max;
10165
+
10166
+ panel.refresh = () => {
10167
+ panel.clear();
10168
+ panel.sameLine( 2, "justify-center" );
10169
+ panel.addNumber( null, f.start, (v) => {
10170
+ f.start = v;
10171
+ const inUse = ( f.start != f.min || f.end != f.max );
10172
+ spanName.innerHTML = icon.innerHTML + f.name + ( inUse ? separatorHtml + LX.badge( `${ f.start } - ${ f.end } ${ f.units ?? "" }`, "bg-tertiary fg-secondary text-sm border-0" ) : "" );
10173
+ this.refresh();
10174
+ }, { skipSlider: true, min: f.min, max: f.max, step: f.step, units: f.units } );
10175
+ panel.addNumber( null, f.end, (v) => {
10176
+ f.end = v;
10177
+ const inUse = ( f.start != f.min || f.end != f.max );
10178
+ spanName.innerHTML = icon.innerHTML + f.name + ( inUse ? separatorHtml + LX.badge( `${ f.start } - ${ f.end } ${ f.units ?? "" }`, "bg-tertiary fg-secondary text-sm border-0" ) : "" );
10179
+ this.refresh();
10180
+ }, { skipSlider: true, min: f.min, max: f.max, step: f.step, units: f.units } );
10181
+ panel.addButton( null, "Reset", () => {
10182
+ f.start = f.min;
10183
+ f.end = f.max;
10184
+ spanName.innerHTML = icon.innerHTML + f.name;
10185
+ panel.refresh();
10186
+ this.refresh();
10187
+ }, { buttonClass: "contrast" } );
10115
10188
  }
10116
- return item;
10117
- } );
10118
- new DropdownMenu( customFilterBtn.root, menuOptions, { side: "bottom", align: "start" });
10119
- }, { buttonClass: " primary dashed" } );
10120
- headerContainer.appendChild( customFilterBtn.root );
10189
+ panel.refresh();
10190
+ container.appendChild( panel.root );
10191
+ new Popover( f.widget.root, [ container ], { side: "bottom" } );
10192
+ }
10193
+
10194
+ }, { buttonClass: "px-2 primary dashed" } );
10195
+ headerContainer.appendChild( f.widget.root );
10121
10196
  }
10122
10197
 
10123
10198
  this._resetCustomFiltersBtn = new Button(null, "resetButton", ( v ) => {
10124
10199
  this.activeCustomFilters = {};
10125
- this.refresh();
10126
10200
  this._resetCustomFiltersBtn.root.classList.add( "hidden" );
10127
- }, { title: "Reset filters", icon: "X" } );
10201
+ for( let f of this.customFilters )
10202
+ {
10203
+ f.widget.root.querySelector( "span" ).innerHTML = ( icon.innerHTML + f.name );
10204
+ if( f.type == "range" )
10205
+ {
10206
+ f.start = f.min;
10207
+ f.end = f.max;
10208
+ }
10209
+ }
10210
+ this.refresh();
10211
+ }, { title: "Reset filters", tooltip: true, icon: "X" } );
10128
10212
  headerContainer.appendChild( this._resetCustomFiltersBtn.root );
10129
10213
  this._resetCustomFiltersBtn.root.classList.add( "hidden" );
10130
10214
  }
@@ -10272,7 +10356,7 @@ class Table extends Widget {
10272
10356
  let movePending = null;
10273
10357
 
10274
10358
  document.addEventListener( 'mouseup', (e) => {
10275
- if( !rIdx ) return;
10359
+ if( rIdx === null ) return;
10276
10360
  document.removeEventListener( "mousemove", onMove );
10277
10361
  const fromRow = table.rows[ rIdx ];
10278
10362
  fromRow.dY = 0;
@@ -10286,14 +10370,33 @@ class Table extends Widget {
10286
10370
  if( movePending )
10287
10371
  {
10288
10372
  // Modify inner data first
10373
+ // Origin row should go to the target row, and the rest should be moved up/down
10289
10374
  const fromIdx = rIdx - 1;
10290
10375
  const targetIdx = movePending[ 1 ] - 1;
10291
- var b = data.body[fromIdx];
10292
- data.body[fromIdx] = data.body[targetIdx];
10376
+ const b = data.body[ fromIdx ];
10377
+ let targetOffset = 0;
10378
+
10379
+ if( fromIdx == targetIdx ) return;
10380
+ if( fromIdx > targetIdx ) // Move up
10381
+ {
10382
+ for( let i = fromIdx; i > targetIdx; --i )
10383
+ {
10384
+ data.body[ i ] = data.body[ i - 1 ];
10385
+ }
10386
+ }
10387
+ else // Move down
10388
+ {
10389
+ targetOffset = 1;
10390
+ for( let i = fromIdx; i < targetIdx; ++i )
10391
+ {
10392
+ data.body[ i ] = data.body[ i + 1 ];
10393
+ }
10394
+ }
10395
+
10293
10396
  data.body[targetIdx] = b;
10294
10397
 
10295
10398
  const parent = movePending[ 0 ].parentNode;
10296
- parent.insertChildAtIndex( movePending[ 0 ], movePending[ 1 ] );
10399
+ parent.insertChildAtIndex( movePending[ 0 ], targetIdx + targetOffset );
10297
10400
  movePending = null;
10298
10401
  }
10299
10402
 
@@ -10349,7 +10452,42 @@ class Table extends Widget {
10349
10452
  }
10350
10453
  }
10351
10454
 
10352
- const show = Object.values( acfMap ).reduce( ( e, acc ) => acc *= e );
10455
+ const show = Object.values( acfMap ).reduce( ( e, acc ) => acc *= e, true );
10456
+ if( !show )
10457
+ {
10458
+ continue;
10459
+ }
10460
+ }
10461
+
10462
+ // Check range/date filters
10463
+ if( this.customFilters )
10464
+ {
10465
+ let acfMap = {};
10466
+
10467
+ for( let f of this.customFilters )
10468
+ {
10469
+ const acfName = f.name;
10470
+
10471
+ if( f.type == "range" )
10472
+ {
10473
+ acfMap[ acfName ] = acfMap[ acfName ] ?? false;
10474
+
10475
+ const filterColIndex = data.head.indexOf( acfName );
10476
+ if( filterColIndex > -1 )
10477
+ {
10478
+ const validRowValue = parseFloat( bodyData[ filterColIndex ] );
10479
+ const min = f.start ?? f.min;
10480
+ const max = f.end ?? f.max;
10481
+ acfMap[ acfName ] |= ( validRowValue >= min ) && ( validRowValue <= max );
10482
+ }
10483
+ }
10484
+ else if( f.type == "date" )
10485
+ {
10486
+ // TODO
10487
+ }
10488
+ }
10489
+
10490
+ const show = Object.values( acfMap ).reduce( ( e, acc ) => acc *= e, true );
10353
10491
  if( !show )
10354
10492
  {
10355
10493
  continue;
@@ -10383,7 +10521,7 @@ class Table extends Widget {
10383
10521
  row.addEventListener("mouseenter", function(e) {
10384
10522
  e.preventDefault();
10385
10523
 
10386
- if( rIdx && ( this.rowIndex != rIdx ) && ( eventCatched != this.rowIndex ) )
10524
+ if( rIdx != null && ( this.rowIndex != rIdx ) && ( eventCatched != this.rowIndex ) )
10387
10525
  {
10388
10526
  eventCatched = this.rowIndex;
10389
10527
  const fromRow = table.rows[ rIdx ];
@@ -10392,7 +10530,7 @@ class Table extends Widget {
10392
10530
  movePending = [ fromRow, undo ? (this.rowIndex-1) : this.rowIndex ];
10393
10531
  this.style.transform = undo ? `` : `translateY(-${this.offsetHeight}px)`;
10394
10532
  } else {
10395
- movePending = [ fromRow, undo ? (this.rowIndex) : (this.rowIndex-1) ];
10533
+ movePending = [ fromRow, undo ? (this.rowIndex+1) : (this.rowIndex) ];
10396
10534
  this.style.transform = undo ? `` : `translateY(${this.offsetHeight}px)`;
10397
10535
  }
10398
10536
  doAsync( () => {
@@ -10603,6 +10741,53 @@ class DatePicker extends Widget {
10603
10741
 
10604
10742
  LX.DatePicker = DatePicker;
10605
10743
 
10744
+ /**
10745
+ * @class Map2D
10746
+ * @description Map2D Widget
10747
+ */
10748
+
10749
+ class Map2D extends Widget {
10750
+
10751
+ constructor( name, points, callback, options = {} ) {
10752
+
10753
+ super( Widget.MAP2D, name, null, options );
10754
+
10755
+ this.onGetValue = () => {
10756
+ return this.map2d.weightsObj;
10757
+ };
10758
+
10759
+ this.onSetValue = ( newValue, skipCallback, event ) => {
10760
+ // if( !skipCallback )
10761
+ // {
10762
+ // this._trigger( new IEvent( name, curveInstance.element.value, event ), callback );
10763
+ // }
10764
+ };
10765
+
10766
+ this.onResize = ( rect ) => {
10767
+ const realNameWidth = ( this.root.domName?.style.width ?? "0px" );
10768
+ container.style.width = `calc( 100% - ${ realNameWidth })`;
10769
+ };
10770
+
10771
+ var container = document.createElement( "div" );
10772
+ container.className = "lexmap2d";
10773
+ this.root.appendChild( container );
10774
+
10775
+ this.map2d = new CanvasMap2D( points, callback, options );
10776
+
10777
+ const calendarIcon = LX.makeIcon( "SquareMousePointer" );
10778
+ const calendarButton = new Button( null, "Open Map", () => {
10779
+ this._popover = new Popover( calendarButton.root, [ this.map2d ] );
10780
+ }, { buttonClass: `flex flex-row px-3 fg-secondary justify-between` } );
10781
+
10782
+ calendarButton.root.querySelector( "button" ).appendChild( calendarIcon );
10783
+ container.appendChild( calendarButton.root );
10784
+
10785
+ doAsync( this.onResize.bind( this ) );
10786
+ }
10787
+ }
10788
+
10789
+ LX.Map2D = Map2D;
10790
+
10606
10791
  /**
10607
10792
  * @class Panel
10608
10793
  */
@@ -10706,7 +10891,7 @@ class Panel {
10706
10891
  const signal = this.widgets[ w ].options.signal;
10707
10892
  for( let i = 0; i < LX.signals[signal].length; i++ )
10708
10893
  {
10709
- if( LX.signals[signal][i] == this.widgets[ w ] )
10894
+ if( LX.signals[signal][ i ] == this.widgets[ w ] )
10710
10895
  {
10711
10896
  LX.signals[signal] = [...LX.signals[signal].slice(0, i), ...LX.signals[signal].slice(i+1)];
10712
10897
  }
@@ -10718,11 +10903,11 @@ class Panel {
10718
10903
  {
10719
10904
  for( let w = 0; w < this.signals.length; w++ )
10720
10905
  {
10721
- let widget = Object.values(this.signals[ w ])[0];
10906
+ let widget = Object.values(this.signals[ w ])[ 0 ];
10722
10907
  let signal = widget.options.signal;
10723
10908
  for( let i = 0; i < LX.signals[signal].length; i++ )
10724
10909
  {
10725
- if( LX.signals[signal][i] == widget )
10910
+ if( LX.signals[signal][ i ] == widget )
10726
10911
  {
10727
10912
  LX.signals[signal] = [...LX.signals[signal].slice(0, i), ...LX.signals[signal].slice(i+1)];
10728
10913
  }
@@ -11775,6 +11960,19 @@ class Panel {
11775
11960
  const widget = new DatePicker( name, dateString, callback, options );
11776
11961
  return this._attachWidget( widget );
11777
11962
  }
11963
+
11964
+ /**
11965
+ * @method addMap2D
11966
+ * @param {String} name Widget name
11967
+ * @param {Array} points
11968
+ * @param {Function} callback
11969
+ * @param {Object} options:
11970
+ */
11971
+
11972
+ addMap2D( name, points, callback, options = { } ) {
11973
+ const widget = new Map2D( name, points, callback, options );
11974
+ return this._attachWidget( widget );
11975
+ }
11778
11976
  }
11779
11977
 
11780
11978
  LX.Panel = Panel;
@@ -11923,7 +12121,7 @@ class Branch {
11923
12121
  this.grabber = grabber;
11924
12122
 
11925
12123
  function getBranchHeight() {
11926
- return that.root.offsetHeight - that.root.children[0].offsetHeight;
12124
+ return that.root.offsetHeight - that.root.children[ 0 ].offsetHeight;
11927
12125
  }
11928
12126
 
11929
12127
  let that = this;
@@ -12383,7 +12581,7 @@ class PocketDialog extends Dialog {
12383
12581
  if( this.size )
12384
12582
  {
12385
12583
  if( !this.minimized ) this.root.style.height = "auto";
12386
- else this.root.style.height = this.size[1];
12584
+ else this.root.style.height = this.size[ 1 ];
12387
12585
  }
12388
12586
 
12389
12587
  this.root.classList.toggle("minimized");
@@ -12402,7 +12600,7 @@ class PocketDialog extends Dialog {
12402
12600
  {
12403
12601
  for( let i = 0; i < float.length; i++ )
12404
12602
  {
12405
- const t = float[i];
12603
+ const t = float[ i ];
12406
12604
  switch( t )
12407
12605
  {
12408
12606
  case 'b':
@@ -12692,7 +12890,7 @@ class ContextMenu {
12692
12890
  return;
12693
12891
  }
12694
12892
 
12695
- if( children.find( c => Object.keys(c)[0] == key ) == null )
12893
+ if( children.find( c => Object.keys(c)[ 0 ] == key ) == null )
12696
12894
  {
12697
12895
  const parent = {};
12698
12896
  parent[ key ] = [];
@@ -12733,7 +12931,7 @@ class ContextMenu {
12733
12931
 
12734
12932
  setColor( token, color ) {
12735
12933
 
12736
- if(color[0] !== '#')
12934
+ if(color[ 0 ] !== '#')
12737
12935
  color = rgbToHex(color);
12738
12936
 
12739
12937
  this.colors[ token ] = color;
@@ -12837,8 +13035,8 @@ class CanvasCurve {
12837
13035
  element.resample = function( samples ) {
12838
13036
 
12839
13037
  let r = [];
12840
- let dx = (element.xrange[1] - element.xrange[ 0 ]) / samples;
12841
- for( let i = element.xrange[0]; i <= element.xrange[1]; i += dx )
13038
+ let dx = (element.xrange[ 1 ] - element.xrange[ 0 ]) / samples;
13039
+ for( let i = element.xrange[ 0 ]; i <= element.xrange[ 1 ]; i += dx )
12842
13040
  {
12843
13041
  r.push( element.getValueAt(i) );
12844
13042
  }
@@ -12849,8 +13047,8 @@ class CanvasCurve {
12849
13047
 
12850
13048
  for( let i = 0; i < element.value; i++ )
12851
13049
  {
12852
- let value = element.value[i];
12853
- if(value[0] < v[0]) continue;
13050
+ let value = element.value[ i ];
13051
+ if(value[ 0 ] < v[ 0 ]) continue;
12854
13052
  element.value.splice(i,0,v);
12855
13053
  redraw();
12856
13054
  return;
@@ -12862,14 +13060,14 @@ class CanvasCurve {
12862
13060
 
12863
13061
  //value to canvas
12864
13062
  function convert(v) {
12865
- return [ canvas.width * ( v[0] - element.xrange[0])/ (element.xrange[1]),
12866
- canvas.height * (v[1] - element.yrange[0])/ (element.yrange[1])];
13063
+ return [ canvas.width * ( v[ 0 ] - element.xrange[ 0 ])/ (element.xrange[ 1 ]),
13064
+ canvas.height * (v[ 1 ] - element.yrange[ 0 ])/ (element.yrange[ 1 ])];
12867
13065
  }
12868
13066
 
12869
13067
  //canvas to value
12870
13068
  function unconvert(v) {
12871
- return [(v[0] * element.xrange[1] / canvas.width + element.xrange[0]),
12872
- (v[1] * element.yrange[1] / canvas.height + element.yrange[0])];
13069
+ return [(v[ 0 ] * element.xrange[ 1 ] / canvas.width + element.xrange[ 0 ]),
13070
+ (v[ 1 ] * element.yrange[ 1 ] / canvas.height + element.yrange[ 0 ])];
12873
13071
  }
12874
13072
 
12875
13073
  let selected = -1;
@@ -13057,7 +13255,7 @@ class CanvasCurve {
13057
13255
  options.callback.call( element, element.value, e );
13058
13256
  }
13059
13257
 
13060
- function distance(a,b) { return Math.sqrt( Math.pow(b[0]-a[0],2) + Math.pow(b[1]-a[1],2) ); };
13258
+ function distance(a,b) { return Math.sqrt( Math.pow(b[ 0 ]-a[ 0 ],2) + Math.pow(b[ 1 ]-a[ 1 ],2) ); };
13061
13259
 
13062
13260
  function computeSelected( x, y ) {
13063
13261
 
@@ -13169,8 +13367,8 @@ class CanvasDial {
13169
13367
  element.resample = function( samples ) {
13170
13368
 
13171
13369
  var r = [];
13172
- var dx = (element.xrange[1] - element.xrange[ 0 ]) / samples;
13173
- for( var i = element.xrange[0]; i <= element.xrange[1]; i += dx)
13370
+ var dx = (element.xrange[ 1 ] - element.xrange[ 0 ]) / samples;
13371
+ for( var i = element.xrange[ 0 ]; i <= element.xrange[ 1 ]; i += dx)
13174
13372
  {
13175
13373
  r.push( element.getValueAt(i) );
13176
13374
  }
@@ -13195,15 +13393,15 @@ class CanvasDial {
13195
13393
  //value to canvas
13196
13394
  function convert(v, r) {
13197
13395
 
13198
- Math.pow(v[0],2)
13199
- return [ canvas.width * ( v[0] - element.xrange[0])/ (element.xrange[1]),
13200
- canvas.height * (v[1] - element.yrange[0])/ (element.yrange[1])];
13396
+ Math.pow(v[ 0 ],2)
13397
+ return [ canvas.width * ( v[ 0 ] - element.xrange[ 0 ])/ (element.xrange[ 1 ]),
13398
+ canvas.height * (v[ 1 ] - element.yrange[ 0 ])/ (element.yrange[ 1 ])];
13201
13399
  }
13202
13400
 
13203
13401
  //canvas to value
13204
13402
  function unconvert(v) {
13205
- return [(v[0] * element.xrange[1] / canvas.width + element.xrange[0]),
13206
- (v[1] * element.yrange[1] / canvas.height + element.yrange[0])];
13403
+ return [(v[ 0 ] * element.xrange[ 1 ] / canvas.width + element.xrange[ 0 ]),
13404
+ (v[ 1 ] * element.yrange[ 1 ] / canvas.height + element.yrange[ 0 ])];
13207
13405
  }
13208
13406
 
13209
13407
  var selected = -1;
@@ -13385,7 +13583,7 @@ class CanvasDial {
13385
13583
  options.callback.call( element, element.value, e );
13386
13584
  }
13387
13585
 
13388
- function distance(a,b) { return Math.sqrt( Math.pow(b[0]-a[0],2) + Math.pow(b[1]-a[1],2) ); };
13586
+ function distance(a,b) { return Math.sqrt( Math.pow(b[ 0 ]-a[ 0 ],2) + Math.pow(b[ 1 ]-a[ 1 ],2) ); };
13389
13587
 
13390
13588
  function computeSelected( x, y ) {
13391
13589
 
@@ -13430,6 +13628,439 @@ class CanvasDial {
13430
13628
 
13431
13629
  LX.Dial = Dial;
13432
13630
 
13631
+ // Based on LGraphMap2D from @tamats (jagenjo)
13632
+ // https://github.com/jagenjo/litescene.js
13633
+ class CanvasMap2D {
13634
+
13635
+ static COLORS = [ [255, 0, 0], [0, 255, 0], [0, 0, 255], [0, 128, 128], [128, 0, 128], [128, 128, 0], [255, 128, 0], [255, 0, 128], [0, 128, 255], [128, 0, 255] ];
13636
+ static GRID_SIZE = 64;
13637
+
13638
+ /**
13639
+ * @constructor Map2D
13640
+ * @param {Array} initialPoints
13641
+ * @param {Function} callback
13642
+ * @param {Object} options
13643
+ * circular
13644
+ * showNames
13645
+ * size
13646
+ */
13647
+
13648
+ constructor( initialPoints, callback, options = {} ) {
13649
+
13650
+ this.circular = options.circular ?? false;
13651
+ this.showNames = options.showNames ?? true;
13652
+ this.size = options.size ?? [ 200, 200 ];
13653
+
13654
+ this.points = initialPoints ?? [];
13655
+ this.callback = callback;
13656
+ this.weights = [];
13657
+ this.weightsObj = {};
13658
+ this.currentPosition = new LX.vec2( 0.5, 0.5 );
13659
+ this.circleCenter = [ 0, 0 ];
13660
+ this.circleRadius = 1;
13661
+ this.margin = 8;
13662
+ this.dragging = false;
13663
+
13664
+ this._valuesChanged = true;
13665
+ this._selectedPoint = null;
13666
+
13667
+ this.root = LX.makeContainer( ["auto", "auto"] );
13668
+ this.root.tabIndex = "1";
13669
+
13670
+ this.root.addEventListener( "mousedown", innerMouseDown );
13671
+
13672
+ const that = this;
13673
+
13674
+ function innerMouseDown( e )
13675
+ {
13676
+ var doc = that.root.ownerDocument;
13677
+ doc.addEventListener("mouseup", innerMouseUp);
13678
+ doc.addEventListener("mousemove", innerMouseMove);
13679
+ e.stopPropagation();
13680
+ e.preventDefault();
13681
+
13682
+ that.dragging = true;
13683
+ return true;
13684
+ }
13685
+
13686
+ function innerMouseMove( e )
13687
+ {
13688
+ if( !that.dragging )
13689
+ {
13690
+ return;
13691
+ }
13692
+
13693
+ const margin = that.margin;
13694
+ const rect = that.root.getBoundingClientRect();
13695
+
13696
+ let pos = new LX.vec2();
13697
+ pos.set( e.x - rect.x - that.size[ 0 ] * 0.5, e.y - rect.y - that.size[ 1 ] * 0.5 );
13698
+ var cpos = that.currentPosition;
13699
+ cpos.set(
13700
+ LX.clamp( pos.x / ( that.size[ 0 ] * 0.5 - margin ), -1, 1 ),
13701
+ LX.clamp( pos.y / ( that.size[ 1 ] * 0.5 - margin ), -1, 1 )
13702
+ );
13703
+
13704
+ if( that.circular )
13705
+ {
13706
+ const center = new LX.vec2( 0, 0 );
13707
+ const dist = cpos.dst( center );
13708
+ if( dist > 1 )
13709
+ {
13710
+ cpos = cpos.nrm();
13711
+ }
13712
+ }
13713
+
13714
+ that.renderToCanvas( that.canvas.getContext( "2d", { willReadFrequently: true } ), that.canvas );
13715
+
13716
+ that.computeWeights( cpos );
13717
+
13718
+ if( that.callback )
13719
+ {
13720
+ that.callback( that.weightsObj, that.weights, cpos );
13721
+ }
13722
+
13723
+ return true;
13724
+ }
13725
+
13726
+ function innerMouseUp( e )
13727
+ {
13728
+ that.dragging = false;
13729
+
13730
+ var doc = that.root.ownerDocument;
13731
+ doc.removeEventListener("mouseup", innerMouseUp);
13732
+ doc.removeEventListener("mousemove", innerMouseMove);
13733
+ }
13734
+
13735
+ this.canvas = document.createElement( "canvas" );
13736
+ this.canvas.width = this.size[ 0 ];
13737
+ this.canvas.height = this.size[ 1 ];
13738
+ this.root.appendChild( this.canvas );
13739
+
13740
+ const ctx = this.canvas.getContext( "2d", { willReadFrequently: true } );
13741
+ this.renderToCanvas( ctx, this.canvas );
13742
+ }
13743
+
13744
+ /**
13745
+ * @method computeWeights
13746
+ * @param {LX.vec2} p
13747
+ * @description Iterate for every cell to see if our point is nearer to the cell than the nearest point of the cell,
13748
+ * If that is the case we increase the weight of the nearest point. At the end we normalize the weights of the points by the number of near points
13749
+ * and that give us the weight for every point
13750
+ */
13751
+
13752
+ computeWeights( p ) {
13753
+
13754
+ if( !this.points.length )
13755
+ {
13756
+ return;
13757
+ }
13758
+
13759
+ let values = this._precomputedWeights;
13760
+ if( !values || this._valuesChanged )
13761
+ {
13762
+ values = this.precomputeWeights();
13763
+ }
13764
+
13765
+ let weights = this.weights;
13766
+ weights.length = this.points.length;
13767
+ for(var i = 0; i < weights.length; ++i)
13768
+ {
13769
+ weights[ i ] = 0;
13770
+ }
13771
+
13772
+ const gridSize = CanvasMap2D.GRID_SIZE;
13773
+
13774
+ let totalInside = 0;
13775
+ let pos2 = new LX.vec2();
13776
+
13777
+ for( var y = 0; y < gridSize; ++y )
13778
+ {
13779
+ for( var x = 0; x < gridSize; ++x )
13780
+ {
13781
+ pos2.set( ( x / gridSize) * 2 - 1, ( y / gridSize ) * 2 - 1 );
13782
+
13783
+ var dataPos = x * 2 + y * gridSize * 2;
13784
+ var pointIdx = values[ dataPos ];
13785
+
13786
+ var isInside = p.dst( pos2 ) < ( values[ dataPos + 1] + 0.001 ); // epsilon
13787
+ if( isInside )
13788
+ {
13789
+ weights[ pointIdx ] += 1;
13790
+ totalInside++;
13791
+ }
13792
+ }
13793
+ }
13794
+
13795
+ for( var i = 0; i < weights.length; ++i )
13796
+ {
13797
+ weights[ i ] /= totalInside;
13798
+ this.weightsObj[ this.points[ i ].name ] = weights[ i ];
13799
+ }
13800
+
13801
+ return weights;
13802
+ }
13803
+
13804
+ /**
13805
+ * @method precomputeWeights
13806
+ * @description Precompute for every cell, which is the closest point of the points set and how far it is from the center of the cell
13807
+ * We store point index and distance in this._precomputedWeights. This is done only when the points set change
13808
+ */
13809
+
13810
+ precomputeWeights() {
13811
+
13812
+ this._valuesChanged = false;
13813
+
13814
+ const numPoints = this.points.length;
13815
+ const gridSize = CanvasMap2D.GRID_SIZE;
13816
+ const totalNums = 2 * gridSize * gridSize;
13817
+
13818
+ let position = new LX.vec2();
13819
+
13820
+ if( !this._precomputedWeights || this._precomputedWeights.length != totalNums )
13821
+ {
13822
+ this._precomputedWeights = new Float32Array( totalNums );
13823
+ }
13824
+
13825
+ let values = this._precomputedWeights;
13826
+ this._precomputedWeightsGridSize = gridSize;
13827
+
13828
+ for( let y = 0; y < gridSize; ++y )
13829
+ {
13830
+ for( let x = 0; x < gridSize; ++x )
13831
+ {
13832
+ let nearest = -1;
13833
+ let minDistance = 100000;
13834
+
13835
+ for( let i = 0; i < numPoints; ++i )
13836
+ {
13837
+ position.set( ( x / gridSize ) * 2 - 1, ( y / gridSize ) * 2 - 1 );
13838
+
13839
+ let pointPosition = new LX.vec2();
13840
+ pointPosition.fromArray( this.points[ i ].pos );
13841
+ let dist = position.dst( pointPosition );
13842
+ if( dist > minDistance )
13843
+ {
13844
+ continue;
13845
+ }
13846
+
13847
+ nearest = i;
13848
+ minDistance = dist;
13849
+ }
13850
+
13851
+ values[ x * 2 + y * 2 * gridSize ] = nearest;
13852
+ values[ x * 2 + y * 2 * gridSize + 1 ] = minDistance;
13853
+ }
13854
+ }
13855
+
13856
+ return values;
13857
+ }
13858
+
13859
+ /**
13860
+ * @method precomputeWeightsToImage
13861
+ * @param {LX.vec2} p
13862
+ */
13863
+
13864
+ precomputeWeightsToImage( p ) {
13865
+
13866
+ if( !this.points.length )
13867
+ {
13868
+ return null;
13869
+ }
13870
+
13871
+ const gridSize = CanvasMap2D.GRID_SIZE;
13872
+ var values = this._precomputedWeights;
13873
+ if( !values || this._valuesChanged || this._precomputedWeightsGridSize != gridSize )
13874
+ {
13875
+ values = this.precomputeWeights();
13876
+ }
13877
+
13878
+ var canvas = this.imageCanvas;
13879
+ if( !canvas )
13880
+ {
13881
+ canvas = this.imageCanvas = document.createElement( "canvas" );
13882
+ }
13883
+
13884
+ canvas.width = canvas.height = gridSize;
13885
+ var ctx = canvas.getContext( "2d", { willReadFrequently: true } );
13886
+
13887
+ var weights = this.weights;
13888
+ weights.length = this.points.length;
13889
+ for (var i = 0; i < weights.length; ++i)
13890
+ {
13891
+ weights[ i ] = 0;
13892
+ }
13893
+
13894
+ let totalInside = 0;
13895
+ let pixels = ctx.getImageData( 0, 0, gridSize, gridSize );
13896
+ let pos2 = new LX.vec2();
13897
+
13898
+ for( var y = 0; y < gridSize; ++y )
13899
+ {
13900
+ for( var x = 0; x < gridSize; ++x )
13901
+ {
13902
+ pos2.set( ( x / gridSize ) * 2 - 1, ( y / gridSize ) * 2 - 1 );
13903
+
13904
+ const pixelPos = x * 4 + y * gridSize * 4;
13905
+ const dataPos = x * 2 + y * gridSize * 2;
13906
+ const pointIdx = values[ dataPos ];
13907
+ const c = CanvasMap2D.COLORS[ pointIdx % CanvasMap2D.COLORS.length ];
13908
+
13909
+ var isInside = p.dst( pos2 ) < ( values[ dataPos + 1 ] + 0.001 );
13910
+ if( isInside )
13911
+ {
13912
+ weights[ pointIdx ] += 1;
13913
+ totalInside++;
13914
+ }
13915
+
13916
+ pixels.data[ pixelPos ] = c[ 0 ] + ( isInside ? 128 : 0 );
13917
+ pixels.data[ pixelPos + 1 ] = c[ 1 ] + ( isInside ? 128 : 0 );
13918
+ pixels.data[ pixelPos + 2 ] = c[ 2 ] + ( isInside ? 128 : 0 );
13919
+ pixels.data[ pixelPos + 3 ] = 255;
13920
+ }
13921
+ }
13922
+
13923
+ for( let i = 0; i < weights.length; ++i )
13924
+ {
13925
+ weights[ i ] /= totalInside;
13926
+ }
13927
+
13928
+ ctx.putImageData( pixels, 0, 0 );
13929
+ return canvas;
13930
+ }
13931
+
13932
+ addPoint( name, pos ) {
13933
+ if( this.findPoint( name ) )
13934
+ {
13935
+ console.warn("CanvasMap2D.addPoint: There is already a point with that name" );
13936
+ return;
13937
+ }
13938
+
13939
+ if( !pos )
13940
+ {
13941
+ pos = [ this.currentPosition[ 0 ], this.currentPosition[ 1 ] ];
13942
+ }
13943
+
13944
+ pos[ 0 ] = LX.clamp( pos[ 0 ], -1, 1 );
13945
+ pos[ 1 ] = LX.clamp( pos[ 1 ], -1, 1 );
13946
+
13947
+ const point = { name, pos };
13948
+ this.points.push( point );
13949
+ this._valuesChanged = true;
13950
+ return point;
13951
+ }
13952
+
13953
+ removePoint( name ) {
13954
+ const removeIdx = this.points.findIndex( (p) => p.name == name );
13955
+ if( removeIdx > -1 )
13956
+ {
13957
+ this.points.splice( removeIdx, 1 );
13958
+ this._valuesChanged = true;
13959
+ }
13960
+ }
13961
+
13962
+ findPoint( name ) {
13963
+ return this.points.find( p => p.name == name );
13964
+ }
13965
+
13966
+ clear() {
13967
+ this.points.length = 0;
13968
+ this._precomputedWeights = null;
13969
+ this._canvas = null;
13970
+ this._selectedPoint = null;
13971
+ }
13972
+
13973
+ renderToCanvas( ctx, canvas ) {
13974
+
13975
+ const margin = this.margin;
13976
+ const w = this.size[ 0 ];
13977
+ const h = this.size[ 1 ];
13978
+
13979
+ ctx.fillStyle = "black";
13980
+ ctx.strokeStyle = "#BBB";
13981
+
13982
+ ctx.clearRect( 0, 0, w, h );
13983
+
13984
+ if( this.circular )
13985
+ {
13986
+ this.circleCenter[ 0 ] = w * 0.5;
13987
+ this.circleCenter[ 1 ] = h * 0.5;
13988
+ this.circleRadius = h * 0.5 - margin;
13989
+
13990
+ ctx.lineWidth = 1;
13991
+ ctx.beginPath();
13992
+ ctx.arc( this.circleCenter[ 0 ], this.circleCenter[ 1 ], this.circleRadius, 0, Math.PI * 2 );
13993
+ ctx.fill();
13994
+ ctx.stroke();
13995
+ ctx.beginPath();
13996
+ ctx.moveTo( this.circleCenter[ 0 ] + 0.5, this.circleCenter[ 1 ] - this.circleRadius );
13997
+ ctx.lineTo( this.circleCenter[ 0 ] + 0.5, this.circleCenter[ 1 ] + this.circleRadius );
13998
+ ctx.moveTo( this.circleCenter[ 0 ] - this.circleRadius, this.circleCenter[ 1 ]);
13999
+ ctx.lineTo( this.circleCenter[ 0 ] + this.circleRadius, this.circleCenter[ 1 ]);
14000
+ ctx.stroke();
14001
+ }
14002
+ else
14003
+ {
14004
+ ctx.fillRect( margin, margin, w - margin * 2, h - margin * 2 );
14005
+ ctx.strokeRect( margin, margin, w - margin * 2, h - margin * 2 );
14006
+ }
14007
+
14008
+ var image = this.precomputeWeightsToImage( this.currentPosition );
14009
+ if( image )
14010
+ {
14011
+ ctx.globalAlpha = 0.5;
14012
+ ctx.imageSmoothingEnabled = false;
14013
+ if( this.circular )
14014
+ {
14015
+ ctx.save();
14016
+ ctx.beginPath();
14017
+ ctx.arc( this.circleCenter[ 0 ], this.circleCenter[ 1 ], this.circleRadius, 0, Math.PI * 2 );
14018
+ ctx.clip();
14019
+ ctx.drawImage( image, this.circleCenter[ 0 ] - this.circleRadius, this.circleCenter[ 1 ] - this.circleRadius, this.circleRadius * 2, this.circleRadius * 2 );
14020
+ ctx.restore();
14021
+ }
14022
+ else
14023
+ {
14024
+ ctx.drawImage( image, margin, margin, w - margin * 2, h - margin * 2 );
14025
+ }
14026
+ ctx.imageSmoothingEnabled = true;
14027
+ ctx.globalAlpha = 1;
14028
+ }
14029
+
14030
+ for( let i = 0; i < this.points.length; ++i )
14031
+ {
14032
+ const point = this.points[ i ];
14033
+ let x = point.pos[ 0 ] * 0.5 + 0.5;
14034
+ let y = point.pos[ 1 ] * 0.5 + 0.5;
14035
+ x = x * ( w - margin * 2 ) + margin;
14036
+ y = y * ( h - margin * 2 ) + margin;
14037
+ x = LX.clamp( x, margin, w - margin );
14038
+ y = LX.clamp( y, margin, h - margin );
14039
+ ctx.fillStyle = ( point == this._selectedPoint ) ? "#CDF" : "#BCD";
14040
+ ctx.beginPath();
14041
+ ctx.arc( x, y, 3, 0, Math.PI * 2 );
14042
+ ctx.fill();
14043
+ if( this.showNames )
14044
+ {
14045
+ ctx.fillText( point.name, x + 5, y + 5 );
14046
+ }
14047
+ }
14048
+
14049
+ ctx.fillStyle = "white";
14050
+ ctx.beginPath();
14051
+ var x = this.currentPosition.x * 0.5 + 0.5;
14052
+ var y = this.currentPosition.y * 0.5 + 0.5;
14053
+ x = x * ( w - margin * 2 ) + margin;
14054
+ y = y * ( h - margin * 2 ) + margin;
14055
+ x = LX.clamp( x, margin, w - margin );
14056
+ y = LX.clamp( y, margin, h - margin );
14057
+ ctx.arc( x, y, 4, 0, Math.PI * 2 );
14058
+ ctx.fill();
14059
+ }
14060
+ }
14061
+
14062
+ LX.CanvasMap2D = CanvasMap2D;
14063
+
13433
14064
  class AssetViewEvent {
13434
14065
 
13435
14066
  static NONE = 0;
@@ -14170,7 +14801,7 @@ class AssetView {
14170
14801
 
14171
14802
  for( let i = 0; i < e.dataTransfer.files.length; ++i )
14172
14803
  {
14173
- const file = e.dataTransfer.files[i];
14804
+ const file = e.dataTransfer.files[ i ];
14174
14805
 
14175
14806
  const result = this.currentData.find( e => e.id === file.name );
14176
14807
  if(result) continue;
@@ -14385,7 +15016,7 @@ Object.assign(LX, {
14385
15016
  if( request.data )
14386
15017
  {
14387
15018
  for( var i in request.data)
14388
- data.append(i,request.data[i]);
15019
+ data.append(i,request.data[ i ]);
14389
15020
  }
14390
15021
 
14391
15022
  xhr.send( data );
@@ -14450,8 +15081,8 @@ Object.assign(LX, {
14450
15081
  var script = document.createElement('script');
14451
15082
  script.num = i;
14452
15083
  script.type = 'text/javascript';
14453
- script.src = url[i] + ( version ? "?version=" + version : "" );
14454
- script.original_src = url[i];
15084
+ script.src = url[ i ] + ( version ? "?version=" + version : "" );
15085
+ script.original_src = url[ i ];
14455
15086
  script.async = false;
14456
15087
  script.onload = function( e ) {
14457
15088
  total--;
@@ -14470,7 +15101,7 @@ Object.assign(LX, {
14470
15101
  script.onerror = function(err) {
14471
15102
  onError(err, this.original_src, this.num );
14472
15103
  }
14473
- document.getElementsByTagName('head')[0].appendChild(script);
15104
+ document.getElementsByTagName('head')[ 0 ].appendChild(script);
14474
15105
  }
14475
15106
  },
14476
15107
 
@@ -14641,13 +15272,13 @@ LX.UTILS = {
14641
15272
  // Draw an open curve, not connected at the ends
14642
15273
  for( var i = 0; i < (n - 4); i += 2 )
14643
15274
  {
14644
- cp = cp.concat(LX.UTILS.getControlPoints(pts[i],pts[i+1],pts[i+2],pts[i+3],pts[i+4],pts[i+5],t));
15275
+ cp = cp.concat(LX.UTILS.getControlPoints(pts[ i ],pts[i+1],pts[i+2],pts[i+3],pts[i+4],pts[i+5],t));
14645
15276
  }
14646
15277
 
14647
15278
  for( var i = 2; i < ( pts.length - 5 ); i += 2 )
14648
15279
  {
14649
15280
  ctx.beginPath();
14650
- ctx.moveTo(pts[i], pts[i+1]);
15281
+ ctx.moveTo(pts[ i ], pts[i+1]);
14651
15282
  ctx.bezierCurveTo(cp[2*i-2],cp[2*i-1],cp[2*i],cp[2*i+1],pts[i+2],pts[i+3]);
14652
15283
  ctx.stroke();
14653
15284
  ctx.closePath();
@@ -14670,7 +15301,7 @@ LX.UTILS = {
14670
15301
  }
14671
15302
  };
14672
15303
 
14673
- LX.ICONS = {
15304
+ const RAW_ICONS = {
14674
15305
  // Internals
14675
15306
  "Clone": [512, 512, [], "regular", "M64 464l224 0c8.8 0 16-7.2 16-16l0-64 48 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64l64 0 0 48-64 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zM224 304l224 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16L224 48c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zm-64-16l0-224c0-35.3 28.7-64 64-64L448 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-224 0c-35.3 0-64-28.7-64-64z"],
14676
15307
  "IdBadge": [384, 512, [], "regular", "M256 48l0 16c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-16L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-384c0-8.8-7.2-16-16-16l-64 0zM0 64C0 28.7 28.7 0 64 0L320 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM160 320l64 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16L96 416c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"],
@@ -14687,8 +15318,7 @@ LX.ICONS = {
14687
15318
  "ClosedCaptioning": [576, 512, ["CC"], "regular", "M512 80c8.8 0 16 7.2 16 16l0 320c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16L48 96c0-8.8 7.2-16 16-16l448 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z"],
14688
15319
  "ChildReaching": [384, 512, [], "solid", "M256 64A64 64 0 1 0 128 64a64 64 0 1 0 128 0zM152.9 169.3c-23.7-8.4-44.5-24.3-58.8-45.8L74.6 94.2C64.8 79.5 45 75.6 30.2 85.4s-18.7 29.7-8.9 44.4L40.9 159c18.1 27.1 42.8 48.4 71.1 62.4L112 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96 32 0 0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-258.4c29.1-14.2 54.4-36.2 72.7-64.2l18.2-27.9c9.6-14.8 5.4-34.6-9.4-44.3s-34.6-5.5-44.3 9.4L291 122.4c-21.8 33.4-58.9 53.6-98.8 53.6c-12.6 0-24.9-2-36.6-5.8c-.9-.3-1.8-.7-2.7-.9z"],
14689
15320
  "HourglassHalf": [384, 512, [], "regular", "M0 24C0 10.7 10.7 0 24 0L360 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 19c0 40.3-16 79-44.5 107.5L225.9 256l81.5 81.5C336 366 352 404.7 352 445l0 19 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L24 512c-13.3 0-24-10.7-24-24s10.7-24 24-24l8 0 0-19c0-40.3 16-79 44.5-107.5L158.1 256 76.5 174.5C48 146 32 107.3 32 67l0-19-8 0C10.7 48 0 37.3 0 24zM110.5 371.5c-3.9 3.9-7.5 8.1-10.7 12.5l184.4 0c-3.2-4.4-6.8-8.6-10.7-12.5L192 289.9l-81.5 81.5zM284.2 128C297 110.4 304 89 304 67l0-19L80 48l0 19c0 22.1 7 43.4 19.8 61l184.4 0z"],
14690
- "PaperPlane": [512, 512, [], "regular", "M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"],
14691
- // "PaperPlane": [512, 512, [], "solid", "M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480l0-83.6c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"],
15321
+ "PaperPlane": [512, 512, [], "regular", "M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"],
14692
15322
  "Axis3DArrows": [24, 24, [], "solid", "m12 2l4 4h-3v7.85l6.53 3.76L21 15.03l1.5 5.47l-5.5 1.46l1.53-2.61L12 15.58l-6.53 3.77L7 21.96L1.5 20.5L3 15.03l1.47 2.58L11 13.85V6H8z"],
14693
15323
  "PersonWalkingDashedLineArrowRight": [640, 512, [], "solid", "M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM123.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L281 232.7l-15.3-36.8C248.5 154.8 208.3 128 163.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1L68.7 398 9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L116.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zM550.6 153.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L530.7 224 384 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l146.7 0-25.4 25.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l80-80c12.5-12.5 12.5-32.8 0-45.3l-80-80zM392 0c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48c0-13.3-10.7-24-24-24zm24 152c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16zM392 320c-13.3 0-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16c0-13.3-10.7-24-24-24zm24 120c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48z"],
14694
15324
  "PersonWalkingArrowLoopLeft": [640, 512, [], "solid", "M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM123.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L281 232.7l-15.3-36.8C248.5 154.8 208.3 128 163.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1L68.7 398 9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L116.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zm347.7 119c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L461.3 384l18.7 0c88.4 0 160-71.6 160-160s-71.6-160-160-160L352 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c53 0 96 43 96 96s-43 96-96 96l-18.7 0 25.4-25.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-80 80c-12.5 12.5-12.5 32.8 0 45.3l80 80z"],
@@ -14708,10 +15338,10 @@ LX.ICONS = {
14708
15338
  "HandLizard": [512, 512, [], "regular", "M72 112c-13.3 0-24 10.7-24 24s10.7 24 24 24l168 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-104 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l152 0c4.5 0 8.9 1.3 12.7 3.6l64 40c7 4.4 11.3 12.1 11.3 20.4l0 24c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-10.7L281.1 384 136 384c-39.8 0-72-32.2-72-72s32.2-72 72-72l104 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L72 208c-39.8 0-72-32.2-72-72S32.2 64 72 64l209.6 0c46.7 0 90.9 21.5 119.7 58.3l78.4 100.1c20.9 26.7 32.3 59.7 32.3 93.7L512 424c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-107.9c0-23.2-7.8-45.8-22.1-64.1L363.5 151.9c-19.7-25.2-49.9-39.9-81.9-39.9L72 112z"],
14709
15339
  "HandPeace": [512, 512, [], "regular", "M250.8 1.4c-35.2-3.7-66.6 21.8-70.3 57L174 119 156.7 69.6C145 36.3 108.4 18.8 75.1 30.5S24.2 78.8 35.9 112.1L88.7 262.2C73.5 276.7 64 297.3 64 320c0 0 0 0 0 0l0 24c0 92.8 75.2 168 168 168l48 0c92.8 0 168-75.2 168-168l0-72 0-16 0-32c0-35.3-28.7-64-64-64c-7.9 0-15.4 1.4-22.4 4c-10.4-21.3-32.3-36-57.6-36c-.7 0-1.5 0-2.2 0l5.9-56.3c3.7-35.2-21.8-66.6-57-70.3zm-.2 155.4C243.9 166.9 240 179 240 192l0 48c0 .7 0 1.4 0 2c-5.1-1.3-10.5-2-16-2l-7.4 0-5.4-15.3 17-161.3c.9-8.8 8.8-15.2 17.6-14.2s15.2 8.8 14.2 17.6l-9.5 90.1zM111.4 85.6L165.7 240 144 240c-4 0-8 .3-11.9 .9L81.2 96.2c-2.9-8.3 1.5-17.5 9.8-20.4s17.5 1.5 20.4 9.8zM288 192c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48zm38.4 108c10.4 21.3 32.3 36 57.6 36c5.5 0 10.9-.7 16-2l0 10c0 66.3-53.7 120-120 120l-48 0c-66.3 0-120-53.7-120-120l0-24s0 0 0 0c0-17.7 14.3-32 32-32l80 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0c35.3 0 64-28.7 64-64c0-.7 0-1.4 0-2c5.1 1.3 10.5 2 16 2c7.9 0 15.4-1.4 22.4-4zM400 272c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-32 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 0 16z"],
14710
15340
  "CircleNodes": [512, 512, [], "solid", "M418.4 157.9c35.3-8.3 61.6-40 61.6-77.9c0-44.2-35.8-80-80-80c-43.4 0-78.7 34.5-80 77.5L136.2 151.1C121.7 136.8 101.9 128 80 128c-44.2 0-80 35.8-80 80s35.8 80 80 80c12.2 0 23.8-2.7 34.1-7.6L259.7 407.8c-2.4 7.6-3.7 15.8-3.7 24.2c0 44.2 35.8 80 80 80s80-35.8 80-80c0-27.7-14-52.1-35.4-66.4l37.8-207.7zM156.3 232.2c2.2-6.9 3.5-14.2 3.7-21.7l183.8-73.5c3.6 3.5 7.4 6.7 11.6 9.5L317.6 354.1c-5.5 1.3-10.8 3.1-15.8 5.5L156.3 232.2z"],
14711
- "CircleRight": [512, 512, [], "solid", "M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 151.2c-4.2-4.6-10.1-7.2-16.4-7.2C266 144 256 154 256 166.3l0 41.7-96 0c-17.7 0-32 14.3-32 32l0 32c0 17.7 14.3 32 32 32l96 0 0 41.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.4-7.2l84-91c3.5-3.8 5.4-8.7 5.4-13.9s-1.9-10.1-5.4-13.9l-84-91z"],
14712
- "CircleUp": [512, 512, [], "solid", "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM151.2 217.4c-4.6 4.2-7.2 10.1-7.2 16.4c0 12.3 10 22.3 22.3 22.3l41.7 0 0 96c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-96 41.7 0c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.2-16.4l-91-84c-3.8-3.5-8.7-5.4-13.9-5.4s-10.1 1.9-13.9 5.4l-91 84z"],
14713
- "CircleLeft": [512, 512, [], "solid", "M48 256a208 208 0 1 1 416 0A208 208 0 1 1 48 256zm464 0A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM217.4 376.9c4.2 4.5 10.1 7.1 16.3 7.1c12.3 0 22.3-10 22.3-22.3l0-57.7 96 0c17.7 0 32-14.3 32-32l0-32c0-17.7-14.3-32-32-32l-96 0 0-57.7c0-12.3-10-22.3-22.3-22.3c-6.2 0-12.1 2.6-16.3 7.1L117.5 242.2c-3.5 3.8-5.5 8.7-5.5 13.8s2 10.1 5.5 13.8l99.9 107.1z"],
14714
- "CircleDown": [512, 512, [], "solid", "M256 464a208 208 0 1 1 0-416 208 208 0 1 1 0 416zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM376.9 294.6c4.5-4.2 7.1-10.1 7.1-16.3c0-12.3-10-22.3-22.3-22.3L304 256l0-96c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32l0 96-57.7 0C138 256 128 266 128 278.3c0 6.2 2.6 12.1 7.1 16.3l107.1 99.9c3.8 3.5 8.7 5.5 13.8 5.5s10.1-2 13.8-5.5l107.1-99.9z"],
15341
+ "CircleRight": [512, 512, [], "regular", "M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 151.2c-4.2-4.6-10.1-7.2-16.4-7.2C266 144 256 154 256 166.3l0 41.7-96 0c-17.7 0-32 14.3-32 32l0 32c0 17.7 14.3 32 32 32l96 0 0 41.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.4-7.2l84-91c3.5-3.8 5.4-8.7 5.4-13.9s-1.9-10.1-5.4-13.9l-84-91z"],
15342
+ "CircleUp": [512, 512, [], "regular", "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM151.2 217.4c-4.6 4.2-7.2 10.1-7.2 16.4c0 12.3 10 22.3 22.3 22.3l41.7 0 0 96c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-96 41.7 0c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.2-16.4l-91-84c-3.8-3.5-8.7-5.4-13.9-5.4s-10.1 1.9-13.9 5.4l-91 84z"],
15343
+ "CircleLeft": [512, 512, [], "regular", "M48 256a208 208 0 1 1 416 0A208 208 0 1 1 48 256zm464 0A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM217.4 376.9c4.2 4.5 10.1 7.1 16.3 7.1c12.3 0 22.3-10 22.3-22.3l0-57.7 96 0c17.7 0 32-14.3 32-32l0-32c0-17.7-14.3-32-32-32l-96 0 0-57.7c0-12.3-10-22.3-22.3-22.3c-6.2 0-12.1 2.6-16.3 7.1L117.5 242.2c-3.5 3.8-5.5 8.7-5.5 13.8s2 10.1 5.5 13.8l99.9 107.1z"],
15344
+ "CircleDown": [512, 512, [], "regular", "M256 464a208 208 0 1 1 0-416 208 208 0 1 1 0 416zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM376.9 294.6c4.5-4.2 7.1-10.1 7.1-16.3c0-12.3-10-22.3-22.3-22.3L304 256l0-96c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32l0 96-57.7 0C138 256 128 266 128 278.3c0 6.2 2.6 12.1 7.1 16.3l107.1 99.9c3.8 3.5 8.7 5.5 13.8 5.5s10.1-2 13.8-5.5l107.1-99.9z"],
14715
15345
  "WindowRestore": [512, 512, [], "solid", "M432 48L208 48c-17.7 0-32 14.3-32 32l0 16-48 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-48 16 0c17.7 0 32-14.3 32-32l0-224c0-17.7-14.3-32-32-32zM48 448c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-192L48 256l0 192zM64 128l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64z"],
14716
15346
  "WindowMaximize": [512, 512, [], "solid", "M.3 89.5C.1 91.6 0 93.8 0 96L0 224 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-192 0-128c0-35.3-28.7-64-64-64L64 32c-2.2 0-4.4 .1-6.5 .3c-9.2 .9-17.8 3.8-25.5 8.2C21.8 46.5 13.4 55.1 7.7 65.5c-3.9 7.3-6.5 15.4-7.4 24zM48 224l416 0 0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192z"],
14717
15347
  "WindowMinimize": [512, 512, [], "solid", "M24 432c-13.3 0-24 10.7-24 24s10.7 24 24 24l464 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 432z"],
@@ -14770,44 +15400,69 @@ LX.ICONS = {
14770
15400
  "Folder": [512, 512, [], "solid", "M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H288c-10.1 0-19.6-4.7-25.6-12.8L243.2 57.6C231.1 41.5 212.1 32 192 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z"],
14771
15401
  "FolderOpen": [576, 512, [], "solid", "M384 480l48 0c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224l-400 0c-11.4 0-21.9 6-27.6 15.9L48 357.1 48 96c0-8.8 7.2-16 16-16l117.5 0c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8L416 144c8.8 0 16 7.2 16 16l0 32 48 0 0-32c0-35.3-28.7-64-64-64L298.5 96c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l23.7 0L384 480z"],
14772
15402
  "FolderClosed": [512, 512, [], "solid", "M448 480L64 480c-35.3 0-64-28.7-64-64L0 192l512 0 0 224c0 35.3-28.7 64-64 64zm64-320L0 160 0 96C0 60.7 28.7 32 64 32l128 0c20.1 0 39.1 9.5 51.2 25.6l19.2 25.6c6 8.1 15.5 12.8 25.6 12.8l160 0c35.3 0 64 28.7 64 64z"],
14773
- "Play": [384, 512, [], "solid", "M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80L0 432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"],
14774
- "Pause": [320, 512, [], "solid", "M48 64C21.5 64 0 85.5 0 112L0 400c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48L48 64zm192 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48l-32 0z"],
15403
+ "Function": [384, 512, [], "solid", "M314.7 32c-38.8 0-73.7 23.3-88.6 59.1L170.7 224 64 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l80 0L98.9 396.3c-5 11.9-16.6 19.7-29.5 19.7L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l37.3 0c38.8 0 73.7-23.3 88.6-59.1L213.3 288 320 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-80 0 45.1-108.3c5-11.9 16.6-19.7 29.5-19.7L352 96c17.7 0 32-14.3 32-32s-14.3-32-32-32l-37.3 0z"],
14775
15404
  "Stop": [384, 512, [], "solid", "M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"],
14776
15405
  "Image": [512, 512, [], "solid", "M448 80c8.8 0 16 7.2 16 16l0 319.8-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3L48 96c0-8.8 7.2-16 16-16l384 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"],
14777
15406
  "Images": [576, 512, [], "solid", "M160 80l352 0c8.8 0 16 7.2 16 16l0 224c0 8.8-7.2 16-16 16l-21.2 0L388.1 178.9c-4.4-6.8-12-10.9-20.1-10.9s-15.7 4.1-20.1 10.9l-52.2 79.8-12.4-16.9c-4.5-6.2-11.7-9.8-19.4-9.8s-14.8 3.6-19.4 9.8L175.6 336 160 336c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16zM96 96l0 224c0 35.3 28.7 64 64 64l352 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L160 32c-35.3 0-64 28.7-64 64zM48 120c0-13.3-10.7-24-24-24S0 106.7 0 120L0 344c0 75.1 60.9 136 136 136l320 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-320 0c-48.6 0-88-39.4-88-88l0-224zm208 24a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"],
14778
- "Function": [384, 512, [], "solid", "M314.7 32c-38.8 0-73.7 23.3-88.6 59.1L170.7 224 64 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l80 0L98.9 396.3c-5 11.9-16.6 19.7-29.5 19.7L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l37.3 0c38.8 0 73.7-23.3 88.6-59.1L213.3 288 320 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-80 0 45.1-108.3c5-11.9 16.6-19.7 29.5-19.7L352 96c17.7 0 32-14.3 32-32s-14.3-32-32-32l-37.3 0z"],
15407
+ "Info": [512, 512, [], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"],
14779
15408
  "Bone": [576, 512, [], "solid", "M153.7 144.8c6.9 16.3 20.6 31.2 38.3 31.2l192 0c17.7 0 31.4-14.9 38.3-31.2C434.4 116.1 462.9 96 496 96c44.2 0 80 35.8 80 80c0 30.4-17 56.9-42 70.4c-3.6 1.9-6 5.5-6 9.6s2.4 7.7 6 9.6c25 13.5 42 40 42 70.4c0 44.2-35.8 80-80 80c-33.1 0-61.6-20.1-73.7-48.8C415.4 350.9 401.7 336 384 336l-192 0c-17.7 0-31.4 14.9-38.3 31.2C141.6 395.9 113.1 416 80 416c-44.2 0-80-35.8-80-80c0-30.4 17-56.9 42-70.4c3.6-1.9 6-5.5 6-9.6s-2.4-7.7-6-9.6C17 232.9 0 206.4 0 176c0-44.2 35.8-80 80-80c33.1 0 61.6 20.1 73.7 48.8z"],
14780
15409
  "Puzzle": [512, 512, [], "solid", "M192 104.8c0-9.2-5.8-17.3-13.2-22.8C167.2 73.3 160 61.3 160 48c0-26.5 28.7-48 64-48s64 21.5 64 48c0 13.3-7.2 25.3-18.8 34c-7.4 5.5-13.2 13.6-13.2 22.8c0 12.8 10.4 23.2 23.2 23.2l56.8 0c26.5 0 48 21.5 48 48l0 56.8c0 12.8 10.4 23.2 23.2 23.2c9.2 0 17.3-5.8 22.8-13.2c8.7-11.6 20.7-18.8 34-18.8c26.5 0 48 28.7 48 64s-21.5 64-48 64c-13.3 0-25.3-7.2-34-18.8c-5.5-7.4-13.6-13.2-22.8-13.2c-12.8 0-23.2 10.4-23.2 23.2L384 464c0 26.5-21.5 48-48 48l-56.8 0c-12.8 0-23.2-10.4-23.2-23.2c0-9.2 5.8-17.3 13.2-22.8c11.6-8.7 18.8-20.7 18.8-34c0-26.5-28.7-48-64-48s-64 21.5-64 48c0 13.3 7.2 25.3 18.8 34c7.4 5.5 13.2 13.6 13.2 22.8c0 12.8-10.4 23.2-23.2 23.2L48 512c-26.5 0-48-21.5-48-48L0 343.2C0 330.4 10.4 320 23.2 320c9.2 0 17.3 5.8 22.8 13.2C54.7 344.8 66.7 352 80 352c26.5 0 48-28.7 48-64s-21.5-64-48-64c-13.3 0-25.3 7.2-34 18.8C40.5 250.2 32.4 256 23.2 256C10.4 256 0 245.6 0 232.8L0 176c0-26.5 21.5-48 48-48l120.8 0c12.8 0 23.2-10.4 23.2-23.2z"],
14781
15410
  "Lock": [448, 512, [], "solid", "M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z"],
14782
15411
  "LockOpen": [576, 512, [], "solid", "M352 144c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48C576 64.5 511.5 0 432 0S288 64.5 288 144l0 48L64 192c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-32 0 0-48z"],
14783
15412
  "Shuffle": [512, 512, [], "solid", "M403.8 34.4c12-5 25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-10.1 0-19.6 4.7-25.6 12.8L284 229.3 244 176l31.2-41.6C293.3 110.2 321.8 96 352 96l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6zM164 282.7L204 336l-31.2 41.6C154.7 401.8 126.2 416 96 416l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0c10.1 0 19.6-4.7 25.6-12.8L164 282.7zm274.6 188c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-30.2 0-58.7-14.2-76.8-38.4L121.6 172.8c-6-8.1-15.5-12.8-25.6-12.8l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0c30.2 0 58.7 14.2 76.8 38.4L326.4 339.2c6 8.1 15.5 12.8 25.6 12.8l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64z"],
15413
+ "Play": [384, 512, [], "solid", "M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80L0 432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"],
15414
+ "Pause": [320, 512, [], "solid", "M48 64C21.5 64 0 85.5 0 112L0 400c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48L48 64zm192 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48l-32 0z"],
14784
15415
  "LogIn": [512, 512, [], "solid", "M352 96l64 0c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0c53 0 96-43 96-96l0-256c0-53-43-96-96-96l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm-9.4 182.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L242.7 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128z"],
14785
15416
  "LogOut": [512, 512, [], "solid", "M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 192 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128zM160 96c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 32C43 32 0 75 0 128L0 384c0 53 43 96 96 96l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l64 0z"],
14786
15417
  "MousePointer": [320, 512, [], "solid", "M0 55.2L0 426c0 12.2 9.9 22 22 22c6.3 0 12.4-2.7 16.6-7.5L121.2 346l58.1 116.3c7.9 15.8 27.1 22.2 42.9 14.3s22.2-27.1 14.3-42.9L179.8 320l118.1 0c12.2 0 22.1-9.9 22.1-22.1c0-6.3-2.7-12.3-7.4-16.5L38.6 37.9C34.3 34.1 28.9 32 23.2 32C10.4 32 0 42.4 0 55.2z"],
14787
15418
  "User": [512, 512, [], "solid", "M256 288A144 144 0 1 0 256 0a144 144 0 1 0 0 288zm-94.7 32C72.2 320 0 392.2 0 481.3c0 17 13.8 30.7 30.7 30.7l450.6 0c17 0 30.7-13.8 30.7-30.7C512 392.2 439.8 320 350.7 320l-189.4 0z"],
14788
15419
  "HardDriveDownload": [512, 512, [], "solid", "M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"],
14789
15420
  "HardDriveUpload": [512, 512, [], "solid", "M288 109.3L288 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-242.7-73.4 73.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l128-128c12.5-12.5 32.8-12.5 45.3 0l128 128c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L288 109.3zM64 352l128 0c0 35.3 28.7 64 64 64s64-28.7 64-64l128 0c35.3 0 64 28.7 64 64l0 32c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64l0-32c0-35.3 28.7-64 64-64zM432 456a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"],
14790
- "CirclePlay": [512, 512, [], "solid", "M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c7.6-4.2 16.8-4.1 24.3 .5l144 88c7.1 4.4 11.5 12.1 11.5 20.5s-4.4 16.1-11.5 20.5l-144 88c-7.4 4.5-16.7 4.7-24.3 .5s-12.3-12.2-12.3-20.9l0-176c0-8.7 4.7-16.7 12.3-20.9z"],
14791
- "CircleStop": [512, 512, [], "solid", "M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm192-96l128 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32z"],
15421
+ "CircleCheck": [512, 512, ["CheckCircle2"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"],
15422
+ "CirclePlay": [512, 512, [], "solid", "M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"],
15423
+ "CirclePause": [512, 512, [], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM224 192l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32s32 14.3 32 32zm128 0l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32s32 14.3 32 32z"],
15424
+ "CirclePlus": [512, 512, ["PlusCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z"],
15425
+ "CircleMinus": [512, 512, ["MinusCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"],
15426
+ "CircleStop": [512, 512, [], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM192 160l128 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32z"],
14792
15427
  "CircleDot": [512, 512, [], "solid", "M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"],
15428
+ "CircleHelp": [512, 512, ["HelpCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3l58.3 0c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24l0-13.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1l-58.3 0c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"],
15429
+ "CircleArrowUp": [512, 512, ["ArrowUpCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM385 215c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-71-71L280 392c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-214.1-71 71c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 103c9.4-9.4 24.6-9.4 33.9 0L385 215z"],
15430
+ "CircleArrowDown": [512, 512, ["ArrowDownCircle"], "solid", "M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM127 297c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l71 71L232 120c0-13.3 10.7-24 24-24s24 10.7 24 24l0 214.1 71-71c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 409c-9.4 9.4-24.6 9.4-33.9 0L127 297z"],
15431
+ "CircleArrowLeft": [512, 512, ["ArrowLeftCircle"], "solid", "M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM215 127c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-71 71L392 232c13.3 0 24 10.7 24 24s-10.7 24-24 24l-214.1 0 71 71c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L103 273c-9.4-9.4-9.4-24.6 0-33.9L215 127z"],
15432
+ "CircleArrowRight": [512, 512, ["ArrowRightCircle"], "solid", "M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM297 385c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l71-71L120 280c-13.3 0-24-10.7-24-24s10.7-24 24-24l214.1 0-71-71c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L409 239c9.4 9.4 9.4 24.6 0 33.9L297 385z"],
15433
+ "CircleAlert": [512, 512, ["AlertCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"],
15434
+ "CircleUser": [512, 512, ["UserCircle"], "solid", "M399 384.2C376.9 345.8 335.4 320 288 320l-64 0c-47.4 0-88.9 25.8-111 64.2c35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144z"],
15435
+ "CircleChevronRight": [512, 512, ["ChevronRightCircle"], "solid", "M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM241 377c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l87-87-87-87c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L345 239c9.4 9.4 9.4 24.6 0 33.9L241 377z"],
15436
+ "CircleChevronDown": [512, 512, ["ChevronDownCircle"], "solid", "M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM135 241c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l87 87 87-87c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 345c-9.4 9.4-24.6 9.4-33.9 0L135 241z"],
15437
+ "CircleChevronUp": [512, 512, ["ChevronUpCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM377 271c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-87-87-87 87c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 167c9.4-9.4 24.6-9.4 33.9 0L377 271z"],
15438
+ "CircleChevronLeft": [512, 512, ["ChevronLeftCircle"], "solid", "M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM271 135c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-87 87 87 87c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L167 273c-9.4-9.4-9.4-24.6 0-33.9L271 135z"],
15439
+ "CircleX": [512, 512, ["XCircle"], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"],
14793
15440
  "Apple": [384, 512, [], "solid", "M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"],
14794
15441
  "Chrome": [512, 512, [], "solid", "M0 256C0 209.4 12.47 165.6 34.27 127.1L144.1 318.3C166 357.5 207.9 384 256 384C270.3 384 283.1 381.7 296.8 377.4L220.5 509.6C95.9 492.3 0 385.3 0 256zM365.1 321.6C377.4 302.4 384 279.1 384 256C384 217.8 367.2 183.5 340.7 160H493.4C505.4 189.6 512 222.1 512 256C512 397.4 397.4 511.1 256 512L365.1 321.6zM477.8 128H256C193.1 128 142.3 172.1 130.5 230.7L54.19 98.47C101 38.53 174 0 256 0C350.8 0 433.5 51.48 477.8 128V128zM168 256C168 207.4 207.4 168 256 168C304.6 168 344 207.4 344 256C344 304.6 304.6 344 256 344C207.4 344 168 304.6 168 256z"],
14795
15442
  "Facebook": [512, 512, [], "solid", "M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256C0 376 82.7 476.8 194.2 504.5V334.2H141.4V256h52.8V222.3c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287V510.1C413.8 494.8 512 386.9 512 256h0z"],
14796
15443
  "Github": [496, 512, [], "solid", "M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"],
14797
15444
  "Youtube": [576, 512, [], "solid", "M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"],
14798
- // Some Aliases
14799
- "VR": "VrCardboard",
14800
- "Script": "Scroll",
14801
- "Media": "PhotoFilm",
14802
- "CC": "ClosedCaptioning",
14803
- "ASL": "HandsAslInterpreting",
14804
- "HandRock": "HandBackFist",
14805
- "Chain": "Link",
14806
- "ChainBroken": "LinkOff",
14807
- "ChainOff": "LinkOff",
14808
- "Unlink": "LinkOff"
15445
+ "CircleRight@solid": [512, 512, [], "solid", "M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zm395.3 11.3l-112 112c-4.6 4.6-11.5 5.9-17.4 3.5s-9.9-8.3-9.9-14.8l0-64-96 0c-17.7 0-32-14.3-32-32l0-32c0-17.7 14.3-32 32-32l96 0 0-64c0-6.5 3.9-12.3 9.9-14.8s12.9-1.1 17.4 3.5l112 112c6.2 6.2 6.2 16.4 0 22.6z"],
15446
+ "CircleUp@solid": [512, 512, [], "solid", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm11.3-395.3l112 112c4.6 4.6 5.9 11.5 3.5 17.4s-8.3 9.9-14.8 9.9l-64 0 0 96c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-96-64 0c-6.5 0-12.3-3.9-14.8-9.9s-1.1-12.9 3.5-17.4l112-112c6.2-6.2 16.4-6.2 22.6 0z"],
15447
+ "CircleLeft@solid": [512, 512, [], "solid", "M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM116.7 244.7l112-112c4.6-4.6 11.5-5.9 17.4-3.5s9.9 8.3 9.9 14.8l0 64 96 0c17.7 0 32 14.3 32 32l0 32c0 17.7-14.3 32-32 32l-96 0 0 64c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5l-112-112c-6.2-6.2-6.2-16.4 0-22.6z"],
15448
+ "CircleDown@solid": [512, 512, [], "solid", "M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM244.7 395.3l-112-112c-4.6-4.6-5.9-11.5-3.5-17.4s8.3-9.9 14.8-9.9l64 0 0-96c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 96 64 0c6.5 0 12.3 3.9 14.8 9.9s1.1 12.9-3.5 17.4l-112 112c-6.2 6.2-16.4 6.2-22.6 0z"],
15449
+ "PaperPlane@solid": [512, 512, [], "solid", "M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480l0-83.6c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"],
14809
15450
  }
14810
15451
 
15452
+ // Generate Alias icons
15453
+
15454
+ LX.ICONS = (() => {
15455
+ const aliasIcons = {};
15456
+
15457
+ for( let i in RAW_ICONS )
15458
+ {
15459
+ const aliases = RAW_ICONS[ i ][ 2 ];
15460
+ aliases.forEach( a => aliasIcons[ a ] = i );
15461
+ }
15462
+
15463
+ return { ...RAW_ICONS, ...aliasIcons };
15464
+ })();
15465
+
14811
15466
  // Alias for Lucide Icons
14812
15467
  LX.LucideIconAlias = {
14813
15468
  "Stop": "Square",