File Manager - Version 5.2.0

Version Description

= 5.1.9 = + No special requirements.

Download this release

Release Info

Developer aihimel
Plugin Icon 128x128 File Manager
Version 5.2.0
Comparing to
See all releases

Code changes from version 5.1.2 to 5.2.0

BootStart/BootStart.php CHANGED
@@ -3,13 +3,6 @@
3
  // Security Check
4
  defined('ABSPATH') or die();
5
 
6
- // Directory Seperator
7
- if( !defined( 'DS' ) ){
8
-
9
- PHP_OS == "Windows" || PHP_OS == "WINNT" ? define("DS", "\\") : define("DS", "/");
10
-
11
- }
12
-
13
  /**
14
  *
15
  * The starter file that holds everything togather.
@@ -100,7 +93,7 @@ abstract class FM_BootStart{
100
  function __construct($name){
101
 
102
  // Assigning name
103
- $this->name = trim($name);
104
 
105
  // Assigning prefix
106
  $this->prefix = str_replace( ' ', '-', strtolower(trim($this->name)) );
@@ -263,8 +256,8 @@ abstract class FM_BootStart{
263
  if(!defined('FILE_MANAGER_PREMIUM')){
264
  add_submenu_page(
265
  'file-manager', // Parent Slug
266
- 'File Manager Permission System(pro)', // Page title
267
- 'Permission System', // Menu title
268
  'manage_options', // User capabilities
269
  'file-manager-permission-system', // Menu Slug
270
  function(){include plugin_dir_path( __FILE__ ) . ".." . DS . "views" . DS . "admin" . DS . "permission_system.php";}
3
  // Security Check
4
  defined('ABSPATH') or die();
5
 
 
 
 
 
 
 
 
6
  /**
7
  *
8
  * The starter file that holds everything togather.
93
  function __construct($name){
94
 
95
  // Assigning name
96
+ $this->name = __(trim($name), 'file-manager');
97
 
98
  // Assigning prefix
99
  $this->prefix = str_replace( ' ', '-', strtolower(trim($this->name)) );
256
  if(!defined('FILE_MANAGER_PREMIUM')){
257
  add_submenu_page(
258
  'file-manager', // Parent Slug
259
+ __('File Manager Permission System(pro)', 'file-manager'), // Page title
260
+ __('Permission System', 'file-manager'), // Menu title
261
  'manage_options', // User capabilities
262
  'file-manager-permission-system', // Menu Slug
263
  function(){include plugin_dir_path( __FILE__ ) . ".." . DS . "views" . DS . "admin" . DS . "permission_system.php";}
elFinder/LICENSE.md CHANGED
File without changes
elFinder/css/elfinder.full.css CHANGED
@@ -1,9 +1,9 @@
1
  /*!
2
  * elFinder - file manager for web
3
- * Version 2.1.46 (2019-02-23)
4
  * http://elfinder.org
5
  *
6
- * Copyright 2009-2019, Studio 42
7
  * Licensed under a 3-clauses BSD license
8
  */
9
 
@@ -944,8 +944,42 @@ ul.elfinder-help-integrations a:hover {
944
  z-index: 100;
945
  }
946
 
947
- /* common container */
948
- .elfinder {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
949
  padding: 0;
950
  position: relative;
951
  display: block;
@@ -1150,6 +1184,12 @@ ul.elfinder-help-integrations a:hover {
1150
  opacity: .8;
1151
  }
1152
 
 
 
 
 
 
 
1153
  .elfinder.elfinder-ltr div.elfinder-bottomtray {
1154
  left: 0;
1155
  }
@@ -1165,6 +1205,24 @@ ul.elfinder-help-integrations a:hover {
1165
  padding: 2px 4px;
1166
  }
1167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1168
  /* File: /css/contextmenu.css */
1169
  /* menu and submenu */
1170
  .elfinder .elfinder-contextmenu,
@@ -2450,7 +2508,7 @@ ul.elfinder-help-integrations a:hover {
2450
  }
2451
 
2452
  .elfinder .elfinder-cwd table td {
2453
- padding: 4px 12px;
2454
  white-space: pre;
2455
  overflow: hidden;
2456
  text-align: right;
@@ -2521,6 +2579,12 @@ tr.elfinder-cwd-file td .elfinder-cwd-select {
2521
  margin-right: 8px;
2522
  }
2523
 
 
 
 
 
 
 
2524
  .elfinder-ltr .elfinder-cwd-view-list .elfinder-cwd-filename {
2525
  padding-left: 23px;
2526
  }
@@ -2874,7 +2938,6 @@ tr.elfinder-cwd-file td .elfinder-cwd-select {
2874
  /* content */
2875
  .std42-dialog .ui-dialog-content {
2876
  padding: .3em .5em;
2877
- box-sizing: border-box;
2878
  }
2879
 
2880
  .elfinder .std42-dialog .ui-dialog-content,
@@ -2980,12 +3043,48 @@ tr.elfinder-cwd-file td .elfinder-cwd-select {
2980
 
2981
  .elfinder-dialog-notify .ui-dialog-titlebar {
2982
  height: 5px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2983
  }
2984
 
2985
- .elfinder-dialog-notify .ui-dialog-titlebar-close {
 
 
 
 
 
 
 
 
 
2986
  display: none;
2987
  }
2988
 
 
 
 
 
2989
  .elfinder-dialog-notify .ui-dialog-content {
2990
  padding: 0;
2991
  }
@@ -3034,6 +3133,22 @@ tr.elfinder-cwd-file td .elfinder-cwd-select {
3034
  border-radius: 2px;
3035
  }
3036
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3037
  /* icons */
3038
  .elfinder-dialog-icon-open,
3039
  .elfinder-dialog-icon-readdir,
@@ -4101,6 +4216,12 @@ button.elfinder-info-button {
4101
  color: #fff;
4102
  }
4103
 
 
 
 
 
 
 
4104
  /* file icon */
4105
  .elfinder-quicklook .elfinder-cwd-icon {
4106
  position: absolute;
@@ -4135,7 +4256,7 @@ button.elfinder-info-button {
4135
  }
4136
 
4137
  .elfinder-ltr .elfinder-quicklook .elfinder-cwd-icon:after {
4138
- left: -20px;
4139
  }
4140
 
4141
  .elfinder-ltr .elfinder-navdock .elfinder-quicklook .elfinder-cwd-icon:after {
@@ -4149,13 +4270,14 @@ button.elfinder-info-button {
4149
 
4150
  .elfinder-rtl .elfinder-quicklook .elfinder-cwd-icon:after {
4151
  left: auto;
4152
- right: 46px;
4153
  }
4154
 
4155
  /* image in preview */
4156
- .elfinder-quicklook-preview img {
 
4157
  display: block;
4158
- margin: 0 auto;
4159
  }
4160
 
4161
  /* navigation bar on quicklook window bottom */
@@ -4235,6 +4357,26 @@ button.elfinder-info-button {
4235
  display: none;
4236
  }
4237
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4238
  /* text files preview wrapper */
4239
  .elfinder-quicklook-preview-text-wrapper {
4240
  width: 100%;
@@ -4269,6 +4411,8 @@ pre.elfinder-quicklook-preview-text.prettyprint {
4269
  margin: 0;
4270
  padding: 3px 9px;
4271
  border: none;
 
 
4272
  -o-tab-size: 4;
4273
  -moz-tab-size: 4;
4274
  tab-size: 4;
@@ -4323,6 +4467,13 @@ embed.elfinder-quicklook-preview-audio {
4323
  height: 100%;
4324
  }
4325
 
 
 
 
 
 
 
 
4326
  /* allow user select */
4327
  .elfinder .elfinder-quicklook .elfinder-quicklook-info *,
4328
  .elfinder .elfinder-quicklook .elfinder-quicklook-preview * {
@@ -4943,10 +5094,6 @@ embed.elfinder-quicklook-preview-audio {
4943
  background-position: 0 -1008px;
4944
  }
4945
 
4946
- .elfinder-button-icon-email{
4947
- background-image: url("../img/email.png");
4948
- }
4949
-
4950
  /* button icon mirroring for rtl */
4951
  .elfinder-rtl .elfinder-button-icon-back,
4952
  .elfinder-rtl .elfinder-button-icon-forward,
1
  /*!
2
  * elFinder - file manager for web
3
+ * Version 2.1.57 (2021-01-08)
4
  * http://elfinder.org
5
  *
6
+ * Copyright 2009-2021, Studio 42
7
  * Licensed under a 3-clauses BSD license
8
  */
9
 
944
  z-index: 100;
945
  }
946
 
947
+ /* style reset */
948
+ div.elfinder *,
949
+ div.elfinder :after,
950
+ div.elfinder :before {
951
+ box-sizing: content-box;
952
+ }
953
+
954
+ div.elfinder fieldset {
955
+ display: block;
956
+ margin-inline-start: 2px;
957
+ margin-inline-end: 2px;
958
+ padding-block-start: 0.35em;
959
+ padding-inline-start: 0.75em;
960
+ padding-inline-end: 0.75em;
961
+ padding-block-end: 0.625em;
962
+ min-inline-size: min-content;
963
+ border-width: 2px;
964
+ border-style: groove;
965
+ border-color: threedface;
966
+ border-image: initial;
967
+ }
968
+
969
+ div.elfinder legend {
970
+ display: block;
971
+ padding-inline-start: 2px;
972
+ padding-inline-end: 2px;
973
+ border-width: initial;
974
+ border-style: none;
975
+ border-color: initial;
976
+ border-image: initial;
977
+ width: auto;
978
+ margin-bottom: 0;
979
+ }
980
+
981
+ /* base container */
982
+ div.elfinder {
983
  padding: 0;
984
  position: relative;
985
  display: block;
1184
  opacity: .8;
1185
  }
1186
 
1187
+ .elfinder div.elfinder-bottomtray > div {
1188
+ top: initial;
1189
+ right: initial;
1190
+ left: initial;
1191
+ }
1192
+
1193
  .elfinder.elfinder-ltr div.elfinder-bottomtray {
1194
  left: 0;
1195
  }
1205
  padding: 2px 4px;
1206
  }
1207
 
1208
+ /* progressbar */
1209
+ .elfinder-ui-progressbar {
1210
+ pointer-events: none;
1211
+ position: absolute;
1212
+ width: 0;
1213
+ height: 2px;
1214
+ top: 0px;
1215
+ border-radius: 2px;
1216
+ filter: blur(1px);
1217
+ }
1218
+
1219
+ .elfinder-ltr .elfinder-ui-progressbar {
1220
+ left: 0;
1221
+ }
1222
+
1223
+ .elfinder-rtl .elfinder-ui-progressbar {
1224
+ right: 0;
1225
+ }
1226
  /* File: /css/contextmenu.css */
1227
  /* menu and submenu */
1228
  .elfinder .elfinder-contextmenu,
2508
  }
2509
 
2510
  .elfinder .elfinder-cwd table td {
2511
+ padding: 0 12px;
2512
  white-space: pre;
2513
  overflow: hidden;
2514
  text-align: right;
2579
  margin-right: 8px;
2580
  }
2581
 
2582
+ .elfinder-cwd-view-list .elfinder-cwd-filename {
2583
+ padding-top: 4px;
2584
+ padding-bottom: 4px;
2585
+ display: inline-block;
2586
+ }
2587
+
2588
  .elfinder-ltr .elfinder-cwd-view-list .elfinder-cwd-filename {
2589
  padding-left: 23px;
2590
  }
2938
  /* content */
2939
  .std42-dialog .ui-dialog-content {
2940
  padding: .3em .5em;
 
2941
  }
2942
 
2943
  .elfinder .std42-dialog .ui-dialog-content,
3043
 
3044
  .elfinder-dialog-notify .ui-dialog-titlebar {
3045
  height: 5px;
3046
+ overflow: hidden;
3047
+ }
3048
+
3049
+ .elfinder.elfinder-touch > .elfinder-dialog-notify .ui-dialog-titlebar {
3050
+ height: 10px;
3051
+ }
3052
+
3053
+ .elfinder > .elfinder-dialog-notify .ui-dialog-titlebar .elfinder-titlebar-button {
3054
+ top: 2px;
3055
+ }
3056
+
3057
+ .elfinder.elfinder-touch > .elfinder-dialog-notify .ui-dialog-titlebar .elfinder-titlebar-button {
3058
+ top: 4px;
3059
+ }
3060
+
3061
+ .elfinder > .elfinder-dialog-notify .ui-dialog-titlebar .elfinder-titlebar-button {
3062
+ left: -18px;
3063
+ right: 18px;
3064
+ }
3065
+
3066
+ .elfinder > .elfinder-dialog-notify .ui-dialog-titlebar .elfinder-titlebar-button.elfinder-titlebar-button-right {
3067
+ left: 18px;
3068
+ right: -18px;
3069
  }
3070
 
3071
+ .ui-dialog-titlebar .elfinder-ui-progressbar {
3072
+ position: absolute;
3073
+ top: 17px;
3074
+ }
3075
+
3076
+ .elfinder-touch .ui-dialog-titlebar .elfinder-ui-progressbar {
3077
+ top: 26px;
3078
+ }
3079
+
3080
+ .elfinder-dialog-notify.elfinder-titlebar-button-hide .ui-dialog-titlebar-close {
3081
  display: none;
3082
  }
3083
 
3084
+ .elfinder-dialog-notify.elfinder-dialog-minimized.elfinder-titlebar-button-hide .ui-dialog-titlebar span.elfinder-dialog-title {
3085
+ max-width: initial;
3086
+ }
3087
+
3088
  .elfinder-dialog-notify .ui-dialog-content {
3089
  padding: 0;
3090
  }
3133
  border-radius: 2px;
3134
  }
3135
 
3136
+ .elfinder-notify-cancel {
3137
+ position: relative;
3138
+ top: -18px;
3139
+ right: calc(-50% + 15px);
3140
+ }
3141
+
3142
+ .elfinder-notify-cancel .ui-icon-close {
3143
+ background-position: -80px -128px;
3144
+ width: 18px;
3145
+ height: 18px;
3146
+ border-radius: 9px;
3147
+ border: none;
3148
+ background-position: -80px -128px;
3149
+ cursor: pointer;
3150
+ }
3151
+
3152
  /* icons */
3153
  .elfinder-dialog-icon-open,
3154
  .elfinder-dialog-icon-readdir,
4216
  color: #fff;
4217
  }
4218
 
4219
+ .elfinder-quicklook-info-progress {
4220
+ width: 0;
4221
+ height: 4px;
4222
+ border-radius: 2px;
4223
+ }
4224
+
4225
  /* file icon */
4226
  .elfinder-quicklook .elfinder-cwd-icon {
4227
  position: absolute;
4256
  }
4257
 
4258
  .elfinder-ltr .elfinder-quicklook .elfinder-cwd-icon:after {
4259
+ left: -42px;
4260
  }
4261
 
4262
  .elfinder-ltr .elfinder-navdock .elfinder-quicklook .elfinder-cwd-icon:after {
4270
 
4271
  .elfinder-rtl .elfinder-quicklook .elfinder-cwd-icon:after {
4272
  left: auto;
4273
+ right: 42px;
4274
  }
4275
 
4276
  /* image in preview */
4277
+ .elfinder-quicklook-preview > img,
4278
+ .elfinder-quicklook-preview > div > canvas {
4279
  display: block;
4280
+ margin: auto;
4281
  }
4282
 
4283
  /* navigation bar on quicklook window bottom */
4357
  display: none;
4358
  }
4359
 
4360
+ /* text encoding selector */
4361
+ .elfinder-quicklook-encoding {
4362
+ height: 40px;
4363
+ }
4364
+ .elfinder-quicklook-encoding > select {
4365
+ color: #fff;
4366
+ background: #000;
4367
+ border: 0;
4368
+ font-size: 12px;
4369
+ max-width: 100px;
4370
+ display: inline-block;
4371
+ position: relative;
4372
+ top: 6px;
4373
+ left: 5px;
4374
+ }
4375
+ .elfinder-navdock .elfinder-quicklook .elfinder-quicklook-encoding {
4376
+ display: none;
4377
+ }
4378
+
4379
+
4380
  /* text files preview wrapper */
4381
  .elfinder-quicklook-preview-text-wrapper {
4382
  width: 100%;
4411
  margin: 0;
4412
  padding: 3px 9px;
4413
  border: none;
4414
+ overflow: visible;
4415
+ background: #fff;
4416
  -o-tab-size: 4;
4417
  -moz-tab-size: 4;
4418
  tab-size: 4;
4467
  height: 100%;
4468
  }
4469
 
4470
+ /* video.js error message */
4471
+ .elfinder-quicklook-preview .vjs-error .vjs-error-display .vjs-modal-dialog-content {
4472
+ font-size: 12pt;
4473
+ padding: 0;
4474
+ color: #fff;
4475
+ }
4476
+
4477
  /* allow user select */
4478
  .elfinder .elfinder-quicklook .elfinder-quicklook-info *,
4479
  .elfinder .elfinder-quicklook .elfinder-quicklook-preview * {
5094
  background-position: 0 -1008px;
5095
  }
5096
 
 
 
 
 
5097
  /* button icon mirroring for rtl */
5098
  .elfinder-rtl .elfinder-button-icon-back,
5099
  .elfinder-rtl .elfinder-button-icon-forward,
elFinder/css/elfinder.min.css CHANGED
@@ -1,9 +1,9 @@
1
  /*!
2
  * elFinder - file manager for web
3
- * Version 2.1.46 (2019-02-23)
4
  * http://elfinder.org
5
  *
6
- * Copyright 2009-2019, Studio 42
7
  * Licensed under a 3-clauses BSD license
8
  */
9
- .elfinder-resize-container{margin-top:.3em}.elfinder-resize-type{float:left;margin-bottom:.4em}.elfinder-resize-control{float:left}.elfinder-resize-control input[type=number]{border:1px solid #aaa;text-align:right;width:4.5em}.elfinder-resize-control input.elfinder-resize-bg{text-align:center;width:5em;direction:ltr}.elfinder-dialog-resize .elfinder-resize-control-panel{margin-top:10px}.elfinder-dialog-resize .elfinder-resize-imgrotate,.elfinder-dialog-resize .elfinder-resize-pallet{cursor:pointer}.elfinder-dialog-resize .elfinder-resize-picking{cursor:crosshair}.elfinder-dialog-resize .elfinder-resize-grid8+button{padding-top:2px;padding-bottom:2px}.elfinder-resize-preview{width:400px;height:400px;padding:10px;background:#fff;border:1px solid #aaa;float:right;position:relative;overflow:hidden;text-align:left;direction:ltr}.elfinder-resize-handle,div.elfinder-cwd-wrapper-list tr.ui-state-default td{position:relative}.elfinder-resize-handle-hline,.elfinder-resize-handle-vline{position:absolute;background-image:url(../img/crop.gif)}.elfinder-resize-handle-hline{width:100%;height:1px!important;background-repeat:repeat-x}.elfinder-resize-handle-vline{width:1px!important;height:100%;background-repeat:repeat-y}.elfinder-resize-handle-hline-top{top:0;left:0}.elfinder-resize-handle-hline-bottom{bottom:0;left:0}.elfinder-resize-handle-vline-left{top:0;left:0}.elfinder-resize-handle-vline-right{top:0;right:0}.elfinder-resize-handle-point{position:absolute;width:8px;height:8px;border:1px solid #777;background:0 0}.elfinder-resize-handle-point-n{top:0;left:50%;margin-top:-5px;margin-left:-5px}.elfinder-resize-handle-point-e,.elfinder-resize-handle-point-ne{top:0;right:0;margin-top:-5px;margin-right:-5px}.elfinder-resize-handle-point-e{top:50%}.elfinder-resize-handle-point-se{bottom:0;right:0;margin-bottom:-5px;margin-right:-5px}.elfinder-resize-handle-point-s,.elfinder-resize-handle-point-sw{bottom:0;left:50%;margin-bottom:-5px;margin-left:-5px}.elfinder-resize-handle-point-sw{left:0}.elfinder-resize-handle-point-nw,.elfinder-resize-handle-point-w{top:50%;left:0;margin-top:-5px;margin-left:-5px}.elfinder-resize-handle-point-nw{top:0}.elfinder-dialog.elfinder-dialog-resize .ui-resizable-e{width:10px;height:100%}.elfinder-dialog.elfinder-dialog-resize .ui-resizable-s{width:100%;height:10px}.elfinder-resize-loading{position:absolute;width:200px;height:30px;top:50%;margin-top:-25px;left:50%;margin-left:-100px;text-align:center;background:url(../img/progress.gif) center bottom repeat-x}.elfinder-resize-row{margin-bottom:9px;position:relative}.elfinder-resize-label{float:left;width:80px;padding-top:3px}.elfinder-resize-checkbox-label{border:1px solid transparent}.elfinder-dialog-resize .elfinder-resize-whctrls{margin:-20px 5px 0}.elfinder-ltr .elfinder-dialog-resize .elfinder-resize-whctrls{float:right}.elfinder-help-team div,.elfinder-rtl .elfinder-dialog-resize .elfinder-resize-whctrls{float:left}.elfinder-dialog-resize .ui-resizable-e,.elfinder-dialog-resize .ui-resizable-w{height:100%;width:10px}.elfinder-dialog-resize .ui-resizable-n,.elfinder-dialog-resize .ui-resizable-s{width:100%;height:10px}.elfinder-dialog-resize .ui-resizable-e{margin-right:-7px}.elfinder-dialog-resize .ui-resizable-w{margin-left:-7px}.elfinder-dialog-resize .ui-resizable-s{margin-bottom:-7px}.elfinder-dialog-resize .ui-resizable-n{margin-top:-7px}.elfinder-dialog-resize .ui-resizable-ne,.elfinder-dialog-resize .ui-resizable-nw,.elfinder-dialog-resize .ui-resizable-se,.elfinder-dialog-resize .ui-resizable-sw{width:10px;height:10px}.elfinder-dialog-resize .ui-resizable-se{background:0 0;bottom:0;right:0;margin-right:-7px;margin-bottom:-7px}.elfinder-dialog-resize .ui-resizable-sw{margin-left:-7px;margin-bottom:-7px}.elfinder-dialog-resize .ui-resizable-ne{margin-right:-7px;margin-top:-7px}.elfinder-dialog-resize .ui-resizable-nw{margin-left:-7px;margin-top:-7px}.elfinder-touch .elfinder-dialog-resize .ui-resizable-n,.elfinder-touch .elfinder-dialog-resize .ui-resizable-s{height:20px}.elfinder-touch .elfinder-dialog-resize .ui-resizable-e,.elfinder-touch .elfinder-dialog-resize .ui-resizable-w{width:20px}.elfinder-touch .elfinder-dialog-resize .ui-resizable-ne,.elfinder-touch .elfinder-dialog-resize .ui-resizable-nw,.elfinder-touch .elfinder-dialog-resize .ui-resizable-se,.elfinder-touch .elfinder-dialog-resize .ui-resizable-sw{width:30px;height:30px}.elfinder-touch .elfinder-dialog-resize .elfinder-resize-preview .ui-resizable-se{width:30px;height:30px;margin:0}.elfinder-dialog-resize .ui-icon-grip-solid-vertical{position:absolute;top:50%;right:0;margin-top:-8px;margin-right:-11px}.elfinder-dialog-resize .ui-icon-grip-solid-horizontal{position:absolute;left:50%;bottom:0;margin-left:-8px;margin-bottom:-11px}.elfinder-dialog-resize .elfinder-resize-row .ui-buttonset{float:right}.elfinder-dialog-resize .elfinder-resize-degree input,.elfinder-dialog-resize input.elfinder-resize-quality,.elfinder-mobile .elfinder-resize-control input[type=number]{width:3.5em}.elfinder-mobile .elfinder-dialog-resize .elfinder-resize-degree input,.elfinder-mobile .elfinder-dialog-resize input.elfinder-resize-quality{width:2.5em}.elfinder-dialog-resize .elfinder-resize-degree button.ui-button{padding:6px 8px}.elfinder-dialog-resize button.ui-button span{padding:0}.elfinder-dialog-resize .elfinder-resize-jpgsize{font-size:90%}.ui-widget-content .elfinder-resize-container .elfinder-resize-rotate-slider{width:195px;margin:10px 7px;background-color:#fafafa}.elfinder-dialog-resize .elfinder-resize-type span.ui-checkboxradio-icon{display:none}.elfinder-resize-preset-container{box-sizing:border-box;border-radius:5px}.elfinder-file-edit{width:100%;height:100%;margin:0;padding:2px;border:1px solid #ccc;box-sizing:border-box;resize:none}.elfinder-touch .elfinder-file-edit{font-size:16px}.elfinder-dialog-edit .ui-dialog-content.elfinder-edit-editor{background-color:#fff}.elfinder-dialog-edit .ui-dialog-content.elfinder-edit-editor .elfinder-edit-imageeditor{width:100%;height:300px;max-height:100%;text-align:center}.elfinder-dialog-edit .ui-dialog-content.elfinder-edit-editor .elfinder-edit-imageeditor *{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;user-select:none}.elfinder-edit-imageeditor .tui-image-editor-main-container .tui-image-editor-main{top:0}.elfinder-edit-imageeditor .tui-image-editor-main-container .tui-image-editor-header{display:none}.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-crop .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-draw .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-filter .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-flip .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-icon .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-mask .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-rotate .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-shape .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-text .tui-image-editor-wrap{height:calc(100% - 150px)}.elfinder-touch.elfinder-fullscreen-native textarea.elfinder-file-edit{padding-bottom:20em;margin-bottom:-20em}.elfinder-dialog-edit .ui-dialog-buttonpane .elfinder-dialog-confirm-encoding{font-size:12px}.ui-dialog-buttonpane .ui-dialog-buttonset.elfinder-edit-extras{margin:0 1em 0 .2em;float:left}.ui-dialog-buttonpane .ui-dialog-buttonset.elfinder-edit-extras-quality{padding-top:6px}.ui-dialog-buttonpane .ui-dialog-buttonset.elfinder-edit-extras select{font-size:12px;margin-top:8px}.elfinder-dialog-edit .ui-dialog-buttonpane .ui-icon,.elfinder-edit-onlineconvert-bottom-btn button,.elfinder-edit-onlineconvert-button button,.elfinder-preference dt label{cursor:pointer}.elfinder-edit-spinner{position:absolute;top:50%;text-align:center;width:100%;font-size:16pt}.elfinder-dialog-edit .elfinder-edit-spinner .elfinder-spinner,.elfinder-dialog-edit .elfinder-edit-spinner .elfinder-spinner-text{float:none}.elfinder-dialog-edit .elfinder-toast>div{width:280px}.elfinder-edit-onlineconvert-button{display:inline-block;width:180px;min-height:30px;vertical-align:top}.elfinder-edit-onlineconvert-bottom-btn button.elfinder-button-ios-multiline{-webkit-appearance:none;border-radius:16px;color:#000;text-align:center;padding:8px;background-color:#eee;background-image:-webkit-linear-gradient(top,#fafafa 0%,#c4c4c4 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#c4c4c4 100%)}.elfinder-edit-onlineconvert-button .elfinder-button-icon{margin:0 10px;vertical-align:middle;cursor:pointer}.elfinder-edit-onlineconvert-bottom-btn{text-align:center;margin:10px 0 0}.elfinder-edit-onlineconvert-link{margin-top:1em;text-align:center}.elfinder-edit-onlineconvert-link .elfinder-button-icon{background-image:url(../img/editor-icons.png);background-repeat:no-repeat;background-position:0 -144px;margin-bottom:-3px}.elfinder-edit-onlineconvert-link a,ul.elfinder-help-integrations a{text-decoration:none}div.elfinder-cwd-wrapper-list tr.ui-state-default td span.ui-icon{position:absolute;top:4px;left:0;right:0;margin:auto 0 auto auto}.elfinder-touch div.elfinder-cwd-wrapper-list tr.ui-state-default td span.ui-icon{top:7px}.elfinder-rtl div.elfinder-cwd-wrapper-list tr.ui-state-default td span.ui-icon{margin:auto auto auto 0}.elfinder-help{margin-bottom:.5em;-webkit-overflow-scrolling:touch}.elfinder-help .ui-tabs-panel{overflow:auto;padding:10px}.elfinder-dialog .ui-tabs .ui-tabs-nav li{overflow:hidden}.elfinder-dialog .ui-tabs .ui-tabs-nav li a{padding:.2em .8em;display:inline-block}.elfinder-touch .elfinder-dialog .ui-tabs .ui-tabs-nav li a{padding:.5em}.elfinder-dialog .ui-tabs-active a{background:inherit}.elfinder-help-shortcuts{height:auto;padding:10px;margin:0;box-sizing:border-box}.elfinder-help-shortcut{white-space:nowrap;clear:both}.elfinder-help-shortcut-pattern{float:left;width:160px}.elfinder-help-logo{width:100px;height:96px;float:left;margin-right:1em;background:url(../img/logo.png) center center no-repeat}.elfinder-help h3{font-size:1.5em;margin:.2em 0 .3em}.elfinder-help-separator{clear:both;padding:.5em}.elfinder-help-link{display:inline-block;margin-right:12px;padding:2px 0;white-space:nowrap}.elfinder-rtl .elfinder-help-link{margin-right:0;margin-left:12px}.elfinder-help .ui-priority-secondary{font-size:.9em}.elfinder-help .ui-priority-primary{margin-bottom:7px}.elfinder-help-team{clear:both;text-align:right;border-bottom:1px solid #ccc;margin:.5em 0;font-size:.9em}.elfinder-help-license{font-size:.9em}.elfinder-help-disabled{font-weight:700;text-align:center;margin:90px 0}.elfinder-help .elfinder-dont-panic{display:block;border:1px solid transparent;width:200px;height:200px;margin:30px auto;text-decoration:none;text-align:center;position:relative;background:#d90004;-moz-box-shadow:5px 5px 9px #111;-webkit-box-shadow:5px 5px 9px #111;box-shadow:5px 5px 9px #111;background:-moz-radial-gradient(80px 80px,circle farthest-corner,#d90004 35%,#960004 100%);background:-webkit-gradient(radial,80 80,60,80 80,120,from(#d90004),to(#960004));-moz-border-radius:100px;-webkit-border-radius:100px;border-radius:100px;outline:none}.elfinder-help .elfinder-dont-panic span{font-size:3em;font-weight:700;text-align:center;color:#fff;position:absolute;left:0;top:45px}ul.elfinder-help-integrations ul{padding:0;margin:0 1em 1em}ul.elfinder-help-integrations a:hover{text-decoration:underline}.elfinder-help-debug{height:100%;padding:0;margin:0;overflow:none;border:none}.elfinder-help-debug .ui-tabs-panel{padding:0;margin:0;overflow:auto}.elfinder-help-debug fieldset{margin-bottom:10px;border-color:#789;border-radius:10px}.elfinder-help-debug legend{font-size:1.2em;font-weight:700;color:#2e8b57}.elfinder-help-debug dl{margin:0}.elfinder-help-debug dt{color:#789}.elfinder-help-debug dt:before{content:"["}.elfinder-help-debug dt:after{content:"]"}.elfinder-help-debug dd{margin-left:1em}.elfinder-dialog .elfinder-preference .ui-tabs-nav{margin-bottom:1px;height:auto}.elfinder-preference .ui-tabs-panel{padding:10px 10px 0;overflow:auto;box-sizing:border-box;-webkit-overflow-scrolling:touch}.elfinder-preference a.ui-state-hover,.elfinder-preference label.ui-state-hover{border:none}.elfinder-preference dl{width:100%;display:inline-block;margin:.5em 0}.elfinder-preference dt{display:block;width:200px;clear:left;float:left;max-width:50%}.elfinder-rtl .elfinder-preference dt{clear:right;float:right}.elfinder-preference dd{margin-bottom:1em}.elfinder-preference dd input[type=checkbox],.elfinder-preference dd label{white-space:nowrap;display:inline-block;cursor:pointer}.elfinder-preference dt.elfinder-preference-checkboxes{width:100%;max-width:none}.elfinder-preference dd.elfinder-preference-checkboxes{padding-top:3ex}.elfinder-preference select{max-width:100%}.elfinder-preference dd.elfinder-preference-iconSize .ui-slider{width:50%;max-width:100px;display:inline-block;margin:0 10px}.elfinder-preference button{margin:0 16px}.elfinder-preference button+button{margin:0 -10px}.elfinder-preference .elfinder-preference-taball .elfinder-reference-hide-taball{display:none}.elfinder-preference-theme fieldset{margin-bottom:10px}.elfinder-preference-theme legend a{font-size:1.8em;text-decoration:none;cursor:pointer}.elfinder-preference-theme dt{width:20%;word-break:break-all}.elfinder-preference-theme dt:after{content:" :"}.elfinder-preference-theme dd{margin-inline-start:20%}.elfinder-preference img.elfinder-preference-theme-image{display:block;margin-left:auto;margin-right:auto;max-width:90%;max-height:200px;cursor:pointer}.elfinder-preference-theme-btn,.elfinder-rename-batch-type{text-align:center}.elfinder-preference-theme button.elfinder-preference-theme-default{display:inline;margin:0 10px;font-size:8pt}.elfinder-rtl .elfinder-info-title .elfinder-cwd-icon:before{right:33px;left:auto}.elfinder-info-title .elfinder-cwd-icon.elfinder-cwd-bgurl:after{content:none}.elfinder-upload-dialog-wrapper .elfinder-upload-dirselect{position:absolute;bottom:2px;width:16px;height:16px;padding:10px;border:none;overflow:hidden;cursor:pointer}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-item .ui-icon,.elfinder-ltr .elfinder-upload-dialog-wrapper .elfinder-upload-dirselect{left:2px}.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-item .ui-icon,.elfinder-rtl .elfinder-upload-dialog-wrapper .elfinder-upload-dirselect{right:2px}.elfinder-ltr .elfinder-rm-title .elfinder-cwd-icon:before{left:38px}.elfinder-rtl .elfinder-rm-title .elfinder-cwd-icon:before{right:86px;left:auto}.elfinder-rm-title .elfinder-cwd-icon.elfinder-cwd-bgurl:after{content:none}.elfinder-rename-batch div{margin:5px 8px}.elfinder-rename-batch .elfinder-rename-batch-name input{width:100%;font-size:1.6em}.elfinder-rename-batch .elfinder-rename-batch-type label{margin:2px;font-size:.9em}.elfinder-rename-batch-preview{padding:0 8px;font-size:1.1em;min-height:4ex}.ui-front{z-index:100}.elfinder{padding:0;position:relative;display:block;visibility:visible;font-size:18px;font-family:Verdana,Arial,Helvetica,sans-serif}.elfinder-ios input,.elfinder-ios select,.elfinder-ios textarea{font-size:16px!important}.elfinder.elfinder-fullscreen>.ui-resizable-handle{display:none}.elfinder-font-mono{line-height:2ex}.elfinder.elfinder-processing *{cursor:progress!important}.elfinder.elfinder-processing.elfinder-touch .elfinder-workzone:after{position:absolute;top:0;width:100%;height:3px;content:'';left:0;background-image:url(../img/progress.gif);opacity:.6;pointer-events:none}.elfinder :not(input):not(textarea):not(select):not([contenteditable=true]),.elfinder-contextmenu :not(input):not(textarea):not(select):not([contenteditable=true]){-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;user-select:none}.elfinder .overflow-scrolling-touch{-webkit-overflow-scrolling:touch}.elfinder-rtl{text-align:right;direction:rtl}.elfinder-workzone{padding:0;position:relative;overflow:hidden}.elfinder-lock,.elfinder-perms,.elfinder-symlink{position:absolute;width:16px;height:16px;background-image:url(../img/toolbar.png);background-repeat:no-repeat}.elfinder-perms,.elfinder-symlink{background-position:0 -528px}.elfinder-na .elfinder-perms{background-position:0 -96px}.elfinder-ro .elfinder-perms{background-position:0 -64px}.elfinder-wo .elfinder-perms{background-position:0 -80px}.elfinder-group .elfinder-perms{background-position:0 0}.elfinder-lock{background-position:0 -656px}.elfinder-drag-helper{top:0;left:0;width:70px;height:60px;padding:0 0 0 25px;z-index:100000;will-change:left,top}.elfinder-drag-helper.html5-native{position:absolute;top:-1000px;left:-1000px}.elfinder-drag-helper-icon-status{position:absolute;width:16px;height:16px;left:42px;top:60px;background:url(../img/toolbar.png) 0 -96px no-repeat;display:block}.elfinder-drag-helper-move .elfinder-drag-helper-icon-status{background-position:0 -720px}.elfinder-drag-helper-plus .elfinder-drag-helper-icon-status{background-position:0 -544px}.elfinder-drag-num{display:inline-box;position:absolute;top:0;left:0;width:auto;height:14px;text-align:center;padding:1px 3px;font-weight:700;color:#fff;background-color:red;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.elfinder-drag-helper .elfinder-cwd-icon{margin:0 0 0 -24px;float:left}.elfinder-overlay{position:absolute;opacity:.2;filter:Alpha(Opacity=20)}.elfinder .elfinder-panel{position:relative;background-image:none;padding:7px 12px}[draggable=true]{-khtml-user-drag:element}.elfinder [contentEditable=true]:empty:not(:focus):before{content:attr(data-ph)}.elfinder div.elfinder-bottomtray{position:fixed;bottom:0;max-width:100%;opacity:.8}.elfinder.elfinder-ltr div.elfinder-bottomtray{left:0}.elfinder.elfinder-rtl div.elfinder-bottomtray{right:0}.elfinder .elfinder-ui-tooltip,.elfinder-ui-tooltip{font-size:14px;padding:2px 4px}.elfinder .elfinder-contextmenu,.elfinder .elfinder-contextmenu-sub{position:absolute;border:1px solid #aaa;background:#fff;color:#555;padding:4px 0;top:0;left:0}.elfinder .elfinder-contextmenu-sub{top:5px}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-sub{margin-left:-5px}.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-sub{margin-right:-5px}.elfinder .elfinder-contextmenu-header{margin-top:-4px;padding:0 .5em .2ex;border:none;text-align:center}.elfinder .elfinder-contextmenu-header span{font-size:.8em;font-weight:bolder}.elfinder .elfinder-contextmenu-item{position:relative;display:block;padding:4px 30px;text-decoration:none;white-space:nowrap;cursor:default}.elfinder .elfinder-contextmenu-item.ui-state-active{border:none}.elfinder .elfinder-contextmenu-item .ui-icon{width:16px;height:16px;position:absolute;left:auto;right:auto;top:50%;margin-top:-8px}.elfinder-touch .elfinder-contextmenu-item{padding:12px 38px}.elfinder-navbar-root-local.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_local.svg);background-size:contain}.elfinder-navbar-root-trash.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_trash.svg);background-size:contain}.elfinder-navbar-root-ftp.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_ftp.svg);background-size:contain}.elfinder-navbar-root-sql.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_sql.svg);background-size:contain}.elfinder-navbar-root-dropbox.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_dropbox.svg);background-size:contain}.elfinder-navbar-root-googledrive.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_googledrive.svg);background-size:contain}.elfinder-navbar-root-onedrive.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_onedrive.svg);background-size:contain}.elfinder-navbar-root-box.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_box.svg);background-size:contain}.elfinder-navbar-root-zip.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_zip.svg);background-size:contain}.elfinder-navbar-root-network.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_network.svg);background-size:contain}.elfinder .elfinder-contextmenu .elfinder-contextmenu-item span{display:block}.elfinder .elfinder-contextmenu-sub .elfinder-contextmenu-item{padding-left:12px;padding-right:12px}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-item{text-align:left}.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-item{text-align:right}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-sub .elfinder-contextsubmenu-item-icon{padding-left:28px}.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-sub .elfinder-contextsubmenu-item-icon{padding-right:28px}.elfinder-touch .elfinder-contextmenu-ltr .elfinder-contextmenu-sub .elfinder-contextsubmenu-item-icon{padding-left:36px}.elfinder-touch .elfinder-contextmenu-rtl .elfinder-contextmenu-sub .elfinder-contextsubmenu-item-icon{padding-right:36px}.elfinder .elfinder-contextmenu-arrow,.elfinder .elfinder-contextmenu-extra-icon,.elfinder .elfinder-contextmenu-icon{position:absolute;top:50%;margin-top:-8px;overflow:hidden}.elfinder-touch .elfinder-button-icon.elfinder-contextmenu-icon{transform-origin:center center}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-icon{left:8px}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-extra-icon,.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-icon{right:8px}.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-extra-icon{left:8px}.elfinder .elfinder-contextmenu-arrow{width:16px;height:16px;background:url(../img/arrows-normal.png) 5px 4px no-repeat}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-arrow{right:5px}.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-arrow{left:5px;background-position:0 -10px}.elfinder .elfinder-contextmenu-extra-icon a,.elfinder .elfinder-contextmenu-extra-icon span{position:relative;width:100%;height:100%;margin:0;color:transparent!important;text-decoration:none;cursor:pointer}.elfinder .elfinder-contextmenu .ui-state-hover{border:0 solid;background-image:none}.elfinder .elfinder-contextmenu-separator{height:0;border-top:1px solid #ccc;margin:0 1px}.elfinder .elfinder-contextmenu-item .elfinder-button-icon.ui-state-disabled{background-image:url(../img/toolbar.png)}.elfinder-cwd-wrapper{overflow:auto;position:relative;padding:2px;margin:0}.elfinder-cwd-wrapper-list{padding:0}.elfinder-cwd{position:absolute;top:0;cursor:default;padding:0;margin:0;-ms-touch-action:auto;touch-action:auto;min-width:100%}.elfinder-ltr .elfinder-cwd{left:0}.elfinder-rtl .elfinder-cwd{right:0}.elfinder-cwd.elfinder-table-header-sticky{position:-webkit-sticky;position:-ms-sticky;position:sticky;top:0;left:auto;right:auto;width:-webkit-max-content;width:-moz-max-content;width:-ms-max-content;width:max-content;height:0;overflow:visible}.elfinder-cwd.elfinder-table-header-sticky table{border-top:2px solid;padding-top:0}.elfinder-cwd.elfinder-table-header-sticky td{display:inline-block}.elfinder-droppable-active .elfinder-cwd.elfinder-table-header-sticky table{border-top:2px solid transparent}.elfinder .elfinder-cwd table tbody.elfinder-cwd-fixheader,.elfinder-cwd-fixheader .elfinder-cwd{position:relative}.elfinder .elfinder-cwd-wrapper.elfinder-droppable-active{outline:2px solid #8cafed;outline-offset:-2px}.elfinder-cwd-wrapper-empty .elfinder-cwd:after{display:block;height:auto;width:90%;width:calc(100% - 20px);position:absolute;top:50%;left:50%;-ms-transform:translateY(-50%) translateX(-50%);-webkit-transform:translateY(-50%) translateX(-50%);transform:translateY(-50%) translateX(-50%);line-height:1.5em;text-align:center;white-space:pre-wrap;opacity:.6;filter:Alpha(Opacity=60);font-weight:700}.elfinder-cwd-file .elfinder-cwd-select{position:absolute;top:0;left:0;background-color:transparent;opacity:.4;filter:Alpha(Opacity=40)}.elfinder-mobile .elfinder-cwd-file .elfinder-cwd-select{width:30px;height:30px}.elfinder .elfinder-cwd-selectall,.elfinder-cwd-file.ui-selected .elfinder-cwd-select{opacity:.8;filter:Alpha(Opacity=80)}.elfinder-rtl .elfinder-cwd-file .elfinder-cwd-select{left:auto;right:0}.elfinder .elfinder-cwd-selectall{position:absolute;width:30px;height:30px;top:0}.elfinder .elfinder-workzone.elfinder-cwd-wrapper-empty .elfinder-cwd-selectall{display:none}.elfinder-ltr .elfinder-workzone .elfinder-cwd-selectall{text-align:right;right:18px;left:auto}.elfinder-rtl .elfinder-workzone .elfinder-cwd-selectall{text-align:left;right:auto;left:18px}.elfinder-ltr.elfinder-mobile .elfinder-workzone .elfinder-cwd-selectall{right:0}.elfinder-rtl.elfinder-mobile .elfinder-workzone .elfinder-cwd-selectall{left:0}.elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-select.ui-state-hover{background-color:transparent}.elfinder-cwd-view-icons .elfinder-cwd-file{width:120px;height:90px;padding-bottom:2px;cursor:default;border:none;position:relative}.elfinder .std42-dialog .ui-dialog-content label,.elfinder-cwd-view-icons .elfinder-cwd-file .ui-state-active{border:none}.elfinder-ltr .elfinder-cwd-view-icons .elfinder-cwd-file{float:left;margin:0 3px 2px 0}.elfinder-rtl .elfinder-cwd-view-icons .elfinder-cwd-file{float:right;margin:0 0 5px 3px}.elfinder-cwd-view-icons .elfinder-cwd-file .ui-state-hover{border:0 solid}.elfinder-cwd-view-icons .elfinder-cwd-file-wrapper{width:52px;height:52px;margin:1px auto;padding:2px;position:relative}.elfinder-cwd-size1 .elfinder-cwd-icon:before,.elfinder-cwd-size2 .elfinder-cwd-icon:before,.elfinder-cwd-size3 .elfinder-cwd-icon:before{top:3px;display:block}.elfinder-cwd-size1.elfinder-cwd-view-icons .elfinder-cwd-file{width:120px;height:112px}.elfinder-cwd-size1.elfinder-cwd-view-icons .elfinder-cwd-file-wrapper{width:74px;height:74px}.elfinder-cwd-size1 .elfinder-cwd-icon,.elfinder-cwd-size2 .elfinder-cwd-icon,.elfinder-cwd-size3 .elfinder-cwd-icon{-ms-transform-origin:top center;-ms-transform:scale(1.5);-webkit-transform-origin:top center;-webkit-transform:scale(1.5);transform-origin:top center;transform:scale(1.5)}.elfinder-cwd-size1 .elfinder-cwd-icon.elfinder-cwd-bgurl:before{-ms-transform-origin:top left;-ms-transform:scale(1.35) translate(-4px,15%);-webkit-transform-origin:top left;-webkit-transform:scale(1.35) translate(-4px,15%);transform-origin:top left;transform:scale(1.35) translate(-4px,15%)}.elfinder-cwd-size1 .elfinder-cwd-icon.elfinder-cwd-bgurl:after{-ms-transform:scale(1) translate(10px,-5px);-webkit-transform:scale(1) translate(10px,-5px);transform:scale(1) translate(10px,-5px)}.elfinder-cwd-size1 .elfinder-cwd-icon.elfinder-cwd-bgurl{-ms-transform-origin:center center;-ms-transform:scale(1);-webkit-transform-origin:center center;-webkit-transform:scale(1);transform-origin:center center;transform:scale(1);width:72px;height:72px;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}.elfinder-cwd-size2.elfinder-cwd-view-icons .elfinder-cwd-file{width:140px;height:134px}.elfinder-cwd-size2.elfinder-cwd-view-icons .elfinder-cwd-file-wrapper{width:98px;height:98px}.elfinder-cwd-size2 .elfinder-cwd-icon,.elfinder-cwd-size3 .elfinder-cwd-icon{-ms-transform:scale(2);-webkit-transform:scale(2);transform:scale(2)}.elfinder-cwd-size2 .elfinder-cwd-icon.elfinder-cwd-bgurl:before{-ms-transform-origin:top left;-ms-transform:scale(1.8) translate(-5px,18%);-webkit-transform-origin:top left;-webkit-transform:scale(1.8) translate(-5px,18%);transform-origin:top left;transform:scale(1.8) translate(-5px,18%)}.elfinder-cwd-size2 .elfinder-cwd-icon.elfinder-cwd-bgurl:after{-ms-transform:scale(1.1) translate(0,10px);-webkit-transform:scale(1.1) translate(0,10px);transform:scale(1.1) translate(0,10px)}.elfinder-cwd-size2 .elfinder-cwd-icon.elfinder-cwd-bgurl{-ms-transform-origin:center center;-ms-transform:scale(1);-webkit-transform-origin:center center;-webkit-transform:scale(1);transform-origin:center center;transform:scale(1);width:96px;height:96px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.elfinder-cwd-size3.elfinder-cwd-view-icons .elfinder-cwd-file{width:174px;height:158px}.elfinder-cwd-size3.elfinder-cwd-view-icons .elfinder-cwd-file-wrapper{width:122px;height:122px}.elfinder-cwd-size3 .elfinder-cwd-icon{-ms-transform:scale(2.5);-webkit-transform:scale(2.5);transform:scale(2.5)}.elfinder-cwd-size3 .elfinder-cwd-icon.elfinder-cwd-bgurl:before{-ms-transform-origin:top left;-ms-transform:scale(2.25) translate(-6px,20%);-webkit-transform-origin:top left;-webkit-transform:scale(2.25) translate(-6px,20%);transform-origin:top left;transform:scale(2.25) translate(-6px,20%)}.elfinder-cwd-size3 .elfinder-cwd-icon.elfinder-cwd-bgurl:after{-ms-transform:scale(1.2) translate(-9px,22px);-webkit-transform:scale(1.2) translate(-9px,22px);transform:scale(1.2) translate(-9px,22px)}.elfinder-cwd-size3 .elfinder-cwd-icon.elfinder-cwd-bgurl{-ms-transform-origin:center center;-ms-transform:scale(1);-webkit-transform-origin:center center;-webkit-transform:scale(1);transform-origin:center center;transform:scale(1);width:120px;height:120px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}.elfinder-cwd-view-icons .elfinder-cwd-filename{text-align:center;max-height:2.4em;line-height:1.2em;white-space:pre-line;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;margin:3px 1px 0;padding:1px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;word-break:break-word;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.elfinder-cwd-view-icons .elfinder-perms{bottom:4px;right:2px}.elfinder-cwd-view-icons .elfinder-lock{top:-3px;right:-2px}.elfinder-cwd-view-icons .elfinder-symlink{bottom:6px;left:0}.elfinder-cwd-icon{display:block;width:48px;height:48px;margin:0 auto;background-image:url(../img/icons-big.svg);background-image:url(../img/icons-big.png) \9;background-position:0 0;background-repeat:no-repeat;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box}.elfinder-cwd .elfinder-navbar-root-local.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-local td .elfinder-cwd-icon,.elfinder-navbar-root-local .elfinder-cwd-icon{background-image:url(../img/volume_icon_local.svg);background-image:url(../img/volume_icon_local.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-local.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd .elfinder-navbar-root-trash.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-trash td .elfinder-cwd-icon,.elfinder-navbar-root-trash .elfinder-cwd-icon{background-image:url(../img/volume_icon_trash.svg);background-image:url(../img/volume_icon_trash.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-trash.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd .elfinder-navbar-root-ftp.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-ftp td .elfinder-cwd-icon,.elfinder-navbar-root-ftp .elfinder-cwd-icon{background-image:url(../img/volume_icon_ftp.svg);background-image:url(../img/volume_icon_ftp.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-ftp.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd .elfinder-navbar-root-sql.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-sql td .elfinder-cwd-icon,.elfinder-navbar-root-sql .elfinder-cwd-icon{background-image:url(../img/volume_icon_sql.svg);background-image:url(../img/volume_icon_sql.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-sql.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd .elfinder-navbar-root-dropbox.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-dropbox td .elfinder-cwd-icon,.elfinder-navbar-root-dropbox .elfinder-cwd-icon{background-image:url(../img/volume_icon_dropbox.svg);background-image:url(../img/volume_icon_dropbox.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-dropbox.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd-view-list .elfinder-navbar-root-googledrive td .elfinder-cwd-icon,.elfinder-navbar-root-googledrive .elfinder-cwd-icon{background-position:0 0}.elfinder-cwd .elfinder-navbar-root-googledrive.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-googledrive td .elfinder-cwd-icon,.elfinder-navbar-root-googledrive .elfinder-cwd-icon{background-image:url(../img/volume_icon_googledrive.svg);background-image:url(../img/volume_icon_googledrive.png) \9;background-size:contain}.elfinder-cwd-view-list .elfinder-navbar-root-onedrive td .elfinder-cwd-icon,.elfinder-navbar-root-onedrive .elfinder-cwd-icon{background-position:0 0}.elfinder-cwd .elfinder-navbar-root-onedrive.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-onedrive td .elfinder-cwd-icon,.elfinder-navbar-root-onedrive .elfinder-cwd-icon{background-image:url(../img/volume_icon_onedrive.svg);background-image:url(../img/volume_icon_onedrive.png) \9;background-size:contain}.elfinder-cwd-view-list .elfinder-navbar-root-box td .elfinder-cwd-icon,.elfinder-navbar-root-box .elfinder-cwd-icon{background-position:0 0}.elfinder-cwd .elfinder-navbar-root-box.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-box td .elfinder-cwd-icon,.elfinder-navbar-root-box .elfinder-cwd-icon{background-image:url(../img/volume_icon_box.svg);background-image:url(../img/volume_icon_box.png) \9;background-size:contain}.elfinder-cwd .elfinder-navbar-root-zip.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-zip td .elfinder-cwd-icon,.elfinder-navbar-root-zip .elfinder-cwd-icon{background-image:url(../img/volume_icon_zip.svg);background-image:url(../img/volume_icon_zip.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-box.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd .elfinder-navbar-root-googledrive.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd .elfinder-navbar-root-onedrive.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd .elfinder-navbar-root-network.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-network td .elfinder-cwd-icon,.elfinder-navbar-root-network .elfinder-cwd-icon{background-image:url(../img/volume_icon_network.svg);background-image:url(../img/volume_icon_network.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-network.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd-icon:before{content:none;position:absolute;left:0;top:5px;min-width:20px;max-width:84px;text-align:center;padding:0 4px 1px;border-radius:4px;font-family:Verdana;font-size:10px;line-height:1.3em;-webkit-transform:scale(.9);-moz-transform:scale(.9);-ms-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9)}.elfinder-cwd-view-icons .elfinder-cwd-icon.elfinder-cwd-bgurl:before{left:-10px}.elfinder-cwd-icon.elfinder-cwd-icon-mp2t:before{content:'ts'}.elfinder-cwd-icon.elfinder-cwd-icon-dash-xml:before{content:'dash'}.elfinder-cwd-icon.elfinder-cwd-icon-x-mpegurl:before{content:'hls'}.elfinder-cwd-icon.elfinder-cwd-icon-x-c:before{content:'c++'}.elfinder-cwd-icon.elfinder-cwd-bgurl{background-position:center center;background-repeat:no-repeat}.elfinder-cwd-icon.elfinder-cwd-bgurl,.elfinder-cwd-icon.elfinder-cwd-bgurl.elfinder-cwd-bgself{-moz-background-size:cover;background-size:cover}.elfinder-cwd-icon.elfinder-cwd-bgurl:after{content:' '}.elfinder-cwd-bgurl:after{position:relative;display:inline-block;top:36px;left:-38px;width:48px;height:48px;background-image:url(../img/icons-big.svg);background-image:url(../img/icons-big.png) \9;background-repeat:no-repeat;background-size:auto!important;opacity:.8;filter:Alpha(Opacity=60);-webkit-transform-origin:54px -24px;-webkit-transform:scale(.6);-moz-transform-origin:54px -24px;-moz-transform:scale(.6);-ms-transform-origin:54px -24px;-ms-transform:scale(.6);-o-transform-origin:54px -24px;-o-transform:scale(.6);transform-origin:54px -24px;transform:scale(.6)}.elfinder-cwd-icon.elfinder-cwd-icon-drag{width:48px;height:48px}.elfinder-cwd-icon-directory.elfinder-cwd-bgurl:after,.elfinder-cwd-icon-image.elfinder-cwd-bgurl:after,.elfinder-cwd-icon.elfinder-cwd-icon-drag:after,.elfinder-cwd-icon.elfinder-cwd-icon-drag:before{content:none}.elfinder-cwd .elfinder-droppable-active .elfinder-cwd-icon{background-position:0 -100px}.elfinder-cwd .elfinder-droppable-active{outline:2px solid #8cafed;outline-offset:-2px}.elfinder-cwd-icon-directory{background-position:0 -50px}.elfinder-cwd-icon-application,.elfinder-cwd-icon-application:after{background-position:0 -150px}.elfinder-cwd-icon-text,.elfinder-cwd-icon-text:after{background-position:0 -1350px}.elfinder-cwd-icon-plain,.elfinder-cwd-icon-plain:after,.elfinder-cwd-icon-x-empty,.elfinder-cwd-icon-x-empty:after{background-position:0 -200px}.elfinder-cwd-icon-image,.elfinder-cwd-icon-image:after,.elfinder-cwd-icon-vnd-adobe-photoshop,.elfinder-cwd-icon-vnd-adobe-photoshop:after{background-position:0 -250px}.elfinder-cwd-icon-postscript,.elfinder-cwd-icon-postscript:after{background-position:0 -1550px}.elfinder-cwd-icon-audio,.elfinder-cwd-icon-audio:after{background-position:0 -300px}.elfinder-cwd-icon-dash-xml,.elfinder-cwd-icon-flash-video,.elfinder-cwd-icon-video,.elfinder-cwd-icon-video:after,.elfinder-cwd-icon-vnd-apple-mpegurl,.elfinder-cwd-icon-x-mpegurl{background-position:0 -350px}.elfinder-cwd-icon-rtf,.elfinder-cwd-icon-rtf:after,.elfinder-cwd-icon-rtfd,.elfinder-cwd-icon-rtfd:after{background-position:0 -400px}.elfinder-cwd-icon-pdf,.elfinder-cwd-icon-pdf:after{background-position:0 -450px}.elfinder-cwd-icon-ms-excel,.elfinder-cwd-icon-ms-excel:after,.elfinder-cwd-icon-vnd-ms-excel,.elfinder-cwd-icon-vnd-ms-excel-addin-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-excel-addin-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-excel-sheet-binary-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-excel-sheet-binary-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-excel-sheet-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-excel-sheet-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-excel-template-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-excel-template-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-excel:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-spreadsheetml-sheet,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-spreadsheetml-sheet:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-spreadsheetml-template,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-spreadsheetml-template:after{background-position:0 -1450px}.elfinder-cwd-icon-vnd-oasis-opendocument-spreadsheet,.elfinder-cwd-icon-vnd-oasis-opendocument-spreadsheet-template,.elfinder-cwd-icon-vnd-oasis-opendocument-spreadsheet-template:after,.elfinder-cwd-icon-vnd-oasis-opendocument-spreadsheet:after{background-position:0 -1700px}.elfinder-cwd-icon-vnd-ms-powerpoint,.elfinder-cwd-icon-vnd-ms-powerpoint-addin-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-addin-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-powerpoint-presentation-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-presentation-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-powerpoint-slide-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-slide-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-powerpoint-slideshow-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-slideshow-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-powerpoint-template-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-template-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-powerpoint:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-presentation,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-presentation:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-slide,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-slide:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-slideshow,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-slideshow:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-template,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-template:after{background-position:0 -1400px}.elfinder-cwd-icon-vnd-oasis-opendocument-presentation,.elfinder-cwd-icon-vnd-oasis-opendocument-presentation-template,.elfinder-cwd-icon-vnd-oasis-opendocument-presentation-template:after,.elfinder-cwd-icon-vnd-oasis-opendocument-presentation:after{background-position:0 -1650px}.elfinder-cwd-icon-msword,.elfinder-cwd-icon-msword:after,.elfinder-cwd-icon-vnd-ms-word,.elfinder-cwd-icon-vnd-ms-word-document-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-word-document-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-word-template-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-word-template-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-word:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-wordprocessingml-document,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-wordprocessingml-document:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-wordprocessingml-template,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-wordprocessingml-template:after{background-position:0 -1500px}.elfinder-cwd-icon-vnd-oasis-opendocument-text,.elfinder-cwd-icon-vnd-oasis-opendocument-text-master,.elfinder-cwd-icon-vnd-oasis-opendocument-text-master:after,.elfinder-cwd-icon-vnd-oasis-opendocument-text-template,.elfinder-cwd-icon-vnd-oasis-opendocument-text-template:after,.elfinder-cwd-icon-vnd-oasis-opendocument-text-web,.elfinder-cwd-icon-vnd-oasis-opendocument-text-web:after,.elfinder-cwd-icon-vnd-oasis-opendocument-text:after{background-position:0 -1750px}.elfinder-cwd-icon-vnd-ms-office,.elfinder-cwd-icon-vnd-ms-office:after{background-position:0 -500px}.elfinder-cwd-icon-vnd-oasis-opendocument-chart,.elfinder-cwd-icon-vnd-oasis-opendocument-chart:after,.elfinder-cwd-icon-vnd-oasis-opendocument-database,.elfinder-cwd-icon-vnd-oasis-opendocument-database:after,.elfinder-cwd-icon-vnd-oasis-opendocument-formula,.elfinder-cwd-icon-vnd-oasis-opendocument-formula:after,.elfinder-cwd-icon-vnd-oasis-opendocument-graphics,.elfinder-cwd-icon-vnd-oasis-opendocument-graphics-template,.elfinder-cwd-icon-vnd-oasis-opendocument-graphics-template:after,.elfinder-cwd-icon-vnd-oasis-opendocument-graphics:after,.elfinder-cwd-icon-vnd-oasis-opendocument-image,.elfinder-cwd-icon-vnd-oasis-opendocument-image:after,.elfinder-cwd-icon-vnd-openofficeorg-extension,.elfinder-cwd-icon-vnd-openofficeorg-extension:after{background-position:0 -1600px}.elfinder-cwd-icon-html,.elfinder-cwd-icon-html:after{background-position:0 -550px}.elfinder-cwd-icon-css,.elfinder-cwd-icon-css:after{background-position:0 -600px}.elfinder-cwd-icon-javascript,.elfinder-cwd-icon-javascript:after,.elfinder-cwd-icon-x-javascript,.elfinder-cwd-icon-x-javascript:after{background-position:0 -650px}.elfinder-cwd-icon-x-perl,.elfinder-cwd-icon-x-perl:after{background-position:0 -700px}.elfinder-cwd-icon-x-python,.elfinder-cwd-icon-x-python:after{background-position:0 -750px}.elfinder-cwd-icon-x-ruby,.elfinder-cwd-icon-x-ruby:after{background-position:0 -800px}.elfinder-cwd-icon-x-sh,.elfinder-cwd-icon-x-sh:after,.elfinder-cwd-icon-x-shellscript,.elfinder-cwd-icon-x-shellscript:after{background-position:0 -850px}.elfinder-cwd-icon-x-c,.elfinder-cwd-icon-x-c--,.elfinder-cwd-icon-x-c--:after,.elfinder-cwd-icon-x-c--hdr,.elfinder-cwd-icon-x-c--hdr:after,.elfinder-cwd-icon-x-c--src,.elfinder-cwd-icon-x-c--src:after,.elfinder-cwd-icon-x-c:after,.elfinder-cwd-icon-x-chdr,.elfinder-cwd-icon-x-chdr:after,.elfinder-cwd-icon-x-csrc,.elfinder-cwd-icon-x-csrc:after,.elfinder-cwd-icon-x-java,.elfinder-cwd-icon-x-java-source,.elfinder-cwd-icon-x-java-source:after,.elfinder-cwd-icon-x-java:after{background-position:0 -900px}.elfinder-cwd-icon-x-php,.elfinder-cwd-icon-x-php:after{background-position:0 -950px}.elfinder-cwd-icon-xml,.elfinder-cwd-icon-xml:after{background-position:0 -1000px}.elfinder-cwd-icon-x-7z-compressed,.elfinder-cwd-icon-x-7z-compressed:after,.elfinder-cwd-icon-x-xz,.elfinder-cwd-icon-x-xz:after,.elfinder-cwd-icon-x-zip,.elfinder-cwd-icon-x-zip:after,.elfinder-cwd-icon-zip,.elfinder-cwd-icon-zip:after{background-position:0 -1050px}.elfinder-cwd-icon-x-gzip,.elfinder-cwd-icon-x-gzip:after,.elfinder-cwd-icon-x-tar,.elfinder-cwd-icon-x-tar:after{background-position:0 -1100px}.elfinder-cwd-icon-x-bzip,.elfinder-cwd-icon-x-bzip2,.elfinder-cwd-icon-x-bzip2:after,.elfinder-cwd-icon-x-bzip:after{background-position:0 -1150px}.elfinder-cwd-icon-x-rar,.elfinder-cwd-icon-x-rar-compressed,.elfinder-cwd-icon-x-rar-compressed:after,.elfinder-cwd-icon-x-rar:after{background-position:0 -1200px}.elfinder-cwd-icon-x-shockwave-flash,.elfinder-cwd-icon-x-shockwave-flash:after{background-position:0 -1250px}.elfinder-cwd-icon-group{background-position:0 -1300px}.elfinder-cwd-filename input{width:100%;border:none;margin:0;padding:0}.elfinder-cwd-view-icons,.elfinder-cwd-view-icons input{text-align:center}.elfinder-cwd-view-icons textarea{width:100%;border:0 solid;margin:0;padding:0;text-align:center;overflow:hidden;resize:none}.elfinder-cwd-wrapper.elfinder-cwd-fixheader .elfinder-cwd::after,.std42-dialog.elfinder-dialog-minimized .ui-dialog-titlebar select{display:none}.elfinder-cwd table{width:100%;border-collapse:separate;border:0 solid;margin:0 0 10px;border-spacing:0;box-sizing:padding-box;padding:2px;position:relative}.elfinder .elfinder-cwd table td div,.elfinder-cwd table td{box-sizing:content-box}.elfinder-cwd-wrapper-list.elfinder-cwd-fixheader{position:absolute;overflow:hidden}.elfinder-cwd-wrapper-list.elfinder-cwd-fixheader:before{content:'';position:absolute;width:100%;top:0;height:3px;background-color:#fff}.elfinder-droppable-active+.elfinder-cwd-wrapper-list.elfinder-cwd-fixheader:before{background-color:#8cafed}.elfinder .elfinder-workzone div.elfinder-cwd-fixheader table{table-layout:fixed}.elfinder-ltr .elfinder-cwd thead .elfinder-cwd-selectall{text-align:left;right:auto;left:0;padding-top:3px}.elfinder-rtl .elfinder-cwd thead .elfinder-cwd-selectall{text-align:right;right:0;left:auto;padding-top:3px}.elfinder-touch .elfinder-cwd thead .elfinder-cwd-selectall{padding-top:4px}.elfinder .elfinder-cwd table thead tr{border-left:0 solid;border-top:0 solid;border-right:0 solid}.elfinder .elfinder-cwd table thead td{padding:4px 14px}.elfinder-ltr .elfinder-cwd.elfinder-has-checkbox table thead td:first-child{padding:4px 14px 4px 22px}.elfinder-rtl .elfinder-cwd.elfinder-has-checkbox table thead td:first-child{padding:4px 22px 4px 14px}.elfinder-touch .elfinder-cwd table thead td,.elfinder-touch .elfinder-cwd.elfinder-has-checkbox table thead td:first-child{padding-top:8px;padding-bottom:8px}.elfinder .elfinder-cwd table thead td.ui-state-active{background:#ebf1f6;background:-moz-linear-gradient(top,#ebf1f6 0%,#abd3ee 50%,#89c3eb 51%,#d5ebfb 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebf1f6),color-stop(50%,#abd3ee),color-stop(51%,#89c3eb),color-stop(100%,#d5ebfb));background:-webkit-linear-gradient(top,#ebf1f6 0%,#abd3ee 50%,#89c3eb 51%,#d5ebfb 100%);background:-o-linear-gradient(top,#ebf1f6 0%,#abd3ee 50%,#89c3eb 51%,#d5ebfb 100%);background:-ms-linear-gradient(top,#ebf1f6 0%,#abd3ee 50%,#89c3eb 51%,#d5ebfb 100%);background:linear-gradient(to bottom,#ebf1f6 0%,#abd3ee 50%,#89c3eb 51%,#d5ebfb 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebf1f6', endColorstr='#d5ebfb', GradientType=0)}.elfinder .elfinder-cwd table td{padding:4px 12px;white-space:pre;overflow:hidden;text-align:right;cursor:default;border:0 solid}.elfinder .elfinder-cwd table tbody td:first-child{position:relative}tr.elfinder-cwd-file td .elfinder-cwd-select{padding-top:3px}.elfinder-mobile tr.elfinder-cwd-file td .elfinder-cwd-select{width:40px}.elfinder-touch tr.elfinder-cwd-file td .elfinder-cwd-select{padding-top:10px}.elfinder-touch .elfinder-cwd tr td{padding:10px 12px}.elfinder-touch .elfinder-cwd tr.elfinder-cwd-file td{padding:13px 12px}.elfinder-ltr .elfinder-cwd table td{text-align:right}.elfinder-ltr .elfinder-cwd table td:first-child{text-align:left}.elfinder-rtl .elfinder-cwd table td{text-align:left}.elfinder-ltr .elfinder-info-tb tr td:first-child,.elfinder-rtl .elfinder-cwd table td:first-child{text-align:right}.elfinder-odd-row{background:#eee}.elfinder-cwd-view-list .elfinder-cwd-file-wrapper{width:97%;position:relative}.elfinder-ltr .elfinder-cwd-view-list.elfinder-has-checkbox .elfinder-cwd-file-wrapper{margin-left:8px}.elfinder-rtl .elfinder-cwd-view-list.elfinder-has-checkbox .elfinder-cwd-file-wrapper{margin-right:8px}.elfinder-ltr .elfinder-cwd-view-list .elfinder-cwd-filename{padding-left:23px}.elfinder-rtl .elfinder-cwd-view-list .elfinder-cwd-filename{padding-right:23px}.elfinder-cwd-view-list .elfinder-lock,.elfinder-cwd-view-list .elfinder-perms,.elfinder-cwd-view-list .elfinder-symlink{margin-top:-6px;opacity:.6;filter:Alpha(Opacity=60)}.elfinder-cwd-view-list .elfinder-perms{bottom:-4px}.elfinder-cwd-view-list .elfinder-lock{top:0}.elfinder-cwd-view-list .elfinder-symlink{bottom:-4px}.elfinder-ltr .elfinder-cwd-view-list .elfinder-perms{left:8px}.elfinder-rtl .elfinder-cwd-view-list .elfinder-perms{right:-8px}.elfinder-ltr .elfinder-cwd-view-list .elfinder-lock{left:10px}.elfinder-rtl .elfinder-cwd-view-list .elfinder-lock{right:-10px}.elfinder-ltr .elfinder-cwd-view-list .elfinder-symlink{left:-7px}.elfinder-rtl .elfinder-cwd-view-list .elfinder-symlink{right:7px}.elfinder-cwd-view-list td .elfinder-cwd-icon{width:16px;height:16px;position:absolute;top:50%;margin-top:-8px;background-image:url(../img/icons-small.png)}.elfinder-ltr .elfinder-cwd-view-list .elfinder-cwd-icon{left:0}.elfinder-rtl .elfinder-cwd-view-list .elfinder-cwd-icon{right:0}.elfinder-cwd-view-list .elfinder-cwd-icon:after,.elfinder-cwd-view-list .elfinder-cwd-icon:before{content:none}.elfinder-cwd-view-list thead td .ui-resizable-handle{height:100%;top:6px}.elfinder-touch .elfinder-cwd-view-list thead td .ui-resizable-handle{top:-4px;margin:10px}.elfinder-cwd-view-list thead td .ui-resizable-e{right:-7px}.elfinder-cwd-view-list thead td .ui-resizable-w{left:-7px}.elfinder-touch .elfinder-cwd-view-list thead td .ui-resizable-e{right:-16px}.elfinder-touch .elfinder-cwd-view-list thead td .ui-resizable-w{left:-16px}.elfinder-cwd-wrapper-empty .elfinder-cwd-view-list.elfinder-cwd:after{margin-top:0}.elfinder-cwd-message-board{position:-webkit-sticky;position:sticky;width:100%;height:calc(100% - .01px);top:0;left:0;margin:0;padding:0;pointer-events:none;background-color:transparent}.elfinder-cwd-wrapper-trash .elfinder-cwd-message-board{background-image:url(../img/trashmesh.png)}.elfinder-cwd-message-board .elfinder-cwd-trash{position:absolute;bottom:0;font-size:30px;width:100%;text-align:right;display:none}.elfinder-rtl .elfinder-cwd-message-board .elfinder-cwd-trash{text-align:left}.elfinder-mobile .elfinder-cwd-message-board .elfinder-cwd-trash{font-size:20px}.elfinder-cwd-wrapper-trash .elfinder-cwd-message-board .elfinder-cwd-trash{display:block;opacity:.3}.elfinder-cwd-message-board .elfinder-cwd-expires{position:absolute;bottom:0;font-size:24px;width:100%;text-align:right;opacity:.25}.elfinder-rtl .elfinder-cwd-message-board .elfinder-cwd-expires{text-align:left}.elfinder-mobile .elfinder-cwd-message-board .elfinder-cwd-expires{font-size:20px}.std42-dialog{padding:0;position:absolute;left:auto;right:auto;box-sizing:border-box}.std42-dialog.elfinder-dialog-minimized{overFlow:hidden;position:relative;float:left;width:auto;cursor:pointer}.elfinder-rtl .std42-dialog.elfinder-dialog-minimized{float:right}.std42-dialog input{border:1px solid}.std42-dialog .ui-dialog-titlebar{border-left:0 solid transparent;border-top:0 solid transparent;border-right:0 solid transparent;font-weight:400;padding:.2em 1em}.std42-dialog.elfinder-dialog-minimized .ui-dialog-titlebar{padding:0 .5em;height:20px}.elfinder-touch .std42-dialog.elfinder-dialog-minimized .ui-dialog-titlebar{padding:.3em .5em}.std42-dialog.ui-draggable-disabled .ui-dialog-titlebar{cursor:default}.std42-dialog .ui-dialog-titlebar .ui-widget-header{border:none;cursor:pointer}.std42-dialog .ui-dialog-titlebar span.elfinder-dialog-title{display:inherit;word-break:break-all}.std42-dialog.elfinder-dialog-minimized .ui-dialog-titlebar span.elfinder-dialog-title{display:list-item;display:-moz-inline-box;white-space:nowrap;word-break:normal;overflow:hidden;word-wrap:normal;overflow-wrap:normal;max-width:-webkit-calc(100% - 24px);max-width:-moz-calc(100% - 24px);max-width:calc(100% - 24px)}.elfinder-touch .std42-dialog .ui-dialog-titlebar span.elfinder-dialog-title{padding-top:.15em}.elfinder-touch .std42-dialog.elfinder-dialog-minimized .ui-dialog-titlebar span.elfinder-dialog-title{max-width:-webkit-calc(100% - 36px);max-width:-moz-calc(100% - 36px);max-width:calc(100% - 36px)}.std42-dialog .ui-dialog-titlebar .elfinder-titlebar-button{position:relative;float:left;top:10px;left:-10px;right:10px;width:20px;height:20px;padding:1px;margin:-10px 1px 0;background-color:transparent;background-image:none}.elfinder-touch .std42-dialog .ui-dialog-titlebar .elfinder-titlebar-button{-moz-transform:scale(1.2);zoom:1.2;padding-left:6px;padding-right:6px;height:24px}.std42-dialog .ui-dialog-titlebar .elfinder-titlebar-button-right{float:right}.std42-dialog .ui-dialog-titlebar .elfinder-titlebar-button.elfinder-titlebar-button-right{left:10px;right:-10px}.std42-dialog .ui-dialog-titlebar .elfinder-titlebar-button .ui-icon{width:17px;height:17px;border-width:1px;opacity:.7;filter:Alpha(Opacity=70);-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.elfinder-mobile .std42-dialog .ui-dialog-titlebar .elfinder-titlebar-button .ui-icon{opacity:.5;filter:Alpha(Opacity=50)}.std42-dialog.elfinder-dialog-minimized .ui-dialog-titlebar .elfinder-titlebar-button .ui-icon{opacity:1;filter:Alpha(Opacity=100)}.elfinder-spinner{width:14px;height:14px;background:url(../img/spinner-mini.gif) center center no-repeat;margin:0 5px;display:inline-block;vertical-align:middle}.elfinder-ltr .elfinder-info-tb span,.elfinder-ltr .elfinder-spinner,.elfinder-ltr .elfinder-spinner-text{float:left}.elfinder-rtl .elfinder-info-tb span,.elfinder-rtl .elfinder-spinner,.elfinder-rtl .elfinder-spinner-text{float:right}.elfinder-touch .std42-dialog.ui-dialog:not(ui-resizable-disabled) .ui-resizable-se{width:12px;height:12px;-moz-transform-origin:bottom right;-moz-transform:scale(1.5);zoom:1.5;right:-7px;bottom:-7px;margin:3px 7px 7px 3px;background-position:-64px -224px}.elfinder-rtl .elfinder-dialog .ui-dialog-titlebar{text-align:right}.std42-dialog .ui-dialog-content{padding:.3em .5em;box-sizing:border-box}.elfinder .std42-dialog .ui-dialog-content,.elfinder .std42-dialog .ui-dialog-content *{-webkit-user-select:auto;-moz-user-select:text;-khtml-user-select:text;user-select:text}.std42-dialog .ui-dialog-buttonpane{border:0 solid;margin:0;padding:.5em;text-align:right}.elfinder-rtl .std42-dialog .ui-dialog-buttonpane{text-align:left}.std42-dialog .ui-dialog-buttonpane button{margin:.2em 0 0 .4em;padding:.2em;outline:0 solid}.std42-dialog .ui-dialog-buttonpane button span{padding:2px 9px}.std42-dialog .ui-dialog-buttonpane button span.ui-icon{padding:2px}.elfinder-dialog .ui-resizable-e,.elfinder-dialog .ui-resizable-s{width:0;height:0}.std42-dialog .ui-button input{cursor:pointer}.std42-dialog select{border:1px solid #ccc}.elfinder-dialog-icon{position:absolute;width:32px;height:32px;left:10px;top:50%;margin-top:-15px;background:url(../img/dialogs.png) 0 0 no-repeat}.elfinder-rtl .elfinder-dialog-icon{left:auto;right:10px}.elfinder-dialog-confirm .ui-dialog-content,.elfinder-dialog-error .ui-dialog-content{padding-left:56px;min-height:35px}.elfinder-rtl .elfinder-dialog-confirm .ui-dialog-content,.elfinder-rtl .elfinder-dialog-error .ui-dialog-content{padding-left:0;padding-right:56px}.elfinder-dialog-error .elfinder-err-var{word-break:break-all}.elfinder-dialog-notify{top:36px;width:280px}.elfinder-ltr .elfinder-dialog-notify{right:12px}.elfinder-rtl .elfinder-dialog-notify{left:12px}.elfinder-dialog-notify .ui-dialog-titlebar{height:5px}.elfinder-dialog-notify .ui-dialog-titlebar-close,.elfinder-rm-title+br{display:none}.elfinder-dialog-notify .ui-dialog-content{padding:0}.elfinder-notify{border-bottom:1px solid #ccc;position:relative;padding:.5em;text-align:center;overflow:hidden}.elfinder-ltr .elfinder-notify{padding-left:36px}.elfinder-rtl .elfinder-notify{padding-right:36px}.elfinder-notify:last-child{border:0 solid}.elfinder-notify-progressbar{width:180px;height:8px;border:1px solid #aaa;background:#f5f5f5;margin:5px auto;overflow:hidden}.elfinder-notify-progress{width:100%;height:8px;background:url(../img/progress.gif) center center repeat-x}.elfinder-notify-progress,.elfinder-notify-progressbar{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.elfinder-dialog-icon-file,.elfinder-dialog-icon-open,.elfinder-dialog-icon-readdir,.elfinder-dialog-icon-reload{background-position:0 -225px}.elfinder-dialog-icon-mkdir{background-position:0 -64px}.elfinder-dialog-icon-mkfile{background-position:0 -96px}.elfinder-dialog-icon-copy,.elfinder-dialog-icon-move,.elfinder-dialog-icon-prepare{background-position:0 -128px}.elfinder-dialog-icon-chunkmerge,.elfinder-dialog-icon-upload{background-position:0 -160px}.elfinder-dialog-icon-rm{background-position:0 -192px}.elfinder-dialog-icon-download{background-position:0 -260px}.elfinder-dialog-icon-save{background-position:0 -295px}.elfinder-dialog-icon-chkcontent,.elfinder-dialog-icon-rename{background-position:0 -330px}.elfinder-dialog-icon-archive,.elfinder-dialog-icon-extract,.elfinder-dialog-icon-zipdl{background-position:0 -365px}.elfinder-dialog-icon-search{background-position:0 -402px}.elfinder-dialog-icon-chmod,.elfinder-dialog-icon-dim,.elfinder-dialog-icon-loadimg,.elfinder-dialog-icon-netmount,.elfinder-dialog-icon-netunmount,.elfinder-dialog-icon-preupload,.elfinder-dialog-icon-resize,.elfinder-dialog-icon-url{background-position:0 -434px}.elfinder-dialog-confirm-applyall,.elfinder-dialog-confirm-encoding{padding:0 1em;margin:0}.elfinder-ltr .elfinder-dialog-confirm-applyall,.elfinder-ltr .elfinder-dialog-confirm-encoding{text-align:left}.elfinder-rtl .elfinder-dialog-confirm-applyall,.elfinder-rtl .elfinder-dialog-confirm-encoding{text-align:right}.elfinder-dialog-confirm .elfinder-dialog-icon{background-position:0 -32px}.elfinder-dialog-confirm .ui-dialog-buttonset{width:auto}.elfinder-info-title .elfinder-cwd-icon{float:left;width:48px;height:48px;margin-right:1em}.elfinder-rtl .elfinder-info-title .elfinder-cwd-icon,.elfinder-rtl .elfinder-rm-title .elfinder-cwd-icon{float:right;margin-right:0;margin-left:1em}.elfinder-info-title strong{display:block;padding:.3em 0 .5em}.elfinder-info-tb{min-width:200px;border:0 solid;margin:1em .2em;width:100%}.elfinder-info-tb td{white-space:pre-wrap;padding:2px}.elfinder-info-tb td.elfinder-info-label{white-space:nowrap}.elfinder-info-tb td.elfinder-info-hash{display:inline-block;word-break:break-all;max-width:32ch}.elfinder-rtl .elfinder-info-tb tr td:first-child{text-align:left}.elfinder-info-tb a{outline:none;text-decoration:underline}.elfinder-info-tb a:hover{text-decoration:none}.elfinder-netmount-tb{margin:0 auto}.elfinder-netmount-tb .elfinder-button-icon,.elfinder-netmount-tb select{cursor:pointer}button.elfinder-info-button{margin:-3.5px 0;cursor:pointer}.elfinder-upload-dropbox{display:table-cell;text-align:center;vertical-align:middle;padding:.5em;border:3px dashed #aaa;width:9999px;height:80px;overflow:hidden;word-break:keep-all}.elfinder-upload-dropbox.ui-state-hover{background:#dfdfdf;border:3px dashed #555}.elfinder-upload-dialog-or{margin:.3em 0;text-align:center}.elfinder-upload-dialog-wrapper{text-align:center}.elfinder-upload-dialog-wrapper .ui-button{position:relative;overflow:hidden}.elfinder-upload-dialog-wrapper .ui-button form{position:absolute;right:0;top:0;width:100%;opacity:0;filter:Alpha(Opacity=0)}.elfinder-upload-dialog-wrapper .ui-button form input{padding:50px 0 0;font-size:3em;width:100%}.dialogelfinder .dialogelfinder-drag{border-left:0 solid;border-top:0 solid;border-right:0 solid;font-weight:400;padding:2px 12px;cursor:move;position:relative;text-align:left}.elfinder-rtl .dialogelfinder-drag{text-align:right}.dialogelfinder-drag-close{position:absolute;top:50%;margin-top:-8px}.elfinder-ltr .dialogelfinder-drag-close{right:12px}.elfinder-rtl .dialogelfinder-drag-close{left:12px}.elfinder-rm-title{margin-bottom:.5ex}.elfinder-rm-title .elfinder-cwd-icon{float:left;width:48px;height:48px;margin-right:1em}.elfinder-rm-title strong{display:block;white-space:pre-wrap;word-break:normal;overflow:hidden;text-overflow:ellipsis}.elfinder-font-mono{font-family:"Ricty Diminished","Myrica M",Consolas,"Courier New",Courier,Monaco,monospace;font-size:1.1em}.elfinder-contextmenu .elfinder-contextmenu-item span{font-size:.72em}.elfinder-cwd-view-icons .elfinder-cwd-filename,.elfinder-cwd-view-list td,.elfinder-statusbar div{font-size:.7em}.std42-dialog .ui-dialog-titlebar{font-size:.82em}.std42-dialog .ui-dialog-content{font-size:.72em}.std42-dialog .ui-dialog-buttonpane{font-size:.76em}.dialogelfinder .dialogelfinder-drag,.elfinder-info-tb{font-size:.9em}.elfinder-upload-dialog-or,.elfinder-upload-dropbox{font-size:1.2em}.elfinder .elfinder-navbar{font-size:.72em}.elfinder-place-drag .elfinder-navbar-dir{font-size:.9em}.elfinder-quicklook-title{font-size:.7em;font-weight:400}.elfinder-quicklook-info-data{font-size:.72em}.elfinder-quicklook-preview-text-wrapper{font-size:.9em}.elfinder-button-menu-item{font-size:.72em}.elfinder-button-search input{font-size:.8em}.elfinder-drag-num{font-size:12px}.elfinder-toast{font-size:.76em}.elfinder .elfinder-navbar{width:230px;padding:3px 5px;background-image:none;border-top:0 solid;border-bottom:0 solid;overflow:auto;position:relative}.elfinder .elfinder-navdock{box-sizing:border-box;width:230px;height:auto;position:absolute;bottom:0;overflow:auto}.elfinder-navdock .ui-resizable-n{top:0;height:20px}.elfinder-ltr .elfinder-navbar{float:left;border-left:0 solid}.elfinder-rtl .elfinder-navbar{float:right;border-right:0 solid}.elfinder-ltr .ui-resizable-e,.elfinder-touch .elfinder-quicklook-titlebar-icon.elfinder-titlebar-button-right .ui-icon{margin-left:10px}.elfinder-tree{display:table;width:100%;margin:0 0 .5em;-webkit-tap-highlight-color:rgba(0,0,0,0)}.elfinder-navbar-dir{position:relative;display:block;white-space:nowrap;padding:3px 12px;margin:0;outline:0 solid;border:1px solid transparent;cursor:default}.elfinder-touch .elfinder-navbar-dir{padding:12px}.elfinder-ltr .elfinder-navbar-dir{padding-left:35px}.elfinder-rtl .elfinder-navbar-dir{padding-right:35px}.elfinder-navbar-arrow,.elfinder-navbar-icon{position:absolute;top:50%;margin-top:-8px;background-repeat:no-repeat}.elfinder-navbar-arrow{display:none;width:12px;height:14px;background-image:url(../img/arrows-normal.png)}.elfinder-ltr .elfinder-navbar-arrow{left:0}.elfinder-rtl .elfinder-navbar-arrow{right:0}.elfinder-touch .elfinder-navbar-arrow{-moz-transform-origin:top left;-moz-transform:scale(1.4);zoom:1.4;margin-bottom:7px}.elfinder-ltr.elfinder-touch .elfinder-navbar-arrow{left:-3px;margin-right:20px}.elfinder-rtl.elfinder-touch .elfinder-navbar-arrow{right:-3px;margin-left:20px}.ui-state-active .elfinder-navbar-arrow{background-image:url(../img/arrows-active.png)}.elfinder-navbar-collapsed .elfinder-navbar-arrow{display:block}.elfinder-subtree-chksubdir .elfinder-navbar-arrow{opacity:.25;filter:Alpha(Opacity=25)}.elfinder-ltr .elfinder-navbar-collapsed .elfinder-navbar-arrow{background-position:0 4px}.elfinder-rtl .elfinder-navbar-collapsed .elfinder-navbar-arrow{background-position:0 -10px}.elfinder-ltr .elfinder-navbar-expanded .elfinder-navbar-arrow,.elfinder-rtl .elfinder-navbar-expanded .elfinder-navbar-arrow{background-position:0 -21px}.elfinder-navbar-icon{width:16px;height:16px;background-image:url(../img/toolbar.png);background-position:0 -16px}.elfinder-ltr .elfinder-navbar-icon{left:14px}.elfinder-rtl .elfinder-navbar-icon{right:14px}.elfinder-places .elfinder-navbar-root .elfinder-navbar-icon{background-position:0 -704px}.elfinder-tree .elfinder-navbar-root-box .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-dropbox .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-ftp .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-googledrive .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-local .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-network .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-onedrive .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-sql .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-trash .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-zip .elfinder-navbar-icon{background-position:0 0;background-size:contain}.elfinder-tree .elfinder-navbar-root-local .elfinder-navbar-icon{background-image:url(../img/volume_icon_local.svg);background-image:url(../img/volume_icon_local.png) \9}.elfinder-tree .elfinder-navbar-root-trash .elfinder-navbar-icon{background-image:url(../img/volume_icon_trash.svg);background-image:url(../img/volume_icon_trash.png) \9}.elfinder-tree .elfinder-navbar-root-ftp .elfinder-navbar-icon{background-image:url(../img/volume_icon_ftp.svg);background-image:url(../img/volume_icon_ftp.png) \9}.elfinder-tree .elfinder-navbar-root-sql .elfinder-navbar-icon{background-image:url(../img/volume_icon_sql.svg);background-image:url(../img/volume_icon_sql.png) \9}.elfinder-tree .elfinder-navbar-root-dropbox .elfinder-navbar-icon{background-image:url(../img/volume_icon_dropbox.svg);background-image:url(../img/volume_icon_dropbox.png) \9}.elfinder-tree .elfinder-navbar-root-googledrive .elfinder-navbar-icon{background-image:url(../img/volume_icon_googledrive.svg);background-image:url(../img/volume_icon_googledrive.png) \9}.elfinder-tree .elfinder-navbar-root-onedrive .elfinder-navbar-icon{background-image:url(../img/volume_icon_onedrive.svg);background-image:url(../img/volume_icon_onedrive.png) \9}.elfinder-tree .elfinder-navbar-root-box .elfinder-navbar-icon{background-image:url(../img/volume_icon_box.svg);background-image:url(../img/volume_icon_box.png) \9}.elfinder-tree .elfinder-navbar-root-zip .elfinder-navbar-icon{background-image:url(../img/volume_icon_zip.svg);background-image:url(../img/volume_icon_zip.png) \9}.elfinder-tree .elfinder-navbar-root-network .elfinder-navbar-icon{background-image:url(../img/volume_icon_network.svg);background-image:url(../img/volume_icon_network.png) \9}.elfinder-droppable-active .elfinder-navbar-icon,.ui-state-active .elfinder-navbar-icon,.ui-state-hover .elfinder-navbar-icon{background-position:0 -32px}.elfinder-ltr .elfinder-navbar-subtree{margin-left:12px}.elfinder-rtl .elfinder-navbar-subtree{margin-right:12px}.elfinder-tree .elfinder-spinner{position:absolute;top:50%;margin:-7px 0 0}.elfinder-ltr .elfinder-tree .elfinder-spinner{left:0;margin-left:-2px}.elfinder-rtl .elfinder-tree .elfinder-spinner{right:0;margin-right:-2px}.elfinder-navbar .elfinder-lock,.elfinder-navbar .elfinder-perms,.elfinder-navbar .elfinder-symlink{opacity:.6;filter:Alpha(Opacity=60)}.elfinder-navbar .elfinder-perms{bottom:-1px;margin-top:-8px}.elfinder-navbar .elfinder-lock{top:-2px}.elfinder-ltr .elfinder-navbar .elfinder-perms{left:20px;transform:scale(.8)}.elfinder-rtl .elfinder-navbar .elfinder-perms{right:20px;transform:scale(.8)}.elfinder-ltr .elfinder-navbar .elfinder-lock{left:20px;transform:scale(.8)}.elfinder-rtl .elfinder-navbar .elfinder-lock{right:20px;transform:scale(.8)}.elfinder-ltr .elfinder-navbar .elfinder-symlink{left:8px;transform:scale(.8)}.elfinder-rtl .elfinder-navbar .elfinder-symlink{right:8px;transform:scale(.8)}.elfinder-navbar input{width:100%;border:0 solid;margin:0;padding:0}.elfinder-navbar .ui-resizable-handle{width:12px;background:url(../img/resize.png) center center no-repeat}.elfinder-nav-handle-icon{position:absolute;top:50%;margin:-8px 2px 0;opacity:.5;filter:Alpha(Opacity=50)}.elfinder-navbar-pager{width:100%;box-sizing:border-box;padding-top:3px;padding-bottom:3px}.elfinder-touch .elfinder-navbar-pager{padding-top:10px;padding-bottom:10px}.elfinder-places{border:none;margin:0;padding:0}.elfinder-navbar-swipe-handle{position:absolute;top:0;height:100%;width:50px;pointer-events:none}.elfinder-ltr .elfinder-navbar-swipe-handle{left:0;background:linear-gradient(to right,#dde4eb 0,rgba(221,228,235,.8) 5px,rgba(216,223,230,.3) 8px,rgba(0,0,0,.1) 95%,rgba(0,0,0,0) 100%)}.elfinder-rtl .elfinder-navbar-swipe-handle{right:0;background:linear-gradient(to left,#dde4eb 0,rgba(221,228,235,.8) 5px,rgba(216,223,230,.3) 8px,rgba(0,0,0,.1) 95%,rgba(0,0,0,0) 100%)}.elfinder-navbar-root .elfinder-places-root-icon{position:absolute;top:50%;margin-top:-9px;cursor:pointer}.elfinder-ltr .elfinder-places-root-icon{right:10px}.elfinder-rtl .elfinder-places-root-icon{left:10px}.elfinder-navbar-expanded .elfinder-places-root-icon{display:block}.elfinder-place-drag{font-size:.8em}.elfinder-quicklook{position:absolute;background:url(../img/quicklook-bg.png);overflow:hidden;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:20px 0 40px}.elfinder-navdock .elfinder-quicklook{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;font-size:90%;overflow:auto}.elfinder-quicklook.elfinder-touch{padding:30px 0 40px}.elfinder-quicklook .ui-resizable-se{width:14px;height:14px;right:5px;bottom:3px;background:url(../img/toolbar.png) 0 -496px no-repeat}.elfinder-quicklook.elfinder-touch .ui-resizable-se{-moz-transform-origin:bottom right;-moz-transform:scale(1.5);zoom:1.5}.elfinder-quicklook.elfinder-quicklook-fullscreen{position:fixed;top:0;right:0;bottom:0;left:0;margin:0;box-sizing:border-box;width:100%;height:100%;object-fit:contain;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;-webkit-background-clip:padding-box;padding:0;background:#000;display:block}.elfinder-quicklook-fullscreen .elfinder-quicklook-titlebar,.elfinder-quicklook-fullscreen.elfinder-quicklook .ui-resizable-handle,.elfinder-statusbar:after,.elfinder-statusbar:before{display:none}.elfinder-quicklook-fullscreen .elfinder-quicklook-preview{border:0 solid}.elfinder-quicklook-cover,.elfinder-quicklook-titlebar{width:100%;height:100%;top:0;left:0;position:absolute}.elfinder-quicklook-cover.elfinder-quicklook-coverbg{background-color:#fff;opacity:.000001;filter:Alpha(Opacity=.0001)}.elfinder-quicklook-titlebar{text-align:center;background:#777;height:20px;-moz-border-radius-topleft:7px;-webkit-border-top-left-radius:7px;border-top-left-radius:7px;-moz-border-radius-topright:7px;-webkit-border-top-right-radius:7px;border-top-right-radius:7px;border:none;line-height:1.2}.elfinder-navdock .elfinder-quicklook-titlebar{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;cursor:default}.elfinder-touch .elfinder-quicklook-titlebar{height:30px}.elfinder-quicklook-title{display:inline-block;white-space:nowrap;overflow:hidden}.elfinder-touch .elfinder-quicklook-title{padding:8px 0}.elfinder-quicklook-titlebar-icon{position:absolute;left:4px;top:50%;margin-top:-8px;height:16px;border:none}.elfinder-touch .elfinder-quicklook-titlebar-icon{height:22px}.elfinder-quicklook-titlebar-icon .ui-icon{position:relative;margin:-9px 3px 0 0;cursor:pointer;border-radius:10px;border:1px solid;opacity:.7;filter:Alpha(Opacity=70)}.elfinder-quicklook-titlebar-icon .ui-icon.ui-icon-closethick{padding-left:1px}.elfinder-mobile .elfinder-quicklook-titlebar-icon .ui-icon{opacity:.6;filter:Alpha(Opacity=60)}.elfinder-touch .elfinder-quicklook-titlebar-icon .ui-icon{margin-top:-5px}.elfinder-quicklook-titlebar-icon.elfinder-titlebar-button-right{left:auto;right:4px;direction:rtl}.elfinder-quicklook-titlebar-icon.elfinder-titlebar-button-right .ui-icon{margin:-9px 0 0 3px}.elfinder-touch .elfinder-quicklook-titlebar .ui-icon{-moz-transform-origin:center center;-moz-transform:scale(1.2);zoom:1.2}.elfinder-touch .elfinder-quicklook-titlebar-icon .ui-icon{margin-right:10px}.elfinder-quicklook-preview{overflow:hidden;position:relative;border:0 solid;border-left:1px solid transparent;border-right:1px solid transparent;height:100%}.elfinder-navdock .elfinder-quicklook-preview{border-left:0;border-right:0}.elfinder-quicklook-preview.elfinder-overflow-auto{overflow:auto;-webkit-overflow-scrolling:touch}.elfinder-quicklook-info-wrapper{display:table;position:absolute;width:100%;height:100%;height:calc(100% - 80px);left:0;top:20px}.elfinder-navdock .elfinder-quicklook-info-wrapper{height:calc(100% - 20px)}.elfinder-quicklook-info{display:table-cell;vertical-align:middle}.elfinder-ltr .elfinder-quicklook-info{padding:0 12px 0 112px}.elfinder-rtl .elfinder-quicklook-info{padding:0 112px 0 12px}.elfinder-ltr .elfinder-navdock .elfinder-quicklook-info{padding:0 0 0 80px}.elfinder-rtl .elfinder-navdock .elfinder-quicklook-info{padding:0 80px 0 0}.elfinder-quicklook-info .elfinder-quicklook-info-data:first-child{color:#fff;font-weight:700;padding-bottom:.5em}.elfinder-quicklook-info-data{clear:both;padding-bottom:.2em;color:#fff}.elfinder-quicklook .elfinder-cwd-icon{position:absolute;left:32px;top:50%;margin-top:-20px}.elfinder-navdock .elfinder-quicklook .elfinder-cwd-icon{left:16px}.elfinder-rtl .elfinder-quicklook .elfinder-cwd-icon{left:auto;right:32px}.elfinder-rtl .elfinder-navdock .elfinder-quicklook .elfinder-cwd-icon{right:6px}.elfinder-quicklook .elfinder-cwd-icon:before{top:-10px}.elfinder-ltr .elfinder-quicklook .elfinder-cwd-icon:after,.elfinder-ltr .elfinder-quicklook .elfinder-cwd-icon:before{left:-20px}.elfinder-ltr .elfinder-navdock .elfinder-quicklook .elfinder-cwd-icon:before{left:-14px}.elfinder-ltr .elfinder-navdock .elfinder-quicklook .elfinder-cwd-icon:after{left:-12px}.elfinder-rtl .elfinder-quicklook .elfinder-cwd-icon:before{left:auto;right:40px}.elfinder-rtl .elfinder-quicklook .elfinder-cwd-icon:after{left:auto;right:46px}.elfinder-quicklook-preview img{display:block;margin:0 auto}.elfinder-quicklook-navbar{position:absolute;left:50%;bottom:4px;width:140px;height:32px;padding:0;margin-left:-70px;border:1px solid transparent;border-radius:19px;-moz-border-radius:19px;-webkit-border-radius:19px}.elfinder-quicklook-fullscreen .elfinder-quicklook-navbar{width:188px;margin-left:-94px;padding:5px;border:1px solid #eee;background:#000;opacity:.4;filter:Alpha(Opacity=40)}.elfinder-quicklook-fullscreen .elfinder-quicklook-navbar-icon-close,.elfinder-quicklook-fullscreen .elfinder-quicklook-navbar-separator{display:inline}.elfinder-quicklook-navbar-icon{width:32px;height:32px;margin:0 7px;float:left;background:url(../img/quicklook-icons.png) 0 0 no-repeat}.elfinder-quicklook-navbar-icon-fullscreen{background-position:0 -64px}.elfinder-quicklook-navbar-icon-fullscreen-off{background-position:0 -96px}.elfinder-quicklook-navbar-icon-prev{background-position:0 0}.elfinder-quicklook-navbar-icon-next{background-position:0 -32px}.elfinder-quicklook-navbar-icon-close{background-position:0 -128px;display:none}.elfinder-quicklook-navbar-separator{width:1px;height:32px;float:left;border-left:1px solid #fff;display:none}.elfinder-quicklook-preview-archive-wrapper,.elfinder-quicklook-preview-text-wrapper{width:100%;height:100%;background:#fff;color:#222;overflow:auto;-webkit-overflow-scrolling:touch}.elfinder-quicklook-preview-archive-wrapper{font-size:90%}.elfinder-quicklook-preview-archive-wrapper strong{padding:0 5px}pre.elfinder-quicklook-preview-text,pre.elfinder-quicklook-preview-text.prettyprint{width:auto;height:auto;margin:0;padding:3px 9px;border:none;-o-tab-size:4;-moz-tab-size:4;tab-size:4}.elfinder-quicklook-preview-charsleft hr{border:none;border-top:dashed 1px}.elfinder-quicklook-preview-charsleft span{font-size:90%;font-style:italic;cursor:pointer}.elfinder-quicklook-preview-html,.elfinder-quicklook-preview-iframe,.elfinder-quicklook-preview-pdf{width:100%;height:100%;background:#fff;margin:0;border:none;display:block}.elfinder-quicklook-preview-flash{width:100%;height:100%}.elfinder-quicklook-preview-audio{width:100%;position:absolute;bottom:0;left:0}embed.elfinder-quicklook-preview-audio{height:30px;background:0 0}.elfinder-quicklook-preview-video{width:100%;height:100%}.elfinder .elfinder-quicklook .elfinder-quicklook-info *,.elfinder .elfinder-quicklook .elfinder-quicklook-preview *{-webkit-user-select:auto;-moz-user-select:text;-khtml-user-select:text;user-select:text}.elfinder-statusbar{display:flex;justify-content:space-between;cursor:default;text-align:center;font-weight:400;padding:.2em .5em;border-right:0 solid transparent;border-bottom:0 solid transparent;border-left:0 solid transparent}.elfinder-path,.elfinder-statusbar span{overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis}.elfinder-statusbar span{vertical-align:bottom}.elfinder-statusbar span.elfinder-path-other{flex-shrink:0;text-overflow:clip;-o-text-overflow:clip}.elfinder-statusbar span.ui-state-active,.elfinder-statusbar span.ui-state-hover{border:none}.elfinder-statusbar span.elfinder-path-cwd{cursor:default}.elfinder-path{display:flex;order:1;flex-grow:1;cursor:pointer;white-space:nowrap;max-width:30%\9}.elfinder-ltr .elfinder-path{text-align:left;float:left\9}.elfinder-rtl .elfinder-path{text-align:right;float:right\9}.elfinder-workzone-path{position:relative}.elfinder-workzone-path .elfinder-path{position:relative;font-size:.75em;font-weight:400;float:none;max-width:none;overflow:hidden;overflow-x:hidden;text-overflow:initial;-o-text-overflow:initial}.elfinder-mobile .elfinder-workzone-path .elfinder-path{overflow:auto;overflow-x:scroll}.elfinder-ltr .elfinder-workzone-path .elfinder-path{margin-left:24px}.elfinder-rtl .elfinder-workzone-path .elfinder-path{margin-right:24px}.elfinder-workzone-path .elfinder-path span{display:inline-block;padding:5px 3px}.elfinder-workzone-path .elfinder-path span.elfinder-path-cwd{font-weight:700}.elfinder-workzone-path .elfinder-path span.ui-state-active,.elfinder-workzone-path .elfinder-path span.ui-state-hover{border:none}.elfinder-workzone-path .elfinder-path-roots{position:absolute;top:0;width:24px;height:20px;padding:2px;border:none;overflow:hidden}.elfinder-ltr .elfinder-workzone-path .elfinder-path-roots{left:0}.elfinder-rtl .elfinder-workzone-path .elfinder-path-roots{right:0}.elfinder-stat-size{order:3;flex-grow:1;overflow:hidden;white-space:nowrap}.elfinder-ltr .elfinder-stat-size{text-align:right;float:right\9}.elfinder-rtl .elfinder-stat-size{text-align:left;float:left\9}.elfinder-stat-selected{order:2;margin:0 .5em;white-space:nowrap;overflow:hidden}.elfinder .elfinder-toast{position:absolute;top:12px;right:12px;max-width:90%;cursor:default}.elfinder .elfinder-toast>div{position:relative;pointer-events:auto;overflow:hidden;margin:0 0 6px;padding:8px 16px 8px 50px;-moz-border-radius:3px 3px 3px 3px;-webkit-border-radius:3px 3px 3px 3px;border-radius:3px 3px 3px 3px;background-position:15px center;background-repeat:no-repeat;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;color:#fff;opacity:.9;filter:alpha(opacity=90);background-color:#030303;text-align:center}.elfinder .elfinder-toast>.toast-info{background-color:#2f96b4;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=)!important}.elfinder .elfinder-toast>.toast-error{background-color:#bd362f;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=)!important}.elfinder .elfinder-toast>.toast-success{background-color:#51a351;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==)!important}.elfinder .elfinder-toast>.toast-warning{background-color:#f89406;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=)!important}.elfinder .elfinder-toast>div button.ui-button{background-image:none;margin-top:8px;padding:.5em .8em}.elfinder .elfinder-toast>.toast-success button.ui-button{background-color:green;color:#fff}.elfinder .elfinder-toast>.toast-success button.ui-button.ui-state-hover{background-color:#add6ad;color:#254b25}.elfinder .elfinder-toast>.toast-info button.ui-button{background-color:#046580;color:#fff}.elfinder .elfinder-toast>.toast-info button.ui-button.ui-state-hover{background-color:#7dc6db;color:#046580}.elfinder .elfinder-toast>.toast-warning button.ui-button{background-color:#dd8c1a;color:#fff}.elfinder .elfinder-toast>.toast-warning button.ui-button.ui-state-hover{background-color:#e7ae5e;color:#422a07}.elfinder-toolbar{padding:4px 0 3px;border-left:0 solid transparent;border-top:0 solid transparent;border-right:0 solid transparent;max-height:50%;overflow-y:auto}.elfinder-buttonset{margin:1px 4px;float:left;background:0 0;padding:0;overflow:hidden}.elfinder .elfinder-button{min-width:16px;height:16px;margin:0;padding:4px;float:left;overflow:hidden;position:relative;border:0 solid;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;line-height:1;cursor:default}.elfinder-rtl .elfinder-button{float:right}.elfinder-touch .elfinder-button{min-width:20px;height:20px}.elfinder .ui-icon-search{cursor:pointer}.elfinder-toolbar-button-separator{float:left;padding:0;height:24px;border-top:0 solid;border-right:0 solid;border-bottom:0 solid;width:0}.elfinder-rtl .elfinder-toolbar-button-separator{float:right}.elfinder-touch .elfinder-toolbar-button-separator{height:28px}.elfinder .elfinder-button.ui-state-disabled{opacity:1;filter:Alpha(Opacity=100)}.elfinder .elfinder-button.ui-state-disabled .elfinder-button-icon,.elfinder .elfinder-button.ui-state-disabled .elfinder-button-text{opacity:.4;filter:Alpha(Opacity=40)}.elfinder-rtl .elfinder-buttonset{float:right}.elfinder-button-icon{width:16px;height:16px;display:inline-block;background:url(../img/toolbar.png) no-repeat}.elfinder-button-text{position:relative;display:inline-block;top:-4px;margin:0 2px;font-size:12px}.elfinder-touch .elfinder-button-icon{transform:scale(1.25);transform-origin:top left}.elfinder-rtl.elfinder-touch .elfinder-button-icon{transform-origin:top right}.elfinder-touch .elfinder-button-text{transform:translate(3px,3px);top:-5px}.elfinder-rtl.elfinder-touch .elfinder-button-text{transform:translate(-3px,3px)}.elfinder-touch .elfinder-button-icon.elfinder-contextmenu-extra-icon{transform:scale(2);transform-origin:12px 8px}.elfinder-rtl.elfinder-touch .elfinder-button-icon.elfinder-contextmenu-extra-icon{transform-origin:4px 8px}.elfinder-button-icon-home{background-position:0 0}.elfinder-button-icon-back{background-position:0 -112px}.elfinder-button-icon-forward{background-position:0 -128px}.elfinder-button-icon-up{background-position:0 -144px}.elfinder-button-icon-dir{background-position:0 -16px}.elfinder-button-icon-opendir{background-position:0 -32px}.elfinder-button-icon-reload{background-position:0 -160px}.elfinder-button-icon-open{background-position:0 -176px}.elfinder-button-icon-mkdir{background-position:0 -192px}.elfinder-button-icon-mkfile{background-position:0 -208px}.elfinder-button-icon-rm{background-position:0 -832px}.elfinder-button-icon-trash{background-position:0 -224px}.elfinder-button-icon-restore{background-position:0 -816px}.elfinder-button-icon-copy{background-position:0 -240px}.elfinder-button-icon-cut{background-position:0 -256px}.elfinder-button-icon-paste{background-position:0 -272px}.elfinder-button-icon-getfile{background-position:0 -288px}.elfinder-button-icon-duplicate{background-position:0 -304px}.elfinder-button-icon-rename{background-position:0 -320px}.elfinder-button-icon-edit{background-position:0 -336px}.elfinder-button-icon-quicklook{background-position:0 -352px}.elfinder-button-icon-upload{background-position:0 -368px}.elfinder-button-icon-download{background-position:0 -384px}.elfinder-button-icon-info{background-position:0 -400px}.elfinder-button-icon-extract{background-position:0 -416px}.elfinder-button-icon-archive{background-position:0 -432px}.elfinder-button-icon-view{background-position:0 -448px}.elfinder-button-icon-view-list{background-position:0 -464px}.elfinder-button-icon-help{background-position:0 -480px}.elfinder-button-icon-resize{background-position:0 -512px}.elfinder-button-icon-link{background-position:0 -528px}.elfinder-button-icon-search{background-position:0 -561px}.elfinder-button-icon-sort{background-position:0 -577px}.elfinder-button-icon-rotate-r{background-position:0 -625px}.elfinder-button-icon-rotate-l{background-position:0 -641px}.elfinder-button-icon-netmount{background-position:0 -688px}.elfinder-button-icon-netunmount{background-position:0 -96px}.elfinder-button-icon-places{background-position:0 -704px}.elfinder-button-icon-chmod{background-position:0 -48px}.elfinder-button-icon-accept{background-position:0 -736px}.elfinder-button-icon-menu{background-position:0 -752px}.elfinder-button-icon-colwidth{background-position:0 -768px}.elfinder-button-icon-fullscreen{background-position:0 -784px}.elfinder-button-icon-unfullscreen{background-position:0 -800px}.elfinder-button-icon-empty{background-position:0 -848px}.elfinder-button-icon-undo{background-position:0 -864px}.elfinder-button-icon-redo{background-position:0 -880px}.elfinder-button-icon-preference{background-position:0 -896px}.elfinder-button-icon-mkdirin{background-position:0 -912px}.elfinder-button-icon-selectall{background-position:0 -928px}.elfinder-button-icon-selectnone{background-position:0 -944px}.elfinder-button-icon-selectinvert{background-position:0 -960px}.elfinder-button-icon-opennew{background-position:0 -976px}.elfinder-button-icon-hide{background-position:0 -992px}.elfinder-button-icon-text{background-position:0 -1008px}.elfinder-button-icon-email{background-image:url(../img/email.png)}.elfinder-rtl .elfinder-button-icon-back,.elfinder-rtl .elfinder-button-icon-forward,.elfinder-rtl .elfinder-button-icon-getfile,.elfinder-rtl .elfinder-button-icon-help,.elfinder-rtl .elfinder-button-icon-redo,.elfinder-rtl .elfinder-button-icon-rename,.elfinder-rtl .elfinder-button-icon-search,.elfinder-rtl .elfinder-button-icon-undo,.elfinder-rtl .elfinder-button-icon-view-list,.elfinder-rtl .ui-icon-search{-ms-transform:scale(-1,1);-webkit-transform:scale(-1,1);transform:scale(-1,1)}.elfinder-rtl.elfinder-touch .elfinder-button-icon-back,.elfinder-rtl.elfinder-touch .elfinder-button-icon-forward,.elfinder-rtl.elfinder-touch .elfinder-button-icon-getfile,.elfinder-rtl.elfinder-touch .elfinder-button-icon-help,.elfinder-rtl.elfinder-touch .elfinder-button-icon-redo,.elfinder-rtl.elfinder-touch .elfinder-button-icon-rename,.elfinder-rtl.elfinder-touch .elfinder-button-icon-search,.elfinder-rtl.elfinder-touch .elfinder-button-icon-undo,.elfinder-rtl.elfinder-touch .elfinder-button-icon-view-list,.elfinder-rtl.elfinder-touch .ui-icon-search{-ms-transform:scale(-1.25,1.25) translateX(16px);-webkit-transform:scale(-1.25,1.25) translateX(16px);transform:scale(-1.25,1.25) translateX(16px)}.elfinder .elfinder-menubutton{overflow:visible}.elfinder-button-icon-spinner{background:url(../img/spinner-mini.gif) center center no-repeat}.elfinder-button-menu{position:absolute;margin-top:24px;padding:3px 0;overflow-y:auto}.elfinder-touch .elfinder-button-menu{margin-top:30px}.elfinder-button-menu-item{white-space:nowrap;cursor:default;padding:5px 19px;position:relative}.elfinder-touch .elfinder-button-menu-item{padding:12px 19px}.elfinder-button-menu .ui-state-hover{border:0 solid}.elfinder-button-menu-item-separated{border-top:1px solid #ccc}.elfinder-button-menu-item .ui-icon{width:16px;height:16px;position:absolute;left:2px;top:50%;margin-top:-8px;display:none}.elfinder-button-menu-item-selected .ui-icon{display:block}.elfinder-button-menu-item-selected-asc .ui-icon-arrowthick-1-s,.elfinder-button-menu-item-selected-desc .ui-icon-arrowthick-1-n{display:none}.elfinder-button form{position:absolute;top:0;right:0;opacity:0;filter:Alpha(Opacity=0);cursor:pointer}.elfinder .elfinder-button form input{background:0 0;cursor:default}.elfinder .elfinder-button-search{border:0 solid;background:0 0;padding:0;margin:1px 4px;height:auto;min-height:26px;width:70px;overflow:visible}.elfinder .elfinder-button-search.ui-state-active{width:220px}.elfinder .elfinder-button-search-menu{font-size:8pt;text-align:center;width:auto;min-width:180px;position:absolute;top:30px;padding-right:5px;padding-left:5px}.elfinder-ltr .elfinder-button-search-menu{right:22px;left:auto}.elfinder-rtl .elfinder-button-search-menu{right:auto;left:22px}.elfinder-touch .elfinder-button-search-menu{top:34px}.elfinder .elfinder-button-search-menu div{margin:5px auto;display:table}.elfinder .elfinder-button-search-menu div .ui-state-hover{border:1px solid}.elfinder-ltr .elfinder-button-search{float:right;margin-right:10px}.elfinder-rtl .elfinder-button-search{float:left;margin-left:10px}.elfinder-rtl .ui-controlgroup>.ui-controlgroup-item{float:right}.elfinder-button-search input[type=text]{box-sizing:border-box;width:100%;height:26px;padding:0 20px;line-height:22px;border:1px solid #aaa;-moz-border-radius:12px;-webkit-border-radius:12px;border-radius:12px;outline:0 solid}.elfinder-button-search input::-ms-clear{display:none}.elfinder-touch .elfinder-button-search input{height:30px;line-height:28px}.elfinder-rtl .elfinder-button-search input{direction:rtl}.elfinder-button-search .ui-icon{position:absolute;height:18px;top:50%;margin:-8px 4px 0;opacity:.6;filter:Alpha(Opacity=60)}.elfinder-button-search-menu .ui-checkboxradio-icon{display:none}.elfinder-ltr .elfinder-button-search .ui-icon-search{left:0}.elfinder-ltr .elfinder-button-search .ui-icon-close,.elfinder-rtl .elfinder-button-search .ui-icon-search{right:0}.elfinder-rtl .elfinder-button-search .ui-icon-close{left:0}.elfinder-toolbar-swipe-handle{position:absolute;top:0;left:0;height:50px;width:100%;pointer-events:none;background:linear-gradient(to bottom,#dde4eb 0,rgba(221,228,235,.8) 2px,rgba(216,223,230,.3) 5px,rgba(0,0,0,.1) 95%,rgba(0,0,0,0) 100%)}
1
  /*!
2
  * elFinder - file manager for web
3
+ * Version 2.1.57 (2021-01-08)
4
  * http://elfinder.org
5
  *
6
+ * Copyright 2009-2021, Studio 42
7
  * Licensed under a 3-clauses BSD license
8
  */
9
+ .elfinder-resize-container{margin-top:.3em}.elfinder-resize-type{float:left;margin-bottom:.4em}.elfinder-resize-control{float:left}.elfinder-resize-control input[type=number]{border:1px solid #aaa;text-align:right;width:4.5em}.elfinder-resize-control input.elfinder-resize-bg{text-align:center;width:5em;direction:ltr}.elfinder-dialog-resize .elfinder-resize-control-panel{margin-top:10px}.elfinder-dialog-resize .elfinder-resize-imgrotate,.elfinder-dialog-resize .elfinder-resize-pallet{cursor:pointer}.elfinder-dialog-resize .elfinder-resize-picking{cursor:crosshair}.elfinder-dialog-resize .elfinder-resize-grid8+button{padding-top:2px;padding-bottom:2px}.elfinder-resize-preview{width:400px;height:400px;padding:10px;background:#fff;border:1px solid #aaa;float:right;position:relative;overflow:hidden;text-align:left;direction:ltr}.elfinder-resize-handle,div.elfinder-cwd-wrapper-list tr.ui-state-default td{position:relative}.elfinder-resize-handle-hline,.elfinder-resize-handle-vline{position:absolute;background-image:url(../img/crop.gif)}.elfinder-resize-handle-hline{width:100%;height:1px!important;background-repeat:repeat-x}.elfinder-resize-handle-vline{width:1px!important;height:100%;background-repeat:repeat-y}.elfinder-resize-handle-hline-top{top:0;left:0}.elfinder-resize-handle-hline-bottom{bottom:0;left:0}.elfinder-resize-handle-vline-left{top:0;left:0}.elfinder-resize-handle-vline-right{top:0;right:0}.elfinder-resize-handle-point{position:absolute;width:8px;height:8px;border:1px solid #777;background:0 0}.elfinder-resize-handle-point-n{top:0;left:50%;margin-top:-5px;margin-left:-5px}.elfinder-resize-handle-point-e,.elfinder-resize-handle-point-ne{top:0;right:0;margin-top:-5px;margin-right:-5px}.elfinder-resize-handle-point-e{top:50%}.elfinder-resize-handle-point-se{bottom:0;right:0;margin-bottom:-5px;margin-right:-5px}.elfinder-resize-handle-point-s,.elfinder-resize-handle-point-sw{bottom:0;left:50%;margin-bottom:-5px;margin-left:-5px}.elfinder-resize-handle-point-sw{left:0}.elfinder-resize-handle-point-nw,.elfinder-resize-handle-point-w{top:50%;left:0;margin-top:-5px;margin-left:-5px}.elfinder-resize-handle-point-nw{top:0}.elfinder-dialog.elfinder-dialog-resize .ui-resizable-e{width:10px;height:100%}.elfinder-dialog.elfinder-dialog-resize .ui-resizable-s{width:100%;height:10px}.elfinder-resize-loading{position:absolute;width:200px;height:30px;top:50%;margin-top:-25px;left:50%;margin-left:-100px;text-align:center;background:url(../img/progress.gif) center bottom repeat-x}.elfinder-resize-row{margin-bottom:9px;position:relative}.elfinder-resize-label{float:left;width:80px;padding-top:3px}.elfinder-resize-checkbox-label{border:1px solid transparent}.elfinder-dialog-resize .elfinder-resize-whctrls{margin:-20px 5px 0}.elfinder-ltr .elfinder-dialog-resize .elfinder-resize-whctrls{float:right}.elfinder-help-team div,.elfinder-rtl .elfinder-dialog-resize .elfinder-resize-whctrls{float:left}.elfinder-dialog-resize .ui-resizable-e,.elfinder-dialog-resize .ui-resizable-w{height:100%;width:10px}.elfinder-dialog-resize .ui-resizable-n,.elfinder-dialog-resize .ui-resizable-s{width:100%;height:10px}.elfinder-dialog-resize .ui-resizable-e{margin-right:-7px}.elfinder-dialog-resize .ui-resizable-w{margin-left:-7px}.elfinder-dialog-resize .ui-resizable-s{margin-bottom:-7px}.elfinder-dialog-resize .ui-resizable-n{margin-top:-7px}.elfinder-dialog-resize .ui-resizable-ne,.elfinder-dialog-resize .ui-resizable-nw,.elfinder-dialog-resize .ui-resizable-se,.elfinder-dialog-resize .ui-resizable-sw{width:10px;height:10px}.elfinder-dialog-resize .ui-resizable-se{background:0 0;bottom:0;right:0;margin-right:-7px;margin-bottom:-7px}.elfinder-dialog-resize .ui-resizable-sw{margin-left:-7px;margin-bottom:-7px}.elfinder-dialog-resize .ui-resizable-ne{margin-right:-7px;margin-top:-7px}.elfinder-dialog-resize .ui-resizable-nw{margin-left:-7px;margin-top:-7px}.elfinder-touch .elfinder-dialog-resize .ui-resizable-n,.elfinder-touch .elfinder-dialog-resize .ui-resizable-s{height:20px}.elfinder-touch .elfinder-dialog-resize .ui-resizable-e,.elfinder-touch .elfinder-dialog-resize .ui-resizable-w{width:20px}.elfinder-touch .elfinder-dialog-resize .ui-resizable-ne,.elfinder-touch .elfinder-dialog-resize .ui-resizable-nw,.elfinder-touch .elfinder-dialog-resize .ui-resizable-se,.elfinder-touch .elfinder-dialog-resize .ui-resizable-sw{width:30px;height:30px}.elfinder-touch .elfinder-dialog-resize .elfinder-resize-preview .ui-resizable-se{width:30px;height:30px;margin:0}.elfinder-dialog-resize .ui-icon-grip-solid-vertical{position:absolute;top:50%;right:0;margin-top:-8px;margin-right:-11px}.elfinder-dialog-resize .ui-icon-grip-solid-horizontal{position:absolute;left:50%;bottom:0;margin-left:-8px;margin-bottom:-11px}.elfinder-dialog-resize .elfinder-resize-row .ui-buttonset{float:right}.elfinder-dialog-resize .elfinder-resize-degree input,.elfinder-dialog-resize input.elfinder-resize-quality,.elfinder-mobile .elfinder-resize-control input[type=number]{width:3.5em}.elfinder-mobile .elfinder-dialog-resize .elfinder-resize-degree input,.elfinder-mobile .elfinder-dialog-resize input.elfinder-resize-quality{width:2.5em}.elfinder-dialog-resize .elfinder-resize-degree button.ui-button{padding:6px 8px}.elfinder-dialog-resize button.ui-button span{padding:0}.elfinder-dialog-resize .elfinder-resize-jpgsize{font-size:90%}.ui-widget-content .elfinder-resize-container .elfinder-resize-rotate-slider{width:195px;margin:10px 7px;background-color:#fafafa}.elfinder-dialog-resize .elfinder-resize-type span.ui-checkboxradio-icon{display:none}.elfinder-resize-preset-container{box-sizing:border-box;border-radius:5px}.elfinder-file-edit{width:100%;height:100%;margin:0;padding:2px;border:1px solid #ccc;box-sizing:border-box;resize:none}.elfinder-touch .elfinder-file-edit{font-size:16px}.elfinder-dialog-edit .ui-dialog-content.elfinder-edit-editor{background-color:#fff}.elfinder-dialog-edit .ui-dialog-content.elfinder-edit-editor .elfinder-edit-imageeditor{width:100%;height:300px;max-height:100%;text-align:center}.elfinder-dialog-edit .ui-dialog-content.elfinder-edit-editor .elfinder-edit-imageeditor *{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;user-select:none}.elfinder-edit-imageeditor .tui-image-editor-main-container .tui-image-editor-main{top:0}.elfinder-edit-imageeditor .tui-image-editor-main-container .tui-image-editor-header{display:none}.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-crop .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-draw .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-filter .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-flip .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-icon .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-mask .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-rotate .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-shape .tui-image-editor-wrap,.elfinder-edit-imageeditor .tui-image-editor-main.tui-image-editor-menu-text .tui-image-editor-wrap{height:calc(100% - 150px)}.elfinder-touch.elfinder-fullscreen-native textarea.elfinder-file-edit{padding-bottom:20em;margin-bottom:-20em}.elfinder-dialog-edit .ui-dialog-buttonpane .elfinder-dialog-confirm-encoding{font-size:12px}.ui-dialog-buttonpane .ui-dialog-buttonset.elfinder-edit-extras{margin:0 1em 0 .2em;float:left}.ui-dialog-buttonpane .ui-dialog-buttonset.elfinder-edit-extras-quality{padding-top:6px}.ui-dialog-buttonpane .ui-dialog-buttonset.elfinder-edit-extras select{font-size:12px;margin-top:8px}.elfinder-dialog-edit .ui-dialog-buttonpane .ui-icon,.elfinder-edit-onlineconvert-bottom-btn button,.elfinder-edit-onlineconvert-button button,.elfinder-preference dt label{cursor:pointer}.elfinder-edit-spinner{position:absolute;top:50%;text-align:center;width:100%;font-size:16pt}.elfinder-dialog-edit .elfinder-edit-spinner .elfinder-spinner,.elfinder-dialog-edit .elfinder-edit-spinner .elfinder-spinner-text{float:none}.elfinder-dialog-edit .elfinder-toast>div{width:280px}.elfinder-edit-onlineconvert-button{display:inline-block;width:180px;min-height:30px;vertical-align:top}.elfinder-edit-onlineconvert-bottom-btn button.elfinder-button-ios-multiline{-webkit-appearance:none;border-radius:16px;color:#000;text-align:center;padding:8px;background-color:#eee;background-image:-webkit-linear-gradient(top,#fafafa 0%,#c4c4c4 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#c4c4c4 100%)}.elfinder-edit-onlineconvert-button .elfinder-button-icon{margin:0 10px;vertical-align:middle;cursor:pointer}.elfinder-edit-onlineconvert-bottom-btn{text-align:center;margin:10px 0 0}.elfinder-edit-onlineconvert-link{margin-top:1em;text-align:center}.elfinder-edit-onlineconvert-link .elfinder-button-icon{background-image:url(../img/editor-icons.png);background-repeat:no-repeat;background-position:0 -144px;margin-bottom:-3px}.elfinder-edit-onlineconvert-link a,ul.elfinder-help-integrations a{text-decoration:none}div.elfinder-cwd-wrapper-list tr.ui-state-default td span.ui-icon{position:absolute;top:4px;left:0;right:0;margin:auto 0 auto auto}.elfinder-touch div.elfinder-cwd-wrapper-list tr.ui-state-default td span.ui-icon{top:7px}.elfinder-rtl div.elfinder-cwd-wrapper-list tr.ui-state-default td span.ui-icon{margin:auto auto auto 0}.elfinder-help{margin-bottom:.5em;-webkit-overflow-scrolling:touch}.elfinder-help .ui-tabs-panel{overflow:auto;padding:10px}.elfinder-dialog .ui-tabs .ui-tabs-nav li{overflow:hidden}.elfinder-dialog .ui-tabs .ui-tabs-nav li a{padding:.2em .8em;display:inline-block}.elfinder-touch .elfinder-dialog .ui-tabs .ui-tabs-nav li a{padding:.5em}.elfinder-dialog .ui-tabs-active a{background:inherit}.elfinder-help-shortcuts{height:auto;padding:10px;margin:0;box-sizing:border-box}.elfinder-help-shortcut{white-space:nowrap;clear:both}.elfinder-help-shortcut-pattern{float:left;width:160px}.elfinder-help-logo{width:100px;height:96px;float:left;margin-right:1em;background:url(../img/logo.png) center center no-repeat}.elfinder-help h3{font-size:1.5em;margin:.2em 0 .3em}.elfinder-help-separator{clear:both;padding:.5em}.elfinder-help-link{display:inline-block;margin-right:12px;padding:2px 0;white-space:nowrap}.elfinder-rtl .elfinder-help-link{margin-right:0;margin-left:12px}.elfinder-help .ui-priority-secondary{font-size:.9em}.elfinder-help .ui-priority-primary{margin-bottom:7px}.elfinder-help-team{clear:both;text-align:right;border-bottom:1px solid #ccc;margin:.5em 0;font-size:.9em}.elfinder-help-license{font-size:.9em}.elfinder-help-disabled{font-weight:700;text-align:center;margin:90px 0}.elfinder-help .elfinder-dont-panic{display:block;border:1px solid transparent;width:200px;height:200px;margin:30px auto;text-decoration:none;text-align:center;position:relative;background:#d90004;-moz-box-shadow:5px 5px 9px #111;-webkit-box-shadow:5px 5px 9px #111;box-shadow:5px 5px 9px #111;background:-moz-radial-gradient(80px 80px,circle farthest-corner,#d90004 35%,#960004 100%);background:-webkit-gradient(radial,80 80,60,80 80,120,from(#d90004),to(#960004));-moz-border-radius:100px;-webkit-border-radius:100px;border-radius:100px;outline:none}.elfinder-help .elfinder-dont-panic span{font-size:3em;font-weight:700;text-align:center;color:#fff;position:absolute;left:0;top:45px}ul.elfinder-help-integrations ul{padding:0;margin:0 1em 1em}ul.elfinder-help-integrations a:hover{text-decoration:underline}.elfinder-help-debug{height:100%;padding:0;margin:0;overflow:none;border:none}.elfinder-help-debug .ui-tabs-panel{padding:0;margin:0;overflow:auto}.elfinder-help-debug fieldset{margin-bottom:10px;border-color:#789;border-radius:10px}.elfinder-help-debug legend{font-size:1.2em;font-weight:700;color:#2e8b57}.elfinder-help-debug dl{margin:0}.elfinder-help-debug dt{color:#789}.elfinder-help-debug dt:before{content:"["}.elfinder-help-debug dt:after{content:"]"}.elfinder-help-debug dd{margin-left:1em}.elfinder-dialog .elfinder-preference .ui-tabs-nav{margin-bottom:1px;height:auto}.elfinder-preference .ui-tabs-panel{padding:10px 10px 0;overflow:auto;box-sizing:border-box;-webkit-overflow-scrolling:touch}.elfinder-preference a.ui-state-hover,.elfinder-preference label.ui-state-hover{border:none}.elfinder-preference dl{width:100%;display:inline-block;margin:.5em 0}.elfinder-preference dt{display:block;width:200px;clear:left;float:left;max-width:50%}.elfinder-rtl .elfinder-preference dt{clear:right;float:right}.elfinder-preference dd{margin-bottom:1em}.elfinder-preference dd input[type=checkbox],.elfinder-preference dd label{white-space:nowrap;display:inline-block;cursor:pointer}.elfinder-preference dt.elfinder-preference-checkboxes{width:100%;max-width:none}.elfinder-preference dd.elfinder-preference-checkboxes{padding-top:3ex}.elfinder-preference select{max-width:100%}.elfinder-preference dd.elfinder-preference-iconSize .ui-slider{width:50%;max-width:100px;display:inline-block;margin:0 10px}.elfinder-preference button{margin:0 16px}.elfinder-preference button+button{margin:0 -10px}.elfinder-preference .elfinder-preference-taball .elfinder-reference-hide-taball{display:none}.elfinder-preference-theme fieldset{margin-bottom:10px}.elfinder-preference-theme legend a{font-size:1.8em;text-decoration:none;cursor:pointer}.elfinder-preference-theme dt{width:20%;word-break:break-all}.elfinder-preference-theme dt:after{content:" :"}.elfinder-preference-theme dd{margin-inline-start:20%}.elfinder-preference img.elfinder-preference-theme-image{display:block;margin-left:auto;margin-right:auto;max-width:90%;max-height:200px;cursor:pointer}.elfinder-preference-theme-btn,.elfinder-rename-batch-type{text-align:center}.elfinder-preference-theme button.elfinder-preference-theme-default{display:inline;margin:0 10px;font-size:8pt}.elfinder-rtl .elfinder-info-title .elfinder-cwd-icon:before{right:33px;left:auto}.elfinder-info-title .elfinder-cwd-icon.elfinder-cwd-bgurl:after{content:none}.elfinder-upload-dialog-wrapper .elfinder-upload-dirselect{position:absolute;bottom:2px;width:16px;height:16px;padding:10px;border:none;overflow:hidden;cursor:pointer}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-item .ui-icon,.elfinder-ltr .elfinder-upload-dialog-wrapper .elfinder-upload-dirselect{left:2px}.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-item .ui-icon,.elfinder-rtl .elfinder-upload-dialog-wrapper .elfinder-upload-dirselect{right:2px}.elfinder-ltr .elfinder-rm-title .elfinder-cwd-icon:before{left:38px}.elfinder-rtl .elfinder-rm-title .elfinder-cwd-icon:before{right:86px;left:auto}.elfinder-rm-title .elfinder-cwd-icon.elfinder-cwd-bgurl:after{content:none}.elfinder-rename-batch div{margin:5px 8px}.elfinder-rename-batch .elfinder-rename-batch-name input{width:100%;font-size:1.6em}.elfinder-rename-batch .elfinder-rename-batch-type label{margin:2px;font-size:.9em}.elfinder-rename-batch-preview{padding:0 8px;font-size:1.1em;min-height:4ex}.ui-front{z-index:100}.elfinder .elfinder-cwd table td div,.elfinder-cwd table td,div.elfinder *,div.elfinder :after,div.elfinder :before{box-sizing:content-box}div.elfinder fieldset{display:block;margin-inline-start:2px;margin-inline-end:2px;padding-block-start:.35em;padding-inline-start:.75em;padding-inline-end:.75em;padding-block-end:.625em;min-inline-size:min-content;border-width:2px;border-style:groove;border-color:threedface;border-image:initial}div.elfinder legend{display:block;padding-inline-start:2px;padding-inline-end:2px;border-width:initial;border-style:none;border-color:initial;border-image:initial;width:auto;margin-bottom:0}div.elfinder{padding:0;position:relative;display:block;visibility:visible;font-size:18px;font-family:Verdana,Arial,Helvetica,sans-serif}.elfinder-ios input,.elfinder-ios select,.elfinder-ios textarea{font-size:16px!important}.elfinder.elfinder-fullscreen>.ui-resizable-handle{display:none}.elfinder-font-mono{line-height:2ex}.elfinder.elfinder-processing *{cursor:progress!important}.elfinder.elfinder-processing.elfinder-touch .elfinder-workzone:after{position:absolute;top:0;width:100%;height:3px;content:'';left:0;background-image:url(../img/progress.gif);opacity:.6;pointer-events:none}.elfinder :not(input):not(textarea):not(select):not([contenteditable=true]),.elfinder-contextmenu :not(input):not(textarea):not(select):not([contenteditable=true]){-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;user-select:none}.elfinder .overflow-scrolling-touch{-webkit-overflow-scrolling:touch}.elfinder-rtl{text-align:right;direction:rtl}.elfinder-workzone{padding:0;position:relative;overflow:hidden}.elfinder-lock,.elfinder-perms,.elfinder-symlink{position:absolute;width:16px;height:16px;background-image:url(../img/toolbar.png);background-repeat:no-repeat}.elfinder-perms,.elfinder-symlink{background-position:0 -528px}.elfinder-na .elfinder-perms{background-position:0 -96px}.elfinder-ro .elfinder-perms{background-position:0 -64px}.elfinder-wo .elfinder-perms{background-position:0 -80px}.elfinder-group .elfinder-perms{background-position:0 0}.elfinder-lock{background-position:0 -656px}.elfinder-drag-helper{top:0;left:0;width:70px;height:60px;padding:0 0 0 25px;z-index:100000;will-change:left,top}.elfinder-drag-helper.html5-native{position:absolute;top:-1000px;left:-1000px}.elfinder-drag-helper-icon-status{position:absolute;width:16px;height:16px;left:42px;top:60px;background:url(../img/toolbar.png) 0 -96px no-repeat;display:block}.elfinder-drag-helper-move .elfinder-drag-helper-icon-status{background-position:0 -720px}.elfinder-drag-helper-plus .elfinder-drag-helper-icon-status{background-position:0 -544px}.elfinder-drag-num{display:inline-box;position:absolute;top:0;left:0;width:auto;height:14px;text-align:center;padding:1px 3px;font-weight:700;color:#fff;background-color:red;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.elfinder-drag-helper .elfinder-cwd-icon{margin:0 0 0 -24px;float:left}.elfinder-overlay{position:absolute;opacity:.2;filter:Alpha(Opacity=20)}.elfinder .elfinder-panel{position:relative;background-image:none;padding:7px 12px}[draggable=true]{-khtml-user-drag:element}.elfinder [contentEditable=true]:empty:not(:focus):before{content:attr(data-ph)}.elfinder div.elfinder-bottomtray{position:fixed;bottom:0;max-width:100%;opacity:.8}.elfinder div.elfinder-bottomtray>div{top:initial;right:initial;left:initial}.elfinder.elfinder-ltr div.elfinder-bottomtray{left:0}.elfinder.elfinder-rtl div.elfinder-bottomtray{right:0}.elfinder .elfinder-ui-tooltip,.elfinder-ui-tooltip{font-size:14px;padding:2px 4px}.elfinder-ui-progressbar{pointer-events:none;position:absolute;width:0;height:2px;top:0;border-radius:2px;filter:blur(1px)}.elfinder-ltr .elfinder-ui-progressbar{left:0}.elfinder-rtl .elfinder-ui-progressbar{right:0}.elfinder .elfinder-contextmenu,.elfinder .elfinder-contextmenu-sub{position:absolute;border:1px solid #aaa;background:#fff;color:#555;padding:4px 0;top:0;left:0}.elfinder .elfinder-contextmenu-sub{top:5px}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-sub{margin-left:-5px}.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-sub{margin-right:-5px}.elfinder .elfinder-contextmenu-header{margin-top:-4px;padding:0 .5em .2ex;border:none;text-align:center}.elfinder .elfinder-contextmenu-header span{font-size:.8em;font-weight:bolder}.elfinder .elfinder-contextmenu-item{position:relative;display:block;padding:4px 30px;text-decoration:none;white-space:nowrap;cursor:default}.elfinder .elfinder-contextmenu-item.ui-state-active{border:none}.elfinder .elfinder-contextmenu-item .ui-icon{width:16px;height:16px;position:absolute;left:auto;right:auto;top:50%;margin-top:-8px}.elfinder-touch .elfinder-contextmenu-item{padding:12px 38px}.elfinder-navbar-root-local.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_local.svg);background-size:contain}.elfinder-navbar-root-trash.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_trash.svg);background-size:contain}.elfinder-navbar-root-ftp.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_ftp.svg);background-size:contain}.elfinder-navbar-root-sql.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_sql.svg);background-size:contain}.elfinder-navbar-root-dropbox.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_dropbox.svg);background-size:contain}.elfinder-navbar-root-googledrive.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_googledrive.svg);background-size:contain}.elfinder-navbar-root-onedrive.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_onedrive.svg);background-size:contain}.elfinder-navbar-root-box.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_box.svg);background-size:contain}.elfinder-navbar-root-zip.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_zip.svg);background-size:contain}.elfinder-navbar-root-network.elfinder-contextmenu-icon{background-image:url(../img/volume_icon_network.svg);background-size:contain}.elfinder .elfinder-contextmenu .elfinder-contextmenu-item span{display:block}.elfinder .elfinder-contextmenu-sub .elfinder-contextmenu-item{padding-left:12px;padding-right:12px}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-item{text-align:left}.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-item{text-align:right}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-sub .elfinder-contextsubmenu-item-icon{padding-left:28px}.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-sub .elfinder-contextsubmenu-item-icon{padding-right:28px}.elfinder-touch .elfinder-contextmenu-ltr .elfinder-contextmenu-sub .elfinder-contextsubmenu-item-icon{padding-left:36px}.elfinder-touch .elfinder-contextmenu-rtl .elfinder-contextmenu-sub .elfinder-contextsubmenu-item-icon{padding-right:36px}.elfinder .elfinder-contextmenu-arrow,.elfinder .elfinder-contextmenu-extra-icon,.elfinder .elfinder-contextmenu-icon{position:absolute;top:50%;margin-top:-8px;overflow:hidden}.elfinder-touch .elfinder-button-icon.elfinder-contextmenu-icon{transform-origin:center center}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-icon{left:8px}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-extra-icon,.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-icon{right:8px}.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-extra-icon{left:8px}.elfinder .elfinder-contextmenu-arrow{width:16px;height:16px;background:url(../img/arrows-normal.png) 5px 4px no-repeat}.elfinder .elfinder-contextmenu-ltr .elfinder-contextmenu-arrow{right:5px}.elfinder .elfinder-contextmenu-rtl .elfinder-contextmenu-arrow{left:5px;background-position:0 -10px}.elfinder .elfinder-contextmenu-extra-icon a,.elfinder .elfinder-contextmenu-extra-icon span{position:relative;width:100%;height:100%;margin:0;color:transparent!important;text-decoration:none;cursor:pointer}.elfinder .elfinder-contextmenu .ui-state-hover{border:0 solid;background-image:none}.elfinder .elfinder-contextmenu-separator{height:0;border-top:1px solid #ccc;margin:0 1px}.elfinder .elfinder-contextmenu-item .elfinder-button-icon.ui-state-disabled{background-image:url(../img/toolbar.png)}.elfinder-cwd-wrapper{overflow:auto;position:relative;padding:2px;margin:0}.elfinder-cwd-wrapper-list{padding:0}.elfinder-cwd{position:absolute;top:0;cursor:default;padding:0;margin:0;-ms-touch-action:auto;touch-action:auto;min-width:100%}.elfinder-ltr .elfinder-cwd{left:0}.elfinder-rtl .elfinder-cwd{right:0}.elfinder-cwd.elfinder-table-header-sticky{position:-webkit-sticky;position:-ms-sticky;position:sticky;top:0;left:auto;right:auto;width:-webkit-max-content;width:-moz-max-content;width:-ms-max-content;width:max-content;height:0;overflow:visible}.elfinder-cwd.elfinder-table-header-sticky table{border-top:2px solid;padding-top:0}.elfinder-cwd.elfinder-table-header-sticky td{display:inline-block}.elfinder-droppable-active .elfinder-cwd.elfinder-table-header-sticky table{border-top:2px solid transparent}.elfinder .elfinder-cwd table tbody.elfinder-cwd-fixheader,.elfinder-cwd-fixheader .elfinder-cwd{position:relative}.elfinder .elfinder-cwd-wrapper.elfinder-droppable-active{outline:2px solid #8cafed;outline-offset:-2px}.elfinder-cwd-wrapper-empty .elfinder-cwd:after{display:block;height:auto;width:90%;width:calc(100% - 20px);position:absolute;top:50%;left:50%;-ms-transform:translateY(-50%) translateX(-50%);-webkit-transform:translateY(-50%) translateX(-50%);transform:translateY(-50%) translateX(-50%);line-height:1.5em;text-align:center;white-space:pre-wrap;opacity:.6;filter:Alpha(Opacity=60);font-weight:700}.elfinder-cwd-file .elfinder-cwd-select{position:absolute;top:0;left:0;background-color:transparent;opacity:.4;filter:Alpha(Opacity=40)}.elfinder-mobile .elfinder-cwd-file .elfinder-cwd-select{width:30px;height:30px}.elfinder .elfinder-cwd-selectall,.elfinder-cwd-file.ui-selected .elfinder-cwd-select{opacity:.8;filter:Alpha(Opacity=80)}.elfinder-rtl .elfinder-cwd-file .elfinder-cwd-select{left:auto;right:0}.elfinder .elfinder-cwd-selectall{position:absolute;width:30px;height:30px;top:0}.elfinder .elfinder-workzone.elfinder-cwd-wrapper-empty .elfinder-cwd-selectall{display:none}.elfinder-ltr .elfinder-workzone .elfinder-cwd-selectall{text-align:right;right:18px;left:auto}.elfinder-rtl .elfinder-workzone .elfinder-cwd-selectall{text-align:left;right:auto;left:18px}.elfinder-ltr.elfinder-mobile .elfinder-workzone .elfinder-cwd-selectall{right:0}.elfinder-rtl.elfinder-mobile .elfinder-workzone .elfinder-cwd-selectall{left:0}.elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-select.ui-state-hover{background-color:transparent}.elfinder-cwd-view-icons .elfinder-cwd-file{width:120px;height:90px;padding-bottom:2px;cursor:default;border:none;position:relative}.elfinder .std42-dialog .ui-dialog-content label,.elfinder-cwd-view-icons .elfinder-cwd-file .ui-state-active{border:none}.elfinder-ltr .elfinder-cwd-view-icons .elfinder-cwd-file{float:left;margin:0 3px 2px 0}.elfinder-rtl .elfinder-cwd-view-icons .elfinder-cwd-file{float:right;margin:0 0 5px 3px}.elfinder-cwd-view-icons .elfinder-cwd-file .ui-state-hover{border:0 solid}.elfinder-cwd-view-icons .elfinder-cwd-file-wrapper{width:52px;height:52px;margin:1px auto;padding:2px;position:relative}.elfinder-cwd-size1 .elfinder-cwd-icon:before,.elfinder-cwd-size2 .elfinder-cwd-icon:before,.elfinder-cwd-size3 .elfinder-cwd-icon:before{top:3px;display:block}.elfinder-cwd-size1.elfinder-cwd-view-icons .elfinder-cwd-file{width:120px;height:112px}.elfinder-cwd-size1.elfinder-cwd-view-icons .elfinder-cwd-file-wrapper{width:74px;height:74px}.elfinder-cwd-size1 .elfinder-cwd-icon,.elfinder-cwd-size2 .elfinder-cwd-icon,.elfinder-cwd-size3 .elfinder-cwd-icon{-ms-transform-origin:top center;-ms-transform:scale(1.5);-webkit-transform-origin:top center;-webkit-transform:scale(1.5);transform-origin:top center;transform:scale(1.5)}.elfinder-cwd-size1 .elfinder-cwd-icon.elfinder-cwd-bgurl:before{-ms-transform-origin:top left;-ms-transform:scale(1.35) translate(-4px,15%);-webkit-transform-origin:top left;-webkit-transform:scale(1.35) translate(-4px,15%);transform-origin:top left;transform:scale(1.35) translate(-4px,15%)}.elfinder-cwd-size1 .elfinder-cwd-icon.elfinder-cwd-bgurl:after{-ms-transform:scale(1) translate(10px,-5px);-webkit-transform:scale(1) translate(10px,-5px);transform:scale(1) translate(10px,-5px)}.elfinder-cwd-size1 .elfinder-cwd-icon.elfinder-cwd-bgurl{-ms-transform-origin:center center;-ms-transform:scale(1);-webkit-transform-origin:center center;-webkit-transform:scale(1);transform-origin:center center;transform:scale(1);width:72px;height:72px;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}.elfinder-cwd-size2.elfinder-cwd-view-icons .elfinder-cwd-file{width:140px;height:134px}.elfinder-cwd-size2.elfinder-cwd-view-icons .elfinder-cwd-file-wrapper{width:98px;height:98px}.elfinder-cwd-size2 .elfinder-cwd-icon,.elfinder-cwd-size3 .elfinder-cwd-icon{-ms-transform:scale(2);-webkit-transform:scale(2);transform:scale(2)}.elfinder-cwd-size2 .elfinder-cwd-icon.elfinder-cwd-bgurl:before{-ms-transform-origin:top left;-ms-transform:scale(1.8) translate(-5px,18%);-webkit-transform-origin:top left;-webkit-transform:scale(1.8) translate(-5px,18%);transform-origin:top left;transform:scale(1.8) translate(-5px,18%)}.elfinder-cwd-size2 .elfinder-cwd-icon.elfinder-cwd-bgurl:after{-ms-transform:scale(1.1) translate(0,10px);-webkit-transform:scale(1.1) translate(0,10px);transform:scale(1.1) translate(0,10px)}.elfinder-cwd-size2 .elfinder-cwd-icon.elfinder-cwd-bgurl{-ms-transform-origin:center center;-ms-transform:scale(1);-webkit-transform-origin:center center;-webkit-transform:scale(1);transform-origin:center center;transform:scale(1);width:96px;height:96px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.elfinder-cwd-size3.elfinder-cwd-view-icons .elfinder-cwd-file{width:174px;height:158px}.elfinder-cwd-size3.elfinder-cwd-view-icons .elfinder-cwd-file-wrapper{width:122px;height:122px}.elfinder-cwd-size3 .elfinder-cwd-icon{-ms-transform:scale(2.5);-webkit-transform:scale(2.5);transform:scale(2.5)}.elfinder-cwd-size3 .elfinder-cwd-icon.elfinder-cwd-bgurl:before{-ms-transform-origin:top left;-ms-transform:scale(2.25) translate(-6px,20%);-webkit-transform-origin:top left;-webkit-transform:scale(2.25) translate(-6px,20%);transform-origin:top left;transform:scale(2.25) translate(-6px,20%)}.elfinder-cwd-size3 .elfinder-cwd-icon.elfinder-cwd-bgurl:after{-ms-transform:scale(1.2) translate(-9px,22px);-webkit-transform:scale(1.2) translate(-9px,22px);transform:scale(1.2) translate(-9px,22px)}.elfinder-cwd-size3 .elfinder-cwd-icon.elfinder-cwd-bgurl{-ms-transform-origin:center center;-ms-transform:scale(1);-webkit-transform-origin:center center;-webkit-transform:scale(1);transform-origin:center center;transform:scale(1);width:120px;height:120px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}.elfinder-cwd-view-icons .elfinder-cwd-filename{text-align:center;max-height:2.4em;line-height:1.2em;white-space:pre-line;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;margin:3px 1px 0;padding:1px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;word-break:break-word;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.elfinder-cwd-view-icons .elfinder-perms{bottom:4px;right:2px}.elfinder-cwd-view-icons .elfinder-lock{top:-3px;right:-2px}.elfinder-cwd-view-icons .elfinder-symlink{bottom:6px;left:0}.elfinder-cwd-icon{display:block;width:48px;height:48px;margin:0 auto;background-image:url(../img/icons-big.svg);background-image:url(../img/icons-big.png) \9;background-position:0 0;background-repeat:no-repeat;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box}.elfinder-cwd .elfinder-navbar-root-local.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-local td .elfinder-cwd-icon,.elfinder-navbar-root-local .elfinder-cwd-icon{background-image:url(../img/volume_icon_local.svg);background-image:url(../img/volume_icon_local.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-local.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd .elfinder-navbar-root-trash.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-trash td .elfinder-cwd-icon,.elfinder-navbar-root-trash .elfinder-cwd-icon{background-image:url(../img/volume_icon_trash.svg);background-image:url(../img/volume_icon_trash.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-trash.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd .elfinder-navbar-root-ftp.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-ftp td .elfinder-cwd-icon,.elfinder-navbar-root-ftp .elfinder-cwd-icon{background-image:url(../img/volume_icon_ftp.svg);background-image:url(../img/volume_icon_ftp.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-ftp.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd .elfinder-navbar-root-sql.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-sql td .elfinder-cwd-icon,.elfinder-navbar-root-sql .elfinder-cwd-icon{background-image:url(../img/volume_icon_sql.svg);background-image:url(../img/volume_icon_sql.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-sql.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd .elfinder-navbar-root-dropbox.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-dropbox td .elfinder-cwd-icon,.elfinder-navbar-root-dropbox .elfinder-cwd-icon{background-image:url(../img/volume_icon_dropbox.svg);background-image:url(../img/volume_icon_dropbox.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-dropbox.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd-view-list .elfinder-navbar-root-googledrive td .elfinder-cwd-icon,.elfinder-navbar-root-googledrive .elfinder-cwd-icon{background-position:0 0}.elfinder-cwd .elfinder-navbar-root-googledrive.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-googledrive td .elfinder-cwd-icon,.elfinder-navbar-root-googledrive .elfinder-cwd-icon{background-image:url(../img/volume_icon_googledrive.svg);background-image:url(../img/volume_icon_googledrive.png) \9;background-size:contain}.elfinder-cwd-view-list .elfinder-navbar-root-onedrive td .elfinder-cwd-icon,.elfinder-navbar-root-onedrive .elfinder-cwd-icon{background-position:0 0}.elfinder-cwd .elfinder-navbar-root-onedrive.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-onedrive td .elfinder-cwd-icon,.elfinder-navbar-root-onedrive .elfinder-cwd-icon{background-image:url(../img/volume_icon_onedrive.svg);background-image:url(../img/volume_icon_onedrive.png) \9;background-size:contain}.elfinder-cwd-view-list .elfinder-navbar-root-box td .elfinder-cwd-icon,.elfinder-navbar-root-box .elfinder-cwd-icon{background-position:0 0}.elfinder-cwd .elfinder-navbar-root-box.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-box td .elfinder-cwd-icon,.elfinder-navbar-root-box .elfinder-cwd-icon{background-image:url(../img/volume_icon_box.svg);background-image:url(../img/volume_icon_box.png) \9;background-size:contain}.elfinder-cwd .elfinder-navbar-root-zip.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-zip td .elfinder-cwd-icon,.elfinder-navbar-root-zip .elfinder-cwd-icon{background-image:url(../img/volume_icon_zip.svg);background-image:url(../img/volume_icon_zip.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-box.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd .elfinder-navbar-root-googledrive.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd .elfinder-navbar-root-onedrive.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd .elfinder-navbar-root-network.elfinder-droppable-active .elfinder-cwd-icon,.elfinder-cwd-view-list .elfinder-navbar-root-network td .elfinder-cwd-icon,.elfinder-navbar-root-network .elfinder-cwd-icon{background-image:url(../img/volume_icon_network.svg);background-image:url(../img/volume_icon_network.png) \9;background-position:0 0;background-size:contain}.elfinder-cwd .elfinder-navbar-root-network.elfinder-droppable-active .elfinder-cwd-icon{background-position:1px -1px}.elfinder-cwd-icon:before{content:none;position:absolute;left:0;top:5px;min-width:20px;max-width:84px;text-align:center;padding:0 4px 1px;border-radius:4px;font-family:Verdana;font-size:10px;line-height:1.3em;-webkit-transform:scale(.9);-moz-transform:scale(.9);-ms-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9)}.elfinder-cwd-view-icons .elfinder-cwd-icon.elfinder-cwd-bgurl:before{left:-10px}.elfinder-cwd-icon.elfinder-cwd-icon-mp2t:before{content:'ts'}.elfinder-cwd-icon.elfinder-cwd-icon-dash-xml:before{content:'dash'}.elfinder-cwd-icon.elfinder-cwd-icon-x-mpegurl:before{content:'hls'}.elfinder-cwd-icon.elfinder-cwd-icon-x-c:before{content:'c++'}.elfinder-cwd-icon.elfinder-cwd-bgurl{background-position:center center;background-repeat:no-repeat}.elfinder-cwd-icon.elfinder-cwd-bgurl,.elfinder-cwd-icon.elfinder-cwd-bgurl.elfinder-cwd-bgself{-moz-background-size:cover;background-size:cover}.elfinder-cwd-icon.elfinder-cwd-bgurl:after{content:' '}.elfinder-cwd-bgurl:after{position:relative;display:inline-block;top:36px;left:-38px;width:48px;height:48px;background-image:url(../img/icons-big.svg);background-image:url(../img/icons-big.png) \9;background-repeat:no-repeat;background-size:auto!important;opacity:.8;filter:Alpha(Opacity=60);-webkit-transform-origin:54px -24px;-webkit-transform:scale(.6);-moz-transform-origin:54px -24px;-moz-transform:scale(.6);-ms-transform-origin:54px -24px;-ms-transform:scale(.6);-o-transform-origin:54px -24px;-o-transform:scale(.6);transform-origin:54px -24px;transform:scale(.6)}.elfinder-cwd-icon.elfinder-cwd-icon-drag{width:48px;height:48px}.elfinder-cwd-icon-directory.elfinder-cwd-bgurl:after,.elfinder-cwd-icon-image.elfinder-cwd-bgurl:after,.elfinder-cwd-icon.elfinder-cwd-icon-drag:after,.elfinder-cwd-icon.elfinder-cwd-icon-drag:before{content:none}.elfinder-cwd .elfinder-droppable-active .elfinder-cwd-icon{background-position:0 -100px}.elfinder-cwd .elfinder-droppable-active{outline:2px solid #8cafed;outline-offset:-2px}.elfinder-cwd-icon-directory{background-position:0 -50px}.elfinder-cwd-icon-application,.elfinder-cwd-icon-application:after{background-position:0 -150px}.elfinder-cwd-icon-text,.elfinder-cwd-icon-text:after{background-position:0 -1350px}.elfinder-cwd-icon-plain,.elfinder-cwd-icon-plain:after,.elfinder-cwd-icon-x-empty,.elfinder-cwd-icon-x-empty:after{background-position:0 -200px}.elfinder-cwd-icon-image,.elfinder-cwd-icon-image:after,.elfinder-cwd-icon-vnd-adobe-photoshop,.elfinder-cwd-icon-vnd-adobe-photoshop:after{background-position:0 -250px}.elfinder-cwd-icon-postscript,.elfinder-cwd-icon-postscript:after{background-position:0 -1550px}.elfinder-cwd-icon-audio,.elfinder-cwd-icon-audio:after{background-position:0 -300px}.elfinder-cwd-icon-dash-xml,.elfinder-cwd-icon-flash-video,.elfinder-cwd-icon-video,.elfinder-cwd-icon-video:after,.elfinder-cwd-icon-vnd-apple-mpegurl,.elfinder-cwd-icon-x-mpegurl{background-position:0 -350px}.elfinder-cwd-icon-rtf,.elfinder-cwd-icon-rtf:after,.elfinder-cwd-icon-rtfd,.elfinder-cwd-icon-rtfd:after{background-position:0 -400px}.elfinder-cwd-icon-pdf,.elfinder-cwd-icon-pdf:after{background-position:0 -450px}.elfinder-cwd-icon-ms-excel,.elfinder-cwd-icon-ms-excel:after,.elfinder-cwd-icon-vnd-ms-excel,.elfinder-cwd-icon-vnd-ms-excel-addin-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-excel-addin-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-excel-sheet-binary-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-excel-sheet-binary-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-excel-sheet-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-excel-sheet-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-excel-template-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-excel-template-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-excel:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-spreadsheetml-sheet,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-spreadsheetml-sheet:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-spreadsheetml-template,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-spreadsheetml-template:after{background-position:0 -1450px}.elfinder-cwd-icon-vnd-oasis-opendocument-spreadsheet,.elfinder-cwd-icon-vnd-oasis-opendocument-spreadsheet-template,.elfinder-cwd-icon-vnd-oasis-opendocument-spreadsheet-template:after,.elfinder-cwd-icon-vnd-oasis-opendocument-spreadsheet:after{background-position:0 -1700px}.elfinder-cwd-icon-vnd-ms-powerpoint,.elfinder-cwd-icon-vnd-ms-powerpoint-addin-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-addin-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-powerpoint-presentation-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-presentation-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-powerpoint-slide-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-slide-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-powerpoint-slideshow-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-slideshow-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-powerpoint-template-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-powerpoint-template-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-powerpoint:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-presentation,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-presentation:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-slide,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-slide:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-slideshow,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-slideshow:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-template,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-presentationml-template:after{background-position:0 -1400px}.elfinder-cwd-icon-vnd-oasis-opendocument-presentation,.elfinder-cwd-icon-vnd-oasis-opendocument-presentation-template,.elfinder-cwd-icon-vnd-oasis-opendocument-presentation-template:after,.elfinder-cwd-icon-vnd-oasis-opendocument-presentation:after{background-position:0 -1650px}.elfinder-cwd-icon-msword,.elfinder-cwd-icon-msword:after,.elfinder-cwd-icon-vnd-ms-word,.elfinder-cwd-icon-vnd-ms-word-document-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-word-document-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-word-template-macroEnabled-12,.elfinder-cwd-icon-vnd-ms-word-template-macroEnabled-12:after,.elfinder-cwd-icon-vnd-ms-word:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-wordprocessingml-document,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-wordprocessingml-document:after,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-wordprocessingml-template,.elfinder-cwd-icon-vnd-openxmlformats-officedocument-wordprocessingml-template:after{background-position:0 -1500px}.elfinder-cwd-icon-vnd-oasis-opendocument-text,.elfinder-cwd-icon-vnd-oasis-opendocument-text-master,.elfinder-cwd-icon-vnd-oasis-opendocument-text-master:after,.elfinder-cwd-icon-vnd-oasis-opendocument-text-template,.elfinder-cwd-icon-vnd-oasis-opendocument-text-template:after,.elfinder-cwd-icon-vnd-oasis-opendocument-text-web,.elfinder-cwd-icon-vnd-oasis-opendocument-text-web:after,.elfinder-cwd-icon-vnd-oasis-opendocument-text:after{background-position:0 -1750px}.elfinder-cwd-icon-vnd-ms-office,.elfinder-cwd-icon-vnd-ms-office:after{background-position:0 -500px}.elfinder-cwd-icon-vnd-oasis-opendocument-chart,.elfinder-cwd-icon-vnd-oasis-opendocument-chart:after,.elfinder-cwd-icon-vnd-oasis-opendocument-database,.elfinder-cwd-icon-vnd-oasis-opendocument-database:after,.elfinder-cwd-icon-vnd-oasis-opendocument-formula,.elfinder-cwd-icon-vnd-oasis-opendocument-formula:after,.elfinder-cwd-icon-vnd-oasis-opendocument-graphics,.elfinder-cwd-icon-vnd-oasis-opendocument-graphics-template,.elfinder-cwd-icon-vnd-oasis-opendocument-graphics-template:after,.elfinder-cwd-icon-vnd-oasis-opendocument-graphics:after,.elfinder-cwd-icon-vnd-oasis-opendocument-image,.elfinder-cwd-icon-vnd-oasis-opendocument-image:after,.elfinder-cwd-icon-vnd-openofficeorg-extension,.elfinder-cwd-icon-vnd-openofficeorg-extension:after{background-position:0 -1600px}.elfinder-cwd-icon-html,.elfinder-cwd-icon-html:after{background-position:0 -550px}.elfinder-cwd-icon-css,.elfinder-cwd-icon-css:after{background-position:0 -600px}.elfinder-cwd-icon-javascript,.elfinder-cwd-icon-javascript:after,.elfinder-cwd-icon-x-javascript,.elfinder-cwd-icon-x-javascript:after{background-position:0 -650px}.elfinder-cwd-icon-x-perl,.elfinder-cwd-icon-x-perl:after{background-position:0 -700px}.elfinder-cwd-icon-x-python,.elfinder-cwd-icon-x-python:after{background-position:0 -750px}.elfinder-cwd-icon-x-ruby,.elfinder-cwd-icon-x-ruby:after{background-position:0 -800px}.elfinder-cwd-icon-x-sh,.elfinder-cwd-icon-x-sh:after,.elfinder-cwd-icon-x-shellscript,.elfinder-cwd-icon-x-shellscript:after{background-position:0 -850px}.elfinder-cwd-icon-x-c,.elfinder-cwd-icon-x-c--,.elfinder-cwd-icon-x-c--:after,.elfinder-cwd-icon-x-c--hdr,.elfinder-cwd-icon-x-c--hdr:after,.elfinder-cwd-icon-x-c--src,.elfinder-cwd-icon-x-c--src:after,.elfinder-cwd-icon-x-c:after,.elfinder-cwd-icon-x-chdr,.elfinder-cwd-icon-x-chdr:after,.elfinder-cwd-icon-x-csrc,.elfinder-cwd-icon-x-csrc:after,.elfinder-cwd-icon-x-java,.elfinder-cwd-icon-x-java-source,.elfinder-cwd-icon-x-java-source:after,.elfinder-cwd-icon-x-java:after{background-position:0 -900px}.elfinder-cwd-icon-x-php,.elfinder-cwd-icon-x-php:after{background-position:0 -950px}.elfinder-cwd-icon-xml,.elfinder-cwd-icon-xml:after{background-position:0 -1000px}.elfinder-cwd-icon-x-7z-compressed,.elfinder-cwd-icon-x-7z-compressed:after,.elfinder-cwd-icon-x-xz,.elfinder-cwd-icon-x-xz:after,.elfinder-cwd-icon-x-zip,.elfinder-cwd-icon-x-zip:after,.elfinder-cwd-icon-zip,.elfinder-cwd-icon-zip:after{background-position:0 -1050px}.elfinder-cwd-icon-x-gzip,.elfinder-cwd-icon-x-gzip:after,.elfinder-cwd-icon-x-tar,.elfinder-cwd-icon-x-tar:after{background-position:0 -1100px}.elfinder-cwd-icon-x-bzip,.elfinder-cwd-icon-x-bzip2,.elfinder-cwd-icon-x-bzip2:after,.elfinder-cwd-icon-x-bzip:after{background-position:0 -1150px}.elfinder-cwd-icon-x-rar,.elfinder-cwd-icon-x-rar-compressed,.elfinder-cwd-icon-x-rar-compressed:after,.elfinder-cwd-icon-x-rar:after{background-position:0 -1200px}.elfinder-cwd-icon-x-shockwave-flash,.elfinder-cwd-icon-x-shockwave-flash:after{background-position:0 -1250px}.elfinder-cwd-icon-group{background-position:0 -1300px}.elfinder-cwd-filename input{width:100%;border:none;margin:0;padding:0}.elfinder-cwd-view-icons,.elfinder-cwd-view-icons input{text-align:center}.elfinder-cwd-view-icons textarea{width:100%;border:0 solid;margin:0;padding:0;text-align:center;overflow:hidden;resize:none}.elfinder-cwd-wrapper.elfinder-cwd-fixheader .elfinder-cwd::after,.std42-dialog.elfinder-dialog-minimized .ui-dialog-titlebar select{display:none}.elfinder-cwd table{width:100%;border-collapse:separate;border:0 solid;margin:0 0 10px;border-spacing:0;box-sizing:padding-box;padding:2px;position:relative}.elfinder-cwd-wrapper-list.elfinder-cwd-fixheader{position:absolute;overflow:hidden}.elfinder-cwd-wrapper-list.elfinder-cwd-fixheader:before{content:'';position:absolute;width:100%;top:0;height:3px;background-color:#fff}.elfinder-droppable-active+.elfinder-cwd-wrapper-list.elfinder-cwd-fixheader:before{background-color:#8cafed}.elfinder .elfinder-workzone div.elfinder-cwd-fixheader table{table-layout:fixed}.elfinder-ltr .elfinder-cwd thead .elfinder-cwd-selectall{text-align:left;right:auto;left:0;padding-top:3px}.elfinder-rtl .elfinder-cwd thead .elfinder-cwd-selectall{text-align:right;right:0;left:auto;padding-top:3px}.elfinder-touch .elfinder-cwd thead .elfinder-cwd-selectall{padding-top:4px}.elfinder .elfinder-cwd table thead tr{border-left:0 solid;border-top:0 solid;border-right:0 solid}.elfinder .elfinder-cwd table thead td{padding:4px 14px}.elfinder-ltr .elfinder-cwd.elfinder-has-checkbox table thead td:first-child{padding:4px 14px 4px 22px}.elfinder-rtl .elfinder-cwd.elfinder-has-checkbox table thead td:first-child{padding:4px 22px 4px 14px}.elfinder-touch .elfinder-cwd table thead td,.elfinder-touch .elfinder-cwd.elfinder-has-checkbox table thead td:first-child{padding-top:8px;padding-bottom:8px}.elfinder .elfinder-cwd table thead td.ui-state-active{background:#ebf1f6;background:-moz-linear-gradient(top,#ebf1f6 0%,#abd3ee 50%,#89c3eb 51%,#d5ebfb 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebf1f6),color-stop(50%,#abd3ee),color-stop(51%,#89c3eb),color-stop(100%,#d5ebfb));background:-webkit-linear-gradient(top,#ebf1f6 0%,#abd3ee 50%,#89c3eb 51%,#d5ebfb 100%);background:-o-linear-gradient(top,#ebf1f6 0%,#abd3ee 50%,#89c3eb 51%,#d5ebfb 100%);background:-ms-linear-gradient(top,#ebf1f6 0%,#abd3ee 50%,#89c3eb 51%,#d5ebfb 100%);background:linear-gradient(to bottom,#ebf1f6 0%,#abd3ee 50%,#89c3eb 51%,#d5ebfb 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebf1f6', endColorstr='#d5ebfb', GradientType=0)}.elfinder .elfinder-cwd table td{padding:0 12px;white-space:pre;overflow:hidden;text-align:right;cursor:default;border:0 solid}.elfinder .elfinder-cwd table tbody td:first-child{position:relative}tr.elfinder-cwd-file td .elfinder-cwd-select{padding-top:3px}.elfinder-mobile tr.elfinder-cwd-file td .elfinder-cwd-select{width:40px}.elfinder-touch tr.elfinder-cwd-file td .elfinder-cwd-select{padding-top:10px}.elfinder-touch .elfinder-cwd tr td{padding:10px 12px}.elfinder-touch .elfinder-cwd tr.elfinder-cwd-file td{padding:13px 12px}.elfinder-ltr .elfinder-cwd table td{text-align:right}.elfinder-ltr .elfinder-cwd table td:first-child{text-align:left}.elfinder-rtl .elfinder-cwd table td{text-align:left}.elfinder-ltr .elfinder-info-tb tr td:first-child,.elfinder-rtl .elfinder-cwd table td:first-child{text-align:right}.elfinder-odd-row{background:#eee}.elfinder-cwd-view-list .elfinder-cwd-file-wrapper{width:97%;position:relative}.elfinder-ltr .elfinder-cwd-view-list.elfinder-has-checkbox .elfinder-cwd-file-wrapper{margin-left:8px}.elfinder-rtl .elfinder-cwd-view-list.elfinder-has-checkbox .elfinder-cwd-file-wrapper{margin-right:8px}.elfinder-cwd-view-list .elfinder-cwd-filename{padding-top:4px;padding-bottom:4px;display:inline-block}.elfinder-ltr .elfinder-cwd-view-list .elfinder-cwd-filename{padding-left:23px}.elfinder-rtl .elfinder-cwd-view-list .elfinder-cwd-filename{padding-right:23px}.elfinder-cwd-view-list .elfinder-lock,.elfinder-cwd-view-list .elfinder-perms,.elfinder-cwd-view-list .elfinder-symlink{margin-top:-6px;opacity:.6;filter:Alpha(Opacity=60)}.elfinder-cwd-view-list .elfinder-perms{bottom:-4px}.elfinder-cwd-view-list .elfinder-lock{top:0}.elfinder-cwd-view-list .elfinder-symlink{bottom:-4px}.elfinder-ltr .elfinder-cwd-view-list .elfinder-perms{left:8px}.elfinder-rtl .elfinder-cwd-view-list .elfinder-perms{right:-8px}.elfinder-ltr .elfinder-cwd-view-list .elfinder-lock{left:10px}.elfinder-rtl .elfinder-cwd-view-list .elfinder-lock{right:-10px}.elfinder-ltr .elfinder-cwd-view-list .elfinder-symlink{left:-7px}.elfinder-rtl .elfinder-cwd-view-list .elfinder-symlink{right:7px}.elfinder-cwd-view-list td .elfinder-cwd-icon{width:16px;height:16px;position:absolute;top:50%;margin-top:-8px;background-image:url(../img/icons-small.png)}.elfinder-ltr .elfinder-cwd-view-list .elfinder-cwd-icon{left:0}.elfinder-rtl .elfinder-cwd-view-list .elfinder-cwd-icon{right:0}.elfinder-cwd-view-list .elfinder-cwd-icon:after,.elfinder-cwd-view-list .elfinder-cwd-icon:before{content:none}.elfinder-cwd-view-list thead td .ui-resizable-handle{height:100%;top:6px}.elfinder-touch .elfinder-cwd-view-list thead td .ui-resizable-handle{top:-4px;margin:10px}.elfinder-cwd-view-list thead td .ui-resizable-e{right:-7px}.elfinder-cwd-view-list thead td .ui-resizable-w{left:-7px}.elfinder-touch .elfinder-cwd-view-list thead td .ui-resizable-e{right:-16px}.elfinder-touch .elfinder-cwd-view-list thead td .ui-resizable-w{left:-16px}.elfinder-cwd-wrapper-empty .elfinder-cwd-view-list.elfinder-cwd:after{margin-top:0}.elfinder-cwd-message-board{position:-webkit-sticky;position:sticky;width:100%;height:calc(100% - .01px);top:0;left:0;margin:0;padding:0;pointer-events:none;background-color:transparent}.elfinder-cwd-wrapper-trash .elfinder-cwd-message-board{background-image:url(../img/trashmesh.png)}.elfinder-cwd-message-board .elfinder-cwd-trash{position:absolute;bottom:0;font-size:30px;width:100%;text-align:right;display:none}.elfinder-rtl .elfinder-cwd-message-board .elfinder-cwd-trash{text-align:left}.elfinder-mobile .elfinder-cwd-message-board .elfinder-cwd-trash{font-size:20px}.elfinder-cwd-wrapper-trash .elfinder-cwd-message-board .elfinder-cwd-trash{display:block;opacity:.3}.elfinder-cwd-message-board .elfinder-cwd-expires{position:absolute;bottom:0;font-size:24px;width:100%;text-align:right;opacity:.25}.elfinder-rtl .elfinder-cwd-message-board .elfinder-cwd-expires{text-align:left}.elfinder-mobile .elfinder-cwd-message-board .elfinder-cwd-expires{font-size:20px}.std42-dialog{padding:0;position:absolute;left:auto;right:auto;box-sizing:border-box}.std42-dialog.elfinder-dialog-minimized{overFlow:hidden;position:relative;float:left;width:auto;cursor:pointer}.elfinder-rtl .std42-dialog.elfinder-dialog-minimized{float:right}.std42-dialog input{border:1px solid}.std42-dialog .ui-dialog-titlebar{border-left:0 solid transparent;border-top:0 solid transparent;border-right:0 solid transparent;font-weight:400;padding:.2em 1em}.std42-dialog.elfinder-dialog-minimized .ui-dialog-titlebar{padding:0 .5em;height:20px}.elfinder-touch .std42-dialog.elfinder-dialog-minimized .ui-dialog-titlebar{padding:.3em .5em}.std42-dialog.ui-draggable-disabled .ui-dialog-titlebar{cursor:default}.std42-dialog .ui-dialog-titlebar .ui-widget-header{border:none;cursor:pointer}.std42-dialog .ui-dialog-titlebar span.elfinder-dialog-title{display:inherit;word-break:break-all}.std42-dialog.elfinder-dialog-minimized .ui-dialog-titlebar span.elfinder-dialog-title{display:list-item;display:-moz-inline-box;white-space:nowrap;word-break:normal;overflow:hidden;word-wrap:normal;overflow-wrap:normal;max-width:-webkit-calc(100% - 24px);max-width:-moz-calc(100% - 24px);max-width:calc(100% - 24px)}.elfinder-touch .std42-dialog .ui-dialog-titlebar span.elfinder-dialog-title{padding-top:.15em}.elfinder-touch .std42-dialog.elfinder-dialog-minimized .ui-dialog-titlebar span.elfinder-dialog-title{max-width:-webkit-calc(100% - 36px);max-width:-moz-calc(100% - 36px);max-width:calc(100% - 36px)}.std42-dialog .ui-dialog-titlebar .elfinder-titlebar-button{position:relative;float:left;top:10px;left:-10px;right:10px;width:20px;height:20px;padding:1px;margin:-10px 1px 0;background-color:transparent;background-image:none}.elfinder-touch .std42-dialog .ui-dialog-titlebar .elfinder-titlebar-button{-moz-transform:scale(1.2);zoom:1.2;padding-left:6px;padding-right:6px;height:24px}.std42-dialog .ui-dialog-titlebar .elfinder-titlebar-button-right{float:right}.std42-dialog .ui-dialog-titlebar .elfinder-titlebar-button.elfinder-titlebar-button-right{left:10px;right:-10px}.std42-dialog .ui-dialog-titlebar .elfinder-titlebar-button .ui-icon{width:17px;height:17px;border-width:1px;opacity:.7;filter:Alpha(Opacity=70);-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.elfinder-mobile .std42-dialog .ui-dialog-titlebar .elfinder-titlebar-button .ui-icon{opacity:.5;filter:Alpha(Opacity=50)}.std42-dialog.elfinder-dialog-minimized .ui-dialog-titlebar .elfinder-titlebar-button .ui-icon{opacity:1;filter:Alpha(Opacity=100)}.elfinder-spinner{width:14px;height:14px;background:url(../img/spinner-mini.gif) center center no-repeat;margin:0 5px;display:inline-block;vertical-align:middle}.elfinder-ltr .elfinder-info-tb span,.elfinder-ltr .elfinder-spinner,.elfinder-ltr .elfinder-spinner-text{float:left}.elfinder-rtl .elfinder-info-tb span,.elfinder-rtl .elfinder-spinner,.elfinder-rtl .elfinder-spinner-text{float:right}.elfinder-touch .std42-dialog.ui-dialog:not(ui-resizable-disabled) .ui-resizable-se{width:12px;height:12px;-moz-transform-origin:bottom right;-moz-transform:scale(1.5);zoom:1.5;right:-7px;bottom:-7px;margin:3px 7px 7px 3px;background-position:-64px -224px}.elfinder-rtl .elfinder-dialog .ui-dialog-titlebar{text-align:right}.std42-dialog .ui-dialog-content{padding:.3em .5em}.elfinder .std42-dialog .ui-dialog-content,.elfinder .std42-dialog .ui-dialog-content *{-webkit-user-select:auto;-moz-user-select:text;-khtml-user-select:text;user-select:text}.std42-dialog .ui-dialog-buttonpane{border:0 solid;margin:0;padding:.5em;text-align:right}.elfinder-rtl .std42-dialog .ui-dialog-buttonpane{text-align:left}.std42-dialog .ui-dialog-buttonpane button{margin:.2em 0 0 .4em;padding:.2em;outline:0 solid}.std42-dialog .ui-dialog-buttonpane button span{padding:2px 9px}.std42-dialog .ui-dialog-buttonpane button span.ui-icon{padding:2px}.elfinder-dialog .ui-resizable-e,.elfinder-dialog .ui-resizable-s{width:0;height:0}.std42-dialog .ui-button input{cursor:pointer}.std42-dialog select{border:1px solid #ccc}.elfinder-dialog-icon{position:absolute;width:32px;height:32px;left:10px;top:50%;margin-top:-15px;background:url(../img/dialogs.png) 0 0 no-repeat}.elfinder-rtl .elfinder-dialog-icon{left:auto;right:10px}.elfinder-dialog-confirm .ui-dialog-content,.elfinder-dialog-error .ui-dialog-content{padding-left:56px;min-height:35px}.elfinder-rtl .elfinder-dialog-confirm .ui-dialog-content,.elfinder-rtl .elfinder-dialog-error .ui-dialog-content{padding-left:0;padding-right:56px}.elfinder-dialog-error .elfinder-err-var{word-break:break-all}.elfinder-dialog-notify{top:36px;width:280px}.elfinder-ltr .elfinder-dialog-notify{right:12px}.elfinder-rtl .elfinder-dialog-notify{left:12px}.elfinder-dialog-notify .ui-dialog-titlebar{height:5px;overflow:hidden}.elfinder.elfinder-touch>.elfinder-dialog-notify .ui-dialog-titlebar{height:10px}.elfinder>.elfinder-dialog-notify .ui-dialog-titlebar .elfinder-titlebar-button{top:2px;left:-18px;right:18px}.elfinder.elfinder-touch>.elfinder-dialog-notify .ui-dialog-titlebar .elfinder-titlebar-button{top:4px}.elfinder>.elfinder-dialog-notify .ui-dialog-titlebar .elfinder-titlebar-button.elfinder-titlebar-button-right{left:18px;right:-18px}.ui-dialog-titlebar .elfinder-ui-progressbar{position:absolute;top:17px}.elfinder-touch .ui-dialog-titlebar .elfinder-ui-progressbar{top:26px}.elfinder-dialog-notify.elfinder-titlebar-button-hide .ui-dialog-titlebar-close,.elfinder-rm-title+br{display:none}.elfinder-dialog-notify.elfinder-dialog-minimized.elfinder-titlebar-button-hide .ui-dialog-titlebar span.elfinder-dialog-title{max-width:initial}.elfinder-dialog-notify .ui-dialog-content{padding:0}.elfinder-notify{border-bottom:1px solid #ccc;position:relative;padding:.5em;text-align:center;overflow:hidden}.elfinder-ltr .elfinder-notify{padding-left:36px}.elfinder-rtl .elfinder-notify{padding-right:36px}.elfinder-notify:last-child{border:0 solid}.elfinder-notify-progressbar{width:180px;height:8px;border:1px solid #aaa;background:#f5f5f5;margin:5px auto;overflow:hidden}.elfinder-notify-progress{width:100%;height:8px;background:url(../img/progress.gif) center center repeat-x}.elfinder-notify-progress,.elfinder-notify-progressbar{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.elfinder-notify-cancel{position:relative;top:-18px;right:calc(-50% + 15px)}.elfinder-notify-cancel .ui-icon-close{width:18px;height:18px;border-radius:9px;border:none;background-position:-80px -128px;cursor:pointer}.elfinder-dialog-icon-file,.elfinder-dialog-icon-open,.elfinder-dialog-icon-readdir,.elfinder-dialog-icon-reload{background-position:0 -225px}.elfinder-dialog-icon-mkdir{background-position:0 -64px}.elfinder-dialog-icon-mkfile{background-position:0 -96px}.elfinder-dialog-icon-copy,.elfinder-dialog-icon-move,.elfinder-dialog-icon-prepare{background-position:0 -128px}.elfinder-dialog-icon-chunkmerge,.elfinder-dialog-icon-upload{background-position:0 -160px}.elfinder-dialog-icon-rm{background-position:0 -192px}.elfinder-dialog-icon-download{background-position:0 -260px}.elfinder-dialog-icon-save{background-position:0 -295px}.elfinder-dialog-icon-chkcontent,.elfinder-dialog-icon-rename{background-position:0 -330px}.elfinder-dialog-icon-archive,.elfinder-dialog-icon-extract,.elfinder-dialog-icon-zipdl{background-position:0 -365px}.elfinder-dialog-icon-search{background-position:0 -402px}.elfinder-dialog-icon-chmod,.elfinder-dialog-icon-dim,.elfinder-dialog-icon-loadimg,.elfinder-dialog-icon-netmount,.elfinder-dialog-icon-netunmount,.elfinder-dialog-icon-preupload,.elfinder-dialog-icon-resize,.elfinder-dialog-icon-url{background-position:0 -434px}.elfinder-dialog-confirm-applyall,.elfinder-dialog-confirm-encoding{padding:0 1em;margin:0}.elfinder-ltr .elfinder-dialog-confirm-applyall,.elfinder-ltr .elfinder-dialog-confirm-encoding{text-align:left}.elfinder-rtl .elfinder-dialog-confirm-applyall,.elfinder-rtl .elfinder-dialog-confirm-encoding{text-align:right}.elfinder-dialog-confirm .elfinder-dialog-icon{background-position:0 -32px}.elfinder-dialog-confirm .ui-dialog-buttonset{width:auto}.elfinder-info-title .elfinder-cwd-icon{float:left;width:48px;height:48px;margin-right:1em}.elfinder-rtl .elfinder-info-title .elfinder-cwd-icon,.elfinder-rtl .elfinder-rm-title .elfinder-cwd-icon{float:right;margin-right:0;margin-left:1em}.elfinder-info-title strong{display:block;padding:.3em 0 .5em}.elfinder-info-tb{min-width:200px;border:0 solid;margin:1em .2em;width:100%}.elfinder-info-tb td{white-space:pre-wrap;padding:2px}.elfinder-info-tb td.elfinder-info-label{white-space:nowrap}.elfinder-info-tb td.elfinder-info-hash{display:inline-block;word-break:break-all;max-width:32ch}.elfinder-rtl .elfinder-info-tb tr td:first-child{text-align:left}.elfinder-info-tb a{outline:none;text-decoration:underline}.elfinder-info-tb a:hover{text-decoration:none}.elfinder-netmount-tb{margin:0 auto}.elfinder-netmount-tb .elfinder-button-icon,.elfinder-netmount-tb select{cursor:pointer}button.elfinder-info-button{margin:-3.5px 0;cursor:pointer}.elfinder-upload-dropbox{display:table-cell;text-align:center;vertical-align:middle;padding:.5em;border:3px dashed #aaa;width:9999px;height:80px;overflow:hidden;word-break:keep-all}.elfinder-upload-dropbox.ui-state-hover{background:#dfdfdf;border:3px dashed #555}.elfinder-upload-dialog-or{margin:.3em 0;text-align:center}.elfinder-upload-dialog-wrapper{text-align:center}.elfinder-upload-dialog-wrapper .ui-button{position:relative;overflow:hidden}.elfinder-upload-dialog-wrapper .ui-button form{position:absolute;right:0;top:0;width:100%;opacity:0;filter:Alpha(Opacity=0)}.elfinder-upload-dialog-wrapper .ui-button form input{padding:50px 0 0;font-size:3em;width:100%}.dialogelfinder .dialogelfinder-drag{border-left:0 solid;border-top:0 solid;border-right:0 solid;font-weight:400;padding:2px 12px;cursor:move;position:relative;text-align:left}.elfinder-rtl .dialogelfinder-drag{text-align:right}.dialogelfinder-drag-close{position:absolute;top:50%;margin-top:-8px}.elfinder-ltr .dialogelfinder-drag-close{right:12px}.elfinder-rtl .dialogelfinder-drag-close{left:12px}.elfinder-rm-title{margin-bottom:.5ex}.elfinder-rm-title .elfinder-cwd-icon{float:left;width:48px;height:48px;margin-right:1em}.elfinder-rm-title strong{display:block;white-space:pre-wrap;word-break:normal;overflow:hidden;text-overflow:ellipsis}.elfinder-font-mono{font-family:"Ricty Diminished","Myrica M",Consolas,"Courier New",Courier,Monaco,monospace;font-size:1.1em}.elfinder-contextmenu .elfinder-contextmenu-item span{font-size:.72em}.elfinder-cwd-view-icons .elfinder-cwd-filename,.elfinder-cwd-view-list td,.elfinder-statusbar div{font-size:.7em}.std42-dialog .ui-dialog-titlebar{font-size:.82em}.std42-dialog .ui-dialog-content{font-size:.72em}.std42-dialog .ui-dialog-buttonpane{font-size:.76em}.dialogelfinder .dialogelfinder-drag,.elfinder-info-tb{font-size:.9em}.elfinder-upload-dialog-or,.elfinder-upload-dropbox{font-size:1.2em}.elfinder .elfinder-navbar{font-size:.72em}.elfinder-place-drag .elfinder-navbar-dir{font-size:.9em}.elfinder-quicklook-title{font-size:.7em;font-weight:400}.elfinder-quicklook-info-data{font-size:.72em}.elfinder-quicklook-preview-text-wrapper{font-size:.9em}.elfinder-button-menu-item{font-size:.72em}.elfinder-button-search input{font-size:.8em}.elfinder-drag-num{font-size:12px}.elfinder-toast{font-size:.76em}.elfinder .elfinder-navbar{width:230px;padding:3px 5px;background-image:none;border-top:0 solid;border-bottom:0 solid;overflow:auto;position:relative}.elfinder .elfinder-navdock{box-sizing:border-box;width:230px;height:auto;position:absolute;bottom:0;overflow:auto}.elfinder-navdock .ui-resizable-n{top:0;height:20px}.elfinder-ltr .elfinder-navbar{float:left;border-left:0 solid}.elfinder-rtl .elfinder-navbar{float:right;border-right:0 solid}.elfinder-ltr .ui-resizable-e,.elfinder-touch .elfinder-quicklook-titlebar-icon.elfinder-titlebar-button-right .ui-icon{margin-left:10px}.elfinder-tree{display:table;width:100%;margin:0 0 .5em;-webkit-tap-highlight-color:rgba(0,0,0,0)}.elfinder-navbar-dir{position:relative;display:block;white-space:nowrap;padding:3px 12px;margin:0;outline:0 solid;border:1px solid transparent;cursor:default}.elfinder-touch .elfinder-navbar-dir{padding:12px}.elfinder-ltr .elfinder-navbar-dir{padding-left:35px}.elfinder-rtl .elfinder-navbar-dir{padding-right:35px}.elfinder-navbar-arrow,.elfinder-navbar-icon{position:absolute;top:50%;margin-top:-8px;background-repeat:no-repeat}.elfinder-navbar-arrow{display:none;width:12px;height:14px;background-image:url(../img/arrows-normal.png)}.elfinder-ltr .elfinder-navbar-arrow{left:0}.elfinder-rtl .elfinder-navbar-arrow{right:0}.elfinder-touch .elfinder-navbar-arrow{-moz-transform-origin:top left;-moz-transform:scale(1.4);zoom:1.4;margin-bottom:7px}.elfinder-ltr.elfinder-touch .elfinder-navbar-arrow{left:-3px;margin-right:20px}.elfinder-rtl.elfinder-touch .elfinder-navbar-arrow{right:-3px;margin-left:20px}.ui-state-active .elfinder-navbar-arrow{background-image:url(../img/arrows-active.png)}.elfinder-navbar-collapsed .elfinder-navbar-arrow{display:block}.elfinder-subtree-chksubdir .elfinder-navbar-arrow{opacity:.25;filter:Alpha(Opacity=25)}.elfinder-ltr .elfinder-navbar-collapsed .elfinder-navbar-arrow{background-position:0 4px}.elfinder-rtl .elfinder-navbar-collapsed .elfinder-navbar-arrow{background-position:0 -10px}.elfinder-ltr .elfinder-navbar-expanded .elfinder-navbar-arrow,.elfinder-rtl .elfinder-navbar-expanded .elfinder-navbar-arrow{background-position:0 -21px}.elfinder-navbar-icon{width:16px;height:16px;background-image:url(../img/toolbar.png);background-position:0 -16px}.elfinder-ltr .elfinder-navbar-icon{left:14px}.elfinder-rtl .elfinder-navbar-icon{right:14px}.elfinder-places .elfinder-navbar-root .elfinder-navbar-icon{background-position:0 -704px}.elfinder-tree .elfinder-navbar-root-box .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-dropbox .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-ftp .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-googledrive .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-local .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-network .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-onedrive .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-sql .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-trash .elfinder-navbar-icon,.elfinder-tree .elfinder-navbar-root-zip .elfinder-navbar-icon{background-position:0 0;background-size:contain}.elfinder-tree .elfinder-navbar-root-local .elfinder-navbar-icon{background-image:url(../img/volume_icon_local.svg);background-image:url(../img/volume_icon_local.png) \9}.elfinder-tree .elfinder-navbar-root-trash .elfinder-navbar-icon{background-image:url(../img/volume_icon_trash.svg);background-image:url(../img/volume_icon_trash.png) \9}.elfinder-tree .elfinder-navbar-root-ftp .elfinder-navbar-icon{background-image:url(../img/volume_icon_ftp.svg);background-image:url(../img/volume_icon_ftp.png) \9}.elfinder-tree .elfinder-navbar-root-sql .elfinder-navbar-icon{background-image:url(../img/volume_icon_sql.svg);background-image:url(../img/volume_icon_sql.png) \9}.elfinder-tree .elfinder-navbar-root-dropbox .elfinder-navbar-icon{background-image:url(../img/volume_icon_dropbox.svg);background-image:url(../img/volume_icon_dropbox.png) \9}.elfinder-tree .elfinder-navbar-root-googledrive .elfinder-navbar-icon{background-image:url(../img/volume_icon_googledrive.svg);background-image:url(../img/volume_icon_googledrive.png) \9}.elfinder-tree .elfinder-navbar-root-onedrive .elfinder-navbar-icon{background-image:url(../img/volume_icon_onedrive.svg);background-image:url(../img/volume_icon_onedrive.png) \9}.elfinder-tree .elfinder-navbar-root-box .elfinder-navbar-icon{background-image:url(../img/volume_icon_box.svg);background-image:url(../img/volume_icon_box.png) \9}.elfinder-tree .elfinder-navbar-root-zip .elfinder-navbar-icon{background-image:url(../img/volume_icon_zip.svg);background-image:url(../img/volume_icon_zip.png) \9}.elfinder-tree .elfinder-navbar-root-network .elfinder-navbar-icon{background-image:url(../img/volume_icon_network.svg);background-image:url(../img/volume_icon_network.png) \9}.elfinder-droppable-active .elfinder-navbar-icon,.ui-state-active .elfinder-navbar-icon,.ui-state-hover .elfinder-navbar-icon{background-position:0 -32px}.elfinder-ltr .elfinder-navbar-subtree{margin-left:12px}.elfinder-rtl .elfinder-navbar-subtree{margin-right:12px}.elfinder-tree .elfinder-spinner{position:absolute;top:50%;margin:-7px 0 0}.elfinder-ltr .elfinder-tree .elfinder-spinner{left:0;margin-left:-2px}.elfinder-rtl .elfinder-tree .elfinder-spinner{right:0;margin-right:-2px}.elfinder-navbar .elfinder-lock,.elfinder-navbar .elfinder-perms,.elfinder-navbar .elfinder-symlink{opacity:.6;filter:Alpha(Opacity=60)}.elfinder-navbar .elfinder-perms{bottom:-1px;margin-top:-8px}.elfinder-navbar .elfinder-lock{top:-2px}.elfinder-ltr .elfinder-navbar .elfinder-perms{left:20px;transform:scale(.8)}.elfinder-rtl .elfinder-navbar .elfinder-perms{right:20px;transform:scale(.8)}.elfinder-ltr .elfinder-navbar .elfinder-lock{left:20px;transform:scale(.8)}.elfinder-rtl .elfinder-navbar .elfinder-lock{right:20px;transform:scale(.8)}.elfinder-ltr .elfinder-navbar .elfinder-symlink{left:8px;transform:scale(.8)}.elfinder-rtl .elfinder-navbar .elfinder-symlink{right:8px;transform:scale(.8)}.elfinder-navbar input{width:100%;border:0 solid;margin:0;padding:0}.elfinder-navbar .ui-resizable-handle{width:12px;background:url(../img/resize.png) center center no-repeat}.elfinder-nav-handle-icon{position:absolute;top:50%;margin:-8px 2px 0;opacity:.5;filter:Alpha(Opacity=50)}.elfinder-navbar-pager{width:100%;box-sizing:border-box;padding-top:3px;padding-bottom:3px}.elfinder-touch .elfinder-navbar-pager{padding-top:10px;padding-bottom:10px}.elfinder-places{border:none;margin:0;padding:0}.elfinder-navbar-swipe-handle{position:absolute;top:0;height:100%;width:50px;pointer-events:none}.elfinder-ltr .elfinder-navbar-swipe-handle{left:0;background:linear-gradient(to right,#dde4eb 0,rgba(221,228,235,.8) 5px,rgba(216,223,230,.3) 8px,rgba(0,0,0,.1) 95%,rgba(0,0,0,0) 100%)}.elfinder-rtl .elfinder-navbar-swipe-handle{right:0;background:linear-gradient(to left,#dde4eb 0,rgba(221,228,235,.8) 5px,rgba(216,223,230,.3) 8px,rgba(0,0,0,.1) 95%,rgba(0,0,0,0) 100%)}.elfinder-navbar-root .elfinder-places-root-icon{position:absolute;top:50%;margin-top:-9px;cursor:pointer}.elfinder-ltr .elfinder-places-root-icon{right:10px}.elfinder-rtl .elfinder-places-root-icon{left:10px}.elfinder-navbar-expanded .elfinder-places-root-icon{display:block}.elfinder-place-drag{font-size:.8em}.elfinder-quicklook{position:absolute;background:url(../img/quicklook-bg.png);overflow:hidden;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:20px 0 40px}.elfinder-navdock .elfinder-quicklook{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;font-size:90%;overflow:auto}.elfinder-quicklook.elfinder-touch{padding:30px 0 40px}.elfinder-quicklook .ui-resizable-se{width:14px;height:14px;right:5px;bottom:3px;background:url(../img/toolbar.png) 0 -496px no-repeat}.elfinder-quicklook.elfinder-touch .ui-resizable-se{-moz-transform-origin:bottom right;-moz-transform:scale(1.5);zoom:1.5}.elfinder-quicklook.elfinder-quicklook-fullscreen{position:fixed;top:0;right:0;bottom:0;left:0;margin:0;box-sizing:border-box;width:100%;height:100%;object-fit:contain;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;-webkit-background-clip:padding-box;padding:0;background:#000;display:block}.elfinder-quicklook-fullscreen .elfinder-quicklook-titlebar,.elfinder-quicklook-fullscreen.elfinder-quicklook .ui-resizable-handle{display:none}.elfinder-quicklook-fullscreen .elfinder-quicklook-preview{border:0 solid}.elfinder-quicklook-cover,.elfinder-quicklook-titlebar{width:100%;height:100%;top:0;left:0;position:absolute}.elfinder-quicklook-cover.elfinder-quicklook-coverbg{background-color:#fff;opacity:.000001;filter:Alpha(Opacity=.0001)}.elfinder-quicklook-titlebar{text-align:center;background:#777;height:20px;-moz-border-radius-topleft:7px;-webkit-border-top-left-radius:7px;border-top-left-radius:7px;-moz-border-radius-topright:7px;-webkit-border-top-right-radius:7px;border-top-right-radius:7px;border:none;line-height:1.2}.elfinder-navdock .elfinder-quicklook-titlebar{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;cursor:default}.elfinder-touch .elfinder-quicklook-titlebar{height:30px}.elfinder-quicklook-title{display:inline-block;white-space:nowrap;overflow:hidden}.elfinder-touch .elfinder-quicklook-title{padding:8px 0}.elfinder-quicklook-titlebar-icon{position:absolute;left:4px;top:50%;margin-top:-8px;height:16px;border:none}.elfinder-touch .elfinder-quicklook-titlebar-icon{height:22px}.elfinder-quicklook-titlebar-icon .ui-icon{position:relative;margin:-9px 3px 0 0;cursor:pointer;border-radius:10px;border:1px solid;opacity:.7;filter:Alpha(Opacity=70)}.elfinder-quicklook-titlebar-icon .ui-icon.ui-icon-closethick{padding-left:1px}.elfinder-mobile .elfinder-quicklook-titlebar-icon .ui-icon{opacity:.6;filter:Alpha(Opacity=60)}.elfinder-touch .elfinder-quicklook-titlebar-icon .ui-icon{margin-top:-5px}.elfinder-quicklook-titlebar-icon.elfinder-titlebar-button-right{left:auto;right:4px;direction:rtl}.elfinder-quicklook-titlebar-icon.elfinder-titlebar-button-right .ui-icon{margin:-9px 0 0 3px}.elfinder-touch .elfinder-quicklook-titlebar .ui-icon{-moz-transform-origin:center center;-moz-transform:scale(1.2);zoom:1.2}.elfinder-touch .elfinder-quicklook-titlebar-icon .ui-icon{margin-right:10px}.elfinder-quicklook-preview{overflow:hidden;position:relative;border:0 solid;border-left:1px solid transparent;border-right:1px solid transparent;height:100%}.elfinder-navdock .elfinder-quicklook-preview{border-left:0;border-right:0}.elfinder-quicklook-preview.elfinder-overflow-auto{overflow:auto;-webkit-overflow-scrolling:touch}.elfinder-quicklook-info-wrapper{display:table;position:absolute;width:100%;height:100%;height:calc(100% - 80px);left:0;top:20px}.elfinder-navdock .elfinder-quicklook-info-wrapper{height:calc(100% - 20px)}.elfinder-quicklook-info{display:table-cell;vertical-align:middle}.elfinder-ltr .elfinder-quicklook-info{padding:0 12px 0 112px}.elfinder-rtl .elfinder-quicklook-info{padding:0 112px 0 12px}.elfinder-ltr .elfinder-navdock .elfinder-quicklook-info{padding:0 0 0 80px}.elfinder-rtl .elfinder-navdock .elfinder-quicklook-info{padding:0 80px 0 0}.elfinder-quicklook-info .elfinder-quicklook-info-data:first-child{color:#fff;font-weight:700;padding-bottom:.5em}.elfinder-quicklook-info-data{clear:both;padding-bottom:.2em;color:#fff}.elfinder-quicklook-info-progress{width:0;height:4px;border-radius:2px}.elfinder-quicklook .elfinder-cwd-icon{position:absolute;left:32px;top:50%;margin-top:-20px}.elfinder-navdock .elfinder-quicklook .elfinder-cwd-icon{left:16px}.elfinder-rtl .elfinder-quicklook .elfinder-cwd-icon{left:auto;right:32px}.elfinder-rtl .elfinder-navdock .elfinder-quicklook .elfinder-cwd-icon{right:6px}.elfinder-quicklook .elfinder-cwd-icon:before{top:-10px}.elfinder-ltr .elfinder-quicklook .elfinder-cwd-icon:before{left:-20px}.elfinder-ltr .elfinder-navdock .elfinder-quicklook .elfinder-cwd-icon:before{left:-14px}.elfinder-ltr .elfinder-quicklook .elfinder-cwd-icon:after{left:-42px}.elfinder-ltr .elfinder-navdock .elfinder-quicklook .elfinder-cwd-icon:after{left:-12px}.elfinder-rtl .elfinder-quicklook .elfinder-cwd-icon:before{left:auto;right:40px}.elfinder-rtl .elfinder-quicklook .elfinder-cwd-icon:after{left:auto;right:42px}.elfinder-quicklook-preview>div>canvas,.elfinder-quicklook-preview>img{display:block;margin:auto}.elfinder-quicklook-navbar{position:absolute;left:50%;bottom:4px;width:140px;height:32px;padding:0;margin-left:-70px;border:1px solid transparent;border-radius:19px;-moz-border-radius:19px;-webkit-border-radius:19px}.elfinder-quicklook-fullscreen .elfinder-quicklook-navbar{width:188px;margin-left:-94px;padding:5px;border:1px solid #eee;background:#000;opacity:.4;filter:Alpha(Opacity=40)}.elfinder-quicklook-fullscreen .elfinder-quicklook-navbar-icon-close,.elfinder-quicklook-fullscreen .elfinder-quicklook-navbar-separator{display:inline}.elfinder-quicklook-navbar-icon{width:32px;height:32px;margin:0 7px;float:left;background:url(../img/quicklook-icons.png) 0 0 no-repeat}.elfinder-quicklook-navbar-icon-fullscreen{background-position:0 -64px}.elfinder-quicklook-navbar-icon-fullscreen-off{background-position:0 -96px}.elfinder-quicklook-navbar-icon-prev{background-position:0 0}.elfinder-quicklook-navbar-icon-next{background-position:0 -32px}.elfinder-quicklook-navbar-icon-close{background-position:0 -128px;display:none}.elfinder-quicklook-navbar-separator{width:1px;height:32px;float:left;border-left:1px solid #fff;display:none}.elfinder-quicklook-encoding{height:40px}.elfinder-quicklook-encoding>select{color:#fff;background:#000;border:0;font-size:12px;max-width:100px;display:inline-block;position:relative;top:6px;left:5px}.elfinder-navdock .elfinder-quicklook .elfinder-quicklook-encoding,.elfinder-statusbar:after,.elfinder-statusbar:before{display:none}.elfinder-quicklook-preview-archive-wrapper,.elfinder-quicklook-preview-text-wrapper{width:100%;height:100%;background:#fff;color:#222;overflow:auto;-webkit-overflow-scrolling:touch}.elfinder-quicklook-preview-archive-wrapper{font-size:90%}.elfinder-quicklook-preview-archive-wrapper strong{padding:0 5px}pre.elfinder-quicklook-preview-text,pre.elfinder-quicklook-preview-text.prettyprint{width:auto;height:auto;margin:0;padding:3px 9px;border:none;overflow:visible;background:#fff;-o-tab-size:4;-moz-tab-size:4;tab-size:4}.elfinder-quicklook-preview-charsleft hr{border:none;border-top:dashed 1px}.elfinder-quicklook-preview-charsleft span{font-size:90%;font-style:italic;cursor:pointer}.elfinder-quicklook-preview-html,.elfinder-quicklook-preview-iframe,.elfinder-quicklook-preview-pdf{width:100%;height:100%;background:#fff;margin:0;border:none;display:block}.elfinder-quicklook-preview-flash{width:100%;height:100%}.elfinder-quicklook-preview-audio{width:100%;position:absolute;bottom:0;left:0}embed.elfinder-quicklook-preview-audio{height:30px;background:0 0}.elfinder-quicklook-preview-video{width:100%;height:100%}.elfinder-quicklook-preview .vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:12pt;padding:0;color:#fff}.elfinder .elfinder-quicklook .elfinder-quicklook-info *,.elfinder .elfinder-quicklook .elfinder-quicklook-preview *{-webkit-user-select:auto;-moz-user-select:text;-khtml-user-select:text;user-select:text}.elfinder-statusbar{display:flex;justify-content:space-between;cursor:default;text-align:center;font-weight:400;padding:.2em .5em;border-right:0 solid transparent;border-bottom:0 solid transparent;border-left:0 solid transparent}.elfinder-path,.elfinder-statusbar span{overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis}.elfinder-statusbar span{vertical-align:bottom}.elfinder-statusbar span.elfinder-path-other{flex-shrink:0;text-overflow:clip;-o-text-overflow:clip}.elfinder-statusbar span.ui-state-active,.elfinder-statusbar span.ui-state-hover{border:none}.elfinder-statusbar span.elfinder-path-cwd{cursor:default}.elfinder-path{display:flex;order:1;flex-grow:1;cursor:pointer;white-space:nowrap;max-width:30%\9}.elfinder-ltr .elfinder-path{text-align:left;float:left\9}.elfinder-rtl .elfinder-path{text-align:right;float:right\9}.elfinder-workzone-path{position:relative}.elfinder-workzone-path .elfinder-path{position:relative;font-size:.75em;font-weight:400;float:none;max-width:none;overflow:hidden;overflow-x:hidden;text-overflow:initial;-o-text-overflow:initial}.elfinder-mobile .elfinder-workzone-path .elfinder-path{overflow:auto;overflow-x:scroll}.elfinder-ltr .elfinder-workzone-path .elfinder-path{margin-left:24px}.elfinder-rtl .elfinder-workzone-path .elfinder-path{margin-right:24px}.elfinder-workzone-path .elfinder-path span{display:inline-block;padding:5px 3px}.elfinder-workzone-path .elfinder-path span.elfinder-path-cwd{font-weight:700}.elfinder-workzone-path .elfinder-path span.ui-state-active,.elfinder-workzone-path .elfinder-path span.ui-state-hover{border:none}.elfinder-workzone-path .elfinder-path-roots{position:absolute;top:0;width:24px;height:20px;padding:2px;border:none;overflow:hidden}.elfinder-ltr .elfinder-workzone-path .elfinder-path-roots{left:0}.elfinder-rtl .elfinder-workzone-path .elfinder-path-roots{right:0}.elfinder-stat-size{order:3;flex-grow:1;overflow:hidden;white-space:nowrap}.elfinder-ltr .elfinder-stat-size{text-align:right;float:right\9}.elfinder-rtl .elfinder-stat-size{text-align:left;float:left\9}.elfinder-stat-selected{order:2;margin:0 .5em;white-space:nowrap;overflow:hidden}.elfinder .elfinder-toast{position:absolute;top:12px;right:12px;max-width:90%;cursor:default}.elfinder .elfinder-toast>div{position:relative;pointer-events:auto;overflow:hidden;margin:0 0 6px;padding:8px 16px 8px 50px;-moz-border-radius:3px 3px 3px 3px;-webkit-border-radius:3px 3px 3px 3px;border-radius:3px 3px 3px 3px;background-position:15px center;background-repeat:no-repeat;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;color:#fff;opacity:.9;filter:alpha(opacity=90);background-color:#030303;text-align:center}.elfinder .elfinder-toast>.toast-info{background-color:#2f96b4;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=)!important}.elfinder .elfinder-toast>.toast-error{background-color:#bd362f;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=)!important}.elfinder .elfinder-toast>.toast-success{background-color:#51a351;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==)!important}.elfinder .elfinder-toast>.toast-warning{background-color:#f89406;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=)!important}.elfinder .elfinder-toast>div button.ui-button{background-image:none;margin-top:8px;padding:.5em .8em}.elfinder .elfinder-toast>.toast-success button.ui-button{background-color:green;color:#fff}.elfinder .elfinder-toast>.toast-success button.ui-button.ui-state-hover{background-color:#add6ad;color:#254b25}.elfinder .elfinder-toast>.toast-info button.ui-button{background-color:#046580;color:#fff}.elfinder .elfinder-toast>.toast-info button.ui-button.ui-state-hover{background-color:#7dc6db;color:#046580}.elfinder .elfinder-toast>.toast-warning button.ui-button{background-color:#dd8c1a;color:#fff}.elfinder .elfinder-toast>.toast-warning button.ui-button.ui-state-hover{background-color:#e7ae5e;color:#422a07}.elfinder-toolbar{padding:4px 0 3px;border-left:0 solid transparent;border-top:0 solid transparent;border-right:0 solid transparent;max-height:50%;overflow-y:auto}.elfinder-buttonset{margin:1px 4px;float:left;background:0 0;padding:0;overflow:hidden}.elfinder .elfinder-button{min-width:16px;height:16px;margin:0;padding:4px;float:left;overflow:hidden;position:relative;border:0 solid;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;line-height:1;cursor:default}.elfinder-rtl .elfinder-button{float:right}.elfinder-touch .elfinder-button{min-width:20px;height:20px}.elfinder .ui-icon-search{cursor:pointer}.elfinder-toolbar-button-separator{float:left;padding:0;height:24px;border-top:0 solid;border-right:0 solid;border-bottom:0 solid;width:0}.elfinder-rtl .elfinder-toolbar-button-separator{float:right}.elfinder-touch .elfinder-toolbar-button-separator{height:28px}.elfinder .elfinder-button.ui-state-disabled{opacity:1;filter:Alpha(Opacity=100)}.elfinder .elfinder-button.ui-state-disabled .elfinder-button-icon,.elfinder .elfinder-button.ui-state-disabled .elfinder-button-text{opacity:.4;filter:Alpha(Opacity=40)}.elfinder-rtl .elfinder-buttonset{float:right}.elfinder-button-icon{width:16px;height:16px;display:inline-block;background:url(../img/toolbar.png) no-repeat}.elfinder-button-text{position:relative;display:inline-block;top:-4px;margin:0 2px;font-size:12px}.elfinder-touch .elfinder-button-icon{transform:scale(1.25);transform-origin:top left}.elfinder-rtl.elfinder-touch .elfinder-button-icon{transform-origin:top right}.elfinder-touch .elfinder-button-text{transform:translate(3px,3px);top:-5px}.elfinder-rtl.elfinder-touch .elfinder-button-text{transform:translate(-3px,3px)}.elfinder-touch .elfinder-button-icon.elfinder-contextmenu-extra-icon{transform:scale(2);transform-origin:12px 8px}.elfinder-rtl.elfinder-touch .elfinder-button-icon.elfinder-contextmenu-extra-icon{transform-origin:4px 8px}.elfinder-button-icon-home{background-position:0 0}.elfinder-button-icon-back{background-position:0 -112px}.elfinder-button-icon-forward{background-position:0 -128px}.elfinder-button-icon-up{background-position:0 -144px}.elfinder-button-icon-dir{background-position:0 -16px}.elfinder-button-icon-opendir{background-position:0 -32px}.elfinder-button-icon-reload{background-position:0 -160px}.elfinder-button-icon-open{background-position:0 -176px}.elfinder-button-icon-mkdir{background-position:0 -192px}.elfinder-button-icon-mkfile{background-position:0 -208px}.elfinder-button-icon-rm{background-position:0 -832px}.elfinder-button-icon-trash{background-position:0 -224px}.elfinder-button-icon-restore{background-position:0 -816px}.elfinder-button-icon-copy{background-position:0 -240px}.elfinder-button-icon-cut{background-position:0 -256px}.elfinder-button-icon-paste{background-position:0 -272px}.elfinder-button-icon-getfile{background-position:0 -288px}.elfinder-button-icon-duplicate{background-position:0 -304px}.elfinder-button-icon-rename{background-position:0 -320px}.elfinder-button-icon-edit{background-position:0 -336px}.elfinder-button-icon-quicklook{background-position:0 -352px}.elfinder-button-icon-upload{background-position:0 -368px}.elfinder-button-icon-download{background-position:0 -384px}.elfinder-button-icon-info{background-position:0 -400px}.elfinder-button-icon-extract{background-position:0 -416px}.elfinder-button-icon-archive{background-position:0 -432px}.elfinder-button-icon-view{background-position:0 -448px}.elfinder-button-icon-view-list{background-position:0 -464px}.elfinder-button-icon-help{background-position:0 -480px}.elfinder-button-icon-resize{background-position:0 -512px}.elfinder-button-icon-link{background-position:0 -528px}.elfinder-button-icon-search{background-position:0 -561px}.elfinder-button-icon-sort{background-position:0 -577px}.elfinder-button-icon-rotate-r{background-position:0 -625px}.elfinder-button-icon-rotate-l{background-position:0 -641px}.elfinder-button-icon-netmount{background-position:0 -688px}.elfinder-button-icon-netunmount{background-position:0 -96px}.elfinder-button-icon-places{background-position:0 -704px}.elfinder-button-icon-chmod{background-position:0 -48px}.elfinder-button-icon-accept{background-position:0 -736px}.elfinder-button-icon-menu{background-position:0 -752px}.elfinder-button-icon-colwidth{background-position:0 -768px}.elfinder-button-icon-fullscreen{background-position:0 -784px}.elfinder-button-icon-unfullscreen{background-position:0 -800px}.elfinder-button-icon-empty{background-position:0 -848px}.elfinder-button-icon-undo{background-position:0 -864px}.elfinder-button-icon-redo{background-position:0 -880px}.elfinder-button-icon-preference{background-position:0 -896px}.elfinder-button-icon-mkdirin{background-position:0 -912px}.elfinder-button-icon-selectall{background-position:0 -928px}.elfinder-button-icon-selectnone{background-position:0 -944px}.elfinder-button-icon-selectinvert{background-position:0 -960px}.elfinder-button-icon-opennew{background-position:0 -976px}.elfinder-button-icon-hide{background-position:0 -992px}.elfinder-button-icon-text{background-position:0 -1008px}.elfinder-rtl .elfinder-button-icon-back,.elfinder-rtl .elfinder-button-icon-forward,.elfinder-rtl .elfinder-button-icon-getfile,.elfinder-rtl .elfinder-button-icon-help,.elfinder-rtl .elfinder-button-icon-redo,.elfinder-rtl .elfinder-button-icon-rename,.elfinder-rtl .elfinder-button-icon-search,.elfinder-rtl .elfinder-button-icon-undo,.elfinder-rtl .elfinder-button-icon-view-list,.elfinder-rtl .ui-icon-search{-ms-transform:scale(-1,1);-webkit-transform:scale(-1,1);transform:scale(-1,1)}.elfinder-rtl.elfinder-touch .elfinder-button-icon-back,.elfinder-rtl.elfinder-touch .elfinder-button-icon-forward,.elfinder-rtl.elfinder-touch .elfinder-button-icon-getfile,.elfinder-rtl.elfinder-touch .elfinder-button-icon-help,.elfinder-rtl.elfinder-touch .elfinder-button-icon-redo,.elfinder-rtl.elfinder-touch .elfinder-button-icon-rename,.elfinder-rtl.elfinder-touch .elfinder-button-icon-search,.elfinder-rtl.elfinder-touch .elfinder-button-icon-undo,.elfinder-rtl.elfinder-touch .elfinder-button-icon-view-list,.elfinder-rtl.elfinder-touch .ui-icon-search{-ms-transform:scale(-1.25,1.25) translateX(16px);-webkit-transform:scale(-1.25,1.25) translateX(16px);transform:scale(-1.25,1.25) translateX(16px)}.elfinder .elfinder-menubutton{overflow:visible}.elfinder-button-icon-spinner{background:url(../img/spinner-mini.gif) center center no-repeat}.elfinder-button-menu{position:absolute;margin-top:24px;padding:3px 0;overflow-y:auto}.elfinder-touch .elfinder-button-menu{margin-top:30px}.elfinder-button-menu-item{white-space:nowrap;cursor:default;padding:5px 19px;position:relative}.elfinder-touch .elfinder-button-menu-item{padding:12px 19px}.elfinder-button-menu .ui-state-hover{border:0 solid}.elfinder-button-menu-item-separated{border-top:1px solid #ccc}.elfinder-button-menu-item .ui-icon{width:16px;height:16px;position:absolute;left:2px;top:50%;margin-top:-8px;display:none}.elfinder-button-menu-item-selected .ui-icon{display:block}.elfinder-button-menu-item-selected-asc .ui-icon-arrowthick-1-s,.elfinder-button-menu-item-selected-desc .ui-icon-arrowthick-1-n{display:none}.elfinder-button form{position:absolute;top:0;right:0;opacity:0;filter:Alpha(Opacity=0);cursor:pointer}.elfinder .elfinder-button form input{background:0 0;cursor:default}.elfinder .elfinder-button-search{border:0 solid;background:0 0;padding:0;margin:1px 4px;height:auto;min-height:26px;width:70px;overflow:visible}.elfinder .elfinder-button-search.ui-state-active{width:220px}.elfinder .elfinder-button-search-menu{font-size:8pt;text-align:center;width:auto;min-width:180px;position:absolute;top:30px;padding-right:5px;padding-left:5px}.elfinder-ltr .elfinder-button-search-menu{right:22px;left:auto}.elfinder-rtl .elfinder-button-search-menu{right:auto;left:22px}.elfinder-touch .elfinder-button-search-menu{top:34px}.elfinder .elfinder-button-search-menu div{margin:5px auto;display:table}.elfinder .elfinder-button-search-menu div .ui-state-hover{border:1px solid}.elfinder-ltr .elfinder-button-search{float:right;margin-right:10px}.elfinder-rtl .elfinder-button-search{float:left;margin-left:10px}.elfinder-rtl .ui-controlgroup>.ui-controlgroup-item{float:right}.elfinder-button-search input[type=text]{box-sizing:border-box;width:100%;height:26px;padding:0 20px;line-height:22px;border:1px solid #aaa;-moz-border-radius:12px;-webkit-border-radius:12px;border-radius:12px;outline:0 solid}.elfinder-button-search input::-ms-clear{display:none}.elfinder-touch .elfinder-button-search input{height:30px;line-height:28px}.elfinder-rtl .elfinder-button-search input{direction:rtl}.elfinder-button-search .ui-icon{position:absolute;height:18px;top:50%;margin:-8px 4px 0;opacity:.6;filter:Alpha(Opacity=60)}.elfinder-button-search-menu .ui-checkboxradio-icon{display:none}.elfinder-ltr .elfinder-button-search .ui-icon-search{left:0}.elfinder-ltr .elfinder-button-search .ui-icon-close,.elfinder-rtl .elfinder-button-search .ui-icon-search{right:0}.elfinder-rtl .elfinder-button-search .ui-icon-close{left:0}.elfinder-toolbar-swipe-handle{position:absolute;top:0;left:0;height:50px;width:100%;pointer-events:none;background:linear-gradient(to bottom,#dde4eb 0,rgba(221,228,235,.8) 2px,rgba(216,223,230,.3) 5px,rgba(0,0,0,.1) 95%,rgba(0,0,0,0) 100%)}
elFinder/css/theme.css CHANGED
@@ -5,6 +5,66 @@
5
  * @author Dmitry (dio) Levashov
6
  **/
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  /* input textarea */
9
  .elfinder input,
10
  .elfinder textarea {
@@ -43,6 +103,10 @@
43
  border-color: #8a8a8a;
44
  }
45
 
 
 
 
 
46
  .std42-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close:hover .ui-icon,
47
  .elfinder-mobile .std42-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close .ui-icon,
48
  .elfinder-quicklook-titlebar-icon .ui-icon.elfinder-icon-close:hover,
@@ -336,6 +400,15 @@
336
  background-color: inherit;
337
  }
338
 
 
 
 
 
 
 
 
 
 
339
  /* edit dialog */
340
  .elfinder-dialog-edit select.elfinder-edit-changed {
341
  border-bottom: 2px solid #13ae10;
@@ -350,3 +423,8 @@
350
  .elfinder .elfinder-ui-tooltip.ui-widget-shadow {
351
  box-shadow: 2px 6px 4px -4px #cecdcd;
352
  }
 
 
 
 
 
5
  * @author Dmitry (dio) Levashov
6
  **/
7
 
8
+ /* scrollbar for Chrome and Safari */
9
+ .elfinder:not(.elfinder-mobile) *::-webkit-scrollbar {
10
+ width: 10px;
11
+ height: 10px;
12
+ }
13
+
14
+ .elfinder:not(.elfinder-mobile) *::-webkit-scrollbar-track {
15
+ border-radius: 10px;
16
+ box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
17
+ }
18
+
19
+ .elfinder:not(.elfinder-mobile) *::-webkit-scrollbar-thumb {
20
+ background-color: rgba(0, 0, 50, 0.08);
21
+ border-radius: 10px;
22
+ box-shadow:0 0 0 1px rgba(255, 255, 255, .3);
23
+ }
24
+
25
+ .elfinder:not(.elfinder-mobile) *::-webkit-scrollbar-thumb:hover {
26
+ background-color: rgba(0, 0, 50, 0.16);
27
+ }
28
+
29
+ .elfinder:not(.elfinder-mobile) *::-webkit-scrollbar-thumb:active {
30
+ background-color: rgba(0, 0, 50, 0.24);
31
+ }
32
+
33
+ .elfinder:not(.elfinder-mobile) *::-webkit-scrollbar-corner {
34
+ background-color: transparent;
35
+ }
36
+
37
+ .elfinder:not(.elfinder-mobile) *::-webkit-scrollbar-button {
38
+ background-color: transparent;
39
+ width: 10px;
40
+ height: 10px;
41
+ border: 5px solid transparent;
42
+ }
43
+
44
+ .elfinder:not(.elfinder-mobile) *::-webkit-scrollbar-button:hover {
45
+ border: 5px solid rgba(0, 0, 50, 0.08);
46
+ }
47
+
48
+ .elfinder:not(.elfinder-mobile) *::-webkit-scrollbar-button:active {
49
+ border: 5px solid rgba(0, 0, 50, 0.5);
50
+ }
51
+
52
+ .elfinder:not(.elfinder-mobile) *::-webkit-scrollbar-button:single-button:vertical:decrement {
53
+ border-bottom: 8px solid rgba(0, 0, 50, 0.3);
54
+ }
55
+
56
+ .elfinder:not(.elfinder-mobile) *::-webkit-scrollbar-button:single-button:vertical:increment {
57
+ border-top: 8px solid rgba(0, 0, 50, 0.3);
58
+ }
59
+
60
+ .elfinder:not(.elfinder-mobile) *::-webkit-scrollbar-button:single-button:horizontal:decrement {
61
+ border-right: 8px solid rgba(0, 0, 50, 0.3);
62
+ }
63
+
64
+ .elfinder:not(.elfinder-mobile) *::-webkit-scrollbar-button:single-button:horizontal:increment {
65
+ border-left: 8px solid rgba(0, 0, 50, 0.3);
66
+ }
67
+
68
  /* input textarea */
69
  .elfinder input,
70
  .elfinder textarea {
103
  border-color: #8a8a8a;
104
  }
105
 
106
+ .elfinder-quicklook-info-progress {
107
+ background-color: gray;
108
+ }
109
+
110
  .std42-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close:hover .ui-icon,
111
  .elfinder-mobile .std42-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close .ui-icon,
112
  .elfinder-quicklook-titlebar-icon .ui-icon.elfinder-icon-close:hover,
400
  background-color: inherit;
401
  }
402
 
403
+ .elfinder-notify-cancel .elfinder-notify-button {
404
+ background-color: #707070;
405
+ background-image: url("../img/ui-icons_ffffff_256x240.png");
406
+ }
407
+
408
+ .elfinder-notify-cancel .elfinder-notify-button.ui-state-hover {
409
+ background-color: #aaa;
410
+ }
411
+
412
  /* edit dialog */
413
  .elfinder-dialog-edit select.elfinder-edit-changed {
414
  border-bottom: 2px solid #13ae10;
423
  .elfinder .elfinder-ui-tooltip.ui-widget-shadow {
424
  box-shadow: 2px 6px 4px -4px #cecdcd;
425
  }
426
+
427
+ /* progressbar */
428
+ .elfinder-ui-progressbar {
429
+ background-color: #419bf3;
430
+ }
elFinder/img/arrows-active.png CHANGED
File without changes
elFinder/img/arrows-normal.png CHANGED
File without changes
elFinder/img/crop.gif CHANGED
File without changes
elFinder/img/dialogs.png CHANGED
File without changes
elFinder/img/email.png CHANGED
File without changes
elFinder/img/icons-big.png CHANGED
File without changes
elFinder/img/icons-small.png CHANGED
File without changes
elFinder/img/logo.png CHANGED
File without changes
elFinder/img/progress.gif CHANGED
File without changes
elFinder/img/quicklook-bg.png CHANGED
File without changes
elFinder/img/quicklook-icons.png CHANGED
File without changes
elFinder/img/resize.png CHANGED
File without changes
elFinder/img/spinner-mini.gif CHANGED
File without changes
elFinder/img/toolbar.png CHANGED
File without changes
elFinder/img/volume_icon_box.png CHANGED
File without changes
elFinder/img/volume_icon_dropbox.png CHANGED
File without changes
elFinder/img/volume_icon_ftp.png CHANGED
File without changes
elFinder/img/volume_icon_googledrive.png CHANGED
File without changes
elFinder/img/volume_icon_local.png CHANGED
File without changes
elFinder/img/volume_icon_onedrive.png CHANGED
File without changes
elFinder/img/volume_icon_sql.png CHANGED
File without changes
elFinder/js/elfinder.full.js CHANGED
@@ -1,9 +1,9 @@
1
  /*!
2
  * elFinder - file manager for web
3
- * Version 2.1.46 (2019-02-23)
4
  * http://elfinder.org
5
  *
6
- * Copyright 2009-2019, Studio 42
7
  * Licensed under a 3-clauses BSD license
8
  */
9
  (function(root, factory) {
@@ -73,7 +73,7 @@ var elFinder = function(elm, opts, bootCallback) {
73
  * @see this.destroy
74
  * @type jQuery
75
  **/
76
- prevContent = $('<div/>').append(node.contents()).attr('class', node.attr('class') || '').attr('style', node.attr('style') || ''),
77
 
78
  /**
79
  * Instance ID. Required to get/set cookie
@@ -170,6 +170,7 @@ var elFinder = function(elm, opts, bootCallback) {
170
  uploadMaxSize : 0,
171
  jpgQuality : 100,
172
  tmbCrop : false,
 
173
  tmb : false // old API
174
  },
175
 
@@ -330,7 +331,7 @@ var elFinder = function(elm, opts, bootCallback) {
330
  // NOTES: Do not touch data object
331
 
332
  var volumeid, contextmenu, emptyDirs = {}, stayDirs = {},
333
- rmClass, hashes, calc, gc, collapsed, prevcwd, sorterStr;
334
 
335
  if (self.api >= 2.1) {
336
  // support volume driver option `uiCmdMap`
@@ -423,7 +424,14 @@ var elFinder = function(elm, opts, bootCallback) {
423
  cache(data.files);
424
  if (!files[cwd]) {
425
  cache([data.cwd]);
 
 
 
 
 
 
426
  }
 
427
 
428
  // trigger event 'sorterupdate'
429
  sorterStr = JSON.stringify(self.sorters);
@@ -445,8 +453,10 @@ var elFinder = function(elm, opts, bootCallback) {
445
  * @return void
446
  **/
447
  cache = function(data, type) {
448
- var defsorter = { name: true, perm: true, date: true, size: true, kind: true },
449
- sorterChk = !self.sorters._checked,
 
 
450
  l = data.length,
451
  setSorter = function(file) {
452
  var f = file || {},
@@ -459,11 +469,10 @@ var elFinder = function(elm, opts, bootCallback) {
459
  self.sorters = self.arrayFlip(sorters, true);
460
  self.sorters._checked = true;
461
  },
462
- keeps = ['sizeInfo'],
463
  changedParents = {},
464
  hideData = self.storage('hide') || {},
465
  hides = hideData.items || {},
466
- f, i, keepProp, parents, hidden;
467
 
468
  for (i = 0; i < l; i++) {
469
  f = Object.assign({}, data[i]);
@@ -475,7 +484,7 @@ var elFinder = function(elm, opts, bootCallback) {
475
  sorterChk = false;
476
  }
477
 
478
- if (f.phash && (type === 'add' || type === 'change')) {
479
  if (parents = self.parents(f.phash)) {
480
  $.each(parents, function() {
481
  changedParents[this] = true;
@@ -485,11 +494,11 @@ var elFinder = function(elm, opts, bootCallback) {
485
  }
486
 
487
  if (files[f.hash]) {
488
- $.each(keeps, function() {
489
- if(files[f.hash][this] && ! f[this]) {
490
- f[this] = files[f.hash][this];
491
  }
492
- });
493
  if (f.sizeInfo && !f.size) {
494
  f.size = f.sizeInfo.size;
495
  }
@@ -600,6 +609,7 @@ var elFinder = function(elm, opts, bootCallback) {
600
  *
601
  * @param Array changed file objects
602
  * @return void
 
603
  */
604
  change = function(changed) {
605
  $.each(changed, function(i, file) {
@@ -658,12 +668,12 @@ var elFinder = function(elm, opts, bootCallback) {
658
  requestQueue = [],
659
 
660
  /**
661
- * Flag to cancel the `open` command waiting for connection
662
  *
663
- * @type Boolean
664
  */
665
- requestQueueSkipOpen = false,
666
-
667
  /**
668
  * Exec shortcut
669
  *
@@ -1036,7 +1046,9 @@ var elFinder = function(elm, opts, bootCallback) {
1036
  if (l = handlers.length) {
1037
  event = $.Event(type);
1038
  if (data) {
1039
- data._event = event;
 
 
1040
  }
1041
  if (allowModify) {
1042
  event.data = data;
@@ -1116,26 +1128,20 @@ var elFinder = function(elm, opts, bootCallback) {
1116
 
1117
  // set fm.baseUrl
1118
  this.baseUrl = (function() {
1119
- var myTag, myCss, base, baseUrl;
1120
 
1121
  if (self.options.baseUrl) {
1122
  return self.options.baseUrl;
1123
  } else {
1124
  baseUrl = '';
1125
- //myTag = $('head > script[src$="js/elfinder.min.js"],script[src$="js/elfinder.full.js"]:first');
1126
  myTag = null;
1127
  $('head > script').each(function() {
1128
- if (this.src && this.src.match(/js\/elfinder(?:-[a-z0-9_-]+)?\.(?:min|full)\.js$/i)) {
1129
  myTag = $(this);
1130
  return false;
1131
  }
1132
  });
1133
  if (myTag) {
1134
- myCss = $('head > link[href$="css/elfinder.min.css"],link[href$="css/elfinder.full.css"]:first').length;
1135
- if (! myCss) {
1136
- // to request CSS auto loading
1137
- self.cssloaded = null;
1138
- }
1139
  baseUrl = myTag.attr('src').replace(/js\/[^\/]+$/, '');
1140
  if (! baseUrl.match(/^(https?\/\/|\/)/)) {
1141
  // check <base> tag
@@ -1166,23 +1172,56 @@ var elFinder = function(elm, opts, bootCallback) {
1166
  // auto load required CSS
1167
  if (this.options.cssAutoLoad) {
1168
  (function() {
1169
- var baseUrl = self.baseUrl;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1170
 
 
 
 
 
 
1171
  // additional CSS files
1172
  if (Array.isArray(self.options.cssAutoLoad)) {
1173
- if (self.cssloaded === true) {
1174
- self.loadCss(self.options.cssAutoLoad);
 
 
 
 
 
 
 
 
 
1175
  } else {
1176
- self.bind('cssloaded', function() {
1177
  self.loadCss(self.options.cssAutoLoad);
1178
- });
 
 
 
 
1179
  }
1180
  }
1181
 
1182
  // try to load main css
1183
  if (self.cssloaded === null) {
1184
  // hide elFinder node while css loading
1185
- node.data('cssautoloadHide', $('<style>.elfinder{visibility:hidden;overflow:hidden}</style>'));
 
1186
  $('head').append(node.data('cssautoloadHide'));
1187
 
1188
  // set default theme
@@ -1200,30 +1239,52 @@ var elFinder = function(elm, opts, bootCallback) {
1200
  }
1201
  }
1202
 
1203
- // load CSS
1204
- self.loadCss([baseUrl+'css/elfinder.min.css'], {
1205
- dfd: $.Deferred().always(function() {
1206
- if (node.data('cssautoloadHide')) {
1207
- node.data('cssautoloadHide').remove();
1208
- node.removeData('cssautoloadHide');
1209
- }
1210
- }).done(function() {
1211
- if (!self.cssloaded) {
1212
- self.cssloaded = true;
1213
- self.trigger('cssloaded');
1214
- }
1215
- }).fail(function() {
1216
- self.cssloaded = false;
1217
- self.error(['errRead', 'CSS (elfinder or theme)']);
1218
- })
 
 
 
 
 
 
1219
  });
1220
  }
1221
- self.options.cssAutoLoad = false;
1222
  })();
1223
  }
1224
 
1225
  // load theme if exists
1226
- this.changeTheme(this.storage('theme') || this.options.theme);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1227
 
1228
  /**
1229
  * Volume option to set the properties of the root Stat
@@ -1921,7 +1982,7 @@ var elFinder = function(elm, opts, bootCallback) {
1921
  }
1922
 
1923
  if (typeof baseUrl === 'undefined') {
1924
- baseUrl = self.option('url', (!self.isRoot(file) && file.phash) || file.hash);
1925
  }
1926
 
1927
  if (baseUrl) {
@@ -1937,32 +1998,37 @@ var elFinder = function(elm, opts, bootCallback) {
1937
  params.current = file.phash;
1938
  }
1939
  return filter(self.options.url + (self.options.url.indexOf('?') === -1 ? '?' : '&') + $.param(params, true));
1940
- },
 
 
 
1941
  baseUrl, res;
1942
 
1943
  if (!file || !file.read) {
1944
  return async? dfrd.resolve('') : '';
1945
  }
1946
 
1947
- if (onetm) {
1948
  async = true;
1949
  this.request({
1950
  data : { cmd : 'url', target : hash, options : { onetime: 1 } },
1951
  preventDefault : true,
1952
  options: {async: async},
1953
- notify: {type : 'file', cnt : 1, hideCnt : true}
 
1954
  }).done(function(data) {
1955
  dfrd.resolve(filter(data.url || ''));
1956
  }).fail(function() {
1957
  dfrd.resolve('');
1958
  });
1959
  } else {
1960
- if (file.url == '1' || (temp && !file.url && !(baseUrl = self.option('url', (!self.isRoot(file) && file.phash) || file.hash)))) {
1961
  this.request({
1962
  data : { cmd : 'url', target : hash, options : { temporary: temp? 1 : 0 } },
1963
  preventDefault : true,
1964
  options: {async: async},
1965
- notify: async? {type : temp? 'file' : 'url', cnt : 1, hideCnt : true} : {}
 
1966
  })
1967
  .done(function(data) {
1968
  file.url = data.url || '';
@@ -2018,17 +2084,19 @@ var elFinder = function(elm, opts, bootCallback) {
2018
  *
2019
  * @param String file hash
2020
  * @param Boolean for download link
 
2021
  * @return String
2022
  */
2023
- this.openUrl = function(hash, download) {
2024
  var file = files[hash],
2025
- url = '';
 
2026
 
2027
  if (!file || !file.read) {
2028
  return '';
2029
  }
2030
 
2031
- if (!download) {
2032
  if (file.url) {
2033
  if (file.url != 1) {
2034
  url = file.url;
@@ -2036,27 +2104,69 @@ var elFinder = function(elm, opts, bootCallback) {
2036
  } else if (cwdOptions.url && file.hash.indexOf(self.cwd().volumeid) === 0) {
2037
  url = cwdOptions.url + $.map(this.path2array(hash), function(n) { return encodeURIComponent(n); }).slice(1).join('/');
2038
  }
2039
- if (url) {
2040
- url += (url.match(/\?/)? '&' : '?') + '_'.repeat((url.match(/[\?&](_+)t=/g) || ['&t=']).sort().shift().match(/[\?&](_*)t=/)[1].length + 1) + 't=' + (file.ts || parseInt(+new Date()/1000));
2041
- return url;
 
 
 
 
 
 
 
2042
  }
2043
  }
2044
 
2045
- url = this.options.url;
2046
- url = url + (url.indexOf('?') === -1 ? '?' : '&')
2047
- + (this.oldAPI ? 'cmd=open&current='+file.phash : 'cmd=file')
2048
- + '&target=' + file.hash
2049
- + '&_t=' + (file.ts || parseInt(+new Date()/1000));
2050
-
2051
- if (download) {
2052
- url += '&download=1';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2053
  }
2054
-
2055
- $.each(this.customData, function(key, val) {
2056
- url += '&' + encodeURIComponent(key) + '=' + encodeURIComponent(val);
2057
- });
2058
-
2059
- return url;
2060
  };
2061
 
2062
  /**
@@ -2068,15 +2178,17 @@ var elFinder = function(elm, opts, bootCallback) {
2068
  this.tmb = function(file) {
2069
  var tmbUrl, tmbCrop,
2070
  cls = 'elfinder-cwd-bgurl',
2071
- url = '';
 
 
2072
 
2073
  if ($.isPlainObject(file)) {
2074
  if (self.searchStatus.state && file.hash.indexOf(self.cwd().volumeid) !== 0) {
2075
  tmbUrl = self.option('tmbUrl', file.hash);
2076
  tmbCrop = self.option('tmbCrop', file.hash);
2077
  } else {
2078
- tmbUrl = cwdOptions['tmbUrl'];
2079
- tmbCrop = cwdOptions['tmbCrop'];
2080
  }
2081
  if (tmbCrop) {
2082
  cls += ' elfinder-cwd-bgurl-crop';
@@ -2090,8 +2202,19 @@ var elFinder = function(elm, opts, bootCallback) {
2090
  url = file.tmb;
2091
  }
2092
  if (url) {
2093
- if (file.ts && tmbUrl !== 'self') {
2094
- url += (url.match(/\?/)? '&' : '?') + '_t=' + file.ts;
 
 
 
 
 
 
 
 
 
 
 
2095
  }
2096
  return { url: url, className: cls };
2097
  }
@@ -2205,8 +2328,14 @@ var elFinder = function(elm, opts, bootCallback) {
2205
  deffail = !(isBinary || opts.preventDefault || opts.preventFail),
2206
  // call default success callback ?
2207
  defdone = !(isBinary || opts.preventDefault || opts.preventDone),
 
 
 
 
 
 
2208
  // options for notify dialog
2209
- notify = Object.assign({}, opts.notify),
2210
  // make cancel button
2211
  cancel = !!opts.cancel,
2212
  // do not normalize data - return as is
@@ -2232,7 +2361,34 @@ var elFinder = function(elm, opts, bootCallback) {
2232
  cache : (self.api >= 2.1029), // api >= 2.1029 has unique request ID
2233
  data : data,
2234
  headers : this.customHeaders,
2235
- xhrFields: this.xhrFields
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2236
  }, opts.options || {}),
2237
  /**
2238
  * Default success handler.
@@ -2250,8 +2406,6 @@ var elFinder = function(elm, opts, bootCallback) {
2250
  self.updateCache(data);
2251
  }
2252
 
2253
- data.changed && data.changed.length && change(data.changed);
2254
-
2255
  self.lazy(function() {
2256
  // fire some event to update cache/ui
2257
  data.removed && data.removed.length && self.remove(data);
@@ -2345,19 +2499,13 @@ var elFinder = function(elm, opts, bootCallback) {
2345
  * @return void
2346
  **/
2347
  success = function(response) {
2348
- var d = self.options.debug;
2349
-
2350
  // Set currrent request command name
2351
  self.currentReqCmd = cmd;
2352
 
2353
- if (response.debug && (!d || d !== 'all')) {
2354
- if (!d) {
2355
- d = self.options.debug = {};
2356
- }
2357
- d['backend-error'] = true;
2358
- d['warning'] = true;
2359
- }
2360
 
 
 
2361
  if (raw) {
2362
  self.abortXHR(xhr);
2363
  response && response.debug && self.debug('backend-debug', response);
@@ -2465,7 +2613,7 @@ var elFinder = function(elm, opts, bootCallback) {
2465
  if ((data || hashes.length) && t.action && (msg = t.action.msg) && (cmd = t.action.cmd) && (!t.action.cwdNot || t.action.cwdNot !== self.cwd().hash)) {
2466
  done = t.action.done;
2467
  data = t.action.data;
2468
- node = $('<div/>')
2469
  .append(
2470
  $('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"><span class="ui-button-text">'
2471
  +self.i18n(msg)
@@ -2555,16 +2703,35 @@ var elFinder = function(elm, opts, bootCallback) {
2555
  }
2556
 
2557
  if (isOpen) {
2558
- if (requestQueueSkipOpen) {
2559
- return dfrd.reject();
 
 
 
 
 
 
 
 
2560
  }
2561
- requestQueueSkipOpen = true;
 
2562
  }
2563
 
2564
  dfrd.always(function() {
2565
  delete options.headers['X-elFinderReqid'];
 
 
 
2566
  }).fail(function(error, xhr, response) {
2567
- var errData = {
 
 
 
 
 
 
 
2568
  cmd: cmd,
2569
  err: error,
2570
  xhr: xhr,
@@ -2582,7 +2749,7 @@ var elFinder = function(elm, opts, bootCallback) {
2582
  }
2583
  // trigger "requestError" event
2584
  self.trigger('requestError', errData);
2585
- if (errData._event && errData._event.isDefaultPrevented()) {
2586
  deffail = false;
2587
  syncOnFail = false;
2588
  if (error) {
@@ -2596,8 +2763,9 @@ var elFinder = function(elm, opts, bootCallback) {
2596
  openDir && openDir.volumeid && self.isRoot(openDir) && delete self.volumeExpires[openDir.volumeid];
2597
  }
2598
  self.trigger(cmd + 'fail', response);
2599
- if (error) {
2600
- deffail ? self.error(error) : self.debug('error', self.i18n(error));
 
2601
  }
2602
  syncOnFail && self.sync();
2603
  });
@@ -2662,8 +2830,6 @@ var elFinder = function(elm, opts, bootCallback) {
2662
  --requestCnt;
2663
  if (requestQueue.length) {
2664
  requestQueue.shift()();
2665
- } else {
2666
- requestQueueSkipOpen = false;
2667
  }
2668
  }).fail(error).done(success);
2669
 
@@ -2710,10 +2876,14 @@ var elFinder = function(elm, opts, bootCallback) {
2710
  opts.eachCancel && (notify.id = +new Date());
2711
  }
2712
  timeout = setTimeout(function() {
 
 
2713
  self.notify(notify);
 
2714
  dfrd.always(function() {
2715
  notify.cnt = -(parseInt(notify.cnt)||0);
2716
  self.notify(notify);
 
2717
  });
2718
  }, self.notifyDelay);
2719
 
@@ -2722,9 +2892,6 @@ var elFinder = function(elm, opts, bootCallback) {
2722
  });
2723
  }
2724
  // queueing
2725
- if (isOpen) {
2726
- requestQueueSkipOpen = false;
2727
- }
2728
  if (requestCnt < requestMaxConn) {
2729
  // do request
2730
  return request();
@@ -2737,6 +2904,23 @@ var elFinder = function(elm, opts, bootCallback) {
2737
  return dfrd;
2738
  }
2739
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2740
  bindData = {opts: opts, result: true},
2741
  openDir;
2742
 
@@ -2770,13 +2954,14 @@ var elFinder = function(elm, opts, bootCallback) {
2770
  * Store info about files/dirs in "files" object.
2771
  *
2772
  * @param Array files
 
2773
  * @return void
2774
  */
2775
- this.cache = function(dataArray) {
2776
  if (! Array.isArray(dataArray)) {
2777
  dataArray = [ dataArray ];
2778
  }
2779
- cache(dataArray);
2780
  };
2781
 
2782
  /**
@@ -2791,7 +2976,7 @@ var elFinder = function(elm, opts, bootCallback) {
2791
  data.tree && data.tree.length && cache(data.tree, 'tree');
2792
  data.removed && data.removed.length && remove(data.removed);
2793
  data.added && data.added.length && cache(data.added, 'add');
2794
- data.changed && data.changed.length && change(data.changed, 'change');
2795
  }
2796
  };
2797
 
@@ -2918,7 +3103,7 @@ var elFinder = function(elm, opts, bootCallback) {
2918
  return c;
2919
  },
2920
  comp = compare(),
2921
- dfrd = $.Deferred().done(function() { self.trigger('sync'); }),
2922
  opts = [this.request({
2923
  data : {cmd : 'open', reload : 1, target : cwd, tree : (! onlydir && this.ui.tree) ? 1 : 0, compare : comp},
2924
  preventDefault : true
@@ -2946,7 +3131,8 @@ var elFinder = function(elm, opts, bootCallback) {
2946
  }
2947
  }
2948
  return parents;
2949
- };
 
2950
 
2951
  if (! onlydir && self.api >= 2) {
2952
  (cwd !== this.root()) && opts.push(this.request({
@@ -2962,6 +3148,7 @@ var elFinder = function(elm, opts, bootCallback) {
2962
  }
2963
  $.when.apply($, opts)
2964
  .fail(function(error, xhr) {
 
2965
  if (! polling || $.inArray('errOpen', error) !== -1) {
2966
  dfrd.reject(error);
2967
  self.parseError(error) && self.request({
@@ -3218,7 +3405,7 @@ var elFinder = function(elm, opts, bootCallback) {
3218
  * @return jQuery
3219
  */
3220
  this.dialog = function(content, options) {
3221
- var dialog = $('<div/>').append(content).appendTo(node).elfinderdialog(options, self),
3222
  dnode = dialog.closest('.ui-dialog'),
3223
  resize = function(){
3224
  ! dialog.data('draged') && dialog.is(':visible') && dialog.elfinderdialog('posInit');
@@ -3239,7 +3426,7 @@ var elFinder = function(elm, opts, bootCallback) {
3239
  * @return jQuery
3240
  */
3241
  this.toast = function(options) {
3242
- return $('<div class="ui-front"/>').appendTo(this.ui.toast).elfindertoast(options || {}, this);
3243
  };
3244
 
3245
  /**
@@ -3926,7 +4113,12 @@ var elFinder = function(elm, opts, bootCallback) {
3926
  if (!self.UA.IE) {
3927
  // keep native xhr object for handling property responseURL
3928
  opts._xhr = new XMLHttpRequest();
3929
- opts.xhr = function() { return opts._xhr; };
 
 
 
 
 
3930
  }
3931
  return $.ajax(opts);
3932
  };
@@ -3998,9 +4190,10 @@ var elFinder = function(elm, opts, bootCallback) {
3998
  *
3999
  * @param String hash The hash
4000
  * @param String responseType 'blob' or 'arraybuffer' (default)
 
4001
  * @return arraybuffer|blob The contents.
4002
  */
4003
- this.getContents = function(hash, responseType) {
4004
  var self = this,
4005
  dfd = $.Deferred(),
4006
  type = responseType || 'arraybuffer',
@@ -4014,7 +4207,7 @@ var elFinder = function(elm, opts, bootCallback) {
4014
  if (!self.isSameOrigin(url)) {
4015
  url = self.openUrl(hash, true);
4016
  }
4017
- req = self.request({
4018
  data : {cmd : 'get'},
4019
  options : {
4020
  url: url,
@@ -4023,18 +4216,69 @@ var elFinder = function(elm, opts, bootCallback) {
4023
  dataType : 'binary',
4024
  responseType : type,
4025
  processData: false
4026
- }
 
 
 
 
 
 
 
 
 
4027
  })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4028
  .fail(function() {
4029
  dfd.reject();
4030
  })
4031
  .done(function(data) {
 
4032
  dfd.resolve(data);
4033
  });
4034
 
4035
  return dfd;
4036
  };
4037
 
 
 
 
 
 
 
 
4038
  this.getMimetype = function(name, orgMime) {
4039
  var mime = orgMime,
4040
  ext, m;
@@ -4061,44 +4305,18 @@ var elFinder = function(elm, opts, bootCallback) {
4061
  * Closure of getContentsHashes()
4062
  */
4063
  (function(self) {
4064
- var hashLibs = {
4065
- check : true
4066
- },
4067
- md5Calc = function(arr) {
4068
- var spark = new hashLibs.SparkMD5.ArrayBuffer(),
4069
- job;
4070
-
4071
- job = self.asyncJob(function(buf) {
4072
- spark.append(buf);
4073
- }, arr).done(function() {
4074
- job._md5 = spark.end();
4075
- });
4076
-
4077
- return job;
4078
- },
4079
- shaCalc = function(arr, length) {
4080
- var sha, job;
4081
-
4082
- try {
4083
- sha = new hashLibs.jsSHA('SHA' + (length.substr(0, 1) === '3'? length : ('-' + length)), 'ARRAYBUFFER');
4084
- job = self.asyncJob(function(buf) {
4085
- sha.update(buf);
4086
- }, arr).done(function() {
4087
- job._sha = sha.getHash('HEX');
4088
- });
4089
- } catch(e) {
4090
- job = $.Deferred.reject();
4091
- }
4092
 
4093
- return job;
4094
- };
4095
-
4096
- // make fm.hashCheckers
4097
- if (self.options.cdns.sparkmd5) {
4098
- self.hashCheckers.push('md5');
4099
- }
4100
- if (self.options.cdns.jssha) {
4101
- self.hashCheckers = self.hashCheckers.concat(['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512', 'shake128', 'shake256']);
 
4102
  }
4103
 
4104
  /**
@@ -4106,122 +4324,122 @@ var elFinder = function(elm, opts, bootCallback) {
4106
  *
4107
  * @param String target target file.hash
4108
  * @param Object needHashes need hash lib names
 
4109
  * @return Object hashes with lib name as key
4110
  */
4111
- self.getContentsHashes = function(target, needHashes) {
4112
  var dfd = $.Deferred(),
4113
  needs = self.arrayFlip(needHashes || ['md5'], true),
4114
  libs = [],
4115
  jobs = [],
4116
  res = {},
 
 
 
 
4117
  req;
4118
 
4119
  dfd.fail(function() {
4120
  req && req.reject();
4121
  });
4122
 
4123
- if (hashLibs.check) {
4124
-
4125
- delete hashLibs.check;
4126
-
4127
- // load SparkMD5
4128
- var libsmd5 = $.Deferred();
4129
- if (window.ArrayBuffer && self.options.cdns.sparkmd5) {
4130
- libs.push(libsmd5);
4131
- self.loadScript([self.options.cdns.sparkmd5],
4132
- function(res) {
4133
- var SparkMD5 = res || window.SparkMD5;
4134
- window.SparkMD5 && delete window.SparkMD5;
4135
- libsmd5.resolve();
4136
- if (SparkMD5) {
4137
- hashLibs.SparkMD5 = SparkMD5;
4138
- }
4139
- },
4140
- {
4141
- tryRequire: true,
4142
- error: function() {
4143
- libsmd5.reject();
4144
- }
4145
- }
4146
- );
4147
- }
4148
-
4149
- // load jsSha
4150
- var libssha = $.Deferred();
4151
- if (window.ArrayBuffer && self.options.cdns.jssha) {
4152
- libs.push(libssha);
4153
- self.loadScript([self.options.cdns.jssha],
4154
- function(res) {
4155
- var jsSHA = res || window.jsSHA;
4156
- window.jsSHA && delete window.jsSHA;
4157
- libssha.resolve();
4158
- if (jsSHA) {
4159
- hashLibs.jsSHA = jsSHA;
4160
- }
4161
- },
4162
- {
4163
- tryRequire: true,
4164
- error: function() {
4165
- libssha.reject();
4166
- }
4167
- }
4168
- );
4169
- }
4170
- }
4171
-
4172
- $.when.apply(null, libs).always(function() {
4173
- if (Object.keys(hashLibs).length) {
4174
- req = self.getContents(target).done(function(arrayBuffer) {
4175
- var arr = (arrayBuffer instanceof ArrayBuffer && arrayBuffer.byteLength > 0)? self.sliceArrayBuffer(arrayBuffer, 1048576) : false,
4176
- i;
4177
-
4178
- if (needs.md5 && hashLibs.SparkMD5) {
4179
- jobs.push(function() {
4180
- var job = md5Calc(arr).done(function() {
4181
- var f;
4182
- res.md5 = job._md5;
4183
- if (f = self.file(target)) {
4184
- f.md5 = job._md5;
4185
  }
4186
  dfd.notify(res);
 
 
 
 
 
 
 
 
4187
  });
4188
  dfd.fail(function() {
4189
  job.reject();
4190
  });
4191
- return job;
4192
- });
4193
- }
4194
- if (hashLibs.jsSHA) {
4195
- $.each(['1', '224', '256', '384', '512', '3-224', '3-256', '3-384', '3-512', 'ke128', 'ke256'], function(i, v) {
4196
- if (needs['sha' + v]) {
4197
- jobs.push(function() {
4198
- var job = shaCalc(arr, v).done(function() {
4199
- var f;
4200
- res['sha' + v] = job._sha;
4201
- if (f = self.file(target)) {
4202
- f['sha' + v] = job._sha;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4203
  }
4204
  dfd.notify(res);
 
 
 
 
 
 
 
 
4205
  });
4206
- return job;
4207
- });
4208
- }
4209
- });
4210
- }
4211
- if (jobs.length) {
4212
- self.sequence(jobs).always(function() {
4213
- dfd.resolve(res);
4214
- });
4215
- } else {
4216
- dfd.reject();
4217
- }
4218
- }).fail(function() {
 
 
 
 
4219
  dfd.reject();
4220
- });
4221
- } else {
4222
  dfd.reject();
4223
- }
4224
- });
 
 
4225
 
4226
  return dfd;
4227
  };
@@ -4321,7 +4539,7 @@ var elFinder = function(elm, opts, bootCallback) {
4321
  Object.assign(opts, e.data.opts);
4322
  }
4323
 
4324
- self.dialog('<span class="elfinder-dialog-icon elfinder-dialog-icon-error"/>'+self.i18n(e.data.error), opts);
4325
  } else {
4326
  last = node.children('.elfinder-dialog-error:last').children('.ui-dialog-content:first');
4327
  counter = last.children('.elfinder-error-counter');
@@ -4512,6 +4730,19 @@ var elFinder = function(elm, opts, bootCallback) {
4512
  soundPath = this.baseUrl + soundPath;
4513
  }
4514
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4515
  self.one('opendone', function() {
4516
  var tm;
4517
  // attach events to document
@@ -4612,7 +4843,7 @@ var elFinder = function(elm, opts, bootCallback) {
4612
  $(window).on('message.' + namespace, function(e){
4613
  var res = e.originalEvent || null,
4614
  obj, data;
4615
- if (res && self.uploadURL.indexOf(res.origin) === 0) {
4616
  try {
4617
  obj = JSON.parse(res.data);
4618
  data = obj.data || null;
@@ -4675,6 +4906,15 @@ var elFinder = function(elm, opts, bootCallback) {
4675
  ! self.enabled() && self.enable();
4676
  });
4677
  }
 
 
 
 
 
 
 
 
 
4678
  });
4679
 
4680
  // store instance in node
@@ -4938,10 +5178,10 @@ var elFinder = function(elm, opts, bootCallback) {
4938
  },
4939
  helper : function(e, ui) {
4940
  var element = this.id ? $(this) : $(this).parents('[id]:first'),
4941
- helper = $('<div class="elfinder-drag-helper"><span class="elfinder-drag-helper-icon-status"/></div>'),
4942
  icon = function(f) {
4943
  var mime = f.mime, i, tmb = self.tmb(f);
4944
- i = '<div class="elfinder-cwd-icon elfinder-cwd-icon-drag '+self.mime2class(mime)+' ui-corner-all"/>';
4945
  if (tmb) {
4946
  i = $(i).addClass(tmb.className).css('background-image', "url('"+tmb.url+"')").get(0).outerHTML;
4947
  } else if (f.icon) {
@@ -5051,35 +5291,38 @@ var elFinder = function(elm, opts, bootCallback) {
5051
  **/
5052
  self.ui = {
5053
  // container for nav panel and current folder container
5054
- workzone : $('<div/>').appendTo(node).elfinderworkzone(self),
5055
- // container for folders tree / places
5056
- navbar : $('<div/>').appendTo(node).elfindernavbar(self, self.options.uiOptions.navbar || {}),
5057
  // container for for preview etc at below the navbar
5058
- navdock : $('<div/>').appendTo(node).elfindernavdock(self, self.options.uiOptions.navdock || {}),
5059
  // contextmenu
5060
- contextmenu : $('<div/>').appendTo(node).elfindercontextmenu(self),
5061
  // overlay
5062
- overlay : $('<div/>').appendTo(node).elfinderoverlay({
5063
  show : function() { self.disable(); },
5064
  hide : function() { prevEnabled && self.enable(); }
5065
  }),
5066
  // current folder container
5067
- cwd : $('<div/>').appendTo(node).elfindercwd(self, self.options.uiOptions.cwd || {}),
5068
  // notification dialog window
5069
  notify : self.dialog('', {
5070
- cssClass : 'elfinder-dialog-notify',
5071
  position : self.options.notifyDialog.position,
5072
  absolute : true,
5073
  resizable : false,
5074
  autoOpen : false,
5075
- closeOnEscape : false,
 
5076
  title : '&nbsp;',
5077
  width : self.options.notifyDialog.width? parseInt(self.options.notifyDialog.width) : null,
5078
- minHeight : null
 
5079
  }),
5080
- statusbar : $('<div class="ui-widget-header ui-helper-clearfix ui-corner-bottom elfinder-statusbar"/>').hide().appendTo(node),
5081
- toast : $('<div class="elfinder-toast"/>').appendTo(node),
5082
- bottomtray : $('<div class="elfinder-bottomtray">').appendTo(node)
 
5083
  };
5084
 
5085
  self.trigger('uiready');
@@ -5095,7 +5338,10 @@ var elFinder = function(elm, opts, bootCallback) {
5095
  self.ui[ui][name](self, opts);
5096
  }
5097
  });
5098
-
 
 
 
5099
  // update size
5100
  self.resize(width, height);
5101
 
@@ -5397,34 +5643,8 @@ var elFinder = function(elm, opts, bootCallback) {
5397
  })();
5398
  }
5399
 
5400
- // trigger event cssloaded if cddAutoLoad disabled
5401
- if (self.cssloaded === null) {
5402
- // check css loaded and remove hide
5403
- (function() {
5404
- var loaded = function() {
5405
- if (node.data('cssautoloadHide')) {
5406
- node.data('cssautoloadHide').remove();
5407
- node.removeData('cssautoloadHide');
5408
- }
5409
- self.cssloaded = true;
5410
- requestAnimationFrame(function() {
5411
- self.trigger('cssloaded');
5412
- });
5413
- },
5414
- cnt, fi;
5415
- if (node.css('visibility') === 'hidden') {
5416
- cnt = 1000; // timeout 10 secs
5417
- fi = setInterval(function() {
5418
- if (--cnt < 0 || node.css('visibility') !== 'hidden') {
5419
- clearInterval(fi);
5420
- loaded();
5421
- }
5422
- }, 10);
5423
- } else {
5424
- loaded();
5425
- }
5426
- })();
5427
- } else {
5428
  self.cssloaded = true;
5429
  self.trigger('cssloaded');
5430
  }
@@ -5562,7 +5782,7 @@ elFinder.prototype = {
5562
  **/
5563
  UA : (function(){
5564
  var self = this,
5565
- webkit = !document.unqueID && !window.opera && !window.sidebar && window.localStorage && 'WebkitAppearance' in document.documentElement.style,
5566
  chrome = webkit && window.chrome,
5567
  /*setRotated = function() {
5568
  var a = ((screen && screen.orientation && screen.orientation.angle) || window.orientation || 0) + 0;
@@ -5595,6 +5815,7 @@ elFinder.prototype = {
5595
  Mobile : typeof window.orientation != "undefined",
5596
  Touch : typeof window.ontouchstart != "undefined",
5597
  iOS : navigator.platform.match(/^iP(?:[ao]d|hone)/),
 
5598
  Fullscreen : (typeof (document.exitFullscreen || document.webkitExitFullscreen || document.mozCancelFullScreen || document.msExitFullscreen) !== 'undefined'),
5599
  Angle : 0,
5600
  Rotated : false,
@@ -5615,6 +5836,13 @@ elFinder.prototype = {
5615
  return UA;
5616
  })(),
5617
 
 
 
 
 
 
 
 
5618
  /**
5619
  * Has RequireJS?
5620
  *
@@ -5846,7 +6074,7 @@ elFinder.prototype = {
5846
 
5847
  data = self.normalize(data);
5848
  if (!self.validResponse('upload', data)) {
5849
- return {error : (response.norError || ['errResponse'])};
5850
  }
5851
  data.removed = $.merge((data.removed || []), $.map(data.added || [], function(f) { return self.file(f.hash)? f.hash : null; }));
5852
  return data;
@@ -6210,7 +6438,7 @@ elFinder.prototype = {
6210
  var check = [];
6211
  var str = data.files[0];
6212
  if (data.type == 'html') {
6213
- var tmp = $("<html/>").append($.parseHTML(str.replace(/ src=/ig, ' _elfsrc='))),
6214
  atag;
6215
  $('img[_elfsrc]', tmp).each(function(){
6216
  var url, purl,
@@ -6265,7 +6493,9 @@ elFinder.prototype = {
6265
  var self = fm ? fm : this,
6266
  node = self.getUI(),
6267
  xhr = new XMLHttpRequest(),
6268
- notifyto = null, notifyto2 = null,
 
 
6269
  dataChecked = data.checked,
6270
  isDataType = (data.isDataType || data.type == 'data'),
6271
  target = (data.target || self.cwd().hash),
@@ -6357,7 +6587,10 @@ elFinder.prototype = {
6357
  });
6358
  }
6359
  data.sync && self.sync();
6360
- data.debug && fm.debug('backend-debug', data);
 
 
 
6361
  }
6362
  })
6363
  .always(function() {
@@ -6366,19 +6599,23 @@ elFinder.prototype = {
6366
  node.off('uploadabort', fnAbort);
6367
  $(window).off('unload', fnAbort);
6368
  notifyto && clearTimeout(notifyto);
 
6369
  notifyto2 && clearTimeout(notifyto2);
6370
  dataChecked && !data.multiupload && checkNotify() && self.notify({type : 'upload', cnt : -cnt, progress : 0, size : 0});
 
6371
  chunkMerge && notifyElm.children('.elfinder-notify-chunkmerge').length && self.notify({type : 'chunkmerge', cnt : -1});
6372
  }),
6373
  formData = new FormData(),
6374
  files = data.input ? data.input.files : self.uploads.checkFile(data, self, target),
6375
  cnt = data.checked? (isDataType? files[0].length : files.length) : files.length,
 
6376
  loaded = 0,
6377
  prev = 0,
6378
  filesize = 0,
6379
  notify = false,
6380
  notifyElm = self.ui.notify,
6381
  cancelBtn = true,
 
6382
  abort = false,
6383
  checkNotify = function() {
6384
  if (!notify && (ntfUpload = notifyElm.children('.elfinder-notify-upload')).length) {
@@ -6394,8 +6631,9 @@ elFinder.prototype = {
6394
  self.notify({type : 'upload', cnt : ntfUpload.data('cnt') * -1, progress : 0, size : 0});
6395
  }
6396
  },
6397
- cancelToggle = function(show) {
6398
  ntfUpload.children('.elfinder-notify-cancel')[show? 'show':'hide']();
 
6399
  },
6400
  startNotify = function(size) {
6401
  if (!size) size = filesize;
@@ -6517,6 +6755,8 @@ elFinder.prototype = {
6517
  xhr.addEventListener('load', function(e) {
6518
  var status = xhr.status, res, curr = 0, error = '', errData, errObj;
6519
 
 
 
6520
  if (status >= 400) {
6521
  if (status > 500) {
6522
  error = 'errResponse';
@@ -6531,7 +6771,7 @@ elFinder.prototype = {
6531
 
6532
  if (error) {
6533
  node.trigger('uploadabort');
6534
- getFile(files).done(function(file) {
6535
  return dfrd.reject(file._cid? null : error);
6536
  });
6537
  }
@@ -6569,7 +6809,7 @@ elFinder.prototype = {
6569
  self.trigger('uploadfail', res);
6570
  // trigger "requestError" event
6571
  self.trigger('requestError', errData);
6572
- if (errData._event && errData._event.isDefaultPrevented()) {
6573
  res.error = '';
6574
  }
6575
  if (res._chunkfailure || res._multiupload) {
@@ -6638,9 +6878,16 @@ elFinder.prototype = {
6638
  progress();
6639
  }
6640
 
6641
- if (! data.multiupload && loaded >= filesize) {
6642
- cancelBtn = false;
6643
- cancelToggle(false);
 
 
 
 
 
 
 
6644
  }
6645
  }
6646
  }, false);
@@ -6659,7 +6906,7 @@ elFinder.prototype = {
6659
  blobSlice = chunkEnable? false : '',
6660
  blobSize, blobMtime, blobName, i, start, end, chunks, blob, chunk, added, done, last, failChunk,
6661
  multi = function(files, num){
6662
- var sfiles = [], cid, sfilesLen = 0, cancelChk;
6663
  if (!abort) {
6664
  while(files.length && sfiles.length < num) {
6665
  sfiles.push(files.shift());
@@ -6672,6 +6919,7 @@ elFinder.prototype = {
6672
  break;
6673
  }
6674
  cid = isDataType? (sfiles[i][0][0]._cid || null) : (sfiles[i][0]._cid || null);
 
6675
  if (!!failChunk[cid]) {
6676
  last--;
6677
  continue;
@@ -6711,9 +6959,11 @@ elFinder.prototype = {
6711
  multi(files, 1); // Next one
6712
  } else {
6713
  if (--cancelChk <= 1) {
6714
- cancelBtn = false;
6715
- cancelToggle(false);
 
6716
  }
 
6717
  }
6718
  });
6719
  }
@@ -6948,12 +7198,13 @@ elFinder.prototype = {
6948
  });
6949
 
6950
  $.each(files, function(i, file) {
6951
- var name;
6952
  if (file._chunkmerged) {
6953
  formData.append('chunk', file._chunkmerged);
6954
  formData.append('upload[]', file._name);
6955
  formData.append('mtime[]', file._mtime);
6956
  data.clipdata && formData.append('overwrite', 0);
 
6957
  } else {
6958
  if (file._chunkfail) {
6959
  formData.append('upload[]', 'chunkfail');
@@ -6976,6 +7227,8 @@ elFinder.prototype = {
6976
  name = fm.date(fm.nonameDateFormat) + '.mov';
6977
  }
6978
  }
 
 
6979
  }
6980
  }
6981
  name? formData.append('upload[]', file, name) : formData.append('upload[]', file);
@@ -6985,6 +7238,7 @@ elFinder.prototype = {
6985
  formData.append('cid' , file._cid);
6986
  formData.append('range', file._range);
6987
  formData.append('mtime[]', file._mtime);
 
6988
  } else {
6989
  formData.append('mtime[]', file.lastModified? Math.round(file.lastModified/1000) : 0);
6990
  }
@@ -7222,6 +7476,7 @@ elFinder.prototype = {
7222
  data.hashes = {};
7223
  }
7224
  result[1] = $.map(result[1], function(p, i) {
 
7225
  p = p.replace(/\/[^\/]*$/, '');
7226
  if (p === '') {
7227
  return target;
@@ -7284,12 +7539,12 @@ elFinder.prototype = {
7284
  notify && self.notify({type : 'upload', cnt : -cnt});
7285
 
7286
  setTimeout(function() {
7287
- msie && $('<iframe src="javascript:false;"/>').appendTo(form);
7288
  form.remove();
7289
  iframe.remove();
7290
  }, 100);
7291
  },
7292
- iframe = $('<iframe src="'+(msie ? 'javascript:false;' : 'about:blank')+'" name="'+name+'" style="position:absolute;left:-1000px;top:-1000px" />')
7293
  .on('load', function() {
7294
  iframe.off('load')
7295
  .on('load', function() {
@@ -7489,7 +7744,56 @@ elFinder.prototype = {
7489
  }
7490
  return retval;
7491
  },
7492
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7493
  /**
7494
  * Get/set cookie
7495
  *
@@ -7503,7 +7807,7 @@ elFinder.prototype = {
7503
  name = 'elfinder-'+name+this.id;
7504
 
7505
  if (value === void(0)) {
7506
- if (document.cookie && document.cookie != '') {
7507
  c = document.cookie.split(';');
7508
  name += '=';
7509
  for (i=0; i<c.length; i++) {
@@ -7522,6 +7826,10 @@ elFinder.prototype = {
7522
  return null;
7523
  }
7524
 
 
 
 
 
7525
  o = Object.assign({}, this.options.cookie);
7526
  if (value === null) {
7527
  value = '';
@@ -7537,7 +7845,7 @@ elFinder.prototype = {
7537
  d.setTime(d.getTime()+(o.expires * 86400000));
7538
  o.expires = d;
7539
  }
7540
- document.cookie = name+'='+encodeURIComponent(value)+'; expires='+o.expires.toUTCString()+(o.path ? '; path='+o.path : '')+(o.domain ? '; domain='+o.domain : '')+(o.secure ? '; secure' : '');
7541
  if (value && (value.substr(0,1) === '{' || value.substr(0,1) === '[')) {
7542
  try {
7543
  return JSON.parse(value);
@@ -7577,7 +7885,7 @@ elFinder.prototype = {
7577
  *
7578
  * @type jQuery
7579
  */
7580
- _node : $('<span/>'),
7581
 
7582
  /**
7583
  * Replace not html-safe symbols to html entities
@@ -7636,12 +7944,12 @@ elFinder.prototype = {
7636
  },
7637
  normalizeOptions = function(opts) {
7638
  var getType = function(v) {
7639
- var type = typeof v;
7640
- if (type === 'object' && Array.isArray(v)) {
7641
- type = 'array';
7642
- }
7643
- return type;
7644
- };
7645
  $.each(self.optionProperties, function(k, empty) {
7646
  if (empty !== void(0)) {
7647
  if (opts[k] && getType(opts[k]) !== getType(empty)) {
@@ -7649,10 +7957,28 @@ elFinder.prototype = {
7649
  }
7650
  }
7651
  });
7652
- if (opts['disabled']) {
7653
- opts['disabledFlip'] = self.arrayFlip(opts['disabled'], true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7654
  } else {
7655
- opts['disabledFlip'] = {};
7656
  }
7657
  return opts;
7658
  },
@@ -7868,7 +8194,7 @@ elFinder.prototype = {
7868
  name, i18, i18nFolderName, prevId, cData;
7869
 
7870
  // set cunstom data
7871
- if (data.customData && data.customData !== self.prevCustomData) {
7872
  self.prevCustomData = data.customData;
7873
  try {
7874
  cData = JSON.parse(data.customData);
@@ -8169,22 +8495,79 @@ elFinder.prototype = {
8169
  * @return elFinder
8170
  */
8171
  notify : function(opts) {
8172
- var type = opts.type,
 
8173
  id = opts.id? 'elfinder-notify-'+opts.id : '',
8174
  msg = this.i18n((typeof opts.msg !== 'undefined')? opts.msg : (this.messages['ntf'+type] ? 'ntf'+type : 'ntfsmth')),
 
8175
  ndialog = this.ui.notify,
 
8176
  notify = ndialog.children('.elfinder-notify-'+type+(id? ('.'+id) : '')),
8177
  button = notify.children('div.elfinder-notify-cancel').children('button'),
8178
- ntpl = '<div class="elfinder-notify elfinder-notify-{type}'+(id? (' '+id) : '')+'"><span class="elfinder-dialog-icon elfinder-dialog-icon-{type}"/><span class="elfinder-notify-msg">{msg}</span> <span class="elfinder-notify-cnt"/><div class="elfinder-notify-progressbar"><div class="elfinder-notify-progress"/></div><div class="elfinder-notify-cancel"/></div>',
8179
- delta = opts.cnt,
8180
  size = (typeof opts.size != 'undefined')? parseInt(opts.size) : null,
8181
  progress = (typeof opts.progress != 'undefined' && opts.progress >= 0) ? opts.progress : null,
 
8182
  cancel = opts.cancel,
8183
  clhover = 'ui-state-hover',
8184
  close = function() {
 
 
 
 
 
 
 
 
 
 
 
 
8185
  notify._esc && $(document).off('keydown', notify._esc);
8186
- notify.remove();
8187
- !ndialog.children().length && ndialog.elfinderdialog('close');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8188
  },
8189
  cnt, total, prc;
8190
 
@@ -8193,21 +8576,31 @@ elFinder.prototype = {
8193
  }
8194
 
8195
  if (!notify.length) {
8196
- notify = $(ntpl.replace(/\{type\}/g, type).replace(/\{msg\}/g, msg))
8197
- .appendTo(ndialog)
8198
- .data('cnt', 0);
 
 
 
 
 
 
8199
 
8200
  if (progress != null) {
8201
- notify.data({progress : 0, total : 0});
 
 
 
8202
  }
8203
 
8204
  if (cancel) {
8205
- button = $('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"><span class="ui-button-text">'+this.i18n('btnCancel')+'</span></button>')
8206
  .on('mouseenter mouseleave', function(e) {
8207
  $(this).toggleClass(clhover, e.type === 'mouseenter');
8208
  });
8209
  notify.children('div.elfinder-notify-cancel').append(button);
8210
  }
 
8211
  } else if (typeof opts.msg !== 'undefined') {
8212
  notify.children('span.elfinder-notify-msg').html(msg);
8213
  }
@@ -8238,7 +8631,13 @@ elFinder.prototype = {
8238
  }
8239
 
8240
  !opts.hideCnt && notify.children('.elfinder-notify-cnt').text('('+cnt+')');
8241
- ndialog.is(':hidden') && ndialog.elfinderdialog('open', this).height('auto');
 
 
 
 
 
 
8242
  notify.data('cnt', cnt);
8243
 
8244
  if ((progress != null)
@@ -8253,12 +8652,15 @@ elFinder.prototype = {
8253
  prc *= 100;
8254
  total = Math.max(1, total);
8255
  }
8256
- progress = parseInt(prc/total);
8257
 
8258
  notify.find('.elfinder-notify-progress')
8259
  .animate({
8260
  width : (progress < 100 ? progress : 100)+'%'
8261
- }, 20);
 
 
 
8262
  }
8263
 
8264
  } else {
@@ -8357,7 +8759,7 @@ elFinder.prototype = {
8357
 
8358
  if (opts.all) {
8359
  options.create = function() {
8360
- var base = $('<div class="elfinder-dialog-confirm-applyall"/>');
8361
  checkbox = $('<input type="checkbox" />');
8362
  $(this).next().find('.ui-dialog-buttonset')
8363
  .prepend(base.append($('<label>'+apply+'</label>').prepend(checkbox)));
@@ -8368,7 +8770,7 @@ elFinder.prototype = {
8368
  opts.optionsCallback(options);
8369
  }
8370
 
8371
- return this.dialog('<span class="elfinder-dialog-icon elfinder-dialog-icon-confirm"/>' + this.i18n(opts.text), options);
8372
  },
8373
 
8374
  /**
@@ -9017,13 +9419,13 @@ elFinder.prototype = {
9017
  }
9018
  }
9019
  });
9020
- bro.after($('<div/>').append(select))
9021
  .closest('.ui-dialog').trigger('tabstopsInit');
9022
  select.trigger('focus');
9023
  }
9024
  },
9025
  spinner = function() {
9026
- return $('<div class="elfinder-netmount-spinner"/>').append('<span class="elfinder-spinner"/>');
9027
  },
9028
  xhr;
9029
  return {
@@ -9033,10 +9435,11 @@ elFinder.prototype = {
9033
  offline : $('<input type="checkbox"/>').on('change', function() {
9034
  $(this).parents('table.elfinder-netmount-tb').find('select:first').trigger('change', 'reset');
9035
  }),
9036
- host : $('<span><span class="elfinder-spinner"/></span><input type="hidden"/>'),
9037
  path : $('<input type="text" value="'+opts.root+'"/>'),
9038
  user : $('<input type="hidden"/>'),
9039
- pass : $('<input type="hidden"/>')
 
9040
  },
9041
  select: function(fm, ev, d){
9042
  var f = this.inputs,
@@ -9053,7 +9456,7 @@ elFinder.prototype = {
9053
  if (oline.parent().children().length === 1) {
9054
  f.path.parent().prev().html(fm.i18n(opts.pathI18n));
9055
  oline.attr('title', fm.i18n('offlineAccess'));
9056
- oline.uniqueId().after($('<label/>').attr('for', oline.attr('id')).html(' '+fm.i18n('offlineAccess')));
9057
  }
9058
  f0.data('inrequest', true).empty().addClass('elfinder-spinner')
9059
  .parent().find('span.elfinder-button-icon').remove();
@@ -9075,23 +9478,50 @@ elFinder.prototype = {
9075
  p = this.protocol,
9076
  f0 = $(f.host[0]),
9077
  f1 = $(f.host[1]),
9078
- expires = '&nbsp;';
 
 
 
 
 
 
 
 
9079
 
9080
  opts.noOffline && f.offline.closest('tr').hide();
9081
  if (data.mode == 'makebtn') {
9082
  f0.removeClass('elfinder-spinner').removeData('expires').removeData('funcexpup');
9083
- f.host.find('input').on('mouseenter mouseleave', function(){$(this).toggleClass('ui-state-hover');});
 
 
 
 
 
 
 
 
 
 
 
 
9084
  f1.val('');
9085
  f.path.val(opts.root).next().remove();
9086
  f.user.val('');
9087
  f.pass.val('');
9088
  ! opts.noOffline && f.offline.closest('tr').show();
9089
- this.vars.mbtn.hide();
9090
  } else if (data.mode == 'folders') {
9091
  if (data.folders) {
9092
  addFolders.call(this, fm, f.path.nextAll(':last'), data.folders);
9093
  }
9094
  } else {
 
 
 
 
 
 
 
9095
  if (data.expires) {
9096
  expires = '()';
9097
  f0.data('expires', data.expires);
@@ -9123,10 +9553,13 @@ elFinder.prototype = {
9123
  p.trigger('change', 'reset');
9124
  }));
9125
  f1.val(protocol);
9126
- this.vars.mbtn.show();
9127
  if (data.folders) {
9128
  addFolders.call(this, fm, f.path, data.folders);
9129
  }
 
 
 
9130
  f.user.val('done');
9131
  f.pass.val('done');
9132
  f.offline.closest('tr').hide();
@@ -9418,7 +9851,7 @@ elFinder.prototype = {
9418
  if (dfds) {
9419
  dfds[i] = $.Deferred();
9420
  }
9421
- if (! $("head > link[href='+url+']").length) {
9422
  link = document.createElement('link');
9423
  link.type = 'text/css';
9424
  link.rel = 'stylesheet';
@@ -9671,14 +10104,16 @@ elFinder.prototype = {
9671
  if (fileCnt !== false) {
9672
  if (typeof data.fileCnt === 'undefined') {
9673
  fileCnt = false;
 
 
9674
  }
9675
- fileCnt += parseInt(data.fileCnt || 0);
9676
  }
9677
  if (dirCnt !== false) {
9678
  if (typeof data.dirCnt === 'undefined') {
9679
  dirCnt = false;
 
 
9680
  }
9681
- dirCnt += parseInt(data.dirCnt || 0);
9682
  }
9683
  }
9684
  changed.length && self.change({changed: changed});
@@ -9705,7 +10140,62 @@ elFinder.prototype = {
9705
 
9706
  return dfrd;
9707
  },
9708
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9709
  /**
9710
  * Gets the theme object by settings of options.themes
9711
  *
@@ -9790,7 +10280,7 @@ elFinder.prototype = {
9790
  });
9791
  }
9792
  });
9793
- } else if (themeid === 'default' && self.theme) {
9794
  $('head>link.elfinder-theme-ext').remove();
9795
  self.theme = null;
9796
  self.trigger && self.trigger('themechange');
@@ -9871,6 +10361,48 @@ elFinder.prototype = {
9871
  }
9872
  },
9873
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9874
  /**
9875
  * Gets the request identifier
9876
  *
@@ -9951,23 +10483,65 @@ elFinder.prototype = {
9951
  log : function(m) { window.console && window.console.log && window.console.log(m); return this; },
9952
 
9953
  debug : function(type, m) {
9954
- var d = this.options.debug;
 
 
 
9955
 
9956
- if (d && (d === 'all' || d[type])) {
9957
- window.console && window.console.log && window.console.log('elfinder debug: ['+type+'] ['+this.id+']', m);
9958
- }
9959
-
9960
  if (type === 'backend-error') {
9961
  if (! this.cwd().hash || (d && (d === 'all' || d['backend-error']))) {
9962
  m = Array.isArray(m)? m : [ m ];
9963
  this.error(m);
9964
  }
 
 
 
 
 
 
 
 
 
 
 
9965
  } else if (type === 'backend-debug') {
9966
  this.trigger('backenddebug', m);
9967
  }
9968
 
 
 
 
 
9969
  return this;
9970
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9971
  time : function(l) { window.console && window.console.time && window.console.time(l); },
9972
  timeEnd : function(l) { window.console && window.console.timeEnd && window.console.timeEnd(l); }
9973
 
@@ -10136,7 +10710,7 @@ if (!window.cancelAnimationFrame) {
10136
  *
10137
  * @type String
10138
  **/
10139
- elFinder.prototype.version = '2.1.46';
10140
 
10141
 
10142
 
@@ -10180,66 +10754,115 @@ if ($.ui) {
10180
 
10181
  /**
10182
  *
10183
- * jquery.binarytransport.js
10184
  *
10185
  * @description. jQuery ajax transport for making binary data type requests.
10186
- * @version 1.0
10187
- * @author Henry Algus <henryalgus@gmail.com>
10188
  *
10189
  */
10190
 
10191
- // use this transport for "binary" data type
10192
- $.ajaxTransport('+binary', function(options, originalOptions, jqXHR) {
10193
- // check for conditions and support for blob / arraybuffer response type
10194
- if (window.FormData && ((options.dataType && (options.dataType == 'binary')) || (options.data && ((window.ArrayBuffer && options.data instanceof ArrayBuffer) || (window.Blob && options.data instanceof Blob)))))
10195
- {
10196
- var xhr;
10197
- return {
10198
- // create new XMLHttpRequest
10199
- send: function(headers, callback){
10200
- // setup all variables
10201
- xhr = new XMLHttpRequest();
10202
- var url = options.url,
10203
- type = options.type,
10204
- async = options.async || true,
10205
- // blob or arraybuffer. Default is blob
10206
- dataType = options.responseType || 'blob',
10207
- data = options.data || null,
10208
- username = options.username,
10209
- password = options.password;
10210
-
10211
- xhr.addEventListener('load', function(){
10212
- var data = {};
10213
- data[options.dataType] = xhr.response;
10214
- // make callback and send data
10215
- callback(xhr.status, xhr.statusText, data, xhr.getAllResponseHeaders());
10216
- });
10217
 
10218
- xhr.open(type, url, async, username, password);
10219
-
10220
- // setup custom headers
10221
- for (var i in headers ) {
10222
- xhr.setRequestHeader(i, headers[i] );
10223
- }
 
 
 
 
 
 
 
 
10224
 
10225
- // setuo xhrFields
10226
- if (options.xhrFields) {
10227
- for (var key in options.xhrFields) {
10228
- if (key in xhr) {
10229
- xhr[key] = options.xhrFields[key];
10230
  }
10231
  }
10232
- }
10233
 
10234
- xhr.responseType = dataType;
10235
- xhr.send(data);
10236
- },
10237
- abort: function(){
10238
- xhr.abort();
10239
- }
10240
- };
10241
- }
10242
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10243
 
10244
  /*!
10245
  * jQuery UI Touch Punch 0.2.3
@@ -10552,7 +11175,7 @@ if (! $.fn.scrollBottom) {
10552
  * File: /js/elFinder.mimetypes.js
10553
  */
10554
 
10555
- elFinder.prototype.mimeTypes = {"application\/x-executable":"exe","application\/x-jar":"jar","application\/x-gzip":"gz","application\/x-bzip2":"tbz","application\/x-rar":"rar","text\/x-php":"php","text\/javascript":"js","application\/rtfd":"rtfd","text\/x-python":"py","text\/x-ruby":"rb","text\/x-shellscript":"sh","text\/x-perl":"pl","text\/xml":"xml","text\/x-csrc":"c","text\/x-chdr":"h","text\/x-c++src":"cpp","text\/x-c++hdr":"hh","text\/x-markdown":"md","text\/x-yaml":"yml","image\/x-ms-bmp":"bmp","image\/x-targa":"tga","image\/xbm":"xbm","image\/pxm":"pxm","audio\/wav":"wav","video\/x-dv":"dv","video\/x-ms-wmv":"wm","video\/ogg":"ogm","video\/MP2T":"m2ts","application\/x-mpegURL":"m3u8","application\/dash+xml":"mpd","application\/andrew-inset":"ez","application\/applixware":"aw","application\/atom+xml":"atom","application\/atomcat+xml":"atomcat","application\/atomsvc+xml":"atomsvc","application\/ccxml+xml":"ccxml","application\/cdmi-capability":"cdmia","application\/cdmi-container":"cdmic","application\/cdmi-domain":"cdmid","application\/cdmi-object":"cdmio","application\/cdmi-queue":"cdmiq","application\/cu-seeme":"cu","application\/davmount+xml":"davmount","application\/docbook+xml":"dbk","application\/dssc+der":"dssc","application\/dssc+xml":"xdssc","application\/ecmascript":"ecma","application\/emma+xml":"emma","application\/epub+zip":"epub","application\/exi":"exi","application\/font-tdpfr":"pfr","application\/gml+xml":"gml","application\/gpx+xml":"gpx","application\/gxf":"gxf","application\/hyperstudio":"stk","application\/inkml+xml":"ink","application\/ipfix":"ipfix","application\/java-serialized-object":"ser","application\/java-vm":"class","application\/json":"json","application\/jsonml+json":"jsonml","application\/lost+xml":"lostxml","application\/mac-binhex40":"hqx","application\/mac-compactpro":"cpt","application\/mads+xml":"mads","application\/marc":"mrc","application\/marcxml+xml":"mrcx","application\/mathematica":"ma","application\/mathml+xml":"mathml","application\/mbox":"mbox","application\/mediaservercontrol+xml":"mscml","application\/metalink+xml":"metalink","application\/metalink4+xml":"meta4","application\/mets+xml":"mets","application\/mods+xml":"mods","application\/mp21":"m21","application\/mp4":"mp4s","application\/msword":"doc","application\/mxf":"mxf","application\/octet-stream":"bin","application\/oda":"oda","application\/oebps-package+xml":"opf","application\/ogg":"ogx","application\/omdoc+xml":"omdoc","application\/onenote":"onetoc","application\/oxps":"oxps","application\/patch-ops-error+xml":"xer","application\/pdf":"pdf","application\/pgp-encrypted":"pgp","application\/pgp-signature":"asc","application\/pics-rules":"prf","application\/pkcs10":"p10","application\/pkcs7-mime":"p7m","application\/pkcs7-signature":"p7s","application\/pkcs8":"p8","application\/pkix-attr-cert":"ac","application\/pkix-cert":"cer","application\/pkix-crl":"crl","application\/pkix-pkipath":"pkipath","application\/pkixcmp":"pki","application\/pls+xml":"pls","application\/postscript":"ai","application\/prs.cww":"cww","application\/pskc+xml":"pskcxml","application\/rdf+xml":"rdf","application\/reginfo+xml":"rif","application\/relax-ng-compact-syntax":"rnc","application\/resource-lists+xml":"rl","application\/resource-lists-diff+xml":"rld","application\/rls-services+xml":"rs","application\/rpki-ghostbusters":"gbr","application\/rpki-manifest":"mft","application\/rpki-roa":"roa","application\/rsd+xml":"rsd","application\/rss+xml":"rss","application\/rtf":"rtf","application\/sbml+xml":"sbml","application\/scvp-cv-request":"scq","application\/scvp-cv-response":"scs","application\/scvp-vp-request":"spq","application\/scvp-vp-response":"spp","application\/sdp":"sdp","application\/set-payment-initiation":"setpay","application\/set-registration-initiation":"setreg","application\/shf+xml":"shf","application\/smil+xml":"smi","application\/sparql-query":"rq","application\/sparql-results+xml":"srx","application\/srgs":"gram","application\/srgs+xml":"grxml","application\/sru+xml":"sru","application\/ssdl+xml":"ssdl","application\/ssml+xml":"ssml","application\/tei+xml":"tei","application\/thraud+xml":"tfi","application\/timestamped-data":"tsd","application\/vnd.3gpp.pic-bw-large":"plb","application\/vnd.3gpp.pic-bw-small":"psb","application\/vnd.3gpp.pic-bw-var":"pvb","application\/vnd.3gpp2.tcap":"tcap","application\/vnd.3m.post-it-notes":"pwn","application\/vnd.accpac.simply.aso":"aso","application\/vnd.accpac.simply.imp":"imp","application\/vnd.acucobol":"acu","application\/vnd.acucorp":"atc","application\/vnd.adobe.air-application-installer-package+zip":"air","application\/vnd.adobe.formscentral.fcdt":"fcdt","application\/vnd.adobe.fxp":"fxp","application\/vnd.adobe.xdp+xml":"xdp","application\/vnd.adobe.xfdf":"xfdf","application\/vnd.ahead.space":"ahead","application\/vnd.airzip.filesecure.azf":"azf","application\/vnd.airzip.filesecure.azs":"azs","application\/vnd.amazon.ebook":"azw","application\/vnd.americandynamics.acc":"acc","application\/vnd.amiga.ami":"ami","application\/vnd.android.package-archive":"apk","application\/vnd.anser-web-certificate-issue-initiation":"cii","application\/vnd.anser-web-funds-transfer-initiation":"fti","application\/vnd.antix.game-component":"atx","application\/vnd.apple.installer+xml":"mpkg","application\/vnd.aristanetworks.swi":"swi","application\/vnd.astraea-software.iota":"iota","application\/vnd.audiograph":"aep","application\/vnd.blueice.multipass":"mpm","application\/vnd.bmi":"bmi","application\/vnd.businessobjects":"rep","application\/vnd.chemdraw+xml":"cdxml","application\/vnd.chipnuts.karaoke-mmd":"mmd","application\/vnd.cinderella":"cdy","application\/vnd.claymore":"cla","application\/vnd.cloanto.rp9":"rp9","application\/vnd.clonk.c4group":"c4g","application\/vnd.cluetrust.cartomobile-config":"c11amc","application\/vnd.cluetrust.cartomobile-config-pkg":"c11amz","application\/vnd.commonspace":"csp","application\/vnd.contact.cmsg":"cdbcmsg","application\/vnd.cosmocaller":"cmc","application\/vnd.crick.clicker":"clkx","application\/vnd.crick.clicker.keyboard":"clkk","application\/vnd.crick.clicker.palette":"clkp","application\/vnd.crick.clicker.template":"clkt","application\/vnd.crick.clicker.wordbank":"clkw","application\/vnd.criticaltools.wbs+xml":"wbs","application\/vnd.ctc-posml":"pml","application\/vnd.cups-ppd":"ppd","application\/vnd.curl.car":"car","application\/vnd.curl.pcurl":"pcurl","application\/vnd.dart":"dart","application\/vnd.data-vision.rdz":"rdz","application\/vnd.dece.data":"uvf","application\/vnd.dece.ttml+xml":"uvt","application\/vnd.dece.unspecified":"uvx","application\/vnd.dece.zip":"uvz","application\/vnd.denovo.fcselayout-link":"fe_launch","application\/vnd.dna":"dna","application\/vnd.dolby.mlp":"mlp","application\/vnd.dpgraph":"dpg","application\/vnd.dreamfactory":"dfac","application\/vnd.ds-keypoint":"kpxx","application\/vnd.dvb.ait":"ait","application\/vnd.dvb.service":"svc","application\/vnd.dynageo":"geo","application\/vnd.ecowin.chart":"mag","application\/vnd.enliven":"nml","application\/vnd.epson.esf":"esf","application\/vnd.epson.msf":"msf","application\/vnd.epson.quickanime":"qam","application\/vnd.epson.salt":"slt","application\/vnd.epson.ssf":"ssf","application\/vnd.eszigno3+xml":"es3","application\/vnd.ezpix-album":"ez2","application\/vnd.ezpix-package":"ez3","application\/vnd.fdf":"fdf","application\/vnd.fdsn.mseed":"mseed","application\/vnd.fdsn.seed":"seed","application\/vnd.flographit":"gph","application\/vnd.fluxtime.clip":"ftc","application\/vnd.framemaker":"fm","application\/vnd.frogans.fnc":"fnc","application\/vnd.frogans.ltf":"ltf","application\/vnd.fsc.weblaunch":"fsc","application\/vnd.fujitsu.oasys":"oas","application\/vnd.fujitsu.oasys2":"oa2","application\/vnd.fujitsu.oasys3":"oa3","application\/vnd.fujitsu.oasysgp":"fg5","application\/vnd.fujitsu.oasysprs":"bh2","application\/vnd.fujixerox.ddd":"ddd","application\/vnd.fujixerox.docuworks":"xdw","application\/vnd.fujixerox.docuworks.binder":"xbd","application\/vnd.fuzzysheet":"fzs","application\/vnd.genomatix.tuxedo":"txd","application\/vnd.geogebra.file":"ggb","application\/vnd.geogebra.tool":"ggt","application\/vnd.geometry-explorer":"gex","application\/vnd.geonext":"gxt","application\/vnd.geoplan":"g2w","application\/vnd.geospace":"g3w","application\/vnd.gmx":"gmx","application\/vnd.google-earth.kml+xml":"kml","application\/vnd.google-earth.kmz":"kmz","application\/vnd.grafeq":"gqf","application\/vnd.groove-account":"gac","application\/vnd.groove-help":"ghf","application\/vnd.groove-identity-message":"gim","application\/vnd.groove-injector":"grv","application\/vnd.groove-tool-message":"gtm","application\/vnd.groove-tool-template":"tpl","application\/vnd.groove-vcard":"vcg","application\/vnd.hal+xml":"hal","application\/vnd.handheld-entertainment+xml":"zmm","application\/vnd.hbci":"hbci","application\/vnd.hhe.lesson-player":"les","application\/vnd.hp-hpgl":"hpgl","application\/vnd.hp-hpid":"hpid","application\/vnd.hp-hps":"hps","application\/vnd.hp-jlyt":"jlt","application\/vnd.hp-pcl":"pcl","application\/vnd.hp-pclxl":"pclxl","application\/vnd.hydrostatix.sof-data":"sfd-hdstx","application\/vnd.ibm.minipay":"mpy","application\/vnd.ibm.modcap":"afp","application\/vnd.ibm.rights-management":"irm","application\/vnd.ibm.secure-container":"sc","application\/vnd.iccprofile":"icc","application\/vnd.igloader":"igl","application\/vnd.immervision-ivp":"ivp","application\/vnd.immervision-ivu":"ivu","application\/vnd.insors.igm":"igm","application\/vnd.intercon.formnet":"xpw","application\/vnd.intergeo":"i2g","application\/vnd.intu.qbo":"qbo","application\/vnd.intu.qfx":"qfx","application\/vnd.ipunplugged.rcprofile":"rcprofile","application\/vnd.irepository.package+xml":"irp","application\/vnd.is-xpr":"xpr","application\/vnd.isac.fcs":"fcs","application\/vnd.jam":"jam","application\/vnd.jcp.javame.midlet-rms":"rms","application\/vnd.jisp":"jisp","application\/vnd.joost.joda-archive":"joda","application\/vnd.kahootz":"ktz","application\/vnd.kde.karbon":"karbon","application\/vnd.kde.kchart":"chrt","application\/vnd.kde.kformula":"kfo","application\/vnd.kde.kivio":"flw","application\/vnd.kde.kontour":"kon","application\/vnd.kde.kpresenter":"kpr","application\/vnd.kde.kspread":"ksp","application\/vnd.kde.kword":"kwd","application\/vnd.kenameaapp":"htke","application\/vnd.kidspiration":"kia","application\/vnd.kinar":"kne","application\/vnd.koan":"skp","application\/vnd.kodak-descriptor":"sse","application\/vnd.las.las+xml":"lasxml","application\/vnd.llamagraphics.life-balance.desktop":"lbd","application\/vnd.llamagraphics.life-balance.exchange+xml":"lbe","application\/vnd.lotus-1-2-3":123,"application\/vnd.lotus-approach":"apr","application\/vnd.lotus-freelance":"pre","application\/vnd.lotus-notes":"nsf","application\/vnd.lotus-organizer":"org","application\/vnd.lotus-screencam":"scm","application\/vnd.lotus-wordpro":"lwp","application\/vnd.macports.portpkg":"portpkg","application\/vnd.mcd":"mcd","application\/vnd.medcalcdata":"mc1","application\/vnd.mediastation.cdkey":"cdkey","application\/vnd.mfer":"mwf","application\/vnd.mfmp":"mfm","application\/vnd.micrografx.flo":"flo","application\/vnd.micrografx.igx":"igx","application\/vnd.mif":"mif","application\/vnd.mobius.daf":"daf","application\/vnd.mobius.dis":"dis","application\/vnd.mobius.mbk":"mbk","application\/vnd.mobius.mqy":"mqy","application\/vnd.mobius.msl":"msl","application\/vnd.mobius.plc":"plc","application\/vnd.mobius.txf":"txf","application\/vnd.mophun.application":"mpn","application\/vnd.mophun.certificate":"mpc","application\/vnd.mozilla.xul+xml":"xul","application\/vnd.ms-artgalry":"cil","application\/vnd.ms-cab-compressed":"cab","application\/vnd.ms-excel":"xls","application\/vnd.ms-excel.addin.macroenabled.12":"xlam","application\/vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","application\/vnd.ms-excel.sheet.macroenabled.12":"xlsm","application\/vnd.ms-excel.template.macroenabled.12":"xltm","application\/vnd.ms-fontobject":"eot","application\/vnd.ms-htmlhelp":"chm","application\/vnd.ms-ims":"ims","application\/vnd.ms-lrm":"lrm","application\/vnd.ms-officetheme":"thmx","application\/vnd.ms-pki.seccat":"cat","application\/vnd.ms-pki.stl":"stl","application\/vnd.ms-powerpoint":"ppt","application\/vnd.ms-powerpoint.addin.macroenabled.12":"ppam","application\/vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","application\/vnd.ms-powerpoint.slide.macroenabled.12":"sldm","application\/vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","application\/vnd.ms-powerpoint.template.macroenabled.12":"potm","application\/vnd.ms-project":"mpp","application\/vnd.ms-word.document.macroenabled.12":"docm","application\/vnd.ms-word.template.macroenabled.12":"dotm","application\/vnd.ms-works":"wps","application\/vnd.ms-wpl":"wpl","application\/vnd.ms-xpsdocument":"xps","application\/vnd.mseq":"mseq","application\/vnd.musician":"mus","application\/vnd.muvee.style":"msty","application\/vnd.mynfc":"taglet","application\/vnd.neurolanguage.nlu":"nlu","application\/vnd.nitf":"ntf","application\/vnd.noblenet-directory":"nnd","application\/vnd.noblenet-sealer":"nns","application\/vnd.noblenet-web":"nnw","application\/vnd.nokia.n-gage.data":"ngdat","application\/vnd.nokia.n-gage.symbian.install":"n-gage","application\/vnd.nokia.radio-preset":"rpst","application\/vnd.nokia.radio-presets":"rpss","application\/vnd.novadigm.edm":"edm","application\/vnd.novadigm.edx":"edx","application\/vnd.novadigm.ext":"ext","application\/vnd.oasis.opendocument.chart":"odc","application\/vnd.oasis.opendocument.chart-template":"otc","application\/vnd.oasis.opendocument.database":"odb","application\/vnd.oasis.opendocument.formula":"odf","application\/vnd.oasis.opendocument.formula-template":"odft","application\/vnd.oasis.opendocument.graphics":"odg","application\/vnd.oasis.opendocument.graphics-template":"otg","application\/vnd.oasis.opendocument.image":"odi","application\/vnd.oasis.opendocument.image-template":"oti","application\/vnd.oasis.opendocument.presentation":"odp","application\/vnd.oasis.opendocument.presentation-template":"otp","application\/vnd.oasis.opendocument.spreadsheet":"ods","application\/vnd.oasis.opendocument.spreadsheet-template":"ots","application\/vnd.oasis.opendocument.text":"odt","application\/vnd.oasis.opendocument.text-master":"odm","application\/vnd.oasis.opendocument.text-template":"ott","application\/vnd.oasis.opendocument.text-web":"oth","application\/vnd.olpc-sugar":"xo","application\/vnd.oma.dd2+xml":"dd2","application\/vnd.openofficeorg.extension":"oxt","application\/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application\/vnd.openxmlformats-officedocument.presentationml.slide":"sldx","application\/vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","application\/vnd.openxmlformats-officedocument.presentationml.template":"potx","application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application\/vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","application\/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application\/vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","application\/vnd.osgeo.mapguide.package":"mgp","application\/vnd.osgi.dp":"dp","application\/vnd.osgi.subsystem":"esa","application\/vnd.palm":"pdb","application\/vnd.pawaafile":"paw","application\/vnd.pg.format":"str","application\/vnd.pg.osasli":"ei6","application\/vnd.picsel":"efif","application\/vnd.pmi.widget":"wg","application\/vnd.pocketlearn":"plf","application\/vnd.powerbuilder6":"pbd","application\/vnd.previewsystems.box":"box","application\/vnd.proteus.magazine":"mgz","application\/vnd.publishare-delta-tree":"qps","application\/vnd.pvi.ptid1":"ptid","application\/vnd.quark.quarkxpress":"qxd","application\/vnd.realvnc.bed":"bed","application\/vnd.recordare.musicxml":"mxl","application\/vnd.recordare.musicxml+xml":"musicxml","application\/vnd.rig.cryptonote":"cryptonote","application\/vnd.rim.cod":"cod","application\/vnd.rn-realmedia":"rm","application\/vnd.rn-realmedia-vbr":"rmvb","application\/vnd.route66.link66+xml":"link66","application\/vnd.sailingtracker.track":"st","application\/vnd.seemail":"see","application\/vnd.sema":"sema","application\/vnd.semd":"semd","application\/vnd.semf":"semf","application\/vnd.shana.informed.formdata":"ifm","application\/vnd.shana.informed.formtemplate":"itp","application\/vnd.shana.informed.interchange":"iif","application\/vnd.shana.informed.package":"ipk","application\/vnd.simtech-mindmapper":"twd","application\/vnd.smaf":"mmf","application\/vnd.smart.teacher":"teacher","application\/vnd.solent.sdkm+xml":"sdkm","application\/vnd.spotfire.dxp":"dxp","application\/vnd.spotfire.sfs":"sfs","application\/vnd.stardivision.calc":"sdc","application\/vnd.stardivision.draw":"sda","application\/vnd.stardivision.impress":"sdd","application\/vnd.stardivision.math":"smf","application\/vnd.stardivision.writer":"sdw","application\/vnd.stardivision.writer-global":"sgl","application\/vnd.stepmania.package":"smzip","application\/vnd.stepmania.stepchart":"sm","application\/vnd.sun.xml.calc":"sxc","application\/vnd.sun.xml.calc.template":"stc","application\/vnd.sun.xml.draw":"sxd","application\/vnd.sun.xml.draw.template":"std","application\/vnd.sun.xml.impress":"sxi","application\/vnd.sun.xml.impress.template":"sti","application\/vnd.sun.xml.math":"sxm","application\/vnd.sun.xml.writer":"sxw","application\/vnd.sun.xml.writer.global":"sxg","application\/vnd.sun.xml.writer.template":"stw","application\/vnd.sus-calendar":"sus","application\/vnd.svd":"svd","application\/vnd.symbian.install":"sis","application\/vnd.syncml+xml":"xsm","application\/vnd.syncml.dm+wbxml":"bdm","application\/vnd.syncml.dm+xml":"xdm","application\/vnd.tao.intent-module-archive":"tao","application\/vnd.tcpdump.pcap":"pcap","application\/vnd.tmobile-livetv":"tmo","application\/vnd.trid.tpt":"tpt","application\/vnd.triscape.mxs":"mxs","application\/vnd.trueapp":"tra","application\/vnd.ufdl":"ufd","application\/vnd.uiq.theme":"utz","application\/vnd.umajin":"umj","application\/vnd.unity":"unityweb","application\/vnd.uoml+xml":"uoml","application\/vnd.vcx":"vcx","application\/vnd.visio":"vsd","application\/vnd.visionary":"vis","application\/vnd.vsf":"vsf","application\/vnd.wap.wbxml":"wbxml","application\/vnd.wap.wmlc":"wmlc","application\/vnd.wap.wmlscriptc":"wmlsc","application\/vnd.webturbo":"wtb","application\/vnd.wolfram.player":"nbp","application\/vnd.wordperfect":"wpd","application\/vnd.wqd":"wqd","application\/vnd.wt.stf":"stf","application\/vnd.xara":"xar","application\/vnd.xfdl":"xfdl","application\/vnd.yamaha.hv-dic":"hvd","application\/vnd.yamaha.hv-script":"hvs","application\/vnd.yamaha.hv-voice":"hvp","application\/vnd.yamaha.openscoreformat":"osf","application\/vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","application\/vnd.yamaha.smaf-audio":"saf","application\/vnd.yamaha.smaf-phrase":"spf","application\/vnd.yellowriver-custom-menu":"cmp","application\/vnd.zul":"zir","application\/vnd.zzazz.deck+xml":"zaz","application\/voicexml+xml":"vxml","application\/widget":"wgt","application\/winhlp":"hlp","application\/wsdl+xml":"wsdl","application\/wspolicy+xml":"wspolicy","application\/x-7z-compressed":"7z","application\/x-abiword":"abw","application\/x-ace-compressed":"ace","application\/x-apple-diskimage":"dmg","application\/x-authorware-bin":"aab","application\/x-authorware-map":"aam","application\/x-authorware-seg":"aas","application\/x-bcpio":"bcpio","application\/x-bittorrent":"torrent","application\/x-blorb":"blb","application\/x-bzip":"bz","application\/x-cbr":"cbr","application\/x-cdlink":"vcd","application\/x-cfs-compressed":"cfs","application\/x-chat":"chat","application\/x-chess-pgn":"pgn","application\/x-conference":"nsc","application\/x-cpio":"cpio","application\/x-csh":"csh","application\/x-debian-package":"deb","application\/x-dgc-compressed":"dgc","application\/x-director":"dir","application\/x-doom":"wad","application\/x-dtbncx+xml":"ncx","application\/x-dtbook+xml":"dtb","application\/x-dtbresource+xml":"res","application\/x-dvi":"dvi","application\/x-envoy":"evy","application\/x-eva":"eva","application\/x-font-bdf":"bdf","application\/x-font-ghostscript":"gsf","application\/x-font-linux-psf":"psf","application\/x-font-pcf":"pcf","application\/x-font-snf":"snf","application\/x-font-type1":"pfa","application\/x-freearc":"arc","application\/x-futuresplash":"spl","application\/x-gca-compressed":"gca","application\/x-glulx":"ulx","application\/x-gnumeric":"gnumeric","application\/x-gramps-xml":"gramps","application\/x-gtar":"gtar","application\/x-hdf":"hdf","application\/x-install-instructions":"install","application\/x-iso9660-image":"iso","application\/x-java-jnlp-file":"jnlp","application\/x-latex":"latex","application\/x-lzh-compressed":"lzh","application\/x-mie":"mie","application\/x-mobipocket-ebook":"prc","application\/x-ms-application":"application","application\/x-ms-shortcut":"lnk","application\/x-ms-wmd":"wmd","application\/x-ms-wmz":"wmz","application\/x-ms-xbap":"xbap","application\/x-msaccess":"mdb","application\/x-msbinder":"obd","application\/x-mscardfile":"crd","application\/x-msclip":"clp","application\/x-msdownload":"dll","application\/x-msmediaview":"mvb","application\/x-msmetafile":"wmf","application\/x-msmoney":"mny","application\/x-mspublisher":"pub","application\/x-msschedule":"scd","application\/x-msterminal":"trm","application\/x-mswrite":"wri","application\/x-netcdf":"nc","application\/x-nzb":"nzb","application\/x-pkcs12":"p12","application\/x-pkcs7-certificates":"p7b","application\/x-pkcs7-certreqresp":"p7r","application\/x-research-info-systems":"ris","application\/x-shar":"shar","application\/x-shockwave-flash":"swf","application\/x-silverlight-app":"xap","application\/x-sql":"sql","application\/x-stuffit":"sit","application\/x-stuffitx":"sitx","application\/x-subrip":"srt","application\/x-sv4cpio":"sv4cpio","application\/x-sv4crc":"sv4crc","application\/x-t3vm-image":"t3","application\/x-tads":"gam","application\/x-tar":"tar","application\/x-tcl":"tcl","application\/x-tex":"tex","application\/x-tex-tfm":"tfm","application\/x-texinfo":"texinfo","application\/x-tgif":"obj","application\/x-ustar":"ustar","application\/x-wais-source":"src","application\/x-x509-ca-cert":"der","application\/x-xfig":"fig","application\/x-xliff+xml":"xlf","application\/x-xpinstall":"xpi","application\/x-xz":"xz","application\/x-zmachine":"z1","application\/xaml+xml":"xaml","application\/xcap-diff+xml":"xdf","application\/xenc+xml":"xenc","application\/xhtml+xml":"xhtml","application\/xml":"xsl","application\/xml-dtd":"dtd","application\/xop+xml":"xop","application\/xproc+xml":"xpl","application\/xslt+xml":"xslt","application\/xspf+xml":"xspf","application\/xv+xml":"mxml","application\/yang":"yang","application\/yin+xml":"yin","application\/zip":"zip","audio\/adpcm":"adp","audio\/basic":"au","audio\/midi":"mid","audio\/mp4":"m4a","audio\/mpeg":"mpga","audio\/ogg":"oga","audio\/s3m":"s3m","audio\/silk":"sil","audio\/vnd.dece.audio":"uva","audio\/vnd.digital-winds":"eol","audio\/vnd.dra":"dra","audio\/vnd.dts":"dts","audio\/vnd.dts.hd":"dtshd","audio\/vnd.lucent.voice":"lvp","audio\/vnd.ms-playready.media.pya":"pya","audio\/vnd.nuera.ecelp4800":"ecelp4800","audio\/vnd.nuera.ecelp7470":"ecelp7470","audio\/vnd.nuera.ecelp9600":"ecelp9600","audio\/vnd.rip":"rip","audio\/webm":"weba","audio\/x-aac":"aac","audio\/x-aiff":"aif","audio\/x-caf":"caf","audio\/x-flac":"flac","audio\/x-matroska":"mka","audio\/x-mpegurl":"m3u","audio\/x-ms-wax":"wax","audio\/x-ms-wma":"wma","audio\/x-pn-realaudio":"ram","audio\/x-pn-realaudio-plugin":"rmp","audio\/xm":"xm","chemical\/x-cdx":"cdx","chemical\/x-cif":"cif","chemical\/x-cmdf":"cmdf","chemical\/x-cml":"cml","chemical\/x-csml":"csml","chemical\/x-xyz":"xyz","font\/collection":"ttc","font\/otf":"otf","font\/ttf":"ttf","font\/woff":"woff","font\/woff2":"woff2","image\/cgm":"cgm","image\/g3fax":"g3","image\/gif":"gif","image\/ief":"ief","image\/jpeg":"jpeg","image\/ktx":"ktx","image\/png":"png","image\/prs.btif":"btif","image\/sgi":"sgi","image\/svg+xml":"svg","image\/tiff":"tiff","image\/vnd.adobe.photoshop":"psd","image\/vnd.dece.graphic":"uvi","image\/vnd.djvu":"djvu","image\/vnd.dvb.subtitle":"sub","image\/vnd.dwg":"dwg","image\/vnd.dxf":"dxf","image\/vnd.fastbidsheet":"fbs","image\/vnd.fpx":"fpx","image\/vnd.fst":"fst","image\/vnd.fujixerox.edmics-mmr":"mmr","image\/vnd.fujixerox.edmics-rlc":"rlc","image\/vnd.ms-modi":"mdi","image\/vnd.ms-photo":"wdp","image\/vnd.net-fpx":"npx","image\/vnd.wap.wbmp":"wbmp","image\/vnd.xiff":"xif","image\/webp":"webp","image\/x-3ds":"3ds","image\/x-cmu-raster":"ras","image\/x-cmx":"cmx","image\/x-freehand":"fh","image\/x-icon":"ico","image\/x-mrsid-image":"sid","image\/x-pcx":"pcx","image\/x-pict":"pic","image\/x-portable-anymap":"pnm","image\/x-portable-bitmap":"pbm","image\/x-portable-graymap":"pgm","image\/x-portable-pixmap":"ppm","image\/x-rgb":"rgb","image\/x-xpixmap":"xpm","image\/x-xwindowdump":"xwd","message\/rfc822":"eml","model\/iges":"igs","model\/mesh":"msh","model\/vnd.collada+xml":"dae","model\/vnd.dwf":"dwf","model\/vnd.gdl":"gdl","model\/vnd.gtw":"gtw","model\/vnd.vtu":"vtu","model\/vrml":"wrl","model\/x3d+binary":"x3db","model\/x3d+vrml":"x3dv","model\/x3d+xml":"x3d","text\/cache-manifest":"appcache","text\/calendar":"ics","text\/css":"css","text\/csv":"csv","text\/html":"html","text\/n3":"n3","text\/plain":"txt","text\/prs.lines.tag":"dsc","text\/richtext":"rtx","text\/sgml":"sgml","text\/tab-separated-values":"tsv","text\/troff":"t","text\/turtle":"ttl","text\/uri-list":"uri","text\/vcard":"vcard","text\/vnd.curl":"curl","text\/vnd.curl.dcurl":"dcurl","text\/vnd.curl.mcurl":"mcurl","text\/vnd.curl.scurl":"scurl","text\/vnd.fly":"fly","text\/vnd.fmi.flexstor":"flx","text\/vnd.graphviz":"gv","text\/vnd.in3d.3dml":"3dml","text\/vnd.in3d.spot":"spot","text\/vnd.sun.j2me.app-descriptor":"jad","text\/vnd.wap.wml":"wml","text\/vnd.wap.wmlscript":"wmls","text\/x-asm":"s","text\/x-c":"cc","text\/x-fortran":"f","text\/x-java-source":"java","text\/x-nfo":"nfo","text\/x-opml":"opml","text\/x-pascal":"p","text\/x-setext":"etx","text\/x-sfv":"sfv","text\/x-uuencode":"uu","text\/x-vcalendar":"vcs","text\/x-vcard":"vcf","video\/3gpp":"3gp","video\/3gpp2":"3g2","video\/h261":"h261","video\/h263":"h263","video\/h264":"h264","video\/jpeg":"jpgv","video\/jpm":"jpm","video\/mj2":"mj2","video\/mp4":"mp4","video\/mpeg":"mpeg","video\/quicktime":"qt","video\/vnd.dece.hd":"uvh","video\/vnd.dece.mobile":"uvm","video\/vnd.dece.pd":"uvp","video\/vnd.dece.sd":"uvs","video\/vnd.dece.video":"uvv","video\/vnd.dvb.file":"dvb","video\/vnd.fvt":"fvt","video\/vnd.mpegurl":"mxu","video\/vnd.ms-playready.media.pyv":"pyv","video\/vnd.uvvu.mp4":"uvu","video\/vnd.vivo":"viv","video\/webm":"webm","video\/x-f4v":"f4v","video\/x-fli":"fli","video\/x-flv":"flv","video\/x-m4v":"m4v","video\/x-matroska":"mkv","video\/x-mng":"mng","video\/x-ms-asf":"asf","video\/x-ms-vob":"vob","video\/x-ms-wmx":"wmx","video\/x-ms-wvx":"wvx","video\/x-msvideo":"avi","video\/x-sgi-movie":"movie","video\/x-smv":"smv","x-conference\/x-cooltalk":"ice","text\/x-sql":"sql","image\/x-pixlr-data":"pxd","image\/x-adobe-dng":"dng","image\/x-sketch":"sketch","image\/x-xcf":"xcf","audio\/amr":"amr","application\/plt":"plt","application\/sat":"sat","application\/step":"step","text\/x-httpd-cgi":"cgi","text\/x-asap":"asp","text\/x-jsp":"jsp"};
10556
 
10557
  /*
10558
  * File: /js/elFinder.options.js
@@ -10572,27 +11195,31 @@ elFinder.prototype._options = {
10572
  */
10573
  cdns : {
10574
  // for editor etc.
10575
- ace : 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.2',
10576
- codemirror : 'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0',
10577
- ckeditor : 'https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.11.2',
10578
- ckeditor5 : 'https://cdn.ckeditor.com/ckeditor5/11.2.0',
10579
- tinymce : 'https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.0.0',
10580
  simplemde : 'https://cdnjs.cloudflare.com/ajax/libs/simplemde/1.11.2',
 
10581
  fabric16 : 'https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.6.7',
10582
  tui : 'https://uicdn.toast.com',
10583
  // for quicklook etc.
10584
- hls : 'https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.10.1/hls.min.js',
10585
- dash : 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.9.2/dash.all.min.js',
10586
  flv : 'https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.5.0/flv.min.js',
10587
- prettify : 'https://cdn.jsdelivr.net/gh/google/code-prettify@453bd5f51e61245339b738b1bbdd42d7848722ba/loader/run_prettify.js',
 
10588
  psd : 'https://cdnjs.cloudflare.com/ajax/libs/psd.js/3.2.0/psd.min.js',
10589
  rar : 'https://cdn.jsdelivr.net/gh/nao-pon/rar.js@6cef13ec66dd67992fc7f3ea22f132d770ebaf8b/rar.min.js',
10590
  zlibUnzip : 'https://cdn.jsdelivr.net/gh/imaya/zlib.js@0.3.1/bin/unzip.min.js', // need check unzipFiles() in quicklook.plugins.js when update
10591
  zlibGunzip : 'https://cdn.jsdelivr.net/gh/imaya/zlib.js@0.3.1/bin/gunzip.min.js',
10592
- marked : 'https://cdnjs.cloudflare.com/ajax/libs/marked/0.6.0/marked.min.js',
 
10593
  sparkmd5 : 'https://cdnjs.cloudflare.com/ajax/libs/spark-md5/3.0.0/spark-md5.min.js',
10594
  jssha : 'https://cdnjs.cloudflare.com/ajax/libs/jsSHA/2.3.1/sha.js',
10595
- amr : 'https://cdn.jsdelivr.net/gh/yxl/opencore-amr-js@dcf3d2b5f384a1d9ded2a54e4c137a81747b222b/js/amrnb.js'
 
10596
  },
10597
 
10598
  /**
@@ -10617,6 +11244,13 @@ elFinder.prototype._options = {
10617
  */
10618
  cors : null,
10619
 
 
 
 
 
 
 
 
10620
  /**
10621
  * Maximum number of concurrent connections on request
10622
  *
@@ -10911,8 +11545,10 @@ elFinder.prototype._options = {
10911
  mediaControlsList : '', // e.g. 'nodownload nofullscreen noremoteplayback'
10912
  // Show toolbar of PDF preview (with <embed> tag)
10913
  pdfToolbar : true,
10914
- // Maximum characters length to preview
10915
- textMaxlen : 2000,
 
 
10916
  // quicklook window must be contained in elFinder node on window open (true|false)
10917
  contain : false,
10918
  // preview window into NavDock (0 : undocked | 1 : docked(show) | 2 : docked(hide))
@@ -10935,7 +11571,8 @@ elFinder.prototype._options = {
10935
  // To enable this you need to place ViewerJS on the same server as elFinder and specify that URL in `url`.
10936
  viewerjs : {
10937
  url: '', // Example '/ViewerJS/index.html'
10938
- mimes: ['application/pdf', 'application/vnd.oasis.opendocument.text', 'application/vnd.oasis.opendocument.spreadsheet', 'application/vnd.oasis.opendocument.presentation']
 
10939
  },
10940
  // MIME types to CAD-Files and 3D-Models online viewer on sharecad.org
10941
  // Example ['image/vnd.dwg', 'image/vnd.dxf', 'model/vnd.dwf', 'application/vnd.hp-hpgl', 'application/plt', 'application/step', 'model/iges', 'application/vnd.ms-pki.stl', 'application/sat', 'image/cgm', 'application/x-msmetafile']
@@ -10947,19 +11584,25 @@ elFinder.prototype._options = {
10947
  // Example ['application/msword', 'application/vnd.ms-word', 'application/vnd.ms-excel', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.oasis.opendocument.text', 'application/vnd.oasis.opendocument.spreadsheet', 'application/vnd.oasis.opendocument.presentation']
10948
  // These MIME types override "googleDocsMimes"
10949
  officeOnlineMimes : [],
10950
- // File size (byte) threshold when using the dim command for obtain the image size necessary to image preview
10951
- getDimThreshold : 200000,
 
 
10952
  // MIME-Type regular expression that does not check empty files
10953
  mimeRegexNotEmptyCheck : /^application\/vnd\.google-apps\./
10954
  },
10955
- // "quicklook" command options.
10956
  edit : {
10957
  // dialog width, integer(px) or integer+'%' (example: 650, '80%' ...)
10958
  dialogWidth : void(0),
 
 
10959
  // list of allowed mimetypes to edit of text files
10960
  // if empty - any text files can be edited
10961
  mimes : [],
10962
- // MIME-types of text file to make as empty files
 
 
10963
  makeTextMimes : ['text/plain', 'text/css', 'text/html'],
10964
  // Use the editor stored in the browser
10965
  // This value allowd overwrite with user preferences
@@ -11076,9 +11719,6 @@ elFinder.prototype._options = {
11076
  pixo: {
11077
  apikey: ''
11078
  },
11079
- // Specify the Creative Cloud API key when using Creative SDK image editor of Creative Cloud.
11080
- // You can get the API key at https://console.adobe.io/.
11081
- creativeCloudApiKey : '',
11082
  // Browsing manager URL for CKEditor, TinyMCE
11083
  // Uses self location with the empty value or not defined.
11084
  //managerUrl : 'elfinder.html'
@@ -11087,8 +11727,8 @@ elFinder.prototype._options = {
11087
  ckeditor: {},
11088
  // CKEditor 5 editor options
11089
  ckeditor5: {
11090
- // builds mode - 'classic', 'inline' or 'balloon'
11091
- mode: 'inline'
11092
  },
11093
  // TinyMCE editor options
11094
  tinymce : {},
@@ -11115,7 +11755,20 @@ elFinder.prototype._options = {
11115
  // "SearchMime" is implemented in default
11116
  SearchMime : { // The key is search type that send to the connector
11117
  name : 'btnMime', // Button text to be processed in i18n()
11118
- title : 'searchMime' // Button title to be processed in i18n()
 
 
 
 
 
 
 
 
 
 
 
 
 
11119
  }
11120
  }
11121
  },
@@ -11132,6 +11785,11 @@ elFinder.prototype._options = {
11132
  // Array of hash algorisms to show on info dialog
11133
  // These name are 'md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512', 'shake128' and 'shake256'
11134
  showHashAlgorisms : ['md5', 'sha256'],
 
 
 
 
 
11135
  custom : {
11136
  // /**
11137
  // * Example of custom info `desc`
@@ -11210,6 +11868,9 @@ elFinder.prototype._options = {
11210
  // Maximum number of items that can be placed into the Trash at one time
11211
  toTrashMaxItems : 1000
11212
  },
 
 
 
11213
  help : {
11214
  // Tabs to show
11215
  view : ['about', 'shortcuts', 'help', 'integrations', 'debug'],
@@ -11233,6 +11894,17 @@ elFinder.prototype._options = {
11233
  }
11234
  },
11235
 
 
 
 
 
 
 
 
 
 
 
 
11236
  /**
11237
  * Callback for prepare boot up
11238
  *
@@ -11396,6 +12068,9 @@ elFinder.prototype._options = {
11396
 
11397
  // fm.UA types array to show item select checkboxes e.g. ['All'] or ['Mobile'] etc. default: ['Touch']
11398
  showSelectCheckboxUA : ['Touch'],
 
 
 
11399
 
11400
  // file info columns displayed
11401
  listView : {
@@ -11651,7 +12326,7 @@ elFinder.prototype._options = {
11651
  * @default {position: {}, width : null} - Apply CSS definition
11652
  * position: CSS object | null (null: position center & middle)
11653
  */
11654
- notifyDialog : {position: {}, width : null},
11655
 
11656
  /**
11657
  * Dialog contained in the elFinder node
@@ -11780,10 +12455,11 @@ elFinder.prototype._options = {
11780
  * @type Object
11781
  */
11782
  cookie : {
11783
- expires : 30,
11784
- domain : '',
11785
- path : '/',
11786
- secure : false
 
11787
  },
11788
 
11789
  /**
@@ -11845,8 +12521,14 @@ elFinder.prototype._options = {
11845
  *
11846
  * @type Array|String('auto')|Boolean(true|false)
11847
  */
11848
- // debug : true
11849
- debug : ['error', 'warning', 'event-destroy']
 
 
 
 
 
 
11850
  };
11851
 
11852
 
@@ -12478,13 +13160,13 @@ elFinder.prototype.resources = {
12478
  tabsactive : 'ui-tabs-active ui-state-active'
12479
  },
12480
  tpl : {
12481
- perms : '<span class="elfinder-perms"/>',
12482
- lock : '<span class="elfinder-lock"/>',
12483
- symlink : '<span class="elfinder-symlink"/>',
12484
- navicon : '<span class="elfinder-nav-icon"/>',
12485
- navspinner : '<span class="elfinder-spinner elfinder-navbar-spinner"/>',
12486
- navdir : '<div class="elfinder-navbar-wrapper{root}"><span id="{id}" class="ui-corner-all elfinder-navbar-dir {cssclass}"{title}><span class="elfinder-navbar-arrow"/><span class="elfinder-navbar-icon" {style}/>{symlink}{permissions}{name}</span><div class="elfinder-navbar-subtree" style="display:none"/></div>',
12487
- placedir : '<div class="elfinder-navbar-wrapper"><span id="{id}" class="ui-corner-all elfinder-navbar-dir {cssclass}"{title}><span class="elfinder-navbar-arrow"/><span class="elfinder-navbar-icon" {style}/>{symlink}{permissions}{name}</span><div class="elfinder-navbar-subtree" style="display:none"/></div>'
12488
 
12489
  },
12490
  // mimes.text will be overwritten with connector config if `textMimes` is included in initial response
@@ -12541,14 +13223,16 @@ elFinder.prototype.resources = {
12541
  if (!overlay.is(':hidden')) {
12542
  overlay.elfinderoverlay('hide').off('click close', cancel);
12543
  }
12544
- pnode.removeClass('ui-front')
12545
- .css('position', '')
12546
- .off('unselect.'+fm.namespace, unselect);
12547
- if (tarea) {
12548
- nnode && nnode.css('max-height', '');
12549
- } else if (!tree) {
12550
- pnode.css('width', '')
12551
- .parent('td').css('overflow', '');
 
 
12552
  }
12553
  }, colwidth,
12554
  dfrd = $.Deferred()
@@ -12612,7 +13296,7 @@ elFinder.prototype.resources = {
12612
  }
12613
  }
12614
  },
12615
- input = $(tarea? '<textarea/>' : '<input type="text"/>')
12616
  .on('keyup text', function(){
12617
  if (tarea) {
12618
  this.style.height = '1px';
@@ -12958,7 +13642,7 @@ $.fn.dialogelfinder = function(opts, opts2) {
12958
  * English translation
12959
  * @author Troex Nevelin <troex@fury.scancode.ru>
12960
  * @author Naoki Sawada <hypweb+elfinder@gmail.com>
12961
- * @version 2019-02-18
12962
  */
12963
  // elfinder.en.js is integrated into elfinder.(full|min).js by jake build
12964
  if (typeof elFinder === 'function' && elFinder.prototype.i18) {
@@ -13114,7 +13798,6 @@ if (typeof elFinder === 'function' && elFinder.prototype.i18) {
13114
  'cmdselectinvert': 'Invert selection', // from v2.1.28 added 15.08.2017
13115
  'cmdopennew' : 'Open in new window', // from v2.1.38 added 3.4.2018
13116
  'cmdhide' : 'Hide (Preference)', // from v2.1.41 added 24.7.2018
13117
- 'cmdshare' : 'Share',
13118
 
13119
  /*********************************** buttons ***********************************/
13120
  'btnClose' : 'Close',
@@ -13253,6 +13936,7 @@ if (typeof elFinder === 'function' && elFinder.prototype.i18) {
13253
  'confirmNonUTF8' : 'Character encoding of this file couldn\'t be detected. It need to temporarily convert to UTF-8 for editting.<br/>Please select character encoding of this file.', // from v2.1.19 added 28.11.2016
13254
  'confirmNotSave' : 'It has been modified.<br/>Losing work if you do not save changes.', // from v2.1 added 15.7.2015
13255
  'confirmTrash' : 'Are you sure you want to move items to trash bin?', //from v2.1.24 added 29.4.2017
 
13256
  'apllyAll' : 'Apply to all',
13257
  'name' : 'Name',
13258
  'size' : 'Size',
@@ -13392,6 +14076,7 @@ if (typeof elFinder === 'function' && elFinder.prototype.i18) {
13392
  'clearBrowserData': 'Initialize the settings saved in this browser', // from v2.1.26 added 28.6.2017
13393
  'toolbarPref' : 'Toolbar settings', // from v2.1.27 added 2.8.2017
13394
  'charsLeft' : '... $1 chars left.', // from v2.1.29 added 30.8.2017
 
13395
  'sum' : 'Sum', // from v2.1.29 added 28.9.2017
13396
  'roughFileSize' : 'Rough file size', // from v2.1.30 added 2.11.2017
13397
  'autoFocusDialog' : 'Focus on the element of dialog with mouseover', // from v2.1.30 added 2.11.2017
@@ -13553,7 +14238,7 @@ $.fn.elfinderbutton = function(cmd) {
13553
  prvCname = cmd.className? cmd.className : cmd.name,
13554
  button = $(this).addClass('ui-state-default elfinder-button')
13555
  .attr('title', cmd.title)
13556
- .append('<span class="elfinder-button-icon elfinder-button-icon-' + prvCname + '"/>', text)
13557
  .on('mouseenter mouseleave', function(e) { !button.hasClass(disabled) && button[e.type == 'mouseleave' ? 'removeClass' : 'addClass'](hover);})
13558
  .on('click', function(e) {
13559
  if (!button.hasClass(disabled)) {
@@ -13609,7 +14294,7 @@ $.fn.elfinderbutton = function(cmd) {
13609
  if (Array.isArray(cmd.variants)) {
13610
  button.addClass('elfinder-menubutton');
13611
 
13612
- menu = $('<div class="ui-front ui-widget ui-widget-content elfinder-button-menu elfinder-button-' + prvCname + '-menu ui-corner-all"/>')
13613
  .hide()
13614
  .appendTo(fm.getUI())
13615
  .on('mouseenter mouseleave', '.'+item, function() { $(this).toggleClass(hover); })
@@ -13777,7 +14462,7 @@ $.fn.elfindercontextmenu = function(fm) {
13777
  ltr = fm.direction === 'ltr',
13778
  subpos = ltr? 'left' : 'right',
13779
  types = Object.assign({}, fm.options.contextmenu),
13780
- tpl = '<div class="'+cmItem+'{className}"><span class="elfinder-button-icon {icon} elfinder-contextmenu-icon"{style}/><span>{label}</span></div>',
13781
  item = function(label, icon, callback, opts) {
13782
  var className = '',
13783
  style = '',
@@ -14080,10 +14765,10 @@ $.fn.elfindercontextmenu = function(fm) {
14080
  }
14081
  node = item(cmd.title, cmd.className? cmd.className : cmd.name, function(){}, cmd.contextmenuOpts);
14082
 
14083
- submenu = $('<div class="ui-front ui-corner-all elfinder-contextmenu-sub"/>')
14084
  .hide()
14085
  .css('max-height', fm.getUI().height() - 30)
14086
- .appendTo(node.append('<span class="elfinder-contextmenu-arrow"/>'));
14087
 
14088
  hover = function(show){
14089
  if (! show) {
@@ -14209,11 +14894,11 @@ $.fn.elfindercontextmenu = function(fm) {
14209
  });
14210
 
14211
  $.each(cmd.variants, function(i, variant) {
14212
- var item = variant === '|' ? '<div class="elfinder-contextmenu-separator"/>' :
14213
  $('<div class="'+cmItem+' '+smItem+'"><span>'+variant[1]+'</span></div>').data('exec', variant[0]),
14214
  iconClass, icon;
14215
  if (typeof variant[2] !== 'undefined') {
14216
- icon = $('<span/>').addClass('elfinder-button-icon elfinder-contextmenu-icon');
14217
  if (! /\//.test(variant[2])) {
14218
  icon.addClass('elfinder-button-icon-'+variant[2]);
14219
  } else {
@@ -14232,7 +14917,7 @@ $.fn.elfindercontextmenu = function(fm) {
14232
  }
14233
  }, cmd.contextmenuOpts);
14234
  if (cmd.extra && cmd.extra.node) {
14235
- $('<span class="elfinder-button-icon elfinder-button-icon-'+(cmd.extra.icon || '')+' '+exIcon+'"/>')
14236
  .append(cmd.extra.node).appendTo(node);
14237
  $(cmd.extra.node).trigger('ready', {targets: targets});
14238
  } else {
@@ -14245,7 +14930,7 @@ $.fn.elfindercontextmenu = function(fm) {
14245
  }
14246
 
14247
  if (insSep) {
14248
- menu.append('<div class="elfinder-contextmenu-separator"/>');
14249
  }
14250
  menu.append(node);
14251
  sep = true;
@@ -14273,7 +14958,7 @@ $.fn.elfindercontextmenu = function(fm) {
14273
  var node;
14274
 
14275
  if (data === '|') {
14276
- menu.append('<div class="elfinder-contextmenu-separator"/>');
14277
  } else if (data.label && typeof data.callback == 'function') {
14278
  node = item(data.label, data.icon, function() {
14279
  if (! menu.data('draged')) {
@@ -14574,7 +15259,7 @@ $.fn.elfindercwd = function(fm, options) {
14574
  * @type Function
14575
  */
14576
  makeTemplateRow = function() {
14577
- return '<tr id="{id}" class="'+clFile+' {permsclass} {dirclass}" title="{tooltip}"{css}><td class="elfinder-col-name"><div class="elfinder-cwd-file-wrapper"><span class="elfinder-cwd-icon {mime}"{style}/>{marker}<span class="elfinder-cwd-filename">{name}</span></div>'+selectCheckbox+'</td>'+customColsBuild()+'</tr>';
14578
  },
14579
 
14580
  selectCheckbox = ($.map(options.showSelectCheckboxUA, function(t) {return (fm.UA[t] || t.match(/^all$/i))? true : null;}).length)? '<div class="elfinder-cwd-select"><input type="checkbox" class="'+clSelChk+'"></div>' : '',
@@ -14594,7 +15279,7 @@ $.fn.elfindercwd = function(fm, options) {
14594
  * @type Object
14595
  **/
14596
  templates = {
14597
- icon : '<div id="{id}" class="'+clFile+' {permsclass} {dirclass} ui-corner-all" title="{tooltip}"><div class="elfinder-cwd-file-wrapper ui-corner-all"><div class="elfinder-cwd-icon {mime} ui-corner-all" unselectable="on"{style}/>{marker}</div><div class="elfinder-cwd-filename" title="{nametitle}">{name}</div>'+selectCheckbox+'</div>',
14598
  row : ''
14599
  },
14600
 
@@ -14707,7 +15392,7 @@ $.fn.elfindercwd = function(fm, options) {
14707
  if ($('#elfinderAddBadgeStyle'+fm.namespace).length) {
14708
  $('#elfinderAddBadgeStyle'+fm.namespace).remove();
14709
  }
14710
- addBadgeStyleSheet = $('<style id="addBadgeStyle'+fm.namespace+'"/>').insertBefore($('head').children(':first')).get(0).sheet || null;
14711
  }
14712
  if (addBadgeStyleSheet) {
14713
  mime = mime.toLowerCase();
@@ -15205,17 +15890,21 @@ $.fn.elfindercwd = function(fm, options) {
15205
  oldSchoolItem = $(itemhtml($.extend(true, {}, pdir, {name : '..', i18 : '..', mime : 'directory'})))
15206
  .addClass('elfinder-cwd-parent')
15207
  .on('dblclick', function() {
15208
- var hash = fm.cwdId2Hash(this.id);
15209
- fm.trigger('select', {selected : [hash]}).exec('open', hash);
15210
  });
15211
  (list ? oldSchoolItem.children('td:first') : oldSchoolItem).children('.elfinder-cwd-select').remove();
15212
- (list ? cwd.find('tbody') : cwd).prepend(oldSchoolItem);
 
 
 
 
15213
  fm.draggingUiHelper && fm.draggingUiHelper.data('refreshPositions', 1);
15214
  }
15215
  };
15216
  if (pdir) {
15217
  set(pdir);
15218
  } else {
 
15219
  if (fm.getUI('tree').length) {
15220
  fm.one('parents', function() {
15221
  set(fm.file(phash) || null);
@@ -15252,7 +15941,7 @@ $.fn.elfindercwd = function(fm, options) {
15252
  // created document fragment for jQuery >= 1.12, 2.2, 3.0
15253
  // see Studio-42/elFinder#1544 @ github
15254
  docFlag = $.htmlPrefilter? true : false,
15255
- tempDom = docFlag? $(document.createDocumentFragment()) : $('<div/>'),
15256
  go = function(o){
15257
  var over = o || null,
15258
  html = [],
@@ -15405,15 +16094,15 @@ $.fn.elfindercwd = function(fm, options) {
15405
  hheight = htr.outerHeight(true);
15406
  cwd.css('margin-top', hheight - parseInt(table.css('padding-top')));
15407
  if (cssSticky) {
15408
- tableHeader = $('<div class="elfinder-table-header-sticky"/>').addClass(cwd.attr('class')).append($('<table/>').append(thead));
15409
  cwd.after(tableHeader);
15410
  wrapper.on('resize.fixheader', function(e) {
15411
  e.stopPropagation();
15412
  fixTableHeader({fitWidth: true});
15413
  });
15414
  } else {
15415
- base = $('<div/>').addClass(cwd.attr('class')).append($('<table/>').append(thead));
15416
- tableHeader = $('<div/>').addClass(wrapper.attr('class') + ' elfinder-cwd-fixheader')
15417
  .removeClass('ui-droppable native-droppable')
15418
  .css(wrapper.position())
15419
  .css({ height: hheight, width: cwd.outerWidth() })
@@ -15767,7 +16456,7 @@ $.fn.elfindercwd = function(fm, options) {
15767
  // created document fragment for jQuery >= 1.12, 2.2, 3.0
15768
  // see Studio-42/elFinder#1544 @ github
15769
  docFlag = $.htmlPrefilter? true : false,
15770
- tempDom = docFlag? $(document.createDocumentFragment()) : $('<div/>'),
15771
  file, hash, node, nodes, ndx, stmb;
15772
 
15773
  if (l > showFiles) {
@@ -15821,6 +16510,9 @@ $.fn.elfindercwd = function(fm, options) {
15821
  bottomMarkerShow(place);
15822
  if (Object.keys(atmb).length) {
15823
  Object.assign(bufferExt.attachTmbs, atmb);
 
 
 
15824
  }
15825
  }
15826
  },
@@ -16034,7 +16726,7 @@ $.fn.elfindercwd = function(fm, options) {
16034
  }
16035
 
16036
  if (list) {
16037
- cwd.html('<table><thead/><tbody/></table>');
16038
  thtr = $('<tr class="ui-state-default"><td class="elfinder-cwd-view-th-name">'+fm.getColumnName('name')+'</td>'+customColsNameBuild()+'</tr>');
16039
  cwd.find('thead').hide().append(thtr).find('td:first').append(selectAllCheckbox);
16040
  if ($.fn.sortable) {
@@ -16205,7 +16897,11 @@ $.fn.elfindercwd = function(fm, options) {
16205
  }
16206
  if (e.shiftKey && (pl || nl)) {
16207
  sib = pl ? p.prevUntil('#'+prev.attr('id')) : p.nextUntil('#'+next.attr('id'));
16208
- sib.add(p).trigger(evtSelect);
 
 
 
 
16209
  } else if (e.ctrlKey || e.metaKey) {
16210
  p.trigger(p.hasClass(clSelected) ? evtUnselect : evtSelect);
16211
  } else {
@@ -16325,9 +17021,9 @@ $.fn.elfindercwd = function(fm, options) {
16325
  $this.on('mousedown', function(e) {
16326
  // shiftKey or altKey + drag start for HTML5 native drag function
16327
  // Note: can no use shiftKey with the Google Chrome
16328
- var metaKey = e.shiftKey || e.altKey,
16329
  disable = false;
16330
- if (metaKey && !fm.UA.IE && cwd.data('selectable')) {
16331
  // destroy jQuery-ui selectable while trigger native drag
16332
  cwd.selectable('disable').selectable('destroy').removeData('selectable');
16333
  requestAnimationFrame(function(){
@@ -16346,7 +17042,8 @@ $.fn.elfindercwd = function(fm, options) {
16346
  }
16347
  }
16348
  if (disable) {
16349
- $this.draggable('option', 'disabled', true);
 
16350
  } else {
16351
  $this.draggable('option', 'disabled', false)
16352
  .removeAttr('draggable')
@@ -16366,7 +17063,7 @@ $.fn.elfindercwd = function(fm, options) {
16366
  files = [],
16367
  icon = function(f) {
16368
  var mime = f.mime, i, tmb = fm.tmb(f);
16369
- i = '<div class="elfinder-cwd-icon elfinder-cwd-icon-drag '+fm.mime2class(mime)+' ui-corner-all"/>';
16370
  if (tmb) {
16371
  i = $(i).addClass(tmb.className).css('background-image', "url('"+tmb.url+"')").get(0).outerHTML;
16372
  }
@@ -16631,7 +17328,7 @@ $.fn.elfindercwd = function(fm, options) {
16631
  }
16632
  }
16633
  }),
16634
- wrapper = $('<div class="elfinder-cwd-wrapper"/>')
16635
  // make cwd itself droppable for folders from nav panel
16636
  .droppable(Object.assign({}, droppable, {autoDisable: false}))
16637
  .on('contextmenu.'+fm.namespace, wrapperContextMenu.contextmenu)
@@ -16665,10 +17362,10 @@ $.fn.elfindercwd = function(fm, options) {
16665
 
16666
  selectAllCheckbox = selectCheckbox? $('<div class="elfinder-cwd-selectall"><input type="checkbox"/></div>')
16667
  .attr('title', fm.i18n('selectall'))
16668
- .on('touchstart mousedown click', function(e) {
16669
  e.stopPropagation();
16670
  e.preventDefault();
16671
- if ($(this).data('pending') || e.type === 'click') {
16672
  return false;
16673
  }
16674
  selectAllCheckbox.data('pending', true);
@@ -16721,10 +17418,10 @@ $.fn.elfindercwd = function(fm, options) {
16721
  wz = parent.children('.elfinder-workzone').append(wrapper.append(this).append(bottomMarker)),
16722
 
16723
  // message board
16724
- mBoard = $('<div class="elfinder-cwd-message-board"/>').insertAfter(cwd),
16725
 
16726
  // Volume expires
16727
- vExpires = $('<div class="elfinder-cwd-expires" />'),
16728
 
16729
  vExpiresTm,
16730
 
@@ -16761,7 +17458,7 @@ $.fn.elfindercwd = function(fm, options) {
16761
 
16762
  // IE < 11 not support CSS `pointer-events: none`
16763
  if (!fm.UA.ltIE10) {
16764
- mBoard.append($('<div class="elfinder-cwd-trash" />').html(fm.i18n('volume_Trash')))
16765
  .append(vExpires);
16766
  }
16767
 
@@ -16847,7 +17544,7 @@ $.fn.elfindercwd = function(fm, options) {
16847
  fm.one('open', function() {
16848
  sheet && fm.zIndex && sheet.insertRule('.ui-selectable-helper{z-index:'+fm.zIndex+';}', i++);
16849
  });
16850
- base = $('<div style="position:absolute"/>');
16851
  node = fm.getUI();
16852
  node.on('resize', function(e, data) {
16853
  var offset;
@@ -16964,29 +17661,53 @@ $.fn.elfindercwd = function(fm, options) {
16964
  query = e.data.query;
16965
  })
16966
  .bind('incsearchstart', function(e) {
16967
- selectedFiles = {};
16968
- fm.lazy(function() {
16969
- // incremental search
16970
- var regex, q, fst = '';
16971
- q = query = e.data.query || '';
16972
- if (q) {
16973
- if (q.substr(0,1) === '/') {
16974
- q = q.substr(1);
16975
- fst = '^';
16976
- }
16977
- regex = new RegExp(fst + q.replace(/([\\*\;\.\?\[\]\{\}\(\)\^\$\-\|])/g, '\\$1'), 'i');
16978
- incHashes = $.grep(cwdHashes, function(hash) {
16979
- var file = fm.file(hash);
16980
- return (file && (file.name.match(regex) || (file.i18 && file.i18.match(regex))))? true : false;
16981
- });
16982
- fm.trigger('incsearch', { hashes: incHashes, query: q })
16983
- .searchStatus.ininc = true;
16984
- content();
16985
- fm.autoSync('stop');
16986
- } else {
16987
- fm.trigger('incsearchend');
16988
- }
16989
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16990
  })
16991
  .bind('incsearchend', function(e) {
16992
  query = '';
@@ -17011,7 +17732,7 @@ $.fn.elfindercwd = function(fm, options) {
17011
  });
17012
  })
17013
  .bind('viewchange', function() {
17014
- var l = fm.storage('view') == 'list',
17015
  allsel = cwd.hasClass('elfinder-cwd-allselected');
17016
 
17017
  if (l != list) {
@@ -17387,6 +18108,8 @@ $.fn.elfinderdialog = function(opts, fm) {
17387
  if (opts === 'destroy') {
17388
  dialog.remove();
17389
  fm.trigger('dialogremoved', {dialog: dialog});
 
 
17390
  }
17391
  } else if (opts === 'toTop') {
17392
  dialog.trigger('totop');
@@ -17444,13 +18167,13 @@ $.fn.elfinderdialog = function(opts, fm) {
17444
  clmodal = 'elfinder-dialog-modal',
17445
  id = parseInt(Math.random()*1000000),
17446
  titlebar = $('<div class="ui-dialog-titlebar ui-widget-header ui-corner-top ui-helper-clearfix"><span class="elfinder-dialog-title">'+opts.title+'</span></div>'),
17447
- buttonset = $('<div class="ui-dialog-buttonset"/>'),
17448
- buttonpane = $('<div class=" ui-helper-clearfix ui-dialog-buttonpane ui-widget-content"/>')
17449
  .append(buttonset),
17450
  btnWidth = 0,
17451
  btnCnt = 0,
17452
  tabstops = $(),
17453
- evCover = $('<div style="width:100%;height:100%;position:absolute;top:0px;left:0px;"/>').hide(),
17454
  numberToTel = function() {
17455
  if (opts.optimizeNumber) {
17456
  dialog.find('input[type=number]').each(function() {
@@ -17506,8 +18229,8 @@ $.fn.elfinderdialog = function(opts, fm) {
17506
  },
17507
  headerBtns = {
17508
  close: function() {
17509
- titlebar.prepend($('<span class="ui-widget-header ui-dialog-titlebar-close ui-corner-all elfinder-titlebar-button"><span class="ui-icon ui-icon-closethick"/></span>')
17510
- .on('mousedown', function(e) {
17511
  e.preventDefault();
17512
  e.stopPropagation();
17513
  self.elfinderdialog('close');
@@ -17544,8 +18267,8 @@ $.fn.elfinderdialog = function(opts, fm) {
17544
  dialog.trigger('resize', {init: true});
17545
  }
17546
  });
17547
- titlebar.prepend($('<span class="ui-widget-header ui-corner-all elfinder-titlebar-button elfinder-titlebar-full"><span class="ui-icon ui-icon-plusthick"/></span>')
17548
- .on('mousedown', function(e) {
17549
  var elm = $(this);
17550
  e.preventDefault();
17551
  e.stopPropagation();
@@ -17563,19 +18286,30 @@ $.fn.elfinderdialog = function(opts, fm) {
17563
  minimize: function() {
17564
  var btn, mnode, doffset;
17565
  if (opts.allowMinimize) {
17566
- btn = $('<span class="ui-widget-header ui-corner-all elfinder-titlebar-button elfinder-titlebar-minimize"><span class="ui-icon ui-icon-minusthick"/></span>')
17567
- .on('mousedown', function(e) {
17568
  var $this = $(this),
17569
  tray = fm.getUI('bottomtray'),
17570
  dumStyle = { width: 70, height: 24 },
17571
- dum = $('<div/>').css(dumStyle).addClass(dialog.get(0).className + ' elfinder-dialog-minimized'),
 
 
 
 
 
17572
  pos = {};
17573
 
17574
  e.preventDefault();
17575
  e.stopPropagation();
17576
  if (!dialog.data('minimized')) {
17577
  // minimize
17578
- doffset = dialog.data('minimized', true).position();
 
 
 
 
 
 
17579
  mnode = dialog.clone().on('mousedown', function() {
17580
  $this.trigger('mousedown');
17581
  }).removeClass('ui-draggable ui-resizable elfinder-frontmost');
@@ -17589,9 +18323,7 @@ $.fn.elfinderdialog = function(opts, fm) {
17589
  mnode.find('.ui-dialog-titlebar-close').on('mousedown', function(e) {
17590
  e.stopPropagation();
17591
  e.preventDefault();
17592
- mnode.remove();
17593
- dialog.show();
17594
- self.elfinderdialog('close');
17595
  });
17596
  mnode.animate(pos, function() {
17597
  mnode.attr('style', '')
@@ -17625,7 +18357,7 @@ $.fn.elfinderdialog = function(opts, fm) {
17625
  }
17626
  }
17627
  },
17628
- dialog = $('<div class="ui-front ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable std42-dialog touch-punch '+cldialog+' '+opts.cssClass+'"/>')
17629
  .hide()
17630
  .append(self)
17631
  .appendTo(elfNode)
@@ -17852,7 +18584,7 @@ $.fn.elfinderdialog = function(opts, fm) {
17852
  css && dialog.css(css);
17853
  })
17854
  .on('resize', function(e, data) {
17855
- var oh = 0, init = data && data.init, h, minH;
17856
  if ((data && (data.minimize || data.maxmize)) || dialog.data('minimized')) {
17857
  return;
17858
  }
@@ -17861,12 +18593,29 @@ $.fn.elfinderdialog = function(opts, fm) {
17861
  dialog.children('.ui-widget-header,.ui-dialog-buttonpane').each(function() {
17862
  oh += $(this).outerHeight(true);
17863
  });
 
 
 
 
17864
  if (!init && syncSize.enabled && !e.originalEvent && !dialog.hasClass('elfinder-maximized')) {
17865
- h = Math.min(syncSize.defaultSize.height, Math.max(parseInt(dialog.css('max-height')), parseInt(dialog.css('min-height'))) - oh - dialog.data('margin-y'));
 
 
 
 
 
 
 
 
 
 
 
 
 
17866
  } else {
17867
  h = dialog.height() - oh - dialog.data('margin-y');
17868
  }
17869
- self.height(h);
17870
  if (init) {
17871
  return;
17872
  }
@@ -18197,7 +18946,7 @@ $.fn.elfindernavbar = function(fm, opts) {
18197
 
18198
  fm.bind('load', function() {
18199
  if (nav.children().length) {
18200
- swipeHandle = $('<div class="elfinder-navbar-swipe-handle"/>').hide().appendTo(wz);
18201
  if (swipeHandle.css('pointer-events') !== 'none') {
18202
  swipeHandle.remove();
18203
  swipeHandle = null;
@@ -18278,7 +19027,7 @@ $.fn.elfindernavbar = function(fm, opts) {
18278
  nav.width(setWidth);
18279
  } else {
18280
  if (fm.UA.Mobile) {
18281
- fm.one('cssloaded', function() {
18282
  var set = function() {
18283
  setWidth = nav.parent().width() / 2;
18284
  if (nav.data('defWidth') > setWidth) {
@@ -18333,7 +19082,7 @@ $.fn.elfindernavdock = function(fm, opts) {
18333
  self.css('overflow', ovf);
18334
  }
18335
  },
18336
- handle = $('<div class="ui-front ui-resizable-handle ui-resizable-n"/>').appendTo(self),
18337
  sizeSyncs = {},
18338
  resizeFn = [],
18339
  initMaxHeight = (parseInt(opts.initMaxHeight) || 50) / 100,
@@ -18561,7 +19310,7 @@ $.fn.elfinderpath = function(fm, options) {
18561
  place = 'statusbar',
18562
  clHover= fm.res('class', 'hover'),
18563
  prefix = 'path' + (elFinder.prototype.uniqueid? elFinder.prototype.uniqueid : '') + '-',
18564
- wzbase = $('<div class="ui-widget-header ui-helper-clearfix elfinder-workzone-path"/>'),
18565
  path = $(this).addClass('elfinder-path').html('&nbsp;')
18566
  .on('mousedown', 'span.elfinder-path-dir', function(e) {
18567
  var hash = $(this).attr('id').substr(prefix.length);
@@ -18576,7 +19325,7 @@ $.fn.elfinderpath = function(fm, options) {
18576
  }
18577
  })
18578
  .prependTo(fm.getUI('statusbar').show()),
18579
- roots = $('<div class="elfinder-path-roots"/>').on('click', function(e) {
18580
  e.stopPropagation();
18581
  e.preventDefault();
18582
 
@@ -18601,7 +19350,7 @@ $.fn.elfinderpath = function(fm, options) {
18601
  x: e.pageX,
18602
  y: e.pageY
18603
  });
18604
- }).append('<span class="elfinder-button-icon elfinder-button-icon-menu" />').appendTo(wzbase),
18605
  render = function(cwd) {
18606
  var dirs = [],
18607
  names = [];
@@ -19026,7 +19775,7 @@ $.fn.elfinderplaces = function(fm, opts) {
19026
  save();
19027
  },
19028
  // sort button
19029
- sortBtn = $('<span class="elfinder-button-icon elfinder-button-icon-sort elfinder-places-root-icon" title="'+fm.i18n('cmdsort')+'"/>')
19030
  .hide()
19031
  .on('click', function(e) {
19032
  e.stopPropagation();
@@ -19204,8 +19953,8 @@ $.fn.elfinderplaces = function(fm, opts) {
19204
 
19205
  dir.children().removeClass('ui-state-hover');
19206
 
19207
- return $('<div class="ui-widget elfinder-place-drag elfinder-'+fm.direction+'"/>')
19208
- .append($('<div class="elfinder-navbar"/>').show().append(dir.clone()));
19209
 
19210
  },
19211
  stop : function(e, ui) {
@@ -19337,11 +20086,11 @@ $.fn.elfinderplaces = function(fm, opts) {
19337
  exists[hash] = file;
19338
  if (!fm.files().hasOwnProperty(file.hash)) {
19339
  // update cache
19340
- fm.trigger('tree', {tree: [file]});
19341
  }
19342
  });
19343
  $.each(dirs, function(h, f) {
19344
- if (f.notfound === Boolean(exists[h])) {
19345
  if ((f.phash === cwd && ev.type !== 'netmount') || (exists[h] && exists[h].mime !== 'directory')) {
19346
  if (remove(h)) {
19347
  updated = true;
@@ -19512,7 +20261,10 @@ $.fn.elfindersearchbutton = function(cmd) {
19512
  input.data('inctm', setTimeout(function() {
19513
  var val = input.val();
19514
  if (val.length === 0 || val.length >= isopts.minlen) {
19515
- (incVal !== val) && fm.trigger('incsearchstart', { query: val });
 
 
 
19516
  incVal = val;
19517
  if (val === '' && fm.searchStatus.state > 1 && fm.searchStatus.query) {
19518
  input.val(fm.searchStatus.query).trigger('select');
@@ -19543,7 +20295,7 @@ $.fn.elfindersearchbutton = function(cmd) {
19543
  }
19544
  }
19545
 
19546
- $('<span class="ui-icon ui-icon-search" title="'+cmd.title+'"/>')
19547
  .appendTo(button)
19548
  .on('mousedown', function(e) {
19549
  e.stopPropagation();
@@ -19555,7 +20307,7 @@ $.fn.elfindersearchbutton = function(cmd) {
19555
  }
19556
  });
19557
 
19558
- $('<span class="ui-icon ui-icon-close"/>')
19559
  .appendTo(button)
19560
  .on('mousedown', function(e) {
19561
  e.stopPropagation();
@@ -19591,15 +20343,15 @@ $.fn.elfindersearchbutton = function(cmd) {
19591
  });
19592
  })
19593
  .one('open', function() {
19594
- opts = (fm.api < 2.1)? null : $('<div class="ui-front ui-widget ui-widget-content elfinder-button-menu elfinder-button-search-menu ui-corner-all"/>')
19595
  .append(
19596
- $('<div class="buttonset"/>')
19597
  .append(
19598
  $('<input id="'+id('SearchFromCwd')+'" name="serchfrom" type="radio" checked="checked"/><label for="'+id('SearchFromCwd')+'">'+fm.i18n('btnCwd')+'</label>'),
19599
  $('<input id="'+id('SearchFromVol')+'" name="serchfrom" type="radio"/><label for="'+id('SearchFromVol')+'">'+fm.i18n('btnVolume')+'</label>'),
19600
  $('<input id="'+id('SearchFromAll')+'" name="serchfrom" type="radio"/><label for="'+id('SearchFromAll')+'">'+fm.i18n('btnAll')+'</label>')
19601
  ),
19602
- $('<div class="buttonset elfinder-search-type"/>')
19603
  .append(
19604
  $('<input id="'+id('SearchName')+'" name="serchcol" type="radio" checked="checked" value="SearchName"/><label for="'+id('SearchName')+'">'+fm.i18n('btnFileName')+'</label>')
19605
  )
@@ -19730,7 +20482,7 @@ $.fn.elfindersortbutton = function(cmd) {
19730
  text = $('<span class="elfinder-button-text">'+cmd.title+'</span>'),
19731
  button = $(this).addClass('ui-state-default elfinder-button elfinder-menubutton elfiner-button-'+name)
19732
  .attr('title', cmd.title)
19733
- .append('<span class="elfinder-button-icon elfinder-button-icon-'+name+'"/>', text)
19734
  .on('mouseenter mouseleave', function(e) { !button.hasClass(disabled) && button.toggleClass(hover, e.type === 'mouseenter'); })
19735
  .on('click', function(e) {
19736
  if (!button.hasClass(disabled)) {
@@ -19745,7 +20497,7 @@ $.fn.elfindersortbutton = function(cmd) {
19745
  }
19746
  }),
19747
  hide = function() { fm.toHide(menu); },
19748
- menu = $('<div class="ui-front ui-widget ui-widget-content elfinder-button-menu elfinder-button-sort-menu ui-corner-all"/>')
19749
  .hide()
19750
  .appendTo(fm.getUI())
19751
  .on('mouseenter mouseleave', '.'+item, function(e) { $(this).toggleClass(hover, e.type === 'mouseenter'); })
@@ -19775,14 +20527,14 @@ $.fn.elfindersortbutton = function(cmd) {
19775
  text.hide();
19776
 
19777
  $.each(fm.sortRules, function(name, value) {
19778
- menu.append($('<div class="'+item+'" rel="'+name+'"><span class="ui-icon ui-icon-arrowthick-1-n"/><span class="ui-icon ui-icon-arrowthick-1-s"/>'+fm.i18n('sort'+name)+'</div>').data('type', name));
19779
  });
19780
 
19781
  menu.children().on('click', function(e) {
19782
  cmd.exec([], $(this).removeClass(hover).attr('rel'));
19783
  });
19784
 
19785
- $('<div class="'+item+' '+item+'-separated elfinder-sort-ext elfinder-sort-stick"><span class="ui-icon ui-icon-check"/>'+fm.i18n('sortFoldersFirst')+'</div>')
19786
  .appendTo(menu)
19787
  .on('click', function() {
19788
  cmd.exec([], 'stick');
@@ -19790,7 +20542,7 @@ $.fn.elfindersortbutton = function(cmd) {
19790
 
19791
  fm.one('init', function() {
19792
  if (fm.ui.tree && fm.options.sortAlsoTreeview !== null) {
19793
- $('<div class="'+item+' '+item+'-separated elfinder-sort-ext elfinder-sort-tree"><span class="ui-icon ui-icon-check"/>'+fm.i18n('sortAlsoTreeview')+'</div>')
19794
  .appendTo(menu)
19795
  .on('click', function() {
19796
  cmd.exec([], 'tree');
@@ -19831,7 +20583,7 @@ $.fn.elfindersortbutton = function(cmd) {
19831
  $.fn.elfinderstat = function(fm) {
19832
  return this.each(function() {
19833
  var size = $(this).addClass('elfinder-stat-size'),
19834
- sel = $('<div class="elfinder-stat-selected"/>')
19835
  .on('click', 'a', function(e) {
19836
  var hash = $(this).data('hash');
19837
  e.preventDefault();
@@ -20017,7 +20769,7 @@ $.fn.elfindertoast = function(opts, fm) {
20017
  rmTm = setTimeout(rm, opts.timeOut);
20018
  }
20019
  }
20020
- }).hide().addClass('toast-' + opts.mode).append($('<div class="elfinder-toast-msg"/>').html(opts.msg.replace(/%([a-zA-Z0-9]+)%/g, function(m, m1) {
20021
  return fm.i18n(m1);
20022
  })));
20023
 
@@ -20027,8 +20779,8 @@ $.fn.elfindertoast = function(opts, fm) {
20027
 
20028
  if (opts.button) {
20029
  self.append(
20030
- $('<button class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"/>')
20031
- .append($('<span class="ui-button-text"/>').text(fm.i18n(opts.button.text)))
20032
  .on('mouseenter mouseleave', function(e) {
20033
  $(this).toggleClass('ui-state-hover', e.type == 'mouseenter');
20034
  })
@@ -20081,14 +20833,14 @@ $.fn.elfindertoolbar = function(fm, opts) {
20081
  l = panels.length;
20082
  while (l--) {
20083
  if (panels[l]) {
20084
- panel = $('<div class="ui-widget-content ui-corner-all elfinder-buttonset"/>');
20085
  i = panels[l].length;
20086
  while (i--) {
20087
  name = panels[l][i];
20088
  if ((!disabled || !disabled[name]) && (cmd = commands[name])) {
20089
  button = 'elfinder'+cmd.options.ui;
20090
  if (! buttons[name] && $.fn[button]) {
20091
- buttons[name] = $('<div/>')[button](cmd);
20092
  }
20093
  if (buttons[name]) {
20094
  buttons[name].children('.elfinder-button-text')[textLabel? 'show' : 'hide']();
@@ -20098,7 +20850,7 @@ $.fn.elfindertoolbar = function(fm, opts) {
20098
  }
20099
 
20100
  panel.children().length && self.prepend(panel);
20101
- panel.children(':gt(0)').before('<span class="ui-widget-content elfinder-toolbar-button-separator"/>');
20102
 
20103
  }
20104
  }
@@ -20107,10 +20859,10 @@ $.fn.elfindertoolbar = function(fm, opts) {
20107
  //cmdPref.state = !self.children().length? 0 : -1;
20108
  if (options.showPreferenceButton === 'always' || (!self.children().length && options.showPreferenceButton === 'auto')) {
20109
  //cmdPref.state = 0;
20110
- panel = $('<div class="ui-widget-content ui-corner-all elfinder-buttonset"/>');
20111
  name = 'preference';
20112
  button = 'elfinder'+cmd.options.ui;
20113
- buttons[name] = $('<div/>')[button](cmdPref);
20114
  buttons[name].children('.elfinder-button-text')[textLabel? 'show' : 'hide']();
20115
  panel.prepend(buttons[name]);
20116
  self.append(panel);
@@ -20276,7 +21028,7 @@ $.fn.elfindertoolbar = function(fm, opts) {
20276
  btn = buttons[from];
20277
  if (btn) {
20278
  if (! buttons[to] && $.fn[button]) {
20279
- buttons[to] = $('<div/>')[button](cmd);
20280
  if (buttons[to]) {
20281
  buttons[to].children('.elfinder-button-text')[textLabel? 'show' : 'hide']();
20282
  if (cmd.extendsCmd) {
@@ -20318,7 +21070,7 @@ $.fn.elfindertoolbar = function(fm, opts) {
20318
  }
20319
 
20320
  fm.bind('load', function() {
20321
- swipeHandle = $('<div class="elfinder-toolbar-swipe-handle"/>').hide().appendTo(fm.getUI());
20322
  if (swipeHandle.css('pointer-events') !== 'none') {
20323
  swipeHandle.remove();
20324
  swipeHandle = null;
@@ -20979,7 +21731,7 @@ $.fn.elfindertree = function(fm, opts) {
20979
  }
20980
  });
20981
  if (prev > -1) {
20982
- prevBtn = $('<button class="elfinder-navbar-pager elfinder-navbar-pager-prev"/>')
20983
  .text(fm.i18n('btnPrevious', page, total))
20984
  .button({
20985
  icons: {
@@ -20995,7 +21747,7 @@ $.fn.elfindertree = function(fm, opts) {
20995
  prevBtn = $();
20996
  }
20997
  if (next) {
20998
- nextBtn = $('<button class="elfinder-navbar-pager elfinder-navbar-pager-next"/>')
20999
  .text(fm.i18n('btnNext', page + 2, total))
21000
  .button({
21001
  icons: {
@@ -21037,7 +21789,7 @@ $.fn.elfindertree = function(fm, opts) {
21037
  render();
21038
  },
21039
  dir, html, parent, sibling, init, atonce = {}, updates = [], base, node,
21040
- firstVol = true; // check for netmount volume
21041
 
21042
  while (i--) {
21043
  dir = dirs[i];
@@ -21048,7 +21800,12 @@ $.fn.elfindertree = function(fm, opts) {
21048
  done[dir.hash] = true;
21049
 
21050
  if ((parent = findSubtree(dir.phash)).length) {
21051
- if (dir.phash && ((init = !parent.children().length) || parent.hasClass('elfinder-navbar-hasmore') || (sibling = findSibling(parent, dir)).length)) {
 
 
 
 
 
21052
  if (init) {
21053
  if (!atonce[dir.phash]) {
21054
  atonce[dir.phash] = [];
@@ -21065,8 +21822,11 @@ $.fn.elfindertree = function(fm, opts) {
21065
  }
21066
  } else {
21067
  node = itemhtml(dir);
21068
- parent[firstVol || dir.phash ? 'append' : 'prepend'](node);
21069
- firstVol = false;
 
 
 
21070
  if (!dir.phash || dir.isroot) {
21071
  base = fm.navHash2Elm(dir.hash).parent();
21072
  }
@@ -21941,7 +22701,7 @@ $.fn.elfinderuploadbutton = function(cmd) {
21941
  var fm = cmd.fm,
21942
  button = $(this).elfinderbutton(cmd)
21943
  .off('click'),
21944
- form = $('<form/>').appendTo(button),
21945
  input = $('<input type="file" multiple="true" title="'+cmd.fm.i18n('selectForUpload')+'"/>')
21946
  .on('change', function() {
21947
  var _input = $(this);
@@ -22223,7 +22983,7 @@ elFinder.prototype.commands.chmod = function() {
22223
  };
22224
 
22225
  this.tpl = {
22226
- main : '<div class="ui-helper-clearfix elfinder-info-title"><span class="elfinder-cwd-icon {class} ui-corner-all"/>{title}</div>'
22227
  +'{dataTable}',
22228
  itemTitle : '<strong>{name}</strong><span id="elfinder-info-kind">{kind}</span>',
22229
  groupTitle : '<strong>{items}: {num}</strong>',
@@ -22724,7 +23484,7 @@ elFinder.prototype.commands.download = function() {
22724
  var link = file.url || fm.url(file.hash);
22725
  return {
22726
  icon: 'link',
22727
- node: $('<a/>')
22728
  .attr({href: link, target: '_blank', title: fm.i18n('link')})
22729
  .text(file.name)
22730
  .on('mousedown click touchstart touchmove touchend contextmenu', function(e){
@@ -22736,7 +23496,7 @@ elFinder.prototype.commands.download = function() {
22736
  if (dt) {
22737
  var icon = function(f) {
22738
  var mime = f.mime, i, tmb = fm.tmb(f);
22739
- i = '<div class="elfinder-cwd-icon '+fm.mime2class(mime)+' ui-corner-all"/>';
22740
  if (tmb) {
22741
  i = $(i).addClass(tmb.className).css('background-image', "url('"+tmb.url+"')").get(0).outerHTML;
22742
  }
@@ -22769,7 +23529,7 @@ elFinder.prototype.commands.download = function() {
22769
  var node;
22770
  self.extra = {
22771
  icon: 'link',
22772
- node: $('<a/>')
22773
  .attr({href: '#', title: fm.i18n('getLink'), draggable: 'false'})
22774
  .text(file.name)
22775
  .on('click touchstart', function(e){
@@ -22810,7 +23570,7 @@ elFinder.prototype.commands.download = function() {
22810
  if (fm.api >= 2.1012) {
22811
  czipdl = fm.getCommand('zipdl');
22812
  }
22813
- dlntf = fm.api > 2.1038 && !fm.isCORS;
22814
  });
22815
 
22816
  this.exec = function(select) {
@@ -22861,29 +23621,9 @@ elFinder.prototype.commands.download = function() {
22861
  preventDefault : true
22862
  }).done(function(e) {
22863
  var zipdl, dialog, btn = {}, dllink, form, iframe, m,
22864
- uniq = 'dlw' + (+new Date());
22865
- if (e.error) {
22866
- fm.error(e.error);
22867
- dfd.resolve();
22868
- } else if (e.zipdl) {
22869
- zipdl = e.zipdl;
22870
- if (dlName) {
22871
- m = fm.splitFileExtention(zipdl.name || '');
22872
- dlName += m[1]? ('.' + m[1]) : '.zip';
22873
- } else {
22874
- dlName = zipdl.name;
22875
- }
22876
- if ((html5dl && (!fm.UA.Safari || fm.isSameOrigin(fm.options.url))) || linkdl) {
22877
- url = fm.options.url + (fm.options.url.indexOf('?') === -1 ? '?' : '&')
22878
- + 'cmd=zipdl&download=1';
22879
- $.each([hashes[0], zipdl.file, dlName, zipdl.mime], function(key, val) {
22880
- url += '&targets%5B%5D='+encodeURIComponent(val);
22881
- });
22882
- $.each(fm.customData, function(key, val) {
22883
- url += '&'+encodeURIComponent(key)+'='+encodeURIComponent(val);
22884
- });
22885
- url += '&'+encodeURIComponent(dlName);
22886
- dllink = $('<a/>')
22887
  .attr('href', url)
22888
  .attr('download', fm.escape(dlName))
22889
  .on('click', function() {
@@ -22909,8 +23649,42 @@ elFinder.prototype.commands.download = function() {
22909
  click(dllink.hide().appendTo('body').get(0));
22910
  dllink.remove();
22911
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22912
  } else {
22913
- form = $('<form action="'+fm.options.url+'" method="post" target="'+uniq+'" style="display:none"/>')
22914
  .append('<input type="hidden" name="cmd" value="zipdl"/>')
22915
  .append('<input type="hidden" name="download" value="1"/>');
22916
  $.each([hashes[0], zipdl.file, dlName, zipdl.mime], function(key, val) {
@@ -22971,7 +23745,7 @@ elFinder.prototype.commands.download = function() {
22971
  }
22972
  },
22973
  reqids = [],
22974
- link, html5dl, fileCnt, clickEv, cid, ntftm, reqid;
22975
 
22976
  if (!files.length) {
22977
  return dfrd.reject();
@@ -23008,65 +23782,78 @@ elFinder.prototype.commands.download = function() {
23008
  return dfrd;
23009
  } else {
23010
  reqids = [];
23011
- for (i = 0; i < files.length; i++) {
23012
- url = fm.openUrl(files[i].hash, true);
23013
- if (dlntf && url.substr(0, fm.options.url.length) === fm.options.url) {
23014
- reqid = fm.getRequestId();
23015
- reqids.push(reqid);
23016
- url += '&cpath=' + cpath + '&reqid=' + reqid;
23017
- ntftm = setTimeout(function() {
23018
- fm.notify({
23019
- type : 'download',
23020
- cnt : 1,
23021
- cancel : (fm.UA.IE || fm.UA.Edge)? void(0) : function() {
23022
- if (reqids.length) {
23023
- $.each(reqids, function() {
23024
- fm.request({
23025
- data: {
23026
- cmd: 'abort',
23027
- id: this
23028
- },
23029
- preventDefault: true
 
 
23030
  });
23031
- });
 
23032
  }
23033
- reqids = [];
23034
- }
23035
- });
23036
- }, fm.notifyDelay);
23037
- checkCookie(reqid);
23038
- }
23039
- if (html5dl && (!fm.UA.Safari || fm.isSameOrigin(url))) {
23040
- click(link.attr('href', url)
23041
- .attr('download', fm.escape(files[i].name))
23042
- .get(0)
23043
- );
23044
- } else {
23045
- if (fm.UA.Mobile) {
23046
- setTimeout(function(){
23047
- if (! window.open(url)) {
23048
- fm.error('errPopup');
23049
- ntftm && cleaerTimeout(ntftm);
23050
- closeNotify();
23051
- }
23052
- }, 100);
23053
  } else {
23054
- iframes += '<iframe class="downloader" id="downloader-' + files[i].hash+'" style="display:none" src="'+url+'"/>';
 
 
 
 
 
 
 
 
 
 
23055
  }
23056
  }
23057
- }
23058
- link.remove();
23059
- $(iframes)
23060
- .appendTo('body')
23061
- .ready(function() {
23062
- setTimeout(function() {
23063
- $(iframes).each(function() {
23064
- $('#' + $(this).attr('id')).remove();
23065
- });
23066
- }, 20000 + (10000 * i)); // give 20 sec + 10 sec for each file to be saved
 
 
 
 
 
 
 
 
 
 
 
23067
  });
23068
- fm.trigger('download', {files : files});
23069
- return dfrd.resolve();
23070
  }
23071
  };
23072
 
@@ -23154,7 +23941,7 @@ elFinder.prototype.commands.edit = function() {
23154
  return str.replace(/\s+$/, '');
23155
  },
23156
  getEncSelect = function(heads) {
23157
- var sel = $('<select class="ui-corner-all"/>'),
23158
  hval;
23159
  if (heads) {
23160
  $.each(heads, function(i, head) {
@@ -23168,13 +23955,27 @@ elFinder.prototype.commands.edit = function() {
23168
  return sel;
23169
  },
23170
  getDlgWidth = function() {
23171
- var m, width;
 
23172
  if (typeof self.options.dialogWidth === 'string' && (m = self.options.dialogWidth.match(/(\d+)%/))) {
23173
- width = parseInt(fm.getUI().width() * (m[1] / 100));
23174
  } else {
23175
  width = parseInt(self.options.dialogWidth || 650);
23176
  }
23177
- return Math.min(width, $(window).width());
 
 
 
 
 
 
 
 
 
 
 
 
 
23178
  },
23179
 
23180
  /**
@@ -23238,7 +24039,7 @@ elFinder.prototype.commands.edit = function() {
23238
  * @param String content file content
23239
  * @return $.Deferred
23240
  **/
23241
- dialog = function(id, file, content, encoding, editor) {
23242
 
23243
  var dfrd = $.Deferred(),
23244
  _loaded = false,
@@ -23252,12 +24053,20 @@ elFinder.prototype.commands.edit = function() {
23252
  }
23253
  return true;
23254
  },
 
 
 
 
 
 
 
 
23255
  save = function() {
23256
  var encord = selEncoding? selEncoding.val():void(0),
23257
  saveDfd = $.Deferred().fail(function(err) {
23258
  dialogNode.show().find('button.elfinder-btncnt-0,button.elfinder-btncnt-1').hide();
23259
  }),
23260
- conf, res;
23261
  if (!loaded()) {
23262
  return saveDfd.resolve();
23263
  }
@@ -23271,7 +24080,20 @@ elFinder.prototype.commands.edit = function() {
23271
  res = getContent();
23272
  setOld(res);
23273
  if (res.promise) {
23274
- res.done(function(data) {
 
 
 
 
 
 
 
 
 
 
 
 
 
23275
  dfrd.notifyWith(ta, [encord, ta.data('hash'), old, saveDfd]);
23276
  }).fail(function(err) {
23277
  saveDfd.reject(err);
@@ -23292,6 +24114,7 @@ elFinder.prototype.commands.edit = function() {
23292
  },
23293
  savecl = function() {
23294
  if (!loaded()) { return; }
 
23295
  save().done(function() {
23296
  _loaded = false;
23297
  dialogNode.show();
@@ -23300,12 +24123,11 @@ elFinder.prototype.commands.edit = function() {
23300
  dialogNode.show();
23301
  err && fm.error(err);
23302
  });
23303
- dialogNode.hide();
23304
  },
23305
  saveAs = function() {
23306
  if (!loaded()) { return; }
23307
  var prevOld = old,
23308
- phash = fm.file(file.phash)? file.phash : fm.cwd().hash,
23309
  fail = function(err) {
23310
  dialogs.addClass(clsEditing).fadeIn(function() {
23311
  err && fm.error(err);
@@ -23321,14 +24143,21 @@ elFinder.prototype.commands.edit = function() {
23321
  self.data = {target : phash};
23322
  $.proxy(fm.res('mixin', 'make'), self)()
23323
  .done(function(data) {
 
23324
  if (data.added && data.added.length) {
 
23325
  ta.data('hash', data.added[0].hash);
23326
  save().done(function() {
23327
  _loaded = false;
23328
  dialogNode.show();
23329
  cancel();
23330
  dialogs.fadeIn();
23331
- }).fail(fail);
 
 
 
 
 
23332
  } else {
23333
  fail();
23334
  }
@@ -23348,6 +24177,7 @@ elFinder.prototype.commands.edit = function() {
23348
  fm.trigger('unselectfiles', { files: [ file.hash ] });
23349
  },
23350
  reqOpen = null,
 
23351
  dialogs = fm.getUI().children('.' + self.dialogClass + ':visible');
23352
  if (dialogNode.is(':hidden')) {
23353
  dialogs = dialogs.add(dialogNode);
@@ -23358,10 +24188,18 @@ elFinder.prototype.commands.edit = function() {
23358
 
23359
  if (fm.searchStatus.state < 2 && phash !== fm.cwd().hash) {
23360
  reqOpen = fm.exec('open', [phash], {thash: phash});
 
 
23361
  }
23362
 
23363
- $.when([reqOpen]).done(function() {
23364
- reqOpen? fm.one('cwdrender', make) : make();
 
 
 
 
 
 
23365
  }).fail(fail);
23366
  },
23367
  changed = function() {
@@ -23377,7 +24215,10 @@ elFinder.prototype.commands.edit = function() {
23377
  fm.notify({
23378
  type : 'chkcontent',
23379
  cnt : 1,
23380
- hideCnt: true
 
 
 
23381
  });
23382
  }, 100);
23383
  res.always(function() {
@@ -23386,7 +24227,7 @@ elFinder.prototype.commands.edit = function() {
23386
  }).done(function(d) {
23387
  dfd.resolve(old !== d);
23388
  }).fail(function(err) {
23389
- dfd.resolve(err || true);
23390
  });
23391
  } else {
23392
  dfd.resolve(old !== res);
@@ -23396,6 +24237,7 @@ elFinder.prototype.commands.edit = function() {
23396
  opts = {
23397
  title : fm.escape(file.name),
23398
  width : getDlgWidth(),
 
23399
  buttons : {},
23400
  cssClass : clsEditing,
23401
  maxWidth : 'window',
@@ -23487,7 +24329,7 @@ elFinder.prototype.commands.edit = function() {
23487
  error && fm.error(error);
23488
  ta.elfinderdialog('destroy');
23489
  return;
23490
- });
23491
  } else {
23492
  _loaded = true;
23493
  if (loadRes && (typeof loadRes === 'string' || Array.isArray(loadRes))) {
@@ -23501,6 +24343,7 @@ elFinder.prototype.commands.edit = function() {
23501
  requestAnimationFrame(function() {
23502
  dialogNode.trigger('resize');
23503
  });
 
23504
  }
23505
  conf = ta.editor.confObj;
23506
  if (conf.info && conf.info.syncInterval) {
@@ -23520,7 +24363,11 @@ elFinder.prototype.commands.edit = function() {
23520
  }
23521
  },
23522
  getContent = function() {
23523
- return ta.getContent.call(ta, ta[0]);
 
 
 
 
23524
  },
23525
  setOld = function(res) {
23526
  if (res && res.promise) {
@@ -23539,6 +24386,17 @@ elFinder.prototype.commands.edit = function() {
23539
  }, interval);
23540
  }
23541
  },
 
 
 
 
 
 
 
 
 
 
 
23542
  saveAsFile = {},
23543
  ta, old, dialogNode, selEncoding, extEditor, maxW, syncInterval;
23544
 
@@ -23573,22 +24431,10 @@ elFinder.prototype.commands.edit = function() {
23573
  return dfrd.reject('errEditorNotFound');
23574
  }
23575
  (function() {
23576
- var stateChange = function() {
23577
- if (selEncoding) {
23578
- changed().done(function(change) {
23579
- if (change) {
23580
- selEncoding.attr('title', fm.i18n('saveAsEncoding')).addClass('elfinder-edit-changed');
23581
- } else {
23582
- selEncoding.attr('title', fm.i18n('openAsEncoding')).removeClass('elfinder-edit-changed');
23583
- }
23584
- });
23585
- }
23586
- };
23587
-
23588
  ta = $('<textarea class="elfinder-file-edit" rows="20" id="'+id+'-ta"></textarea>')
23589
  .on('input propertychange', stateChange);
23590
 
23591
- if (!ta.editor || !ta.editor.info || ta.editor.info.useTextAreaEvent) {
23592
  ta.on('keydown', function(e) {
23593
  var code = e.keyCode,
23594
  value, start;
@@ -23623,37 +24469,42 @@ elFinder.prototype.commands.edit = function() {
23623
  }
23624
 
23625
  ta.initEditArea = function(id, file, content) {
23626
- var heads = (encoding && encoding !== 'unknown')? [{value: encoding}] : [],
23627
- wfake = $('<select/>').hide(),
23628
- setSelW = function(init) {
23629
- init && wfake.appendTo(selEncoding.parent());
23630
- wfake.empty().append($('<option/>').text(selEncoding.val()));
23631
- selEncoding.width(wfake.width());
23632
- };
23633
  // ta.hide() for performance tune. Need ta.show() in `load()` if use textarea node.
23634
  ta.hide().val(content);
23635
- if (content === '' || ! encoding || encoding !== 'UTF-8') {
23636
- heads.push({value: 'UTF-8'});
23637
- }
23638
- selEncoding = getEncSelect(heads).on('touchstart', function(e) {
23639
- // for touch punch event handler
23640
- e.stopPropagation();
23641
- }).on('change', function() {
23642
- // reload to change encoding if not edited
23643
- changed().done(function(change) {
23644
- if (! change && getContent() !== '') {
23645
- cancel();
23646
- edit(file, selEncoding.val(), editor).fail(function(err) { err && fm.error(err); });
23647
- }
23648
- });
23649
- setSelW();
23650
- }).on('mouseover', stateChange);
23651
- ta.parent().next().prepend($('<div class="ui-dialog-buttonset elfinder-edit-extras"/>').append(selEncoding));
23652
- setSelW(true);
23653
  };
23654
  })();
23655
  }
23656
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23657
  ta.data('hash', file.hash);
23658
 
23659
  if (extEditor) {
@@ -23718,7 +24569,7 @@ elFinder.prototype.commands.edit = function() {
23718
  });
23719
 
23720
  // care to viewport scale change with mobile devices
23721
- maxW = (fm.options.dialogContained? elfNode : $(window)).width();
23722
  (dialogNode.width() > maxW) && dialogNode.width(maxW);
23723
 
23724
  return dfrd.promise();
@@ -23778,6 +24629,10 @@ elFinder.prototype.commands.edit = function() {
23778
  req.resolve({});
23779
  }
23780
  } else {
 
 
 
 
23781
  req = fm.request({
23782
  data : {cmd : 'get', target : hash, conv : conv, _t : file.ts},
23783
  options : {type: 'get', cache : true},
@@ -23804,7 +24659,7 @@ elFinder.prototype.commands.edit = function() {
23804
  },
23805
  optionsCallback : function(options) {
23806
  options.create = function() {
23807
- var base = $('<div class="elfinder-dialog-confirm-encoding"/>'),
23808
  head = {value: data.doconv},
23809
  detected;
23810
 
@@ -23830,7 +24685,7 @@ elFinder.prototype.commands.edit = function() {
23830
  }
23831
  }
23832
  }
23833
- dialog(id, file, data.content, data.encoding, editor)
23834
  .done(function(data) {
23835
  dfrd.resolve(data);
23836
  })
@@ -23877,6 +24732,10 @@ elFinder.prototype.commands.edit = function() {
23877
  .fail(function(error) {
23878
  var err = fm.parseError(error);
23879
  err = Array.isArray(err)? err[0] : err;
 
 
 
 
23880
  (err !== 'errConvUTF8') && fm.sync();
23881
  dfrd.reject(error);
23882
  });
@@ -23969,7 +24828,7 @@ elFinder.prototype.commands.edit = function() {
23969
  var name;
23970
  if ((cnt === 1 || !editor.info.single)
23971
  && ((!editor.info || !editor.info.converter)? file.write : cwdWrite)
23972
- && (file.size > 0 || (!editor.info.converter && (editor.info.canMakeEmpty || (editor.info.canMakeEmpty !== false && fm.mimeIsText(file.mime)))))
23973
  && (!editor.info.maxSize || file.size <= editor.info.maxSize)
23974
  && mimeMatch(file.mime, editor.mimes || null)
23975
  && extMatch(file.name, editor.exts || null)
@@ -24033,7 +24892,9 @@ elFinder.prototype.commands.edit = function() {
24033
  },
24034
  stored;
24035
 
24036
-
 
 
24037
  this.shortcuts = [{
24038
  pattern : 'ctrl+e'
24039
  }];
@@ -24109,7 +24970,7 @@ elFinder.prototype.commands.edit = function() {
24109
  fm.trigger('helpIntegration', Object.assign({cmd: 'edit'}, editor.info.integrate));
24110
  }
24111
  if (editor.info.canMakeEmpty) {
24112
- fm.trigger('canMakeEmptyFile', {mimes: editor.mimes});
24113
  }
24114
  }
24115
  });
@@ -24157,7 +25018,7 @@ elFinder.prototype.commands.edit = function() {
24157
  single(editor);
24158
  self.extra = {
24159
  icon: 'menu',
24160
- node: $('<span/>')
24161
  .attr({title: fm.i18n('select')})
24162
  .on('click touchstart', function(e){
24163
  if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) {
@@ -24188,7 +25049,7 @@ elFinder.prototype.commands.edit = function() {
24188
  .bind('canMakeEmptyFile', function(e) {
24189
  if (e.data && e.data.resetTexts) {
24190
  var defs = fm.arrayFlip(self.options.makeTextMimes || ['text/plain']),
24191
- hides = fm.storage('mkfileHides') || {};
24192
 
24193
  $.each((fm.storage('mkfileTextMimes') || {}), function(mime, type) {
24194
  if (!defs[mime]) {
@@ -24266,7 +25127,7 @@ elFinder.prototype.commands.edit = function() {
24266
 
24267
  getEditor().done(function(editor) {
24268
  while ((file = files.shift())) {
24269
- list.push(edit(file, void(0), editor).fail(function(error) {
24270
  error && fm.error(error);
24271
  }));
24272
  }
@@ -24287,6 +25148,10 @@ elFinder.prototype.commands.edit = function() {
24287
  return dfrd;
24288
  };
24289
 
 
 
 
 
24290
  };
24291
 
24292
 
@@ -24672,10 +25537,13 @@ elFinder.prototype.commands.fullscreen = function() {
24672
  var self = this,
24673
  fm = this.fm,
24674
  update = function(e, data) {
 
24675
  e.preventDefault();
24676
  e.stopPropagation();
24677
  if (data && data.fullscreen) {
24678
- self.update(void(0), (data.fullscreen === 'on'));
 
 
24679
  }
24680
  };
24681
 
@@ -24901,7 +25769,7 @@ elFinder.prototype.commands.fullscreen = function() {
24901
  html = ['<div class="ui-tabs ui-widget ui-widget-content ui-corner-all elfinder-help">',
24902
  '<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-top">'],
24903
  stpl = '<div class="elfinder-help-shortcut"><div class="elfinder-help-shortcut-pattern">{pattern}</div> {descrip}</div>',
24904
- sep = '<div class="elfinder-help-separator"/>',
24905
  selfUrl = $('base').length? document.location.href.replace(/#.*$/, '') : '',
24906
  clTabActive = fm.res('class', 'tabsactive'),
24907
 
@@ -24916,7 +25784,7 @@ elFinder.prototype.commands.fullscreen = function() {
24916
  },
24917
 
24918
  about = function() {
24919
- html.push('<div id="'+fm.namespace+'-help-about" class="ui-tabs-panel ui-widget-content ui-corner-bottom"><div class="elfinder-help-logo"/>');
24920
  html.push('<h3>elFinder</h3>');
24921
  html.push('<div class="'+prim+'">'+fm.i18n('webfm')+'</div>');
24922
  html.push('<div class="'+sec+'">'+fm.i18n('ver')+': '+fm.version+'</div>');
@@ -24952,7 +25820,7 @@ elFinder.prototype.commands.fullscreen = function() {
24952
 
24953
  html.push(sep);
24954
  html.push('<div class="'+lic+'">Licence: 3-clauses BSD Licence</div>');
24955
- html.push('<div class="'+lic+'">Copyright © 2009-2019, Studio 42</div>');
24956
  html.push('<div class="'+lic+'">„ …'+fm.i18n('dontforget')+' ”</div>');
24957
  html.push('</div>');
24958
  },
@@ -24986,7 +25854,7 @@ elFinder.prototype.commands.fullscreen = function() {
24986
  useInteg = false,
24987
  integrations = function() {
24988
  useInteg = true;
24989
- html.push('<div id="'+fm.namespace+'-help-integrations" class="ui-tabs-panel ui-widget-content ui-corner-bottom"/>');
24990
  },
24991
  useDebug = false,
24992
  debug = function() {
@@ -25000,15 +25868,15 @@ elFinder.prototype.commands.fullscreen = function() {
25000
  debugRender = function() {
25001
  var render = function(elm, obj) {
25002
  $.each(obj, function(k, v) {
25003
- elm.append($('<dt/>').text(k));
25004
  if (typeof v === 'undefined') {
25005
- elm.append($('<dd/>').append($('<span/>').text('undfined')));
25006
  } else if (typeof v === 'object' && !v) {
25007
- elm.append($('<dd/>').append($('<span/>').text('null')));
25008
  } else if (typeof v === 'object' && ($.isPlainObject(v) || v.length)) {
25009
- elm.append( $('<dd/>').append(render($('<dl/>'), v)));
25010
  } else {
25011
- elm.append($('<dd/>').append($('<span/>').text((v && typeof v === 'object')? '[]' : (v? v : '""'))));
25012
  }
25013
  });
25014
  return elm;
@@ -25031,8 +25899,8 @@ elFinder.prototype.commands.fullscreen = function() {
25031
  }
25032
 
25033
  tabId = fm.namespace + '-help-debug-' + (+new Date());
25034
- targetL = $('<li/>').html('<a href="'+selfUrl+'#'+tabId+'">'+self.debug.debug.cmd+'</a>').prependTo(debugUL);
25035
- target = $('<div id="'+tabId+'"/>').data('debug', self.debug);
25036
 
25037
  targetL.on('click.debugrender', function() {
25038
  var debug = target.data('debug');
@@ -25040,11 +25908,11 @@ elFinder.prototype.commands.fullscreen = function() {
25040
  if (debug) {
25041
  target.hide();
25042
  if (debug.debug) {
25043
- info = $('<fieldset>').append($('<legend/>').text('debug'), render($('<dl/>'), debug.debug));
25044
  target.append(info);
25045
  }
25046
  if (debug.options) {
25047
- info = $('<fieldset>').append($('<legend/>').text('options'), render($('<dl/>'), debug.options));
25048
  target.append(info);
25049
  }
25050
  target.show();
@@ -25124,7 +25992,7 @@ elFinder.prototype.commands.fullscreen = function() {
25124
 
25125
  if (useInteg) {
25126
  tabInteg = content.find('.elfinder-help-tab-integrations').hide();
25127
- integDIV = content.find('#'+fm.namespace+'-help-integrations').hide().append($('<div class="elfinder-help-integrations-desc"/>').html(fm.i18n('integrationWith')));
25128
  fm.bind('helpIntegration', function(e) {
25129
  var ul = integDIV.children('ul:first'),
25130
  data, elm, cmdUL, cmdCls;
@@ -25140,12 +26008,12 @@ elFinder.prototype.commands.fullscreen = function() {
25140
  data.title = data.link;
25141
  }
25142
  if (data.link) {
25143
- elm = $('<a/>').attr('href', data.link).attr('target', '_blank').text(data.title);
25144
  } else {
25145
- elm = $('<span/>').text(data.title);
25146
  }
25147
  if (data.banner) {
25148
- elm = $('<span/>').append($('<img/>').attr(data.banner), elm);
25149
  }
25150
  }
25151
  } else {
@@ -25160,18 +26028,18 @@ elFinder.prototype.commands.fullscreen = function() {
25160
  if (elm) {
25161
  tabInteg.show();
25162
  if (!ul.length) {
25163
- ul = $('<ul class="elfinder-help-integrations"/>').appendTo(integDIV);
25164
  }
25165
  if (data && data.cmd) {
25166
  cmdCls = 'elfinder-help-integration-' + data.cmd;
25167
  cmdUL = ul.find('ul.' + cmdCls);
25168
  if (!cmdUL.length) {
25169
- cmdUL = $('<ul class="'+cmdCls+'"/>');
25170
- ul.append($('<li/>').append($('<span/>').html(fm.i18n('cmd'+data.cmd))).append(cmdUL));
25171
  }
25172
- elm = cmdUL.append($('<li/>').append(elm));
25173
  } else {
25174
- ul.append($('<li/>').append(elm));
25175
  }
25176
  }
25177
  }
@@ -25367,7 +26235,7 @@ elFinder.prototype.commands.hide = function() {
25367
  });
25368
 
25369
  this.getstate = function(sel) {
25370
- return (cMenuType !== 'cwd' && (sel || this.fm.selected()).length) || hideCnt? 0 : -1;
25371
  };
25372
 
25373
  this.exec = function(hashes, opts) {
@@ -25564,11 +26432,11 @@ elFinder.prototype.commands.hide = function() {
25564
  }
25565
 
25566
  this.tpl = {
25567
- main : '<div class="ui-helper-clearfix elfinder-info-title {dirclass}"><span class="elfinder-cwd-icon {class} ui-corner-all"{style}/>{title}</div><table class="elfinder-info-tb">{content}</table>',
25568
  itemTitle : '<strong>{name}</strong><span class="elfinder-info-kind">{kind}</span>',
25569
  groupTitle : '<strong>{items}: {num}</strong>',
25570
  row : '<tr><td class="elfinder-info-label">{label} : </td><td class="{class}">{value}</td></tr>',
25571
- spinner : '<span>{text}</span> <span class="'+spclass+' '+spclass+'-{name}"/>'
25572
  };
25573
 
25574
  this.alwaysEnabled = true;
@@ -25626,8 +26494,14 @@ elFinder.prototype.commands.hide = function() {
25626
  customActions = [],
25627
  style = '',
25628
  hashClass = 'elfinder-font-mono elfinder-info-hash',
25629
- size, tmb, file, title, dcnt, rdcnt, path, getHashAlgorisms, hideItems;
25630
-
 
 
 
 
 
 
25631
  if (!cnt) {
25632
  return $.Deferred().reject();
25633
  }
@@ -25704,7 +26578,7 @@ elFinder.prototype.commands.hide = function() {
25704
  } else if (file.mime.indexOf('image') !== -1) {
25705
  if (file.width && file.height) {
25706
  content.push(row.replace(l, msg.dim).replace(v, file.width+'x'+file.height));
25707
- } else {
25708
  content.push(row.replace(l, msg.dim).replace(v, tpl.spinner.replace('{text}', msg.calc).replace('{name}', 'dim')));
25709
  reqs.push(fm.request({
25710
  data : {cmd : 'dim', target : file.hash},
@@ -25733,31 +26607,34 @@ elFinder.prototype.commands.hide = function() {
25733
  !hideItems.group && file.group && content.push(row.replace(l, msg.group).replace(v, file.group));
25734
  !hideItems.perm && file.perm && content.push(row.replace(l, msg.perm).replace(v, fm.formatFileMode(file.perm)));
25735
 
25736
- // Get MD5 hash
25737
  if (window.ArrayBuffer && (fm.options.cdns.sparkmd5 || fm.options.cdns.jssha) && file.mime !== 'directory' && file.size > 0 && (!o.showHashMaxsize || file.size <= o.showHashMaxsize)) {
25738
  getHashAlgorisms = [];
25739
  $.each(fm.storage('hashchekcer') || o.showHashAlgorisms, function(i, n) {
25740
  if (!file[n]) {
25741
- content.push(row.replace(l, fm.i18n(n)).replace(v, tpl.spinner.replace('{text}', msg.calc).replace('{name}', n)));
25742
  getHashAlgorisms.push(n);
25743
  } else {
25744
  content.push(row.replace(l, fm.i18n(n)).replace(v, file[n]).replace('{class}', hashClass));
25745
  }
25746
  });
25747
 
25748
- reqs.push(
25749
- fm.getContentsHashes(file.hash, getHashAlgorisms).progress(function(hashes) {
25750
- $.each(getHashAlgorisms, function(i, n) {
25751
- if (hashes[n]) {
25752
- replSpinner(hashes[n], n, hashClass);
25753
- }
25754
- });
25755
- }).always(function() {
25756
- $.each(getHashAlgorisms, function(i, n) {
25757
- replSpinner(msg.unknown, n);
25758
- });
25759
- })
25760
- );
 
 
 
25761
  }
25762
 
25763
  // Add custom info fields
@@ -25813,6 +26690,10 @@ elFinder.prototype.commands.hide = function() {
25813
  $(this).html(applyZWSP($(this).html(), true));
25814
  });
25815
 
 
 
 
 
25816
  if (fm.UA.Mobile && $.fn.tooltip) {
25817
  dialog.children('.ui-dialog-content .elfinder-info-title').tooltip({
25818
  classes: {
@@ -26000,7 +26881,7 @@ elFinder.prototype.commands.mkfile = function() {
26000
 
26001
  this.fm.bind('open reload canMakeEmptyFile', function() {
26002
  var fm = self.fm,
26003
- hides = fm.storage('mkfileHides') || {};
26004
  self.variants = [];
26005
  if (fm.mimesCanMakeEmpty) {
26006
  $.each(fm.mimesCanMakeEmpty, function(mime, type) {
@@ -26053,18 +26934,20 @@ elFinder.prototype.commands.netmount = function() {
26053
  this.handlers = {
26054
  load : function() {
26055
  var fm = self.fm;
26056
- self.drivers = fm.netDrivers;
26057
- if (self.drivers.length) {
26058
- requestAnimationFrame(function() {
26059
- $.each(self.drivers, function() {
26060
- var d = self.options[this];
26061
- if (d) {
26062
- hasMenus = true;
26063
- if (d.integrateInfo) {
26064
- fm.trigger('helpIntegration', Object.assign({cmd: 'netmount'}, d.integrateInfo));
 
 
26065
  }
26066
- }
26067
- });
26068
  });
26069
  }
26070
  }
@@ -26083,7 +26966,7 @@ elFinder.prototype.commands.netmount = function() {
26083
  inputs.protocol.trigger('change', 'winfocus');
26084
  },
26085
  inputs = {
26086
- protocol : $('<select/>')
26087
  .on('change', function(e, data){
26088
  var protocol = this.value;
26089
  content.find('.elfinder-netmount-tr').hide();
@@ -26092,15 +26975,12 @@ elFinder.prototype.commands.netmount = function() {
26092
  if (typeof o[protocol].select == 'function') {
26093
  o[protocol].select(fm, e, data);
26094
  }
26095
- requestAnimationFrame(function() {
26096
- content.find('input:text.elfinder-tabstop:visible:first').trigger('focus');
26097
- });
26098
  })
26099
  .addClass('ui-corner-all')
26100
  },
26101
  opts = {
26102
  title : fm.i18n('netMountDialogTitle'),
26103
- resizable : false,
26104
  modal : true,
26105
  destroyOnClose : false,
26106
  open : function() {
@@ -26116,7 +26996,8 @@ elFinder.prototype.commands.netmount = function() {
26116
  doMount = function() {
26117
  var protocol = inputs.protocol.val(),
26118
  data = {cmd : 'netmount', protocol: protocol},
26119
- cur = o[protocol];
 
26120
  $.each(content.find('input.elfinder-netmount-inputs-'+protocol), function(name, input) {
26121
  var val, elm;
26122
  elm = $(input);
@@ -26131,15 +27012,20 @@ elFinder.prototype.commands.netmount = function() {
26131
  data[input.name] = val;
26132
  }
26133
  });
26134
-
26135
  if (!data.host) {
26136
  return fm.trigger('error', {error : 'errNetMountHostReq', opts : {modal: true}});
26137
  }
26138
-
 
 
 
 
26139
  fm.request({data : data, notify : {type : 'netmount', cnt : 1, hideCnt : true}})
26140
  .done(function(data) {
26141
  var pdir;
26142
  if (data.added && data.added.length) {
 
26143
  if (data.added[0].phash) {
26144
  if (pdir = fm.file(data.added[0].phash)) {
26145
  if (! pdir.dirs) {
@@ -26163,7 +27049,7 @@ elFinder.prototype.commands.netmount = function() {
26163
 
26164
  self.dialog.elfinderdialog('close');
26165
  },
26166
- form = $('<form autocomplete="off"/>').on('keydown', 'input', function(e) {
26167
  var comp = true,
26168
  next;
26169
  if (e.keyCode === $.ui.keyCode.ENTER) {
@@ -26181,11 +27067,11 @@ elFinder.prototype.commands.netmount = function() {
26181
  }
26182
  }
26183
  }),
26184
- hidden = $('<div/>'),
26185
  dialog;
26186
 
26187
- content = $('<table class="elfinder-info-tb elfinder-netmount-tb"/>')
26188
- .append($('<tr/>').append($('<td>'+fm.i18n('protocol')+'</td>')).append($('<td/>').append(inputs.protocol)));
26189
 
26190
  $.each(self.drivers, function(i, protocol) {
26191
  if (o[protocol]) {
@@ -26194,7 +27080,7 @@ elFinder.prototype.commands.netmount = function() {
26194
  input.attr('name', name);
26195
  if (input.attr('type') != 'hidden') {
26196
  input.addClass('ui-corner-all elfinder-netmount-inputs-'+protocol);
26197
- content.append($('<tr/>').addClass('elfinder-netmount-tr elfinder-netmount-tr-'+protocol).append($('<td>'+fm.i18n(name)+'</td>')).append($('<td/>').append(input)));
26198
  } else {
26199
  input.addClass('elfinder-netmount-inputs-'+protocol);
26200
  hidden.append(input);
@@ -26207,6 +27093,7 @@ elFinder.prototype.commands.netmount = function() {
26207
  content.append(hidden);
26208
 
26209
  content.find('.elfinder-netmount-tr').hide();
 
26210
 
26211
  opts.buttons[fm.i18n('btnMount')] = doMount;
26212
 
@@ -26216,12 +27103,11 @@ elFinder.prototype.commands.netmount = function() {
26216
 
26217
  content.find('select,input').addClass('elfinder-tabstop');
26218
 
26219
- dialog = self.fmDialog(form.append(content), opts);
26220
- dialogNode = dialog.closest('.ui-dialog');
26221
- dialog.ready(function(){
26222
  inputs.protocol.trigger('change');
26223
  dialog.elfinderdialog('posInit');
26224
  });
 
26225
  return dialog;
26226
  },
26227
  dialogNode;
@@ -26237,12 +27123,27 @@ elFinder.prototype.commands.netmount = function() {
26237
 
26238
  self.fm.bind('netmount', function(e) {
26239
  var d = e.data || null,
26240
- o = self.options;
 
 
 
 
 
 
 
26241
  if (d && d.protocol) {
26242
- if (o[d.protocol] && typeof o[d.protocol].done == 'function') {
26243
- o[d.protocol].done(self.fm, d);
26244
- content.find('select,input').addClass('elfinder-tabstop');
26245
- self.dialog.elfinderdialog('tabstopsInit');
 
 
 
 
 
 
 
 
26246
  }
26247
  }
26248
  });
@@ -26407,12 +27308,19 @@ elFinder.prototype.commands.netunmount = function() {
26407
  * @author Dmitry (dio) Levashov
26408
  **/
26409
  (elFinder.prototype.commands.open = function() {
26410
- var fm = this.fm;
 
26411
  this.alwaysEnabled = true;
26412
  this.noChangeDirOnRemovedCwd = true;
26413
 
26414
  this._handlers = {
26415
- dblclick : function(e) { e.preventDefault(); fm.exec('open', e.data && e.data.file? [ e.data.file ]: void(0)); },
 
 
 
 
 
 
26416
  'select enable disable reload' : function(e) { this.update(e.type == 'disable' ? -1 : void(0)); }
26417
  };
26418
 
@@ -26425,7 +27333,7 @@ elFinder.prototype.commands.netunmount = function() {
26425
  cnt = sel.length;
26426
 
26427
  return cnt == 1
26428
- ? (sel[0].read? 0 : -1)
26429
  : (cnt && !fm.UA.Mobile) ? ($.grep(sel, function(file) { return file.mime == 'directory' || ! file.read ? false : true;}).length == cnt ? 0 : -1) : -1;
26430
  };
26431
 
@@ -26473,7 +27381,98 @@ elFinder.prototype.commands.netunmount = function() {
26473
  }
26474
 
26475
  var doOpen = function() {
26476
- var wnd, target, getOnly;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26477
 
26478
  try {
26479
  reg = new RegExp(fm.option('dispInlineRegex'), 'i');
@@ -26482,8 +27481,7 @@ elFinder.prototype.commands.netunmount = function() {
26482
  }
26483
 
26484
  // open files
26485
- link = $('<a>').hide().appendTo($('body')),
26486
- html5dl = (typeof link.get(0).download === 'string');
26487
  cnt = files.length;
26488
  while (cnt--) {
26489
  target = 'elf_open_window';
@@ -26494,96 +27492,8 @@ elFinder.prototype.commands.netunmount = function() {
26494
  }
26495
 
26496
  inline = (reg && file.mime.match(reg));
26497
- url = fm.openUrl(file.hash, !inline);
26498
- if (fm.UA.Mobile || !inline) {
26499
- if (html5dl) {
26500
- if (!inline) {
26501
- link.attr('download', file.name);
26502
- } else {
26503
- link.attr('target', '_blank');
26504
- }
26505
- link.attr('href', url).get(0).click();
26506
- } else {
26507
- wnd = window.open(url);
26508
- if (!wnd) {
26509
- return dfrd.reject('errPopup');
26510
- }
26511
- }
26512
- } else {
26513
- getOnly = (typeof opts.method === 'string' && opts.method.toLowerCase() === 'get');
26514
- if (!getOnly
26515
- && url.indexOf(fm.options.url) === 0
26516
- && fm.customData
26517
- && Object.keys(fm.customData).length
26518
- // Since playback by POST request can not be done in Chrome, media allows GET request
26519
- && !file.mime.match(/^(?:video|audio)/)
26520
- ) {
26521
- // Send request as 'POST' method to hide custom data at location bar
26522
- url = '';
26523
- }
26524
- if (into === 'window') {
26525
- // set window size for image if set
26526
- imgW = winW = Math.round(2 * screen.availWidth / 3);
26527
- imgH = winH = Math.round(2 * screen.availHeight / 3);
26528
- if (parseInt(file.width) && parseInt(file.height)) {
26529
- imgW = parseInt(file.width);
26530
- imgH = parseInt(file.height);
26531
- } else if (file.dim) {
26532
- s = file.dim.split('x');
26533
- imgW = parseInt(s[0]);
26534
- imgH = parseInt(s[1]);
26535
- }
26536
- if (winW >= imgW && winH >= imgH) {
26537
- winW = imgW;
26538
- winH = imgH;
26539
- } else {
26540
- if ((imgW - winW) > (imgH - winH)) {
26541
- winH = Math.round(imgH * (winW / imgW));
26542
- } else {
26543
- winW = Math.round(imgW * (winH / imgH));
26544
- }
26545
- }
26546
- w = 'width='+winW+',height='+winH;
26547
- wnd = window.open(url, target, w + ',top=50,left=50,scrollbars=yes,resizable=yes,titlebar=no');
26548
- } else {
26549
- if (into === 'tabs') {
26550
- target = file.hash;
26551
- }
26552
- wnd = window.open('about:blank', target);
26553
- }
26554
-
26555
- if (!wnd) {
26556
- return dfrd.reject('errPopup');
26557
- }
26558
-
26559
- if (url === '') {
26560
- var form = document.createElement("form");
26561
- form.action = fm.options.url;
26562
- form.method = 'POST';
26563
- form.target = target;
26564
- form.style.display = 'none';
26565
- var params = Object.assign({}, fm.customData, {
26566
- cmd: 'file',
26567
- target: file.hash,
26568
- _t: file.ts || parseInt(+new Date()/1000)
26569
- });
26570
- $.each(params, function(key, val)
26571
- {
26572
- var input = document.createElement("input");
26573
- input.name = key;
26574
- input.value = val;
26575
- form.appendChild(input);
26576
- });
26577
-
26578
- document.body.appendChild(form);
26579
- form.submit();
26580
- } else if (into !== 'window') {
26581
- wnd.location = url;
26582
- }
26583
- $(wnd).trigger('focus');
26584
- }
26585
  }
26586
- link.remove();
26587
  return dfrd.resolve(hashes);
26588
  };
26589
 
@@ -26955,6 +27865,7 @@ elFinder.prototype.commands.paste = function() {
26955
  fm.request({
26956
  data : reqData,
26957
  notify : {type : cmd, cnt : cnt},
 
26958
  navigate : {
26959
  toast : opts.noToast? {} : {
26960
  inbuffer : {msg: fm.i18n(['complete', fm.i18n('cmd' + cmd)]), action: {
@@ -27020,8 +27931,12 @@ elFinder.prototype.commands.paste = function() {
27020
  }
27021
  dfrd.resolve(data);
27022
  })
27023
- .fail(function() {
27024
  dfrd.reject();
 
 
 
 
27025
  })
27026
  .always(function() {
27027
  fm.unlockfiles({files : files});
@@ -27056,7 +27971,7 @@ elFinder.prototype.commands.paste = function() {
27056
 
27057
  return dfrd;
27058
  },
27059
- parents, fparents;
27060
 
27061
 
27062
  if (!cnt || !dst || dst.mime != 'directory') {
@@ -27106,22 +28021,48 @@ elFinder.prototype.commands.paste = function() {
27106
  }
27107
  });
27108
 
27109
- if (dfrd.state() == 'rejected') {
27110
  return dfrd;
27111
  }
27112
 
27113
- $.when(
27114
- copy(fcopy),
27115
- paste(fpaste)
27116
- )
27117
- .done(function(cr, pr) {
27118
- dfrd.resolve(pr && pr.undo? pr : void(0));
27119
- })
27120
- .fail(function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27121
  dfrd.reject();
27122
- })
27123
- .always(function() {
27124
- cut && fm.clipboard([]);
27125
  });
27126
 
27127
  return dfrd;
@@ -27185,8 +28126,8 @@ elFinder.prototype.commands.preference = function() {
27185
  tab = '<li class="' + fm.res('class', 'tabstab') + ' elfinder-preference-tab-{id}"><a href="#'+fm.namespace+'-preference-{id}" id="'+fm.namespace+'-preference-tab-{id}" class="ui-tabs-anchor {class}">{title}</a></li>',
27186
  base = $('<div class="ui-tabs ui-widget ui-widget-content ui-corner-all elfinder-preference">'),
27187
  ul = $('<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-top">'),
27188
- tabs = $('<div class="elfinder-preference-tabs ui-tabs-panel ui-widget-content ui-corner-bottom"/>'),
27189
- sep = '<div class="elfinder-preference-separator"/>',
27190
  selfUrl = $('base').length? document.location.href.replace(/#.*$/, '') : '',
27191
  selectTab = function(tab) {
27192
  $('#'+fm.namespace+'-preference-tab-'+tab).trigger('mouseover').trigger('click');
@@ -27206,21 +28147,28 @@ elFinder.prototype.commands.preference = function() {
27206
  },
27207
  forms = self.options.prefs || ['language', 'theme', 'toolbarPref', 'iconSize', 'columnPref', 'selectAction', 'makefileTypes', 'useStoredEditor', 'editorMaximized', 'useFullscreen', 'showHidden', 'infoItems', 'hashChecker', 'autoFocusDialog', 'clearBrowserData'];
27208
 
 
 
 
 
27209
  forms = fm.arrayFlip(forms, true);
27210
 
27211
  if (fm.options.getFileCallback) {
27212
  delete forms.selectAction;
27213
  }
27214
-
 
 
 
27215
  forms.language && (forms.language = (function() {
27216
- var langSel = $('<select/>').on('change', function() {
27217
  var lang = $(this).val();
27218
  fm.storage('lang', lang);
27219
  $('#'+fm.id).elfinder('reload');
27220
  }),
27221
  optTags = [],
27222
  langs = self.options.langs || {
27223
- ar: 'اللغة العربية',
27224
  bg: 'Български',
27225
  ca: 'Català',
27226
  cs: 'Čeština',
@@ -27232,6 +28180,7 @@ elFinder.prototype.commands.preference = function() {
27232
  fa: 'فارسی',
27233
  fo: 'Føroyskt',
27234
  fr: 'Français',
 
27235
  he: 'עברית',
27236
  hr: 'Hrvatski',
27237
  hu: 'Magyar',
@@ -27257,6 +28206,9 @@ elFinder.prototype.commands.preference = function() {
27257
  zh_CN: '简体中文',
27258
  zh_TW: '正體中文'
27259
  };
 
 
 
27260
  $.each(langs, function(lang, name) {
27261
  optTags.push('<option value="'+lang+'">'+name+'</option>');
27262
  });
@@ -27268,7 +28220,7 @@ elFinder.prototype.commands.preference = function() {
27268
  if (cnt === 0 || (cnt === 1 && fm.options.themes.default)) {
27269
  return null;
27270
  }
27271
- var themeSel = $('<select/>').on('change', function() {
27272
  var theme = $(this).val();
27273
  fm.changeTheme(theme).storage('theme', theme);
27274
  }),
@@ -27281,10 +28233,10 @@ elFinder.prototype.commands.preference = function() {
27281
  items = ['image', 'description', 'author', 'email', 'license'],
27282
  render = function(key, data) {
27283
  },
27284
- defBtn = $('<button class="ui-button ui-corner-all ui-widget elfinder-preference-theme-default"/>').text(fm.i18n('default')).on('click', function(e) {
27285
  themeSel.val('default').trigger('change');
27286
  }),
27287
- list = $('<div class="elfinder-reference-hide-taball"/>').on('click', 'button', function() {
27288
  var val = $(this).data('themeid');
27289
  themeSel.val(val).trigger('change');
27290
  });
@@ -27294,7 +28246,7 @@ elFinder.prototype.commands.preference = function() {
27294
  }
27295
  $.each(fm.options.themes, function(id, val) {
27296
  var opt = $('<option class="elfinder-theme-option-'+id+'" value="'+id+'">'+fm.i18n(id)+'</option>'),
27297
- dsc = $('<fieldset class="ui-widget ui-widget-content ui-corner-all elfinder-theme-list-'+id+'"><legend>'+fm.i18n(id)+'</legend><div><span class="elfinder-spinner"/></div></fieldset>'),
27298
  tm;
27299
  themeSel.append(opt);
27300
  list.append(dsc);
@@ -27304,7 +28256,7 @@ elFinder.prototype.commands.preference = function() {
27304
  fm.getTheme(id).always(function() {
27305
  tm && clearTimeout(tm);
27306
  }).done(function(data) {
27307
- var link, val = $(), dl = $('<dl/>');
27308
  link = data.link? tpl.link.replace(/\$1/g, data.link).replace(/\$3/g, fm.i18n('website')) : '$2';
27309
  if (data.name) {
27310
  opt.html(fm.i18n(data.name));
@@ -27324,13 +28276,13 @@ elFinder.prototype.commands.preference = function() {
27324
  }
27325
  });
27326
  val = val.add(dl);
27327
- val = val.add($('<div class="elfinder-preference-theme-btn"/>').append($('<button class="ui-button ui-corner-all ui-widget"/>').data('themeid', id).html(fm.i18n('select'))));
27328
  dsc.find('span.elfinder-spinner').replaceWith(val);
27329
  }).fail(function() {
27330
  dsc.find('span.elfinder-spinner').replaceWith(fm.i18n(['errRead', id]));
27331
  });
27332
  });
27333
- return $('<div/>').append(themeSel.val(fm.theme && fm.theme.id? fm.theme.id : 'default'), defBtn, list);
27334
  })());
27335
 
27336
  forms.toolbarPref && (forms.toolbarPref = (function() {
@@ -27362,8 +28314,8 @@ elFinder.prototype.commands.preference = function() {
27362
 
27363
  forms.iconSize && (forms.iconSize = (function() {
27364
  var max = fm.options.uiOptions.cwd.iconsView.sizeMax || 3,
27365
- size = fm.storage('iconsize') || 0,
27366
- sld = $('<div class="touch-punch"/>').slider({
27367
  classes: {
27368
  'ui-slider-handle': 'elfinder-tabstop',
27369
  },
@@ -27405,7 +28357,7 @@ elFinder.prototype.commands.preference = function() {
27405
  })());
27406
 
27407
  forms.selectAction && (forms.selectAction = (function() {
27408
- var actSel = $('<select/>').on('change', function() {
27409
  var act = $(this).val();
27410
  fm.storage('selectAction', act === 'default'? null : act);
27411
  }),
@@ -27430,18 +28382,18 @@ elFinder.prototype.commands.preference = function() {
27430
  })());
27431
 
27432
  forms.makefileTypes && (forms.makefileTypes = (function() {
27433
- var hides = fm.storage('mkfileHides') || {},
27434
  getTag = function() {
27435
  var tags = [];
27436
  // re-assign hides
27437
- hides = fm.storage('mkfileHides') || {};
27438
  $.each(fm.mimesCanMakeEmpty, function(mime, type) {
27439
  var name = fm.getCommand('mkfile').getTypeName(mime, type);
27440
  tags.push('<span class="elfinder-preference-column-item" title="'+fm.escape(name)+'"><label><input type="checkbox" value="'+mime+'" '+(hides[mime]? '' : 'checked')+'/>'+type+'</label></span>');
27441
  });
27442
  return tags.join(' ');
27443
  },
27444
- elm = $('<div/>').on('change', 'input', function() {
27445
  var v = $(this).val(),
27446
  o = $(this).is(':checked');
27447
  if (!o && !hides[v]) {
@@ -27452,11 +28404,11 @@ elFinder.prototype.commands.preference = function() {
27452
  fm.storage('mkfileHides', hides);
27453
  fm.trigger('canMakeEmptyFile');
27454
  }).append(getTag()),
27455
- add = $('<div/>').append(
27456
  $('<input type="text" placeholder="'+fm.i18n('typeOfTextfile')+'"/>').on('keydown', function(e) {
27457
  (e.keyCode === $.ui.keyCode.ENTER) && $(this).next().trigger('click');
27458
  }),
27459
- $('<button class="ui-button"/>').html(fm.i18n('add')).on('click', function() {
27460
  var input = $(this).prev(),
27461
  val = input.val(),
27462
  uiToast = fm.getUI('toast'),
@@ -27496,7 +28448,7 @@ elFinder.prototype.commands.preference = function() {
27496
  }
27497
  });
27498
  }),
27499
- $('<button class="ui-button"/>').html(fm.i18n('reset')).on('click', function() {
27500
  fm.one('canMakeEmptyFile', {done: function() {
27501
  elm.empty().append(getTag());
27502
  }});
@@ -27509,7 +28461,7 @@ elFinder.prototype.commands.preference = function() {
27509
  elm.empty().append(getTag());
27510
  }
27511
  }});
27512
- return $('<div/>').append(elm, add);
27513
  })());
27514
 
27515
  forms.useStoredEditor && (forms.useStoredEditor = $('<input type="checkbox"/>').prop('checked', (function() {
@@ -27526,7 +28478,7 @@ elFinder.prototype.commands.preference = function() {
27526
  fm.storage('editorMaximized', $(this).is(':checked')? 1 : -1);
27527
  }));
27528
 
27529
- fm.UA.Fullscreen && forms.useFullscreen && (forms.useFullscreen = $('<input type="checkbox"/>').prop('checked', (function() {
27530
  var s = fm.storage('useFullscreen');
27531
  return s? (s > 0) : fm.options.commandsOptions.fullscreen.mode === 'screen';
27532
  })()).on('change', function(e) {
@@ -27557,7 +28509,7 @@ elFinder.prototype.commands.preference = function() {
27557
  o[$(this).is(':checked')? 'show' : 'hide'] = true;
27558
  fm.exec('hide', void(0), o);
27559
  }),
27560
- btn = $('<button class="ui-button ui-corner-all ui-widget"/>').append(fm.i18n('reset')).on('click', function() {
27561
  fm.exec('hide', void(0), {reset: true});
27562
  $(this).parent().find('input:first').prop('checked', false);
27563
  setTitle();
@@ -27565,7 +28517,7 @@ elFinder.prototype.commands.preference = function() {
27565
  elms = $().add(chk).add(btn),
27566
  useTooltip;
27567
 
27568
- forms.showHidden = $('<div/>').append(chk, btn);
27569
  fm.bind('hide', function(e) {
27570
  var d = e.data;
27571
  if (!d.opts || (!d.opts.show && !d.opts.hide)) {
@@ -27638,7 +28590,7 @@ elFinder.prototype.commands.preference = function() {
27638
  fm.storage('autoFocusDialog', $(this).is(':checked')? 1 : -1);
27639
  }));
27640
 
27641
- forms.clearBrowserData && (forms.clearBrowserData = $('<button/>').text(fm.i18n('reset')).button().on('click', function(e) {
27642
  e.preventDefault();
27643
  fm.storage();
27644
  $('#'+fm.id).elfinder('reload');
@@ -27667,7 +28619,7 @@ elFinder.prototype.commands.preference = function() {
27667
  } else if (cbox.length > 1) {
27668
  chks = ' elfinder-preference-checkboxes';
27669
  }
27670
- dls = dls.add($('<dt class="elfinder-preference-'+n+chks+'">'+title+'</dt>')).add($('<dd class="elfinder-preference-'+n+chks+'"/>').append(f));
27671
  }
27672
  });
27673
  }
@@ -27675,9 +28627,9 @@ elFinder.prototype.commands.preference = function() {
27675
  ul.append(tab[r](/\{id\}/g, id)[r](/\{title\}/, fm.i18n(id))[r](/\{class\}/, openTab === id? 'elfinder-focus' : ''));
27676
  if (found === 2) {
27677
  tabs.append(
27678
- $('<div id="'+fm.namespace+'-preference-'+id+'" class="elfinder-preference-content"/>')
27679
  .hide()
27680
- .append($('<dl/>').append(dls))
27681
  );
27682
  }
27683
  }
@@ -27878,7 +28830,7 @@ elFinder.prototype.commands.preference = function() {
27878
  * @return void
27879
  **/
27880
  openedCss = function() {
27881
- var contain = self.options.contain,
27882
  win = contain? fm.getUI() : $(window),
27883
  elf = fm.getUI().offset(),
27884
  w = Math.min(width, win.width()-10),
@@ -27950,11 +28902,11 @@ elFinder.prototype.commands.preference = function() {
27950
  leftKey = $.ui.keyCode.LEFT,
27951
  rightKey = $.ui.keyCode.RIGHT,
27952
  coverEv = 'mousemove touchstart ' + ('onwheel' in document? 'wheel' : 'onmousewheel' in document? 'mousewheel' : 'DOMMouseScroll'),
27953
- title = $('<span class="elfinder-dialog-title elfinder-quicklook-title"/>'),
27954
- icon = $('<div/>'),
27955
- info = $('<div class="elfinder-quicklook-info"/>'),//.hide(),
27956
- cover = $('<div class="ui-front elfinder-quicklook-cover"/>'),
27957
- fsicon = $('<div class="'+navicon+' '+navicon+'-fullscreen"/>')
27958
  .on('click touchstart', function(e) {
27959
  if (navmove) {
27960
  return;
@@ -28107,20 +29059,20 @@ elFinder.prototype.commands.preference = function() {
28107
  cover.hide();
28108
  },
28109
 
28110
- prev = $('<div class="'+navicon+' '+navicon+'-prev"/>').on('click touchstart', function(e) { ! navmove && navtrigger(leftKey); return false; }),
28111
- next = $('<div class="'+navicon+' '+navicon+'-next"/>').on('click touchstart', function(e) { ! navmove && navtrigger(rightKey); return false; }),
28112
- navbar = $('<div class="elfinder-quicklook-navbar"/>')
28113
  .append(prev)
28114
  .append(fsicon)
28115
  .append(next)
28116
- .append('<div class="elfinder-quicklook-navbar-separator"/>')
28117
- .append($('<div class="'+navicon+' '+navicon+'-close"/>').on('click touchstart', function(e) { ! navmove && self.window.trigger('close'); return false; }))
28118
  ,
28119
- titleClose = $('<span class="ui-front ui-icon elfinder-icon-close ui-icon-closethick"/>').on('mousedown', function(e) {
28120
  e.stopPropagation();
28121
  self.window.trigger('close');
28122
  }),
28123
- titleDock = $('<span class="ui-front ui-icon elfinder-icon-minimize ui-icon-minusthick"/>').on('mousedown', function(e) {
28124
  e.stopPropagation();
28125
  if (! self.docked()) {
28126
  self.window.trigger('navdockin');
@@ -28128,16 +29080,21 @@ elFinder.prototype.commands.preference = function() {
28128
  self.window.trigger('navdockout');
28129
  }
28130
  }),
28131
- spinner = '<span class="elfinder-spinner-text">' + fm.i18n('calc') + '</span>' + '<span class="elfinder-spinner"/>',
28132
  navStyle = '',
28133
  init = true,
28134
  dockHeight, getSize, tm4cwd, dockedNode, selectTm;
28135
 
 
 
 
 
 
28136
  this.cover = cover;
28137
  this.evUpdate = evUpdate;
28138
  (this.navbar = navbar)._show = navShow;
28139
  this.resize = 'resize.'+fm.namespace;
28140
- this.info = $('<div/>').addClass(infocls)
28141
  .append(icon)
28142
  .append(info);
28143
  this.autoPlay = function() {
@@ -28146,7 +29103,7 @@ elFinder.prototype.commands.preference = function() {
28146
  }
28147
  return false;
28148
  };
28149
- this.preview = $('<div class="elfinder-quicklook-preview ui-helper-clearfix"/>')
28150
  // clean info/icon
28151
  .on('change', function() {
28152
  navShow();
@@ -28246,7 +29203,7 @@ elFinder.prototype.commands.preference = function() {
28246
  }
28247
  });
28248
 
28249
- this.window = $('<div class="ui-front ui-helper-reset ui-widget elfinder-quicklook touch-punch" style="position:absolute"/>')
28250
  .hide()
28251
  .addClass(fm.UA.Touch? 'elfinder-touch' : '')
28252
  .on('click', function(e) {
@@ -28259,9 +29216,9 @@ elFinder.prototype.commands.preference = function() {
28259
  }
28260
  })
28261
  .append(
28262
- $('<div class="ui-dialog-titlebar ui-widget-header ui-corner-top ui-helper-clearfix elfinder-quicklook-titlebar"/>')
28263
  .append(
28264
- $('<span class="ui-widget-header ui-dialog-titlebar-close ui-corner-all elfinder-titlebar-button elfinder-quicklook-titlebar-icon'+(platformWin? ' elfinder-titlebar-button-right' : '')+'"/>').append(
28265
  titleClose, titleDock
28266
  ),
28267
  title
@@ -28330,7 +29287,10 @@ elFinder.prototype.commands.preference = function() {
28330
  state = animated;
28331
  win.hasClass(fullscreen) && fsicon.click();
28332
  (hash && (node = cwd.find('#'+hash)).length)
28333
- ? win.animate(closedCss(node), 500, function() { close(closed, true); })
 
 
 
28334
  : close(closed, true);
28335
  } else {
28336
  dockedNode = fm.getUI('navdock').data('removeNode')(self.window.attr('id'), 'detach');
@@ -28662,6 +29622,7 @@ elFinder.prototype.commands.quicklook.plugins = [
28662
  **/
28663
  function(ql) {
28664
  var mimes = ['image/jpeg', 'image/png', 'image/gif', 'image/svg+xml', 'image/x-ms-bmp'],
 
28665
  preview = ql.preview,
28666
  WebP, flipMime;
28667
 
@@ -28741,7 +29702,7 @@ elFinder.prototype.commands.quicklook.plugins = [
28741
  // hide info/icon
28742
  ql.hideinfo();
28743
  },
28744
- url, img, loading, m;
28745
 
28746
  if (!flipMime) {
28747
  flipMime = fm.arrayFlip(mimes);
@@ -28750,10 +29711,9 @@ elFinder.prototype.commands.quicklook.plugins = [
28750
  // this is our file - stop event propagation
28751
  e.stopImmediatePropagation();
28752
 
28753
- loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"/></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
 
28754
 
28755
- url = fm.openUrl(file.hash);
28756
-
28757
  img = $('<img/>')
28758
  .hide()
28759
  .appendTo(preview)
@@ -28763,12 +29723,18 @@ elFinder.prototype.commands.quicklook.plugins = [
28763
  })
28764
  .on('error', function() {
28765
  loading.remove();
28766
- })
28767
- .attr('src', url);
28768
-
 
 
 
 
 
 
28769
  if (file.width && file.height) {
28770
  show();
28771
- } else if (file.size > (ql.options.getDimThreshold || 0)) {
28772
  dimreq = fm.request({
28773
  data : {cmd : 'dim', target : file.hash},
28774
  preventDefault : true
@@ -28788,6 +29754,98 @@ elFinder.prototype.commands.quicklook.plugins = [
28788
  });
28789
  },
28790
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28791
  /**
28792
  * PSD(Adobe Photoshop data) preview plugin
28793
  *
@@ -28841,37 +29899,41 @@ elFinder.prototype.commands.quicklook.plugins = [
28841
 
28842
  preview.on(ql.evUpdate, function(e) {
28843
  var file = e.file,
28844
- url, img, loading, m,
28845
- _define, _require;
28846
 
28847
  if (mimes[file.mime] && fm.options.cdns.psd && ! fm.UA.ltIE10 && ql.dispInlineRegex.test(file.mime)) {
28848
  // this is our file - stop event propagation
28849
  e.stopImmediatePropagation();
28850
 
28851
- loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"/></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
28852
- url = fm.openUrl(file.hash);
28853
- if (!fm.isSameOrigin(url)) {
28854
- url = fm.openUrl(file.hash, true);
28855
- }
28856
- img = $('<img/>').hide().appendTo(preview);
28857
-
28858
- if (PSD) {
28859
- load(url, img, loading);
28860
- } else {
28861
- _define = window.define;
28862
- _require = window.require;
28863
- window.require = null;
28864
- window.define = null;
28865
- fm.loadScript(
28866
- [ fm.options.cdns.psd ],
28867
- function() {
28868
- PSD = require('psd');
28869
- _define? (window.define = _define) : (delete window.define);
28870
- _require? (window.require = _require) : (delete window.require);
28871
  load(url, img, loading);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28872
  }
28873
- );
28874
- }
 
 
 
 
28875
  }
28876
  });
28877
  },
@@ -28887,12 +29949,13 @@ elFinder.prototype.commands.quicklook.plugins = [
28887
  preview = ql.preview;
28888
 
28889
  preview.on(ql.evUpdate, function(e) {
28890
- var file = e.file, jqxhr, loading;
28891
 
28892
  if (mimes[file.mime] && ql.dispInlineRegex.test(file.mime) && (!ql.options.getSizeMax || file.size <= ql.options.getSizeMax)) {
28893
  e.stopImmediatePropagation();
28894
 
28895
- loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"/></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
 
28896
 
28897
  // stop loading on change file if not loaded yet
28898
  preview.one('change', function() {
@@ -28902,11 +29965,12 @@ elFinder.prototype.commands.quicklook.plugins = [
28902
  jqxhr = fm.request({
28903
  data : {cmd : 'get', target : file.hash, conv : 1, _t : file.ts},
28904
  options : {type: 'get', cache : true},
28905
- preventDefault : true
 
28906
  })
28907
  .done(function(data) {
28908
  ql.hideinfo();
28909
- var doc = $('<iframe class="elfinder-quicklook-preview-html"/>').appendTo(preview)[0].contentWindow.document;
28910
  doc.open();
28911
  doc.write(data.content);
28912
  doc.close();
@@ -28930,7 +29994,7 @@ elFinder.prototype.commands.quicklook.plugins = [
28930
  marked = null,
28931
  show = function(data, loading) {
28932
  ql.hideinfo();
28933
- var doc = $('<iframe class="elfinder-quicklook-preview-html"/>').appendTo(preview)[0].contentWindow.document;
28934
  doc.open();
28935
  doc.write(marked(data.content));
28936
  doc.close();
@@ -28942,12 +30006,13 @@ elFinder.prototype.commands.quicklook.plugins = [
28942
  };
28943
 
28944
  preview.on(ql.evUpdate, function(e) {
28945
- var file = e.file, jqxhr, loading;
28946
 
28947
  if (mimes[file.mime] && fm.options.cdns.marked && marked !== false && ql.dispInlineRegex.test(file.mime) && (!ql.options.getSizeMax || file.size <= ql.options.getSizeMax)) {
28948
  e.stopImmediatePropagation();
28949
 
28950
- loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"/></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
 
28951
 
28952
  // stop loading on change file if not loaded yet
28953
  preview.one('change', function() {
@@ -28957,7 +30022,8 @@ elFinder.prototype.commands.quicklook.plugins = [
28957
  jqxhr = fm.request({
28958
  data : {cmd : 'get', target : file.hash, conv : 1, _t : file.ts},
28959
  options : {type: 'get', cache : true},
28960
- preventDefault : true
 
28961
  })
28962
  .done(function(data) {
28963
  if (marked || window.marked) {
@@ -29002,39 +30068,51 @@ elFinder.prototype.commands.quicklook.plugins = [
29002
  var fm = ql.fm,
29003
  preview = ql.preview,
29004
  opts = ql.options.viewerjs,
29005
- mimes = opts.url? fm.arrayFlip(opts.mimes || []) : [];
 
 
 
 
 
29006
 
29007
  if (opts.url) {
29008
  preview.on('update', function(e) {
29009
- var win = ql.window,
29010
- file = e.file, node, loading;
29011
 
29012
- if (mimes[file.mime]) {
29013
- var url = fm.openUrl(file.hash);
29014
- if (url && fm.isSameOrigin(url)) {
29015
- e.stopImmediatePropagation();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29016
 
29017
- loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"/></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
 
29018
 
29019
- node = $('<iframe class="elfinder-quicklook-preview-iframe"/>')
29020
- .css('background-color', 'transparent')
29021
- .on('load', function() {
29022
- ql.hideinfo();
29023
  loading.remove();
29024
- node.css('background-color', '#fff');
29025
- })
29026
- .on('error', function() {
29027
- loading.remove();
29028
- node.remove();
29029
- })
29030
- .appendTo(preview)
29031
- .attr('src', opts.url + '#' + url);
29032
-
29033
- preview.one('change', function() {
29034
- loading.remove();
29035
- node.off('load').remove();
29036
- });
29037
- }
29038
  }
29039
  });
29040
  }
@@ -29066,24 +30144,34 @@ elFinder.prototype.commands.quicklook.plugins = [
29066
  });
29067
  }
29068
 
 
29069
  if (active) {
29070
  if (typeof ql.options.pdfToolbar !== 'undefined' && !ql.options.pdfToolbar) {
29071
  urlhash = '#toolbar=0';
29072
  }
29073
  preview.on(ql.evUpdate, function(e) {
29074
- var file = e.file;
 
29075
 
29076
  if (active && file.mime === mime && ql.dispInlineRegex.test(file.mime)) {
29077
  e.stopImmediatePropagation();
29078
- ql.hideinfo();
29079
- ql.cover.addClass('elfinder-quicklook-coverbg');
29080
- $('<object class="elfinder-quicklook-preview-pdf" data="'+fm.openUrl(file.hash)+urlhash+'" type="application/pdf" />')
29081
- .on('error', function(e) {
29082
- active = false;
29083
- ql.update(void(0), fm.cwd());
29084
- ql.update(void(0), file);
29085
- })
29086
- .appendTo(preview);
 
 
 
 
 
 
 
 
29087
  }
29088
 
29089
  });
@@ -29111,13 +30199,21 @@ elFinder.prototype.commands.quicklook.plugins = [
29111
 
29112
  active && preview.on(ql.evUpdate, function(e) {
29113
  var file = e.file,
29114
- node;
29115
 
29116
  if (file.mime === mime && ql.dispInlineRegex.test(file.mime)) {
29117
  e.stopImmediatePropagation();
29118
- ql.hideinfo();
29119
- node = $('<embed class="elfinder-quicklook-preview-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+fm.openUrl(file.hash)+'" quality="high" type="application/x-shockwave-flash" wmode="transparent" />')
29120
- .appendTo(preview);
 
 
 
 
 
 
 
 
29121
  }
29122
  });
29123
  },
@@ -29157,7 +30253,7 @@ elFinder.prototype.commands.quicklook.plugins = [
29157
  navi.css('bottom', win.hasClass('elfinder-quicklook-fullscreen')? '50px' : '');
29158
  },
29159
  getNode = function(src, hash) {
29160
- return $('<audio class="elfinder-quicklook-preview-audio ui-front" controls' + controlsList + ' preload="auto" autobuffer><source src="'+src+'" /></audio>')
29161
  .on('change', function(e) {
29162
  // Firefox fire change event on seek or volume change
29163
  e.stopPropagation();
@@ -29171,7 +30267,8 @@ elFinder.prototype.commands.quicklook.plugins = [
29171
  amrToWavUrl = function(hash) {
29172
  var dfd = $.Deferred(),
29173
  loader = $.Deferred().done(function() {
29174
- fm.getContents(hash).done(function(data) {
 
29175
  try {
29176
  var buffer = AMR.toWAV(new Uint8Array(data));
29177
  if (buffer) {
@@ -29185,6 +30282,10 @@ elFinder.prototype.commands.quicklook.plugins = [
29185
  }).fail(function() {
29186
  dfd.reject();
29187
  });
 
 
 
 
29188
  }).fail(function() {
29189
  AMR = false;
29190
  dfd.reject();
@@ -29243,22 +30344,25 @@ elFinder.prototype.commands.quicklook.plugins = [
29243
  node.remove();
29244
  node = null;
29245
  }
29246
- };
 
29247
 
29248
  preview.on(ql.evUpdate, function(e) {
29249
  var file = e.file,
29250
  type = mimes[file.mime],
29251
- html5, srcUrl;
29252
 
29253
  if (mimes[file.mime] && ql.dispInlineRegex.test(file.mime) && ((html5 = ql.support.audio[type]) || (type === 'amr'))) {
29254
  autoplay = ql.autoPlay();
29255
  curHash = file.hash;
29256
- srcUrl = html5? fm.openUrl(curHash) : '';
29257
  if (!html5) {
29258
  if (fm.options.cdns.amr && type === 'amr' && AMR !== false) {
29259
  e.stopImmediatePropagation();
29260
- node = getNode(srcUrl, curHash);
 
 
29261
  amrToWavUrl(file.hash).done(function(url) {
 
29262
  if (curHash === file.hash) {
29263
  var elm = node[0];
29264
  try {
@@ -29281,13 +30385,26 @@ elFinder.prototype.commands.quicklook.plugins = [
29281
  }
29282
  } else {
29283
  e.stopImmediatePropagation();
29284
- node = getNode(srcUrl, curHash);
29285
- play(node[0]);
29286
- win.on('viewchange.audio', setNavi);
29287
- setNavi();
 
 
 
 
 
 
 
 
 
 
 
 
 
29288
  }
29289
  }
29290
- }).on('change', reset);
29291
  },
29292
 
29293
  /**
@@ -29317,7 +30434,7 @@ elFinder.prototype.commands.quicklook.plugins = [
29317
  node,
29318
  win = ql.window,
29319
  navi = ql.navbar,
29320
- cHls, cDash, pDash, cFlv, cVideojs, autoplay, tm,
29321
  controlsList = typeof ql.options.mediaControlsList === 'string' && ql.options.mediaControlsList? ' controlsList="' + fm.escape(ql.options.mediaControlsList) + '"' : '',
29322
  setNavi = function() {
29323
  if (fm.UA.iOS) {
@@ -29366,7 +30483,7 @@ elFinder.prototype.commands.quicklook.plugins = [
29366
  }, true);
29367
 
29368
  if (opts.src) {
29369
- node.append('<source src="'+opts.src+'" type="'+file.mime+'"/><source src="'+opts.src+'"/>');
29370
  }
29371
 
29372
  node.appendTo(preview);
@@ -29375,49 +30492,94 @@ elFinder.prototype.commands.quicklook.plugins = [
29375
  setNavi();
29376
  },
29377
  loadHls = function(file) {
29378
- var hls;
29379
- render(file);
29380
- hls = new cHls();
29381
- hls.loadSource(fm.openUrl(file.hash));
29382
- hls.attachMedia(node[0]);
29383
- if (autoplay) {
29384
- hls.on(cHls.Events.MANIFEST_PARSED, function() {
29385
- play(node[0]);
29386
- });
29387
- }
 
 
 
 
 
 
 
 
 
29388
  },
29389
  loadDash = function(file) {
29390
- render(file);
29391
- pDash = window.dashjs.MediaPlayer().create();
29392
- pDash.getDebug().setLogToBrowserConsole(false);
29393
- pDash.initialize(node[0], fm.openUrl(file.hash), autoplay);
29394
- pDash.on('error', function(e) {
29395
- reset(true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29396
  });
29397
  },
29398
  loadFlv = function(file) {
 
29399
  if (!cFlv.isSupported()) {
29400
  cFlv = false;
29401
  return;
29402
  }
29403
- var player = cFlv.createPlayer({
29404
- type: 'flv',
29405
- url: fm.openUrl(file.hash)
29406
- });
29407
- render(file);
29408
- player.on(cFlv.Events.ERROR, function() {
29409
- player.destroy();
29410
- reset(true);
 
 
 
 
 
 
 
 
 
 
 
 
29411
  });
29412
- player.attachMediaElement(node[0]);
29413
- player.load();
29414
- play(player);
29415
  },
29416
  loadVideojs = function(file) {
29417
- render(file);
29418
- node[0].src = fm.openUrl(file.hash);
29419
- cVideojs(node[0], {
29420
- src: fm.openUrl(file.hash)
 
 
 
 
 
 
 
 
 
 
29421
  });
29422
  },
29423
  play = function(player) {
@@ -29455,17 +30617,30 @@ elFinder.prototype.commands.quicklook.plugins = [
29455
  var file = e.file,
29456
  mime = file.mime.toLowerCase(),
29457
  type = mimes[mime],
29458
- stock, playPromise;
29459
 
29460
  if (mimes[mime] && ql.dispInlineRegex.test(file.mime) /*&& (((type === 'm3u8' || (type === 'mpd' && !fm.UA.iOS) || type === 'flv') && !fm.UA.ltIE10) || ql.support.video[type])*/) {
29461
  autoplay = ql.autoPlay();
 
 
29462
  if (ql.support.video[type] && (type !== 'm3u8' || fm.UA.Safari)) {
29463
  e.stopImmediatePropagation();
29464
- render(file, { src: fm.openUrl(file.hash) });
29465
- play(node[0]);
 
 
 
 
 
 
 
 
 
 
29466
  } else {
29467
  if (cHls !== false && fm.options.cdns.hls && type === 'm3u8') {
29468
  e.stopImmediatePropagation();
 
29469
  if (cHls) {
29470
  loadHls(file);
29471
  } else {
@@ -29488,6 +30663,7 @@ elFinder.prototype.commands.quicklook.plugins = [
29488
  }
29489
  } else if (cDash !== false && fm.options.cdns.dash && type === 'mpd') {
29490
  e.stopImmediatePropagation();
 
29491
  if (cDash) {
29492
  loadDash(file);
29493
  } else {
@@ -29508,6 +30684,7 @@ elFinder.prototype.commands.quicklook.plugins = [
29508
  }
29509
  } else if (cFlv !== false && fm.options.cdns.flv && type === 'flv') {
29510
  e.stopImmediatePropagation();
 
29511
  if (cFlv) {
29512
  loadFlv(file);
29513
  } else {
@@ -29528,12 +30705,14 @@ elFinder.prototype.commands.quicklook.plugins = [
29528
  }
29529
  );
29530
  }
29531
- } else {
 
 
29532
  if (cVideojs) {
29533
  loadVideojs(file);
29534
  } else {
29535
  fm.loadScript(
29536
- [ 'https://cdnjs.cloudflare.com/ajax/libs/video.js/7.5.0/video.min.js' ],
29537
  function(res) {
29538
  cVideojs = res || window.videojs || false;
29539
  //window.flvjs = stock;
@@ -29545,12 +30724,12 @@ elFinder.prototype.commands.quicklook.plugins = [
29545
  cVideojs = false;
29546
  }
29547
  }
29548
- ).loadCss(['https://cdnjs.cloudflare.com/ajax/libs/video.js/7.5.0/video-js.min.css']);
29549
  }
29550
  }
29551
  }
29552
  }
29553
- }).on('change', reset);
29554
  },
29555
 
29556
  /**
@@ -29575,21 +30754,32 @@ elFinder.prototype.commands.quicklook.plugins = [
29575
  preview.on(ql.evUpdate, function(e) {
29576
  var file = e.file,
29577
  mime = file.mime,
29578
- video,
29579
  setNavi = function() {
29580
  navi.css('bottom', win.hasClass('elfinder-quicklook-fullscreen')? '50px' : '');
29581
  };
29582
 
29583
  if (mimes[file.mime] && ql.dispInlineRegex.test(file.mime)) {
29584
  e.stopImmediatePropagation();
29585
- (video = mime.indexOf('video/') === 0) && ql.hideinfo();
29586
- node = $('<embed src="'+ql.fm.openUrl(file.hash)+'" type="'+mime+'" class="elfinder-quicklook-preview-'+(video ? 'video' : 'audio')+'"/>')
29587
- .appendTo(preview);
29588
-
29589
- win.on('viewchange.embed', setNavi);
29590
- setNavi();
 
 
 
 
 
 
 
 
 
 
 
29591
  }
29592
- }).on('change', function() {
29593
  if (node && node.parent().length) {
29594
  win.off('viewchange.embed');
29595
  node.remove();
@@ -29600,116 +30790,99 @@ elFinder.prototype.commands.quicklook.plugins = [
29600
  },
29601
 
29602
  /**
29603
- * Archive(zip|gzip|tar) preview plugin using https://github.com/imaya/zlib.js
29604
  *
29605
  * @param elFinder.commands.quicklook
29606
  **/
29607
  function(ql) {
29608
  var fm = ql.fm,
29609
- mimes = fm.arrayFlip(['application/zip', 'application/x-gzip', 'application/x-tar']),
29610
  preview = ql.preview,
29611
- unzipFiles = function() {
29612
- /** @type {Array.<string>} */
29613
- var filenameList = [];
29614
- /** @type {number} */
29615
- var i;
29616
- /** @type {number} */
29617
- var il;
29618
- /** @type {Array.<Zlib.Unzip.FileHeader>} */
29619
- var fileHeaderList;
29620
- // need check this.Y when update cdns.zlibUnzip
29621
- this.Y();
29622
- fileHeaderList = this.i;
29623
- for (i = 0, il = fileHeaderList.length; i < il; ++i) {
29624
- // need check fileHeaderList[i].J when update cdns.zlibUnzip
29625
- filenameList[i] = fileHeaderList[i].filename + (fileHeaderList[i].J? ' (' + fm.formatSize(fileHeaderList[i].J) + ')' : '');
29626
- }
29627
- return filenameList;
29628
- },
29629
- tarFiles = function(tar) {
29630
- var filenames = [],
29631
- tarlen = tar.length,
29632
- offset = 0,
29633
- toStr = function(arr) {
29634
- return String.fromCharCode.apply(null, arr).replace(/\0+$/, '');
29635
- },
29636
- h, name, prefix, size, dbs;
29637
- while (offset < tarlen && tar[offset] !== 0) {
29638
- h = tar.subarray(offset, offset + 512);
29639
- name = toStr(h.subarray(0, 100));
29640
- if (prefix = toStr(h.subarray(345, 500))) {
29641
- name = prefix + name;
29642
- }
29643
- size = parseInt(toStr(h.subarray(124, 136)), 8);
29644
- dbs = Math.ceil(size / 512) * 512;
29645
- if (name === '././@LongLink') {
29646
- name = toStr(tar.subarray(offset + 512, offset + 512 + dbs));
29647
- }
29648
- (name !== 'pax_global_header') && filenames.push(name + (size? ' (' + fm.formatSize(size) + ')': ''));
29649
- offset = offset + 512 + dbs;
29650
- }
29651
- return filenames;
29652
- },
29653
- Zlib;
29654
 
29655
- if (window.Uint8Array && window.DataView && fm.options.cdns.zlibUnzip && fm.options.cdns.zlibGunzip) {
29656
  preview.on(ql.evUpdate, function(e) {
29657
  var file = e.file,
29658
- isTar = (file.mime === 'application/x-tar');
29659
- if (mimes[file.mime] && (
 
 
29660
  isTar
29661
- || ((typeof Zlib === 'undefined' || Zlib) && (file.mime === 'application/zip' || file.mime === 'application/x-gzip'))
 
29662
  )) {
29663
- var jqxhr, loading, url,
29664
  req = function() {
29665
- url = fm.openUrl(file.hash);
29666
- if (!fm.isSameOrigin(url)) {
29667
- url = fm.openUrl(file.hash, true);
29668
- }
29669
- jqxhr = fm.request({
29670
- data : {cmd : 'get'},
29671
- options : {
29672
- url: url,
29673
- type: 'get',
29674
- cache : true,
29675
- dataType : 'binary',
29676
- responseType :'arraybuffer',
29677
- processData: false
29678
- }
29679
- })
29680
  .fail(function() {
29681
  loading.remove();
29682
  })
29683
  .done(function(data) {
29684
- var unzip, filenames;
 
 
 
 
 
 
 
 
 
 
29685
  try {
29686
- if (file.mime === 'application/zip') {
29687
- unzip = new Zlib.Unzip(new Uint8Array(data));
29688
- //filenames = unzip.getFilenames();
29689
- filenames = unzipFiles.call(unzip);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29690
  } else if (file.mime === 'application/x-gzip') {
29691
- unzip = new Zlib.Gunzip(new Uint8Array(data));
29692
- filenames = tarFiles(unzip.decompress());
29693
- } else if (file.mime === 'application/x-tar') {
29694
- filenames = tarFiles(new Uint8Array(data));
 
 
 
 
 
 
29695
  }
29696
- makeList(filenames);
29697
  } catch (e) {
29698
- loading.remove();
29699
- fm.debug('error', e);
29700
  }
29701
  });
29702
  },
29703
  makeList = function(filenames) {
29704
- var header, doc;
29705
  if (filenames && filenames.length) {
29706
  filenames = $.map(filenames, function(str) {
29707
  return fm.decodeRawString(str);
29708
  });
29709
  filenames.sort();
29710
- loading.remove();
29711
- header = '<strong>'+fm.escape(file.mime)+'</strong> ('+fm.formatSize(file.size)+')'+'<hr/>';
29712
- doc = $('<div class="elfinder-quicklook-preview-archive-wrapper">'+header+'<pre class="elfinder-quicklook-preview-text">'+fm.escape(filenames.join("\n"))+'</pre></div>')
 
 
 
29713
  .on('touchstart', function(e) {
29714
  if ($(this)['scroll' + (fm.direction === 'ltr'? 'Right' : 'Left')]() > 5) {
29715
  e.originalEvent._preventSwipeX = true;
@@ -29718,43 +30891,23 @@ elFinder.prototype.commands.quicklook.plugins = [
29718
  .appendTo(preview);
29719
  ql.hideinfo();
29720
  }
29721
- },
29722
- _Zlib;
29723
 
29724
  // this is our file - stop event propagation
29725
  e.stopImmediatePropagation();
29726
 
29727
- loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"/></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
 
29728
 
29729
  // stop loading on change file if not loaded yet
29730
  preview.one('change', function() {
29731
  jqxhr.state() === 'pending' && jqxhr.reject();
 
29732
  loading.remove();
29733
  });
29734
 
29735
- if (Zlib) {
29736
- req();
29737
- } else {
29738
- if (window.Zlib) {
29739
- _Zlib = window.Zlib;
29740
- delete window.Zlib;
29741
- }
29742
- fm.loadScript(
29743
- [ fm.options.cdns.zlibUnzip, fm.options.cdns.zlibGunzip ],
29744
- function() {
29745
- if (window.Zlib && (Zlib = window.Zlib)) {
29746
- if (_Zlib) {
29747
- window.Zlib = _Zlib;
29748
- } else {
29749
- delete window.Zlib;
29750
- }
29751
- req();
29752
- } else {
29753
- error();
29754
- }
29755
- }
29756
- );
29757
- }
29758
  }
29759
  });
29760
  }
@@ -29775,7 +30928,7 @@ elFinder.prototype.commands.quicklook.plugins = [
29775
  preview.on(ql.evUpdate, function(e) {
29776
  var file = e.file;
29777
  if (mimes[file.mime] && fm.options.cdns.rar && RAR !== false) {
29778
- var loading, url, archive, abort,
29779
  getList = function(url) {
29780
  if (abort) {
29781
  loading.remove();
@@ -29823,12 +30976,13 @@ elFinder.prototype.commands.quicklook.plugins = [
29823
  RAR = false;
29824
  loading.remove();
29825
  },
29826
- _RAR;
29827
 
29828
  // this is our file - stop event propagation
29829
  e.stopImmediatePropagation();
29830
 
29831
- loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"/></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
 
29832
 
29833
  // stop loading on change file if not loaded yet
29834
  preview.one('change', function() {
@@ -29837,44 +30991,48 @@ elFinder.prototype.commands.quicklook.plugins = [
29837
  abort = true;
29838
  });
29839
 
29840
- url = fm.openUrl(file.hash);
29841
- if (!fm.isSameOrigin(url)) {
29842
- url = fm.openUrl(file.hash, true);
29843
- }
29844
- if (RAR) {
29845
- getList(url);
29846
- } else {
29847
- if (window.RarArchive) {
29848
- _RAR = window.RarArchive;
29849
- delete window.RarArchive;
29850
- }
29851
- fm.loadScript(
29852
- [ fm.options.cdns.rar ],
29853
- function() {
29854
- if (fm.hasRequire) {
29855
- require(['rar'], function(RarArchive) {
29856
- RAR = RarArchive;
29857
- getList(url);
29858
- }, error);
29859
- } else {
29860
- if (RAR = window.RarArchive) {
29861
- if (_RAR) {
29862
- window.RarArchive = _RAR;
29863
  } else {
29864
- delete window.RarArchive;
 
 
 
 
 
 
 
 
 
29865
  }
29866
- getList(url);
29867
- } else {
29868
- error();
 
29869
  }
29870
- }
29871
- },
29872
- {
29873
- tryRequire: true,
29874
- error : error
29875
  }
29876
- );
29877
- }
 
 
 
 
29878
  }
29879
  });
29880
  }
@@ -29901,9 +31059,9 @@ elFinder.prototype.commands.quicklook.plugins = [
29901
 
29902
  preview.on(ql.evUpdate, function(e) {
29903
  var file = e.file;
29904
- if (mimes[file.mime.toLowerCase()] && !fm.option('onetimeUrl', file.hash)) {
29905
  var win = ql.window,
29906
- loading, url;
29907
 
29908
  e.stopImmediatePropagation();
29909
  if (file.url == '1') {
@@ -29914,7 +31072,8 @@ elFinder.prototype.commands.quicklook.plugins = [
29914
  self.html('<span class="elfinder-spinner">');
29915
  fm.request({
29916
  data : {cmd : 'url', target : file.hash},
29917
- preventDefault : true
 
29918
  })
29919
  .always(function() {
29920
  self.html('');
@@ -29939,10 +31098,11 @@ elFinder.prototype.commands.quicklook.plugins = [
29939
  node = null;
29940
  }).addClass('elfinder-overflow-auto');
29941
 
29942
- loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"/></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
 
29943
 
29944
  url = fm.convAbsUrl(fm.url(file.hash));
29945
- node = $('<iframe class="elfinder-quicklook-preview-iframe" scrolling="no"/>')
29946
  .css('background-color', 'transparent')
29947
  .appendTo(preview)
29948
  .on('load', function() {
@@ -29985,9 +31145,9 @@ elFinder.prototype.commands.quicklook.plugins = [
29985
  });
29986
  gMaps = (window.google && google.maps);
29987
  // start load maps
29988
- loadMap = function(file, node) {
29989
  var mapsOpts = ql.options.googleMapsOpts.maps;
29990
- fm.forExternalUrl(file.hash).done(function(url) {
29991
  if (url) {
29992
  try {
29993
  new gMaps.KmlLayer(url, Object.assign({
@@ -30021,9 +31181,11 @@ elFinder.prototype.commands.quicklook.plugins = [
30021
  if (mapScr && mimes[file.mime.toLowerCase()]) {
30022
  var win = ql.window,
30023
  getLink = (file.url == '1' && !fm.option('onetimeUrl', file.hash)),
30024
- loading, url, node;
30025
 
30026
  e.stopImmediatePropagation();
 
 
30027
  if (getLink) {
30028
  preview.hide();
30029
  $('<div class="elfinder-quicklook-info-data"><button class="elfinder-info-button">'+fm.i18n('getLink')+'</button></div>').appendTo(ql.info.find('.elfinder-quicklook-info'))
@@ -30032,9 +31194,11 @@ elFinder.prototype.commands.quicklook.plugins = [
30032
  self.html('<span class="elfinder-spinner">');
30033
  fm.request({
30034
  data : {cmd : 'url', target : file.hash},
30035
- preventDefault : true
 
30036
  })
30037
  .always(function() {
 
30038
  self.html('');
30039
  })
30040
  .done(function(data) {
@@ -30051,7 +31215,7 @@ elFinder.prototype.commands.quicklook.plugins = [
30051
  });
30052
  }
30053
  if (file.url !== '' && !getLink) {
30054
- node = $('<div style="width:100%;height:100%;"/>').appendTo(preview);
30055
  preview.one('change', function() {
30056
  node.remove();
30057
  node = null;
@@ -30059,10 +31223,10 @@ elFinder.prototype.commands.quicklook.plugins = [
30059
  if (!gMaps) {
30060
  fm.loadScript([mapScr], function() {
30061
  gMaps = window.google && google.maps;
30062
- gMaps && loadMap(file, node);
30063
  });
30064
  } else {
30065
- loadMap(file, node);
30066
  }
30067
  }
30068
  }
@@ -30116,7 +31280,7 @@ elFinder.prototype.commands.quicklook.plugins = [
30116
  if (enable) {
30117
  preview.on(ql.evUpdate, function(e) {
30118
  var file = e.file,
30119
- type;
30120
  // 25MB is maximum filesize of Google Docs prevew
30121
  if (file.size <= 26214400 && (type = mimes[file.mime])) {
30122
  var win = ql.window,
@@ -30125,7 +31289,7 @@ elFinder.prototype.commands.quicklook.plugins = [
30125
  },
30126
  ext = fm.mimeTypes[file.mime],
30127
  getLink = (file.url == '1' && !fm.option('onetimeUrl', file.hash)),
30128
- loading, url;
30129
 
30130
  if (type === 'm') {
30131
  if ((mLimits[ext] && file.size > mLimits[ext]) || file.size > mLimits.other) {
@@ -30161,33 +31325,47 @@ elFinder.prototype.commands.quicklook.plugins = [
30161
  if (file.url !== '' && !getLink) {
30162
  e.stopImmediatePropagation();
30163
  preview.one('change', function() {
 
30164
  win.off('viewchange.googledocs');
30165
  loading.remove();
30166
  node.off('load').remove();
30167
  node = null;
30168
  }).addClass('elfinder-overflow-auto');
30169
 
30170
- loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"/></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
30171
-
30172
- node = $('<iframe class="elfinder-quicklook-preview-iframe"/>')
 
30173
  .css('background-color', 'transparent')
30174
  .appendTo(preview);
30175
 
30176
- fm.forExternalUrl(file.hash).done(function(url) {
 
 
 
 
 
 
 
 
 
30177
  if (url) {
30178
  if (file.ts) {
30179
  url += (url.match(/\?/)? '&' : '?') + '_t=' + file.ts;
30180
  }
30181
  node.on('load', function() {
 
30182
  ql.hideinfo();
30183
  loading.remove();
30184
  ql.preview.after(ql.info);
30185
  $(this).css('background-color', '#fff').show();
30186
  })
30187
  .on('error', function() {
 
30188
  loading.remove();
30189
  ql.preview.after(ql.info);
30190
- }).attr('src', 'https://' + urls[type] + encodeURIComponent(url));
 
30191
  } else {
30192
  loading.remove();
30193
  node.remove();
@@ -30210,82 +31388,119 @@ elFinder.prototype.commands.quicklook.plugins = [
30210
  * @param elFinder.commands.quicklook
30211
  **/
30212
  function(ql) {
30213
- var fm = ql.fm,
 
30214
  preview = ql.preview,
30215
- textMaxlen = parseInt(ql.options.textMaxlen) || 2000,
30216
- prettify = function() {
 
 
 
 
 
 
 
30217
  if (fm.options.cdns.prettify) {
30218
- fm.loadScript([fm.options.cdns.prettify + (fm.options.cdns.prettify.match(/\?/)? '&' : '?') + 'autorun=false']);
30219
- prettify = function() { return true; };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30220
  } else {
30221
- prettify = function() { return false; };
30222
  }
30223
  },
30224
- PRcheck = function(node, cnt) {
30225
- if (prettify()) {
30226
- if (typeof window.PR === 'undefined' && cnt--) {
30227
- setTimeout(function() { PRcheck(node, cnt); }, 100);
30228
- } else {
30229
- if (typeof window.PR === 'object') {
30230
- node.css('cursor', 'wait');
30231
- requestAnimationFrame(function() {
30232
- PR.prettyPrint && PR.prettyPrint(null, node.get(0));
30233
- node.css('cursor', '');
30234
- });
30235
- } else {
30236
- prettify = function() { return false; };
30237
- }
30238
- }
30239
  }
30240
  };
30241
 
30242
  preview.on(ql.evUpdate, function(e) {
30243
  var file = e.file,
30244
  mime = file.mime,
30245
- jqxhr, loading;
30246
 
30247
- if (fm.mimeIsText(file.mime) && (!ql.options.getSizeMax || file.size <= ql.options.getSizeMax)) {
30248
  e.stopImmediatePropagation();
30249
 
30250
- (typeof window.PR === 'undefined') && prettify();
30251
-
30252
- loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"/></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
30253
 
30254
  // stop loading on change file if not loadin yet
30255
  preview.one('change', function() {
30256
  jqxhr.state() == 'pending' && jqxhr.reject();
 
30257
  });
30258
 
30259
  jqxhr = fm.request({
30260
- data : {cmd : 'get', target : file.hash, conv : 1, _t : file.ts},
30261
  options : {type: 'get', cache : true},
30262
- preventDefault : true
 
30263
  })
30264
  .done(function(data) {
30265
  var reg = new RegExp('^(data:'+file.mime.replace(/([.+])/g, '\\$1')+';base64,)', 'i'),
30266
  text = data.content,
30267
- part, more, node, m;
 
 
 
30268
  ql.hideinfo();
30269
  if (window.atob && (m = text.match(reg))) {
30270
  text = atob(text.substr(m[1].length));
30271
  }
30272
 
30273
- more = text.length - textMaxlen;
30274
- if (more > 100) {
30275
- part = text.substr(0, textMaxlen) + '...';
 
30276
  } else {
30277
  more = 0;
30278
  }
30279
-
30280
  node = $('<div class="elfinder-quicklook-preview-text-wrapper"><pre class="elfinder-quicklook-preview-text prettyprint"></pre></div>');
30281
 
30282
  if (more) {
30283
- node.append($('<div class="elfinder-quicklook-preview-charsleft"><hr/><span>' + fm.i18n('charsLeft', fm.toLocaleString(more)) + '</span></div>')
30284
  .on('click', function() {
30285
  var top = node.scrollTop();
30286
  $(this).remove();
30287
  node.children('pre').removeClass('prettyprinted').text(text).scrollTop(top);
30288
- PRcheck(node, 100);
 
 
30289
  })
30290
  );
30291
  }
@@ -30296,10 +31511,37 @@ elFinder.prototype.commands.quicklook.plugins = [
30296
  e.originalEvent._preventSwipeX = true;
30297
  }
30298
  }).appendTo(preview);
30299
-
30300
- PRcheck(node, 100);
 
 
 
 
 
 
 
30301
  })
30302
- .always(function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30303
  loading.remove();
30304
  });
30305
  }
@@ -30319,7 +31561,8 @@ elFinder.prototype.commands.quicklook.plugins = [
30319
  * @author Dmitry (dio) Levashov
30320
  **/
30321
  (elFinder.prototype.commands.reload = function() {
30322
- var self = this,
 
30323
  search = false;
30324
 
30325
  this.alwaysEnabled = true;
@@ -30344,7 +31587,7 @@ elFinder.prototype.commands.quicklook.plugins = [
30344
  if (fm.options.sync >= 1000) {
30345
  self.extra = {
30346
  icon: 'accept',
30347
- node: $('<span/>')
30348
  .attr({title: fm.i18n('autoSync')})
30349
  .on('click touchstart', function(e){
30350
  if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) {
@@ -30413,7 +31656,7 @@ elFinder.prototype.commands.rename = function() {
30413
 
30414
  fm.lockfiles({files : sel});
30415
 
30416
- if (fm.isRoot(file)) {
30417
  if (!(rootNames = fm.storage('rootNames'))) {
30418
  rootNames = {};
30419
  }
@@ -30549,16 +31792,16 @@ elFinder.prototype.commands.rename = function() {
30549
  prefix = $(tplr),
30550
  suffix = $(tplr),
30551
  extention = $(tplr),
30552
- checks = $('<div/>').append(
30553
  mkChk(num, 'plusNumber'),
30554
  mkChk(prefix, 'asPrefix'),
30555
  mkChk(suffix, 'asSuffix'),
30556
  mkChk(extention, 'changeExtention')
30557
  ),
30558
- preview = $('<div class="elfinder-rename-batch-preview"/>'),
30559
- node = $('<div class="elfinder-rename-batch"/>').append(
30560
- $('<div class="elfinder-rename-batch-name"/>').append(name),
30561
- $('<div class="elfinder-rename-batch-type"/>').append(checks),
30562
  preview
30563
  ),
30564
  opts = {
@@ -30659,7 +31902,7 @@ elFinder.prototype.commands.rename = function() {
30659
  isRoot = fm.isRoot(sel[0]);
30660
  }
30661
 
30662
- state = (cnt === 1 && (isRoot || !sel[0].locked) || (fm.api > 2.1030 && cnt === $.grep(sel, function(f) {
30663
  if (!brk && !f.locked && f.phash === phash && !fm.isRoot(f) && (mime === f.mime || ext === fm.splitFileExtention(f.name)[1].toLowerCase())) {
30664
  return true;
30665
  } else {
@@ -30676,7 +31919,7 @@ elFinder.prototype.commands.rename = function() {
30676
  if (state !== -1 && cnt > 1) {
30677
  self.extra = {
30678
  icon: 'preference',
30679
- node: $('<span/>')
30680
  .attr({title: fm.i18n('batchRename')})
30681
  .on('click touchstart', function(e){
30682
  if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) {
@@ -30838,7 +32081,7 @@ elFinder.prototype.commands.rename = function() {
30838
  }
30839
  }
30840
  },
30841
- input = $(tarea? '<textarea/>' : '<input type="text"/>')
30842
  .on('keyup text', function(){
30843
  if (tarea) {
30844
  this.style.height = '1px';
@@ -30989,7 +32232,8 @@ elFinder.prototype.commands.rename = function() {
30989
  **/
30990
  elFinder.prototype.commands.resize = function() {
30991
  "use strict";
30992
- var losslessRotate = 0,
 
30993
  getBounceBox = function(w, h, theta) {
30994
  var srcPts = [
30995
  {x: w/2, y: h/2},
@@ -31020,13 +32264,12 @@ elFinder.prototype.commands.resize = function() {
31020
  this.updateOnSelect = false;
31021
 
31022
  this.getstate = function() {
31023
- var sel = this.fm.selectedFiles();
31024
  return sel.length == 1 && sel[0].read && sel[0].write && sel[0].mime.indexOf('image/') !== -1 ? 0 : -1;
31025
  };
31026
 
31027
  this.resizeRequest = function(data, f, dfrd) {
31028
- var fm = this.fm,
31029
- file = f || fm.file(data.target),
31030
  tmb = file? file.tmb : null,
31031
  enabled = fm.isCommandEnabled('resize', data.target);
31032
 
@@ -31072,7 +32315,6 @@ elFinder.prototype.commands.resize = function() {
31072
 
31073
  this.exec = function(hashes) {
31074
  var self = this,
31075
- fm = this.fm,
31076
  files = this.files(hashes),
31077
  dfrd = $.Deferred(),
31078
  api2 = (fm.api > 1),
@@ -31084,12 +32326,12 @@ elFinder.prototype.commands.resize = function() {
31084
  presetSize = Array.isArray(options.presetSize)? options.presetSize : [],
31085
  clactive = 'elfinder-dialog-active',
31086
  clsediting = fm.res('class', 'editing'),
31087
- open = function(file, id) {
31088
  var isJpeg = (file.mime === 'image/jpeg'),
31089
- dialog = $('<div class="elfinder-resize-container"/>'),
31090
  input = '<input type="number" class="ui-corner-all"/>',
31091
- row = '<div class="elfinder-resize-row"/>',
31092
- label = '<div class="elfinder-resize-label"/>',
31093
  changeTm = null,
31094
  operate = false,
31095
  opStart = function() { operate = true; },
@@ -31099,7 +32341,7 @@ elFinder.prototype.commands.resize = function() {
31099
  control.trigger('change');
31100
  }
31101
  },
31102
- control = $('<div class="elfinder-resize-control"/>')
31103
  .on('focus', 'input[type=text],input[type=number]', function() {
31104
  $(this).trigger('select');
31105
  })
@@ -31145,7 +32387,10 @@ elFinder.prototype.commands.resize = function() {
31145
  ctx.restore();
31146
  }
31147
  canvas.toBlob(function(blob) {
31148
- blob && quty.next('span').text(' (' + fm.formatSize(blob.size) + ')');
 
 
 
31149
  }, 'image/jpeg', Math.max(Math.min(quty.val(), 100), 1) / 100);
31150
  }
31151
  }
@@ -31154,7 +32399,7 @@ elFinder.prototype.commands.resize = function() {
31154
  .on('mouseup', 'input', function(e) {
31155
  $(e.target).trigger('change');
31156
  }),
31157
- preview = $('<div class="elfinder-resize-preview"/>')
31158
  .on('touchmove', function(e) {
31159
  if ($(e.target).hasClass('touch-punch')) {
31160
  e.stopPropagation();
@@ -31162,14 +32407,14 @@ elFinder.prototype.commands.resize = function() {
31162
  }
31163
  }),
31164
  spinner = $('<div class="elfinder-resize-loading">'+fm.i18n('ntfloadimg')+'</div>'),
31165
- rhandle = $('<div class="elfinder-resize-handle touch-punch"/>'),
31166
- rhandlec = $('<div class="elfinder-resize-handle touch-punch"/>'),
31167
- uiresize = $('<div class="elfinder-resize-uiresize elfinder-resize-control-panel"/>'),
31168
- uicrop = $('<div class="elfinder-resize-uicrop elfinder-resize-control-panel"/>'),
31169
- uirotate = $('<div class="elfinder-resize-rotate elfinder-resize-control-panel"/>'),
31170
- uideg270 = $('<button/>').attr('title',fm.i18n('rotate-cw')).append($('<span class="elfinder-button-icon elfinder-button-icon-rotate-l"/>')),
31171
- uideg90 = $('<button/>').attr('title',fm.i18n('rotate-ccw')).append($('<span class="elfinder-button-icon elfinder-button-icon-rotate-r"/>')),
31172
- uiprop = $('<span />'),
31173
  reset = $('<button class="elfinder-resize-reset">').text(fm.i18n('reset'))
31174
  .on('click', function() {
31175
  resetView();
@@ -31180,7 +32425,7 @@ elFinder.prototype.commands.resize = function() {
31180
  },
31181
  text: false
31182
  }),
31183
- uitype = $('<div class="elfinder-resize-type"/>')
31184
  .append('<input type="radio" name="type" id="'+id+'-resize" value="resize" checked="checked" /><label for="'+id+'-resize">'+fm.i18n('resize')+'</label>',
31185
  '<input class="api2" type="radio" name="type" id="'+id+'-crop" value="crop" /><label class="api2" for="'+id+'-crop">'+fm.i18n('crop')+'</label>',
31186
  '<input class="api2" type="radio" name="type" id="'+id+'-rotate" value="rotate" /><label class="api2" for="'+id+'-rotate">'+fm.i18n('rotate')+'</label>'),
@@ -31253,7 +32498,7 @@ elFinder.prototype.commands.resize = function() {
31253
  .on('change', function() {
31254
  rotate.update();
31255
  }),
31256
- uidegslider = $('<div class="elfinder-resize-rotate-slider touch-punch"/>')
31257
  .slider({
31258
  min: 0,
31259
  max: 360,
@@ -31764,11 +33009,11 @@ elFinder.prototype.commands.resize = function() {
31764
  img = $('<img/>')
31765
  .on('load', init)
31766
  .on('error', function() {
31767
- spinner.text('Unable to load image').css('background', 'transparent');
31768
  }),
31769
- basec = $('<div/>'),
31770
  imgc = $('<img/>'),
31771
- coverc = $('<div/>'),
31772
  imgr = $('<img class="elfinder-resize-imgrotate" />'),
31773
  round = function(v, max) {
31774
  v = grid8? Math.round(v/8)*8 : Math.round(v);
@@ -32087,7 +33332,7 @@ elFinder.prototype.commands.resize = function() {
32087
  fm.error('Invalid image size');
32088
  return false;
32089
  }
32090
- if (w == owidth && h == oheight) {
32091
  fm.error('errResizeNoChange');
32092
  return false;
32093
  }
@@ -32188,8 +33433,7 @@ elFinder.prototype.commands.resize = function() {
32188
  hline = 'elfinder-resize-handle-hline',
32189
  vline = 'elfinder-resize-handle-vline',
32190
  rpoint = 'elfinder-resize-handle-point',
32191
- src = fm.openUrl(file.hash),
32192
- canvSrc = fm.openUrl(file.hash, !fm.isSameOrigin(src)),
32193
  sizeImg = quality? $('<img>').attr('crossorigin', fm.isCORS? 'use-credentials' : '').attr('src', canvSrc).on('load', function() {
32194
  try {
32195
  var canv = document.createElement('canvas');
@@ -32268,14 +33512,15 @@ elFinder.prototype.commands.resize = function() {
32268
  if (!presetc.children('span.elfinder-resize-preset:visible').length) {
32269
  presetc.hide();
32270
  }
 
32271
  },
32272
  preset = (function() {
32273
- var sets = $('<fieldset class="elfinder-resize-preset-container">').append($('<legend>').html(fm.i18n('presets'))).hide(),
32274
  hasC;
32275
  $.each(presetSize, function(i, s) {
32276
  if (s.length === 2) {
32277
  hasC = true;
32278
- sets.append($('<span class="elfinder-resize-preset"/>')
32279
  .data('s', s)
32280
  .text(s[0]+'x'+s[1])
32281
  .button()
@@ -32292,10 +33537,11 @@ elFinder.prototype.commands.resize = function() {
32292
  useSaveAs = fm.uploadMimeCheck(file.mime, file.phash),
32293
  dMinBtn, base;
32294
 
 
32295
  uiresize.append(
32296
  $(row).append($(label).text(fm.i18n('width')), width),
32297
  $(row).append($(label).text(fm.i18n('height')), height, $('<div class="elfinder-resize-whctrls">').append(constr, reset)),
32298
- (quality? $(row).append($(label).text(fm.i18n('quality')), quality, $('<span/>')) : $()),
32299
  (isJpeg? $(row).append($(label).text(fm.i18n('8pxgrid')).addClass('elfinder-resize-grid8'), grid8px) : $()),
32300
  $(row).append($(label).text(fm.i18n('scale')), uiprop),
32301
  $(row).append(preset)
@@ -32307,7 +33553,7 @@ elFinder.prototype.commands.resize = function() {
32307
  $(row).append($(label).text('Y')).append(pointY),
32308
  $(row).append($(label).text(fm.i18n('width')), offsetX),
32309
  $(row).append($(label).text(fm.i18n('height')), offsetY, $('<div class="elfinder-resize-whctrls">').append(constrc, reset.clone(true))),
32310
- (quality? $(row).append($(label).text(fm.i18n('quality')), quality.clone(true), $('<span/>')) : $()),
32311
  (isJpeg? $(row).append($(label).text(fm.i18n('8pxgrid')).addClass('elfinder-resize-grid8')) : $()),
32312
  $(row).append(presetc)
32313
  );
@@ -32316,14 +33562,14 @@ elFinder.prototype.commands.resize = function() {
32316
  $(row).addClass('elfinder-resize-degree').append(
32317
  $(label).text(fm.i18n('rotate')),
32318
  degree,
32319
- $('<span/>').text(fm.i18n('degree')),
32320
- $('<div/>').append(uideg270, uideg90)[ctrgrup]()
32321
  ),
32322
  $(row).css('height', '20px').append(uidegslider),
32323
  ((quality)? $(row)[losslessRotate < 1? 'show' : 'hide']().addClass('elfinder-resize-quality').append(
32324
  $(label).text(fm.i18n('quality')),
32325
  quality.clone(true),
32326
- $('<span/>')) : $()
32327
  ),
32328
  $(row).append($(label).text(fm.i18n('bgcolor')), bg, picker, reseter),
32329
  $(row).css('height', '20px').append(pallet)
@@ -32348,30 +33594,30 @@ elFinder.prototype.commands.resize = function() {
32348
  control.append(/*$(row), */uiresize);
32349
  }
32350
 
32351
- rhandle.append('<div class="'+hline+' '+hline+'-top"/>',
32352
- '<div class="'+hline+' '+hline+'-bottom"/>',
32353
- '<div class="'+vline+' '+vline+'-left"/>',
32354
- '<div class="'+vline+' '+vline+'-right"/>',
32355
- '<div class="'+rpoint+' '+rpoint+'-e"/>',
32356
- '<div class="'+rpoint+' '+rpoint+'-se"/>',
32357
- '<div class="'+rpoint+' '+rpoint+'-s"/>');
32358
 
32359
  preview.append(spinner).append(rhandle.hide()).append(img.hide());
32360
 
32361
  if (api2) {
32362
  rhandlec.css('position', 'absolute')
32363
- .append('<div class="'+hline+' '+hline+'-top"/>',
32364
- '<div class="'+hline+' '+hline+'-bottom"/>',
32365
- '<div class="'+vline+' '+vline+'-left"/>',
32366
- '<div class="'+vline+' '+vline+'-right"/>',
32367
- '<div class="'+rpoint+' '+rpoint+'-n"/>',
32368
- '<div class="'+rpoint+' '+rpoint+'-e"/>',
32369
- '<div class="'+rpoint+' '+rpoint+'-s"/>',
32370
- '<div class="'+rpoint+' '+rpoint+'-w"/>',
32371
- '<div class="'+rpoint+' '+rpoint+'-ne"/>',
32372
- '<div class="'+rpoint+' '+rpoint+'-se"/>',
32373
- '<div class="'+rpoint+' '+rpoint+'-sw"/>',
32374
- '<div class="'+rpoint+' '+rpoint+'-nw"/>');
32375
 
32376
  preview.append(basec.css('position', 'absolute').hide().append(imgc, rhandlec.append(coverc)));
32377
 
@@ -32396,12 +33642,39 @@ elFinder.prototype.commands.resize = function() {
32396
  resizable : false,
32397
  buttons : buttons,
32398
  open : function() {
32399
- var substituteImg = (fm.option('substituteImg', file.hash) && file.size > options.dimSubImgSize)? true : false,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32400
  hasSize = (file.width && file.height)? true : false;
32401
- dialog.parent().css('overflow', 'hidden');
32402
  dMinBtn = base.find('.ui-dialog-titlebar .elfinder-titlebar-minimize').hide();
32403
  fm.bind('resize', dinit);
32404
- img.attr('src', src);
 
 
32405
  imgc.attr('src', src);
32406
  imgr.attr('src', src);
32407
  if (api2) {
@@ -32413,24 +33686,8 @@ elFinder.prototype.commands.resize = function() {
32413
  return init();
32414
  }
32415
  if (file.size > (options.getDimThreshold || 0)) {
32416
- dimreq = fm.request({
32417
- data : {cmd : 'dim', target : file.hash, substitute : (substituteImg? 400 : '')},
32418
- preventDefault : true
32419
- })
32420
- .done(function(data) {
32421
- if (data.dim) {
32422
- var dim = data.dim.split('x');
32423
- file.width = dim[0];
32424
- file.height = dim[1];
32425
- setdim(dim);
32426
- if (data.url) {
32427
- img.attr('src', data.url);
32428
- imgc.attr('src', data.url);
32429
- imgr.attr('src', data.url);
32430
- }
32431
- return init();
32432
- }
32433
- });
32434
  } else if (hasSize) {
32435
  return init();
32436
  }
@@ -32474,7 +33731,7 @@ elFinder.prototype.commands.resize = function() {
32474
 
32475
  },
32476
 
32477
- id, dialog
32478
  ;
32479
 
32480
 
@@ -32490,7 +33747,10 @@ elFinder.prototype.commands.resize = function() {
32490
  return dfrd.resolve();
32491
  }
32492
 
32493
- open(files[0], id);
 
 
 
32494
 
32495
  return dfrd;
32496
  };
@@ -32962,12 +34222,12 @@ elFinder.prototype.commands.rm = function() {
32962
  "use strict";
32963
  var self = this,
32964
  fm = this.fm,
32965
- tpl = '<div class="ui-helper-clearfix elfinder-rm-title"><span class="elfinder-cwd-icon {class} ui-corner-all"/>{title}<div class="elfinder-rm-desc">{desc}</div></div>',
32966
  confirm = function(dfrd, targets, files, tHash, addTexts) {
32967
  var cnt = targets.length,
32968
  cwd = fm.cwd().hash,
32969
  descs = [],
32970
- spinner = fm.i18n('calc') + '<span class="elfinder-spinner"/>',
32971
  dialog, text, tmb, size, f, fname;
32972
 
32973
  if (cnt > 1) {
@@ -33340,7 +34600,7 @@ elFinder.prototype.commands.rm = function() {
33340
  if (self.value === 'trash') {
33341
  self.extra = {
33342
  icon: 'rm',
33343
- node: $('<span/>')
33344
  .attr({title: fm.i18n('cmdrm')})
33345
  .on('ready', function(e, data) {
33346
  targets = data.targets;
@@ -33483,7 +34743,8 @@ elFinder.prototype.commands.search = function() {
33483
  data.type = sType;
33484
  }
33485
  return data;
33486
- };
 
33487
 
33488
  if (typeof q == 'string' && q) {
33489
  if (typeof target == 'object') {
@@ -33509,10 +34770,11 @@ elFinder.prototype.commands.search = function() {
33509
 
33510
  if (! onlyMimes.length || mime.length) {
33511
  if (target === '' && fm.api >= 2.1) {
 
33512
  $.each(fm.roots, function(id, hash) {
33513
  reqDef.push(fm.request({
33514
  data : setType({cmd : 'search', q : q, target : hash, mimes : mime}),
33515
- notify : {type : 'search', cnt : 1, hideCnt : (reqDef.length? false : true)},
33516
  cancel : true,
33517
  preventDone : true
33518
  }));
@@ -33684,51 +34946,6 @@ elFinder.prototype.commands.selectnone = function() {
33684
  };
33685
 
33686
 
33687
- /*
33688
- * File: /js/commands/share.js
33689
- */
33690
-
33691
- /**
33692
- * @class elFinder command "edit".
33693
- * Edit text file in dialog window
33694
- *
33695
- * @author Dmitry (dio) Levashov, dio@std42.ru
33696
- **/
33697
-
33698
- elFinder.prototype.i18.en.messages['cmdemail'] = 'Email';
33699
- elFinder.prototype._options.commands.push('email');
33700
-
33701
- elFinder.prototype.commands.email= function() {
33702
- "use strict"
33703
-
33704
- var self = this,
33705
- fm = self.fm;
33706
-
33707
- this.exec = function(hashes, cOpts) {
33708
- var sel = hashes || (fm.selected().length? fm.selected() : false) || [fm.cwd().hash],
33709
- site_url = fm.option('url'),
33710
- file_url = fm.url(hashes),
33711
- file = fm.file(sel.shift());
33712
- var email_body = "A file has bee shared to you: " + file.name + " " + file_url;
33713
- email_body = encodeURIComponent(email_body);
33714
- var email_subject = "File shared from " + site_url;
33715
- email_subject = encodeURIComponent(email_subject);
33716
- var email_to = '';
33717
-
33718
- var email_url = 'mailto:toaihimel@gmail.com?subject=' + email_subject + '&body=' + email_body + '&email_to=' + email_to;
33719
-
33720
- window.open(
33721
- email_url,
33722
- '_blank'
33723
- );
33724
- }
33725
-
33726
- this.getstate = function() {
33727
- //return 0 to enable, -1 to disable icon access
33728
- return 0;
33729
- }
33730
- }
33731
-
33732
  /*
33733
  * File: /js/commands/sort.js
33734
  */
@@ -33754,13 +34971,13 @@ elFinder.prototype.commands.sort = function() {
33754
  self.variants.push('|');
33755
  self.variants.push([
33756
  'stick',
33757
- (fm.sortStickFolders? '<span class="ui-icon ui-icon-check"/>' : '') + '&nbsp;' + fm.i18n('sortFoldersFirst')
33758
  ]);
33759
  if (fm.ui.tree && fm.options.sortAlsoTreeview !== null) {
33760
  self.variants.push('|');
33761
  self.variants.push([
33762
  'tree',
33763
- (fm.sortAlsoTreeview? '<span class="ui-icon ui-icon-check"/>' : '') + '&nbsp;' + fm.i18n('sortAlsoTreeview')
33764
  ]);
33765
  }
33766
  updateContextmenu();
@@ -33778,11 +34995,11 @@ elFinder.prototype.commands.sort = function() {
33778
  arr;
33779
  if (name === (i18Name.stick || (i18Name.stick = fm.i18n('sortFoldersFirst')))) {
33780
  if (fm.sortStickFolders) {
33781
- tgt.prepend('<span class="ui-icon ui-icon-check"/>');
33782
  }
33783
  } else if (name === (i18Name.tree || (i18Name.tree = fm.i18n('sortAlsoTreeview')))) {
33784
  if (fm.sortAlsoTreeview) {
33785
- tgt.prepend('<span class="ui-icon ui-icon-check"/>');
33786
  }
33787
  } else if (name === (i18Name[fm.sortType] || (i18Name[fm.sortType] = fm.i18n('sort' + fm.sortType)))) {
33788
  arr = fm.sortOrder === 'asc'? 'n' : 's';
@@ -33825,7 +35042,7 @@ elFinder.prototype.commands.sort = function() {
33825
  if (current) {
33826
  td.addClass('ui-state-active');
33827
  arr = fm.sortOrder == 'asc' ? 'n' : 's';
33828
- $('<span class="ui-icon ui-icon-triangle-1-'+arr+'"/>').appendTo(td);
33829
  }
33830
  $(td).on('click', function(e){
33831
  if (! $(this).data('dragging')) {
@@ -34185,7 +35402,7 @@ elFinder.prototype.commands.upload = function() {
34185
  newItem.trigger('scrolltoview');
34186
  } else {
34187
  if (targetDir.hash !== cwdHash) {
34188
- node = $('<div/>').append(
34189
  $('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"><span class="ui-button-text">'+fm.i18n('cmdopendir')+'</span></button>')
34190
  .on('mouseenter mouseleave', function(e) {
34191
  $(this).toggleClass('ui-state-hover', e.type == 'mouseenter');
@@ -34225,7 +35442,7 @@ elFinder.prototype.commands.upload = function() {
34225
  return $();
34226
  }
34227
 
34228
- return $('<div class="elfinder-upload-dirselect elfinder-tabstop" title="' + fm.i18n('folders') + '"/>')
34229
  .on('click', function(e) {
34230
  e.stopPropagation();
34231
  e.preventDefault();
@@ -34263,7 +35480,7 @@ elFinder.prototype.commands.upload = function() {
34263
  prevNode: base,
34264
  fitHeight: true
34265
  });
34266
- }).append('<span class="elfinder-button-icon elfinder-button-icon-dir" />');
34267
  },
34268
  inputButton = function(type, caption) {
34269
  var button,
@@ -34285,7 +35502,7 @@ elFinder.prototype.commands.upload = function() {
34285
  .on('dragover', function(e) {
34286
  e.originalEvent.dataTransfer.dropEffect = 'copy';
34287
  }),
34288
- form = $('<form/>').append(input).on('click', function(e) {
34289
  e.stopPropagation();
34290
  });
34291
 
@@ -34419,7 +35636,7 @@ elFinder.prototype.commands.upload = function() {
34419
  });
34420
  };
34421
 
34422
- dialog = $('<div class="elfinder-upload-dialog-wrapper"/>')
34423
  .append(inputButton('multiple', 'selectForUpload'));
34424
 
34425
  if (! fm.UA.Mobile && (function(input) {
@@ -34432,8 +35649,8 @@ elFinder.prototype.commands.upload = function() {
34432
  if (targetDir.hash === cwdHash || fm.navHash2Elm(targetDir.hash).hasClass('elfinder-subtree-loaded')) {
34433
  getSelector().appendTo(dialog);
34434
  } else {
34435
- spinner = $('<div class="elfinder-upload-dirselect" title="' + fm.i18n('nowLoading') + '"/>')
34436
- .append('<span class="elfinder-button-icon elfinder-button-icon-spinner" />')
34437
  .appendTo(dialog);
34438
  fm.request({cmd : 'tree', target : targetDir.hash})
34439
  .done(function() {
@@ -34558,7 +35775,7 @@ elFinder.prototype.commands.view = function() {
34558
 
34559
  this.extra = {
34560
  icon: 'menu',
34561
- node: $('<span/>')
34562
  .attr({title: fm.i18n('viewtype')})
34563
  .on('click touchstart', function(e){
34564
  if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) {
@@ -34577,7 +35794,9 @@ elFinder.prototype.commands.view = function() {
34577
 
34578
  this.exec = function() {
34579
  var self = this,
34580
- value = fm.storage('view', this.value == 'list' ? 'icons' : 'list');
 
 
34581
  return fm.lazy(function() {
34582
  fm.viewchange();
34583
  self.update(void(0), value);
@@ -34626,7 +35845,7 @@ elFinder.prototype.commands.view = function() {
34626
  }).bind('contextmenucreate', function() {
34627
  self.extra = {
34628
  icon: 'menu',
34629
- node: $('<span/>')
34630
  .attr({title: fm.i18n('cmdview')})
34631
  .on('click touchstart', function(e){
34632
  if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) {
1
  /*!
2
  * elFinder - file manager for web
3
+ * Version 2.1.57 (2021-01-08)
4
  * http://elfinder.org
5
  *
6
+ * Copyright 2009-2021, Studio 42
7
  * Licensed under a 3-clauses BSD license
8
  */
9
  (function(root, factory) {
73
  * @see this.destroy
74
  * @type jQuery
75
  **/
76
+ prevContent = $('<div></div>').append(node.contents()).attr('class', node.attr('class') || '').attr('style', node.attr('style') || ''),
77
 
78
  /**
79
  * Instance ID. Required to get/set cookie
170
  uploadMaxSize : 0,
171
  jpgQuality : 100,
172
  tmbCrop : false,
173
+ tmbReqCustomData : false,
174
  tmb : false // old API
175
  },
176
 
331
  // NOTES: Do not touch data object
332
 
333
  var volumeid, contextmenu, emptyDirs = {}, stayDirs = {},
334
+ rmClass, hashes, calc, gc, collapsed, prevcwd, sorterStr, diff;
335
 
336
  if (self.api >= 2.1) {
337
  // support volume driver option `uiCmdMap`
424
  cache(data.files);
425
  if (!files[cwd]) {
426
  cache([data.cwd]);
427
+ } else {
428
+ diff = self.diff([data.cwd], true);
429
+ if (diff.changed.length) {
430
+ cache(diff.changed, 'change');
431
+ self.change({changed: diff.changed});
432
+ }
433
  }
434
+ data.changed && data.changed.length && cache(data.changed, 'change');
435
 
436
  // trigger event 'sorterupdate'
437
  sorterStr = JSON.stringify(self.sorters);
453
  * @return void
454
  **/
455
  cache = function(data, type) {
456
+ var type = type || 'files',
457
+ keeps = ['sizeInfo', 'encoding'],
458
+ defsorter = { name: true, perm: true, date: true, size: true, kind: true },
459
+ sorterChk = !self.sorters._checked && (type === 'files'),
460
  l = data.length,
461
  setSorter = function(file) {
462
  var f = file || {},
469
  self.sorters = self.arrayFlip(sorters, true);
470
  self.sorters._checked = true;
471
  },
 
472
  changedParents = {},
473
  hideData = self.storage('hide') || {},
474
  hides = hideData.items || {},
475
+ f, i, i1, keepProp, parents, hidden;
476
 
477
  for (i = 0; i < l; i++) {
478
  f = Object.assign({}, data[i]);
484
  sorterChk = false;
485
  }
486
 
487
+ if (f.phash && (type === 'add' || (type === 'change' && (!files[f.hash] || f.size !== files[f.hash])))) {
488
  if (parents = self.parents(f.phash)) {
489
  $.each(parents, function() {
490
  changedParents[this] = true;
494
  }
495
 
496
  if (files[f.hash]) {
497
+ for (i1 =0; i1 < keeps.length; i1++) {
498
+ if(files[f.hash][keeps[i1]] && ! f[keeps[i1]]) {
499
+ f[keeps[i1]] = files[f.hash][keeps[i1]];
500
  }
501
+ }
502
  if (f.sizeInfo && !f.size) {
503
  f.size = f.sizeInfo.size;
504
  }
609
  *
610
  * @param Array changed file objects
611
  * @return void
612
+ * @deprecated should be use `cache(updatesArrayData, 'change');`
613
  */
614
  change = function(changed) {
615
  $.each(changed, function(i, file) {
668
  requestQueue = [],
669
 
670
  /**
671
+ * Current open command instance
672
  *
673
+ * @type Object
674
  */
675
+ currentOpenCmd = null,
676
+
677
  /**
678
  * Exec shortcut
679
  *
1046
  if (l = handlers.length) {
1047
  event = $.Event(type);
1048
  if (data) {
1049
+ data._getEvent = function() {
1050
+ return event;
1051
+ };
1052
  }
1053
  if (allowModify) {
1054
  event.data = data;
1128
 
1129
  // set fm.baseUrl
1130
  this.baseUrl = (function() {
1131
+ var myTag, base, baseUrl;
1132
 
1133
  if (self.options.baseUrl) {
1134
  return self.options.baseUrl;
1135
  } else {
1136
  baseUrl = '';
 
1137
  myTag = null;
1138
  $('head > script').each(function() {
1139
+ if (this.src && this.src.match(/js\/elfinder(?:-[a-z0-9_-]+)?\.(?:min|full)\.js(?:$|\?)/i)) {
1140
  myTag = $(this);
1141
  return false;
1142
  }
1143
  });
1144
  if (myTag) {
 
 
 
 
 
1145
  baseUrl = myTag.attr('src').replace(/js\/[^\/]+$/, '');
1146
  if (! baseUrl.match(/^(https?\/\/|\/)/)) {
1147
  // check <base> tag
1172
  // auto load required CSS
1173
  if (this.options.cssAutoLoad) {
1174
  (function() {
1175
+ var baseUrl = self.baseUrl,
1176
+ myCss = $('head > link[href$="css/elfinder.min.css"],link[href$="css/elfinder.full.css"]:first').length,
1177
+ rmTag = function() {
1178
+ if (node.data('cssautoloadHide')) {
1179
+ node.data('cssautoloadHide').remove();
1180
+ node.removeData('cssautoloadHide');
1181
+ }
1182
+ },
1183
+ loaded = function() {
1184
+ if (!self.cssloaded) {
1185
+ rmTag();
1186
+ self.cssloaded = true;
1187
+ self.trigger('cssloaded');
1188
+ }
1189
+ };
1190
 
1191
+ if (! myCss) {
1192
+ // to request CSS auto loading
1193
+ self.cssloaded = null;
1194
+ }
1195
+
1196
  // additional CSS files
1197
  if (Array.isArray(self.options.cssAutoLoad)) {
1198
+ if (!self.options.themes.default) {
1199
+ // set as default theme
1200
+ self.options.themes = Object.assign({
1201
+ 'default' : {
1202
+ 'name': 'default',
1203
+ 'cssurls': self.options.cssAutoLoad
1204
+ }
1205
+ }, self.options.themes);
1206
+ if (!self.options.theme) {
1207
+ self.options.theme = 'default';
1208
+ }
1209
  } else {
1210
+ if (self.cssloaded === true) {
1211
  self.loadCss(self.options.cssAutoLoad);
1212
+ } else {
1213
+ self.bind('cssloaded', function() {
1214
+ self.loadCss(self.options.cssAutoLoad);
1215
+ });
1216
+ }
1217
  }
1218
  }
1219
 
1220
  // try to load main css
1221
  if (self.cssloaded === null) {
1222
  // hide elFinder node while css loading
1223
+ node.addClass('elfinder')
1224
+ .data('cssautoloadHide', $('<style>.elfinder{visibility:hidden;overflow:hidden}</style>'));
1225
  $('head').append(node.data('cssautoloadHide'));
1226
 
1227
  // set default theme
1239
  }
1240
  }
1241
 
1242
+ // Delay 'visibility' check it required for browsers such as Safari
1243
+ requestAnimationFrame(function() {
1244
+ if (node.css('visibility') === 'hidden') {
1245
+ // load CSS
1246
+ self.loadCss([baseUrl+'css/elfinder.min.css'], {
1247
+ dfd: $.Deferred().done(function() {
1248
+ loaded();
1249
+ }).fail(function() {
1250
+ rmTag();
1251
+ if (!self.cssloaded) {
1252
+ self.cssloaded = false;
1253
+ self.bind('init', function() {
1254
+ if (!self.cssloaded) {
1255
+ self.error(['errRead', 'CSS (elfinder.min)']);
1256
+ }
1257
+ });
1258
+ }
1259
+ })
1260
+ });
1261
+ } else {
1262
+ loaded();
1263
+ }
1264
  });
1265
  }
 
1266
  })();
1267
  }
1268
 
1269
  // load theme if exists
1270
+ (function() {
1271
+ var theme,
1272
+ themes = self.options.themes,
1273
+ ids = Object.keys(themes || {});
1274
+ if (ids.length) {
1275
+ theme = self.storage('theme') || self.options.theme;
1276
+ if (!themes[theme]) {
1277
+ theme = ids[0];
1278
+ }
1279
+ if (self.cssloaded) {
1280
+ self.changeTheme(theme);
1281
+ } else {
1282
+ self.bind('cssloaded', function() {
1283
+ self.changeTheme(theme);
1284
+ });
1285
+ }
1286
+ }
1287
+ })();
1288
 
1289
  /**
1290
  * Volume option to set the properties of the root Stat
1982
  }
1983
 
1984
  if (typeof baseUrl === 'undefined') {
1985
+ baseUrl = getBaseUrl();
1986
  }
1987
 
1988
  if (baseUrl) {
1998
  params.current = file.phash;
1999
  }
2000
  return filter(self.options.url + (self.options.url.indexOf('?') === -1 ? '?' : '&') + $.param(params, true));
2001
+ },
2002
+ getBaseUrl = function() {
2003
+ return self.option('url', (!self.isRoot(file) && file.phash) || file.hash);
2004
+ },
2005
  baseUrl, res;
2006
 
2007
  if (!file || !file.read) {
2008
  return async? dfrd.resolve('') : '';
2009
  }
2010
 
2011
+ if (onetm && (!file.url || file.url == '1') && !(baseUrl = getBaseUrl())) {
2012
  async = true;
2013
  this.request({
2014
  data : { cmd : 'url', target : hash, options : { onetime: 1 } },
2015
  preventDefault : true,
2016
  options: {async: async},
2017
+ notify: {type : 'file', cnt : 1, hideCnt : true},
2018
+ progressBar: opts.progressBar
2019
  }).done(function(data) {
2020
  dfrd.resolve(filter(data.url || ''));
2021
  }).fail(function() {
2022
  dfrd.resolve('');
2023
  });
2024
  } else {
2025
+ if (file.url == '1' || (temp && !file.url && !(baseUrl = getBaseUrl()))) {
2026
  this.request({
2027
  data : { cmd : 'url', target : hash, options : { temporary: temp? 1 : 0 } },
2028
  preventDefault : true,
2029
  options: {async: async},
2030
+ notify: async? {type : temp? 'file' : 'url', cnt : 1, hideCnt : true} : {},
2031
+ progressBar: opts.progressBar
2032
  })
2033
  .done(function(data) {
2034
  file.url = data.url || '';
2084
  *
2085
  * @param String file hash
2086
  * @param Boolean for download link
2087
+ * @param Object requestOpts The request options
2088
  * @return String
2089
  */
2090
+ this.openUrl = function(hash, download, callback, requestOpts) {
2091
  var file = files[hash],
2092
+ url = '',
2093
+ onetimeSize = (requestOpts || {}).onetimeSize || (5 * 1024 * 1024);
2094
 
2095
  if (!file || !file.read) {
2096
  return '';
2097
  }
2098
 
2099
+ if (!download || download === 'sameorigin') {
2100
  if (file.url) {
2101
  if (file.url != 1) {
2102
  url = file.url;
2104
  } else if (cwdOptions.url && file.hash.indexOf(self.cwd().volumeid) === 0) {
2105
  url = cwdOptions.url + $.map(this.path2array(hash), function(n) { return encodeURIComponent(n); }).slice(1).join('/');
2106
  }
2107
+ if (!download || this.isSameOrigin(url)) {
2108
+ if (url) {
2109
+ url += (url.match(/\?/)? '&' : '?') + '_'.repeat((url.match(/[\?&](_+)t=/g) || ['&t=']).sort().shift().match(/[\?&](_*)t=/)[1].length + 1) + 't=' + (file.ts || parseInt(+new Date()/1000));
2110
+ if (callback) {
2111
+ callback(url);
2112
+ return;
2113
+ } else {
2114
+ return url;
2115
+ }
2116
+ }
2117
  }
2118
  }
2119
 
2120
+ if (callback && this.hasParrotHeaders()) {
2121
+ if (!requestOpts) {
2122
+ requestOpts = {};
2123
+ } else {
2124
+ delete requestOpts.onetimeSize;
2125
+ }
2126
+ if (!requestOpts.onetime && !requestOpts.temporary && file.size > onetimeSize) {
2127
+ if (file.mime.match(/^video|audio/)) {
2128
+ requestOpts.temporary = true;
2129
+ } else {
2130
+ requestOpts.onetime = true;
2131
+ }
2132
+ }
2133
+ if (requestOpts.onetime || requestOpts.temporary) {
2134
+ return this.url(file.hash, Object.assign({
2135
+ async: true
2136
+ }, requestOpts)).done(function(url) {
2137
+ callback(url);
2138
+ }).fail(function() {
2139
+ callback('');
2140
+ });
2141
+ } else {
2142
+ return this.getContents(hash, 'blob', requestOpts).done(function(blob){
2143
+ url = (window.URL || window.webkitURL).createObjectURL(blob);
2144
+ callback(url);
2145
+ }).fail(function() {
2146
+ callback('');
2147
+ });
2148
+ }
2149
+ } else {
2150
+ url = this.options.url;
2151
+ url = url + (url.indexOf('?') === -1 ? '?' : '&')
2152
+ + (this.oldAPI ? 'cmd=open&current='+file.phash : 'cmd=file')
2153
+ + '&target=' + file.hash
2154
+ + '&_t=' + (file.ts || parseInt(+new Date()/1000));
2155
+
2156
+ if (download === true) {
2157
+ url += '&download=1';
2158
+ }
2159
+
2160
+ $.each(this.customData, function(key, val) {
2161
+ url += '&' + encodeURIComponent(key) + '=' + encodeURIComponent(val);
2162
+ });
2163
+ if (callback) {
2164
+ callback(url);
2165
+ return;
2166
+ } else {
2167
+ return url;
2168
+ }
2169
  }
 
 
 
 
 
 
2170
  };
2171
 
2172
  /**
2178
  this.tmb = function(file) {
2179
  var tmbUrl, tmbCrop,
2180
  cls = 'elfinder-cwd-bgurl',
2181
+ url = '',
2182
+ cData = {},
2183
+ n = 0;
2184
 
2185
  if ($.isPlainObject(file)) {
2186
  if (self.searchStatus.state && file.hash.indexOf(self.cwd().volumeid) !== 0) {
2187
  tmbUrl = self.option('tmbUrl', file.hash);
2188
  tmbCrop = self.option('tmbCrop', file.hash);
2189
  } else {
2190
+ tmbUrl = cwdOptions.tmbUrl;
2191
+ tmbCrop = cwdOptions.tmbCrop;
2192
  }
2193
  if (tmbCrop) {
2194
  cls += ' elfinder-cwd-bgurl-crop';
2202
  url = file.tmb;
2203
  }
2204
  if (url) {
2205
+ if (tmbUrl !== 'self') {
2206
+ if (file.ts) {
2207
+ cData._t = file.ts;
2208
+ }
2209
+ if (cwdOptions.tmbReqCustomData && Object.keys(this.customData).length) {
2210
+ cData = Object.assign(cData, this.customData);
2211
+ }
2212
+ if (Object.keys(cData).length) {
2213
+ url += (url.match(/\?/) ? '&' : '?');
2214
+ $.each(cData, function (key, val) {
2215
+ url += ((n++ === 0)? '' : '&') + encodeURIComponent(key) + '=' + encodeURIComponent(val);
2216
+ });
2217
+ }
2218
  }
2219
  return { url: url, className: cls };
2220
  }
2328
  deffail = !(isBinary || opts.preventDefault || opts.preventFail),
2329
  // call default success callback ?
2330
  defdone = !(isBinary || opts.preventDefault || opts.preventDone),
2331
+ // current progress of receive data
2332
+ prog = opts.progressVal || 20,
2333
+ // timer of fake progress
2334
+ progTm = null,
2335
+ // whether the notification dialog is currently displayed
2336
+ hasNotify= false,
2337
  // options for notify dialog
2338
+ notify = !opts.progressBar? (opts.notify? Object.assign({progress: prog * opts.notify.cnt}, opts.notify) : {}) : {},
2339
  // make cancel button
2340
  cancel = !!opts.cancel,
2341
  // do not normalize data - return as is
2361
  cache : (self.api >= 2.1029), // api >= 2.1029 has unique request ID
2362
  data : data,
2363
  headers : this.customHeaders,
2364
+ xhrFields: this.xhrFields,
2365
+ progress : function(e) {
2366
+ var p = e.loaded / e.total * 100;
2367
+ progTm && clearTimeout(progTm);
2368
+ if (opts.progressBar) {
2369
+ try {
2370
+ opts.progressBar.width(p + '%');
2371
+ } catch(e) {}
2372
+ } else {
2373
+ if (hasNotify && notify.type) {
2374
+ p = p * notify.cnt;
2375
+ if (prog < p) {
2376
+ self.notify({
2377
+ type: notify.type,
2378
+ progress: p - prog,
2379
+ cnt: 0,
2380
+ hideCnt: notify.hideCnt
2381
+ });
2382
+ prog = p;
2383
+ }
2384
+ }
2385
+ }
2386
+ if (opts.progress) {
2387
+ try {
2388
+ opts.progress(e);
2389
+ } catch(e) {}
2390
+ }
2391
+ }
2392
  }, opts.options || {}),
2393
  /**
2394
  * Default success handler.
2406
  self.updateCache(data);
2407
  }
2408
 
 
 
2409
  self.lazy(function() {
2410
  // fire some event to update cache/ui
2411
  data.removed && data.removed.length && self.remove(data);
2499
  * @return void
2500
  **/
2501
  success = function(response) {
 
 
2502
  // Set currrent request command name
2503
  self.currentReqCmd = cmd;
2504
 
2505
+ response.debug && self.responseDebug(response);
 
 
 
 
 
 
2506
 
2507
+ self.setCustomHeaderByXhr(xhr);
2508
+
2509
  if (raw) {
2510
  self.abortXHR(xhr);
2511
  response && response.debug && self.debug('backend-debug', response);
2613
  if ((data || hashes.length) && t.action && (msg = t.action.msg) && (cmd = t.action.cmd) && (!t.action.cwdNot || t.action.cwdNot !== self.cwd().hash)) {
2614
  done = t.action.done;
2615
  data = t.action.data;
2616
+ node = $('<div></div>')
2617
  .append(
2618
  $('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"><span class="ui-button-text">'
2619
  +self.i18n(msg)
2703
  }
2704
 
2705
  if (isOpen) {
2706
+ if (currentOpenCmd && currentOpenCmd.state() === 'pending') {
2707
+ if (currentOpenCmd._target === data.target) {
2708
+ return dfrd.reject('openabort');
2709
+ } else {
2710
+ if (currentOpenCmd.xhr) {
2711
+ currentOpenCmd.xhr.queueAbort();
2712
+ } else {
2713
+ currentOpenCmd.reject('openabort');
2714
+ }
2715
+ }
2716
  }
2717
+ currentOpenCmd = dfrd;
2718
+ currentOpenCmd._target = data.target;
2719
  }
2720
 
2721
  dfrd.always(function() {
2722
  delete options.headers['X-elFinderReqid'];
2723
+ if (isOpen) {
2724
+ currentOpenCmd = null;
2725
+ }
2726
  }).fail(function(error, xhr, response) {
2727
+ var errData, errMsg;
2728
+
2729
+ if (isOpen && error === 'openabort') {
2730
+ error = '';
2731
+ syncOnFail = false;
2732
+ }
2733
+
2734
+ errData = {
2735
  cmd: cmd,
2736
  err: error,
2737
  xhr: xhr,
2749
  }
2750
  // trigger "requestError" event
2751
  self.trigger('requestError', errData);
2752
+ if (errData._getEvent && errData._getEvent().isDefaultPrevented()) {
2753
  deffail = false;
2754
  syncOnFail = false;
2755
  if (error) {
2763
  openDir && openDir.volumeid && self.isRoot(openDir) && delete self.volumeExpires[openDir.volumeid];
2764
  }
2765
  self.trigger(cmd + 'fail', response);
2766
+ errMsg = (typeof error === 'object')? error.error : error;
2767
+ if (errMsg) {
2768
+ deffail ? self.error(errMsg) : self.debug('error', self.i18n(errMsg));
2769
  }
2770
  syncOnFail && self.sync();
2771
  });
2830
  --requestCnt;
2831
  if (requestQueue.length) {
2832
  requestQueue.shift()();
 
 
2833
  }
2834
  }).fail(error).done(success);
2835
 
2876
  opts.eachCancel && (notify.id = +new Date());
2877
  }
2878
  timeout = setTimeout(function() {
2879
+ // start fake count up
2880
+ progTm = setTimeout(progFakeUp, 1000);
2881
  self.notify(notify);
2882
+ hasNotify = true;
2883
  dfrd.always(function() {
2884
  notify.cnt = -(parseInt(notify.cnt)||0);
2885
  self.notify(notify);
2886
+ hasNotify = false;
2887
  });
2888
  }, self.notifyDelay);
2889
 
2892
  });
2893
  }
2894
  // queueing
 
 
 
2895
  if (requestCnt < requestMaxConn) {
2896
  // do request
2897
  return request();
2904
  return dfrd;
2905
  }
2906
  },
2907
+ progFakeUp = function() {
2908
+ var add;
2909
+ if (hasNotify && progTm) {
2910
+ add = 1 * notify.cnt;
2911
+ progTm = null;
2912
+ self.notify({
2913
+ type: notify.type,
2914
+ progress: add,
2915
+ cnt: 0,
2916
+ hideCnt: notify.hideCnt
2917
+ });
2918
+ prog += add;
2919
+ if ((prog / notify.cnt) < 80) {
2920
+ progTm = setTimeout(progFakeUp, 500);
2921
+ }
2922
+ }
2923
+ },
2924
  bindData = {opts: opts, result: true},
2925
  openDir;
2926
 
2954
  * Store info about files/dirs in "files" object.
2955
  *
2956
  * @param Array files
2957
+ * @param String type
2958
  * @return void
2959
  */
2960
+ this.cache = function(dataArray, type) {
2961
  if (! Array.isArray(dataArray)) {
2962
  dataArray = [ dataArray ];
2963
  }
2964
+ cache(dataArray, type);
2965
  };
2966
 
2967
  /**
2976
  data.tree && data.tree.length && cache(data.tree, 'tree');
2977
  data.removed && data.removed.length && remove(data.removed);
2978
  data.added && data.added.length && cache(data.added, 'add');
2979
+ data.changed && data.changed.length && cache(data.changed, 'change');
2980
  }
2981
  };
2982
 
3103
  return c;
3104
  },
3105
  comp = compare(),
3106
+ dfrd = $.Deferred().always(function() { !reqFail && self.trigger('sync'); }),
3107
  opts = [this.request({
3108
  data : {cmd : 'open', reload : 1, target : cwd, tree : (! onlydir && this.ui.tree) ? 1 : 0, compare : comp},
3109
  preventDefault : true
3131
  }
3132
  }
3133
  return parents;
3134
+ },
3135
+ reqFail;
3136
 
3137
  if (! onlydir && self.api >= 2) {
3138
  (cwd !== this.root()) && opts.push(this.request({
3148
  }
3149
  $.when.apply($, opts)
3150
  .fail(function(error, xhr) {
3151
+ reqFail = (xhr && xhr.status != 200);
3152
  if (! polling || $.inArray('errOpen', error) !== -1) {
3153
  dfrd.reject(error);
3154
  self.parseError(error) && self.request({
3405
  * @return jQuery
3406
  */
3407
  this.dialog = function(content, options) {
3408
+ var dialog = $('<div></div>').append(content).appendTo(node).elfinderdialog(options, self),
3409
  dnode = dialog.closest('.ui-dialog'),
3410
  resize = function(){
3411
  ! dialog.data('draged') && dialog.is(':visible') && dialog.elfinderdialog('posInit');
3426
  * @return jQuery
3427
  */
3428
  this.toast = function(options) {
3429
+ return $('<div class="ui-front"></div>').appendTo(this.ui.toast).elfindertoast(options || {}, this);
3430
  };
3431
 
3432
  /**
4113
  if (!self.UA.IE) {
4114
  // keep native xhr object for handling property responseURL
4115
  opts._xhr = new XMLHttpRequest();
4116
+ opts.xhr = function() {
4117
+ if (opts.progress) {
4118
+ opts._xhr.addEventListener('progress', opts.progress);
4119
+ }
4120
+ return opts._xhr;
4121
+ };
4122
  }
4123
  return $.ajax(opts);
4124
  };
4190
  *
4191
  * @param String hash The hash
4192
  * @param String responseType 'blob' or 'arraybuffer' (default)
4193
+ * @param Object requestOpts The request options
4194
  * @return arraybuffer|blob The contents.
4195
  */
4196
+ this.getContents = function(hash, responseType, requestOpts) {
4197
  var self = this,
4198
  dfd = $.Deferred(),
4199
  type = responseType || 'arraybuffer',
4207
  if (!self.isSameOrigin(url)) {
4208
  url = self.openUrl(hash, true);
4209
  }
4210
+ req = self.request(Object.assign({
4211
  data : {cmd : 'get'},
4212
  options : {
4213
  url: url,
4216
  dataType : 'binary',
4217
  responseType : type,
4218
  processData: false
4219
+ },
4220
+ notify : {
4221
+ type: 'file',
4222
+ cnt: 1,
4223
+ hideCnt: true
4224
+ },
4225
+ cancel : true
4226
+ }, requestOpts || {}))
4227
+ .fail(function() {
4228
+ dfd.reject();
4229
  })
4230
+ .done(function(data) {
4231
+ dfd.resolve(data);
4232
+ });
4233
+
4234
+ return dfd;
4235
+ };
4236
+
4237
+ /**
4238
+ * Gets the binary by url.
4239
+ *
4240
+ * @param {Object} opts The options
4241
+ * @param {Function} callback The callback
4242
+ * @param {Object} requestOpts The request options
4243
+ * @return arraybuffer|blob The contents.
4244
+ */
4245
+ this.getBinaryByUrl = function(opts, callback, requestOpts) {
4246
+ var self = this,
4247
+ dfd = $.Deferred(),
4248
+ url, req;
4249
+
4250
+ dfd.fail(function() {
4251
+ req && req.state() === 'pending' && req.reject();
4252
+ });
4253
+
4254
+ req = self.request(Object.assign({
4255
+ data : {cmd : 'get'},
4256
+ options : Object.assign({
4257
+ type: 'get',
4258
+ cache : true,
4259
+ dataType : 'binary',
4260
+ responseType : 'blob',
4261
+ processData: false
4262
+ }, opts)
4263
+ }, requestOpts || {}))
4264
  .fail(function() {
4265
  dfd.reject();
4266
  })
4267
  .done(function(data) {
4268
+ callback && callback(data);
4269
  dfd.resolve(data);
4270
  });
4271
 
4272
  return dfd;
4273
  };
4274
 
4275
+ /**
4276
+ * Gets the mimetype.
4277
+ *
4278
+ * @param {string} name The name
4279
+ * @param {string} orgMime The organization mime
4280
+ * @return {string} The mimetype.
4281
+ */
4282
  this.getMimetype = function(name, orgMime) {
4283
  var mime = orgMime,
4284
  ext, m;
4305
  * Closure of getContentsHashes()
4306
  */
4307
  (function(self) {
4308
+ var hashLibs = {};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4309
 
4310
+ if (window.Worker && window.ArrayBuffer) {
4311
+ // make fm.hashCheckers
4312
+ if (self.options.cdns.sparkmd5) {
4313
+ hashLibs.SparkMD5 = true;
4314
+ self.hashCheckers.push('md5');
4315
+ }
4316
+ if (self.options.cdns.jssha) {
4317
+ hashLibs.jsSHA = true;
4318
+ self.hashCheckers = self.hashCheckers.concat(['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512', 'shake128', 'shake256']);
4319
+ }
4320
  }
4321
 
4322
  /**
4324
  *
4325
  * @param String target target file.hash
4326
  * @param Object needHashes need hash lib names
4327
+ * @param Object requestOpts The request options
4328
  * @return Object hashes with lib name as key
4329
  */
4330
+ self.getContentsHashes = function(target, needHashes, hashOpts, requestOpts) {
4331
  var dfd = $.Deferred(),
4332
  needs = self.arrayFlip(needHashes || ['md5'], true),
4333
  libs = [],
4334
  jobs = [],
4335
  res = {},
4336
+ opts = hashOpts? hashOpts : {
4337
+ shake128len : 256,
4338
+ shake256len : 512
4339
+ },
4340
  req;
4341
 
4342
  dfd.fail(function() {
4343
  req && req.reject();
4344
  });
4345
 
4346
+ if (Object.keys(hashLibs).length) {
4347
+ req = self.getContents(target, 'arraybuffer', requestOpts).done(function(arrayBuffer) {
4348
+ if (needs.md5 && hashLibs.SparkMD5) {
4349
+ jobs.push((function() {
4350
+ var job = $.Deferred();
4351
+ try {
4352
+ var wk = self.getWorker();
4353
+ job.fail(function() {
4354
+ wk && wk.terminate();
4355
+ });
4356
+ wk.onmessage = function(ans) {
4357
+ wk && wk.terminate();
4358
+ if (ans.data.hash) {
4359
+ var f;
4360
+ res.md5 = ans.data.hash;
4361
+ if (f = self.file(target)) {
4362
+ f.md5 = res.md5;
4363
+ }
4364
+ } else if (ans.data.error) {
4365
+ res.md5 = ans.data.error;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4366
  }
4367
  dfd.notify(res);
4368
+ job.resolve();
4369
+ };
4370
+ wk.onerror = function(e) {
4371
+ job.reject();
4372
+ };
4373
+ wk.postMessage({
4374
+ scripts: [self.options.cdns.sparkmd5, self.getWorkerUrl('calcfilehash.js')],
4375
+ data: { type: 'md5', bin: arrayBuffer }
4376
  });
4377
  dfd.fail(function() {
4378
  job.reject();
4379
  });
4380
+ } catch(e) {
4381
+ job.reject();
4382
+ delete hashLibs.SparkMD5;
4383
+ }
4384
+ return job;
4385
+ })());
4386
+ }
4387
+ if (hashLibs.jsSHA) {
4388
+ $.each(['1', '224', '256', '384', '512', '3-224', '3-256', '3-384', '3-512', 'ke128', 'ke256'], function(i, v) {
4389
+ if (needs['sha' + v]) {
4390
+ jobs.push((function() {
4391
+ var job = $.Deferred();
4392
+ try {
4393
+ var wk = self.getWorker();
4394
+ job.fail(function() {
4395
+ wk && wk.terminate();
4396
+ });
4397
+ wk.onmessage = function(ans) {
4398
+ wk && wk.terminate();
4399
+ if (ans.data.hash) {
4400
+ var f;
4401
+ res['sha' + v] = ans.data.hash;
4402
+ if (f = self.file(target)) {
4403
+ f['sha' + v] = res['sha' + v];
4404
+ }
4405
+ } else if (ans.data.error) {
4406
+ res['sha' + v] = ans.data.error;
4407
  }
4408
  dfd.notify(res);
4409
+ job.resolve();
4410
+ };
4411
+ wk.onerror = function(e) {
4412
+ job.reject();
4413
+ };
4414
+ wk.postMessage({
4415
+ scripts: [self.options.cdns.jssha, self.getWorkerUrl('calcfilehash.js')],
4416
+ data: { type: v, bin: arrayBuffer, hashOpts: opts }
4417
  });
4418
+ dfd.fail(function() {
4419
+ job.reject();
4420
+ });
4421
+ } catch(e) {
4422
+ job.reject();
4423
+ delete hashLibs.jsSHA;
4424
+ }
4425
+ return job;
4426
+ })());
4427
+ }
4428
+ });
4429
+ }
4430
+ if (jobs.length) {
4431
+ $.when.apply(null, jobs).always(function() {
4432
+ dfd.resolve(res);
4433
+ });
4434
+ } else {
4435
  dfd.reject();
4436
+ }
4437
+ }).fail(function() {
4438
  dfd.reject();
4439
+ });
4440
+ } else {
4441
+ dfd.reject();
4442
+ }
4443
 
4444
  return dfd;
4445
  };
4539
  Object.assign(opts, e.data.opts);
4540
  }
4541
 
4542
+ self.dialog('<span class="elfinder-dialog-icon elfinder-dialog-icon-error"></span>'+self.i18n(e.data.error), opts);
4543
  } else {
4544
  last = node.children('.elfinder-dialog-error:last').children('.ui-dialog-content:first');
4545
  counter = last.children('.elfinder-error-counter');
4730
  soundPath = this.baseUrl + soundPath;
4731
  }
4732
 
4733
+ if (this.options.parrotHeaders && Array.isArray(this.options.parrotHeaders) && this.options.parrotHeaders.length) {
4734
+ this.parrotHeaders = this.options.parrotHeaders;
4735
+ // check sessionStorage
4736
+ $.each(this.parrotHeaders, function(i, h) {
4737
+ var v = self.sessionStorage('core-ph:' + h);
4738
+ if (v) {
4739
+ self.customHeaders[h] = v;
4740
+ }
4741
+ });
4742
+ } else {
4743
+ this.parrotHeaders = [];
4744
+ }
4745
+
4746
  self.one('opendone', function() {
4747
  var tm;
4748
  // attach events to document
4843
  $(window).on('message.' + namespace, function(e){
4844
  var res = e.originalEvent || null,
4845
  obj, data;
4846
+ if (res && (self.convAbsUrl(self.options.url).indexOf(res.origin) === 0 || self.convAbsUrl(self.uploadURL).indexOf(res.origin) === 0)) {
4847
  try {
4848
  obj = JSON.parse(res.data);
4849
  data = obj.data || null;
4906
  ! self.enabled() && self.enable();
4907
  });
4908
  }
4909
+
4910
+ // When the browser tab turn to foreground/background
4911
+ $(window).on('visibilitychange.' + namespace, function(e) {
4912
+ var background = document.hidden || document.webkitHidden || document.msHidden;
4913
+ // AutoSync turn On/Off
4914
+ if (self.options.syncStart) {
4915
+ self.autoSync(background? 'stop' : void(0));
4916
+ }
4917
+ });
4918
  });
4919
 
4920
  // store instance in node
5178
  },
5179
  helper : function(e, ui) {
5180
  var element = this.id ? $(this) : $(this).parents('[id]:first'),
5181
+ helper = $('<div class="elfinder-drag-helper"><span class="elfinder-drag-helper-icon-status"></span></div>'),
5182
  icon = function(f) {
5183
  var mime = f.mime, i, tmb = self.tmb(f);
5184
+ i = '<div class="elfinder-cwd-icon elfinder-cwd-icon-drag '+self.mime2class(mime)+' ui-corner-all"></div>';
5185
  if (tmb) {
5186
  i = $(i).addClass(tmb.className).css('background-image', "url('"+tmb.url+"')").get(0).outerHTML;
5187
  } else if (f.icon) {
5291
  **/
5292
  self.ui = {
5293
  // container for nav panel and current folder container
5294
+ workzone : $('<div></div>').appendTo(node).elfinderworkzone(self),
5295
+ // contaainer for folders tree / places
5296
+ navbar : $('<div></div>').appendTo(node).elfindernavbar(self, self.options.uiOptions.navbar || {}),
5297
  // container for for preview etc at below the navbar
5298
+ navdock : $('<div></div>').appendTo(node).elfindernavdock(self, self.options.uiOptions.navdock || {}),
5299
  // contextmenu
5300
+ contextmenu : $('<div></div>').appendTo(node).elfindercontextmenu(self),
5301
  // overlay
5302
+ overlay : $('<div></div>').appendTo(node).elfinderoverlay({
5303
  show : function() { self.disable(); },
5304
  hide : function() { prevEnabled && self.enable(); }
5305
  }),
5306
  // current folder container
5307
+ cwd : $('<div></div>').appendTo(node).elfindercwd(self, self.options.uiOptions.cwd || {}),
5308
  // notification dialog window
5309
  notify : self.dialog('', {
5310
+ cssClass : 'elfinder-dialog-notify' + (self.options.notifyDialog.canClose? '' : ' elfinder-titlebar-button-hide'),
5311
  position : self.options.notifyDialog.position,
5312
  absolute : true,
5313
  resizable : false,
5314
  autoOpen : false,
5315
+ allowMinimize : true,
5316
+ closeOnEscape : self.options.notifyDialog.canClose? true : false,
5317
  title : '&nbsp;',
5318
  width : self.options.notifyDialog.width? parseInt(self.options.notifyDialog.width) : null,
5319
+ minHeight : null,
5320
+ minimize : function() { self.ui.notify.trigger('minimize'); }
5321
  }),
5322
+ statusbar : $('<div class="ui-widget-header ui-helper-clearfix ui-corner-bottom elfinder-statusbar"></div>').hide().appendTo(node),
5323
+ toast : $('<div class="elfinder-toast"></div>').appendTo(node),
5324
+ bottomtray : $('<div class="elfinder-bottomtray">').appendTo(node),
5325
+ progressbar : $('<div class="elfinder-ui-progressbar">').appendTo(node)
5326
  };
5327
 
5328
  self.trigger('uiready');
5338
  self.ui[ui][name](self, opts);
5339
  }
5340
  });
5341
+
5342
+ self.ui.progressbar.appendTo(self.ui.workzone);
5343
+ self.ui.notify.prev('.ui-dialog-titlebar').append('<div class="elfinder-ui-progressbar"></div>');
5344
+
5345
  // update size
5346
  self.resize(width, height);
5347
 
5643
  })();
5644
  }
5645
 
5646
+ // trigger event cssloaded if cssAutoLoad disabled
5647
+ if (self.cssloaded === false) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5648
  self.cssloaded = true;
5649
  self.trigger('cssloaded');
5650
  }
5782
  **/
5783
  UA : (function(){
5784
  var self = this,
5785
+ webkit = !document.unqueID && !window.opera && !window.sidebar && 'localStorage' in window && 'WebkitAppearance' in document.documentElement.style,
5786
  chrome = webkit && window.chrome,
5787
  /*setRotated = function() {
5788
  var a = ((screen && screen.orientation && screen.orientation.angle) || window.orientation || 0) + 0;
5815
  Mobile : typeof window.orientation != "undefined",
5816
  Touch : typeof window.ontouchstart != "undefined",
5817
  iOS : navigator.platform.match(/^iP(?:[ao]d|hone)/),
5818
+ Mac : navigator.platform.match(/^Mac/),
5819
  Fullscreen : (typeof (document.exitFullscreen || document.webkitExitFullscreen || document.mozCancelFullScreen || document.msExitFullscreen) !== 'undefined'),
5820
  Angle : 0,
5821
  Rotated : false,
5836
  return UA;
5837
  })(),
5838
 
5839
+ /**
5840
+ * Is cookie enabled
5841
+ *
5842
+ * @type Boolean
5843
+ */
5844
+ cookieEnabled : window.navigator.cookieEnabled,
5845
+
5846
  /**
5847
  * Has RequireJS?
5848
  *
6074
 
6075
  data = self.normalize(data);
6076
  if (!self.validResponse('upload', data)) {
6077
+ return {error : (data.norError || ['errResponse'])};
6078
  }
6079
  data.removed = $.merge((data.removed || []), $.map(data.added || [], function(f) { return self.file(f.hash)? f.hash : null; }));
6080
  return data;
6438
  var check = [];
6439
  var str = data.files[0];
6440
  if (data.type == 'html') {
6441
+ var tmp = $("<html></html>").append($.parseHTML(str.replace(/ src=/ig, ' _elfsrc='))),
6442
  atag;
6443
  $('img[_elfsrc]', tmp).each(function(){
6444
  var url, purl,
6493
  var self = fm ? fm : this,
6494
  node = self.getUI(),
6495
  xhr = new XMLHttpRequest(),
6496
+ notifyto = null,
6497
+ notifyto1 = null,
6498
+ notifyto2 = null,
6499
  dataChecked = data.checked,
6500
  isDataType = (data.isDataType || data.type == 'data'),
6501
  target = (data.target || self.cwd().hash),
6587
  });
6588
  }
6589
  data.sync && self.sync();
6590
+ if (data.debug) {
6591
+ self.responseDebug(data);
6592
+ fm.debug('backend-debug', data);
6593
+ }
6594
  }
6595
  })
6596
  .always(function() {
6599
  node.off('uploadabort', fnAbort);
6600
  $(window).off('unload', fnAbort);
6601
  notifyto && clearTimeout(notifyto);
6602
+ notifyto1 && clearTimeout(notifyto1);
6603
  notifyto2 && clearTimeout(notifyto2);
6604
  dataChecked && !data.multiupload && checkNotify() && self.notify({type : 'upload', cnt : -cnt, progress : 0, size : 0});
6605
+ notifyto1 && uploadedNtf && self.notify({type : 'chunkmerge', cnt : -cnt});
6606
  chunkMerge && notifyElm.children('.elfinder-notify-chunkmerge').length && self.notify({type : 'chunkmerge', cnt : -1});
6607
  }),
6608
  formData = new FormData(),
6609
  files = data.input ? data.input.files : self.uploads.checkFile(data, self, target),
6610
  cnt = data.checked? (isDataType? files[0].length : files.length) : files.length,
6611
+ isChunked = false,
6612
  loaded = 0,
6613
  prev = 0,
6614
  filesize = 0,
6615
  notify = false,
6616
  notifyElm = self.ui.notify,
6617
  cancelBtn = true,
6618
+ uploadedNtf = false,
6619
  abort = false,
6620
  checkNotify = function() {
6621
  if (!notify && (ntfUpload = notifyElm.children('.elfinder-notify-upload')).length) {
6631
  self.notify({type : 'upload', cnt : ntfUpload.data('cnt') * -1, progress : 0, size : 0});
6632
  }
6633
  },
6634
+ cancelToggle = function(show, hasChunk) {
6635
  ntfUpload.children('.elfinder-notify-cancel')[show? 'show':'hide']();
6636
+ cancelBtn = show;
6637
  },
6638
  startNotify = function(size) {
6639
  if (!size) size = filesize;
6755
  xhr.addEventListener('load', function(e) {
6756
  var status = xhr.status, res, curr = 0, error = '', errData, errObj;
6757
 
6758
+ self.setCustomHeaderByXhr(xhr);
6759
+
6760
  if (status >= 400) {
6761
  if (status > 500) {
6762
  error = 'errResponse';
6771
 
6772
  if (error) {
6773
  node.trigger('uploadabort');
6774
+ getFile(files || {}).done(function(file) {
6775
  return dfrd.reject(file._cid? null : error);
6776
  });
6777
  }
6809
  self.trigger('uploadfail', res);
6810
  // trigger "requestError" event
6811
  self.trigger('requestError', errData);
6812
+ if (errData._getEvent && errData._getEvent().isDefaultPrevented()) {
6813
  res.error = '';
6814
  }
6815
  if (res._chunkfailure || res._multiupload) {
6878
  progress();
6879
  }
6880
 
6881
+ if (!uploadedNtf && loaded >= filesize && !isChunked) {
6882
+ // Use "chunkmerge" for "server-in-process" notification
6883
+ uploadedNtf = true;
6884
+ notifyto1 = setTimeout(function() {
6885
+ self.notify({type : 'chunkmerge', cnt : cnt});
6886
+ }, self.options.notifyDelay);
6887
+ }
6888
+
6889
+ if (cancelBtn && ! data.multiupload && loaded >= filesize) {
6890
+ checkNotify() && cancelToggle(false);
6891
  }
6892
  }
6893
  }, false);
6906
  blobSlice = chunkEnable? false : '',
6907
  blobSize, blobMtime, blobName, i, start, end, chunks, blob, chunk, added, done, last, failChunk,
6908
  multi = function(files, num){
6909
+ var sfiles = [], cid, sfilesLen = 0, cancelChk, hasChunk;
6910
  if (!abort) {
6911
  while(files.length && sfiles.length < num) {
6912
  sfiles.push(files.shift());
6919
  break;
6920
  }
6921
  cid = isDataType? (sfiles[i][0][0]._cid || null) : (sfiles[i][0]._cid || null);
6922
+ hasChunk = (hasChunk || cid)? true : false;
6923
  if (!!failChunk[cid]) {
6924
  last--;
6925
  continue;
6959
  multi(files, 1); // Next one
6960
  } else {
6961
  if (--cancelChk <= 1) {
6962
+ if (cancelBtn) {
6963
+ cancelToggle(false, hasChunk);
6964
+ }
6965
  }
6966
+ dfrd.resolve();
6967
  }
6968
  });
6969
  }
7198
  });
7199
 
7200
  $.each(files, function(i, file) {
7201
+ var name, relpath;
7202
  if (file._chunkmerged) {
7203
  formData.append('chunk', file._chunkmerged);
7204
  formData.append('upload[]', file._name);
7205
  formData.append('mtime[]', file._mtime);
7206
  data.clipdata && formData.append('overwrite', 0);
7207
+ isChunked = true;
7208
  } else {
7209
  if (file._chunkfail) {
7210
  formData.append('upload[]', 'chunkfail');
7227
  name = fm.date(fm.nonameDateFormat) + '.mov';
7228
  }
7229
  }
7230
+ relpath = (file.webkitRelativePath || file.relativePath || file._relativePath || '').replace(/[^\/]+$/, '');
7231
+ name = relpath + name;
7232
  }
7233
  }
7234
  name? formData.append('upload[]', file, name) : formData.append('upload[]', file);
7238
  formData.append('cid' , file._cid);
7239
  formData.append('range', file._range);
7240
  formData.append('mtime[]', file._mtime);
7241
+ isChunked = true;
7242
  } else {
7243
  formData.append('mtime[]', file.lastModified? Math.round(file.lastModified/1000) : 0);
7244
  }
7476
  data.hashes = {};
7477
  }
7478
  result[1] = $.map(result[1], function(p, i) {
7479
+ result[0][i]._relativePath = p.replace(/^\//, '');
7480
  p = p.replace(/\/[^\/]*$/, '');
7481
  if (p === '') {
7482
  return target;
7539
  notify && self.notify({type : 'upload', cnt : -cnt});
7540
 
7541
  setTimeout(function() {
7542
+ msie && $('<iframe src="javascript:false;"></iframe>').appendTo(form);
7543
  form.remove();
7544
  iframe.remove();
7545
  }, 100);
7546
  },
7547
+ iframe = $('<iframe src="'+(msie ? 'javascript:false;' : 'about:blank')+'" name="'+name+'" style="position:absolute;left:-1000px;top:-1000px" ></iframe>')
7548
  .on('load', function() {
7549
  iframe.off('load')
7550
  .on('load', function() {
7744
  }
7745
  return retval;
7746
  },
7747
+
7748
+ /**
7749
+ * Set/get data into/from sessionStorage
7750
+ *
7751
+ * @param String key
7752
+ * @param String|void value
7753
+ * @return String|null
7754
+ */
7755
+ sessionStorage : function(key, val) {
7756
+ var self = this,
7757
+ s, retval, t;
7758
+
7759
+ try {
7760
+ s = window.sessionStorage;
7761
+ } catch(e) {}
7762
+
7763
+ if (!s) {
7764
+ return;
7765
+ }
7766
+
7767
+ if (val === null) {
7768
+ return s.removeItem(key);
7769
+ }
7770
+
7771
+ if (val !== void(0)) {
7772
+ t = typeof val;
7773
+ if (t !== 'string' && t !== 'number') {
7774
+ val = JSON.stringify(val);
7775
+ }
7776
+ try {
7777
+ s.setItem(key, val);
7778
+ } catch (e) {
7779
+ try {
7780
+ s.clear();
7781
+ s.setItem(key, val);
7782
+ } catch (e) {
7783
+ self.debug('error', e.toString());
7784
+ }
7785
+ }
7786
+ }
7787
+ retval = s.getItem(key);
7788
+
7789
+ if (retval && (retval.substr(0,1) === '{' || retval.substr(0,1) === '[')) {
7790
+ try {
7791
+ return JSON.parse(retval);
7792
+ } catch(e) {}
7793
+ }
7794
+ return retval;
7795
+ },
7796
+
7797
  /**
7798
  * Get/set cookie
7799
  *
7807
  name = 'elfinder-'+name+this.id;
7808
 
7809
  if (value === void(0)) {
7810
+ if (this.cookieEnabled && document.cookie && document.cookie != '') {
7811
  c = document.cookie.split(';');
7812
  name += '=';
7813
  for (i=0; i<c.length; i++) {
7826
  return null;
7827
  }
7828
 
7829
+ if (!this.cookieEnabled) {
7830
+ return '';
7831
+ }
7832
+
7833
  o = Object.assign({}, this.options.cookie);
7834
  if (value === null) {
7835
  value = '';
7845
  d.setTime(d.getTime()+(o.expires * 86400000));
7846
  o.expires = d;
7847
  }
7848
+ document.cookie = name+'='+encodeURIComponent(value)+'; expires='+o.expires.toUTCString()+(o.path ? '; path='+o.path : '')+(o.domain ? '; domain='+o.domain : '')+(o.secure ? '; secure' : '')+(o.samesite ? '; samesite='+o.samesite : '');
7849
  if (value && (value.substr(0,1) === '{' || value.substr(0,1) === '[')) {
7850
  try {
7851
  return JSON.parse(value);
7885
  *
7886
  * @type jQuery
7887
  */
7888
+ _node : $('<span></c.length;>'),
7889
 
7890
  /**
7891
  * Replace not html-safe symbols to html entities
7944
  },
7945
  normalizeOptions = function(opts) {
7946
  var getType = function(v) {
7947
+ var type = typeof v;
7948
+ if (type === 'object' && Array.isArray(v)) {
7949
+ type = 'array';
7950
+ }
7951
+ return type;
7952
+ };
7953
  $.each(self.optionProperties, function(k, empty) {
7954
  if (empty !== void(0)) {
7955
  if (opts[k] && getType(opts[k]) !== getType(empty)) {
7957
  }
7958
  }
7959
  });
7960
+ if (opts.disabled) {
7961
+ opts.disabledFlip = self.arrayFlip(opts.disabled, true);
7962
+ $.each(self.options.disabledCmdsRels, function(com, rels) {
7963
+ var m, flg;
7964
+ if (opts.disabledFlip[com]) {
7965
+ flg = true;
7966
+ } else if (m = com.match(/^([^&]+)&([^=]+)=(.*)$/)) {
7967
+ if (opts.disabledFlip[m[1]] && opts[m[2]] == m[3]) {
7968
+ flg = true;
7969
+ }
7970
+ }
7971
+ if (flg) {
7972
+ $.each(rels, function(i, rel) {
7973
+ if (!opts.disabledFlip[rel]) {
7974
+ opts.disabledFlip[rel] = true;
7975
+ opts.disabled.push(rel);
7976
+ }
7977
+ });
7978
+ }
7979
+ });
7980
  } else {
7981
+ opts.disabledFlip = {};
7982
  }
7983
  return opts;
7984
  },
8194
  name, i18, i18nFolderName, prevId, cData;
8195
 
8196
  // set cunstom data
8197
+ if (data.customData && (!self.prevCustomData || (JSON.stringify(data.customData) !== JSON.stringify(self.prevCustomData)))) {
8198
  self.prevCustomData = data.customData;
8199
  try {
8200
  cData = JSON.parse(data.customData);
8495
  * @return elFinder
8496
  */
8497
  notify : function(opts) {
8498
+ var self = this,
8499
+ type = opts.type,
8500
  id = opts.id? 'elfinder-notify-'+opts.id : '',
8501
  msg = this.i18n((typeof opts.msg !== 'undefined')? opts.msg : (this.messages['ntf'+type] ? 'ntf'+type : 'ntfsmth')),
8502
+ hiddens = this.arrayFlip(this.options.notifyDialog.hiddens || []),
8503
  ndialog = this.ui.notify,
8504
+ dialog = ndialog.closest('.ui-dialog'),
8505
  notify = ndialog.children('.elfinder-notify-'+type+(id? ('.'+id) : '')),
8506
  button = notify.children('div.elfinder-notify-cancel').children('button'),
8507
+ ntpl = '<div class="elfinder-notify elfinder-notify-{type}'+(id? (' '+id) : '')+'"><span class="elfinder-dialog-icon elfinder-dialog-icon-{type}"></span><span class="elfinder-notify-msg">{msg}</span> <span class="elfinder-notify-cnt"></span><div class="elfinder-notify-progressbar"><div class="elfinder-notify-progress"></div></div><div class="elfinder-notify-cancel"></div></div>',
8508
+ delta = opts.cnt + 0,
8509
  size = (typeof opts.size != 'undefined')? parseInt(opts.size) : null,
8510
  progress = (typeof opts.progress != 'undefined' && opts.progress >= 0) ? opts.progress : null,
8511
+ fakeint = opts.fakeinterval || 200,
8512
  cancel = opts.cancel,
8513
  clhover = 'ui-state-hover',
8514
  close = function() {
8515
+ var prog = notify.find('.elfinder-notify-progress'),
8516
+ rm = function() {
8517
+ notify.remove();
8518
+ if (!ndialog.children(dialog.data('minimized')? void(0) : ':visible').length) {
8519
+ if (dialog.data('minimized')) {
8520
+ dialog.data('minimized').hide();
8521
+ } else {
8522
+ ndialog.elfinderdialog('close');
8523
+ }
8524
+ }
8525
+ setProgressbar();
8526
+ };
8527
  notify._esc && $(document).off('keydown', notify._esc);
8528
+ if (notify.data('cur') < 100) {
8529
+ prog.animate({
8530
+ width : '100%'
8531
+ }, 50, function() { requestAnimationFrame(function() { rm(); }); });
8532
+ } else {
8533
+ rm();
8534
+ }
8535
+ },
8536
+ fakeUp = function(interval) {
8537
+ var cur;
8538
+ if (notify.length) {
8539
+ cur = notify.data('cur') + 1;
8540
+ if (cur <= 98) {
8541
+ notify.find('.elfinder-notify-progress').width(cur + '%');
8542
+ notify.data('cur', cur);
8543
+ setProgressbar();
8544
+ setTimeout(function() {
8545
+ interval *= 1.05;
8546
+ fakeUp(interval);
8547
+ }, interval);
8548
+ }
8549
+ }
8550
+ },
8551
+ setProgressbar = function() {
8552
+ var cnt = 0,
8553
+ val = 0,
8554
+ ntfs = ndialog.children('.elfinder-notify'),
8555
+ w;
8556
+ if (ntfs.length) {
8557
+ ntfs.each(function() {
8558
+ cnt++;
8559
+ val += Math.min($(this).data('cur'), 100);
8560
+ });
8561
+ w = cnt? Math.floor(val / (cnt * 100) * 100) + '%' : 0;
8562
+ self.ui.progressbar.width(w);
8563
+ if (dialog.data('minimized')) {
8564
+ dialog.data('minimized').title(w);
8565
+ dialog.data('minimized').dialog().children('.ui-dialog-titlebar').children('.elfinder-ui-progressbar').width(w);
8566
+ }
8567
+ } else {
8568
+ self.ui.progressbar.width(0);
8569
+ dialog.data('minimized') && dialog.data('minimized').hide();
8570
+ }
8571
  },
8572
  cnt, total, prc;
8573
 
8576
  }
8577
 
8578
  if (!notify.length) {
8579
+ notify = $(ntpl.replace(/\{type\}/g, type).replace(/\{msg\}/g, msg));
8580
+ if (hiddens[type]) {
8581
+ notify.hide();
8582
+ } else {
8583
+ ndialog.on('minimize', function(e) {
8584
+ dialog.data('minimized') && setProgressbar();
8585
+ });
8586
+ }
8587
+ notify.appendTo(ndialog).data('cnt', 0);
8588
 
8589
  if (progress != null) {
8590
+ notify.data({progress : 0, total : 0, cur : 0});
8591
+ } else {
8592
+ notify.data({cur : 0});
8593
+ fakeUp(fakeint);
8594
  }
8595
 
8596
  if (cancel) {
8597
+ button = $('<span class="elfinder-notify-button ui-icon ui-icon-close" title="'+this.i18n('btnCancel')+'"></span>')
8598
  .on('mouseenter mouseleave', function(e) {
8599
  $(this).toggleClass(clhover, e.type === 'mouseenter');
8600
  });
8601
  notify.children('div.elfinder-notify-cancel').append(button);
8602
  }
8603
+ ndialog.trigger('resize');
8604
  } else if (typeof opts.msg !== 'undefined') {
8605
  notify.children('span.elfinder-notify-msg').html(msg);
8606
  }
8631
  }
8632
 
8633
  !opts.hideCnt && notify.children('.elfinder-notify-cnt').text('('+cnt+')');
8634
+ if (delta > 0 && ndialog.is(':hidden') && !hiddens[type]) {
8635
+ if (dialog.data('minimized')) {
8636
+ dialog.data('minimized').show();
8637
+ } else {
8638
+ ndialog.elfinderdialog('open', this).height('auto');
8639
+ }
8640
+ }
8641
  notify.data('cnt', cnt);
8642
 
8643
  if ((progress != null)
8652
  prc *= 100;
8653
  total = Math.max(1, total);
8654
  }
8655
+ progress = Math.min(parseInt(prc/total), 100);
8656
 
8657
  notify.find('.elfinder-notify-progress')
8658
  .animate({
8659
  width : (progress < 100 ? progress : 100)+'%'
8660
+ }, 20, function() {
8661
+ notify.data('cur', progress);
8662
+ setProgressbar();
8663
+ });
8664
  }
8665
 
8666
  } else {
8759
 
8760
  if (opts.all) {
8761
  options.create = function() {
8762
+ var base = $('<div class="elfinder-dialog-confirm-applyall"></div>');
8763
  checkbox = $('<input type="checkbox" />');
8764
  $(this).next().find('.ui-dialog-buttonset')
8765
  .prepend(base.append($('<label>'+apply+'</label>').prepend(checkbox)));
8770
  opts.optionsCallback(options);
8771
  }
8772
 
8773
+ return this.dialog('<span class="elfinder-dialog-icon elfinder-dialog-icon-confirm"></span>' + this.i18n(opts.text), options);
8774
  },
8775
 
8776
  /**
9419
  }
9420
  }
9421
  });
9422
+ bro.after($('<div></div>').append(select))
9423
  .closest('.ui-dialog').trigger('tabstopsInit');
9424
  select.trigger('focus');
9425
  }
9426
  },
9427
  spinner = function() {
9428
+ return $('<div class="elfinder-netmount-spinner"></div>').append('<span class="elfinder-spinner"></span>');
9429
  },
9430
  xhr;
9431
  return {
9435
  offline : $('<input type="checkbox"/>').on('change', function() {
9436
  $(this).parents('table.elfinder-netmount-tb').find('select:first').trigger('change', 'reset');
9437
  }),
9438
+ host : $('<span><span class="elfinder-spinner"></span></span><input type="hidden"/>'),
9439
  path : $('<input type="text" value="'+opts.root+'"/>'),
9440
  user : $('<input type="hidden"/>'),
9441
+ pass : $('<input type="hidden"/>'),
9442
+ mnt2res : $('<input type="hidden"/>')
9443
  },
9444
  select: function(fm, ev, d){
9445
  var f = this.inputs,
9456
  if (oline.parent().children().length === 1) {
9457
  f.path.parent().prev().html(fm.i18n(opts.pathI18n));
9458
  oline.attr('title', fm.i18n('offlineAccess'));
9459
+ oline.uniqueId().after($('<label></label>').attr('for', oline.attr('id')).html(' '+fm.i18n('offlineAccess')));
9460
  }
9461
  f0.data('inrequest', true).empty().addClass('elfinder-spinner')
9462
  .parent().find('span.elfinder-button-icon').remove();
9478
  p = this.protocol,
9479
  f0 = $(f.host[0]),
9480
  f1 = $(f.host[1]),
9481
+ expires = '&nbsp;',
9482
+ vars = this.vars,
9483
+ chk = function() {
9484
+ if (vars.oauthW && !document.hasFocus() && --vars.chkCnt) {
9485
+ p.trigger('change', 'winfocus');
9486
+ vars.tm = setTimeout(chk, 3000);
9487
+ }
9488
+ },
9489
+ btn;
9490
 
9491
  opts.noOffline && f.offline.closest('tr').hide();
9492
  if (data.mode == 'makebtn') {
9493
  f0.removeClass('elfinder-spinner').removeData('expires').removeData('funcexpup');
9494
+ btn = f.host.find('input').on('mouseenter mouseleave', function(){$(this).toggleClass('ui-state-hover');});
9495
+ if (data.url) {
9496
+ btn.on('click', function() {
9497
+ vars.tm && clearTimeout(vars.tm);
9498
+ vars.oauthW = window.open(data.url);
9499
+ // To correspond to safari, authentication tab sometimes not closing in CORS environment.
9500
+ // This may be a safari bug and may improve in the future.
9501
+ if ((fm.UA.iOS || fm.UA.Mac) && fm.isCORS && !vars.chkdone) {
9502
+ vars.chkCnt = 60;
9503
+ vars.tm = setTimeout(chk, 5000);
9504
+ }
9505
+ });
9506
+ }
9507
  f1.val('');
9508
  f.path.val(opts.root).next().remove();
9509
  f.user.val('');
9510
  f.pass.val('');
9511
  ! opts.noOffline && f.offline.closest('tr').show();
9512
+ vars.mbtn.hide();
9513
  } else if (data.mode == 'folders') {
9514
  if (data.folders) {
9515
  addFolders.call(this, fm, f.path.nextAll(':last'), data.folders);
9516
  }
9517
  } else {
9518
+ if (vars.oauthW) {
9519
+ vars.tm && clearTimeout(vars.tm);
9520
+ vars.oauthW.close();
9521
+ delete vars.oauthW;
9522
+ // The problem that Safari's authentication tab doesn't close only affects the first time.
9523
+ vars.chkdone = true;
9524
+ }
9525
  if (data.expires) {
9526
  expires = '()';
9527
  f0.data('expires', data.expires);
9553
  p.trigger('change', 'reset');
9554
  }));
9555
  f1.val(protocol);
9556
+ vars.mbtn.show();
9557
  if (data.folders) {
9558
  addFolders.call(this, fm, f.path, data.folders);
9559
  }
9560
+ if (data.mnt2res) {
9561
+ f.mnt2res.val('1');
9562
+ }
9563
  f.user.val('done');
9564
  f.pass.val('done');
9565
  f.offline.closest('tr').hide();
9851
  if (dfds) {
9852
  dfds[i] = $.Deferred();
9853
  }
9854
+ if (! $('head > link[href="' + self.escape(url) + '"]').length) {
9855
  link = document.createElement('link');
9856
  link.type = 'text/css';
9857
  link.rel = 'stylesheet';
10104
  if (fileCnt !== false) {
10105
  if (typeof data.fileCnt === 'undefined') {
10106
  fileCnt = false;
10107
+ } else {
10108
+ fileCnt += parseInt(data.fileCnt || 0);
10109
  }
 
10110
  }
10111
  if (dirCnt !== false) {
10112
  if (typeof data.dirCnt === 'undefined') {
10113
  dirCnt = false;
10114
+ } else {
10115
+ dirCnt += parseInt(data.dirCnt || 0);
10116
  }
 
10117
  }
10118
  }
10119
  changed.length && self.change({changed: changed});
10140
 
10141
  return dfrd;
10142
  },
10143
+
10144
+ /**
10145
+ * Worker Object URL for Blob URL of getWorker()
10146
+ */
10147
+ wkObjUrl : null,
10148
+
10149
+ /**
10150
+ * Gets the web worker.
10151
+ *
10152
+ * @param {Object} options The options
10153
+ * @return {Worker} The worker.
10154
+ */
10155
+ getWorker : function(options){
10156
+ // for to make blob URL
10157
+ function woker() {
10158
+ self.onmessage = function(e) {
10159
+ var d = e.data;
10160
+ try {
10161
+ self.data = d.data;
10162
+ if (d.scripts) {
10163
+ for(var i = 0; i < d.scripts.length; i++) {
10164
+ importScripts(d.scripts[i]);
10165
+ }
10166
+ }
10167
+ self.postMessage(self.res);
10168
+ } catch (e) {
10169
+ self.postMessage({error: e.toString()});
10170
+ }
10171
+ };
10172
+ }
10173
+ // get woker
10174
+ var wk;
10175
+ try {
10176
+ if (!this.wkObjUrl) {
10177
+ this.wkObjUrl = (window.URL || window.webkitURL).createObjectURL(new Blob(
10178
+ [woker.toString().replace(/\s+/g, ' ').replace(/ *([^\w]) */g, '$1').replace(/^function\b.+?\{|\}$/g, '')],
10179
+ { type:'text/javascript' }
10180
+ ));
10181
+ }
10182
+ wk = new Worker(this.wkObjUrl, options);
10183
+ } catch(e) {
10184
+ this.debug('error', e.toString());
10185
+ }
10186
+ return wk;
10187
+ },
10188
+
10189
+ /**
10190
+ * Get worker absolute URL by filename
10191
+ *
10192
+ * @param {string} filename The filename
10193
+ * @return {<type>} The worker url.
10194
+ */
10195
+ getWorkerUrl : function(filename) {
10196
+ return this.convAbsUrl(this.baseUrl + 'js/worker/' + filename);
10197
+ },
10198
+
10199
  /**
10200
  * Gets the theme object by settings of options.themes
10201
  *
10280
  });
10281
  }
10282
  });
10283
+ } else if (themeid === 'default' && self.theme && self.theme.id !== 'default') {
10284
  $('head>link.elfinder-theme-ext').remove();
10285
  self.theme = null;
10286
  self.trigger && self.trigger('themechange');
10361
  }
10362
  },
10363
 
10364
+ /**
10365
+ * Sets the custom header by xhr response header with options.parrotHeaders
10366
+ *
10367
+ * @param Object xhr
10368
+ *
10369
+ * @return void
10370
+ */
10371
+ setCustomHeaderByXhr : function(xhr) {
10372
+ var self = this;
10373
+ if (xhr.getResponseHeader && self.parrotHeaders && self.parrotHeaders.length) {
10374
+ $.each(self.parrotHeaders, function(i, h) {
10375
+ var val = xhr.getResponseHeader(h);
10376
+ if (val) {
10377
+ self.customHeaders[h] = val;
10378
+ self.sessionStorage('core-ph:'+h, val);
10379
+ } else if (typeof val === 'string') {
10380
+ delete self.customHeaders[h];
10381
+ self.sessionStorage('core-ph:'+h, null);
10382
+ }
10383
+ });
10384
+ }
10385
+ },
10386
+
10387
+ /**
10388
+ * Determines if parrot headers.
10389
+ *
10390
+ * @return {boolean} True if parrot headers, False otherwise.
10391
+ */
10392
+ hasParrotHeaders : function() {
10393
+ var res = false,
10394
+ phs = this.parrotHeaders;
10395
+ if (Object.keys(this.customHeaders).length) {
10396
+ for (var i = 0; i < phs.length; i++) {
10397
+ if (this.customHeaders[phs[i]]) {
10398
+ res = true;
10399
+ break;
10400
+ }
10401
+ }
10402
+ }
10403
+ return res;
10404
+ },
10405
+
10406
  /**
10407
  * Gets the request identifier
10408
  *
10483
  log : function(m) { window.console && window.console.log && window.console.log(m); return this; },
10484
 
10485
  debug : function(type, m) {
10486
+ var self = this,
10487
+ d = this.options.debug,
10488
+ tb = this.options.toastBackendWarn,
10489
+ tbOpts, showlog;
10490
 
 
 
 
 
10491
  if (type === 'backend-error') {
10492
  if (! this.cwd().hash || (d && (d === 'all' || d['backend-error']))) {
10493
  m = Array.isArray(m)? m : [ m ];
10494
  this.error(m);
10495
  }
10496
+ } else if (type === 'backend-warning') {
10497
+ showlog = true;
10498
+ if (tb) {
10499
+ tbOpts = $.isPlainObject(tb)? tb : {};
10500
+ $.each(Array.isArray(m)? m : [ m ], function(i, m) {
10501
+ self.toast(Object.assign({
10502
+ mode : 'warning',
10503
+ msg: m
10504
+ }, tbOpts));
10505
+ });
10506
+ }
10507
  } else if (type === 'backend-debug') {
10508
  this.trigger('backenddebug', m);
10509
  }
10510
 
10511
+ if (showlog || (d && (d === 'all' || d[type]))) {
10512
+ window.console && window.console.log && window.console.log('elfinder debug: ['+type+'] ['+this.id+']', m);
10513
+ }
10514
+
10515
  return this;
10516
  },
10517
+
10518
+ /**
10519
+ * Parse response.debug and trigger debug
10520
+ *
10521
+ * @param Object response The response
10522
+ */
10523
+ responseDebug : function(response) {
10524
+ var rd = response.debug,
10525
+ d;
10526
+ if (rd) {
10527
+ // set options.debug
10528
+ d = this.options.debug;
10529
+ if (!d || d !== 'all') {
10530
+ if (!d) {
10531
+ d = this.options.debug = {};
10532
+ }
10533
+ d['backend-error'] = true;
10534
+ d['warning'] = true;
10535
+ }
10536
+ if (rd.mountErrors && (typeof rd.mountErrors === 'string' || (Array.isArray(rd.mountErrors) && rd.mountErrors.length))) {
10537
+ this.debug('backend-error', rd.mountErrors);
10538
+ }
10539
+ if (rd.backendErrors && (typeof rd.backendErrors === 'string' || (Array.isArray(rd.backendErrors) && rd.backendErrors.length))) {
10540
+ this.debug('backend-warning', rd.backendErrors);
10541
+ }
10542
+ }
10543
+ },
10544
+
10545
  time : function(l) { window.console && window.console.time && window.console.time(l); },
10546
  timeEnd : function(l) { window.console && window.console.timeEnd && window.console.timeEnd(l); }
10547
 
10710
  *
10711
  * @type String
10712
  **/
10713
+ elFinder.prototype.version = '2.1.57';
10714
 
10715
 
10716
 
10754
 
10755
  /**
10756
  *
10757
+ * jquery.binarytransport
10758
  *
10759
  * @description. jQuery ajax transport for making binary data type requests.
 
 
10760
  *
10761
  */
10762
 
10763
+ (function($, undefined) {
10764
+
10765
+ // use this transport for "binary" data type
10766
+ $.ajaxTransport("+binary", function(options, originalOptions, jqXHR) {
10767
+ // check for conditions and support for blob / arraybuffer response type
10768
+ if (window.FormData && ((options.dataType && (options.dataType == 'binary')) || (options.data && ((window.ArrayBuffer && options.data instanceof ArrayBuffer) || (window.Blob && options.data instanceof Blob))))) {
10769
+ var callback;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10770
 
10771
+ // Cross domain only allowed if supported through XMLHttpRequest
10772
+ return {
10773
+ send: function( headers, complete ) {
10774
+ var i,
10775
+ dataType = options.responseType || "blob",
10776
+ xhr = options.xhr();
10777
+
10778
+ xhr.open(
10779
+ options.type,
10780
+ options.url,
10781
+ options.async,
10782
+ options.username,
10783
+ options.password
10784
+ );
10785
 
10786
+ // Apply custom fields if provided
10787
+ if ( options.xhrFields ) {
10788
+ for ( i in options.xhrFields ) {
10789
+ xhr[ i ] = options.xhrFields[ i ];
 
10790
  }
10791
  }
 
10792
 
10793
+ // Override mime type if needed
10794
+ if ( options.mimeType && xhr.overrideMimeType ) {
10795
+ xhr.overrideMimeType( options.mimeType );
10796
+ }
10797
+
10798
+ // X-Requested-With header
10799
+ // For cross-domain requests, seeing as conditions for a preflight are
10800
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
10801
+ // (it can always be set on a per-request basis or even using ajaxSetup)
10802
+ // For same-domain requests, won't change header if already provided.
10803
+ if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
10804
+ headers[ "X-Requested-With" ] = "XMLHttpRequest";
10805
+ }
10806
+
10807
+ // Set headers
10808
+ for ( i in headers ) {
10809
+ xhr.setRequestHeader( i, headers[ i ] );
10810
+ }
10811
+
10812
+ // Callback
10813
+ callback = function( type ) {
10814
+ return function() {
10815
+ if ( callback ) {
10816
+ callback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = null;
10817
+
10818
+ if ( type === "abort" ) {
10819
+ xhr.abort();
10820
+ } else if ( type === "error" ) {
10821
+ complete(
10822
+ xhr.status,
10823
+ xhr.statusText
10824
+ );
10825
+ } else {
10826
+ var data = {};
10827
+ data[options.dataType] = xhr.response;
10828
+ complete(
10829
+ xhr.status,
10830
+ xhr.statusText,
10831
+ data,
10832
+ xhr.getAllResponseHeaders()
10833
+ );
10834
+ }
10835
+ }
10836
+ };
10837
+ };
10838
+
10839
+ // Listen to events
10840
+ xhr.onload = callback();
10841
+ xhr.onabort = xhr.onerror = xhr.ontimeout = callback( "error" );
10842
+
10843
+ // Create the abort callback
10844
+ callback = callback( "abort" );
10845
+
10846
+ try {
10847
+ xhr.responseType = dataType;
10848
+ // Do send the request (this may raise an exception)
10849
+ xhr.send( options.data || null );
10850
+ } catch ( e ) {
10851
+ if ( callback ) {
10852
+ throw e;
10853
+ }
10854
+ }
10855
+ },
10856
+
10857
+ abort: function() {
10858
+ if ( callback ) {
10859
+ callback();
10860
+ }
10861
+ }
10862
+ };
10863
+ }
10864
+ });
10865
+ })(window.jQuery);
10866
 
10867
  /*!
10868
  * jQuery UI Touch Punch 0.2.3
11175
  * File: /js/elFinder.mimetypes.js
11176
  */
11177
 
11178
+ elFinder.prototype.mimeTypes = {"application\/x-executable":"exe","application\/x-jar":"jar","application\/x-gzip":"gz","application\/x-bzip2":"tbz","application\/x-rar":"rar","text\/x-php":"php","text\/javascript":"js","application\/rtfd":"rtfd","text\/x-python":"py","text\/x-ruby":"rb","text\/x-shellscript":"sh","text\/x-perl":"pl","text\/xml":"xml","text\/x-csrc":"c","text\/x-chdr":"h","text\/x-c++src":"cpp","text\/x-c++hdr":"hh","text\/x-markdown":"md","text\/x-yaml":"yml","image\/x-ms-bmp":"bmp","image\/x-targa":"tga","image\/xbm":"xbm","image\/pxm":"pxm","audio\/wav":"wav","video\/x-dv":"dv","video\/x-ms-wmv":"wm","video\/ogg":"ogm","video\/MP2T":"m2ts","application\/x-mpegURL":"m3u8","application\/dash+xml":"mpd","application\/andrew-inset":"ez","application\/applixware":"aw","application\/atom+xml":"atom","application\/atomcat+xml":"atomcat","application\/atomsvc+xml":"atomsvc","application\/ccxml+xml":"ccxml","application\/cdmi-capability":"cdmia","application\/cdmi-container":"cdmic","application\/cdmi-domain":"cdmid","application\/cdmi-object":"cdmio","application\/cdmi-queue":"cdmiq","application\/cu-seeme":"cu","application\/davmount+xml":"davmount","application\/docbook+xml":"dbk","application\/dssc+der":"dssc","application\/dssc+xml":"xdssc","application\/ecmascript":"ecma","application\/emma+xml":"emma","application\/epub+zip":"epub","application\/exi":"exi","application\/font-tdpfr":"pfr","application\/gml+xml":"gml","application\/gpx+xml":"gpx","application\/gxf":"gxf","application\/hyperstudio":"stk","application\/inkml+xml":"ink","application\/ipfix":"ipfix","application\/java-serialized-object":"ser","application\/java-vm":"class","application\/json":"json","application\/jsonml+json":"jsonml","application\/lost+xml":"lostxml","application\/mac-binhex40":"hqx","application\/mac-compactpro":"cpt","application\/mads+xml":"mads","application\/marc":"mrc","application\/marcxml+xml":"mrcx","application\/mathematica":"ma","application\/mathml+xml":"mathml","application\/mbox":"mbox","application\/mediaservercontrol+xml":"mscml","application\/metalink+xml":"metalink","application\/metalink4+xml":"meta4","application\/mets+xml":"mets","application\/mods+xml":"mods","application\/mp21":"m21","application\/mp4":"mp4s","application\/msword":"doc","application\/mxf":"mxf","application\/octet-stream":"bin","application\/oda":"oda","application\/oebps-package+xml":"opf","application\/ogg":"ogx","application\/omdoc+xml":"omdoc","application\/onenote":"onetoc","application\/oxps":"oxps","application\/patch-ops-error+xml":"xer","application\/pdf":"pdf","application\/pgp-encrypted":"pgp","application\/pgp-signature":"asc","application\/pics-rules":"prf","application\/pkcs10":"p10","application\/pkcs7-mime":"p7m","application\/pkcs7-signature":"p7s","application\/pkcs8":"p8","application\/pkix-attr-cert":"ac","application\/pkix-cert":"cer","application\/pkix-crl":"crl","application\/pkix-pkipath":"pkipath","application\/pkixcmp":"pki","application\/pls+xml":"pls","application\/postscript":"ai","application\/prs.cww":"cww","application\/pskc+xml":"pskcxml","application\/rdf+xml":"rdf","application\/reginfo+xml":"rif","application\/relax-ng-compact-syntax":"rnc","application\/resource-lists+xml":"rl","application\/resource-lists-diff+xml":"rld","application\/rls-services+xml":"rs","application\/rpki-ghostbusters":"gbr","application\/rpki-manifest":"mft","application\/rpki-roa":"roa","application\/rsd+xml":"rsd","application\/rss+xml":"rss","application\/rtf":"rtf","application\/sbml+xml":"sbml","application\/scvp-cv-request":"scq","application\/scvp-cv-response":"scs","application\/scvp-vp-request":"spq","application\/scvp-vp-response":"spp","application\/sdp":"sdp","application\/set-payment-initiation":"setpay","application\/set-registration-initiation":"setreg","application\/shf+xml":"shf","application\/smil+xml":"smi","application\/sparql-query":"rq","application\/sparql-results+xml":"srx","application\/srgs":"gram","application\/srgs+xml":"grxml","application\/sru+xml":"sru","application\/ssdl+xml":"ssdl","application\/ssml+xml":"ssml","application\/tei+xml":"tei","application\/thraud+xml":"tfi","application\/timestamped-data":"tsd","application\/vnd.3gpp.pic-bw-large":"plb","application\/vnd.3gpp.pic-bw-small":"psb","application\/vnd.3gpp.pic-bw-var":"pvb","application\/vnd.3gpp2.tcap":"tcap","application\/vnd.3m.post-it-notes":"pwn","application\/vnd.accpac.simply.aso":"aso","application\/vnd.accpac.simply.imp":"imp","application\/vnd.acucobol":"acu","application\/vnd.acucorp":"atc","application\/vnd.adobe.air-application-installer-package+zip":"air","application\/vnd.adobe.formscentral.fcdt":"fcdt","application\/vnd.adobe.fxp":"fxp","application\/vnd.adobe.xdp+xml":"xdp","application\/vnd.adobe.xfdf":"xfdf","application\/vnd.ahead.space":"ahead","application\/vnd.airzip.filesecure.azf":"azf","application\/vnd.airzip.filesecure.azs":"azs","application\/vnd.amazon.ebook":"azw","application\/vnd.americandynamics.acc":"acc","application\/vnd.amiga.ami":"ami","application\/vnd.android.package-archive":"apk","application\/vnd.anser-web-certificate-issue-initiation":"cii","application\/vnd.anser-web-funds-transfer-initiation":"fti","application\/vnd.antix.game-component":"atx","application\/vnd.apple.installer+xml":"mpkg","application\/vnd.aristanetworks.swi":"swi","application\/vnd.astraea-software.iota":"iota","application\/vnd.audiograph":"aep","application\/vnd.blueice.multipass":"mpm","application\/vnd.bmi":"bmi","application\/vnd.businessobjects":"rep","application\/vnd.chemdraw+xml":"cdxml","application\/vnd.chipnuts.karaoke-mmd":"mmd","application\/vnd.cinderella":"cdy","application\/vnd.claymore":"cla","application\/vnd.cloanto.rp9":"rp9","application\/vnd.clonk.c4group":"c4g","application\/vnd.cluetrust.cartomobile-config":"c11amc","application\/vnd.cluetrust.cartomobile-config-pkg":"c11amz","application\/vnd.commonspace":"csp","application\/vnd.contact.cmsg":"cdbcmsg","application\/vnd.cosmocaller":"cmc","application\/vnd.crick.clicker":"clkx","application\/vnd.crick.clicker.keyboard":"clkk","application\/vnd.crick.clicker.palette":"clkp","application\/vnd.crick.clicker.template":"clkt","application\/vnd.crick.clicker.wordbank":"clkw","application\/vnd.criticaltools.wbs+xml":"wbs","application\/vnd.ctc-posml":"pml","application\/vnd.cups-ppd":"ppd","application\/vnd.curl.car":"car","application\/vnd.curl.pcurl":"pcurl","application\/vnd.dart":"dart","application\/vnd.data-vision.rdz":"rdz","application\/vnd.dece.data":"uvf","application\/vnd.dece.ttml+xml":"uvt","application\/vnd.dece.unspecified":"uvx","application\/vnd.dece.zip":"uvz","application\/vnd.denovo.fcselayout-link":"fe_launch","application\/vnd.dna":"dna","application\/vnd.dolby.mlp":"mlp","application\/vnd.dpgraph":"dpg","application\/vnd.dreamfactory":"dfac","application\/vnd.ds-keypoint":"kpxx","application\/vnd.dvb.ait":"ait","application\/vnd.dvb.service":"svc","application\/vnd.dynageo":"geo","application\/vnd.ecowin.chart":"mag","application\/vnd.enliven":"nml","application\/vnd.epson.esf":"esf","application\/vnd.epson.msf":"msf","application\/vnd.epson.quickanime":"qam","application\/vnd.epson.salt":"slt","application\/vnd.epson.ssf":"ssf","application\/vnd.eszigno3+xml":"es3","application\/vnd.ezpix-album":"ez2","application\/vnd.ezpix-package":"ez3","application\/vnd.fdf":"fdf","application\/vnd.fdsn.mseed":"mseed","application\/vnd.fdsn.seed":"seed","application\/vnd.flographit":"gph","application\/vnd.fluxtime.clip":"ftc","application\/vnd.framemaker":"fm","application\/vnd.frogans.fnc":"fnc","application\/vnd.frogans.ltf":"ltf","application\/vnd.fsc.weblaunch":"fsc","application\/vnd.fujitsu.oasys":"oas","application\/vnd.fujitsu.oasys2":"oa2","application\/vnd.fujitsu.oasys3":"oa3","application\/vnd.fujitsu.oasysgp":"fg5","application\/vnd.fujitsu.oasysprs":"bh2","application\/vnd.fujixerox.ddd":"ddd","application\/vnd.fujixerox.docuworks":"xdw","application\/vnd.fujixerox.docuworks.binder":"xbd","application\/vnd.fuzzysheet":"fzs","application\/vnd.genomatix.tuxedo":"txd","application\/vnd.geogebra.file":"ggb","application\/vnd.geogebra.tool":"ggt","application\/vnd.geometry-explorer":"gex","application\/vnd.geonext":"gxt","application\/vnd.geoplan":"g2w","application\/vnd.geospace":"g3w","application\/vnd.gmx":"gmx","application\/vnd.google-earth.kml+xml":"kml","application\/vnd.google-earth.kmz":"kmz","application\/vnd.grafeq":"gqf","application\/vnd.groove-account":"gac","application\/vnd.groove-help":"ghf","application\/vnd.groove-identity-message":"gim","application\/vnd.groove-injector":"grv","application\/vnd.groove-tool-message":"gtm","application\/vnd.groove-tool-template":"tpl","application\/vnd.groove-vcard":"vcg","application\/vnd.hal+xml":"hal","application\/vnd.handheld-entertainment+xml":"zmm","application\/vnd.hbci":"hbci","application\/vnd.hhe.lesson-player":"les","application\/vnd.hp-hpgl":"hpgl","application\/vnd.hp-hpid":"hpid","application\/vnd.hp-hps":"hps","application\/vnd.hp-jlyt":"jlt","application\/vnd.hp-pcl":"pcl","application\/vnd.hp-pclxl":"pclxl","application\/vnd.hydrostatix.sof-data":"sfd-hdstx","application\/vnd.ibm.minipay":"mpy","application\/vnd.ibm.modcap":"afp","application\/vnd.ibm.rights-management":"irm","application\/vnd.ibm.secure-container":"sc","application\/vnd.iccprofile":"icc","application\/vnd.igloader":"igl","application\/vnd.immervision-ivp":"ivp","application\/vnd.immervision-ivu":"ivu","application\/vnd.insors.igm":"igm","application\/vnd.intercon.formnet":"xpw","application\/vnd.intergeo":"i2g","application\/vnd.intu.qbo":"qbo","application\/vnd.intu.qfx":"qfx","application\/vnd.ipunplugged.rcprofile":"rcprofile","application\/vnd.irepository.package+xml":"irp","application\/vnd.is-xpr":"xpr","application\/vnd.isac.fcs":"fcs","application\/vnd.jam":"jam","application\/vnd.jcp.javame.midlet-rms":"rms","application\/vnd.jisp":"jisp","application\/vnd.joost.joda-archive":"joda","application\/vnd.kahootz":"ktz","application\/vnd.kde.karbon":"karbon","application\/vnd.kde.kchart":"chrt","application\/vnd.kde.kformula":"kfo","application\/vnd.kde.kivio":"flw","application\/vnd.kde.kontour":"kon","application\/vnd.kde.kpresenter":"kpr","application\/vnd.kde.kspread":"ksp","application\/vnd.kde.kword":"kwd","application\/vnd.kenameaapp":"htke","application\/vnd.kidspiration":"kia","application\/vnd.kinar":"kne","application\/vnd.koan":"skp","application\/vnd.kodak-descriptor":"sse","application\/vnd.las.las+xml":"lasxml","application\/vnd.llamagraphics.life-balance.desktop":"lbd","application\/vnd.llamagraphics.life-balance.exchange+xml":"lbe","application\/vnd.lotus-1-2-3":123,"application\/vnd.lotus-approach":"apr","application\/vnd.lotus-freelance":"pre","application\/vnd.lotus-notes":"nsf","application\/vnd.lotus-organizer":"org","application\/vnd.lotus-screencam":"scm","application\/vnd.lotus-wordpro":"lwp","application\/vnd.macports.portpkg":"portpkg","application\/vnd.mcd":"mcd","application\/vnd.medcalcdata":"mc1","application\/vnd.mediastation.cdkey":"cdkey","application\/vnd.mfer":"mwf","application\/vnd.mfmp":"mfm","application\/vnd.micrografx.flo":"flo","application\/vnd.micrografx.igx":"igx","application\/vnd.mif":"mif","application\/vnd.mobius.daf":"daf","application\/vnd.mobius.dis":"dis","application\/vnd.mobius.mbk":"mbk","application\/vnd.mobius.mqy":"mqy","application\/vnd.mobius.msl":"msl","application\/vnd.mobius.plc":"plc","application\/vnd.mobius.txf":"txf","application\/vnd.mophun.application":"mpn","application\/vnd.mophun.certificate":"mpc","application\/vnd.mozilla.xul+xml":"xul","application\/vnd.ms-artgalry":"cil","application\/vnd.ms-cab-compressed":"cab","application\/vnd.ms-excel":"xls","application\/vnd.ms-excel.addin.macroenabled.12":"xlam","application\/vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","application\/vnd.ms-excel.sheet.macroenabled.12":"xlsm","application\/vnd.ms-excel.template.macroenabled.12":"xltm","application\/vnd.ms-fontobject":"eot","application\/vnd.ms-htmlhelp":"chm","application\/vnd.ms-ims":"ims","application\/vnd.ms-lrm":"lrm","application\/vnd.ms-officetheme":"thmx","application\/vnd.ms-pki.seccat":"cat","application\/vnd.ms-pki.stl":"stl","application\/vnd.ms-powerpoint":"ppt","application\/vnd.ms-powerpoint.addin.macroenabled.12":"ppam","application\/vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","application\/vnd.ms-powerpoint.slide.macroenabled.12":"sldm","application\/vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","application\/vnd.ms-powerpoint.template.macroenabled.12":"potm","application\/vnd.ms-project":"mpp","application\/vnd.ms-word.document.macroenabled.12":"docm","application\/vnd.ms-word.template.macroenabled.12":"dotm","application\/vnd.ms-works":"wps","application\/vnd.ms-wpl":"wpl","application\/vnd.ms-xpsdocument":"xps","application\/vnd.mseq":"mseq","application\/vnd.musician":"mus","application\/vnd.muvee.style":"msty","application\/vnd.mynfc":"taglet","application\/vnd.neurolanguage.nlu":"nlu","application\/vnd.nitf":"ntf","application\/vnd.noblenet-directory":"nnd","application\/vnd.noblenet-sealer":"nns","application\/vnd.noblenet-web":"nnw","application\/vnd.nokia.n-gage.data":"ngdat","application\/vnd.nokia.n-gage.symbian.install":"n-gage","application\/vnd.nokia.radio-preset":"rpst","application\/vnd.nokia.radio-presets":"rpss","application\/vnd.novadigm.edm":"edm","application\/vnd.novadigm.edx":"edx","application\/vnd.novadigm.ext":"ext","application\/vnd.oasis.opendocument.chart":"odc","application\/vnd.oasis.opendocument.chart-template":"otc","application\/vnd.oasis.opendocument.database":"odb","application\/vnd.oasis.opendocument.formula":"odf","application\/vnd.oasis.opendocument.formula-template":"odft","application\/vnd.oasis.opendocument.graphics":"odg","application\/vnd.oasis.opendocument.graphics-template":"otg","application\/vnd.oasis.opendocument.image":"odi","application\/vnd.oasis.opendocument.image-template":"oti","application\/vnd.oasis.opendocument.presentation":"odp","application\/vnd.oasis.opendocument.presentation-template":"otp","application\/vnd.oasis.opendocument.spreadsheet":"ods","application\/vnd.oasis.opendocument.spreadsheet-template":"ots","application\/vnd.oasis.opendocument.text":"odt","application\/vnd.oasis.opendocument.text-master":"odm","application\/vnd.oasis.opendocument.text-template":"ott","application\/vnd.oasis.opendocument.text-web":"oth","application\/vnd.olpc-sugar":"xo","application\/vnd.oma.dd2+xml":"dd2","application\/vnd.openofficeorg.extension":"oxt","application\/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application\/vnd.openxmlformats-officedocument.presentationml.slide":"sldx","application\/vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","application\/vnd.openxmlformats-officedocument.presentationml.template":"potx","application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application\/vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","application\/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application\/vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","application\/vnd.osgeo.mapguide.package":"mgp","application\/vnd.osgi.dp":"dp","application\/vnd.osgi.subsystem":"esa","application\/vnd.palm":"pdb","application\/vnd.pawaafile":"paw","application\/vnd.pg.format":"str","application\/vnd.pg.osasli":"ei6","application\/vnd.picsel":"efif","application\/vnd.pmi.widget":"wg","application\/vnd.pocketlearn":"plf","application\/vnd.powerbuilder6":"pbd","application\/vnd.previewsystems.box":"box","application\/vnd.proteus.magazine":"mgz","application\/vnd.publishare-delta-tree":"qps","application\/vnd.pvi.ptid1":"ptid","application\/vnd.quark.quarkxpress":"qxd","application\/vnd.realvnc.bed":"bed","application\/vnd.recordare.musicxml":"mxl","application\/vnd.recordare.musicxml+xml":"musicxml","application\/vnd.rig.cryptonote":"cryptonote","application\/vnd.rim.cod":"cod","application\/vnd.rn-realmedia":"rm","application\/vnd.rn-realmedia-vbr":"rmvb","application\/vnd.route66.link66+xml":"link66","application\/vnd.sailingtracker.track":"st","application\/vnd.seemail":"see","application\/vnd.sema":"sema","application\/vnd.semd":"semd","application\/vnd.semf":"semf","application\/vnd.shana.informed.formdata":"ifm","application\/vnd.shana.informed.formtemplate":"itp","application\/vnd.shana.informed.interchange":"iif","application\/vnd.shana.informed.package":"ipk","application\/vnd.simtech-mindmapper":"twd","application\/vnd.smaf":"mmf","application\/vnd.smart.teacher":"teacher","application\/vnd.solent.sdkm+xml":"sdkm","application\/vnd.spotfire.dxp":"dxp","application\/vnd.spotfire.sfs":"sfs","application\/vnd.stardivision.calc":"sdc","application\/vnd.stardivision.draw":"sda","application\/vnd.stardivision.impress":"sdd","application\/vnd.stardivision.math":"smf","application\/vnd.stardivision.writer":"sdw","application\/vnd.stardivision.writer-global":"sgl","application\/vnd.stepmania.package":"smzip","application\/vnd.stepmania.stepchart":"sm","application\/vnd.sun.xml.calc":"sxc","application\/vnd.sun.xml.calc.template":"stc","application\/vnd.sun.xml.draw":"sxd","application\/vnd.sun.xml.draw.template":"std","application\/vnd.sun.xml.impress":"sxi","application\/vnd.sun.xml.impress.template":"sti","application\/vnd.sun.xml.math":"sxm","application\/vnd.sun.xml.writer":"sxw","application\/vnd.sun.xml.writer.global":"sxg","application\/vnd.sun.xml.writer.template":"stw","application\/vnd.sus-calendar":"sus","application\/vnd.svd":"svd","application\/vnd.symbian.install":"sis","application\/vnd.syncml+xml":"xsm","application\/vnd.syncml.dm+wbxml":"bdm","application\/vnd.syncml.dm+xml":"xdm","application\/vnd.tao.intent-module-archive":"tao","application\/vnd.tcpdump.pcap":"pcap","application\/vnd.tmobile-livetv":"tmo","application\/vnd.trid.tpt":"tpt","application\/vnd.triscape.mxs":"mxs","application\/vnd.trueapp":"tra","application\/vnd.ufdl":"ufd","application\/vnd.uiq.theme":"utz","application\/vnd.umajin":"umj","application\/vnd.unity":"unityweb","application\/vnd.uoml+xml":"uoml","application\/vnd.vcx":"vcx","application\/vnd.visio":"vsd","application\/vnd.visionary":"vis","application\/vnd.vsf":"vsf","application\/vnd.wap.wbxml":"wbxml","application\/vnd.wap.wmlc":"wmlc","application\/vnd.wap.wmlscriptc":"wmlsc","application\/vnd.webturbo":"wtb","application\/vnd.wolfram.player":"nbp","application\/vnd.wordperfect":"wpd","application\/vnd.wqd":"wqd","application\/vnd.wt.stf":"stf","application\/vnd.xara":"xar","application\/vnd.xfdl":"xfdl","application\/vnd.yamaha.hv-dic":"hvd","application\/vnd.yamaha.hv-script":"hvs","application\/vnd.yamaha.hv-voice":"hvp","application\/vnd.yamaha.openscoreformat":"osf","application\/vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","application\/vnd.yamaha.smaf-audio":"saf","application\/vnd.yamaha.smaf-phrase":"spf","application\/vnd.yellowriver-custom-menu":"cmp","application\/vnd.zul":"zir","application\/vnd.zzazz.deck+xml":"zaz","application\/voicexml+xml":"vxml","application\/widget":"wgt","application\/winhlp":"hlp","application\/wsdl+xml":"wsdl","application\/wspolicy+xml":"wspolicy","application\/x-7z-compressed":"7z","application\/x-abiword":"abw","application\/x-ace-compressed":"ace","application\/x-apple-diskimage":"dmg","application\/x-authorware-bin":"aab","application\/x-authorware-map":"aam","application\/x-authorware-seg":"aas","application\/x-bcpio":"bcpio","application\/x-bittorrent":"torrent","application\/x-blorb":"blb","application\/x-bzip":"bz","application\/x-cbr":"cbr","application\/x-cdlink":"vcd","application\/x-cfs-compressed":"cfs","application\/x-chat":"chat","application\/x-chess-pgn":"pgn","application\/x-conference":"nsc","application\/x-cpio":"cpio","application\/x-csh":"csh","application\/x-debian-package":"deb","application\/x-dgc-compressed":"dgc","application\/x-director":"dir","application\/x-doom":"wad","application\/x-dtbncx+xml":"ncx","application\/x-dtbook+xml":"dtb","application\/x-dtbresource+xml":"res","application\/x-dvi":"dvi","application\/x-envoy":"evy","application\/x-eva":"eva","application\/x-font-bdf":"bdf","application\/x-font-ghostscript":"gsf","application\/x-font-linux-psf":"psf","application\/x-font-pcf":"pcf","application\/x-font-snf":"snf","application\/x-font-type1":"pfa","application\/x-freearc":"arc","application\/x-futuresplash":"spl","application\/x-gca-compressed":"gca","application\/x-glulx":"ulx","application\/x-gnumeric":"gnumeric","application\/x-gramps-xml":"gramps","application\/x-gtar":"gtar","application\/x-hdf":"hdf","application\/x-install-instructions":"install","application\/x-iso9660-image":"iso","application\/x-java-jnlp-file":"jnlp","application\/x-latex":"latex","application\/x-lzh-compressed":"lzh","application\/x-mie":"mie","application\/x-mobipocket-ebook":"prc","application\/x-ms-application":"application","application\/x-ms-shortcut":"lnk","application\/x-ms-wmd":"wmd","application\/x-ms-wmz":"wmz","application\/x-ms-xbap":"xbap","application\/x-msaccess":"mdb","application\/x-msbinder":"obd","application\/x-mscardfile":"crd","application\/x-msclip":"clp","application\/x-msdownload":"dll","application\/x-msmediaview":"mvb","application\/x-msmetafile":"wmf","application\/x-msmoney":"mny","application\/x-mspublisher":"pub","application\/x-msschedule":"scd","application\/x-msterminal":"trm","application\/x-mswrite":"wri","application\/x-netcdf":"nc","application\/x-nzb":"nzb","application\/x-pkcs12":"p12","application\/x-pkcs7-certificates":"p7b","application\/x-pkcs7-certreqresp":"p7r","application\/x-research-info-systems":"ris","application\/x-shar":"shar","application\/x-shockwave-flash":"swf","application\/x-silverlight-app":"xap","application\/x-sql":"sql","application\/x-stuffit":"sit","application\/x-stuffitx":"sitx","application\/x-subrip":"srt","application\/x-sv4cpio":"sv4cpio","application\/x-sv4crc":"sv4crc","application\/x-t3vm-image":"t3","application\/x-tads":"gam","application\/x-tar":"tar","application\/x-tcl":"tcl","application\/x-tex":"tex","application\/x-tex-tfm":"tfm","application\/x-texinfo":"texinfo","application\/x-tgif":"obj","application\/x-ustar":"ustar","application\/x-wais-source":"src","application\/x-x509-ca-cert":"der","application\/x-xfig":"fig","application\/x-xliff+xml":"xlf","application\/x-xpinstall":"xpi","application\/x-xz":"xz","application\/x-zmachine":"z1","application\/xaml+xml":"xaml","application\/xcap-diff+xml":"xdf","application\/xenc+xml":"xenc","application\/xhtml+xml":"xhtml","application\/xml":"xsl","application\/xml-dtd":"dtd","application\/xop+xml":"xop","application\/xproc+xml":"xpl","application\/xslt+xml":"xslt","application\/xspf+xml":"xspf","application\/xv+xml":"mxml","application\/yang":"yang","application\/yin+xml":"yin","application\/zip":"zip","audio\/adpcm":"adp","audio\/basic":"au","audio\/midi":"mid","audio\/mp4":"m4a","audio\/mpeg":"mpga","audio\/ogg":"oga","audio\/s3m":"s3m","audio\/silk":"sil","audio\/vnd.dece.audio":"uva","audio\/vnd.digital-winds":"eol","audio\/vnd.dra":"dra","audio\/vnd.dts":"dts","audio\/vnd.dts.hd":"dtshd","audio\/vnd.lucent.voice":"lvp","audio\/vnd.ms-playready.media.pya":"pya","audio\/vnd.nuera.ecelp4800":"ecelp4800","audio\/vnd.nuera.ecelp7470":"ecelp7470","audio\/vnd.nuera.ecelp9600":"ecelp9600","audio\/vnd.rip":"rip","audio\/webm":"weba","audio\/x-aac":"aac","audio\/x-aiff":"aif","audio\/x-caf":"caf","audio\/x-flac":"flac","audio\/x-matroska":"mka","audio\/x-mpegurl":"m3u","audio\/x-ms-wax":"wax","audio\/x-ms-wma":"wma","audio\/x-pn-realaudio":"ram","audio\/x-pn-realaudio-plugin":"rmp","audio\/xm":"xm","chemical\/x-cdx":"cdx","chemical\/x-cif":"cif","chemical\/x-cmdf":"cmdf","chemical\/x-cml":"cml","chemical\/x-csml":"csml","chemical\/x-xyz":"xyz","font\/collection":"ttc","font\/otf":"otf","font\/ttf":"ttf","font\/woff":"woff","font\/woff2":"woff2","image\/cgm":"cgm","image\/g3fax":"g3","image\/gif":"gif","image\/ief":"ief","image\/jpeg":"jpeg","image\/ktx":"ktx","image\/png":"png","image\/prs.btif":"btif","image\/sgi":"sgi","image\/svg+xml":"svg","image\/tiff":"tiff","image\/vnd.adobe.photoshop":"psd","image\/vnd.dece.graphic":"uvi","image\/vnd.djvu":"djvu","image\/vnd.dvb.subtitle":"sub","image\/vnd.dwg":"dwg","image\/vnd.dxf":"dxf","image\/vnd.fastbidsheet":"fbs","image\/vnd.fpx":"fpx","image\/vnd.fst":"fst","image\/vnd.fujixerox.edmics-mmr":"mmr","image\/vnd.fujixerox.edmics-rlc":"rlc","image\/vnd.ms-modi":"mdi","image\/vnd.ms-photo":"wdp","image\/vnd.net-fpx":"npx","image\/vnd.wap.wbmp":"wbmp","image\/vnd.xiff":"xif","image\/webp":"webp","image\/x-3ds":"3ds","image\/x-cmu-raster":"ras","image\/x-cmx":"cmx","image\/x-freehand":"fh","image\/x-icon":"ico","image\/x-mrsid-image":"sid","image\/x-pcx":"pcx","image\/x-pict":"pic","image\/x-portable-anymap":"pnm","image\/x-portable-bitmap":"pbm","image\/x-portable-graymap":"pgm","image\/x-portable-pixmap":"ppm","image\/x-rgb":"rgb","image\/x-xpixmap":"xpm","image\/x-xwindowdump":"xwd","message\/rfc822":"eml","model\/iges":"igs","model\/mesh":"msh","model\/vnd.collada+xml":"dae","model\/vnd.dwf":"dwf","model\/vnd.gdl":"gdl","model\/vnd.gtw":"gtw","model\/vnd.vtu":"vtu","model\/vrml":"wrl","model\/x3d+binary":"x3db","model\/x3d+vrml":"x3dv","model\/x3d+xml":"x3d","text\/cache-manifest":"appcache","text\/calendar":"ics","text\/css":"css","text\/csv":"csv","text\/html":"html","text\/n3":"n3","text\/plain":"txt","text\/prs.lines.tag":"dsc","text\/richtext":"rtx","text\/sgml":"sgml","text\/tab-separated-values":"tsv","text\/troff":"t","text\/turtle":"ttl","text\/uri-list":"uri","text\/vcard":"vcard","text\/vnd.curl":"curl","text\/vnd.curl.dcurl":"dcurl","text\/vnd.curl.mcurl":"mcurl","text\/vnd.curl.scurl":"scurl","text\/vnd.fly":"fly","text\/vnd.fmi.flexstor":"flx","text\/vnd.graphviz":"gv","text\/vnd.in3d.3dml":"3dml","text\/vnd.in3d.spot":"spot","text\/vnd.sun.j2me.app-descriptor":"jad","text\/vnd.wap.wml":"wml","text\/vnd.wap.wmlscript":"wmls","text\/x-asm":"s","text\/x-c":"cc","text\/x-fortran":"f","text\/x-java-source":"java","text\/x-nfo":"nfo","text\/x-opml":"opml","text\/x-pascal":"p","text\/x-setext":"etx","text\/x-sfv":"sfv","text\/x-uuencode":"uu","text\/x-vcalendar":"vcs","text\/x-vcard":"vcf","video\/3gpp":"3gp","video\/3gpp2":"3g2","video\/h261":"h261","video\/h263":"h263","video\/h264":"h264","video\/jpeg":"jpgv","video\/jpm":"jpm","video\/mj2":"mj2","video\/mp4":"mp4","video\/mpeg":"mpeg","video\/quicktime":"qt","video\/vnd.dece.hd":"uvh","video\/vnd.dece.mobile":"uvm","video\/vnd.dece.pd":"uvp","video\/vnd.dece.sd":"uvs","video\/vnd.dece.video":"uvv","video\/vnd.dvb.file":"dvb","video\/vnd.fvt":"fvt","video\/vnd.mpegurl":"mxu","video\/vnd.ms-playready.media.pyv":"pyv","video\/vnd.uvvu.mp4":"uvu","video\/vnd.vivo":"viv","video\/webm":"webm","video\/x-f4v":"f4v","video\/x-fli":"fli","video\/x-flv":"flv","video\/x-m4v":"m4v","video\/x-matroska":"mkv","video\/x-mng":"mng","video\/x-ms-asf":"asf","video\/x-ms-vob":"vob","video\/x-ms-wmx":"wmx","video\/x-ms-wvx":"wvx","video\/x-msvideo":"avi","video\/x-sgi-movie":"movie","video\/x-smv":"smv","x-conference\/x-cooltalk":"ice","text\/x-sql":"sql","image\/x-pixlr-data":"pxd","image\/x-adobe-dng":"dng","image\/x-sketch":"sketch","image\/x-xcf":"xcf","audio\/amr":"amr","image\/vnd-ms.dds":"dds","application\/plt":"plt","application\/sat":"sat","application\/step":"step","text\/x-httpd-cgi":"cgi","text\/x-asap":"asp","text\/x-jsp":"jsp"};
11179
 
11180
  /*
11181
  * File: /js/elFinder.options.js
11195
  */
11196
  cdns : {
11197
  // for editor etc.
11198
+ ace : 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.8',
11199
+ codemirror : 'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.52.2',
11200
+ ckeditor : 'https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.12.1',
11201
+ ckeditor5 : 'https://cdn.ckeditor.com/ckeditor5/17.0.0',
11202
+ tinymce : 'https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.2.0',
11203
  simplemde : 'https://cdnjs.cloudflare.com/ajax/libs/simplemde/1.11.2',
11204
+ fabric : 'https://cdnjs.cloudflare.com/ajax/libs/fabric.js/3.6.2',
11205
  fabric16 : 'https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.6.7',
11206
  tui : 'https://uicdn.toast.com',
11207
  // for quicklook etc.
11208
+ hls : 'https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.13.2/hls.min.js',
11209
+ dash : 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/3.0.3/dash.all.min.js',
11210
  flv : 'https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.5.0/flv.min.js',
11211
+ videojs : 'https://cdnjs.cloudflare.com/ajax/libs/video.js/7.7.5',
11212
+ prettify : 'https://cdn.jsdelivr.net/gh/google/code-prettify@f1c3473acd1e8ea8c8c1a60c56e89f5cdd06f915/loader/run_prettify.js',
11213
  psd : 'https://cdnjs.cloudflare.com/ajax/libs/psd.js/3.2.0/psd.min.js',
11214
  rar : 'https://cdn.jsdelivr.net/gh/nao-pon/rar.js@6cef13ec66dd67992fc7f3ea22f132d770ebaf8b/rar.min.js',
11215
  zlibUnzip : 'https://cdn.jsdelivr.net/gh/imaya/zlib.js@0.3.1/bin/unzip.min.js', // need check unzipFiles() in quicklook.plugins.js when update
11216
  zlibGunzip : 'https://cdn.jsdelivr.net/gh/imaya/zlib.js@0.3.1/bin/gunzip.min.js',
11217
+ bzip2 : 'https://cdn.jsdelivr.net/gh/nao-pon/bzip2.js@0.8.0/bzip2.js',
11218
+ marked : 'https://cdnjs.cloudflare.com/ajax/libs/marked/0.7.0/marked.min.js',
11219
  sparkmd5 : 'https://cdnjs.cloudflare.com/ajax/libs/spark-md5/3.0.0/spark-md5.min.js',
11220
  jssha : 'https://cdnjs.cloudflare.com/ajax/libs/jsSHA/2.3.1/sha.js',
11221
+ amr : 'https://cdn.jsdelivr.net/gh/yxl/opencore-amr-js@dcf3d2b5f384a1d9ded2a54e4c137a81747b222b/js/amrnb.js',
11222
+ tiff : 'https://cdn.jsdelivr.net/gh/seikichi/tiff.js@545ede3ee46b5a5bc5f06d65954e775aa2a64017/tiff.min.js'
11223
  },
11224
 
11225
  /**
11244
  */
11245
  cors : null,
11246
 
11247
+ /**
11248
+ * Array of header names to return parrot out in HTTP headers received from the server
11249
+ *
11250
+ * @type Array
11251
+ */
11252
+ parrotHeaders : [],
11253
+
11254
  /**
11255
  * Maximum number of concurrent connections on request
11256
  *
11545
  mediaControlsList : '', // e.g. 'nodownload nofullscreen noremoteplayback'
11546
  // Show toolbar of PDF preview (with <embed> tag)
11547
  pdfToolbar : true,
11548
+ // Maximum lines to preview at initial
11549
+ textInitialLines : 100,
11550
+ // Maximum lines to preview by prettify
11551
+ prettifyMaxLines : 300,
11552
  // quicklook window must be contained in elFinder node on window open (true|false)
11553
  contain : false,
11554
  // preview window into NavDock (0 : undocked | 1 : docked(show) | 2 : docked(hide))
11571
  // To enable this you need to place ViewerJS on the same server as elFinder and specify that URL in `url`.
11572
  viewerjs : {
11573
  url: '', // Example '/ViewerJS/index.html'
11574
+ mimes: ['application/pdf', 'application/vnd.oasis.opendocument.text', 'application/vnd.oasis.opendocument.spreadsheet', 'application/vnd.oasis.opendocument.presentation'],
11575
+ pdfNative: true // Use Native PDF Viewer first
11576
  },
11577
  // MIME types to CAD-Files and 3D-Models online viewer on sharecad.org
11578
  // Example ['image/vnd.dwg', 'image/vnd.dxf', 'model/vnd.dwf', 'application/vnd.hp-hpgl', 'application/plt', 'application/step', 'model/iges', 'application/vnd.ms-pki.stl', 'application/sat', 'image/cgm', 'application/x-msmetafile']
11584
  // Example ['application/msword', 'application/vnd.ms-word', 'application/vnd.ms-excel', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.oasis.opendocument.text', 'application/vnd.oasis.opendocument.spreadsheet', 'application/vnd.oasis.opendocument.presentation']
11585
  // These MIME types override "googleDocsMimes"
11586
  officeOnlineMimes : [],
11587
+ // File size threshold when using the dim command for obtain the image size necessary to image preview
11588
+ getDimThreshold : '200K',
11589
+ // Max filesize to show filenames of the zip/tar/gzip/bzip file
11590
+ unzipMaxSize : '50M',
11591
  // MIME-Type regular expression that does not check empty files
11592
  mimeRegexNotEmptyCheck : /^application\/vnd\.google-apps\./
11593
  },
11594
+ // "edit" command options.
11595
  edit : {
11596
  // dialog width, integer(px) or integer+'%' (example: 650, '80%' ...)
11597
  dialogWidth : void(0),
11598
+ // dialog height, integer(px) or integer+'%' (example: 650, '80%' ...)
11599
+ dialogHeight : void(0),
11600
  // list of allowed mimetypes to edit of text files
11601
  // if empty - any text files can be edited
11602
  mimes : [],
11603
+ // MIME-types to unselected as default of "File types to enable with "New file"" in preferences
11604
+ mkfileHideMimes : [],
11605
+ // MIME-types of text file to make empty file
11606
  makeTextMimes : ['text/plain', 'text/css', 'text/html'],
11607
  // Use the editor stored in the browser
11608
  // This value allowd overwrite with user preferences
11719
  pixo: {
11720
  apikey: ''
11721
  },
 
 
 
11722
  // Browsing manager URL for CKEditor, TinyMCE
11723
  // Uses self location with the empty value or not defined.
11724
  //managerUrl : 'elfinder.html'
11727
  ckeditor: {},
11728
  // CKEditor 5 editor options
11729
  ckeditor5: {
11730
+ // builds mode - 'classic', 'inline', 'balloon', 'balloon-block' or 'decoupled-document'
11731
+ mode: 'decoupled-document'
11732
  },
11733
  // TinyMCE editor options
11734
  tinymce : {},
11755
  // "SearchMime" is implemented in default
11756
  SearchMime : { // The key is search type that send to the connector
11757
  name : 'btnMime', // Button text to be processed in i18n()
11758
+ title : 'searchMime',// Button title to be processed in i18n()
11759
+ incsearch : 'mime' // Incremental search target filed name of the file object
11760
+ // Or Callable function
11761
+ /* incsearch function example
11762
+ function(queryObject, cwdHashes, elFinderInstance) {
11763
+ var q = queryObject.val;
11764
+ var regex = queryObject.regex;
11765
+ var matchedHashes = $.grep(cwdHashes, function(hash) {
11766
+ var file = elFinderInstance.file(hash);
11767
+ return (file && file.mime && file.mime.match(regex))? true : false;
11768
+ });
11769
+ return matchedHashes;
11770
+ }
11771
+ */
11772
  }
11773
  }
11774
  },
11785
  // Array of hash algorisms to show on info dialog
11786
  // These name are 'md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512', 'shake128' and 'shake256'
11787
  showHashAlgorisms : ['md5', 'sha256'],
11788
+ // Options for fm.getContentsHashes()
11789
+ showHashOpts : {
11790
+ shake128len : 256,
11791
+ shake256len : 512
11792
+ },
11793
  custom : {
11794
  // /**
11795
  // * Example of custom info `desc`
11868
  // Maximum number of items that can be placed into the Trash at one time
11869
  toTrashMaxItems : 1000
11870
  },
11871
+ paste : {
11872
+ moveConfirm : false // Display confirmation dialog when moving items
11873
+ },
11874
  help : {
11875
  // Tabs to show
11876
  view : ['about', 'shortcuts', 'help', 'integrations', 'debug'],
11894
  }
11895
  },
11896
 
11897
+ /**
11898
+ * Disabled commands relationship
11899
+ *
11900
+ * @type Object
11901
+ */
11902
+ disabledCmdsRels : {
11903
+ 'get' : ['edit'],
11904
+ 'rm' : ['cut', 'empty'],
11905
+ 'file&url=' : ['download', 'zipdl'] // file command and volume options url is empty
11906
+ },
11907
+
11908
  /**
11909
  * Callback for prepare boot up
11910
  *
12068
 
12069
  // fm.UA types array to show item select checkboxes e.g. ['All'] or ['Mobile'] etc. default: ['Touch']
12070
  showSelectCheckboxUA : ['Touch'],
12071
+
12072
+ // Enable dragout by dragstart with Alt key or Shift key
12073
+ metakeyDragout : true,
12074
 
12075
  // file info columns displayed
12076
  listView : {
12326
  * @default {position: {}, width : null} - Apply CSS definition
12327
  * position: CSS object | null (null: position center & middle)
12328
  */
12329
+ notifyDialog : {position : {}, width : null, canClose : false, hiddens : ['open']},
12330
 
12331
  /**
12332
  * Dialog contained in the elFinder node
12455
  * @type Object
12456
  */
12457
  cookie : {
12458
+ expires : 30,
12459
+ domain : '',
12460
+ path : '/',
12461
+ secure : false,
12462
+ samesite : 'lax'
12463
  },
12464
 
12465
  /**
12521
  *
12522
  * @type Array|String('auto')|Boolean(true|false)
12523
  */
12524
+ debug : ['error', 'warning', 'event-destroy'],
12525
+
12526
+ /**
12527
+ * Show toast messeges of backend warning (if found data `debug.backendErrors` in backend results)
12528
+ *
12529
+ * @type Boolean|Object (toast options)
12530
+ */
12531
+ toastBackendWarn : true
12532
  };
12533
 
12534
 
13160
  tabsactive : 'ui-tabs-active ui-state-active'
13161
  },
13162
  tpl : {
13163
+ perms : '<span class="elfinder-perms"></span>',
13164
+ lock : '<span class="elfinder-lock"></span>',
13165
+ symlink : '<span class="elfinder-symlink"></span>',
13166
+ navicon : '<span class="elfinder-nav-icon"></span>',
13167
+ navspinner : '<span class="elfinder-spinner elfinder-navbar-spinner"></span>',
13168
+ navdir : '<div class="elfinder-navbar-wrapper{root}"><span id="{id}" class="ui-corner-all elfinder-navbar-dir {cssclass}"{title}><span class="elfinder-navbar-arrow"></span><span class="elfinder-navbar-icon" {style}></span>{symlink}{permissions}{name}</span><div class="elfinder-navbar-subtree" style="display:none"></div></div>',
13169
+ placedir : '<div class="elfinder-navbar-wrapper"><span id="{id}" class="ui-corner-all elfinder-navbar-dir {cssclass}"{title}><span class="elfinder-navbar-arrow"></span><span class="elfinder-navbar-icon" {style}></span>{symlink}{permissions}{name}</span><div class="elfinder-navbar-subtree" style="display:none"></div></div>'
13170
 
13171
  },
13172
  // mimes.text will be overwritten with connector config if `textMimes` is included in initial response
13223
  if (!overlay.is(':hidden')) {
13224
  overlay.elfinderoverlay('hide').off('click close', cancel);
13225
  }
13226
+ if (nnode) {
13227
+ pnode.removeClass('ui-front')
13228
+ .css('position', '')
13229
+ .off('unselect.'+fm.namespace, unselect);
13230
+ if (tarea) {
13231
+ nnode && nnode.css('max-height', '');
13232
+ } else if (!tree) {
13233
+ pnode.css('width', '')
13234
+ .parent('td').css('overflow', '');
13235
+ }
13236
  }
13237
  }, colwidth,
13238
  dfrd = $.Deferred()
13296
  }
13297
  }
13298
  },
13299
+ input = $(tarea? '<textarea></textarea>' : '<input type="text"/>')
13300
  .on('keyup text', function(){
13301
  if (tarea) {
13302
  this.style.height = '1px';
13642
  * English translation
13643
  * @author Troex Nevelin <troex@fury.scancode.ru>
13644
  * @author Naoki Sawada <hypweb+elfinder@gmail.com>
13645
+ * @version 2020-01-16
13646
  */
13647
  // elfinder.en.js is integrated into elfinder.(full|min).js by jake build
13648
  if (typeof elFinder === 'function' && elFinder.prototype.i18) {
13798
  'cmdselectinvert': 'Invert selection', // from v2.1.28 added 15.08.2017
13799
  'cmdopennew' : 'Open in new window', // from v2.1.38 added 3.4.2018
13800
  'cmdhide' : 'Hide (Preference)', // from v2.1.41 added 24.7.2018
 
13801
 
13802
  /*********************************** buttons ***********************************/
13803
  'btnClose' : 'Close',
13936
  'confirmNonUTF8' : 'Character encoding of this file couldn\'t be detected. It need to temporarily convert to UTF-8 for editting.<br/>Please select character encoding of this file.', // from v2.1.19 added 28.11.2016
13937
  'confirmNotSave' : 'It has been modified.<br/>Losing work if you do not save changes.', // from v2.1 added 15.7.2015
13938
  'confirmTrash' : 'Are you sure you want to move items to trash bin?', //from v2.1.24 added 29.4.2017
13939
+ 'confirmMove' : 'Are you sure you want to move items to "$1"?', //from v2.1.50 added 27.7.2019
13940
  'apllyAll' : 'Apply to all',
13941
  'name' : 'Name',
13942
  'size' : 'Size',
14076
  'clearBrowserData': 'Initialize the settings saved in this browser', // from v2.1.26 added 28.6.2017
14077
  'toolbarPref' : 'Toolbar settings', // from v2.1.27 added 2.8.2017
14078
  'charsLeft' : '... $1 chars left.', // from v2.1.29 added 30.8.2017
14079
+ 'linesLeft' : '... $1 lines left.', // from v2.1.52 added 16.1.2020
14080
  'sum' : 'Sum', // from v2.1.29 added 28.9.2017
14081
  'roughFileSize' : 'Rough file size', // from v2.1.30 added 2.11.2017
14082
  'autoFocusDialog' : 'Focus on the element of dialog with mouseover', // from v2.1.30 added 2.11.2017
14238
  prvCname = cmd.className? cmd.className : cmd.name,
14239
  button = $(this).addClass('ui-state-default elfinder-button')
14240
  .attr('title', cmd.title)
14241
+ .append('<span class="elfinder-button-icon elfinder-button-icon-' + prvCname + '"></span>', text)
14242
  .on('mouseenter mouseleave', function(e) { !button.hasClass(disabled) && button[e.type == 'mouseleave' ? 'removeClass' : 'addClass'](hover);})
14243
  .on('click', function(e) {
14244
  if (!button.hasClass(disabled)) {
14294
  if (Array.isArray(cmd.variants)) {
14295
  button.addClass('elfinder-menubutton');
14296
 
14297
+ menu = $('<div class="ui-front ui-widget ui-widget-content elfinder-button-menu elfinder-button-' + prvCname + '-menu ui-corner-all"></div>')
14298
  .hide()
14299
  .appendTo(fm.getUI())
14300
  .on('mouseenter mouseleave', '.'+item, function() { $(this).toggleClass(hover); })
14462
  ltr = fm.direction === 'ltr',
14463
  subpos = ltr? 'left' : 'right',
14464
  types = Object.assign({}, fm.options.contextmenu),
14465
+ tpl = '<div class="'+cmItem+'{className}"><span class="elfinder-button-icon {icon} elfinder-contextmenu-icon"{style}></span><span>{label}</span></div>',
14466
  item = function(label, icon, callback, opts) {
14467
  var className = '',
14468
  style = '',
14765
  }
14766
  node = item(cmd.title, cmd.className? cmd.className : cmd.name, function(){}, cmd.contextmenuOpts);
14767
 
14768
+ submenu = $('<div class="ui-front ui-corner-all elfinder-contextmenu-sub"></div>')
14769
  .hide()
14770
  .css('max-height', fm.getUI().height() - 30)
14771
+ .appendTo(node.append('<span class="elfinder-contextmenu-arrow"></span>'));
14772
 
14773
  hover = function(show){
14774
  if (! show) {
14894
  });
14895
 
14896
  $.each(cmd.variants, function(i, variant) {
14897
+ var item = variant === '|' ? '<div class="elfinder-contextmenu-separator"></div>' :
14898
  $('<div class="'+cmItem+' '+smItem+'"><span>'+variant[1]+'</span></div>').data('exec', variant[0]),
14899
  iconClass, icon;
14900
  if (typeof variant[2] !== 'undefined') {
14901
+ icon = $('<span></span>').addClass('elfinder-button-icon elfinder-contextmenu-icon');
14902
  if (! /\//.test(variant[2])) {
14903
  icon.addClass('elfinder-button-icon-'+variant[2]);
14904
  } else {
14917
  }
14918
  }, cmd.contextmenuOpts);
14919
  if (cmd.extra && cmd.extra.node) {
14920
+ $('<span class="elfinder-button-icon elfinder-button-icon-'+(cmd.extra.icon || '')+' '+exIcon+'"></span>')
14921
  .append(cmd.extra.node).appendTo(node);
14922
  $(cmd.extra.node).trigger('ready', {targets: targets});
14923
  } else {
14930
  }
14931
 
14932
  if (insSep) {
14933
+ menu.append('<div class="elfinder-contextmenu-separator"></div>');
14934
  }
14935
  menu.append(node);
14936
  sep = true;
14958
  var node;
14959
 
14960
  if (data === '|') {
14961
+ menu.append('<div class="elfinder-contextmenu-separator"></div>');
14962
  } else if (data.label && typeof data.callback == 'function') {
14963
  node = item(data.label, data.icon, function() {
14964
  if (! menu.data('draged')) {
15259
  * @type Function
15260
  */
15261
  makeTemplateRow = function() {
15262
+ return '<tr id="{id}" class="'+clFile+' {permsclass} {dirclass}" title="{tooltip}"{css}><td class="elfinder-col-name"><div class="elfinder-cwd-file-wrapper"><span class="elfinder-cwd-icon {mime}"{style}></span>{marker}<span class="elfinder-cwd-filename">{name}</span></div>'+selectCheckbox+'</td>'+customColsBuild()+'</tr>';
15263
  },
15264
 
15265
  selectCheckbox = ($.map(options.showSelectCheckboxUA, function(t) {return (fm.UA[t] || t.match(/^all$/i))? true : null;}).length)? '<div class="elfinder-cwd-select"><input type="checkbox" class="'+clSelChk+'"></div>' : '',
15279
  * @type Object
15280
  **/
15281
  templates = {
15282
+ icon : '<div id="{id}" class="'+clFile+' {permsclass} {dirclass} ui-corner-all" title="{tooltip}"><div class="elfinder-cwd-file-wrapper ui-corner-all"><div class="elfinder-cwd-icon {mime} ui-corner-all" unselectable="on"{style}></div>{marker}</div><div class="elfinder-cwd-filename" title="{nametitle}">{name}</div>'+selectCheckbox+'</div>',
15283
  row : ''
15284
  },
15285
 
15392
  if ($('#elfinderAddBadgeStyle'+fm.namespace).length) {
15393
  $('#elfinderAddBadgeStyle'+fm.namespace).remove();
15394
  }
15395
+ addBadgeStyleSheet = $('<style id="addBadgeStyle'+fm.namespace+'"></style>').insertBefore($('head').children(':first')).get(0).sheet || null;
15396
  }
15397
  if (addBadgeStyleSheet) {
15398
  mime = mime.toLowerCase();
15890
  oldSchoolItem = $(itemhtml($.extend(true, {}, pdir, {name : '..', i18 : '..', mime : 'directory'})))
15891
  .addClass('elfinder-cwd-parent')
15892
  .on('dblclick', function() {
15893
+ fm.trigger('select', {selected : [phash]}).exec('open', phash);
 
15894
  });
15895
  (list ? oldSchoolItem.children('td:first') : oldSchoolItem).children('.elfinder-cwd-select').remove();
15896
+ if (fm.cwdHash2Elm(phash).length) {
15897
+ fm.cwdHash2Elm(phash).replaceWith(oldSchoolItem);
15898
+ } else {
15899
+ (list ? cwd.find('tbody') : cwd).prepend(oldSchoolItem);
15900
+ }
15901
  fm.draggingUiHelper && fm.draggingUiHelper.data('refreshPositions', 1);
15902
  }
15903
  };
15904
  if (pdir) {
15905
  set(pdir);
15906
  } else {
15907
+ set({hash: phash, read: true, write: true});
15908
  if (fm.getUI('tree').length) {
15909
  fm.one('parents', function() {
15910
  set(fm.file(phash) || null);
15941
  // created document fragment for jQuery >= 1.12, 2.2, 3.0
15942
  // see Studio-42/elFinder#1544 @ github
15943
  docFlag = $.htmlPrefilter? true : false,
15944
+ tempDom = docFlag? $(document.createDocumentFragment()) : $('<div></div>'),
15945
  go = function(o){
15946
  var over = o || null,
15947
  html = [],
16094
  hheight = htr.outerHeight(true);
16095
  cwd.css('margin-top', hheight - parseInt(table.css('padding-top')));
16096
  if (cssSticky) {
16097
+ tableHeader = $('<div class="elfinder-table-header-sticky"></div>').addClass(cwd.attr('class')).append($('<table></table>').append(thead));
16098
  cwd.after(tableHeader);
16099
  wrapper.on('resize.fixheader', function(e) {
16100
  e.stopPropagation();
16101
  fixTableHeader({fitWidth: true});
16102
  });
16103
  } else {
16104
+ base = $('<div></div>').addClass(cwd.attr('class')).append($('<table></table>').append(thead));
16105
+ tableHeader = $('<div></div>').addClass(wrapper.attr('class') + ' elfinder-cwd-fixheader')
16106
  .removeClass('ui-droppable native-droppable')
16107
  .css(wrapper.position())
16108
  .css({ height: hheight, width: cwd.outerWidth() })
16456
  // created document fragment for jQuery >= 1.12, 2.2, 3.0
16457
  // see Studio-42/elFinder#1544 @ github
16458
  docFlag = $.htmlPrefilter? true : false,
16459
+ tempDom = docFlag? $(document.createDocumentFragment()) : $('<div></div>'),
16460
  file, hash, node, nodes, ndx, stmb;
16461
 
16462
  if (l > showFiles) {
16510
  bottomMarkerShow(place);
16511
  if (Object.keys(atmb).length) {
16512
  Object.assign(bufferExt.attachTmbs, atmb);
16513
+ if (buffer.length < 1) {
16514
+ loadThumbnails();
16515
+ }
16516
  }
16517
  }
16518
  },
16726
  }
16727
 
16728
  if (list) {
16729
+ cwd.html('<table><thead></thead><tbody></tbody></table>');
16730
  thtr = $('<tr class="ui-state-default"><td class="elfinder-cwd-view-th-name">'+fm.getColumnName('name')+'</td>'+customColsNameBuild()+'</tr>');
16731
  cwd.find('thead').hide().append(thtr).find('td:first').append(selectAllCheckbox);
16732
  if ($.fn.sortable) {
16897
  }
16898
  if (e.shiftKey && (pl || nl)) {
16899
  sib = pl ? p.prevUntil('#'+prev.attr('id')) : p.nextUntil('#'+next.attr('id'));
16900
+ sib = sib.add(p);
16901
+ if (!pl) {
16902
+ sib = $(sib.get().reverse());
16903
+ }
16904
+ sib.trigger(evtSelect);
16905
  } else if (e.ctrlKey || e.metaKey) {
16906
  p.trigger(p.hasClass(clSelected) ? evtUnselect : evtSelect);
16907
  } else {
17021
  $this.on('mousedown', function(e) {
17022
  // shiftKey or altKey + drag start for HTML5 native drag function
17023
  // Note: can no use shiftKey with the Google Chrome
17024
+ var metaKey = options.metakeyDragout && !fm.UA.IE && (e.shiftKey || e.altKey),
17025
  disable = false;
17026
+ if (metaKey && cwd.data('selectable')) {
17027
  // destroy jQuery-ui selectable while trigger native drag
17028
  cwd.selectable('disable').selectable('destroy').removeData('selectable');
17029
  requestAnimationFrame(function(){
17042
  }
17043
  }
17044
  if (disable) {
17045
+ // removeClass('ui-state-disabled') for old version of jQueryUI
17046
+ $this.draggable('option', 'disabled', true).removeClass('ui-state-disabled');
17047
  } else {
17048
  $this.draggable('option', 'disabled', false)
17049
  .removeAttr('draggable')
17063
  files = [],
17064
  icon = function(f) {
17065
  var mime = f.mime, i, tmb = fm.tmb(f);
17066
+ i = '<div class="elfinder-cwd-icon elfinder-cwd-icon-drag '+fm.mime2class(mime)+' ui-corner-all"></div>';
17067
  if (tmb) {
17068
  i = $(i).addClass(tmb.className).css('background-image', "url('"+tmb.url+"')").get(0).outerHTML;
17069
  }
17328
  }
17329
  }
17330
  }),
17331
+ wrapper = $('<div class="elfinder-cwd-wrapper"></div>')
17332
  // make cwd itself droppable for folders from nav panel
17333
  .droppable(Object.assign({}, droppable, {autoDisable: false}))
17334
  .on('contextmenu.'+fm.namespace, wrapperContextMenu.contextmenu)
17362
 
17363
  selectAllCheckbox = selectCheckbox? $('<div class="elfinder-cwd-selectall"><input type="checkbox"/></div>')
17364
  .attr('title', fm.i18n('selectall'))
17365
+ .on('click', function(e) {
17366
  e.stopPropagation();
17367
  e.preventDefault();
17368
+ if ($(this).data('pending')) {
17369
  return false;
17370
  }
17371
  selectAllCheckbox.data('pending', true);
17418
  wz = parent.children('.elfinder-workzone').append(wrapper.append(this).append(bottomMarker)),
17419
 
17420
  // message board
17421
+ mBoard = $('<div class="elfinder-cwd-message-board"></div>').insertAfter(cwd),
17422
 
17423
  // Volume expires
17424
+ vExpires = $('<div class="elfinder-cwd-expires" ></div>'),
17425
 
17426
  vExpiresTm,
17427
 
17458
 
17459
  // IE < 11 not support CSS `pointer-events: none`
17460
  if (!fm.UA.ltIE10) {
17461
+ mBoard.append($('<div class="elfinder-cwd-trash" ></div>').html(fm.i18n('volume_Trash')))
17462
  .append(vExpires);
17463
  }
17464
 
17544
  fm.one('open', function() {
17545
  sheet && fm.zIndex && sheet.insertRule('.ui-selectable-helper{z-index:'+fm.zIndex+';}', i++);
17546
  });
17547
+ base = $('<div style="position:absolute"></div>');
17548
  node = fm.getUI();
17549
  node.on('resize', function(e, data) {
17550
  var offset;
17661
  query = e.data.query;
17662
  })
17663
  .bind('incsearchstart', function(e) {
17664
+ var q = e.data.query || '',
17665
+ type = e.data.type || 'SearchName',
17666
+ searchTypes = fm.options.commandsOptions.search.searchTypes || {};
17667
+
17668
+ if ((searchTypes[type] && searchTypes[type].incsearch) || type === 'SearchName') {
17669
+ selectedFiles = {};
17670
+ fm.lazy(function() {
17671
+ // incremental search
17672
+ var regex, incSearch, fst = '';
17673
+ query = q;
17674
+ if (q) {
17675
+ if (q.substr(0,1) === '/') {
17676
+ q = q.substr(1);
17677
+ fst = '^';
17678
+ }
17679
+ regex = new RegExp(fst + q.replace(/([\\*\;\.\?\[\]\{\}\(\)\^\$\-\|])/g, '\\$1'), 'i');
17680
+ if (type === 'SearchName') {
17681
+ incHashes = $.grep(cwdHashes, function(hash) {
17682
+ var file = fm.file(hash);
17683
+ return (file && (file.name.match(regex) || (file.i18 && file.i18.match(regex))))? true : false;
17684
+ });
17685
+ } else {
17686
+ incSearch = searchTypes[type].incsearch;
17687
+ if (typeof incSearch === 'string') {
17688
+ incHashes = $.grep(cwdHashes, function(hash) {
17689
+ var file = fm.file(hash);
17690
+ return (file && file[incSearch] && (file[incSearch] + '').match(regex))? true : false;
17691
+ });
17692
+ } else if (typeof incSearch === 'function') {
17693
+ try {
17694
+ incHashes = $.grep(incSearch({val: q, regex: regex}, cwdHashes, fm), function(hash) {
17695
+ return fm.file(hash)? true : false;
17696
+ });
17697
+ } catch(e) {
17698
+ incHashes = [];
17699
+ }
17700
+ }
17701
+ }
17702
+ fm.trigger('incsearch', { hashes: incHashes, query: q })
17703
+ .searchStatus.ininc = true;
17704
+ content();
17705
+ fm.autoSync('stop');
17706
+ } else {
17707
+ fm.trigger('incsearchend');
17708
+ }
17709
+ });
17710
+ }
17711
  })
17712
  .bind('incsearchend', function(e) {
17713
  query = '';
17732
  });
17733
  })
17734
  .bind('viewchange', function() {
17735
+ var l = fm.viewType != 'list',
17736
  allsel = cwd.hasClass('elfinder-cwd-allselected');
17737
 
17738
  if (l != list) {
18108
  if (opts === 'destroy') {
18109
  dialog.remove();
18110
  fm.trigger('dialogremoved', {dialog: dialog});
18111
+ } else if (dialog.data('minimized')) {
18112
+ dialog.data('minimized').close();
18113
  }
18114
  } else if (opts === 'toTop') {
18115
  dialog.trigger('totop');
18167
  clmodal = 'elfinder-dialog-modal',
18168
  id = parseInt(Math.random()*1000000),
18169
  titlebar = $('<div class="ui-dialog-titlebar ui-widget-header ui-corner-top ui-helper-clearfix"><span class="elfinder-dialog-title">'+opts.title+'</span></div>'),
18170
+ buttonset = $('<div class="ui-dialog-buttonset"></div>'),
18171
+ buttonpane = $('<div class=" ui-helper-clearfix ui-dialog-buttonpane ui-widget-content"></div>')
18172
  .append(buttonset),
18173
  btnWidth = 0,
18174
  btnCnt = 0,
18175
  tabstops = $(),
18176
+ evCover = $('<div style="width:100%;height:100%;position:absolute;top:0px;left:0px;"></div>').hide(),
18177
  numberToTel = function() {
18178
  if (opts.optimizeNumber) {
18179
  dialog.find('input[type=number]').each(function() {
18229
  },
18230
  headerBtns = {
18231
  close: function() {
18232
+ titlebar.prepend($('<span class="ui-widget-header ui-dialog-titlebar-close ui-corner-all elfinder-titlebar-button"><span class="ui-icon ui-icon-closethick"></span></span>')
18233
+ .on('mousedown touchstart', function(e) {
18234
  e.preventDefault();
18235
  e.stopPropagation();
18236
  self.elfinderdialog('close');
18267
  dialog.trigger('resize', {init: true});
18268
  }
18269
  });
18270
+ titlebar.prepend($('<span class="ui-widget-header ui-corner-all elfinder-titlebar-button elfinder-titlebar-full"><span class="ui-icon ui-icon-plusthick"></span></span>')
18271
+ .on('mousedown touchstart', function(e) {
18272
  var elm = $(this);
18273
  e.preventDefault();
18274
  e.stopPropagation();
18286
  minimize: function() {
18287
  var btn, mnode, doffset;
18288
  if (opts.allowMinimize) {
18289
+ btn = $('<span class="ui-widget-header ui-corner-all elfinder-titlebar-button elfinder-titlebar-minimize"><span class="ui-icon ui-icon-minusthick"></span></span>')
18290
+ .on('mousedown touchstart', function(e) {
18291
  var $this = $(this),
18292
  tray = fm.getUI('bottomtray'),
18293
  dumStyle = { width: 70, height: 24 },
18294
+ dum = $('<div></div>').css(dumStyle).addClass(dialog.get(0).className + ' elfinder-dialog-minimized'),
18295
+ close = function() {
18296
+ mnode.remove();
18297
+ dialog.removeData('minimized').show();
18298
+ self.elfinderdialog('close');
18299
+ },
18300
  pos = {};
18301
 
18302
  e.preventDefault();
18303
  e.stopPropagation();
18304
  if (!dialog.data('minimized')) {
18305
  // minimize
18306
+ doffset = dialog.data('minimized', {
18307
+ dialog : function() { return mnode; },
18308
+ show : function() { mnode.show(); },
18309
+ hide : function() { mnode.hide(); },
18310
+ close : close,
18311
+ title : function(v) { mnode.children('.ui-dialog-titlebar').children('.elfinder-dialog-title').text(v); }
18312
+ }).position();
18313
  mnode = dialog.clone().on('mousedown', function() {
18314
  $this.trigger('mousedown');
18315
  }).removeClass('ui-draggable ui-resizable elfinder-frontmost');
18323
  mnode.find('.ui-dialog-titlebar-close').on('mousedown', function(e) {
18324
  e.stopPropagation();
18325
  e.preventDefault();
18326
+ close();
 
 
18327
  });
18328
  mnode.animate(pos, function() {
18329
  mnode.attr('style', '')
18357
  }
18358
  }
18359
  },
18360
+ dialog = $('<div class="ui-front ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable std42-dialog touch-punch '+cldialog+' '+opts.cssClass+'"></div>')
18361
  .hide()
18362
  .append(self)
18363
  .appendTo(elfNode)
18584
  css && dialog.css(css);
18585
  })
18586
  .on('resize', function(e, data) {
18587
+ var oh = 0, init = data && data.init, h, minH, maxH, autoH;
18588
  if ((data && (data.minimize || data.maxmize)) || dialog.data('minimized')) {
18589
  return;
18590
  }
18593
  dialog.children('.ui-widget-header,.ui-dialog-buttonpane').each(function() {
18594
  oh += $(this).outerHeight(true);
18595
  });
18596
+ autoH = (opts.height === 'auto')? true : false;
18597
+ if (autoH) {
18598
+ self.css({'max-height': '', 'height': 'auto'});
18599
+ }
18600
  if (!init && syncSize.enabled && !e.originalEvent && !dialog.hasClass('elfinder-maximized')) {
18601
+ h = dialog.height();
18602
+ minH = dialog.css('min-height') || h;
18603
+ maxH = dialog.css('max-height') || h;
18604
+ if (minH.match(/%/)) {
18605
+ minH = Math.floor((parseInt(minH) / 100) * dialog.parent().height());
18606
+ } else {
18607
+ minH = parseInt(minH);
18608
+ }
18609
+ if (maxH.match(/%/)) {
18610
+ maxH = Math.floor((parseInt(maxH) / 100) * dialog.parent().height());
18611
+ } else {
18612
+ maxH = parseInt(maxH);
18613
+ }
18614
+ h = Math.min((autoH? dialog.height() : syncSize.defaultSize.height), Math.max(maxH, minH) - oh - dialog.data('margin-y'));
18615
  } else {
18616
  h = dialog.height() - oh - dialog.data('margin-y');
18617
  }
18618
+ self.css(autoH? 'max-height' : 'height', h);
18619
  if (init) {
18620
  return;
18621
  }
18946
 
18947
  fm.bind('load', function() {
18948
  if (nav.children().length) {
18949
+ swipeHandle = $('<div class="elfinder-navbar-swipe-handle"></div>').hide().appendTo(wz);
18950
  if (swipeHandle.css('pointer-events') !== 'none') {
18951
  swipeHandle.remove();
18952
  swipeHandle = null;
19027
  nav.width(setWidth);
19028
  } else {
19029
  if (fm.UA.Mobile) {
19030
+ fm.one(fm.cssloaded? 'init' : 'cssloaded', function() {
19031
  var set = function() {
19032
  setWidth = nav.parent().width() / 2;
19033
  if (nav.data('defWidth') > setWidth) {
19082
  self.css('overflow', ovf);
19083
  }
19084
  },
19085
+ handle = $('<div class="ui-front ui-resizable-handle ui-resizable-n"></div>').appendTo(self),
19086
  sizeSyncs = {},
19087
  resizeFn = [],
19088
  initMaxHeight = (parseInt(opts.initMaxHeight) || 50) / 100,
19310
  place = 'statusbar',
19311
  clHover= fm.res('class', 'hover'),
19312
  prefix = 'path' + (elFinder.prototype.uniqueid? elFinder.prototype.uniqueid : '') + '-',
19313
+ wzbase = $('<div class="ui-widget-header ui-helper-clearfix elfinder-workzone-path"></div>'),
19314
  path = $(this).addClass('elfinder-path').html('&nbsp;')
19315
  .on('mousedown', 'span.elfinder-path-dir', function(e) {
19316
  var hash = $(this).attr('id').substr(prefix.length);
19325
  }
19326
  })
19327
  .prependTo(fm.getUI('statusbar').show()),
19328
+ roots = $('<div class="elfinder-path-roots"></div>').on('click', function(e) {
19329
  e.stopPropagation();
19330
  e.preventDefault();
19331
 
19350
  x: e.pageX,
19351
  y: e.pageY
19352
  });
19353
+ }).append('<span class="elfinder-button-icon elfinder-button-icon-menu" ></span>').appendTo(wzbase),
19354
  render = function(cwd) {
19355
  var dirs = [],
19356
  names = [];
19775
  save();
19776
  },
19777
  // sort button
19778
+ sortBtn = $('<span class="elfinder-button-icon elfinder-button-icon-sort elfinder-places-root-icon" title="'+fm.i18n('cmdsort')+'"></span>')
19779
  .hide()
19780
  .on('click', function(e) {
19781
  e.stopPropagation();
19953
 
19954
  dir.children().removeClass('ui-state-hover');
19955
 
19956
+ return $('<div class="ui-widget elfinder-place-drag elfinder-'+fm.direction+'"></div>')
19957
+ .append($('<div class="elfinder-navbar"></div>').show().append(dir.clone()));
19958
 
19959
  },
19960
  stop : function(e, ui) {
20086
  exists[hash] = file;
20087
  if (!fm.files().hasOwnProperty(file.hash)) {
20088
  // update cache
20089
+ fm.updateCache({tree: [file]});
20090
  }
20091
  });
20092
  $.each(dirs, function(h, f) {
20093
+ if (Boolean(f.notfound) === Boolean(exists[h])) {
20094
  if ((f.phash === cwd && ev.type !== 'netmount') || (exists[h] && exists[h].mime !== 'directory')) {
20095
  if (remove(h)) {
20096
  updated = true;
20261
  input.data('inctm', setTimeout(function() {
20262
  var val = input.val();
20263
  if (val.length === 0 || val.length >= isopts.minlen) {
20264
+ (incVal !== val) && fm.trigger('incsearchstart', {
20265
+ query: val,
20266
+ type: typeSet? typeSet.children('input:checked').val() : 'searchName'
20267
+ });
20268
  incVal = val;
20269
  if (val === '' && fm.searchStatus.state > 1 && fm.searchStatus.query) {
20270
  input.val(fm.searchStatus.query).trigger('select');
20295
  }
20296
  }
20297
 
20298
+ $('<span class="ui-icon ui-icon-search" title="'+cmd.title+'"></span>')
20299
  .appendTo(button)
20300
  .on('mousedown', function(e) {
20301
  e.stopPropagation();
20307
  }
20308
  });
20309
 
20310
+ $('<span class="ui-icon ui-icon-close"></span>')
20311
  .appendTo(button)
20312
  .on('mousedown', function(e) {
20313
  e.stopPropagation();
20343
  });
20344
  })
20345
  .one('open', function() {
20346
+ opts = (fm.api < 2.1)? null : $('<div class="ui-front ui-widget ui-widget-content elfinder-button-menu elfinder-button-search-menu ui-corner-all"></div>')
20347
  .append(
20348
+ $('<div class="buttonset"></div>')
20349
  .append(
20350
  $('<input id="'+id('SearchFromCwd')+'" name="serchfrom" type="radio" checked="checked"/><label for="'+id('SearchFromCwd')+'">'+fm.i18n('btnCwd')+'</label>'),
20351
  $('<input id="'+id('SearchFromVol')+'" name="serchfrom" type="radio"/><label for="'+id('SearchFromVol')+'">'+fm.i18n('btnVolume')+'</label>'),
20352
  $('<input id="'+id('SearchFromAll')+'" name="serchfrom" type="radio"/><label for="'+id('SearchFromAll')+'">'+fm.i18n('btnAll')+'</label>')
20353
  ),
20354
+ $('<div class="buttonset elfinder-search-type"></div>')
20355
  .append(
20356
  $('<input id="'+id('SearchName')+'" name="serchcol" type="radio" checked="checked" value="SearchName"/><label for="'+id('SearchName')+'">'+fm.i18n('btnFileName')+'</label>')
20357
  )
20482
  text = $('<span class="elfinder-button-text">'+cmd.title+'</span>'),
20483
  button = $(this).addClass('ui-state-default elfinder-button elfinder-menubutton elfiner-button-'+name)
20484
  .attr('title', cmd.title)
20485
+ .append('<span class="elfinder-button-icon elfinder-button-icon-'+name+'"></span>', text)
20486
  .on('mouseenter mouseleave', function(e) { !button.hasClass(disabled) && button.toggleClass(hover, e.type === 'mouseenter'); })
20487
  .on('click', function(e) {
20488
  if (!button.hasClass(disabled)) {
20497
  }
20498
  }),
20499
  hide = function() { fm.toHide(menu); },
20500
+ menu = $('<div class="ui-front ui-widget ui-widget-content elfinder-button-menu elfinder-button-sort-menu ui-corner-all"></div>')
20501
  .hide()
20502
  .appendTo(fm.getUI())
20503
  .on('mouseenter mouseleave', '.'+item, function(e) { $(this).toggleClass(hover, e.type === 'mouseenter'); })
20527
  text.hide();
20528
 
20529
  $.each(fm.sortRules, function(name, value) {
20530
+ menu.append($('<div class="'+item+'" rel="'+name+'"><span class="ui-icon ui-icon-arrowthick-1-n"></span><span class="ui-icon ui-icon-arrowthick-1-s"></span>'+fm.i18n('sort'+name)+'</div>').data('type', name));
20531
  });
20532
 
20533
  menu.children().on('click', function(e) {
20534
  cmd.exec([], $(this).removeClass(hover).attr('rel'));
20535
  });
20536
 
20537
+ $('<div class="'+item+' '+item+'-separated elfinder-sort-ext elfinder-sort-stick"><span class="ui-icon ui-icon-check"></span>'+fm.i18n('sortFoldersFirst')+'</div>')
20538
  .appendTo(menu)
20539
  .on('click', function() {
20540
  cmd.exec([], 'stick');
20542
 
20543
  fm.one('init', function() {
20544
  if (fm.ui.tree && fm.options.sortAlsoTreeview !== null) {
20545
+ $('<div class="'+item+' '+item+'-separated elfinder-sort-ext elfinder-sort-tree"><span class="ui-icon ui-icon-check"></span>'+fm.i18n('sortAlsoTreeview')+'</div>')
20546
  .appendTo(menu)
20547
  .on('click', function() {
20548
  cmd.exec([], 'tree');
20583
  $.fn.elfinderstat = function(fm) {
20584
  return this.each(function() {
20585
  var size = $(this).addClass('elfinder-stat-size'),
20586
+ sel = $('<div class="elfinder-stat-selected"></div>')
20587
  .on('click', 'a', function(e) {
20588
  var hash = $(this).data('hash');
20589
  e.preventDefault();
20769
  rmTm = setTimeout(rm, opts.timeOut);
20770
  }
20771
  }
20772
+ }).hide().addClass('toast-' + opts.mode).append($('<div class="elfinder-toast-msg"></div>').html(opts.msg.replace(/%([a-zA-Z0-9]+)%/g, function(m, m1) {
20773
  return fm.i18n(m1);
20774
  })));
20775
 
20779
 
20780
  if (opts.button) {
20781
  self.append(
20782
+ $('<button class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"></button>')
20783
+ .append($('<span class="ui-button-text"></span>').text(fm.i18n(opts.button.text)))
20784
  .on('mouseenter mouseleave', function(e) {
20785
  $(this).toggleClass('ui-state-hover', e.type == 'mouseenter');
20786
  })
20833
  l = panels.length;
20834
  while (l--) {
20835
  if (panels[l]) {
20836
+ panel = $('<div class="ui-widget-content ui-corner-all elfinder-buttonset"></div>');
20837
  i = panels[l].length;
20838
  while (i--) {
20839
  name = panels[l][i];
20840
  if ((!disabled || !disabled[name]) && (cmd = commands[name])) {
20841
  button = 'elfinder'+cmd.options.ui;
20842
  if (! buttons[name] && $.fn[button]) {
20843
+ buttons[name] = $('<div></div>')[button](cmd);
20844
  }
20845
  if (buttons[name]) {
20846
  buttons[name].children('.elfinder-button-text')[textLabel? 'show' : 'hide']();
20850
  }
20851
 
20852
  panel.children().length && self.prepend(panel);
20853
+ panel.children(':gt(0)').before('<span class="ui-widget-content elfinder-toolbar-button-separator"></span>');
20854
 
20855
  }
20856
  }
20859
  //cmdPref.state = !self.children().length? 0 : -1;
20860
  if (options.showPreferenceButton === 'always' || (!self.children().length && options.showPreferenceButton === 'auto')) {
20861
  //cmdPref.state = 0;
20862
+ panel = $('<div class="ui-widget-content ui-corner-all elfinder-buttonset"></div>');
20863
  name = 'preference';
20864
  button = 'elfinder'+cmd.options.ui;
20865
+ buttons[name] = $('<div></div>')[button](cmdPref);
20866
  buttons[name].children('.elfinder-button-text')[textLabel? 'show' : 'hide']();
20867
  panel.prepend(buttons[name]);
20868
  self.append(panel);
21028
  btn = buttons[from];
21029
  if (btn) {
21030
  if (! buttons[to] && $.fn[button]) {
21031
+ buttons[to] = $('<div></div>')[button](cmd);
21032
  if (buttons[to]) {
21033
  buttons[to].children('.elfinder-button-text')[textLabel? 'show' : 'hide']();
21034
  if (cmd.extendsCmd) {
21070
  }
21071
 
21072
  fm.bind('load', function() {
21073
+ swipeHandle = $('<div class="elfinder-toolbar-swipe-handle"></div>').hide().appendTo(fm.getUI());
21074
  if (swipeHandle.css('pointer-events') !== 'none') {
21075
  swipeHandle.remove();
21076
  swipeHandle = null;
21731
  }
21732
  });
21733
  if (prev > -1) {
21734
+ prevBtn = $('<button class="elfinder-navbar-pager elfinder-navbar-pager-prev"></button>')
21735
  .text(fm.i18n('btnPrevious', page, total))
21736
  .button({
21737
  icons: {
21747
  prevBtn = $();
21748
  }
21749
  if (next) {
21750
+ nextBtn = $('<button class="elfinder-navbar-pager elfinder-navbar-pager-next"></button>')
21751
  .text(fm.i18n('btnNext', page + 2, total))
21752
  .button({
21753
  icons: {
21789
  render();
21790
  },
21791
  dir, html, parent, sibling, init, atonce = {}, updates = [], base, node,
21792
+ lastKey, lastNodes = {};
21793
 
21794
  while (i--) {
21795
  dir = dirs[i];
21800
  done[dir.hash] = true;
21801
 
21802
  if ((parent = findSubtree(dir.phash)).length) {
21803
+ lastKey = dir.phash || 'treeroot';
21804
+ if (typeof lastNodes[lastKey] === 'undefined') {
21805
+ lastNodes[lastKey] = parent.children(':last');
21806
+ }
21807
+ init = !lastNodes[lastKey].length;
21808
+ if (dir.phash && (init || parent.hasClass('elfinder-navbar-hasmore') || (sibling = findSibling(parent, dir)).length)) {
21809
  if (init) {
21810
  if (!atonce[dir.phash]) {
21811
  atonce[dir.phash] = [];
21822
  }
21823
  } else {
21824
  node = itemhtml(dir);
21825
+ if (init) {
21826
+ parent.prepend(node);
21827
+ } else {
21828
+ lastNodes[lastKey].after(node);
21829
+ }
21830
  if (!dir.phash || dir.isroot) {
21831
  base = fm.navHash2Elm(dir.hash).parent();
21832
  }
22701
  var fm = cmd.fm,
22702
  button = $(this).elfinderbutton(cmd)
22703
  .off('click'),
22704
+ form = $('<form></form>').appendTo(button),
22705
  input = $('<input type="file" multiple="true" title="'+cmd.fm.i18n('selectForUpload')+'"/>')
22706
  .on('change', function() {
22707
  var _input = $(this);
22983
  };
22984
 
22985
  this.tpl = {
22986
+ main : '<div class="ui-helper-clearfix elfinder-info-title"><span class="elfinder-cwd-icon {class} ui-corner-all"></span>{title}</div>'
22987
  +'{dataTable}',
22988
  itemTitle : '<strong>{name}</strong><span id="elfinder-info-kind">{kind}</span>',
22989
  groupTitle : '<strong>{items}: {num}</strong>',
23484
  var link = file.url || fm.url(file.hash);
23485
  return {
23486
  icon: 'link',
23487
+ node: $('<a></a>')
23488
  .attr({href: link, target: '_blank', title: fm.i18n('link')})
23489
  .text(file.name)
23490
  .on('mousedown click touchstart touchmove touchend contextmenu', function(e){
23496
  if (dt) {
23497
  var icon = function(f) {
23498
  var mime = f.mime, i, tmb = fm.tmb(f);
23499
+ i = '<div class="elfinder-cwd-icon '+fm.mime2class(mime)+' ui-corner-all"></div>';
23500
  if (tmb) {
23501
  i = $(i).addClass(tmb.className).css('background-image', "url('"+tmb.url+"')").get(0).outerHTML;
23502
  }
23529
  var node;
23530
  self.extra = {
23531
  icon: 'link',
23532
+ node: $('<a></a>')
23533
  .attr({href: '#', title: fm.i18n('getLink'), draggable: 'false'})
23534
  .text(file.name)
23535
  .on('click touchstart', function(e){
23570
  if (fm.api >= 2.1012) {
23571
  czipdl = fm.getCommand('zipdl');
23572
  }
23573
+ dlntf = fm.cookieEnabled && fm.api > 2.1038 && !fm.isCORS;
23574
  });
23575
 
23576
  this.exec = function(select) {
23621
  preventDefault : true
23622
  }).done(function(e) {
23623
  var zipdl, dialog, btn = {}, dllink, form, iframe, m,
23624
+ uniq = 'dlw' + (+new Date()),
23625
+ zipdlFn = function(url) {
23626
+ dllink = $('<a></a>')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23627
  .attr('href', url)
23628
  .attr('download', fm.escape(dlName))
23629
  .on('click', function() {
23649
  click(dllink.hide().appendTo('body').get(0));
23650
  dllink.remove();
23651
  }
23652
+ };
23653
+ if (e.error) {
23654
+ fm.error(e.error);
23655
+ dfd.resolve();
23656
+ } else if (e.zipdl) {
23657
+ zipdl = e.zipdl;
23658
+ if (dlName) {
23659
+ m = fm.splitFileExtention(zipdl.name || '');
23660
+ dlName += m[1]? ('.' + m[1]) : '.zip';
23661
+ } else {
23662
+ dlName = zipdl.name;
23663
+ }
23664
+ if (html5dl || linkdl) {
23665
+ url = fm.options.url + (fm.options.url.indexOf('?') === -1 ? '?' : '&')
23666
+ + 'cmd=zipdl&download=1';
23667
+ $.each([hashes[0], zipdl.file, dlName, zipdl.mime], function(key, val) {
23668
+ url += '&targets%5B%5D='+encodeURIComponent(val);
23669
+ });
23670
+ $.each(fm.customData, function(key, val) {
23671
+ url += '&'+encodeURIComponent(key)+'='+encodeURIComponent(val);
23672
+ });
23673
+ url += '&'+encodeURIComponent(dlName);
23674
+ if (fm.hasParrotHeaders()) {
23675
+ fm.getBinaryByUrl({url: url}, function(blob) {
23676
+ if (blob instanceof Blob) {
23677
+ url = (window.URL || window.webkitURL).createObjectURL(blob);
23678
+ zipdlFn(url);
23679
+ } else {
23680
+ fm.error(['errUploadTransfer', fm.i18n('kindZIP')]);
23681
+ }
23682
+ });
23683
+ } else {
23684
+ zipdlFn(url);
23685
+ }
23686
  } else {
23687
+ form = $('<form action="'+fm.options.url+'" method="post" target="'+uniq+'" style="display:none"></form>')
23688
  .append('<input type="hidden" name="cmd" value="zipdl"/>')
23689
  .append('<input type="hidden" name="download" value="1"/>');
23690
  $.each([hashes[0], zipdl.file, dlName, zipdl.mime], function(key, val) {
23745
  }
23746
  },
23747
  reqids = [],
23748
+ link, html5dl, fileCnt, clickEv, cid, ntftm, reqid, getUrlDfrd, urls;
23749
 
23750
  if (!files.length) {
23751
  return dfrd.reject();
23782
  return dfrd;
23783
  } else {
23784
  reqids = [];
23785
+ getUrlDfrd = $.Deferred().done(function(urls) {
23786
+ for (i = 0; i < urls.length; i++) {
23787
+ url = urls[i];
23788
+ if (dlntf && url.substr(0, fm.options.url.length) === fm.options.url) {
23789
+ reqid = fm.getRequestId();
23790
+ reqids.push(reqid);
23791
+ url += '&cpath=' + cpath + '&reqid=' + reqid;
23792
+ ntftm = setTimeout(function() {
23793
+ fm.notify({
23794
+ type : 'download',
23795
+ cnt : 1,
23796
+ cancel : (fm.UA.IE || fm.UA.Edge)? void(0) : function() {
23797
+ if (reqids.length) {
23798
+ $.each(reqids, function() {
23799
+ fm.request({
23800
+ data: {
23801
+ cmd: 'abort',
23802
+ id: this
23803
+ },
23804
+ preventDefault: true
23805
+ });
23806
  });
23807
+ }
23808
+ reqids = [];
23809
  }
23810
+ });
23811
+ }, fm.notifyDelay);
23812
+ checkCookie(reqid);
23813
+ }
23814
+ if (html5dl) {
23815
+ click(link.attr('href', url)
23816
+ .attr('download', fm.escape(files[i].name))
23817
+ .get(0)
23818
+ );
 
 
 
 
 
 
 
 
 
 
 
23819
  } else {
23820
+ if (fm.UA.Mobile) {
23821
+ setTimeout(function(){
23822
+ if (! window.open(url)) {
23823
+ fm.error('errPopup');
23824
+ ntftm && cleaerTimeout(ntftm);
23825
+ closeNotify();
23826
+ }
23827
+ }, 100);
23828
+ } else {
23829
+ iframes += '<iframe class="downloader" id="downloader-' + files[i].hash+'" style="display:none" src="'+url+'"></iframe>';
23830
+ }
23831
  }
23832
  }
23833
+ link.remove();
23834
+ $(iframes)
23835
+ .appendTo('body')
23836
+ .ready(function() {
23837
+ setTimeout(function() {
23838
+ $(iframes).each(function() {
23839
+ $('#' + $(this).attr('id')).remove();
23840
+ });
23841
+ }, 20000 + (10000 * i)); // give 20 sec + 10 sec for each file to be saved
23842
+ });
23843
+ fm.trigger('download', {files : files});
23844
+ dfrd.resolve();
23845
+ });
23846
+ fileCnt = files.length;
23847
+ urls = [];
23848
+ for (i = 0; i < files.length; i++) {
23849
+ fm.openUrl(files[i].hash, true, function(v) {
23850
+ v && urls.push(v);
23851
+ if (--fileCnt < 1) {
23852
+ getUrlDfrd.resolve(urls);
23853
+ }
23854
  });
23855
+ }
23856
+ return dfrd;
23857
  }
23858
  };
23859
 
23941
  return str.replace(/\s+$/, '');
23942
  },
23943
  getEncSelect = function(heads) {
23944
+ var sel = $('<select class="ui-corner-all"></select>'),
23945
  hval;
23946
  if (heads) {
23947
  $.each(heads, function(i, head) {
23955
  return sel;
23956
  },
23957
  getDlgWidth = function() {
23958
+ var win = fm.options.dialogContained? fm.getUI() : $(window),
23959
+ m, width;
23960
  if (typeof self.options.dialogWidth === 'string' && (m = self.options.dialogWidth.match(/(\d+)%/))) {
23961
+ width = parseInt(win.width() * (m[1] / 100));
23962
  } else {
23963
  width = parseInt(self.options.dialogWidth || 650);
23964
  }
23965
+ return Math.min(width, win.width());
23966
+ },
23967
+ getDlgHeight = function() {
23968
+ if (!self.options.dialogHeight) {
23969
+ return void(0);
23970
+ }
23971
+ var win = fm.options.dialogContained? fm.getUI() : $(window),
23972
+ m, height;
23973
+ if (typeof self.options.dialogHeight === 'string' && (m = self.options.dialogHeight.match(/(\d+)%/))) {
23974
+ height = parseInt(win.height() * (m[1] / 100));
23975
+ } else {
23976
+ height = parseInt(self.options.dialogHeight || win.height());
23977
+ }
23978
+ return Math.min(height, win.height());
23979
  },
23980
 
23981
  /**
24039
  * @param String content file content
24040
  * @return $.Deferred
24041
  **/
24042
+ dialog = function(id, file, content, encoding, editor, toasts) {
24043
 
24044
  var dfrd = $.Deferred(),
24045
  _loaded = false,
24053
  }
24054
  return true;
24055
  },
24056
+ makeToasts = function() {
24057
+ // make toast message
24058
+ if (toasts && Array.isArray(toasts)) {
24059
+ $.each(toasts, function() {
24060
+ this.msg && fm.toast(this);
24061
+ });
24062
+ }
24063
+ },
24064
  save = function() {
24065
  var encord = selEncoding? selEncoding.val():void(0),
24066
  saveDfd = $.Deferred().fail(function(err) {
24067
  dialogNode.show().find('button.elfinder-btncnt-0,button.elfinder-btncnt-1').hide();
24068
  }),
24069
+ conf, res, tm;
24070
  if (!loaded()) {
24071
  return saveDfd.resolve();
24072
  }
24080
  res = getContent();
24081
  setOld(res);
24082
  if (res.promise) {
24083
+ tm = setTimeout(function() {
24084
+ fm.notify({
24085
+ type : 'chkcontent',
24086
+ cnt : 1,
24087
+ hideCnt: true,
24088
+ cancel : function() {
24089
+ res.reject();
24090
+ }
24091
+ });
24092
+ }, 100);
24093
+ res.always(function() {
24094
+ tm && clearTimeout(tm);
24095
+ fm.notify({ type : 'chkcontent', cnt: -1 });
24096
+ }).done(function(data) {
24097
  dfrd.notifyWith(ta, [encord, ta.data('hash'), old, saveDfd]);
24098
  }).fail(function(err) {
24099
  saveDfd.reject(err);
24114
  },
24115
  savecl = function() {
24116
  if (!loaded()) { return; }
24117
+ dialogNode.hide();
24118
  save().done(function() {
24119
  _loaded = false;
24120
  dialogNode.show();
24123
  dialogNode.show();
24124
  err && fm.error(err);
24125
  });
 
24126
  },
24127
  saveAs = function() {
24128
  if (!loaded()) { return; }
24129
  var prevOld = old,
24130
+ phash = file.phash,
24131
  fail = function(err) {
24132
  dialogs.addClass(clsEditing).fadeIn(function() {
24133
  err && fm.error(err);
24143
  self.data = {target : phash};
24144
  $.proxy(fm.res('mixin', 'make'), self)()
24145
  .done(function(data) {
24146
+ var oldHash;
24147
  if (data.added && data.added.length) {
24148
+ oldHash = ta.data('hash');
24149
  ta.data('hash', data.added[0].hash);
24150
  save().done(function() {
24151
  _loaded = false;
24152
  dialogNode.show();
24153
  cancel();
24154
  dialogs.fadeIn();
24155
+ }).fail(function() {
24156
+ fm.exec('rm', [data.added[0].hash], { forceRm: true, quiet: true });
24157
+ ta.data('hash', oldHash);
24158
+ dialogNode.find('button.elfinder-btncnt-2').hide();
24159
+ fail();
24160
+ });
24161
  } else {
24162
  fail();
24163
  }
24177
  fm.trigger('unselectfiles', { files: [ file.hash ] });
24178
  },
24179
  reqOpen = null,
24180
+ reqInfo = null,
24181
  dialogs = fm.getUI().children('.' + self.dialogClass + ':visible');
24182
  if (dialogNode.is(':hidden')) {
24183
  dialogs = dialogs.add(dialogNode);
24188
 
24189
  if (fm.searchStatus.state < 2 && phash !== fm.cwd().hash) {
24190
  reqOpen = fm.exec('open', [phash], {thash: phash});
24191
+ } else if (!fm.file(phash)) {
24192
+ reqInfo = fm.request({cmd: 'info', targets: [phash]});
24193
  }
24194
 
24195
+ $.when([reqOpen, reqInfo]).done(function() {
24196
+ if (reqInfo) {
24197
+ fm.one('infodone', function() {
24198
+ fm.file(phash)? make() : fail('errFolderNotFound');
24199
+ });
24200
+ } else {
24201
+ reqOpen? fm.one('cwdrender', make) : make();
24202
+ }
24203
  }).fail(fail);
24204
  },
24205
  changed = function() {
24215
  fm.notify({
24216
  type : 'chkcontent',
24217
  cnt : 1,
24218
+ hideCnt: true,
24219
+ cancel : function() {
24220
+ res.reject();
24221
+ }
24222
  });
24223
  }, 100);
24224
  res.always(function() {
24227
  }).done(function(d) {
24228
  dfd.resolve(old !== d);
24229
  }).fail(function(err) {
24230
+ dfd.resolve(err || (old === undefined? false : true));
24231
  });
24232
  } else {
24233
  dfd.resolve(old !== res);
24237
  opts = {
24238
  title : fm.escape(file.name),
24239
  width : getDlgWidth(),
24240
+ height : getDlgHeight(),
24241
  buttons : {},
24242
  cssClass : clsEditing,
24243
  maxWidth : 'window',
24329
  error && fm.error(error);
24330
  ta.elfinderdialog('destroy');
24331
  return;
24332
+ }).always(makeToasts);
24333
  } else {
24334
  _loaded = true;
24335
  if (loadRes && (typeof loadRes === 'string' || Array.isArray(loadRes))) {
24343
  requestAnimationFrame(function() {
24344
  dialogNode.trigger('resize');
24345
  });
24346
+ makeToasts();
24347
  }
24348
  conf = ta.editor.confObj;
24349
  if (conf.info && conf.info.syncInterval) {
24363
  }
24364
  },
24365
  getContent = function() {
24366
+ var res = ta.getContent.call(ta, ta[0]);
24367
+ if (res === undefined || res === false || res === null) {
24368
+ res = $.Deferred().reject();
24369
+ }
24370
+ return res;
24371
  },
24372
  setOld = function(res) {
24373
  if (res && res.promise) {
24386
  }, interval);
24387
  }
24388
  },
24389
+ stateChange = function() {
24390
+ if (selEncoding) {
24391
+ changed().done(function(change) {
24392
+ if (change) {
24393
+ selEncoding.attr('title', fm.i18n('saveAsEncoding')).addClass('elfinder-edit-changed');
24394
+ } else {
24395
+ selEncoding.attr('title', fm.i18n('openAsEncoding')).removeClass('elfinder-edit-changed');
24396
+ }
24397
+ });
24398
+ }
24399
+ },
24400
  saveAsFile = {},
24401
  ta, old, dialogNode, selEncoding, extEditor, maxW, syncInterval;
24402
 
24431
  return dfrd.reject('errEditorNotFound');
24432
  }
24433
  (function() {
 
 
 
 
 
 
 
 
 
 
 
 
24434
  ta = $('<textarea class="elfinder-file-edit" rows="20" id="'+id+'-ta"></textarea>')
24435
  .on('input propertychange', stateChange);
24436
 
24437
+ if (!editor || !editor.info || editor.info.useTextAreaEvent) {
24438
  ta.on('keydown', function(e) {
24439
  var code = e.keyCode,
24440
  value, start;
24469
  }
24470
 
24471
  ta.initEditArea = function(id, file, content) {
 
 
 
 
 
 
 
24472
  // ta.hide() for performance tune. Need ta.show() in `load()` if use textarea node.
24473
  ta.hide().val(content);
24474
+ this._setupSelEncoding(content);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24475
  };
24476
  })();
24477
  }
24478
+
24479
+ // extended function to setup selector of encoding for text editor
24480
+ ta._setupSelEncoding = function(content) {
24481
+ var heads = (encoding && encoding !== 'unknown')? [{value: encoding}] : [],
24482
+ wfake = $('<select></select>').hide(),
24483
+ setSelW = function(init) {
24484
+ init && wfake.appendTo(selEncoding.parent());
24485
+ wfake.empty().append($('<option></option>').text(selEncoding.val()));
24486
+ selEncoding.width(wfake.width());
24487
+ };
24488
+ if (content === '' || ! encoding || encoding !== 'UTF-8') {
24489
+ heads.push({value: 'UTF-8'});
24490
+ }
24491
+ selEncoding = getEncSelect(heads).on('touchstart', function(e) {
24492
+ // for touch punch event handler
24493
+ e.stopPropagation();
24494
+ }).on('change', function() {
24495
+ // reload to change encoding if not edited
24496
+ changed().done(function(change) {
24497
+ if (! change && getContent() !== '') {
24498
+ cancel();
24499
+ edit(file, selEncoding.val(), editor).fail(function(err) { err && fm.error(err); });
24500
+ }
24501
+ });
24502
+ setSelW();
24503
+ }).on('mouseover', stateChange);
24504
+ ta.parent().next().prepend($('<div class="ui-dialog-buttonset elfinder-edit-extras"></div>').append(selEncoding));
24505
+ setSelW(true);
24506
+ };
24507
+
24508
  ta.data('hash', file.hash);
24509
 
24510
  if (extEditor) {
24569
  });
24570
 
24571
  // care to viewport scale change with mobile devices
24572
+ maxW = (fm.options.dialogContained? fm.getUI() : $(window)).width();
24573
  (dialogNode.width() > maxW) && dialogNode.width(maxW);
24574
 
24575
  return dfrd.promise();
24629
  req.resolve({});
24630
  }
24631
  } else {
24632
+ if (conv) {
24633
+ file.encoding = conv;
24634
+ fm.cache(file, 'change');
24635
+ }
24636
  req = fm.request({
24637
  data : {cmd : 'get', target : hash, conv : conv, _t : file.ts},
24638
  options : {type: 'get', cache : true},
24659
  },
24660
  optionsCallback : function(options) {
24661
  options.create = function() {
24662
+ var base = $('<div class="elfinder-dialog-confirm-encoding"></div>'),
24663
  head = {value: data.doconv},
24664
  detected;
24665
 
24685
  }
24686
  }
24687
  }
24688
+ dialog(id, file, data.content, data.encoding, editor, data.toasts)
24689
  .done(function(data) {
24690
  dfrd.resolve(data);
24691
  })
24732
  .fail(function(error) {
24733
  var err = fm.parseError(error);
24734
  err = Array.isArray(err)? err[0] : err;
24735
+ if (file.encoding) {
24736
+ file.encoding = '';
24737
+ fm.cache(file, 'change');
24738
+ }
24739
  (err !== 'errConvUTF8') && fm.sync();
24740
  dfrd.reject(error);
24741
  });
24828
  var name;
24829
  if ((cnt === 1 || !editor.info.single)
24830
  && ((!editor.info || !editor.info.converter)? file.write : cwdWrite)
24831
+ && (file.size > 0 || (!editor.info.converter && editor.info.canMakeEmpty !== false && fm.mimesCanMakeEmpty[file.mime]))
24832
  && (!editor.info.maxSize || file.size <= editor.info.maxSize)
24833
  && mimeMatch(file.mime, editor.mimes || null)
24834
  && extMatch(file.name, editor.exts || null)
24892
  },
24893
  stored;
24894
 
24895
+ // make public method
24896
+ this.getEncSelect = getEncSelect;
24897
+
24898
  this.shortcuts = [{
24899
  pattern : 'ctrl+e'
24900
  }];
24970
  fm.trigger('helpIntegration', Object.assign({cmd: 'edit'}, editor.info.integrate));
24971
  }
24972
  if (editor.info.canMakeEmpty) {
24973
+ fm.trigger('canMakeEmptyFile', {mimes: Array.isArray(editor.info.canMakeEmpty)? editor.info.canMakeEmpty : editor.mimes});
24974
  }
24975
  }
24976
  });
25018
  single(editor);
25019
  self.extra = {
25020
  icon: 'menu',
25021
+ node: $('<span></span>')
25022
  .attr({title: fm.i18n('select')})
25023
  .on('click touchstart', function(e){
25024
  if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) {
25049
  .bind('canMakeEmptyFile', function(e) {
25050
  if (e.data && e.data.resetTexts) {
25051
  var defs = fm.arrayFlip(self.options.makeTextMimes || ['text/plain']),
25052
+ hides = self.getMkfileHides();
25053
 
25054
  $.each((fm.storage('mkfileTextMimes') || {}), function(mime, type) {
25055
  if (!defs[mime]) {
25127
 
25128
  getEditor().done(function(editor) {
25129
  while ((file = files.shift())) {
25130
+ list.push(edit(file, (file.encoding || void(0)), editor).fail(function(error) {
25131
  error && fm.error(error);
25132
  }));
25133
  }
25148
  return dfrd;
25149
  };
25150
 
25151
+ this.getMkfileHides = function() {
25152
+ return fm.storage('mkfileHides') || fm.arrayFlip(self.options.mkfileHideMimes || []);
25153
+ };
25154
+
25155
  };
25156
 
25157
 
25537
  var self = this,
25538
  fm = this.fm,
25539
  update = function(e, data) {
25540
+ var full;
25541
  e.preventDefault();
25542
  e.stopPropagation();
25543
  if (data && data.fullscreen) {
25544
+ full = (data.fullscreen === 'on');
25545
+ self.update(void(0), full);
25546
+ self.title = fm.i18n(full ? 'reinstate' : 'cmdfullscreen');
25547
  }
25548
  };
25549
 
25769
  html = ['<div class="ui-tabs ui-widget ui-widget-content ui-corner-all elfinder-help">',
25770
  '<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-top">'],
25771
  stpl = '<div class="elfinder-help-shortcut"><div class="elfinder-help-shortcut-pattern">{pattern}</div> {descrip}</div>',
25772
+ sep = '<div class="elfinder-help-separator"></div>',
25773
  selfUrl = $('base').length? document.location.href.replace(/#.*$/, '') : '',
25774
  clTabActive = fm.res('class', 'tabsactive'),
25775
 
25784
  },
25785
 
25786
  about = function() {
25787
+ html.push('<div id="'+fm.namespace+'-help-about" class="ui-tabs-panel ui-widget-content ui-corner-bottom"><div class="elfinder-help-logo"></div>');
25788
  html.push('<h3>elFinder</h3>');
25789
  html.push('<div class="'+prim+'">'+fm.i18n('webfm')+'</div>');
25790
  html.push('<div class="'+sec+'">'+fm.i18n('ver')+': '+fm.version+'</div>');
25820
 
25821
  html.push(sep);
25822
  html.push('<div class="'+lic+'">Licence: 3-clauses BSD Licence</div>');
25823
+ html.push('<div class="'+lic+'">Copyright © 2009-2020, Studio 42</div>');
25824
  html.push('<div class="'+lic+'">„ …'+fm.i18n('dontforget')+' ”</div>');
25825
  html.push('</div>');
25826
  },
25854
  useInteg = false,
25855
  integrations = function() {
25856
  useInteg = true;
25857
+ html.push('<div id="'+fm.namespace+'-help-integrations" class="ui-tabs-panel ui-widget-content ui-corner-bottom"></div>');
25858
  },
25859
  useDebug = false,
25860
  debug = function() {
25868
  debugRender = function() {
25869
  var render = function(elm, obj) {
25870
  $.each(obj, function(k, v) {
25871
+ elm.append($('<dt></dt>').text(k));
25872
  if (typeof v === 'undefined') {
25873
+ elm.append($('<dd></dd>').append($('<span></span>').text('undfined')));
25874
  } else if (typeof v === 'object' && !v) {
25875
+ elm.append($('<dd></dd>').append($('<span></span>').text('null')));
25876
  } else if (typeof v === 'object' && ($.isPlainObject(v) || v.length)) {
25877
+ elm.append( $('<dd></dd>').append(render($('<dl></dl>'), v)));
25878
  } else {
25879
+ elm.append($('<dd></dd>').append($('<span></span>').text((v && typeof v === 'object')? '[]' : (v? v : '""'))));
25880
  }
25881
  });
25882
  return elm;
25899
  }
25900
 
25901
  tabId = fm.namespace + '-help-debug-' + (+new Date());
25902
+ targetL = $('<li></li>').html('<a href="'+selfUrl+'#'+tabId+'">'+self.debug.debug.cmd+'</a>').prependTo(debugUL);
25903
+ target = $('<div id="'+tabId+'"></div>').data('debug', self.debug);
25904
 
25905
  targetL.on('click.debugrender', function() {
25906
  var debug = target.data('debug');
25908
  if (debug) {
25909
  target.hide();
25910
  if (debug.debug) {
25911
+ info = $('<fieldset>').append($('<legend></legend>').text('debug'), render($('<dl></dl>'), debug.debug));
25912
  target.append(info);
25913
  }
25914
  if (debug.options) {
25915
+ info = $('<fieldset>').append($('<legend></legend>').text('options'), render($('<dl></dl>'), debug.options));
25916
  target.append(info);
25917
  }
25918
  target.show();
25992
 
25993
  if (useInteg) {
25994
  tabInteg = content.find('.elfinder-help-tab-integrations').hide();
25995
+ integDIV = content.find('#'+fm.namespace+'-help-integrations').hide().append($('<div class="elfinder-help-integrations-desc"></div>').html(fm.i18n('integrationWith')));
25996
  fm.bind('helpIntegration', function(e) {
25997
  var ul = integDIV.children('ul:first'),
25998
  data, elm, cmdUL, cmdCls;
26008
  data.title = data.link;
26009
  }
26010
  if (data.link) {
26011
+ elm = $('<a></a>').attr('href', data.link).attr('target', '_blank').text(data.title);
26012
  } else {
26013
+ elm = $('<span></span>').text(data.title);
26014
  }
26015
  if (data.banner) {
26016
+ elm = $('<span></span>').append($('<img/>').attr(data.banner), elm);
26017
  }
26018
  }
26019
  } else {
26028
  if (elm) {
26029
  tabInteg.show();
26030
  if (!ul.length) {
26031
+ ul = $('<ul class="elfinder-help-integrations"></ul>').appendTo(integDIV);
26032
  }
26033
  if (data && data.cmd) {
26034
  cmdCls = 'elfinder-help-integration-' + data.cmd;
26035
  cmdUL = ul.find('ul.' + cmdCls);
26036
  if (!cmdUL.length) {
26037
+ cmdUL = $('<ul class="'+cmdCls+'"></ul>');
26038
+ ul.append($('<li></li>').append($('<span></span>').html(fm.i18n('cmd'+data.cmd))).append(cmdUL));
26039
  }
26040
+ elm = cmdUL.append($('<li></li>').append(elm));
26041
  } else {
26042
+ ul.append($('<li></li>').append(elm));
26043
  }
26044
  }
26045
  }
26235
  });
26236
 
26237
  this.getstate = function(sel) {
26238
+ return (this.fm.cookieEnabled && cMenuType !== 'cwd' && (sel || this.fm.selected()).length) || hideCnt? 0 : -1;
26239
  };
26240
 
26241
  this.exec = function(hashes, opts) {
26432
  }
26433
 
26434
  this.tpl = {
26435
+ main : '<div class="ui-helper-clearfix elfinder-info-title {dirclass}"><span class="elfinder-cwd-icon {class} ui-corner-all"{style}></span>{title}</div><table class="elfinder-info-tb">{content}</table>',
26436
  itemTitle : '<strong>{name}</strong><span class="elfinder-info-kind">{kind}</span>',
26437
  groupTitle : '<strong>{items}: {num}</strong>',
26438
  row : '<tr><td class="elfinder-info-label">{label} : </td><td class="{class}">{value}</td></tr>',
26439
+ spinner : '<span>{text}</span> <span class="'+spclass+' '+spclass+'-{name}"></span>'
26440
  };
26441
 
26442
  this.alwaysEnabled = true;
26494
  customActions = [],
26495
  style = '',
26496
  hashClass = 'elfinder-font-mono elfinder-info-hash',
26497
+ getHashAlgorisms = [],
26498
+ ndialog = fm.ui.notify,
26499
+ size, tmb, file, title, dcnt, rdcnt, path, hideItems, hashProg;
26500
+
26501
+ if (ndialog.is(':hidden') && ndialog.children('.elfinder-notify').length) {
26502
+ ndialog.elfinderdialog('open').height('auto');
26503
+ }
26504
+
26505
  if (!cnt) {
26506
  return $.Deferred().reject();
26507
  }
26578
  } else if (file.mime.indexOf('image') !== -1) {
26579
  if (file.width && file.height) {
26580
  content.push(row.replace(l, msg.dim).replace(v, file.width+'x'+file.height));
26581
+ } else if (file.size && file.size !== '0') {
26582
  content.push(row.replace(l, msg.dim).replace(v, tpl.spinner.replace('{text}', msg.calc).replace('{name}', 'dim')));
26583
  reqs.push(fm.request({
26584
  data : {cmd : 'dim', target : file.hash},
26607
  !hideItems.group && file.group && content.push(row.replace(l, msg.group).replace(v, file.group));
26608
  !hideItems.perm && file.perm && content.push(row.replace(l, msg.perm).replace(v, fm.formatFileMode(file.perm)));
26609
 
26610
+ // Get MD5, SHA hashes
26611
  if (window.ArrayBuffer && (fm.options.cdns.sparkmd5 || fm.options.cdns.jssha) && file.mime !== 'directory' && file.size > 0 && (!o.showHashMaxsize || file.size <= o.showHashMaxsize)) {
26612
  getHashAlgorisms = [];
26613
  $.each(fm.storage('hashchekcer') || o.showHashAlgorisms, function(i, n) {
26614
  if (!file[n]) {
26615
+ content.push(row.replace(l, fm.i18n(n)).replace(v, tpl.spinner.replace('{text}', msg.calc).replace('{name}', n)));
26616
  getHashAlgorisms.push(n);
26617
  } else {
26618
  content.push(row.replace(l, fm.i18n(n)).replace(v, file[n]).replace('{class}', hashClass));
26619
  }
26620
  });
26621
 
26622
+ if (getHashAlgorisms.length) {
26623
+ hashProg = $('<div class="elfinder-quicklook-info-progress"></div>');
26624
+ reqs.push(
26625
+ fm.getContentsHashes(file.hash, getHashAlgorisms, o.showHashOpts, { progressBar : hashProg }).progress(function(hashes) {
26626
+ $.each(getHashAlgorisms, function(i, n) {
26627
+ if (hashes[n]) {
26628
+ replSpinner(hashes[n], n, hashClass);
26629
+ }
26630
+ });
26631
+ }).always(function() {
26632
+ $.each(getHashAlgorisms, function(i, n) {
26633
+ replSpinner(msg.unknown, n);
26634
+ });
26635
+ })
26636
+ );
26637
+ }
26638
  }
26639
 
26640
  // Add custom info fields
26690
  $(this).html(applyZWSP($(this).html(), true));
26691
  });
26692
 
26693
+ if (getHashAlgorisms.length) {
26694
+ hashProg.appendTo(dialog.find('.'+spclass+'-'+getHashAlgorisms[0]).parent());
26695
+ }
26696
+
26697
  if (fm.UA.Mobile && $.fn.tooltip) {
26698
  dialog.children('.ui-dialog-content .elfinder-info-title').tooltip({
26699
  classes: {
26881
 
26882
  this.fm.bind('open reload canMakeEmptyFile', function() {
26883
  var fm = self.fm,
26884
+ hides = fm.getCommand('edit').getMkfileHides();
26885
  self.variants = [];
26886
  if (fm.mimesCanMakeEmpty) {
26887
  $.each(fm.mimesCanMakeEmpty, function(mime, type) {
26934
  this.handlers = {
26935
  load : function() {
26936
  var fm = self.fm;
26937
+ if (fm.cookieEnabled) {
26938
+ fm.one('open', function() {
26939
+ self.drivers = fm.netDrivers;
26940
+ if (self.drivers.length) {
26941
+ $.each(self.drivers, function() {
26942
+ var d = self.options[this];
26943
+ if (d) {
26944
+ hasMenus = true;
26945
+ if (d.integrateInfo) {
26946
+ fm.trigger('helpIntegration', Object.assign({cmd: 'netmount'}, d.integrateInfo));
26947
+ }
26948
  }
26949
+ });
26950
+ }
26951
  });
26952
  }
26953
  }
26966
  inputs.protocol.trigger('change', 'winfocus');
26967
  },
26968
  inputs = {
26969
+ protocol : $('<select></select>')
26970
  .on('change', function(e, data){
26971
  var protocol = this.value;
26972
  content.find('.elfinder-netmount-tr').hide();
26975
  if (typeof o[protocol].select == 'function') {
26976
  o[protocol].select(fm, e, data);
26977
  }
 
 
 
26978
  })
26979
  .addClass('ui-corner-all')
26980
  },
26981
  opts = {
26982
  title : fm.i18n('netMountDialogTitle'),
26983
+ resizable : true,
26984
  modal : true,
26985
  destroyOnClose : false,
26986
  open : function() {
26996
  doMount = function() {
26997
  var protocol = inputs.protocol.val(),
26998
  data = {cmd : 'netmount', protocol: protocol},
26999
+ cur = o[protocol],
27000
+ mnt2res;
27001
  $.each(content.find('input.elfinder-netmount-inputs-'+protocol), function(name, input) {
27002
  var val, elm;
27003
  elm = $(input);
27012
  data[input.name] = val;
27013
  }
27014
  });
27015
+
27016
  if (!data.host) {
27017
  return fm.trigger('error', {error : 'errNetMountHostReq', opts : {modal: true}});
27018
  }
27019
+
27020
+ if (data.mnt2res) {
27021
+ mnt2res = true;
27022
+ }
27023
+
27024
  fm.request({data : data, notify : {type : 'netmount', cnt : 1, hideCnt : true}})
27025
  .done(function(data) {
27026
  var pdir;
27027
  if (data.added && data.added.length) {
27028
+ mnt2res && inputs.protocol.trigger('change', 'reset');
27029
  if (data.added[0].phash) {
27030
  if (pdir = fm.file(data.added[0].phash)) {
27031
  if (! pdir.dirs) {
27049
 
27050
  self.dialog.elfinderdialog('close');
27051
  },
27052
+ form = $('<form autocomplete="off"></form>').on('keydown', 'input', function(e) {
27053
  var comp = true,
27054
  next;
27055
  if (e.keyCode === $.ui.keyCode.ENTER) {
27067
  }
27068
  }
27069
  }),
27070
+ hidden = $('<div></div>'),
27071
  dialog;
27072
 
27073
+ content = $('<table class="elfinder-info-tb elfinder-netmount-tb"></table>')
27074
+ .append($('<tr></tr>').append($('<td>'+fm.i18n('protocol')+'</td>')).append($('<td></td>').append(inputs.protocol)));
27075
 
27076
  $.each(self.drivers, function(i, protocol) {
27077
  if (o[protocol]) {
27080
  input.attr('name', name);
27081
  if (input.attr('type') != 'hidden') {
27082
  input.addClass('ui-corner-all elfinder-netmount-inputs-'+protocol);
27083
+ content.append($('<tr></tr>').addClass('elfinder-netmount-tr elfinder-netmount-tr-'+protocol).append($('<td>'+fm.i18n(name)+'</td>')).append($('<td></td>').append(input)));
27084
  } else {
27085
  input.addClass('elfinder-netmount-inputs-'+protocol);
27086
  hidden.append(input);
27093
  content.append(hidden);
27094
 
27095
  content.find('.elfinder-netmount-tr').hide();
27096
+ content.find('.elfinder-netmount-tr-' + self.drivers[0]).show();
27097
 
27098
  opts.buttons[fm.i18n('btnMount')] = doMount;
27099
 
27103
 
27104
  content.find('select,input').addClass('elfinder-tabstop');
27105
 
27106
+ dialog = self.fmDialog(form.append(content), opts).ready(function() {
 
 
27107
  inputs.protocol.trigger('change');
27108
  dialog.elfinderdialog('posInit');
27109
  });
27110
+ dialogNode = dialog.closest('.ui-dialog');
27111
  return dialog;
27112
  },
27113
  dialogNode;
27123
 
27124
  self.fm.bind('netmount', function(e) {
27125
  var d = e.data || null,
27126
+ o = self.options,
27127
+ done = function() {
27128
+ if (o[d.protocol] && typeof o[d.protocol].done == 'function') {
27129
+ o[d.protocol].done(self.fm, d);
27130
+ content.find('select,input').addClass('elfinder-tabstop');
27131
+ self.dialog.elfinderdialog('tabstopsInit');
27132
+ }
27133
+ };
27134
  if (d && d.protocol) {
27135
+ if (d.mode && d.mode === 'redirect') {
27136
+ // To support of third-party cookie blocking (ITP) on CORS
27137
+ // On iOS and iPadOS 13.4 and Safari 13.1 on macOS, the session cannot be continued when redirecting OAuth in CORS mode
27138
+ self.fm.request({
27139
+ data : {cmd : 'netmount', protocol : d.protocol, host: d.host, user : 'init', pass : 'return', options: d.options},
27140
+ preventDefault : true
27141
+ }).done(function(data) {
27142
+ d = JSON.parse(data.body);
27143
+ done();
27144
+ });
27145
+ } else {
27146
+ done();
27147
  }
27148
  }
27149
  });
27308
  * @author Dmitry (dio) Levashov
27309
  **/
27310
  (elFinder.prototype.commands.open = function() {
27311
+ var fm = this.fm,
27312
+ self = this;
27313
  this.alwaysEnabled = true;
27314
  this.noChangeDirOnRemovedCwd = true;
27315
 
27316
  this._handlers = {
27317
+ dblclick : function(e) {
27318
+ var arg = e.data && e.data.file? [ e.data.file ]: void(0);
27319
+ if (self.getstate(arg) === 0) {
27320
+ e.preventDefault();
27321
+ fm.exec('open', arg);
27322
+ }
27323
+ },
27324
  'select enable disable reload' : function(e) { this.update(e.type == 'disable' ? -1 : void(0)); }
27325
  };
27326
 
27333
  cnt = sel.length;
27334
 
27335
  return cnt == 1
27336
+ ? (sel[0].read ? 0 : -1)
27337
  : (cnt && !fm.UA.Mobile) ? ($.grep(sel, function(file) { return file.mime == 'directory' || ! file.read ? false : true;}).length == cnt ? 0 : -1) : -1;
27338
  };
27339
 
27381
  }
27382
 
27383
  var doOpen = function() {
27384
+ var openCB = function(url) {
27385
+ var link = $('<a>').hide().appendTo($('body'));
27386
+ if (fm.UA.Mobile || !inline) {
27387
+ if (html5dl) {
27388
+ if (!inline) {
27389
+ link.attr('download', file.name);
27390
+ } else {
27391
+ link.attr('target', '_blank');
27392
+ }
27393
+ link.attr('href', url).get(0).click();
27394
+ } else {
27395
+ wnd = window.open(url);
27396
+ if (!wnd) {
27397
+ return dfrd.reject('errPopup');
27398
+ }
27399
+ }
27400
+ } else {
27401
+ getOnly = (typeof opts.method === 'string' && opts.method.toLowerCase() === 'get');
27402
+ if (!getOnly
27403
+ && url.indexOf(fm.options.url) === 0
27404
+ && fm.customData
27405
+ && Object.keys(fm.customData).length
27406
+ // Since playback by POST request can not be done in Chrome, media allows GET request
27407
+ && !file.mime.match(/^(?:video|audio)/)
27408
+ ) {
27409
+ // Send request as 'POST' method to hide custom data at location bar
27410
+ url = '';
27411
+ }
27412
+ if (into === 'window') {
27413
+ // set window size for image if set
27414
+ imgW = winW = Math.round(2 * screen.availWidth / 3);
27415
+ imgH = winH = Math.round(2 * screen.availHeight / 3);
27416
+ if (parseInt(file.width) && parseInt(file.height)) {
27417
+ imgW = parseInt(file.width);
27418
+ imgH = parseInt(file.height);
27419
+ } else if (file.dim) {
27420
+ s = file.dim.split('x');
27421
+ imgW = parseInt(s[0]);
27422
+ imgH = parseInt(s[1]);
27423
+ }
27424
+ if (winW >= imgW && winH >= imgH) {
27425
+ winW = imgW;
27426
+ winH = imgH;
27427
+ } else {
27428
+ if ((imgW - winW) > (imgH - winH)) {
27429
+ winH = Math.round(imgH * (winW / imgW));
27430
+ } else {
27431
+ winW = Math.round(imgW * (winH / imgH));
27432
+ }
27433
+ }
27434
+ w = 'width='+winW+',height='+winH;
27435
+ wnd = window.open(url, target, w + ',top=50,left=50,scrollbars=yes,resizable=yes,titlebar=no');
27436
+ } else {
27437
+ if (into === 'tabs') {
27438
+ target = file.hash;
27439
+ }
27440
+ wnd = window.open('about:blank', target);
27441
+ }
27442
+
27443
+ if (!wnd) {
27444
+ return dfrd.reject('errPopup');
27445
+ }
27446
+
27447
+ if (url === '') {
27448
+ var form = document.createElement("form");
27449
+ form.action = fm.options.url;
27450
+ form.method = 'POST';
27451
+ form.target = target;
27452
+ form.style.display = 'none';
27453
+ var params = Object.assign({}, fm.customData, {
27454
+ cmd: 'file',
27455
+ target: file.hash,
27456
+ _t: file.ts || parseInt(+new Date()/1000)
27457
+ });
27458
+ $.each(params, function(key, val)
27459
+ {
27460
+ var input = document.createElement("input");
27461
+ input.name = key;
27462
+ input.value = val;
27463
+ form.appendChild(input);
27464
+ });
27465
+
27466
+ document.body.appendChild(form);
27467
+ form.submit();
27468
+ } else if (into !== 'window') {
27469
+ wnd.location = url;
27470
+ }
27471
+ $(wnd).trigger('focus');
27472
+ }
27473
+ link.remove();
27474
+ },
27475
+ wnd, target, getOnly;
27476
 
27477
  try {
27478
  reg = new RegExp(fm.option('dispInlineRegex'), 'i');
27481
  }
27482
 
27483
  // open files
27484
+ html5dl = (typeof $('<a>').get(0).download === 'string');
 
27485
  cnt = files.length;
27486
  while (cnt--) {
27487
  target = 'elf_open_window';
27492
  }
27493
 
27494
  inline = (reg && file.mime.match(reg));
27495
+ fm.openUrl(file.hash, !inline, openCB);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27496
  }
 
27497
  return dfrd.resolve(hashes);
27498
  };
27499
 
27865
  fm.request({
27866
  data : reqData,
27867
  notify : {type : cmd, cnt : cnt},
27868
+ cancel : true,
27869
  navigate : {
27870
  toast : opts.noToast? {} : {
27871
  inbuffer : {msg: fm.i18n(['complete', fm.i18n('cmd' + cmd)]), action: {
27931
  }
27932
  dfrd.resolve(data);
27933
  })
27934
+ .fail(function(flg) {
27935
  dfrd.reject();
27936
+ if (flg === 0) {
27937
+ // canceling
27938
+ fm.sync();
27939
+ }
27940
  })
27941
  .always(function() {
27942
  fm.unlockfiles({files : files});
27971
 
27972
  return dfrd;
27973
  },
27974
+ parents, fparents, cutDfrd;
27975
 
27976
 
27977
  if (!cnt || !dst || dst.mime != 'directory') {
28021
  }
28022
  });
28023
 
28024
+ if (dfrd.state() === 'rejected') {
28025
  return dfrd;
28026
  }
28027
 
28028
+ cutDfrd = $.Deferred();
28029
+ if (cut && self.options.moveConfirm) {
28030
+ fm.confirm({
28031
+ title : 'moveFiles',
28032
+ text : fm.i18n('confirmMove', dst.i18 || dst.name),
28033
+ accept : {
28034
+ label : 'btnYes',
28035
+ callback : function() {
28036
+ cutDfrd.resolve();
28037
+ }
28038
+ },
28039
+ cancel : {
28040
+ label : 'btnCancel',
28041
+ callback : function() {
28042
+ cutDfrd.reject();
28043
+ }
28044
+ }
28045
+ });
28046
+ } else {
28047
+ cutDfrd.resolve();
28048
+ }
28049
+
28050
+ cutDfrd.done(function() {
28051
+ $.when(
28052
+ copy(fcopy),
28053
+ paste(fpaste)
28054
+ )
28055
+ .done(function(cr, pr) {
28056
+ dfrd.resolve(pr && pr.undo? pr : void(0));
28057
+ })
28058
+ .fail(function() {
28059
+ dfrd.reject();
28060
+ })
28061
+ .always(function() {
28062
+ cut && fm.clipboard([]);
28063
+ });
28064
+ }).fail(function() {
28065
  dfrd.reject();
 
 
 
28066
  });
28067
 
28068
  return dfrd;
28126
  tab = '<li class="' + fm.res('class', 'tabstab') + ' elfinder-preference-tab-{id}"><a href="#'+fm.namespace+'-preference-{id}" id="'+fm.namespace+'-preference-tab-{id}" class="ui-tabs-anchor {class}">{title}</a></li>',
28127
  base = $('<div class="ui-tabs ui-widget ui-widget-content ui-corner-all elfinder-preference">'),
28128
  ul = $('<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-top">'),
28129
+ tabs = $('<div class="elfinder-preference-tabs ui-tabs-panel ui-widget-content ui-corner-bottom"></div>'),
28130
+ sep = '<div class="elfinder-preference-separator"></div>',
28131
  selfUrl = $('base').length? document.location.href.replace(/#.*$/, '') : '',
28132
  selectTab = function(tab) {
28133
  $('#'+fm.namespace+'-preference-tab-'+tab).trigger('mouseover').trigger('click');
28147
  },
28148
  forms = self.options.prefs || ['language', 'theme', 'toolbarPref', 'iconSize', 'columnPref', 'selectAction', 'makefileTypes', 'useStoredEditor', 'editorMaximized', 'useFullscreen', 'showHidden', 'infoItems', 'hashChecker', 'autoFocusDialog', 'clearBrowserData'];
28149
 
28150
+ if (!fm.cookieEnabled) {
28151
+ delete cats.language;
28152
+ }
28153
+
28154
  forms = fm.arrayFlip(forms, true);
28155
 
28156
  if (fm.options.getFileCallback) {
28157
  delete forms.selectAction;
28158
  }
28159
+ if (!fm.UA.Fullscreen) {
28160
+ delete forms.useFullscreen;
28161
+ }
28162
+
28163
  forms.language && (forms.language = (function() {
28164
+ var langSel = $('<select></select>').on('change', function() {
28165
  var lang = $(this).val();
28166
  fm.storage('lang', lang);
28167
  $('#'+fm.id).elfinder('reload');
28168
  }),
28169
  optTags = [],
28170
  langs = self.options.langs || {
28171
+ ar: 'العربية',
28172
  bg: 'Български',
28173
  ca: 'Català',
28174
  cs: 'Čeština',
28180
  fa: 'فارسی',
28181
  fo: 'Føroyskt',
28182
  fr: 'Français',
28183
+ fr_CA: 'Français (Canada)',
28184
  he: 'עברית',
28185
  hr: 'Hrvatski',
28186
  hu: 'Magyar',
28206
  zh_CN: '简体中文',
28207
  zh_TW: '正體中文'
28208
  };
28209
+ if (!fm.cookieEnabled) {
28210
+ return $();
28211
+ }
28212
  $.each(langs, function(lang, name) {
28213
  optTags.push('<option value="'+lang+'">'+name+'</option>');
28214
  });
28220
  if (cnt === 0 || (cnt === 1 && fm.options.themes.default)) {
28221
  return null;
28222
  }
28223
+ var themeSel = $('<select></select>').on('change', function() {
28224
  var theme = $(this).val();
28225
  fm.changeTheme(theme).storage('theme', theme);
28226
  }),
28233
  items = ['image', 'description', 'author', 'email', 'license'],
28234
  render = function(key, data) {
28235
  },
28236
+ defBtn = $('<button class="ui-button ui-corner-all ui-widget elfinder-preference-theme-default"></button>').text(fm.i18n('default')).on('click', function(e) {
28237
  themeSel.val('default').trigger('change');
28238
  }),
28239
+ list = $('<div class="elfinder-reference-hide-taball"></div>').on('click', 'button', function() {
28240
  var val = $(this).data('themeid');
28241
  themeSel.val(val).trigger('change');
28242
  });
28246
  }
28247
  $.each(fm.options.themes, function(id, val) {
28248
  var opt = $('<option class="elfinder-theme-option-'+id+'" value="'+id+'">'+fm.i18n(id)+'</option>'),
28249
+ dsc = $('<fieldset class="ui-widget ui-widget-content ui-corner-all elfinder-theme-list-'+id+'"><legend>'+fm.i18n(id)+'</legend><div><span class="elfinder-spinner"></span></div></fieldset>'),
28250
  tm;
28251
  themeSel.append(opt);
28252
  list.append(dsc);
28256
  fm.getTheme(id).always(function() {
28257
  tm && clearTimeout(tm);
28258
  }).done(function(data) {
28259
+ var link, val = $(), dl = $('<dl></dl>');
28260
  link = data.link? tpl.link.replace(/\$1/g, data.link).replace(/\$3/g, fm.i18n('website')) : '$2';
28261
  if (data.name) {
28262
  opt.html(fm.i18n(data.name));
28276
  }
28277
  });
28278
  val = val.add(dl);
28279
+ val = val.add($('<div class="elfinder-preference-theme-btn"></div>').append($('<button class="ui-button ui-corner-all ui-widget"></button>').data('themeid', id).html(fm.i18n('select'))));
28280
  dsc.find('span.elfinder-spinner').replaceWith(val);
28281
  }).fail(function() {
28282
  dsc.find('span.elfinder-spinner').replaceWith(fm.i18n(['errRead', id]));
28283
  });
28284
  });
28285
+ return $('<div></div>').append(themeSel.val(fm.theme && fm.theme.id? fm.theme.id : 'default'), defBtn, list);
28286
  })());
28287
 
28288
  forms.toolbarPref && (forms.toolbarPref = (function() {
28314
 
28315
  forms.iconSize && (forms.iconSize = (function() {
28316
  var max = fm.options.uiOptions.cwd.iconsView.sizeMax || 3,
28317
+ size = fm.storage('iconsize') || fm.options.uiOptions.cwd.iconsView.size || 0,
28318
+ sld = $('<div class="touch-punch"></div>').slider({
28319
  classes: {
28320
  'ui-slider-handle': 'elfinder-tabstop',
28321
  },
28357
  })());
28358
 
28359
  forms.selectAction && (forms.selectAction = (function() {
28360
+ var actSel = $('<select></select>').on('change', function() {
28361
  var act = $(this).val();
28362
  fm.storage('selectAction', act === 'default'? null : act);
28363
  }),
28382
  })());
28383
 
28384
  forms.makefileTypes && (forms.makefileTypes = (function() {
28385
+ var hides = fm.getCommand('edit').getMkfileHides(),
28386
  getTag = function() {
28387
  var tags = [];
28388
  // re-assign hides
28389
+ hides = fm.getCommand('edit').getMkfileHides();
28390
  $.each(fm.mimesCanMakeEmpty, function(mime, type) {
28391
  var name = fm.getCommand('mkfile').getTypeName(mime, type);
28392
  tags.push('<span class="elfinder-preference-column-item" title="'+fm.escape(name)+'"><label><input type="checkbox" value="'+mime+'" '+(hides[mime]? '' : 'checked')+'/>'+type+'</label></span>');
28393
  });
28394
  return tags.join(' ');
28395
  },
28396
+ elm = $('<div></div>').on('change', 'input', function() {
28397
  var v = $(this).val(),
28398
  o = $(this).is(':checked');
28399
  if (!o && !hides[v]) {
28404
  fm.storage('mkfileHides', hides);
28405
  fm.trigger('canMakeEmptyFile');
28406
  }).append(getTag()),
28407
+ add = $('<div></div>').append(
28408
  $('<input type="text" placeholder="'+fm.i18n('typeOfTextfile')+'"/>').on('keydown', function(e) {
28409
  (e.keyCode === $.ui.keyCode.ENTER) && $(this).next().trigger('click');
28410
  }),
28411
+ $('<button class="ui-button"></button>').html(fm.i18n('add')).on('click', function() {
28412
  var input = $(this).prev(),
28413
  val = input.val(),
28414
  uiToast = fm.getUI('toast'),
28448
  }
28449
  });
28450
  }),
28451
+ $('<button class="ui-button"></button>').html(fm.i18n('reset')).on('click', function() {
28452
  fm.one('canMakeEmptyFile', {done: function() {
28453
  elm.empty().append(getTag());
28454
  }});
28461
  elm.empty().append(getTag());
28462
  }
28463
  }});
28464
+ return $('<div></div>').append(elm, add);
28465
  })());
28466
 
28467
  forms.useStoredEditor && (forms.useStoredEditor = $('<input type="checkbox"/>').prop('checked', (function() {
28478
  fm.storage('editorMaximized', $(this).is(':checked')? 1 : -1);
28479
  }));
28480
 
28481
+ forms.useFullscreen && (forms.useFullscreen = $('<input type="checkbox"/>').prop('checked', (function() {
28482
  var s = fm.storage('useFullscreen');
28483
  return s? (s > 0) : fm.options.commandsOptions.fullscreen.mode === 'screen';
28484
  })()).on('change', function(e) {
28509
  o[$(this).is(':checked')? 'show' : 'hide'] = true;
28510
  fm.exec('hide', void(0), o);
28511
  }),
28512
+ btn = $('<button class="ui-button ui-corner-all ui-widget"></button>').append(fm.i18n('reset')).on('click', function() {
28513
  fm.exec('hide', void(0), {reset: true});
28514
  $(this).parent().find('input:first').prop('checked', false);
28515
  setTitle();
28517
  elms = $().add(chk).add(btn),
28518
  useTooltip;
28519
 
28520
+ forms.showHidden = $('<div></div>').append(chk, btn);
28521
  fm.bind('hide', function(e) {
28522
  var d = e.data;
28523
  if (!d.opts || (!d.opts.show && !d.opts.hide)) {
28590
  fm.storage('autoFocusDialog', $(this).is(':checked')? 1 : -1);
28591
  }));
28592
 
28593
+ forms.clearBrowserData && (forms.clearBrowserData = $('<button></button>').text(fm.i18n('reset')).button().on('click', function(e) {
28594
  e.preventDefault();
28595
  fm.storage();
28596
  $('#'+fm.id).elfinder('reload');
28619
  } else if (cbox.length > 1) {
28620
  chks = ' elfinder-preference-checkboxes';
28621
  }
28622
+ dls = dls.add($('<dt class="elfinder-preference-'+n+chks+'">'+title+'</dt>')).add($('<dd class="elfinder-preference-'+n+chks+'"></dd>').append(f));
28623
  }
28624
  });
28625
  }
28627
  ul.append(tab[r](/\{id\}/g, id)[r](/\{title\}/, fm.i18n(id))[r](/\{class\}/, openTab === id? 'elfinder-focus' : ''));
28628
  if (found === 2) {
28629
  tabs.append(
28630
+ $('<div id="'+fm.namespace+'-preference-'+id+'" class="elfinder-preference-content"></div>')
28631
  .hide()
28632
+ .append($('<dl></dl>').append(dls))
28633
  );
28634
  }
28635
  }
28830
  * @return void
28831
  **/
28832
  openedCss = function() {
28833
+ var contain = self.options.contain || fm.options.dialogContained,
28834
  win = contain? fm.getUI() : $(window),
28835
  elf = fm.getUI().offset(),
28836
  w = Math.min(width, win.width()-10),
28902
  leftKey = $.ui.keyCode.LEFT,
28903
  rightKey = $.ui.keyCode.RIGHT,
28904
  coverEv = 'mousemove touchstart ' + ('onwheel' in document? 'wheel' : 'onmousewheel' in document? 'mousewheel' : 'DOMMouseScroll'),
28905
+ title = $('<span class="elfinder-dialog-title elfinder-quicklook-title"></span>'),
28906
+ icon = $('<div></div>'),
28907
+ info = $('<div class="elfinder-quicklook-info"></div>'),//.hide(),
28908
+ cover = $('<div class="ui-front elfinder-quicklook-cover"></div>'),
28909
+ fsicon = $('<div class="'+navicon+' '+navicon+'-fullscreen"></div>')
28910
  .on('click touchstart', function(e) {
28911
  if (navmove) {
28912
  return;
29059
  cover.hide();
29060
  },
29061
 
29062
+ prev = $('<div class="'+navicon+' '+navicon+'-prev"></div>').on('click touchstart', function(e) { ! navmove && navtrigger(leftKey); return false; }),
29063
+ next = $('<div class="'+navicon+' '+navicon+'-next"></div>').on('click touchstart', function(e) { ! navmove && navtrigger(rightKey); return false; }),
29064
+ navbar = $('<div class="elfinder-quicklook-navbar"></div>')
29065
  .append(prev)
29066
  .append(fsicon)
29067
  .append(next)
29068
+ .append('<div class="elfinder-quicklook-navbar-separator"></div>')
29069
+ .append($('<div class="'+navicon+' '+navicon+'-close"></div>').on('click touchstart', function(e) { ! navmove && self.window.trigger('close'); return false; }))
29070
  ,
29071
+ titleClose = $('<span class="ui-front ui-icon elfinder-icon-close ui-icon-closethick"></span>').on('mousedown', function(e) {
29072
  e.stopPropagation();
29073
  self.window.trigger('close');
29074
  }),
29075
+ titleDock = $('<span class="ui-front ui-icon elfinder-icon-minimize ui-icon-minusthick"></span>').on('mousedown', function(e) {
29076
  e.stopPropagation();
29077
  if (! self.docked()) {
29078
  self.window.trigger('navdockin');
29080
  self.window.trigger('navdockout');
29081
  }
29082
  }),
29083
+ spinner = '<span class="elfinder-spinner-text">' + fm.i18n('calc') + '</span>' + '<span class="elfinder-spinner"></span>',
29084
  navStyle = '',
29085
  init = true,
29086
  dockHeight, getSize, tm4cwd, dockedNode, selectTm;
29087
 
29088
+ /**
29089
+ * Any flags for each plugin
29090
+ */
29091
+ this.flags = {};
29092
+
29093
  this.cover = cover;
29094
  this.evUpdate = evUpdate;
29095
  (this.navbar = navbar)._show = navShow;
29096
  this.resize = 'resize.'+fm.namespace;
29097
+ this.info = $('<div></div>').addClass(infocls)
29098
  .append(icon)
29099
  .append(info);
29100
  this.autoPlay = function() {
29103
  }
29104
  return false;
29105
  };
29106
+ this.preview = $('<div class="elfinder-quicklook-preview ui-helper-clearfix"></div>')
29107
  // clean info/icon
29108
  .on('change', function() {
29109
  navShow();
29203
  }
29204
  });
29205
 
29206
+ this.window = $('<div class="ui-front ui-helper-reset ui-widget elfinder-quicklook touch-punch" style="position:absolute"></div>')
29207
  .hide()
29208
  .addClass(fm.UA.Touch? 'elfinder-touch' : '')
29209
  .on('click', function(e) {
29216
  }
29217
  })
29218
  .append(
29219
+ $('<div class="ui-dialog-titlebar ui-widget-header ui-corner-top ui-helper-clearfix elfinder-quicklook-titlebar"></div>')
29220
  .append(
29221
+ $('<span class="ui-widget-header ui-dialog-titlebar-close ui-corner-all elfinder-titlebar-button elfinder-quicklook-titlebar-icon'+(platformWin? ' elfinder-titlebar-button-right' : '')+'"></span>').append(
29222
  titleClose, titleDock
29223
  ),
29224
  title
29287
  state = animated;
29288
  win.hasClass(fullscreen) && fsicon.click();
29289
  (hash && (node = cwd.find('#'+hash)).length)
29290
+ ? win.animate(closedCss(node), 500, function() {
29291
+ preview.off('changesize');
29292
+ close(closed, true);
29293
+ })
29294
  : close(closed, true);
29295
  } else {
29296
  dockedNode = fm.getUI('navdock').data('removeNode')(self.window.attr('id'), 'detach');
29622
  **/
29623
  function(ql) {
29624
  var mimes = ['image/jpeg', 'image/png', 'image/gif', 'image/svg+xml', 'image/x-ms-bmp'],
29625
+ getDimSize = ql.fm.returnBytes((ql.options.getDimThreshold || 0)),
29626
  preview = ql.preview,
29627
  WebP, flipMime;
29628
 
29702
  // hide info/icon
29703
  ql.hideinfo();
29704
  },
29705
+ url, img, loading, prog, m, opDfd;
29706
 
29707
  if (!flipMime) {
29708
  flipMime = fm.arrayFlip(mimes);
29711
  // this is our file - stop event propagation
29712
  e.stopImmediatePropagation();
29713
 
29714
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
29715
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
29716
 
 
 
29717
  img = $('<img/>')
29718
  .hide()
29719
  .appendTo(preview)
29723
  })
29724
  .on('error', function() {
29725
  loading.remove();
29726
+ });
29727
+ opDfd = fm.openUrl(file.hash, false, function(url) {
29728
+ img.attr('src', url);
29729
+ }, { progressBar: prog });
29730
+ // stop loading on change file if not loaded yet
29731
+ preview.one('change', function() {
29732
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
29733
+ });
29734
+
29735
  if (file.width && file.height) {
29736
  show();
29737
+ } else if (file.size > getDimSize) {
29738
  dimreq = fm.request({
29739
  data : {cmd : 'dim', target : file.hash},
29740
  preventDefault : true
29754
  });
29755
  },
29756
 
29757
+ /**
29758
+ * TIFF image preview
29759
+ *
29760
+ * @param object ql elFinder.commands.quicklook
29761
+ */
29762
+ function(ql) {
29763
+ var fm = ql.fm,
29764
+ mime = 'image/tiff',
29765
+ preview = ql.preview;
29766
+ if (window.Worker && window.Uint8Array) {
29767
+ preview.on(ql.evUpdate, function(e) {
29768
+ var file = e.file,
29769
+ err = function(e) {
29770
+ wk && wk.terminate();
29771
+ loading.remove();
29772
+ fm.debug('error', e);
29773
+ },
29774
+ setdim = function(dim) {
29775
+ var rfile = fm.file(file.hash);
29776
+ rfile.width = dim[0];
29777
+ rfile.height = dim[1];
29778
+ },
29779
+ loading, prog, url, base, wk, opDfd;
29780
+ if (file.mime === mime) {
29781
+ e.stopImmediatePropagation();
29782
+
29783
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
29784
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
29785
+ // stop loading on change file if not loaded yet
29786
+ preview.one('change', function() {
29787
+ wk && wk.terminate();
29788
+ loading.remove();
29789
+ });
29790
+
29791
+ opDfd = fm.getContents(file.hash, 'arraybuffer', { progressBar: prog }).done(function(data) {
29792
+ if (data) {
29793
+ base = $('<div></div>').css({width:'100%',height:'100%'}).hide().appendTo(preview);
29794
+ try {
29795
+ wk = fm.getWorker();
29796
+ wk.onmessage = function(res) {
29797
+ var data = res.data,
29798
+ cv, co, id, prop;
29799
+ wk && wk.terminate();
29800
+ cv = document.createElement('canvas');
29801
+ co = cv.getContext('2d');
29802
+ cv.width = data.width;
29803
+ cv.height = data.height;
29804
+ id = co.createImageData(data.width, data.height);
29805
+ (id).data.set(new Uint8Array(data.image));
29806
+ co.putImageData(id, 0, 0);
29807
+ base.append(cv).show();
29808
+ loading.remove();
29809
+ prop = (data.width/data.height).toFixed(2);
29810
+ preview.on('changesize', function() {
29811
+ var pw = parseInt(preview.width()),
29812
+ ph = parseInt(preview.height()),
29813
+ w, h;
29814
+ if (prop < (pw/ph).toFixed(2)) {
29815
+ h = ph;
29816
+ w = Math.floor(h * prop);
29817
+ } else {
29818
+ w = pw;
29819
+ h = Math.floor(w/prop);
29820
+ }
29821
+ $(cv).width(w).height(h).css('margin-top', h < ph ? Math.floor((ph - h)/2) : 0);
29822
+ }).trigger('changesize');
29823
+ if (!file.width || !file.height) {
29824
+ setdim([data.width, data.height]);
29825
+ }
29826
+ ql.hideinfo();
29827
+ };
29828
+ wk.onerror = err;
29829
+ wk.postMessage({
29830
+ scripts: [fm.options.cdns.tiff, fm.getWorkerUrl('quicklook.tiff.js')],
29831
+ data: { data: data }
29832
+ });
29833
+ } catch(e) {
29834
+ err(e);
29835
+ }
29836
+ } else {
29837
+ err();
29838
+ }
29839
+ });
29840
+ // stop loading on change file if not loaded yet
29841
+ preview.one('change', function() {
29842
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
29843
+ });
29844
+ }
29845
+ });
29846
+ }
29847
+ },
29848
+
29849
  /**
29850
  * PSD(Adobe Photoshop data) preview plugin
29851
  *
29899
 
29900
  preview.on(ql.evUpdate, function(e) {
29901
  var file = e.file,
29902
+ url, img, loading, prog, m,
29903
+ _define, _require, opDfd;
29904
 
29905
  if (mimes[file.mime] && fm.options.cdns.psd && ! fm.UA.ltIE10 && ql.dispInlineRegex.test(file.mime)) {
29906
  // this is our file - stop event propagation
29907
  e.stopImmediatePropagation();
29908
 
29909
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
29910
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
29911
+ opDfd = fm.openUrl(file.hash, 'sameorigin', function(url) {
29912
+ if (url) {
29913
+ img = $('<img/>').hide().appendTo(preview);
29914
+ if (PSD) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29915
  load(url, img, loading);
29916
+ } else {
29917
+ _define = window.define;
29918
+ _require = window.require;
29919
+ window.require = null;
29920
+ window.define = null;
29921
+ fm.loadScript(
29922
+ [ fm.options.cdns.psd ],
29923
+ function() {
29924
+ PSD = require('psd');
29925
+ _define? (window.define = _define) : (delete window.define);
29926
+ _require? (window.require = _require) : (delete window.require);
29927
+ load(url, img, loading);
29928
+ }
29929
+ );
29930
  }
29931
+ }
29932
+ }, { progressBar: prog });
29933
+ // stop loading on change file if not loaded yet
29934
+ preview.one('change', function() {
29935
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
29936
+ });
29937
  }
29938
  });
29939
  },
29949
  preview = ql.preview;
29950
 
29951
  preview.on(ql.evUpdate, function(e) {
29952
+ var file = e.file, jqxhr, loading, prog;
29953
 
29954
  if (mimes[file.mime] && ql.dispInlineRegex.test(file.mime) && (!ql.options.getSizeMax || file.size <= ql.options.getSizeMax)) {
29955
  e.stopImmediatePropagation();
29956
 
29957
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
29958
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
29959
 
29960
  // stop loading on change file if not loaded yet
29961
  preview.one('change', function() {
29965
  jqxhr = fm.request({
29966
  data : {cmd : 'get', target : file.hash, conv : 1, _t : file.ts},
29967
  options : {type: 'get', cache : true},
29968
+ preventDefault : true,
29969
+ progressBar : prog
29970
  })
29971
  .done(function(data) {
29972
  ql.hideinfo();
29973
+ var doc = $('<iframe class="elfinder-quicklook-preview-html"></iframe>').appendTo(preview)[0].contentWindow.document;
29974
  doc.open();
29975
  doc.write(data.content);
29976
  doc.close();
29994
  marked = null,
29995
  show = function(data, loading) {
29996
  ql.hideinfo();
29997
+ var doc = $('<iframe class="elfinder-quicklook-preview-html"></iframe>').appendTo(preview)[0].contentWindow.document;
29998
  doc.open();
29999
  doc.write(marked(data.content));
30000
  doc.close();
30006
  };
30007
 
30008
  preview.on(ql.evUpdate, function(e) {
30009
+ var file = e.file, jqxhr, loading, prog;
30010
 
30011
  if (mimes[file.mime] && fm.options.cdns.marked && marked !== false && ql.dispInlineRegex.test(file.mime) && (!ql.options.getSizeMax || file.size <= ql.options.getSizeMax)) {
30012
  e.stopImmediatePropagation();
30013
 
30014
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
30015
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
30016
 
30017
  // stop loading on change file if not loaded yet
30018
  preview.one('change', function() {
30022
  jqxhr = fm.request({
30023
  data : {cmd : 'get', target : file.hash, conv : 1, _t : file.ts},
30024
  options : {type: 'get', cache : true},
30025
+ preventDefault : true,
30026
+ progressBar : prog
30027
  })
30028
  .done(function(data) {
30029
  if (marked || window.marked) {
30068
  var fm = ql.fm,
30069
  preview = ql.preview,
30070
  opts = ql.options.viewerjs,
30071
+ mimes = opts.url? fm.arrayFlip(opts.mimes || []) : [],
30072
+ win = ql.window,
30073
+ navi = ql.navbar,
30074
+ setNavi = function() {
30075
+ navi.css('bottom', win.hasClass('elfinder-quicklook-fullscreen')? '30px' : '');
30076
+ };
30077
 
30078
  if (opts.url) {
30079
  preview.on('update', function(e) {
30080
+ var file = e.file, node, loading, prog, opDfd;
 
30081
 
30082
+ if (mimes[file.mime] && (file.mime !== 'application/pdf' || !opts.pdfNative || !ql.flags.pdfNative)) {
30083
+ e.stopImmediatePropagation();
30084
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
30085
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
30086
+ opDfd = fm.openUrl(file.hash, 'sameorigin', function(url) {
30087
+ if (url) {
30088
+ node = $('<iframe class="elfinder-quicklook-preview-iframe"></iframe>')
30089
+ .css('background-color', 'transparent')
30090
+ .on('load', function() {
30091
+ ql.hideinfo();
30092
+ loading.remove();
30093
+ node.css('background-color', '#fff');
30094
+ })
30095
+ .on('error', function() {
30096
+ loading.remove();
30097
+ node.remove();
30098
+ })
30099
+ .appendTo(preview)
30100
+ .attr('src', opts.url + '#' + url);
30101
 
30102
+ win.on('viewchange.viewerjs', setNavi);
30103
+ setNavi();
30104
 
30105
+ preview.one('change', function() {
30106
+ win.off('viewchange.viewerjs');
 
 
30107
  loading.remove();
30108
+ node.off('load').remove();
30109
+ });
30110
+ }
30111
+ }, { progressBar: prog });
30112
+ // stop loading on change file if not loaded yet
30113
+ preview.one('change', function() {
30114
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
30115
+ });
 
 
 
 
 
 
30116
  }
30117
  });
30118
  }
30144
  });
30145
  }
30146
 
30147
+ ql.flags.pdfNative = active;
30148
  if (active) {
30149
  if (typeof ql.options.pdfToolbar !== 'undefined' && !ql.options.pdfToolbar) {
30150
  urlhash = '#toolbar=0';
30151
  }
30152
  preview.on(ql.evUpdate, function(e) {
30153
+ var file = e.file,
30154
+ opDfd;
30155
 
30156
  if (active && file.mime === mime && ql.dispInlineRegex.test(file.mime)) {
30157
  e.stopImmediatePropagation();
30158
+ opDfd = fm.openUrl(file.hash, false, function(url) {
30159
+ if (url) {
30160
+ ql.hideinfo();
30161
+ ql.cover.addClass('elfinder-quicklook-coverbg');
30162
+ $('<object class="elfinder-quicklook-preview-pdf" data="'+url+urlhash+'" type="application/pdf" ></object>')
30163
+ .on('error', function(e) {
30164
+ active = false;
30165
+ ql.update(void(0), fm.cwd());
30166
+ ql.update(void(0), file);
30167
+ })
30168
+ .appendTo(preview);
30169
+ }
30170
+ });
30171
+ // stop loading on change file if not loaded yet
30172
+ preview.one('change', function() {
30173
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
30174
+ });
30175
  }
30176
 
30177
  });
30199
 
30200
  active && preview.on(ql.evUpdate, function(e) {
30201
  var file = e.file,
30202
+ node, opDfd;
30203
 
30204
  if (file.mime === mime && ql.dispInlineRegex.test(file.mime)) {
30205
  e.stopImmediatePropagation();
30206
+ opDfd = fm.openUrl(file.hash, false, function(url) {
30207
+ if (url) {
30208
+ ql.hideinfo();
30209
+ node = $('<embed class="elfinder-quicklook-preview-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+url+'" quality="high" type="application/x-shockwave-flash" wmode="transparent" />')
30210
+ .appendTo(preview);
30211
+ }
30212
+ });
30213
+ // stop loading on change file if not loaded yet
30214
+ preview.one('change', function() {
30215
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
30216
+ });
30217
  }
30218
  });
30219
  },
30253
  navi.css('bottom', win.hasClass('elfinder-quicklook-fullscreen')? '50px' : '');
30254
  },
30255
  getNode = function(src, hash) {
30256
+ return $('<audio class="elfinder-quicklook-preview-audio ui-front" controls' + controlsList + ' preload="auto" autobuffer><source src="'+src+'" ></source></audio>')
30257
  .on('change', function(e) {
30258
  // Firefox fire change event on seek or volume change
30259
  e.stopPropagation();
30267
  amrToWavUrl = function(hash) {
30268
  var dfd = $.Deferred(),
30269
  loader = $.Deferred().done(function() {
30270
+ var opDfd;
30271
+ opDfd = fm.getContents(hash, 'arraybuffer', { progressBar: prog }).done(function(data) {
30272
  try {
30273
  var buffer = AMR.toWAV(new Uint8Array(data));
30274
  if (buffer) {
30282
  }).fail(function() {
30283
  dfd.reject();
30284
  });
30285
+ // stop loading on change file if not loaded yet
30286
+ preview.one('change', function() {
30287
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
30288
+ });
30289
  }).fail(function() {
30290
  AMR = false;
30291
  dfd.reject();
30344
  node.remove();
30345
  node = null;
30346
  }
30347
+ },
30348
+ loading, prog;
30349
 
30350
  preview.on(ql.evUpdate, function(e) {
30351
  var file = e.file,
30352
  type = mimes[file.mime],
30353
+ html5, opDfd;
30354
 
30355
  if (mimes[file.mime] && ql.dispInlineRegex.test(file.mime) && ((html5 = ql.support.audio[type]) || (type === 'amr'))) {
30356
  autoplay = ql.autoPlay();
30357
  curHash = file.hash;
 
30358
  if (!html5) {
30359
  if (fm.options.cdns.amr && type === 'amr' && AMR !== false) {
30360
  e.stopImmediatePropagation();
30361
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
30362
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
30363
+ node = getNode('', curHash);
30364
  amrToWavUrl(file.hash).done(function(url) {
30365
+ loading.remove();
30366
  if (curHash === file.hash) {
30367
  var elm = node[0];
30368
  try {
30385
  }
30386
  } else {
30387
  e.stopImmediatePropagation();
30388
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
30389
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
30390
+ opDfd = fm.openUrl(curHash, false, function(url) {
30391
+ loading.remove();
30392
+ if (url) {
30393
+ node = getNode(url, curHash);
30394
+ play(node[0]);
30395
+ win.on('viewchange.audio', setNavi);
30396
+ setNavi();
30397
+ } else {
30398
+ node.remove();
30399
+ }
30400
+ }, { progressBar: prog });
30401
+ // stop loading on change file if not loaded yet
30402
+ preview.one('change', function() {
30403
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
30404
+ });
30405
  }
30406
  }
30407
+ }).one('change', reset);
30408
  },
30409
 
30410
  /**
30434
  node,
30435
  win = ql.window,
30436
  navi = ql.navbar,
30437
+ cHls, cDash, pDash, cFlv, cVideojs, autoplay, tm, loading, prog,
30438
  controlsList = typeof ql.options.mediaControlsList === 'string' && ql.options.mediaControlsList? ' controlsList="' + fm.escape(ql.options.mediaControlsList) + '"' : '',
30439
  setNavi = function() {
30440
  if (fm.UA.iOS) {
30483
  }, true);
30484
 
30485
  if (opts.src) {
30486
+ node.append('<source src="'+opts.src+'" type="'+file.mime+'"></source><source src="'+opts.src+'"></source>');
30487
  }
30488
 
30489
  node.appendTo(preview);
30492
  setNavi();
30493
  },
30494
  loadHls = function(file) {
30495
+ var hls, opDfd;
30496
+ opDfd = fm.openUrl(file.hash, false, function(url) {
30497
+ loading.remove();
30498
+ if (url) {
30499
+ render(file);
30500
+ hls = new cHls();
30501
+ hls.loadSource(url);
30502
+ hls.attachMedia(node[0]);
30503
+ if (autoplay) {
30504
+ hls.on(cHls.Events.MANIFEST_PARSED, function() {
30505
+ play(node[0]);
30506
+ });
30507
+ }
30508
+ }
30509
+ }, { progressBar: prog });
30510
+ // stop loading on change file if not loaded yet
30511
+ preview.one('change', function() {
30512
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
30513
+ });
30514
  },
30515
  loadDash = function(file) {
30516
+ var opDfd;
30517
+ opDfd = fm.openUrl(file.hash, false, function(url) {
30518
+ var debug;
30519
+ loading.remove();
30520
+ if (url) {
30521
+ render(file);
30522
+ pDash = window.dashjs.MediaPlayer().create();
30523
+ debug = pDash.getDebug();
30524
+ if (debug.setLogLevel) {
30525
+ debug.setLogLevel(dashjs.Debug.LOG_LEVEL_FATAL);
30526
+ } else if (debug.setLogToBrowserConsole) {
30527
+ debug.setLogToBrowserConsole(false);
30528
+ }
30529
+ pDash.initialize(node[0], url, autoplay);
30530
+ pDash.on('error', function(e) {
30531
+ reset(true);
30532
+ });
30533
+ }
30534
+ }, { progressBar: prog });
30535
+ // stop loading on change file if not loaded yet
30536
+ preview.one('change', function() {
30537
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
30538
  });
30539
  },
30540
  loadFlv = function(file) {
30541
+ var opDfd
30542
  if (!cFlv.isSupported()) {
30543
  cFlv = false;
30544
  return;
30545
  }
30546
+ opDfd = fm.openUrl(file.hash, false, function(url) {
30547
+ loading.remove();
30548
+ if (url) {
30549
+ var player = cFlv.createPlayer({
30550
+ type: 'flv',
30551
+ url: url
30552
+ });
30553
+ render(file);
30554
+ player.on(cFlv.Events.ERROR, function() {
30555
+ player.destroy();
30556
+ reset(true);
30557
+ });
30558
+ player.attachMediaElement(node[0]);
30559
+ player.load();
30560
+ play(player);
30561
+ }
30562
+ }, { progressBar: prog });
30563
+ // stop loading on change file if not loaded yet
30564
+ preview.one('change', function() {
30565
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
30566
  });
 
 
 
30567
  },
30568
  loadVideojs = function(file) {
30569
+ var opDfd;
30570
+ opDfd = fm.openUrl(file.hash, false, function(url) {
30571
+ loading.remove();
30572
+ if (url) {
30573
+ render(file);
30574
+ node[0].src = url;
30575
+ cVideojs(node[0], {
30576
+ src: url
30577
+ });
30578
+ }
30579
+ }, { progressBar: prog });
30580
+ // stop loading on change file if not loaded yet
30581
+ preview.one('change', function() {
30582
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
30583
  });
30584
  },
30585
  play = function(player) {
30617
  var file = e.file,
30618
  mime = file.mime.toLowerCase(),
30619
  type = mimes[mime],
30620
+ stock, playPromise, opDfd;
30621
 
30622
  if (mimes[mime] && ql.dispInlineRegex.test(file.mime) /*&& (((type === 'm3u8' || (type === 'mpd' && !fm.UA.iOS) || type === 'flv') && !fm.UA.ltIE10) || ql.support.video[type])*/) {
30623
  autoplay = ql.autoPlay();
30624
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>');
30625
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
30626
  if (ql.support.video[type] && (type !== 'm3u8' || fm.UA.Safari)) {
30627
  e.stopImmediatePropagation();
30628
+ loading.appendTo(ql.info.find('.elfinder-quicklook-info'));
30629
+ opDfd = fm.openUrl(file.hash, false, function(url) {
30630
+ loading.remove();
30631
+ if (url) {
30632
+ render(file, { src: url });
30633
+ play(node[0]);
30634
+ }
30635
+ }, { progressBar: prog });
30636
+ // stop loading on change file if not loaded yet
30637
+ preview.one('change', function() {
30638
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
30639
+ });
30640
  } else {
30641
  if (cHls !== false && fm.options.cdns.hls && type === 'm3u8') {
30642
  e.stopImmediatePropagation();
30643
+ loading.appendTo(ql.info.find('.elfinder-quicklook-info'));
30644
  if (cHls) {
30645
  loadHls(file);
30646
  } else {
30663
  }
30664
  } else if (cDash !== false && fm.options.cdns.dash && type === 'mpd') {
30665
  e.stopImmediatePropagation();
30666
+ loading.appendTo(ql.info.find('.elfinder-quicklook-info'));
30667
  if (cDash) {
30668
  loadDash(file);
30669
  } else {
30684
  }
30685
  } else if (cFlv !== false && fm.options.cdns.flv && type === 'flv') {
30686
  e.stopImmediatePropagation();
30687
+ loading.appendTo(ql.info.find('.elfinder-quicklook-info'));
30688
  if (cFlv) {
30689
  loadFlv(file);
30690
  } else {
30705
  }
30706
  );
30707
  }
30708
+ } else if (fm.options.cdns.videojs) {
30709
+ e.stopImmediatePropagation();
30710
+ loading.appendTo(ql.info.find('.elfinder-quicklook-info'));
30711
  if (cVideojs) {
30712
  loadVideojs(file);
30713
  } else {
30714
  fm.loadScript(
30715
+ [ fm.options.cdns.videojs + '/video.min.js' ],
30716
  function(res) {
30717
  cVideojs = res || window.videojs || false;
30718
  //window.flvjs = stock;
30724
  cVideojs = false;
30725
  }
30726
  }
30727
+ ).loadCss([fm.options.cdns.videojs + '/video-js.min.css']);
30728
  }
30729
  }
30730
  }
30731
  }
30732
+ }).one('change', reset);
30733
  },
30734
 
30735
  /**
30754
  preview.on(ql.evUpdate, function(e) {
30755
  var file = e.file,
30756
  mime = file.mime,
30757
+ video, opDfd, loading, prog,
30758
  setNavi = function() {
30759
  navi.css('bottom', win.hasClass('elfinder-quicklook-fullscreen')? '50px' : '');
30760
  };
30761
 
30762
  if (mimes[file.mime] && ql.dispInlineRegex.test(file.mime)) {
30763
  e.stopImmediatePropagation();
30764
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
30765
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
30766
+ opDfd = ql.fm.openUrl(file.hash, false, function(url) {
30767
+ loading.remove();
30768
+ if (url) {
30769
+ (video = mime.indexOf('video/') === 0) && ql.hideinfo();
30770
+ node = $('<embed src="'+url+'" type="'+mime+'" class="elfinder-quicklook-preview-'+(video ? 'video' : 'audio')+'"/>')
30771
+ .appendTo(preview);
30772
+
30773
+ win.on('viewchange.embed', setNavi);
30774
+ setNavi();
30775
+ }
30776
+ }, { progressBar: prog });
30777
+ // stop loading on change file if not loaded yet
30778
+ preview.one('change', function() {
30779
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
30780
+ });
30781
  }
30782
+ }).one('change', function() {
30783
  if (node && node.parent().length) {
30784
  win.off('viewchange.embed');
30785
  node.remove();
30790
  },
30791
 
30792
  /**
30793
+ * Archive(zip|gzip|tar|bz2) preview plugin using https://github.com/imaya/zlib.js
30794
  *
30795
  * @param elFinder.commands.quicklook
30796
  **/
30797
  function(ql) {
30798
  var fm = ql.fm,
30799
+ mimes = fm.arrayFlip(['application/zip', 'application/x-gzip', 'application/x-tar', 'application/x-bzip2']),
30800
  preview = ql.preview,
30801
+ sizeMax = fm.returnBytes(ql.options.unzipMaxSize || 0),
30802
+ Zlib = (fm.options.cdns.zlibUnzip && fm.options.cdns.zlibGunzip)? true : false,
30803
+ bzip2 = fm.options.cdns.bzip2? true : false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30804
 
30805
+ if (window.Worker && window.Uint8Array && window.DataView) {
30806
  preview.on(ql.evUpdate, function(e) {
30807
  var file = e.file,
30808
+ isTar = (file.mime === 'application/x-tar'),
30809
+ isBzip2 = (file.mime === 'application/x-bzip2'),
30810
+ isZlib = (file.mime === 'application/zip' || file.mime === 'application/x-gzip');
30811
+ if (mimes[file.mime] && (!sizeMax || file.size <= sizeMax) && (
30812
  isTar
30813
+ || (isBzip2 && bzip2)
30814
+ || (isZlib && Zlib)
30815
  )) {
30816
+ var jqxhr, wk, loading, prog, url,
30817
  req = function() {
30818
+ jqxhr = fm.getContents(file.hash, 'arraybuffer', { progressBar: prog })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30819
  .fail(function() {
30820
  loading.remove();
30821
  })
30822
  .done(function(data) {
30823
+ var unzip, filenames,
30824
+ err = function(e) {
30825
+ wk && wk.terminate();
30826
+ loading.remove();
30827
+ if (isZlib) {
30828
+ Zlib = false;
30829
+ } else if (isBzip2) {
30830
+ bzip2 = false;
30831
+ }
30832
+ fm.debug('error', e);
30833
+ };
30834
  try {
30835
+ wk = fm.getWorker();
30836
+ wk.onmessage = function(res) {
30837
+ wk && wk.terminate();
30838
+ loading.remove();
30839
+ if (!res.data || res.data.error) {
30840
+ new Error(res.data && res.data.error? res.data.error : '');
30841
+ } else {
30842
+ makeList(res.data.files);
30843
+ }
30844
+ };
30845
+ wk.onerror = err;
30846
+ if (file.mime === 'application/x-tar') {
30847
+ wk.postMessage({
30848
+ scripts: [fm.getWorkerUrl('quicklook.unzip.js')],
30849
+ data: { type: 'tar', bin: data }
30850
+ });
30851
+ } else if (file.mime === 'application/zip') {
30852
+ wk.postMessage({
30853
+ scripts: [fm.options.cdns.zlibUnzip, fm.getWorkerUrl('quicklook.unzip.js')],
30854
+ data: { type: 'zip', bin: data }
30855
+ });
30856
  } else if (file.mime === 'application/x-gzip') {
30857
+ wk.postMessage({
30858
+ scripts: [fm.options.cdns.zlibGunzip, fm.getWorkerUrl('quicklook.unzip.js')],
30859
+ data: { type: 'gzip', bin: data }
30860
+ });
30861
+
30862
+ } else if (file.mime === 'application/x-bzip2') {
30863
+ wk.postMessage({
30864
+ scripts: [fm.options.cdns.bzip2, fm.getWorkerUrl('quicklook.unzip.js')],
30865
+ data: { type: 'bzip2', bin: data }
30866
+ });
30867
  }
 
30868
  } catch (e) {
30869
+ err(e);
 
30870
  }
30871
  });
30872
  },
30873
  makeList = function(filenames) {
30874
+ var header, list, doc, tsize = 0;
30875
  if (filenames && filenames.length) {
30876
  filenames = $.map(filenames, function(str) {
30877
  return fm.decodeRawString(str);
30878
  });
30879
  filenames.sort();
30880
+ list = fm.escape(filenames.join("\n").replace(/\{formatSize\((\d+)\)\}/g, function(m, s) {
30881
+ tsize += parseInt(s);
30882
+ return fm.formatSize(s);
30883
+ }));
30884
+ header = '<strong>'+fm.escape(file.mime)+'</strong> ('+fm.formatSize(file.size)+' / '+fm.formatSize(tsize)+')'+'<hr/>';
30885
+ doc = $('<div class="elfinder-quicklook-preview-archive-wrapper">'+header+'<pre class="elfinder-quicklook-preview-text">'+list+'</pre></div>')
30886
  .on('touchstart', function(e) {
30887
  if ($(this)['scroll' + (fm.direction === 'ltr'? 'Right' : 'Left')]() > 5) {
30888
  e.originalEvent._preventSwipeX = true;
30891
  .appendTo(preview);
30892
  ql.hideinfo();
30893
  }
30894
+ loading.remove();
30895
+ };
30896
 
30897
  // this is our file - stop event propagation
30898
  e.stopImmediatePropagation();
30899
 
30900
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
30901
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
30902
 
30903
  // stop loading on change file if not loaded yet
30904
  preview.one('change', function() {
30905
  jqxhr.state() === 'pending' && jqxhr.reject();
30906
+ wk && wk.terminate();
30907
  loading.remove();
30908
  });
30909
 
30910
+ req();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30911
  }
30912
  });
30913
  }
30928
  preview.on(ql.evUpdate, function(e) {
30929
  var file = e.file;
30930
  if (mimes[file.mime] && fm.options.cdns.rar && RAR !== false) {
30931
+ var loading, prog, url, archive, abort,
30932
  getList = function(url) {
30933
  if (abort) {
30934
  loading.remove();
30976
  RAR = false;
30977
  loading.remove();
30978
  },
30979
+ _RAR, opDfd;
30980
 
30981
  // this is our file - stop event propagation
30982
  e.stopImmediatePropagation();
30983
 
30984
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
30985
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
30986
 
30987
  // stop loading on change file if not loaded yet
30988
  preview.one('change', function() {
30991
  abort = true;
30992
  });
30993
 
30994
+ opDfd = fm.openUrl(file.hash, 'sameorigin', function(url) {
30995
+ if (url) {
30996
+ if (RAR) {
30997
+ getList(url);
30998
+ } else {
30999
+ if (window.RarArchive) {
31000
+ _RAR = window.RarArchive;
31001
+ delete window.RarArchive;
31002
+ }
31003
+ fm.loadScript(
31004
+ [ fm.options.cdns.rar ],
31005
+ function() {
31006
+ if (fm.hasRequire) {
31007
+ require(['rar'], function(RarArchive) {
31008
+ RAR = RarArchive;
31009
+ getList(url);
31010
+ }, error);
 
 
 
 
 
 
31011
  } else {
31012
+ if (RAR = window.RarArchive) {
31013
+ if (_RAR) {
31014
+ window.RarArchive = _RAR;
31015
+ } else {
31016
+ delete window.RarArchive;
31017
+ }
31018
+ getList(url);
31019
+ } else {
31020
+ error();
31021
+ }
31022
  }
31023
+ },
31024
+ {
31025
+ tryRequire: true,
31026
+ error : error
31027
  }
31028
+ );
 
 
 
 
31029
  }
31030
+ }
31031
+ }, { progressBar: prog, temporary: true });
31032
+ // stop loading on change file if not loaded yet
31033
+ preview.one('change', function() {
31034
+ opDfd && opDfd.state && opDfd.state() === 'pending' && opDfd.reject();
31035
+ });
31036
  }
31037
  });
31038
  }
31059
 
31060
  preview.on(ql.evUpdate, function(e) {
31061
  var file = e.file;
31062
+ if (mimes[file.mime.toLowerCase()] && fm.option('onetimeUrl', file.hash)) {
31063
  var win = ql.window,
31064
+ loading, prog, url;
31065
 
31066
  e.stopImmediatePropagation();
31067
  if (file.url == '1') {
31072
  self.html('<span class="elfinder-spinner">');
31073
  fm.request({
31074
  data : {cmd : 'url', target : file.hash},
31075
+ preventDefault : true,
31076
+ progressBar : prog
31077
  })
31078
  .always(function() {
31079
  self.html('');
31098
  node = null;
31099
  }).addClass('elfinder-overflow-auto');
31100
 
31101
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
31102
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
31103
 
31104
  url = fm.convAbsUrl(fm.url(file.hash));
31105
+ node = $('<iframe class="elfinder-quicklook-preview-iframe" scrolling="no"></iframe>')
31106
  .css('background-color', 'transparent')
31107
  .appendTo(preview)
31108
  .on('load', function() {
31145
  });
31146
  gMaps = (window.google && google.maps);
31147
  // start load maps
31148
+ loadMap = function(file, node, prog) {
31149
  var mapsOpts = ql.options.googleMapsOpts.maps;
31150
+ fm.forExternalUrl(file.hash, { progressBar: prog }).done(function(url) {
31151
  if (url) {
31152
  try {
31153
  new gMaps.KmlLayer(url, Object.assign({
31181
  if (mapScr && mimes[file.mime.toLowerCase()]) {
31182
  var win = ql.window,
31183
  getLink = (file.url == '1' && !fm.option('onetimeUrl', file.hash)),
31184
+ loading, prog, url, node;
31185
 
31186
  e.stopImmediatePropagation();
31187
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
31188
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
31189
  if (getLink) {
31190
  preview.hide();
31191
  $('<div class="elfinder-quicklook-info-data"><button class="elfinder-info-button">'+fm.i18n('getLink')+'</button></div>').appendTo(ql.info.find('.elfinder-quicklook-info'))
31194
  self.html('<span class="elfinder-spinner">');
31195
  fm.request({
31196
  data : {cmd : 'url', target : file.hash},
31197
+ preventDefault : true,
31198
+ progressBar : prog
31199
  })
31200
  .always(function() {
31201
+ loading.remove();
31202
  self.html('');
31203
  })
31204
  .done(function(data) {
31215
  });
31216
  }
31217
  if (file.url !== '' && !getLink) {
31218
+ node = $('<div style="width:100%;height:100%;"></div>').appendTo(preview);
31219
  preview.one('change', function() {
31220
  node.remove();
31221
  node = null;
31223
  if (!gMaps) {
31224
  fm.loadScript([mapScr], function() {
31225
  gMaps = window.google && google.maps;
31226
+ gMaps && loadMap(file, node, prog);
31227
  });
31228
  } else {
31229
+ loadMap(file, node, prog);
31230
  }
31231
  }
31232
  }
31280
  if (enable) {
31281
  preview.on(ql.evUpdate, function(e) {
31282
  var file = e.file,
31283
+ type, dfd;
31284
  // 25MB is maximum filesize of Google Docs prevew
31285
  if (file.size <= 26214400 && (type = mimes[file.mime])) {
31286
  var win = ql.window,
31289
  },
31290
  ext = fm.mimeTypes[file.mime],
31291
  getLink = (file.url == '1' && !fm.option('onetimeUrl', file.hash)),
31292
+ loading, prog, url, tm;
31293
 
31294
  if (type === 'm') {
31295
  if ((mLimits[ext] && file.size > mLimits[ext]) || file.size > mLimits.other) {
31325
  if (file.url !== '' && !getLink) {
31326
  e.stopImmediatePropagation();
31327
  preview.one('change', function() {
31328
+ dfd && dfd.status && dfd.status() === 'pending' && dfd.reject();
31329
  win.off('viewchange.googledocs');
31330
  loading.remove();
31331
  node.off('load').remove();
31332
  node = null;
31333
  }).addClass('elfinder-overflow-auto');
31334
 
31335
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
31336
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
31337
+
31338
+ node = $('<iframe class="elfinder-quicklook-preview-iframe"></iframe>')
31339
  .css('background-color', 'transparent')
31340
  .appendTo(preview);
31341
 
31342
+ dfd = fm.forExternalUrl(file.hash, { progressBar: prog }).done(function(url) {
31343
+ var load = function() {
31344
+ try {
31345
+ if (node && (!node.attr('src') || node.get(0).contentWindow.document/*maybe HTTP 204*/)) {
31346
+ node.attr('src', 'https://' + urls[type] + encodeURIComponent(url));
31347
+ // Retry because Google Docs viewer sometimes returns HTTP 204
31348
+ tm = setTimeout(load, 2000);
31349
+ }
31350
+ } catch(e) {}
31351
+ };
31352
  if (url) {
31353
  if (file.ts) {
31354
  url += (url.match(/\?/)? '&' : '?') + '_t=' + file.ts;
31355
  }
31356
  node.on('load', function() {
31357
+ tm && clearTimeout(tm);
31358
  ql.hideinfo();
31359
  loading.remove();
31360
  ql.preview.after(ql.info);
31361
  $(this).css('background-color', '#fff').show();
31362
  })
31363
  .on('error', function() {
31364
+ tm && clearTimeout(tm);
31365
  loading.remove();
31366
  ql.preview.after(ql.info);
31367
+ });
31368
+ load();
31369
  } else {
31370
  loading.remove();
31371
  node.remove();
31388
  * @param elFinder.commands.quicklook
31389
  **/
31390
  function(ql) {
31391
+ "use strict";
31392
+ var fm = ql.fm,
31393
  preview = ql.preview,
31394
+ textLines = parseInt(ql.options.textInitialLines) || 150,
31395
+ prettifyLines = parseInt(ql.options.prettifyMaxLines) || 500,
31396
+ PR, _PR,
31397
+ error = function() {
31398
+ prettify = function() { return false; };
31399
+ _PR && (window.PR = _PR);
31400
+ PR = false;
31401
+ },
31402
+ prettify = function(node) {
31403
  if (fm.options.cdns.prettify) {
31404
+ prettify = function(node) {
31405
+ setTimeout(function() {
31406
+ PRcheck(node);
31407
+ }, 100);
31408
+ return 'pending';
31409
+ };
31410
+ if (window.PR) {
31411
+ _PR = window.PR;
31412
+ }
31413
+ fm.loadScript([fm.options.cdns.prettify + (fm.options.cdns.prettify.match(/\?/)? '&' : '?') + 'autorun=false'], function(wPR) {
31414
+ PR = wPR || window.PR;
31415
+ if (typeof PR === 'object') {
31416
+ prettify = function() { return true; };
31417
+ if (_PR) {
31418
+ window.PR = _PR;
31419
+ } else {
31420
+ delete window.PR;
31421
+ }
31422
+ exec(node);
31423
+ } else {
31424
+ error();
31425
+ }
31426
+ }, {
31427
+ tryRequire: true,
31428
+ error : error
31429
+ });
31430
  } else {
31431
+ error();
31432
  }
31433
  },
31434
+ exec = function(node) {
31435
+ if (node && !node.hasClass('prettyprinted')) {
31436
+ node.css('cursor', 'wait');
31437
+ requestAnimationFrame(function() {
31438
+ PR.prettyPrint && PR.prettyPrint(null, node.get(0));
31439
+ node.css('cursor', '');
31440
+ });
31441
+ }
31442
+ },
31443
+ PRcheck = function(node) {
31444
+ var status = prettify(node);
31445
+ if (status === true) {
31446
+ exec(node);
 
 
31447
  }
31448
  };
31449
 
31450
  preview.on(ql.evUpdate, function(e) {
31451
  var file = e.file,
31452
  mime = file.mime,
31453
+ jqxhr, loading, prog, encSelect;
31454
 
31455
+ if (fm.mimeIsText(file.mime) && (!ql.options.getSizeMax || file.size <= ql.options.getSizeMax) && PR !== false) {
31456
  e.stopImmediatePropagation();
31457
 
31458
+ loading = $('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n('nowLoading')+'</span><span class="elfinder-spinner"></span></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
31459
+ prog = $('<div class="elfinder-quicklook-info-progress"></div>').appendTo(loading);
 
31460
 
31461
  // stop loading on change file if not loadin yet
31462
  preview.one('change', function() {
31463
  jqxhr.state() == 'pending' && jqxhr.reject();
31464
+ encSelect && encSelect.remove();
31465
  });
31466
 
31467
  jqxhr = fm.request({
31468
+ data : {cmd : 'get', target : file.hash, conv : (file.encoding || 1), _t : file.ts},
31469
  options : {type: 'get', cache : true},
31470
+ preventDefault : true,
31471
+ progressBar : prog
31472
  })
31473
  .done(function(data) {
31474
  var reg = new RegExp('^(data:'+file.mime.replace(/([.+])/g, '\\$1')+';base64,)', 'i'),
31475
  text = data.content,
31476
+ part, more, node, lines, m;
31477
+ if (typeof text !== 'string') {
31478
+ return;
31479
+ }
31480
  ql.hideinfo();
31481
  if (window.atob && (m = text.match(reg))) {
31482
  text = atob(text.substr(m[1].length));
31483
  }
31484
 
31485
+ lines = text.match(/([^\r\n]{1,100}[\r\n]*)/g);
31486
+ more = lines.length - textLines;
31487
+ if (more > 10) {
31488
+ part = lines.splice(0, textLines).join('');
31489
  } else {
31490
  more = 0;
31491
  }
31492
+
31493
  node = $('<div class="elfinder-quicklook-preview-text-wrapper"><pre class="elfinder-quicklook-preview-text prettyprint"></pre></div>');
31494
 
31495
  if (more) {
31496
+ node.append($('<div class="elfinder-quicklook-preview-charsleft"><hr/><span>' + fm.i18n('linesLeft', fm.toLocaleString(more)) + '</span></div>')
31497
  .on('click', function() {
31498
  var top = node.scrollTop();
31499
  $(this).remove();
31500
  node.children('pre').removeClass('prettyprinted').text(text).scrollTop(top);
31501
+ if (lines.length <= prettifyLines) {
31502
+ PRcheck(node);
31503
+ }
31504
  })
31505
  );
31506
  }
31511
  e.originalEvent._preventSwipeX = true;
31512
  }
31513
  }).appendTo(preview);
31514
+
31515
+ // make toast message
31516
+ if (data.toasts && Array.isArray(data.toasts)) {
31517
+ $.each(data.toasts, function() {
31518
+ this.msg && fm.toast(this);
31519
+ });
31520
+ }
31521
+
31522
+ PRcheck(node);
31523
  })
31524
+ .always(function(data) {
31525
+ var cmdEdit, sel, head;
31526
+ if (cmdEdit = fm.getCommand('edit')) {
31527
+ head = [];
31528
+ if (data && data.encoding) {
31529
+ head.push({value: data.encoding});
31530
+ }
31531
+ head.push({value: 'UTF-8'});
31532
+ sel = cmdEdit.getEncSelect(head);
31533
+ sel.on('change', function() {
31534
+ file.encoding = sel.val();
31535
+ fm.cache(file, 'change');
31536
+ preview.trigger({
31537
+ type: ql.evUpdate,
31538
+ file: file,
31539
+ forceUpdate: true
31540
+ });
31541
+ });
31542
+ encSelect = $('<div class="elfinder-quicklook-encoding"></div>').append(sel);
31543
+ ql.window.append(encSelect);
31544
+ }
31545
  loading.remove();
31546
  });
31547
  }
31561
  * @author Dmitry (dio) Levashov
31562
  **/
31563
  (elFinder.prototype.commands.reload = function() {
31564
+ "use strict";
31565
+ var self = this,
31566
  search = false;
31567
 
31568
  this.alwaysEnabled = true;
31587
  if (fm.options.sync >= 1000) {
31588
  self.extra = {
31589
  icon: 'accept',
31590
+ node: $('<span></span>')
31591
  .attr({title: fm.i18n('autoSync')})
31592
  .on('click touchstart', function(e){
31593
  if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) {
31656
 
31657
  fm.lockfiles({files : sel});
31658
 
31659
+ if (fm.isRoot(file) && !file.netkey) {
31660
  if (!(rootNames = fm.storage('rootNames'))) {
31661
  rootNames = {};
31662
  }
31792
  prefix = $(tplr),
31793
  suffix = $(tplr),
31794
  extention = $(tplr),
31795
+ checks = $('<div></div>').append(
31796
  mkChk(num, 'plusNumber'),
31797
  mkChk(prefix, 'asPrefix'),
31798
  mkChk(suffix, 'asSuffix'),
31799
  mkChk(extention, 'changeExtention')
31800
  ),
31801
+ preview = $('<div class="elfinder-rename-batch-preview"></div>'),
31802
+ node = $('<div class="elfinder-rename-batch"></div>').append(
31803
+ $('<div class="elfinder-rename-batch-name"></div>').append(name),
31804
+ $('<div class="elfinder-rename-batch-type"></div>').append(checks),
31805
  preview
31806
  ),
31807
  opts = {
31902
  isRoot = fm.isRoot(sel[0]);
31903
  }
31904
 
31905
+ state = (cnt === 1 && ((fm.cookieEnabled && isRoot) || !sel[0].locked) || (fm.api > 2.1030 && cnt === $.grep(sel, function(f) {
31906
  if (!brk && !f.locked && f.phash === phash && !fm.isRoot(f) && (mime === f.mime || ext === fm.splitFileExtention(f.name)[1].toLowerCase())) {
31907
  return true;
31908
  } else {
31919
  if (state !== -1 && cnt > 1) {
31920
  self.extra = {
31921
  icon: 'preference',
31922
+ node: $('<span></span>')
31923
  .attr({title: fm.i18n('batchRename')})
31924
  .on('click touchstart', function(e){
31925
  if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) {
32081
  }
32082
  }
32083
  },
32084
+ input = $(tarea? '<textarea></textarea>' : '<input type="text"/>')
32085
  .on('keyup text', function(){
32086
  if (tarea) {
32087
  this.style.height = '1px';
32232
  **/
32233
  elFinder.prototype.commands.resize = function() {
32234
  "use strict";
32235
+ var fm = this.fm,
32236
+ losslessRotate = 0,
32237
  getBounceBox = function(w, h, theta) {
32238
  var srcPts = [
32239
  {x: w/2, y: h/2},
32264
  this.updateOnSelect = false;
32265
 
32266
  this.getstate = function() {
32267
+ var sel = fm.selectedFiles();
32268
  return sel.length == 1 && sel[0].read && sel[0].write && sel[0].mime.indexOf('image/') !== -1 ? 0 : -1;
32269
  };
32270
 
32271
  this.resizeRequest = function(data, f, dfrd) {
32272
+ var file = f || fm.file(data.target),
 
32273
  tmb = file? file.tmb : null,
32274
  enabled = fm.isCommandEnabled('resize', data.target);
32275
 
32315
 
32316
  this.exec = function(hashes) {
32317
  var self = this,
 
32318
  files = this.files(hashes),
32319
  dfrd = $.Deferred(),
32320
  api2 = (fm.api > 1),
32326
  presetSize = Array.isArray(options.presetSize)? options.presetSize : [],
32327
  clactive = 'elfinder-dialog-active',
32328
  clsediting = fm.res('class', 'editing'),
32329
+ open = function(file, id, src) {
32330
  var isJpeg = (file.mime === 'image/jpeg'),
32331
+ dialog = $('<div class="elfinder-resize-container"></div>'),
32332
  input = '<input type="number" class="ui-corner-all"/>',
32333
+ row = '<div class="elfinder-resize-row"></div>',
32334
+ label = '<div class="elfinder-resize-label"></div>',
32335
  changeTm = null,
32336
  operate = false,
32337
  opStart = function() { operate = true; },
32341
  control.trigger('change');
32342
  }
32343
  },
32344
+ control = $('<div class="elfinder-resize-control"></div>')
32345
  .on('focus', 'input[type=text],input[type=number]', function() {
32346
  $(this).trigger('select');
32347
  })
32387
  ctx.restore();
32388
  }
32389
  canvas.toBlob(function(blob) {
32390
+ if (blob) {
32391
+ size1 = blob.size;
32392
+ quty.next('span').text(' (' + fm.formatSize(blob.size) + ')');
32393
+ }
32394
  }, 'image/jpeg', Math.max(Math.min(quty.val(), 100), 1) / 100);
32395
  }
32396
  }
32399
  .on('mouseup', 'input', function(e) {
32400
  $(e.target).trigger('change');
32401
  }),
32402
+ preview = $('<div class="elfinder-resize-preview"></div>')
32403
  .on('touchmove', function(e) {
32404
  if ($(e.target).hasClass('touch-punch')) {
32405
  e.stopPropagation();
32407
  }
32408
  }),
32409
  spinner = $('<div class="elfinder-resize-loading">'+fm.i18n('ntfloadimg')+'</div>'),
32410
+ rhandle = $('<div class="elfinder-resize-handle touch-punch"></div>'),
32411
+ rhandlec = $('<div class="elfinder-resize-handle touch-punch"></div>'),
32412
+ uiresize = $('<div class="elfinder-resize-uiresize elfinder-resize-control-panel"></div>'),
32413
+ uicrop = $('<div class="elfinder-resize-uicrop elfinder-resize-control-panel"></div>'),
32414
+ uirotate = $('<div class="elfinder-resize-rotate elfinder-resize-control-panel"></div>'),
32415
+ uideg270 = $('<button></button>').attr('title',fm.i18n('rotate-cw')).append($('<span class="elfinder-button-icon elfinder-button-icon-rotate-l"></span>')),
32416
+ uideg90 = $('<button></button>').attr('title',fm.i18n('rotate-ccw')).append($('<span class="elfinder-button-icon elfinder-button-icon-rotate-r"></span>')),
32417
+ uiprop = $('<span ></span>'),
32418
  reset = $('<button class="elfinder-resize-reset">').text(fm.i18n('reset'))
32419
  .on('click', function() {
32420
  resetView();
32425
  },
32426
  text: false
32427
  }),
32428
+ uitype = $('<div class="elfinder-resize-type"></div>')
32429
  .append('<input type="radio" name="type" id="'+id+'-resize" value="resize" checked="checked" /><label for="'+id+'-resize">'+fm.i18n('resize')+'</label>',
32430
  '<input class="api2" type="radio" name="type" id="'+id+'-crop" value="crop" /><label class="api2" for="'+id+'-crop">'+fm.i18n('crop')+'</label>',
32431
  '<input class="api2" type="radio" name="type" id="'+id+'-rotate" value="rotate" /><label class="api2" for="'+id+'-rotate">'+fm.i18n('rotate')+'</label>'),
32498
  .on('change', function() {
32499
  rotate.update();
32500
  }),
32501
+ uidegslider = $('<div class="elfinder-resize-rotate-slider touch-punch"></div>')
32502
  .slider({
32503
  min: 0,
32504
  max: 360,
33009
  img = $('<img/>')
33010
  .on('load', init)
33011
  .on('error', function() {
33012
+ spinner.html(fm.i18n('ntfsmth')).css('background', 'transparent');
33013
  }),
33014
+ basec = $('<div></div>'),
33015
  imgc = $('<img/>'),
33016
+ coverc = $('<div></div>'),
33017
  imgr = $('<img class="elfinder-resize-imgrotate" />'),
33018
  round = function(v, max) {
33019
  v = grid8? Math.round(v/8)*8 : Math.round(v);
33332
  fm.error('Invalid image size');
33333
  return false;
33334
  }
33335
+ if (w == owidth && h == oheight && parseInt(size0 / 1000) === parseInt(size1/1000)) {
33336
  fm.error('errResizeNoChange');
33337
  return false;
33338
  }
33433
  hline = 'elfinder-resize-handle-hline',
33434
  vline = 'elfinder-resize-handle-vline',
33435
  rpoint = 'elfinder-resize-handle-point',
33436
+ canvSrc = src,
 
33437
  sizeImg = quality? $('<img>').attr('crossorigin', fm.isCORS? 'use-credentials' : '').attr('src', canvSrc).on('load', function() {
33438
  try {
33439
  var canv = document.createElement('canvas');
33512
  if (!presetc.children('span.elfinder-resize-preset:visible').length) {
33513
  presetc.hide();
33514
  }
33515
+ dialog.elfinderdialog('posInit');
33516
  },
33517
  preset = (function() {
33518
+ var sets = $('<fieldset class="elfinder-resize-preset-container">').append($('<legend>').html(fm.i18n('presets'))).css('box-sizing', 'border-box').hide(),
33519
  hasC;
33520
  $.each(presetSize, function(i, s) {
33521
  if (s.length === 2) {
33522
  hasC = true;
33523
+ sets.append($('<span class="elfinder-resize-preset"></span>')
33524
  .data('s', s)
33525
  .text(s[0]+'x'+s[1])
33526
  .button()
33537
  useSaveAs = fm.uploadMimeCheck(file.mime, file.phash),
33538
  dMinBtn, base;
33539
 
33540
+ size0 = size1 = file.size;
33541
  uiresize.append(
33542
  $(row).append($(label).text(fm.i18n('width')), width),
33543
  $(row).append($(label).text(fm.i18n('height')), height, $('<div class="elfinder-resize-whctrls">').append(constr, reset)),
33544
+ (quality? $(row).append($(label).text(fm.i18n('quality')), quality, $('<span></span>')) : $()),
33545
  (isJpeg? $(row).append($(label).text(fm.i18n('8pxgrid')).addClass('elfinder-resize-grid8'), grid8px) : $()),
33546
  $(row).append($(label).text(fm.i18n('scale')), uiprop),
33547
  $(row).append(preset)
33553
  $(row).append($(label).text('Y')).append(pointY),
33554
  $(row).append($(label).text(fm.i18n('width')), offsetX),
33555
  $(row).append($(label).text(fm.i18n('height')), offsetY, $('<div class="elfinder-resize-whctrls">').append(constrc, reset.clone(true))),
33556
+ (quality? $(row).append($(label).text(fm.i18n('quality')), quality.clone(true), $('<span></span>')) : $()),
33557
  (isJpeg? $(row).append($(label).text(fm.i18n('8pxgrid')).addClass('elfinder-resize-grid8')) : $()),
33558
  $(row).append(presetc)
33559
  );
33562
  $(row).addClass('elfinder-resize-degree').append(
33563
  $(label).text(fm.i18n('rotate')),
33564
  degree,
33565
+ $('<span></span>').text(fm.i18n('degree')),
33566
+ $('<div></div>').append(uideg270, uideg90)[ctrgrup]()
33567
  ),
33568
  $(row).css('height', '20px').append(uidegslider),
33569
  ((quality)? $(row)[losslessRotate < 1? 'show' : 'hide']().addClass('elfinder-resize-quality').append(
33570
  $(label).text(fm.i18n('quality')),
33571
  quality.clone(true),
33572
+ $('<span></span>')) : $()
33573
  ),
33574
  $(row).append($(label).text(fm.i18n('bgcolor')), bg, picker, reseter),
33575
  $(row).css('height', '20px').append(pallet)
33594
  control.append(/*$(row), */uiresize);
33595
  }
33596
 
33597
+ rhandle.append('<div class="'+hline+' '+hline+'-top"></div>',
33598
+ '<div class="'+hline+' '+hline+'-bottom"></div>',
33599
+ '<div class="'+vline+' '+vline+'-left"></div>',
33600
+ '<div class="'+vline+' '+vline+'-right"></div>',
33601
+ '<div class="'+rpoint+' '+rpoint+'-e"></div>',
33602
+ '<div class="'+rpoint+' '+rpoint+'-se"></div>',
33603
+ '<div class="'+rpoint+' '+rpoint+'-s"></div>');
33604
 
33605
  preview.append(spinner).append(rhandle.hide()).append(img.hide());
33606
 
33607
  if (api2) {
33608
  rhandlec.css('position', 'absolute')
33609
+ .append('<div class="'+hline+' '+hline+'-top"></div>',
33610
+ '<div class="'+hline+' '+hline+'-bottom"></div>',
33611
+ '<div class="'+vline+' '+vline+'-left"></div>',
33612
+ '<div class="'+vline+' '+vline+'-right"></div>',
33613
+ '<div class="'+rpoint+' '+rpoint+'-n"></div>',
33614
+ '<div class="'+rpoint+' '+rpoint+'-e"></div>',
33615
+ '<div class="'+rpoint+' '+rpoint+'-s"></div>',
33616
+ '<div class="'+rpoint+' '+rpoint+'-w"></div>',
33617
+ '<div class="'+rpoint+' '+rpoint+'-ne"></div>',
33618
+ '<div class="'+rpoint+' '+rpoint+'-se"></div>',
33619
+ '<div class="'+rpoint+' '+rpoint+'-sw"></div>',
33620
+ '<div class="'+rpoint+' '+rpoint+'-nw"></div>');
33621
 
33622
  preview.append(basec.css('position', 'absolute').hide().append(imgc, rhandlec.append(coverc)));
33623
 
33642
  resizable : false,
33643
  buttons : buttons,
33644
  open : function() {
33645
+ var doDimReq = function(force) {
33646
+ dimreq = fm.request({
33647
+ data : {cmd : 'dim', target : file.hash, substitute : substituteImg? 400 : ''},
33648
+ preventDefault : true
33649
+ })
33650
+ .done(function(data) {
33651
+ if (!data.url && needPng) {
33652
+ dialog.elfinderdialog('close');
33653
+ fm.error(['errOpen', file.name]);
33654
+ } else {
33655
+ if (data.dim) {
33656
+ var dim = data.dim.split('x');
33657
+ file.width = dim[0];
33658
+ file.height = dim[1];
33659
+ setdim(dim);
33660
+ if (data.url) {
33661
+ img.attr('src', data.url);
33662
+ imgc.attr('src', data.url);
33663
+ imgr.attr('src', data.url);
33664
+ }
33665
+ return init();
33666
+ }
33667
+ }
33668
+ });
33669
+ },
33670
+ needPng = !{'image/jpeg':true,'image/png':true,'image/gif':true,}[file.mime],
33671
+ substituteImg = fm.option('substituteImg', file.hash) && (needPng || file.size > options.dimSubImgSize)? true : false,
33672
  hasSize = (file.width && file.height)? true : false;
 
33673
  dMinBtn = base.find('.ui-dialog-titlebar .elfinder-titlebar-minimize').hide();
33674
  fm.bind('resize', dinit);
33675
+ img.attr('src', src).one('error.dimreq', function() {
33676
+ doDimReq(true);
33677
+ });
33678
  imgc.attr('src', src);
33679
  imgr.attr('src', src);
33680
  if (api2) {
33686
  return init();
33687
  }
33688
  if (file.size > (options.getDimThreshold || 0)) {
33689
+ img.off('error.dimreq');
33690
+ doDimReq();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33691
  } else if (hasSize) {
33692
  return init();
33693
  }
33731
 
33732
  },
33733
 
33734
+ id, dialog, size0, size1
33735
  ;
33736
 
33737
 
33747
  return dfrd.resolve();
33748
  }
33749
 
33750
+
33751
+ fm.openUrl(files[0].hash, 'sameorigin', function(src) {
33752
+ open(files[0], id, src);
33753
+ });
33754
 
33755
  return dfrd;
33756
  };
34222
  "use strict";
34223
  var self = this,
34224
  fm = this.fm,
34225
+ tpl = '<div class="ui-helper-clearfix elfinder-rm-title"><span class="elfinder-cwd-icon {class} ui-corner-all"></span>{title}<div class="elfinder-rm-desc">{desc}</div></div>',
34226
  confirm = function(dfrd, targets, files, tHash, addTexts) {
34227
  var cnt = targets.length,
34228
  cwd = fm.cwd().hash,
34229
  descs = [],
34230
+ spinner = fm.i18n('calc') + '<span class="elfinder-spinner"></span>',
34231
  dialog, text, tmb, size, f, fname;
34232
 
34233
  if (cnt > 1) {
34600
  if (self.value === 'trash') {
34601
  self.extra = {
34602
  icon: 'rm',
34603
+ node: $('<span></span>')
34604
  .attr({title: fm.i18n('cmdrm')})
34605
  .on('ready', function(e, data) {
34606
  targets = data.targets;
34743
  data.type = sType;
34744
  }
34745
  return data;
34746
+ },
34747
+ rootCnt;
34748
 
34749
  if (typeof q == 'string' && q) {
34750
  if (typeof target == 'object') {
34770
 
34771
  if (! onlyMimes.length || mime.length) {
34772
  if (target === '' && fm.api >= 2.1) {
34773
+ rootCnt = Object.keys(fm.roots).length;
34774
  $.each(fm.roots, function(id, hash) {
34775
  reqDef.push(fm.request({
34776
  data : setType({cmd : 'search', q : q, target : hash, mimes : mime}),
34777
+ notify : {type : 'search', cnt : 1, hideCnt : (rootCnt > 1? false : true)},
34778
  cancel : true,
34779
  preventDone : true
34780
  }));
34946
  };
34947
 
34948
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34949
  /*
34950
  * File: /js/commands/sort.js
34951
  */
34971
  self.variants.push('|');
34972
  self.variants.push([
34973
  'stick',
34974
+ (fm.sortStickFolders? '<span class="ui-icon ui-icon-check"></span>' : '') + '&nbsp;' + fm.i18n('sortFoldersFirst')
34975
  ]);
34976
  if (fm.ui.tree && fm.options.sortAlsoTreeview !== null) {
34977
  self.variants.push('|');
34978
  self.variants.push([
34979
  'tree',
34980
+ (fm.sortAlsoTreeview? '<span class="ui-icon ui-icon-check"></span>' : '') + '&nbsp;' + fm.i18n('sortAlsoTreeview')
34981
  ]);
34982
  }
34983
  updateContextmenu();
34995
  arr;
34996
  if (name === (i18Name.stick || (i18Name.stick = fm.i18n('sortFoldersFirst')))) {
34997
  if (fm.sortStickFolders) {
34998
+ tgt.prepend('<span class="ui-icon ui-icon-check"></span>');
34999
  }
35000
  } else if (name === (i18Name.tree || (i18Name.tree = fm.i18n('sortAlsoTreeview')))) {
35001
  if (fm.sortAlsoTreeview) {
35002
+ tgt.prepend('<span class="ui-icon ui-icon-check"></span>');
35003
  }
35004
  } else if (name === (i18Name[fm.sortType] || (i18Name[fm.sortType] = fm.i18n('sort' + fm.sortType)))) {
35005
  arr = fm.sortOrder === 'asc'? 'n' : 's';
35042
  if (current) {
35043
  td.addClass('ui-state-active');
35044
  arr = fm.sortOrder == 'asc' ? 'n' : 's';
35045
+ $('<span class="ui-icon ui-icon-triangle-1-'+arr+'"></span>').appendTo(td);
35046
  }
35047
  $(td).on('click', function(e){
35048
  if (! $(this).data('dragging')) {
35402
  newItem.trigger('scrolltoview');
35403
  } else {
35404
  if (targetDir.hash !== cwdHash) {
35405
+ node = $('<div></div>').append(
35406
  $('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"><span class="ui-button-text">'+fm.i18n('cmdopendir')+'</span></button>')
35407
  .on('mouseenter mouseleave', function(e) {
35408
  $(this).toggleClass('ui-state-hover', e.type == 'mouseenter');
35442
  return $();
35443
  }
35444
 
35445
+ return $('<div class="elfinder-upload-dirselect elfinder-tabstop" title="' + fm.i18n('folders') + '"></div>')
35446
  .on('click', function(e) {
35447
  e.stopPropagation();
35448
  e.preventDefault();
35480
  prevNode: base,
35481
  fitHeight: true
35482
  });
35483
+ }).append('<span class="elfinder-button-icon elfinder-button-icon-dir" ></span>');
35484
  },
35485
  inputButton = function(type, caption) {
35486
  var button,
35502
  .on('dragover', function(e) {
35503
  e.originalEvent.dataTransfer.dropEffect = 'copy';
35504
  }),
35505
+ form = $('<form></form>').append(input).on('click', function(e) {
35506
  e.stopPropagation();
35507
  });
35508
 
35636
  });
35637
  };
35638
 
35639
+ dialog = $('<div class="elfinder-upload-dialog-wrapper"></div>')
35640
  .append(inputButton('multiple', 'selectForUpload'));
35641
 
35642
  if (! fm.UA.Mobile && (function(input) {
35649
  if (targetDir.hash === cwdHash || fm.navHash2Elm(targetDir.hash).hasClass('elfinder-subtree-loaded')) {
35650
  getSelector().appendTo(dialog);
35651
  } else {
35652
+ spinner = $('<div class="elfinder-upload-dirselect" title="' + fm.i18n('nowLoading') + '"></div>')
35653
+ .append('<span class="elfinder-button-icon elfinder-button-icon-spinner" ></span>')
35654
  .appendTo(dialog);
35655
  fm.request({cmd : 'tree', target : targetDir.hash})
35656
  .done(function() {
35775
 
35776
  this.extra = {
35777
  icon: 'menu',
35778
+ node: $('<span></span>')
35779
  .attr({title: fm.i18n('viewtype')})
35780
  .on('click touchstart', function(e){
35781
  if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) {
35794
 
35795
  this.exec = function() {
35796
  var self = this,
35797
+ value = this.value == 'list' ? 'icons' : 'list';
35798
+
35799
+ fm.storage('view', value);
35800
  return fm.lazy(function() {
35801
  fm.viewchange();
35802
  self.update(void(0), value);
35845
  }).bind('contextmenucreate', function() {
35846
  self.extra = {
35847
  icon: 'menu',
35848
+ node: $('<span></span>')
35849
  .attr({title: fm.i18n('cmdview')})
35850
  .on('click touchstart', function(e){
35851
  if (e.type === 'touchstart' && e.originalEvent.touches.length > 1) {
elFinder/js/elfinder.min.js CHANGED
@@ -1,25 +1,25 @@
1
  /*!
2
  * elFinder - file manager for web
3
- * Version 2.1.46 (2019-02-23)
4
  * http://elfinder.org
5
  *
6
- * Copyright 2009-2019, Studio 42
7
  * Licensed under a 3-clauses BSD license
8
  */
9
- !function(e,t){if("function"==typeof define&&define.amd)define(["jquery","jquery-ui"],t);else if("undefined"!=typeof exports){var n,i;try{n=require("jquery"),i=require("jquery-ui")}catch(a){}module.exports=t(n,i)}else t(e.jQuery,e.jQuery.ui,!0)}(this,function(e,t,n){n=n||!1;var i=function(t,n,a){var o,r,s,l,c,d,p,u=this,h=[],f=["button","tooltip"],m=e(t),g=e.extend(!0,{},e._data(m.get(0),"events")),v=e("<div/>").append(m.contents()).attr("class",m.attr("class")||"").attr("style",m.attr("style")||""),b=m.attr("id")||m.attr("id","elfauto"+e(".elfinder").length).attr("id"),y="elfinder-"+b,w="mousedown."+y,x="keydown."+y,k="keypress."+y,C="keyup."+y,z=!1,T=!1,A=["enable","disable","load","open","reload","select","add","remove","change","dblclick","getfile","lockfiles","unlockfiles","selectfiles","unselectfiles","dragstart","dragstop","search","searchend","viewchange"],S="",I={path:"",url:"",tmbUrl:"",disabled:[],separator:"/",archives:[],extract:[],copyOverwrite:!0,uploadOverwrite:!0,uploadMaxSize:0,jpgQuality:100,tmbCrop:!1,tmb:!1},O={},j={},M={},F={},D=[],E={},U={},P=[],R={},q=[],H=[],_=new u.command(u),N="auto",L=400,W=null,B="sounds/",$="",K=!1,V=e(document.createElement("audio")).hide().appendTo("body")[0],X=0,J="",G=null,Y=function(t){var n,i,a,o,r,s,l,c={},d={};u.api>=2.1?(u.commandMap=t.options.uiCmdMap&&Object.keys(t.options.uiCmdMap).length?t.options.uiCmdMap:{},J!==JSON.stringify(u.commandMap)&&(J=JSON.stringify(u.commandMap))):u.options.sync=0,t.init?(j={},F={}):(s=S,n="elfinder-subtree-loaded "+u.res("class","navexpand"),r=u.res("class","navcollapse"),i=Object.keys(j),a=function(e){if(!j[e])return!0;var t="directory"===j[e].mime,i=j[e].phash;!(!t||c[i]||!d[i]&&u.navHash2Elm(j[e].hash).is(":hidden")&&u.navHash2Elm(i).next(".elfinder-navbar-subtree").children().length>100)||!t&&i===S||R[e]?t&&(d[i]=!0):(t&&!c[i]&&(c[i]=!0,u.navHash2Elm(i).removeClass(n).next(".elfinder-navbar-subtree").empty()),te(j[e]))},o=function(){i.length&&(G&&G._abort(),G=u.asyncJob(a,i,{interval:20,numPerOnce:100}).done(function(){var t=u.storage("hide")||{items:{}};Object.keys(M).length&&e.each(M,function(e){t.items[e]||delete M[e]})}))},u.trigger("filesgc").one("filesgc",function(){i=[]}),u.one("opendone",function(){s!==S&&(m.data("lazycnt")?u.one("lazydone",o):o())})),u.sorters={},S=t.cwd.hash,Q(t.files),j[S]||Q([t.cwd]),l=JSON.stringify(u.sorters),$!==l&&(u.trigger("sorterupdate"),$=l),u.lastDir(S),u.autoSync()},Q=function(t,n){var i,a,o,r,s={name:!0,perm:!0,date:!0,size:!0,kind:!0},l=!u.sorters._checked,c=t.length,d=function(t){var n=t||{},i=[];e.each(u.sortRules,function(e){(s[e]||"undefined"!=typeof n[e]||"mode"===e&&"undefined"!=typeof n.perm)&&i.push(e)}),u.sorters=u.arrayFlip(i,!0),u.sorters._checked=!0},p=["sizeInfo"],h={},f=u.storage("hide")||{},m=f.items||{};for(a=0;a<c;a++)i=Object.assign({},t[a]),r=!(f.show||!m[i.hash]),i.name&&i.hash&&i.mime&&(r||(l&&i.phash===S&&(d(i),l=!1),!i.phash||"add"!==n&&"change"!==n||(o=u.parents(i.phash))&&e.each(o,function(){h[this]=!0})),j[i.hash]&&(e.each(p,function(){j[i.hash][this]&&!i[this]&&(i[this]=j[i.hash][this])}),i.sizeInfo&&!i.size&&(i.size=i.sizeInfo.size),te(j[i.hash],!0)),m[i.hash]&&(M[i.hash]=i),r?(c--,t.splice(a--,1)):(j[i.hash]=i,"directory"!==i.mime||F[i.hash]||(F[i.hash]={}),i.phash&&(F[i.phash]||(F[i.phash]={}),F[i.phash][i.hash]=!0)));e.each(Object.keys(h),function(){var e=j[this];e&&e.sizeInfo&&delete e.sizeInfo}),l&&d()},Z=function(t){var n,i=t.length,a={},o=function(t){var i=j[t];i&&("directory"===i.mime&&(a[t]&&delete u.roots[a[t]],e.each(u.leafRoots,function(n,i){var a,o;(a=e.inArray(t,i))!==-1&&(1===i.length?((o=Object.assign({},j[n]))&&o._realStats&&(e.each(o._realStats,function(e,t){o[e]=t}),Z(j[n]._realStats),u.change({changed:[o]})),delete u.leafRoots[n]):u.leafRoots[n].splice(a,1))}),u.searchStatus.state<2&&e.each(j,function(e,n){n.phash==t&&o(e)})),i.phash&&(n=u.parents(i.phash))&&e.each(n,function(){r[this]=!0}),te(j[t]))},r={};for(e.each(u.roots,function(e,t){a[t]=e});i--;)o(t[i]);e.each(Object.keys(r),function(){var e=j[this];e&&e.sizeInfo&&delete e.sizeInfo})},ee=function(t){e.each(t,function(t,n){var i=n.hash;j[i]&&e.each(Object.keys(j[i]),function(e,t){"undefined"==typeof n[t]&&delete j[i][t]}),j[i]=j[i]?Object.assign(j[i],n):n})},te=function(e,t){var n=e.hash,i=e.phash;i&&F[i]&&delete F[i][n],t||(F[n]&&delete F[n],u.optionsByHashes[n]&&delete u.optionsByHashes[n]),delete j[n]},ne=0,ie=[],ae=!1,oe=function(t){var n,i=t.keyCode,a=!(!t.ctrlKey&&!t.metaKey),o="mousedown"===t.type;if(!o&&(u.keyState.keyCode=i),u.keyState.ctrlKey=a,u.keyState.shiftKey=t.shiftKey,u.keyState.metaKey=t.metaKey,u.keyState.altKey=t.altKey,!o)return"keyup"===t.type?void(u.keyState.keyCode=null):void(z&&(e.each(U,function(e,n){n.type==t.type&&n.keyCode==i&&n.shiftKey==t.shiftKey&&n.ctrlKey==a&&n.altKey==t.altKey&&(t.preventDefault(),t.stopPropagation(),n.callback(t,u),u.debug("shortcut-exec",e+" : "+n.description))}),i!=e.ui.keyCode.TAB||e(t.target).is(":input")||t.preventDefault(),"keydown"===t.type&&i==e.ui.keyCode.ESCAPE&&(m.find(".ui-widget:visible").length||u.clipboard().length&&u.clipboard([]),e.ui.ddmanager&&(n=e.ui.ddmanager.current,n&&n.helper&&n.cancel()),u.toHide(m.find(".ui-widget.elfinder-button-menu.elfinder-frontmost:visible")),u.trigger("keydownEsc",t))))},re=new Date,se=window.parent!==window,le=function(){var t,n;if(se)try{n=e("iframe",window.parent.document),n.length&&e.each(n,function(n,i){if(i.contentWindow===window)return t=e(i),!1})}catch(i){}return t}();n||(n={}),u.UA.Mobile&&e(window).on("orientationchange."+y,function(){var e=(screen&&screen.orientation&&screen.orientation.angle||window.orientation||0)+0;e===-90&&(e=270),u.UA.Angle=e,u.UA.Rotated=e%180!==0}).trigger("orientationchange."+y),n.bootCallback&&"function"==typeof n.bootCallback&&!function(){var e=a,t=n.bootCallback;a=function(n,i){e&&"function"==typeof e&&e.call(this,n,i),t.call(this,n,i)}}(),delete n.bootCallback,this.api=null,this.newAPI=!1,this.oldAPI=!1,this.netDrivers=[],this.baseUrl="",this.i18nBaseUrl="",this.cssloaded=!1,this.theme=null,this.mimesCanMakeEmpty={},this.bootCallback,this.reloadCallback,this.id=b,this.storage=function(){try{return"localStorage"in window&&null!==window.localStorage?(u.UA.Safari&&(window.localStorage.setItem("elfstoragecheck",1),window.localStorage.removeItem("elfstoragecheck")),u.localStorage):u.cookie}catch(e){return u.cookie}}(),this.pauseUnloadCheck=function(e,t){return"undefined"==typeof e?K:(K=!!e,void(e&&!t&&requestAnimationFrame(function(){K=!1})))},this.options=Object.assign({},this._options),n.uiOptions&&n.uiOptions.toolbar&&Array.isArray(n.uiOptions.toolbar)&&e.isPlainObject(n.uiOptions.toolbar[n.uiOptions.toolbar.length-1])&&(u.options.uiOptions.toolbarExtra=Object.assign(u.options.uiOptions.toolbarExtra||{},n.uiOptions.toolbar.pop())),function(){var t=function(n,i){e.isPlainObject(n)&&e.each(n,function(n,a){e.isPlainObject(a)?(i[n]||(i[n]={}),t(a,i[n])):i[n]=a})};t(n,u.options)}(),this.options.uiOptions.toolbar.push(this.options.uiOptions.toolbarExtra),delete this.options.uiOptions.toolbarExtra,this.toUnbindEvents={},this.bind=function(e,t,n){var i,a;if(t&&("function"==typeof t||"function"==typeof t.done))for(e=(""+e).toLowerCase().replace(/^\s+|\s+$/g,"").split(/\s+/),a=e.length,i=0;i<a;i++)void 0===E[e[i]]&&(E[e[i]]=[]),E[e[i]][n?"unshift":"push"](t);return this},this.unbind=function(t,n){var i,a,o,r;for(t=(""+t).toLowerCase().split(/\s+/),a=t.length,i=0;i<a;i++)(o=E[t[i]])&&(r=e.inArray(n,o),r>-1&&o.splice(r,1));return n=null,this},this.trigger=function(t,n,i){var a,o,r,s,l=t.toLowerCase(),c="object"==typeof n,d=E[l]||[],p=[];if(this.debug("event-"+l,n),c&&"undefined"!=typeof i||(i=!0),o=d.length){for(s=e.Event(l),n&&(n._event=s),i&&(s.data=n),a=0;a<o;a++)if(d[a])if(d[a].done)p.push(d[a].done);else{if(d[a].length&&!i){if("undefined"==typeof r)try{r=JSON.stringify(n)}catch(h){r=!1}s.data=r?JSON.parse(r):n}try{if(d[a].call(s,s,this)===!1||s.isDefaultPrevented()){this.debug("event-stoped",s.type);break}}catch(f){window.console&&window.console.log&&window.console.log(f)}}if(o=p.length)for(a=0;a<o;a++)try{if(p[a].call(s,s,this)===!1||s.isDefaultPrevented()){this.debug("event-stoped",s.type+"(done)");break}}catch(f){window.console&&window.console.log&&window.console.log(f)}this.toUnbindEvents[l]&&this.toUnbindEvents[l].length&&(e.each(this.toUnbindEvents[l],function(e,t){u.unbind(t.type,t.callback)}),delete this.toUnbindEvents[l])}return this},this.getListeners=function(e){return e?E[e.toLowerCase()]:E},this.baseUrl=function(){var t,n,i,a;return u.options.baseUrl?u.options.baseUrl:(a="",t=null,e("head > script").each(function(){if(this.src&&this.src.match(/js\/elfinder(?:-[a-z0-9_-]+)?\.(?:min|full)\.js$/i))return t=e(this),!1}),t&&(n=e('head > link[href$="css/elfinder.min.css"],link[href$="css/elfinder.full.css"]:first').length,n||(u.cssloaded=null),a=t.attr("src").replace(/js\/[^\/]+$/,""),a.match(/^(https?\/\/|\/)/)||(i=e("head > base[href]").attr("href"))&&(a=i.replace(/\/$/,"")+"/"+a)),""!==a?u.options.baseUrl=a:(u.options.baseUrl||(u.options.baseUrl="./"),a=u.options.baseUrl),a)}(),this.i18nBaseUrl=(this.options.i18nBaseUrl||this.baseUrl+"js/i18n").replace(/\/$/,"")+"/",this.options.maxErrorDialogs=Math.max(1,parseInt(this.options.maxErrorDialogs||5)),I.dispInlineRegex=this.options.dispInlineRegex,this.options.cssAutoLoad&&!function(){var t=u.baseUrl;Array.isArray(u.options.cssAutoLoad)&&(u.cssloaded===!0?u.loadCss(u.options.cssAutoLoad):u.bind("cssloaded",function(){u.loadCss(u.options.cssAutoLoad)})),null===u.cssloaded&&(m.data("cssautoloadHide",e("<style>.elfinder{visibility:hidden;overflow:hidden}</style>")),e("head").append(m.data("cssautoloadHide")),u.options.themes["default"]||(u.options.themes=Object.assign({"default":{name:"default",cssurls:"css/theme.css",author:"elFinder Project",license:"3-clauses BSD"}},u.options.themes),u.options.theme||(u.options.theme="default")),u.loadCss([t+"css/elfinder.min.css"],{dfd:e.Deferred().always(function(){m.data("cssautoloadHide")&&(m.data("cssautoloadHide").remove(),m.removeData("cssautoloadHide"))}).done(function(){u.cssloaded||(u.cssloaded=!0,u.trigger("cssloaded"))}).fail(function(){u.cssloaded=!1,u.error(["errRead","CSS (elfinder or theme)"])})})),u.options.cssAutoLoad=!1}(),this.changeTheme(this.storage("theme")||this.options.theme),this.optionProperties={icon:void 0,csscls:void 0,tmbUrl:void 0,uiCmdMap:{},netkey:void 0,disabled:[]},se||this.options.enableAlways||2!==e("body").children().length||(this.options.enableAlways=!0),this.options.debug===!0?this.options.debug="all":Array.isArray(this.options.debug)?!function(){var t={};e.each(u.options.debug,function(){t[this]=!0}),u.options.debug=t}():this.options.debug=!1,this.noConflicts={},this.noConflict=function(){e.each(f,function(t,n){e.fn[n]&&"function"==typeof e.fn[n].noConflict&&(u.noConflicts[n]=e.fn[n].noConflict())})},this.noConflict(),this.isCORS=!1,function(){if("undefined"!=typeof u.options.cors&&null!==u.options.cors)u.isCORS=!!u.options.cors;else{var t,i=document.createElement("a"),a=window.location.protocol,o=function(e){return e=e&&":"!==e?e:a,"https:"===e?/\:443$/:/\:80$/},r=window.location.host.replace(o(a),"");i.href=n.url,n.urlUpload&&n.urlUpload!==n.url&&(t=document.createElement("a"),t.href=n.urlUpload),(r!==i.host.replace(o(i.protocol),"")||":"!==i.protocol&&""!==i.protocol&&a!==i.protocol||t&&(r!==t.host.replace(o(t.protocol),"")||":"!==t.protocol&&""!==t.protocol&&a!==t.protocol))&&(u.isCORS=!0)}u.isCORS&&(e.isPlainObject(u.options.customHeaders)||(u.options.customHeaders={}),e.isPlainObject(u.options.xhrFields)||(u.options.xhrFields={}),u.options.requestType="post",u.options.customHeaders["X-Requested-With"]="XMLHttpRequest",u.options.xhrFields.withCredentials=!0)}(),this.requestType=/^(get|post)$/i.test(this.options.requestType)?this.options.requestType.toLowerCase():"get",s=Math.max(parseInt(this.options.requestMaxConn),1),this.optsCustomData=e.isPlainObject(this.options.customData)?this.options.customData:{},this.customData=Object.assign({},this.optsCustomData),this.prevCustomData=null,this.customHeaders=e.isPlainObject(this.options.customHeaders)?this.options.customHeaders:{},this.xhrFields=e.isPlainObject(this.options.xhrFields)?this.options.xhrFields:{},this.replaceXhrSend=function(){p||(p=XMLHttpRequest.prototype.send),XMLHttpRequest.prototype.send=function(){var t=this;return u.customHeaders&&e.each(u.customHeaders,function(e){t.setRequestHeader(e,this)}),u.xhrFields&&e.each(u.xhrFields,function(e){e in t&&(t[e]=this)}),p.apply(this,arguments)}},this.restoreXhrSend=function(){p&&(XMLHttpRequest.prototype.send=p)},this.abortCmdsOnOpen=this.options.abortCmdsOnOpen||["tmb","parents"],this.navPrefix="nav"+(i.prototype.uniqueid?i.prototype.uniqueid:"")+"-",this.cwdPrefix=i.prototype.uniqueid?"cwd"+i.prototype.uniqueid+"-":"",++i.prototype.uniqueid,this.uploadURL=n.urlUpload||n.url,this.namespace=y,this.today=new Date(re.getFullYear(),re.getMonth(),re.getDate()).getTime()/1e3,this.yesterday=this.today-86400,l=this.options.UTCDate?"UTC":"",this.getHours="get"+l+"Hours",this.getMinutes="get"+l+"Minutes",this.getSeconds="get"+l+"Seconds",this.getDate="get"+l+"Date",this.getDay="get"+l+"Day",this.getMonth="get"+l+"Month",this.getFullYear="get"+l+"FullYear",this.zIndex,this.searchStatus={state:0,query:"",target:"",mime:"",mixed:!1,ininc:!1},this.lang=this.storage("lang")||this.options.lang,"jp"===this.lang&&(this.lang=this.options.lang="ja"),this.viewType=this.storage("view")||this.options.defaultView||"icons",this.sortType=this.storage("sortType")||this.options.sortType||"name",this.sortOrder=this.storage("sortOrder")||this.options.sortOrder||"asc",this.sortStickFolders=this.storage("sortStickFolders"),null===this.sortStickFolders?this.sortStickFolders=!!this.options.sortStickFolders:this.sortStickFolders=!!this.sortStickFolders,this.sortAlsoTreeview=this.storage("sortAlsoTreeview"),null===this.sortAlsoTreeview||null===this.options.sortAlsoTreeview?this.sortAlsoTreeview=!!this.options.sortAlsoTreeview:this.sortAlsoTreeview=!!this.sortAlsoTreeview,this.sortRules=e.extend(!0,{},this._sortRules,this.options.sortRules),e.each(this.sortRules,function(e,t){"function"!=typeof t&&delete u.sortRules[e]}),this.compare=e.proxy(this.compare,this),this.notifyDelay=this.options.notifyDelay>0?parseInt(this.options.notifyDelay):500,this.draggingUiHelper=null,this.droppable={greedy:!0,tolerance:"pointer",accept:".elfinder-cwd-file-wrapper,.elfinder-navbar-dir,.elfinder-cwd-file,.elfinder-cwd-filename",hoverClass:this.res("class","adroppable"),classes:{"ui-droppable-hover":this.res("class","adroppable")},autoDisable:!0,drop:function(t,n){var i,a,o,r=e(this),s=e.grep(n.helper.data("files")||[],function(e){return!!e}),l=[],c=[],d=[],p=n.helper.hasClass("elfinder-drag-helper-plus"),h="class";if("undefined"==typeof t.button||n.helper.data("namespace")!==y||!u.insideWorkzone(t.pageX,t.pageY))return!1;for(a=r.hasClass(u.res(h,"cwdfile"))?u.cwdId2Hash(r.attr("id")):r.hasClass(u.res(h,"navdir"))?u.navId2Hash(r.attr("id")):S,i=s.length;i--;)o=s[i],o!=a&&j[o].phash!=a?l.push(o):(p&&o!==a&&j[a].write?c:d).push(o);return!d.length&&(n.helper.data("droped",!0),c.length&&(n.helper.hide(),u.exec("duplicate",c,{_userAction:!0})),void(l.length&&(n.helper.hide(),u.clipboard(l,!p),u.exec("paste",a,{_userAction:!0},a).always(function(){u.clipboard([]),u.trigger("unlockfiles",{files:s})}),u.trigger("drop",{files:s}))))}},this.enabled=function(){return z&&this.visible()},this.visible=function(){return m[0].elfinder&&m.is(":visible")},this.isRoot=function(e){return!(!e.isroot&&e.phash)},this.root=function(t,n){t=t||S;var i,a;if(!n&&(e.each(u.roots,function(e,n){if(0===t.indexOf(e))return i=n,!1}),i))return i;for(i=j[t];i&&i.phash&&(n||!i.isroot);)i=j[i.phash];if(i)return i.hash;for(;a in j&&j.hasOwnProperty(a);)if(i=j[a],"directory"===i.mime&&!i.phash&&i.read)return i.hash;return""},this.cwd=function(){return j[S]||{}},this.option=function(t,n){var i,a;return n=n||S,u.optionsByHashes[n]&&"undefined"!=typeof u.optionsByHashes[n][t]?u.optionsByHashes[n][t]:!u.hasVolOptions||S===n||(a=u.file(n))&&a.phash===S?O[t]||"":(i="",e.each(u.volOptions,function(e,a){if(0===n.indexOf(e))return i=a[t]||"",!1}),i)},this.getDisabledCmds=function(t,n){var i={hidden:!0};return Array.isArray(t)||(t=[t]),e.each(t,function(e,t){var n=u.option("disabledFlip",t);n&&Object.assign(i,n)}),n?i:Object.keys(i)},this.file=function(e,t){return e?j[e]||(t?M[e]:void 0):void 0},this.files=function(t){var n={};return t?F[t]?(e.each(F[t],function(e){j[e]?n[e]=j[e]:delete F[t][e]}),Object.assign({},n)):{}:Object.assign({},j)},this.parents=function(e){for(var t,n=[];e&&(t=this.file(e));)n.unshift(t.hash),e=t.phash;return n},this.path2array=function(e,t){for(var n,i=[];e;){if(!(n=j[e])||!n.hash){i=[];break}i.unshift(t&&n.i18?n.i18:n.name),e=n.isroot?null:n.phash}return i},this.path=function(t,n,i){var a=j[t]&&j[t].path?j[t].path:this.path2array(t,n).join(O.separator);if(i&&j[t]){i=Object.assign({notify:{type:"parents",cnt:1,hideCnt:!0}},i);var o,r=e.Deferred(),s=i.notify,l=!1,c=function(){u.request({data:{cmd:"parents",target:j[t].phash},notify:s,preventFail:!0}).done(d).fail(function(){r.reject()})},d=function(){u.one("parentsdone",function(){a=u.path(t,n),""===a&&l?(l=!1,c()):(s&&(clearTimeout(o),s.cnt=-parseInt(s.cnt||0),u.notify(s)),r.resolve(a))})};return a?r.resolve(a):(u.ui.tree?(s&&(o=setTimeout(function(){u.notify(s)},u.notifyDelay)),l=!0,d(!0)):c(),r)}return a},this.url=function(t,n){var i,a=j[t],o=n||{},r=o.async||!1,s=o.temporary||!1,l=o.onetime&&u.option("onetimeUrl",t)||!1,c=o.absurl||!1,d=r||l?e.Deferred():null,p=function(e){return e&&c&&(e=u.convAbsUrl(e)),e},h=function(n){if(n)return p(n);if(a.url)return p(a.url);if("undefined"==typeof i&&(i=u.option("url",!u.isRoot(a)&&a.phash||a.hash)),i)return p(i+e.map(u.path2array(t),function(e){return encodeURIComponent(e)}).slice(1).join("/"));var o=Object.assign({},u.customData,{cmd:"file",target:a.hash});return u.oldAPI&&(o.cmd="open",o.current=a.phash),p(u.options.url+(u.options.url.indexOf("?")===-1?"?":"&")+e.param(o,!0))};if(!a||!a.read)return r?d.resolve(""):"";if(l)r=!0,this.request({data:{cmd:"url",target:t,options:{onetime:1}},preventDefault:!0,options:{async:r},notify:{type:"file",cnt:1,hideCnt:!0}}).done(function(e){d.resolve(p(e.url||""))}).fail(function(){d.resolve("")});else if("1"==a.url||s&&!a.url&&!(i=u.option("url",!u.isRoot(a)&&a.phash||a.hash)))this.request({data:{cmd:"url",target:t,options:{temporary:s?1:0}},preventDefault:!0,options:{async:r},notify:r?{type:s?"file":"url",cnt:1,hideCnt:!0}:{}}).done(function(e){a.url=e.url||""}).fail(function(){a.url=""}).always(function(){var e;return a.url&&s&&(e=a.url,a.url="1"),r?void d.resolve(h(e)):h(e)});else{if(!r)return h();d.resolve(h())}return r?d:void 0},this.forExternalUrl=function(e,t){var n=u.option("onetimeUrl",e),i={async:!0,absurl:!0};return i[n?"onetime":"temporary"]=!0,u.url(e,Object.assign({},t,i))},this.openUrl=function(t,n){var i=j[t],a="";return i&&i.read?!n&&(i.url?1!=i.url&&(a=i.url):O.url&&0===i.hash.indexOf(u.cwd().volumeid)&&(a=O.url+e.map(this.path2array(t),function(e){return encodeURIComponent(e)}).slice(1).join("/")),a)?a+=(a.match(/\?/)?"&":"?")+"_".repeat((a.match(/[\?&](_+)t=/g)||["&t="]).sort().shift().match(/[\?&](_*)t=/)[1].length+1)+"t="+(i.ts||parseInt(+new Date/1e3)):(a=this.options.url,a=a+(a.indexOf("?")===-1?"?":"&")+(this.oldAPI?"cmd=open&current="+i.phash:"cmd=file")+"&target="+i.hash+"&_t="+(i.ts||parseInt(+new Date/1e3)),n&&(a+="&download=1"),e.each(this.customData,function(e,t){a+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t)}),a):""},this.tmb=function(t){var n,i,a="elfinder-cwd-bgurl",o="";return!(!e.isPlainObject(t)||(u.searchStatus.state&&0!==t.hash.indexOf(u.cwd().volumeid)?(n=u.option("tmbUrl",t.hash),i=u.option("tmbCrop",t.hash)):(n=O.tmbUrl,i=O.tmbCrop),i&&(a+=" elfinder-cwd-bgurl-crop"),"self"===n&&0===t.mime.indexOf("image/")?(o=u.openUrl(t.hash),a+=" elfinder-cwd-bgself"):(u.oldAPI||n)&&t&&t.tmb&&1!=t.tmb?o=n+t.tmb:u.newAPI&&t&&t.tmb&&1!=t.tmb&&(o=t.tmb),!o))&&(t.ts&&"self"!==n&&(o+=(o.match(/\?/)?"&":"?")+"_t="+t.ts),{url:o,className:a})},this.selected=function(){return D.slice(0)},this.selectedFiles=function(){return e.map(D,function(e){return j[e]?Object.assign({},j[e]):null})},this.fileByName=function(e,t){var n;for(n in j)if(j.hasOwnProperty(n)&&j[n].phash==t&&j[n].name==e)return j[n]},this.validResponse=function(e,t){return t.error||this.rules[this.rules[e]?e:"defaults"](t)},this.returnBytes=function(e){var t;return isNaN(e)?(e||(e=""),e=e.replace(/b$/i,""),t=e.charAt(e.length-1).toLowerCase(),e=e.replace(/[tgmk]$/i,""),"t"==t?e=1024*e*1024*1024*1024:"g"==t?e=1024*e*1024*1024:"m"==t?e=1024*e*1024:"k"==t&&(e=1024*e),e=isNaN(e)?0:parseInt(e)):(e=parseInt(e),e<1&&(e=0)),e},this.request=function(t){var n,i,a,o,r=this,l=this.options,c=e.Deferred(),d=(+new Date).toString(16)+Math.floor(1e3*Math.random()).toString(16),p=Object.assign({},r.customData,{mimes:l.onlyMimes},t.data||t),u=p.cmd,h="binary"===(t.options||{}).dataType,f=!t.asNotOpen&&"open"===u,m=!(h||t.preventDefault||t.preventFail),g=!(h||t.preventDefault||t.preventDone),v=Object.assign({},t.notify),b=!!t.cancel,y=h||!!t.raw,w=t.syncOnFail,x=!!t.lazy,k=t.prepare,C=t.navigate,z=(t.options||{}).cache,T=Object.assign({url:l.url,async:!0,type:this.requestType,dataType:"json",cache:r.api>=2.1029,data:p,headers:this.customHeaders,xhrFields:this.xhrFields},t.options||{}),A=function(t){t.warning&&r.error(t.warning),f?Y(t):r.updateCache(t),t.changed&&t.changed.length&&ee(t.changed),r.lazy(function(){t.removed&&t.removed.length&&r.remove(t),t.added&&t.added.length&&r.add(t),t.changed&&t.changed.length&&r.change(t)}).then(function(){return r.lazy(function(){r.trigger(u,t,!1)})}).then(function(){return r.lazy(function(){r.trigger(u+"done")})}).then(function(){t.toasts&&Array.isArray(t.toasts)&&e.each(t.toasts,function(){this.msg&&r.toast(this)}),t.sync&&r.sync()})},j=function(e,t){var n,i,a=r.options.debug;switch(t){case"abort":n=e.quiet?"":["errConnect","errAbort"];break;case"timeout":n=["errConnect","errTimeout"];break;case"parsererror":n=["errResponse","errDataNotJSON"],e.responseText&&(!S||a&&("all"===a||a["backend-error"]))&&n.push(e.responseText);break;default:if(e.responseText)try{i=JSON.parse(e.responseText),i&&i.error&&(n=i.error)}catch(o){}if(!n)if(403==e.status)n=["errConnect","errAccess","HTTP error "+e.status];else if(404==e.status)n=["errConnect","errNotFound","HTTP error "+e.status];else if(e.status>=500)n=["errResponse","errServerError","HTTP error "+e.status];else{if(414==e.status&&"get"===T.type)return T.type="post",r.abortXHR(e),void(c.xhr=e=r.transport.send(T).fail(n).done(M));n=e.quiet?"":["errConnect","HTTP error "+e.status]}}r.trigger(u+"done"),c.reject({error:n},e,t)},M=function(t){var n=r.options.debug;if(r.currentReqCmd=u,!t.debug||n&&"all"===n||(n||(n=r.options.debug={}),n["backend-error"]=!0,n.warning=!0),y)return r.abortXHR(i),t&&t.debug&&r.debug("backend-debug",t),c.resolve(t);if(!t)return c.reject({error:["errResponse","errDataEmpty"]},i,t);if(!e.isPlainObject(t))return c.reject({error:["errResponse","errDataNotJSON"]},i,t);if(t.error)return f&&e.each(r.leafRoots,function(t,n){r.leafRoots[t]=e.grep(n,function(e){return e!==p.target})}),c.reject({error:t.error},i,t);var a=function(){var n,a=function(n){r.leafRoots[p.target]&&t[n]&&e.each(r.leafRoots[p.target],function(e,i){var a;(a=r.file(i))&&t[n].push(a)})},o=function(){r.textMimes={},e.each(r.res("mimes","text"),function(){r.textMimes[this.toLowerCase()]=!0})};return f?a("files"):"tree"===u&&a("tree"),t=r.normalize(t),r.validResponse(u,t)?(f&&(r.api||(r.api=t.api||1,"2.0"==r.api&&"undefined"!=typeof t.options.uploadMaxSize&&(r.api="2.1"),r.newAPI=r.api>=2,r.oldAPI=!r.newAPI),t.textMimes&&Array.isArray(t.textMimes)&&(r.resources.mimes.text=t.textMimes,o()),!r.textMimes&&o(),t.options&&(O=Object.assign({},I,t.options)),t.netDrivers&&(r.netDrivers=t.netDrivers),t.maxTargets&&(r.maxTargets=t.maxTargets),p.init&&(r.uplMaxSize=r.returnBytes(t.uplMaxSize),r.uplMaxFile=t.uplMaxFile?Math.min(parseInt(t.uplMaxFile),50):20)),"function"==typeof k&&k(t),C&&(n=C.target||"added",t[n]&&t[n].length&&r.one(u+"done",function(){var i=t[n],a=r.findCwdNodes(i),o=function(){var t=r.cwd().hash;return e.map(i,function(e){return e.phash&&t===e.phash?e.hash:null})},s=o(),l=function(t){var n,i,a,l=void 0,c=t.action?t.action.data:void 0;return(c||s.length)&&t.action&&(i=t.action.msg)&&(n=t.action.cmd)&&(!t.action.cwdNot||t.action.cwdNot!==r.cwd().hash)&&(a=t.action.done,c=t.action.data,l=e("<div/>").append(e('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"><span class="ui-button-text">'+r.i18n(i)+"</span></button>").on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"==t.type)}).on("click",function(){r.exec(n,c||s,{_userAction:!0,_currentType:"toast",_currentNode:e(this)}),a&&r.one(n+"done",function(){"function"==typeof a?a():"select"===a&&r.trigger("selectfiles",{files:o()})})}))),delete t.action,t.extNode=l,t};C.toast||(C.toast={}),!C.noselect&&r.trigger("selectfiles",{files:r.searchStatus.state>1?e.map(i,function(e){return e.hash}):s}),a.length?(C.noscroll||(a.first().trigger("scrolltoview",{blink:!1}),r.resources.blink(a,"lookme")),e.isPlainObject(C.toast.incwd)&&r.toast(l(C.toast.incwd))):e.isPlainObject(C.toast.inbuffer)&&r.toast(l(C.toast.inbuffer))})),c.resolve(t),void(t.debug&&r.debug("backend-debug",t))):c.reject({error:t.norError||"errResponse"},i,t)};r.abortXHR(i),x?r.lazy(a):a()},F=function(e){i&&"pending"===i.state()&&(r.abortXHR(i,{quiet:!0,abort:!0}),(!e||"unload"!==e.type&&"destroy"!==e.type)&&r.autoSync())},D=function(e){if(r.trigger(u+"done"),"autosync"==e.type){if("stop"!=e.data.action)return}else if(!("unload"==e.type||"destroy"==e.type||"openxhrabort"==e.type||e.data.added&&e.data.added.length))return;F(e)},E=function(t){var n=function(){w=!1,c.reject()};if(t&&"cmd"===t)return u;if(f){if(ae)return c.reject();ae=!0}if(c.always(function(){delete T.headers["X-elFinderReqid"]}).fail(function(t,n,i){var a={cmd:u,err:t,xhr:n,rc:i};0===t&&ie.length&&(ie=e.grep(ie,function(e){return e("cmd")!==u})),r.trigger("requestError",a),a._event&&a._event.isDefaultPrevented()&&(m=!1,w=!1,t&&(t.error="")),F(),f&&(o=r.file(p.target),o&&o.volumeid&&r.isRoot(o)&&delete r.volumeExpires[o.volumeid]),r.trigger(u+"fail",i),t&&(m?r.error(t):r.debug("error",r.i18n(t))),w&&r.sync()}),!u)return w=!1,c.reject({error:"errCmdReq"});if(r.maxTargets&&p.targets&&p.targets.length>r.maxTargets)return w=!1,c.reject({error:["errMaxTargets",r.maxTargets]});if(g&&c.done(A),f){for(;a=q.pop();)a.queueAbort();if(S!==p.target)for(;a=H.pop();)a.queueAbort()}return e.inArray(u,(r.cmdsToAdd+" autosync").split(" "))!==-1&&("autosync"!==u&&(r.autoSync("stop"),c.always(function(){r.autoSync()})),r.trigger("openxhrabort")),delete T.preventFail,r.api>=2.1029&&(z?T.headers["X-elFinderReqid"]=d:Object.assign(T.data,{reqid:d})),c.syncOnFail=function(e){w=!!e},ne++,c.xhr=i=r.transport.send(T).always(function(){T._xhr&&"undefined"!=typeof T._xhr.responseURL&&(i.responseURL=T._xhr.responseURL||""),--ne,ie.length?ie.shift()():ae=!1}).fail(j).done(M),r.api>=2.1029&&(i._requestId=d),f||p.compare&&"info"===u?(i.queueAbort=n,q.unshift(i),p.compare&&r.bind(r.cmdsToAdd+" autosync openxhrabort",D),c.always(function(){var t=e.inArray(i,q);p.compare&&r.unbind(r.cmdsToAdd+" autosync openxhrabort",D),t!==-1&&q.splice(t,1)})):e.inArray(u,r.abortCmdsOnOpen)!==-1&&(i.queueAbort=n,H.unshift(i),c.always(function(){var t=e.inArray(i,H);t!==-1&&H.splice(t,1)})),r.bind("unload destroy",D),c.always(function(){r.unbind("unload destroy",D)}),c},U=function(){return v.type&&v.cnt&&(b&&(v.cancel=c,t.eachCancel&&(v.id=+new Date)),n=setTimeout(function(){r.notify(v),c.always(function(){v.cnt=-(parseInt(v.cnt)||0),r.notify(v)})},r.notifyDelay),c.always(function(){clearTimeout(n)})),f&&(ae=!1),ne<s?E():(f?ie.unshift(E):ie.push(E),c)},P={opts:t,result:!0};return r.api||p.init?(r.trigger("request."+u,P,!0),P.result?"object"==typeof P.result&&P.result.promise?(P.result.done(U).fail(function(){r.trigger(u+"done"),c.reject()}),c):U():(r.trigger(u+"done"),c.reject())):(w=!1,c.reject())},this.cache=function(e){Array.isArray(e)||(e=[e]),Q(e)},this.updateCache=function(t){e.isPlainObject(t)&&(t.files&&t.files.length&&Q(t.files,"files"),t.tree&&t.tree.length&&Q(t.tree,"tree"),t.removed&&t.removed.length&&Z(t.removed),t.added&&t.added.length&&Q(t.added,"add"),t.changed&&t.changed.length&&ee(t.changed,"change"))},this.diff=function(t,n,i){var a={},o=[],r=[],s=[],l=null,c=function(e){for(var t=s.length;t--;)if(s[t].hash==e)return!0};return e.each(t,function(e,t){a[t.hash]=t}),i&&i.length&&(l={},e.each(i,function(){l[this]=!0})),e.each(j,function(e,t){a[e]||n&&t.phash!==n||r.push(e)}),e.each(a,function(t,n){var i,a=j[t],r={};a?(e.each(Object.keys(a),function(){r[this]=!0}),e.each(n,function(e){if(delete r[e],!(l&&l[e]||n[e]===a[e]))return s.push(n),r={},!1}),i=Object.keys(r).length,0!==i&&(l&&e.each(r,function(e){l[e]&&--i}),0!==i&&s.push(n))):o.push(n)}),e.each(r,function(t,n){var i=j[n],o=i.phash;o&&"directory"==i.mime&&e.inArray(o,r)===-1&&a[o]&&!c(o)&&s.push(a[o])}),{added:o,removed:r,changed:s}},this.sync=function(t,n){this.autoSync("stop");var i=this,a=function(){var i="",a=0,o=0;return t&&n&&e.each(j,function(e,n){n.phash&&n.phash===t&&(++a,o=Math.max(o,n.ts)),i=a+":"+o}),i},o=a(),r=e.Deferred().done(function(){i.trigger("sync")}),s=[this.request({data:{cmd:"open",reload:1,target:S,tree:!t&&this.ui.tree?1:0,compare:o},preventDefault:!0})],l=function(){for(var e,t=[],n=i.file(i.root(S)),a=n?n.volumeid:null,o=i.cwd().phash;o;)(e=i.file(o))?(0!==o.indexOf(a)&&(t.push({target:o,cmd:"tree"}),i.isRoot(e)||t.push({target:o,cmd:"parents"}),n=i.file(i.root(o)),a=n?n.volumeid:null),o=e.phash):o=null;return t};return!t&&i.api>=2&&(S!==this.root()&&s.push(this.request({data:{cmd:"parents",target:S},preventDefault:!0})),e.each(l(),function(e,t){s.push(i.request({data:{cmd:t.cmd,target:t.target},preventDefault:!0}))})),e.when.apply(e,s).fail(function(t,a){n&&e.inArray("errOpen",t)===-1?r.reject(t&&0!=a.status?t:void 0):(r.reject(t),i.parseError(t)&&i.request({data:{cmd:"open",target:i.lastDir("")||i.root(),tree:1,init:1},notify:{type:"open",cnt:1,hideCnt:!0}}))}).done(function(e){var n,a,s;if(e.cwd.compare&&o===e.cwd.compare)return r.reject();if(n={tree:[]},a=arguments.length,a>1)for(s=1;s<a;s++)arguments[s].tree&&arguments[s].tree.length&&n.tree.push.apply(n.tree,arguments[s].tree);if(i.api<2.1&&(n.tree||(n.tree=[]),n.tree.push(e.cwd)),e=i.normalize(e),!i.validResponse("open",e))return r.reject(e.norError||"errResponse");if(n=i.normalize(n),!i.validResponse("tree",n))return r.reject(n.norError||"errResponse");var l=i.diff(e.files.concat(n&&n.tree?n.tree:[]),t);return l.added.push(e.cwd),i.updateCache(l),l.removed.length&&i.remove(l),l.added.length&&i.add(l),l.changed.length&&i.change(l),r.resolve(l)}).always(function(){i.autoSync()}),r},this.upload=function(e){return this.transport.upload(e,this)},this.shortcut=function(t){var n,i,a,o,r;if(this.options.allowShortcuts&&t.pattern&&e.isFunction(t.callback))for(n=t.pattern.toUpperCase().split(/\s+/),o=0;o<n.length;o++)i=n[o],r=i.split("+"),a=1==(a=r.pop()).length?a>0?a:a.charCodeAt(0):a>0?a:e.ui.keyCode[a],a&&!U[i]&&(U[i]={keyCode:a,altKey:e.inArray("ALT",r)!=-1,ctrlKey:e.inArray("CTRL",r)!=-1,shiftKey:e.inArray("SHIFT",r)!=-1,type:t.type||"keydown",callback:t.callback,description:t.description,pattern:i});return this},this.shortcuts=function(){var t=[];return e.each(U,function(e,n){t.push([n.pattern,u.i18n(n.description)])}),t},this.clipboard=function(t,n){var i=function(){return e.map(P,function(e){return e.hash})};return void 0!==t&&(P.length&&this.trigger("unlockfiles",{files:i()}),R={},P=e.map(t||[],function(e){var t=j[e];return t?(R[e]=!0,{
10
- hash:e,phash:t.phash,name:t.name,mime:t.mime,read:t.read,locked:t.locked,cut:!!n}):null}),this.trigger("changeclipboard",{clipboard:P.slice(0,P.length)}),n&&this.trigger("lockfiles",{files:i()})),P.slice(0,P.length)},this.isCommandEnabled=function(e,t){var n,i,a=u.cwd().volumeid||"";return!t&&u.searchStatus.state>1&&u.selected().length&&(t=u.selected()[0]),n=!t||a&&0===t.indexOf(a)?O.disabledFlip:u.option("disabledFlip",t),i=this._commands[e],!!i&&(i.alwaysEnabled||!n[e])},this.exec=function(t,n,i,a){var o,r;return!a&&this.commandMap[t]&&"hidden"!==this.commandMap[t]&&(t=this.commandMap[t]),"open"===t&&((this.searchStatus.state||this.searchStatus.ininc)&&this.trigger("searchend",{noupdate:!0}),this.autoSync("stop")),!a&&n&&(e.isArray(n)?n.length&&(a=n[0]):a=n),o=this._commands[t]&&this.isCommandEnabled(t,a)?this._commands[t].exec(n,i):e.Deferred().reject("errUnknownCmd"),r=typeof o,"object"===r&&o.promise||(u.debug("warning",'"cmd.exec()" should be returned "$.Deferred" but cmd "'+t+'" returned "'+r+'"'),o=e.Deferred().resolve()),this.trigger("exec",{dfrd:o,cmd:t,files:n,opts:i,dstHash:a}),o},this.dialog=function(t,n){var i=e("<div/>").append(t).appendTo(m).elfinderdialog(n,u),a=i.closest(".ui-dialog"),o=function(){!i.data("draged")&&i.is(":visible")&&i.elfinderdialog("posInit")};return a.length&&(u.bind("resize",o),a.on("remove",function(){u.unbind("resize",o)})),i},this.toast=function(t){return e('<div class="ui-front"/>').appendTo(this.ui.toast).elfindertoast(t||{},this)},this.getUI=function(t){return t?this.ui[t]||e():m},this.getCommand=function(e){return void 0===e?this._commands:this._commands[e]},this.resize=function(t,n){var i,a=function(){for(var e=m.outerHeight(!0)-m.innerHeight(),t=m;t.get(0)!==W.get(0)&&(t=t.parent(),e+=t.outerHeight(!0)-t.innerHeight(),t.parent().length););return e},o=!m.hasClass("ui-resizable"),r=m.data("resizeSize")||{w:0,h:0},s={};W&&W.data("resizeTm")&&clearTimeout(W.data("resizeTm")),"string"==typeof n&&(i=n.match(/^([0-9.]+)%$/))&&(W&&W.length||(W=e(window)),W.data("marginToMyNode")||W.data("marginToMyNode",a()),W.data("fitToBaseFunc")||W.data("fitToBaseFunc",function(e){var t=W.data("resizeTm");e.preventDefault(),e.stopPropagation(),t&&cancelAnimationFrame(t),m.hasClass("elfinder-fullscreen")||u.UA.Mobile&&W.data("rotated")===u.UA.Rotated||(W.data("rotated",u.UA.Rotated),W.data("resizeTm",requestAnimationFrame(function(){u.restoreSize()})))}),"undefined"==typeof W.data("rotated")&&W.data("rotated",u.UA.Rotated),n=W.height()*(i[1]/100)-W.data("marginToMyNode"),W.off("resize."+u.namespace,W.data("fitToBaseFunc")),o&&W.on("resize."+u.namespace,W.data("fitToBaseFunc"))),m.css({width:t,height:parseInt(n)}),s.w=Math.round(m.width()),s.h=Math.round(m.height()),m.data("resizeSize",s),s.w===r.w&&s.h===r.h||(m.trigger("resize"),this.trigger("resize",{width:s.w,height:s.h}))},this.restoreSize=function(){this.resize(N,L)},this.show=function(){m.show(),this.enable().trigger("show")},this.hide=function(){this.options.enableAlways&&(T=z,z=!1),this.disable(),this.trigger("hide"),m.hide()},this.lazy=function(t,n,i){var a=function(e){var t,n=m.data("lazycnt");e?(t=!m.data("lazyrepaint")&&i.repaint,n?m.data("lazycnt",++n):m.data("lazycnt",1).addClass("elfinder-processing"),t&&m.data("lazyrepaint",!0).css("display")):n&&n>1?m.data("lazycnt",--n):(t=m.data("lazyrepaint"),m.data("lazycnt",0).removeData("lazyrepaint").removeClass("elfinder-processing"),t&&m.css("display"),u.trigger("lazydone"))},o=e.Deferred(),r=function(){o.resolve(t.call(o)),a(!1)};return n=n||0,i=i||{},a(!0),n?setTimeout(r,n):requestAnimationFrame(r),o},this.destroy=function(){m&&m[0].elfinder&&(m.hasClass("elfinder-fullscreen")&&u.toggleFullscreen(m),this.options.syncStart=!1,this.autoSync("forcestop"),this.trigger("destroy").disable(),P=[],D=[],E={},U={},e(window).off("."+y),e(document).off("."+y),u.trigger=function(){},e(V).remove(),m.off().removeData().empty().append(v.contents()).attr("class",v.attr("class")).attr("style",v.attr("style")),delete m[0].elfinder,e.each(g,function(t,n){e.each(n,function(e,t){m.on(t.type+(t.namespace?"."+t.namespace:""),t.selector,t.handler)})}))},this.autoSync=function(t){var n;if(u.options.sync>=1e3){if(r&&(clearTimeout(r),r=null,u.trigger("autosync",{action:"stop"})),"stop"===t?++X:X=Math.max(0,--X),X||"forcestop"===t||!u.options.syncStart)return;n=function(t){var i;O.syncMinMs&&(t||r)&&(t&&u.trigger("autosync",{action:"start"}),i=Math.max(u.options.sync,O.syncMinMs),r&&clearTimeout(r),r=setTimeout(function(){var t,a=!0,o=S;O.syncChkAsTs&&j[o]&&(t=j[o].ts)?u.request({data:{cmd:"info",targets:[o],compare:t,reload:1},preventDefault:!0}).done(function(e){var i;a=!0,e.compare&&(i=e.compare,i==t&&(a=!1)),a?u.sync(o).always(function(){i&&(j[o].ts=i),n()}):n()}).fail(function(t,a){var o=u.parseError(t);o&&0!=a.status?(u.error(o),Array.isArray(o)&&e.inArray("errOpen",o)!==-1&&u.request({data:{cmd:"open",target:u.lastDir("")||u.root(),tree:1,init:1},notify:{type:"open",cnt:1,hideCnt:!0}})):r=setTimeout(function(){n()},i)}):u.sync(S,!0).always(function(){n()})},i))},n(!0)}},this.insideWorkzone=function(e,t,n){var i=this.getUI("workzone").data("rectangle");return n=n||1,!(e<i.left+n||e>i.left+i.width+n||t<i.top+n||t>i.top+i.height+n)},this.toFront=function(t){var n=m.children(".ui-front").removeClass("elfinder-frontmost"),i=n.last();n.css("z-index",""),e(t).addClass("ui-front elfinder-frontmost").css("z-index",i.css("z-index")+1)},this.toHide=function(t,n){var i,a=e(t);!n&&a.hide(),a.hasClass("elfinder-frontmost")&&(a.removeClass("elfinder-frontmost"),i=m.children(".ui-front:visible:not(.elfinder-frontmost)").last(),i.length&&requestAnimationFrame(function(){m.children(".elfinder-frontmost:visible").length||(u.toFront(i),i.trigger("frontmost"))}))},this.getMaximizeCss=function(){return{width:"100%",height:"100%",margin:0,top:0,left:0,display:"block",position:"fixed",zIndex:Math.max(u.zIndex?u.zIndex+1:0,1e3),maxWidth:"",maxHeight:""}},function(){se&&u.UA.Fullscreen&&(u.UA.Fullscreen=!1,le&&"undefined"!=typeof le.attr("allowfullscreen")&&(u.UA.Fullscreen=!0));var t,n,i,a,o="elfinder-fullscreen",r="elfinder-fullscreen-native",s=function(){var t=0,n=0;e.each(m.children(".ui-dialog,.ui-draggable"),function(i,a){var o=e(a),r=o.position();r.top<0&&(o.css("top",t),t+=20),r.left<0&&(o.css("left",n),n+=20)})},l=function(){var i=u.storage("useFullscreen");a=u.UA.Fullscreen&&(i?i>0:"screen"===u.options.commandsOptions.fullscreen.mode)?{fullElm:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||null},exitFull:function(){return document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():void 0},toFull:function(e){return e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():!!e.msRequestFullscreen&&e.msRequestFullscreen()}}:{fullElm:function(){var e;return m.hasClass(o)?m.get(0):(e=m.find("."+o),e.length?e.get(0):null)},exitFull:function(){var i;e(window).off("resize."+y,d),void 0!==n&&e("body").css("overflow",n),n=void 0,t&&(i=t.elm,c(i),e(i).trigger("resize",{fullscreen:"off"})),e(window).trigger("resize")},toFull:function(t){return n=e("body").css("overflow")||"",e("body").css("overflow","hidden"),e(t).css(u.getMaximizeCss()).addClass(o).trigger("resize",{fullscreen:"on"}),s(),e(window).on("resize."+y,d).trigger("resize"),!0}}},c=function(n){t&&t.elm==n&&(e(n).removeClass(o+" "+r).attr("style",t.style),t=null)},d=function(t){var n;t.target===window&&(i&&cancelAnimationFrame(i),i=requestAnimationFrame(function(){(n=a.fullElm())&&e(n).trigger("resize",{fullscreen:"on"})}))};l(),e(document).on("fullscreenchange."+y+" webkitfullscreenchange."+y+" mozfullscreenchange."+y+" MSFullscreenChange."+y,function(n){if(u.UA.Fullscreen){var l=a.fullElm(),p=e(window);i&&cancelAnimationFrame(i),null===l?(p.off("resize."+y,d),t&&(l=t.elm,c(l),e(l).trigger("resize",{fullscreen:"off"}))):(e(l).addClass(o+" "+r).attr("style","width:100%; height:100%; margin:0; padding:0;").trigger("resize",{fullscreen:"on"}),p.on("resize."+y,d),s()),p.trigger("resize")}}),u.toggleFullscreen=function(n,i){var o=e(n).get(0),r=null;if(r=a.fullElm()){if(r==o){if(i===!0)return r}else if(i===!1)return r;return a.exitFull(),null}return i===!1?null:(l(),t={elm:o,style:e(o).attr("style")},a.toFull(o)!==!1?o:(t=null,null))}}(),function(){var t,n="elfinder-maximized",i=function(e){if(e.target===window&&e.data&&e.data.elm){var n=e.data.elm;t&&cancelAnimationFrame(t),t=requestAnimationFrame(function(){n.trigger("resize",{maximize:"on"})})}},a=function(t){e(window).off("resize."+y,i),e("body").css("overflow",t.data("bodyOvf")),t.removeClass(n).attr("style",t.data("orgStyle")).removeData("bodyOvf").removeData("orgStyle"),t.trigger("resize",{maximize:"off"})},o=function(t){t.data("bodyOvf",e("body").css("overflow")||"").data("orgStyle",t.attr("style")).addClass(n).css(u.getMaximizeCss()),e("body").css("overflow","hidden"),e(window).on("resize."+y,{elm:t},i),t.trigger("resize",{maximize:"on"})};u.toggleMaximize=function(t,i){var r=e(t),s=r.hasClass(n);if(s){if(i===!0)return;a(r)}else{if(i===!1)return;o(r)}}}(),Object.assign(e.ui.keyCode,{F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,DIG0:48,DIG1:49,DIG2:50,DIG3:51,DIG4:52,DIG5:53,DIG6:54,DIG7:55,DIG8:56,DIG9:57,NUM0:96,NUM1:97,NUM2:98,NUM3:99,NUM4:100,NUM5:101,NUM6:102,NUM7:103,NUM8:104,NUM9:105,CONTEXTMENU:93,DOT:190}),this.dragUpload=!1,this.xhrUpload=("undefined"!=typeof XMLHttpRequestUpload||"undefined"!=typeof XMLHttpRequestEventTarget)&&"undefined"!=typeof File&&"undefined"!=typeof FormData,this.transport={},"object"==typeof this.options.transport&&(this.transport=this.options.transport,"function"==typeof this.transport.init&&this.transport.init(this)),"function"!=typeof this.transport.send&&(this.transport.send=function(t){return u.UA.IE||(t._xhr=new XMLHttpRequest,t.xhr=function(){return t._xhr}),e.ajax(t)}),"iframe"==this.transport.upload?this.transport.upload=e.proxy(this.uploads.iframe,this):"function"==typeof this.transport.upload?this.dragUpload=!!this.options.dragUploadAllow:this.xhrUpload&&this.options.dragUploadAllow?(this.transport.upload=e.proxy(this.uploads.xhr,this),this.dragUpload=!0):this.transport.upload=e.proxy(this.uploads.iframe,this),this.decodeRawString=function(e){var t=function(e){var t,n,i;for(t=0,n=e.length,i=[];t<n;t++)i.push(e.charCodeAt(t));return i},n=function(e){var n,i,a,o=[];for("string"==typeof e&&(e=t(e)),n=0,i=e.length;a=e[n],n<i;n++)a>=55296&&a<=56319?o.push((1023&a)+64<<10|1023&e[++n]):o.push(a);return o},i=function(e){var t,n,i,a,o=String.fromCharCode;for(t=0,n=e.length,a="";i=e[t],t<n;t++)a+=i<=127?o(i):i<=223&&i>=194?o((31&i)<<6|63&e[++t]):i<=239&&i>=224?o((15&i)<<12|(63&e[++t])<<6|63&e[++t]):i<=247&&i>=240?o(55296|((7&i)<<8|(63&e[++t])<<2|e[++t]>>>4&3)-64,56320|(15&e[t++])<<6|63&e[t]):o(65533);return a};return i(n(e))},this.getContents=function(t,n){var i,a,o=this,r=e.Deferred(),s=n||"arraybuffer";return r.fail(function(){a&&"pending"===a.state()&&a.reject()}),i=o.openUrl(t),o.isSameOrigin(i)||(i=o.openUrl(t,!0)),a=o.request({data:{cmd:"get"},options:{url:i,type:"get",cache:!0,dataType:"binary",responseType:s,processData:!1}}).fail(function(){r.reject()}).done(function(e){r.resolve(e)}),r},this.getMimetype=function(e,t){var n,i,a=t;return i=(e+"").match(/\.([^.]+)$/),i&&(n=i[1])&&(o||(o=u.arrayFlip(u.mimeTypes)),(a=o[n.toLowerCase()])||(a=t)),a},u.hashCheckers=[],function(t){var n={check:!0},i=function(e){var i,a=new n.SparkMD5.ArrayBuffer;return i=t.asyncJob(function(e){a.append(e)},e).done(function(){i._md5=a.end()})},a=function(i,a){var o,r;try{o=new n.jsSHA("SHA"+("3"===a.substr(0,1)?a:"-"+a),"ARRAYBUFFER"),r=t.asyncJob(function(e){o.update(e)},i).done(function(){r._sha=o.getHash("HEX")})}catch(s){r=e.Deferred.reject()}return r};t.options.cdns.sparkmd5&&t.hashCheckers.push("md5"),t.options.cdns.jssha&&(t.hashCheckers=t.hashCheckers.concat(["sha1","sha224","sha256","sha384","sha512","sha3-224","sha3-256","sha3-384","sha3-512","shake128","shake256"])),t.getContentsHashes=function(o,r){var s,l=e.Deferred(),c=t.arrayFlip(r||["md5"],!0),d=[],p=[],u={};if(l.fail(function(){s&&s.reject()}),n.check){delete n.check;var h=e.Deferred();window.ArrayBuffer&&t.options.cdns.sparkmd5&&(d.push(h),t.loadScript([t.options.cdns.sparkmd5],function(e){var t=e||window.SparkMD5;window.SparkMD5&&delete window.SparkMD5,h.resolve(),t&&(n.SparkMD5=t)},{tryRequire:!0,error:function(){h.reject()}}));var f=e.Deferred();window.ArrayBuffer&&t.options.cdns.jssha&&(d.push(f),t.loadScript([t.options.cdns.jssha],function(e){var t=e||window.jsSHA;window.jsSHA&&delete window.jsSHA,f.resolve(),t&&(n.jsSHA=t)},{tryRequire:!0,error:function(){f.reject()}}))}return e.when.apply(null,d).always(function(){Object.keys(n).length?s=t.getContents(o).done(function(r){var s=r instanceof ArrayBuffer&&r.byteLength>0&&t.sliceArrayBuffer(r,1048576);c.md5&&n.SparkMD5&&p.push(function(){var e=i(s).done(function(){var n;u.md5=e._md5,(n=t.file(o))&&(n.md5=e._md5),l.notify(u)});return l.fail(function(){e.reject()}),e}),n.jsSHA&&e.each(["1","224","256","384","512","3-224","3-256","3-384","3-512","ke128","ke256"],function(e,n){c["sha"+n]&&p.push(function(){var e=a(s,n).done(function(){var i;u["sha"+n]=e._sha,(i=t.file(o))&&(i["sha"+n]=e._sha),l.notify(u)});return e})}),p.length?t.sequence(p).always(function(){l.resolve(u)}):l.reject()}).fail(function(){l.reject()}):l.reject()}),l}}(this),this.parseError=function(t){var n=t;return e.isPlainObject(n)&&(n=n.error),n},this.error=function(){var e,t=arguments[0],n=arguments[1]||null;return 1==arguments.length&&"function"==typeof t?u.bind("error",t):(e=this.parseError(t),e!==!0&&e?u.trigger("error",{error:e,opts:n}):this)},e.each(A,function(t,n){u[n]=function(){var t=arguments[0];return 1==arguments.length&&"function"==typeof t?u.bind(n,t):u.trigger(n,e.isPlainObject(t)?t:{})}}),this.enable(function(){!z&&u.api&&u.visible()&&u.ui.overlay.is(":hidden")&&!m.children(".elfinder-dialog."+u.res("class","editing")+":visible").length&&(z=!0,document.activeElement&&document.activeElement.blur(),m.removeClass("elfinder-disabled"))}).disable(function(){T=z,z=!1,m.addClass("elfinder-disabled")}).open(function(){D=[]}).select(function(t){var n=0,i=[];D=e.grep(t.data.selected||t.data.value||[],function(e){return i.length||u.maxTargets&&++n>u.maxTargets?(i.push(e),!1):!!j[e]}),i.length&&(u.trigger("unselectfiles",{files:i,inselect:!0}),u.toast({mode:"warning",msg:u.i18n(["errMaxTargets",u.maxTargets])}))}).error(function(t){var n,i,a={cssClass:"elfinder-dialog-error",title:u.i18n("error"),resizable:!1,destroyOnClose:!0,buttons:{}},o=u.getUI(),r=o.children(".elfinder-dialog-error").length;r<u.options.maxErrorDialogs?(a.buttons[u.i18n(u.i18n("btnClose"))]=function(){e(this).elfinderdialog("close")},t.data.opts&&e.isPlainObject(t.data.opts)&&Object.assign(a,t.data.opts),u.dialog('<span class="elfinder-dialog-icon elfinder-dialog-icon-error"/>'+u.i18n(t.data.error),a)):(n=o.children(".elfinder-dialog-error:last").children(".ui-dialog-content:first"),i=n.children(".elfinder-error-counter"),i.length?i.data("cnt",parseInt(i.data("cnt"))+1).html(u.i18n(["moreErrors",i.data("cnt")])):(i=e('<span class="elfinder-error-counter">'+u.i18n(["moreErrors",1])+"</span>").data("cnt",1),n.append("<br/>",i)))}).bind("tmb",function(t){e.each(t.data.images||[],function(e,t){j[e]&&(j[e].tmb=t)})}).bind("searchstart",function(e){Object.assign(u.searchStatus,e.data),u.searchStatus.state=1}).bind("search",function(e){u.searchStatus.state=2}).bind("searchend",function(){u.searchStatus.state=0,u.searchStatus.ininc=!1,u.searchStatus.mixed=!1}).bind("canMakeEmptyFile",function(t){var n=t.data,i={};n&&Array.isArray(n.mimes)&&(n.unshift||(i=u.mimesCanMakeEmpty),e.each(n.mimes,function(){i[this]||(i[this]=u.mimeTypes[this])}),n.unshift&&(u.mimesCanMakeEmpty=Object.assign(i,u.mimesCanMakeEmpty)))}).bind("themechange",function(){requestAnimationFrame(function(){u.trigger("uiresize")})}),!0===this.options.sound&&this.bind("playsound",function(t){var n=V.canPlayType&&V.canPlayType('audio/wav; codecs="1"'),i=t.data&&t.data.soundFile;n&&i&&""!=n&&"no"!=n&&e(V).html('<source src="'+B+i+'" type="audio/wav">')[0].play()}),e.each(this.options.handlers,function(e,t){u.bind(e,t)}),this.history=new this.history(this),this.roots={},this.leafRoots={},this.volumeExpires={},this._commands={},Array.isArray(this.options.commands)||(this.options.commands=[]),e.inArray("*",this.options.commands)!==-1&&(this.options.commands=Object.keys(this.commands)),this.commandMap={},this.volOptions={},this.hasVolOptions=!1,this.trashes={},this.optionsByHashes={},this.uiAutoHide=[],this.one("open",function(){u.uiAutoHide.length&&setTimeout(function(){u.trigger("uiautohide")},500)}),this.bind("uiautohide",function(){u.uiAutoHide.length&&u.uiAutoHide.shift()()}),this.options.width&&(N=this.options.width),this.options.height&&(L=this.options.height),this.options.heightBase&&(W=e(this.options.heightBase)),B=this.options.soundPath?this.options.soundPath.replace(/\/+$/,"")+"/":this.baseUrl+B,u.one("opendone",function(){var t;e(document).on("click."+y,function(t){z&&!u.options.enableAlways&&!e(t.target).closest(m).length&&u.disable()}).on(x+" "+k+" "+C+" "+w,oe),u.options.useBrowserHistory&&e(window).on("popstate."+y,function(t){var n,i,a=t.originalEvent.state||{},o=!!a.thash,r=m.find(".elfinder-frontmost:visible"),s=m.find(".elfinder-navbar-dir,.elfinder-cwd-filename").find("input,textarea");o||(a={thash:u.cwd().hash},e("html,body").animate({scrollTop:m.offset().top})),r.length||s.length?(history.pushState(a,null,location.pathname+location.search+"#elf_"+a.thash),r.length?r.hasClass(u.res("class","preventback"))||(r.hasClass("elfinder-contextmenu")?e(document).trigger(e.Event("keydown",{keyCode:e.ui.keyCode.ESCAPE,ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1})):r.hasClass("elfinder-dialog")?r.elfinderdialog("close"):r.trigger("close")):s.trigger(e.Event("keydown",{keyCode:e.ui.keyCode.ESCAPE,ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1}))):o?!e.isEmptyObject(u.files())&&u.request({data:{cmd:"open",target:a.thash,onhistory:1},notify:{type:"open",cnt:1,hideCnt:!0},syncOnFail:!0}):(n=function(){i.trigger("click")},u.one("open",n,!0),i=u.toast({msg:u.i18n("pressAgainToExit"),onHidden:function(){u.unbind("open",n),history.pushState(a,null,location.pathname+location.search+"#elf_"+a.thash)}}))}),e(window).on("resize."+y,function(e){e.target===this&&(t&&cancelAnimationFrame(t),t=requestAnimationFrame(function(){var e=m.data("resizeSize")||{w:0,h:0},t={w:Math.round(m.width()),h:Math.round(m.height())};m.data("resizeSize",t),t.w===e.w&&t.h===e.h||(m.trigger("resize"),u.trigger("resize",{width:t.w,height:t.h}))}))}).on("beforeunload."+y,function(t){var n,i;if(!u.pauseUnloadCheck()){if(m.is(":visible")&&(u.ui.notify.children().length&&e.inArray("hasNotifyDialog",u.options.windowCloseConfirm)!==-1?n=u.i18n("ntfsmth"):m.find("."+u.res("class","editing")).length&&e.inArray("editingFile",u.options.windowCloseConfirm)!==-1?n=u.i18n("editingFile"):(i=Object.keys(u.selected()).length)&&e.inArray("hasSelectedItem",u.options.windowCloseConfirm)!==-1?n=u.i18n("hasSelected",""+i):(i=Object.keys(u.clipboard()).length)&&e.inArray("hasClipboardData",u.options.windowCloseConfirm)!==-1&&(n=u.i18n("hasClipboard",""+i)),n))return t.returnValue=n,n;u.trigger("unload")}}),e(window).on("message."+y,function(e){var t,n,i=e.originalEvent||null;if(i&&0===u.uploadURL.indexOf(i.origin))try{t=JSON.parse(i.data),n=t.data||null,n&&(n.error?(t.bind&&u.trigger(t.bind+"fail",n),u.error(n.error)):(n.warning&&u.error(n.warning),u.updateCache(n),n.removed&&n.removed.length&&u.remove(n),n.added&&n.added.length&&u.add(n),n.changed&&n.changed.length&&u.change(n),t.bind&&(u.trigger(t.bind,n),u.trigger(t.bind+"done")),n.sync&&u.sync()))}catch(e){u.sync()}}),u.options.enableAlways?(e(window).on("focus."+y,function(e){e.target===this&&u.enable()}),se&&e(window.top).on("focus."+y,function(){!u.enable()||le&&!le.is(":visible")||requestAnimationFrame(function(){e(window).trigger("focus")})})):se&&e(window).on("blur."+y,function(e){z&&e.target===this&&u.disable()}),se&&m.on("click",function(t){e(window).trigger("focus")}),u.options.enableByMouseOver&&m.on("mouseenter touchstart",function(t){se&&e(window).trigger("focus"),!u.enabled()&&u.enable()})}),m[0].elfinder=this,h.push(function(){var t=u.lang,n=u.i18nBaseUrl+"elfinder."+t+".js",i=e.Deferred().done(function(){u.i18[t]&&(u.lang=t),u.trigger("i18load"),c="en"===u.lang?u.i18.en:e.extend(!0,{},u.i18.en,u.i18[u.lang])});return u.i18[t]?i.resolve():(u.lang="en",u.hasRequire?require([n],function(){i.resolve()},function(){i.resolve()}):u.loadScript([n],function(){i.resolve()},{loadType:"tag",error:function(){i.resolve()}})),i}()),d=function(){var t;return u.messages=c.messages,e.fn.selectable&&e.fn.draggable&&e.fn.droppable&&e.fn.resizable&&e.fn.button&&e.fn.slider?m.length?u.options.url?(t=Object.assign({name:u.i18n("name"),perm:u.i18n("perms"),date:u.i18n("modify"),size:u.i18n("size"),kind:u.i18n("kind"),modestr:u.i18n("mode"),modeoct:u.i18n("mode"),modeboth:u.i18n("mode")},u.options.uiOptions.cwd.listView.columnsCustomName),u.getColumnName=function(e){return t[e]||u.i18n(e)},u.direction=c.direction,u.dateFormat=u.options.dateFormat||c.dateFormat,u.fancyFormat=u.options.fancyDateFormat||c.fancyDateFormat,u.nonameDateFormat=(u.options.nonameDateFormat||c.nonameDateFormat).replace(/[\/\\]/g,"_"),u.cssClass="ui-helper-reset ui-helper-clearfix ui-widget ui-widget-content ui-corner-all elfinder elfinder-"+("rtl"==u.direction?"rtl":"ltr")+(u.UA.Touch?" elfinder-touch"+(u.options.resizable?" touch-punch":""):"")+(u.UA.Mobile?" elfinder-mobile":"")+(u.UA.iOS?" elfinder-ios":"")+" "+u.options.cssClass,m.addClass(u.cssClass).on(w,function(){!z&&u.enable()}),function(){var t,n,i,a,o,r=x+"draggable keyup."+y+"draggable";u.draggable={appendTo:m,addClasses:!1,distance:4,revert:!0,refreshPositions:!1,cursor:"crosshair",cursorAt:{left:50,top:47},scroll:!1,start:function(r,s){var l,c,d=s.helper,p=e.grep(d.data("files")||[],function(e){return!!e&&(R[e]=!0,!0)}),h=!1;for(o=m.attr("style"),m.width(m.width()).height(m.height()),t="ltr"===u.direction,n=u.getUI("workzone").data("rectangle"),i=n.top+n.height,a=i-u.getUI("navdock").outerHeight(!0),u.draggingUiHelper=d,l=p.length;l--;)if(c=p[l],j[c].locked){h=!0,d.data("locked",!0);break}!h&&u.trigger("lockfiles",{files:p}),d.data("autoScrTm",setInterval(function(){d.data("autoScr")&&u.autoScroll[d.data("autoScr")](d.data("autoScrVal"))},50))},drag:function(o,r){var s,l,c,d=r.helper;((l=n.top>o.pageY)||a<o.pageY)&&(s=n.cwdEdge>o.pageX?(t?"navbar":"cwd")+(l?"Up":"Down"):(t?"cwd":"navbar")+(l?"Up":"Down"),l||("cwd"===s.substr(0,3)?i<o.pageY?c=i:s=null:c=a),s&&(d.data("autoScr",s),d.data("autoScrVal",Math.pow(l?n.top-o.pageY:o.pageY-c,1.3)))),s||d.data("autoScr")&&d.data("refreshPositions",1).data("autoScr",null),d.data("refreshPositions")&&e(this).elfUiWidgetInstance("draggable")&&(d.data("refreshPositions")>0?(e(this).draggable("option",{refreshPositions:!0,elfRefresh:!0}),d.data("refreshPositions",-1)):(e(this).draggable("option",{refreshPositions:!1,elfRefresh:!1}),d.data("refreshPositions",null)))},stop:function(t,n){var i,a=n.helper;e(document).off(r),e(this).elfUiWidgetInstance("draggable")&&e(this).draggable("option",{refreshPositions:!1}),u.draggingUiHelper=null,u.trigger("focus").trigger("dragstop"),a.data("droped")||(i=e.grep(a.data("files")||[],function(e){return!!e}),u.trigger("unlockfiles",{files:i}),u.trigger("selectfiles",{files:u.selected()})),u.enable(),m.attr("style",o),a.data("autoScrTm")&&clearInterval(a.data("autoScrTm"))},helper:function(t,n){var i,a,o,s=this.id?e(this):e(this).parents("[id]:first"),l=e('<div class="elfinder-drag-helper"><span class="elfinder-drag-helper-icon-status"/></div>'),c=function(t){var n,i=t.mime,a=u.tmb(t);return n='<div class="elfinder-cwd-icon elfinder-cwd-icon-drag '+u.mime2class(i)+' ui-corner-all"/>',a?n=e(n).addClass(a.className).css("background-image","url('"+a.url+"')").get(0).outerHTML:t.icon&&(n=e(n).css(u.getIconStyle(t,!0)).get(0).outerHTML),t.csscls&&(n='<div class="'+t.csscls+'">'+n+"</div>"),n};return u.draggingUiHelper&&u.draggingUiHelper.stop(!0,!0),u.trigger("dragstart",{target:s[0],originalEvent:t},!0),i=s.hasClass(u.res("class","cwdfile"))?u.selected():[u.navId2Hash(s.attr("id"))],l.append(c(j[i[0]])).data("files",i).data("locked",!1).data("droped",!1).data("namespace",y).data("dropover",0),(a=i.length)>1&&l.append(c(j[i[a-1]])+'<span class="elfinder-drag-num">'+a+"</span>"),e(document).on(r,function(e){var t=e.shiftKey||e.ctrlKey||e.metaKey;o!==t&&(o=t,l.is(":visible")&&l.data("dropover")&&!l.data("droped")&&(l.toggleClass("elfinder-drag-helper-plus",!!l.data("locked")||o),u.trigger(o?"unlockfiles":"lockfiles",{files:i,helper:l})))}),l}}}(),u.commands.getfile&&("function"==typeof u.options.getFileCallback?(u.bind("dblclick",function(e){e.preventDefault(),u.exec("getfile").fail(function(){u.exec("open",e.data&&e.data.file?[e.data.file]:void 0)})}),u.shortcut({pattern:"enter",description:u.i18n("cmdgetfile"),callback:function(){u.exec("getfile").fail(function(){u.exec("mac"==u.OS?"rename":"open")})}}).shortcut({pattern:"ctrl+enter",description:u.i18n("mac"==u.OS?"cmdrename":"cmdopen"),callback:function(){u.exec("mac"==u.OS?"rename":"open")}})):u.options.getFileCallback=null),e.each(u.commands,function(t,n){var i,a,o=Object.assign({},n.prototype);if(e.isFunction(n)&&!u._commands[t]&&(n.prototype.forceLoad||e.inArray(t,u.options.commands)!==-1)){if(i=n.prototype.extendsCmd||""){if(!e.isFunction(u.commands[i]))return!0;n.prototype=Object.assign({},_,new u.commands[i],n.prototype)}else n.prototype=Object.assign({},_,n.prototype);u._commands[t]=new n,n.prototype=o,a=u.options.commandsOptions[t]||{},i&&u.options.commandsOptions[i]&&(a=e.extend(!0,{},u.options.commandsOptions[i],a)),u._commands[t].setup(t,a),u._commands[t].linkedCmds.length&&e.each(u._commands[t].linkedCmds,function(t,n){var i=u.commands[n];e.isFunction(i)&&!u._commands[n]&&(i.prototype=_,u._commands[n]=new i,u._commands[n].setup(n,u.options.commandsOptions[n]||{}))})}}),u.ui={workzone:e("<div/>").appendTo(m).elfinderworkzone(u),navbar:e("<div/>").appendTo(m).elfindernavbar(u,u.options.uiOptions.navbar||{}),navdock:e("<div/>").appendTo(m).elfindernavdock(u,u.options.uiOptions.navdock||{}),contextmenu:e("<div/>").appendTo(m).elfindercontextmenu(u),overlay:e("<div/>").appendTo(m).elfinderoverlay({show:function(){u.disable()},hide:function(){T&&u.enable()}}),cwd:e("<div/>").appendTo(m).elfindercwd(u,u.options.uiOptions.cwd||{}),notify:u.dialog("",{cssClass:"elfinder-dialog-notify",position:u.options.notifyDialog.position,absolute:!0,resizable:!1,autoOpen:!1,closeOnEscape:!1,title:"&nbsp;",width:u.options.notifyDialog.width?parseInt(u.options.notifyDialog.width):null,minHeight:null}),statusbar:e('<div class="ui-widget-header ui-helper-clearfix ui-corner-bottom elfinder-statusbar"/>').hide().appendTo(m),toast:e('<div class="elfinder-toast"/>').appendTo(m),bottomtray:e('<div class="elfinder-bottomtray">').appendTo(m)},u.trigger("uiready"),e.each(u.options.ui||[],function(t,n){var i="elfinder"+n,a=u.options.uiOptions[n]||{};!u.ui[n]&&e.fn[i]&&(u.ui[n]=e("<"+(a.tag||"div")+"/>").appendTo(m),u.ui[n][i](u,a))}),u.resize(N,L),u.options.resizable&&(m.resizable({resize:function(e,t){u.resize(t.size.width,t.size.height)},handles:"se",minWidth:300,minHeight:200}),u.UA.Touch&&m.addClass("touch-punch")),function(){var e=u.getUI("navbar"),t=u.getUI("cwd").parent();u.autoScroll={navbarUp:function(t){e.scrollTop(Math.max(0,e.scrollTop()-t))},navbarDown:function(t){e.scrollTop(e.scrollTop()+t)},cwdUp:function(e){t.scrollTop(Math.max(0,t.scrollTop()-e))},cwdDown:function(e){t.scrollTop(t.scrollTop()+e)}}}(),u.UA.Touch&&!function(){var e,t,n,i,a,o,r,s,l,c=u.getUI("navbar"),d=u.getUI("toolbar"),p="touchmove.stopscroll",h=function(e){var n=e.originalEvent.touches||[{}],i=n[0].pageY||null;(!t||i<t)&&(e.preventDefault(),s&&clearTimeout(s))},f=function(e){e.preventDefault(),s&&clearTimeout(s)},g=function(){s=setTimeout(function(){m.off(p)},100)},v=50;c=c.children().length?c:null,d=d.length?d:null,m.on("touchstart touchmove touchend",function(s){if("touchend"===s.type)return e=!1,t=!1,void g();var b,y,w,x,k,C=s.originalEvent.touches||[{}],z=C[0].pageX||null,T=C[0].pageY||null,A="ltr"===u.direction;null===z||null===T||"touchstart"===s.type&&C.length>1||("touchstart"===s.type?(n=m.offset(),i=m.width(),c&&(e=!1,c.is(":hidden")?(l||(l=Math.max(50,i/10)),(A?z-n.left:i+n.left-z)<l&&(e=z)):s.originalEvent._preventSwipeX||(o=c.width(),y=A?z<n.left+o:z>n.left+i-o,y?(l=Math.max(50,i/10),e=z):e=!1)),d&&(t=!1,s.originalEvent._preventSwipeY||(r=d.height(),a=n.top,T-a<(d.is(":hidden")?v:r+30)&&(t=T,m.on(p,d.is(":hidden")?f:h))))):(c&&e!==!1&&(b=(A?e>z:e<z)?"navhide":"navshow",w=Math.abs(e-z),("navhide"===b&&w>.6*o||w>("navhide"===b?o/3:45)&&("navshow"===b||(A?z<n.left+20:z>n.left+i-20)))&&(u.getUI("navbar").trigger(b,{handleW:l}),e=!1)),d&&t!==!1&&(x=d.offset().top,Math.abs(t-T)>Math.min(45,r/3)&&(k=t>T?"slideUp":"slideDown",("slideDown"===k||x+20>T)&&(d.is("slideDown"===k?":hidden":":visible")&&d.stop(!0,!0).trigger("toggle",{duration:100,handleH:v}),t=!1)))))})}(),u.dragUpload&&!function(){var t,n,i=function(t){return"TEXTAREA"!==t.target.nodeName&&"INPUT"!==t.target.nodeName&&0===e(t.target).closest("div.ui-dialog-content").length},a="native-drag-enter",o="native-drag-disable",r="class",s=u.res(r,"navdir"),l=(u.res(r,"droppable"),u.res(r,"adroppable"),u.res(r,"navarrow"),u.res(r,"adroppable")),c=u.getUI("workzone"),d="ltr"===u.direction,p=function(){n&&cancelAnimationFrame(n),n=null};m.on("dragenter",function(e){p(),i(e)&&(e.preventDefault(),e.stopPropagation(),t=c.data("rectangle"))}).on("dragleave",function(e){p(),i(e)&&(e.preventDefault(),e.stopPropagation())}).on("dragover",function(e){var a;i(e)?(e.preventDefault(),e.stopPropagation(),e.originalEvent.dataTransfer.dropEffect="none",n||(n=requestAnimationFrame(function(){var i,o=t.top+t.height,r=o-u.getUI("navdock").outerHeight(!0);((a=e.pageY<t.top)||e.pageY>r)&&(i=t.cwdEdge>e.pageX?(d?"navbar":"cwd")+(a?"Up":"Down"):(d?"cwd":"navbar")+(a?"Up":"Down"),a||"cwd"===i.substr(0,3)&&(o<e.pageY?r=o:i=""),i&&u.autoScroll[i](Math.pow(a?t.top-e.pageY:e.pageY-r,1.3))),n=null}))):p()}).on("drop",function(e){p(),i(e)&&(e.stopPropagation(),e.preventDefault())}),m.on("dragenter",".native-droppable",function(t){if(t.originalEvent.dataTransfer){var n,i=e(t.currentTarget),r=t.currentTarget.id||null,s=null;if(!r){s=u.cwd(),i.data(o,!1);try{e.each(t.originalEvent.dataTransfer.types,function(e,t){"elfinderfrom:"===t.substr(0,13)&&(n=t.substr(13).toLowerCase())})}catch(t){}}s&&(!s.write||n&&n===(window.location.href+s.hash).toLowerCase())?i.data(o,!0):(t.preventDefault(),t.stopPropagation(),i.data(a,!0),i.addClass(l))}}).on("dragleave",".native-droppable",function(t){if(t.originalEvent.dataTransfer){var n=e(t.currentTarget);t.preventDefault(),t.stopPropagation(),n.data(a)?n.data(a,!1):n.removeClass(l)}}).on("dragover",".native-droppable",function(t){if(t.originalEvent.dataTransfer){var n=e(t.currentTarget);t.preventDefault(),t.stopPropagation(),t.originalEvent.dataTransfer.dropEffect=n.data(o)?"none":"copy",n.data(a,!1)}}).on("drop",".native-droppable",function(t){if(t.originalEvent&&t.originalEvent.dataTransfer){var n,i=e(t.currentTarget);t.preventDefault(),t.stopPropagation(),i.removeClass(l),n=t.currentTarget.id?i.hasClass(s)?u.navId2Hash(t.currentTarget.id):u.cwdId2Hash(t.currentTarget.id):u.cwd().hash,t.originalEvent._target=n,u.exec("upload",{dropEvt:t.originalEvent,target:n},void 0,n)}})}(),null===u.cssloaded?!function(){
11
- var e,t,n=function(){m.data("cssautoloadHide")&&(m.data("cssautoloadHide").remove(),m.removeData("cssautoloadHide")),u.cssloaded=!0,requestAnimationFrame(function(){u.trigger("cssloaded")})};"hidden"===m.css("visibility")?(e=1e3,t=setInterval(function(){(--e<0||"hidden"!==m.css("visibility"))&&(clearInterval(t),n())},10)):n()}():(u.cssloaded=!0,u.trigger("cssloaded")),u.zIndexCalc(),void u.trigger("init").request({data:{cmd:"open",target:u.startDir(),init:1,tree:1},preventDone:!0,notify:{type:"open",cnt:1,hideCnt:!0},freeze:!0}).fail(function(){u.trigger("fail").disable().lastDir(""),E={},U={},e(document).add(m).off("."+y),u.trigger=function(){}}).done(function(t){var n=function(e){var t=u.file(u.trashes[e]);u.options.debug;t&&t.volumeid&&delete u.volOptions[t.volumeid].trashHash,u.trashes[e]=!1,u.debug("backend-error",'Trash hash "'+e+'" was not found or not writable.')},i={};u.options.rawStringDecoder&&u.registRawStringDecoder(u.options.rawStringDecoder),u.zIndexCalc(),u.load().debug("api",u.api),m.trigger("resize"),Y(t),u.trigger("open",t,!1),u.trigger("opendone"),se&&u.options.enableAlways&&e(window).trigger("focus"),e.each(u.trashes,function(e){var t=u.file(e);t?"directory"===t.mime&&t.write||n(e):i[e]=!0}),Object.keys(i).length&&u.request({data:{cmd:"info",targets:Object.keys(i)},preventDefault:!0}).done(function(t){t&&t.files&&e.each(t.files,function(e,t){"directory"===t.mime&&t.write&&delete i[t.hash]})}).always(function(){e.each(i,n)}),u[u.options.enableAlways?"enable":"disable"]()})):alert(u.i18n("errURL")):alert(u.i18n("errNode")):alert(u.i18n("errJqui"))},a&&"function"==typeof a&&(u.bootCallback=a,a.call(m.get(0),u,{dfrdsBeforeBootup:h})),e.when.apply(null,h).done(function(){d()}).fail(function(e){u.error(e)})};return("undefined"==typeof n||n)&&(window.elFinder=i),i.prototype={uniqueid:0,res:function(e,t){return this.resources[e]&&this.resources[e][t]},OS:navigator.userAgent.indexOf("Mac")!==-1?"mac":navigator.userAgent.indexOf("Win")!==-1?"win":"other",UA:function(){var e=!document.unqueID&&!window.opera&&!window.sidebar&&window.localStorage&&"WebkitAppearance"in document.documentElement.style,t=e&&window.chrome,n={ltIE6:"undefined"==typeof window.addEventListener&&"undefined"==typeof document.documentElement.style.maxHeight,ltIE7:"undefined"==typeof window.addEventListener&&"undefined"==typeof document.querySelectorAll,ltIE8:"undefined"==typeof window.addEventListener&&"undefined"==typeof document.getElementsByClassName,ltIE9:document.uniqueID&&document.documentMode<=9,ltIE10:document.uniqueID&&document.documentMode<=10,gtIE11:document.uniqueID&&document.documentMode>=11,IE:document.uniqueID,Firefox:window.sidebar,Opera:window.opera,Webkit:e,Chrome:t,Edge:!(!t||!window.msCredentials),Safari:e&&!window.chrome,Mobile:"undefined"!=typeof window.orientation,Touch:"undefined"!=typeof window.ontouchstart,iOS:navigator.platform.match(/^iP(?:[ao]d|hone)/),Fullscreen:"undefined"!=typeof(document.exitFullscreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen),Angle:0,Rotated:!1,CSS:function(){var e,t=document.createElement("a").style,n=document.createElement("p").style;return e="position:sticky;position:-webkit-sticky;",e+="width:-webkit-max-content;width:-moz-max-content;width:-ms-max-content;width:max-content;",t.cssText=e,{positionSticky:t.position.indexOf("sticky")!==-1,widthMaxContent:t.width.indexOf("max-content")!==-1,flex:"undefined"!=typeof n.flex}}()};return n}(),hasRequire:"function"==typeof define&&define.amd,currentReqCmd:"",keyState:{},i18:{en:{translator:"",language:"English",direction:"ltr",dateFormat:"d.m.Y H:i",fancyDateFormat:"$1 H:i",nonameDateFormat:"ymd-His",messages:{}},months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["msJan","msFeb","msMar","msApr","msMay","msJun","msJul","msAug","msSep","msOct","msNov","msDec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},kinds:{unknown:"Unknown",directory:"Folder",group:"Selects",symlink:"Alias","symlink-broken":"AliasBroken","application/x-empty":"TextPlain","application/postscript":"Postscript","application/vnd.ms-office":"MsOffice","application/msword":"MsWord","application/vnd.ms-word":"MsWord","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"MsWord","application/vnd.ms-word.document.macroEnabled.12":"MsWord","application/vnd.openxmlformats-officedocument.wordprocessingml.template":"MsWord","application/vnd.ms-word.template.macroEnabled.12":"MsWord","application/vnd.ms-excel":"MsExcel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"MsExcel","application/vnd.ms-excel.sheet.macroEnabled.12":"MsExcel","application/vnd.openxmlformats-officedocument.spreadsheetml.template":"MsExcel","application/vnd.ms-excel.template.macroEnabled.12":"MsExcel","application/vnd.ms-excel.sheet.binary.macroEnabled.12":"MsExcel","application/vnd.ms-excel.addin.macroEnabled.12":"MsExcel","application/vnd.ms-powerpoint":"MsPP","application/vnd.openxmlformats-officedocument.presentationml.presentation":"MsPP","application/vnd.ms-powerpoint.presentation.macroEnabled.12":"MsPP","application/vnd.openxmlformats-officedocument.presentationml.slideshow":"MsPP","application/vnd.ms-powerpoint.slideshow.macroEnabled.12":"MsPP","application/vnd.openxmlformats-officedocument.presentationml.template":"MsPP","application/vnd.ms-powerpoint.template.macroEnabled.12":"MsPP","application/vnd.ms-powerpoint.addin.macroEnabled.12":"MsPP","application/vnd.openxmlformats-officedocument.presentationml.slide":"MsPP","application/vnd.ms-powerpoint.slide.macroEnabled.12":"MsPP","application/pdf":"PDF","application/xml":"XML","application/vnd.oasis.opendocument.text":"OO","application/vnd.oasis.opendocument.text-template":"OO","application/vnd.oasis.opendocument.text-web":"OO","application/vnd.oasis.opendocument.text-master":"OO","application/vnd.oasis.opendocument.graphics":"OO","application/vnd.oasis.opendocument.graphics-template":"OO","application/vnd.oasis.opendocument.presentation":"OO","application/vnd.oasis.opendocument.presentation-template":"OO","application/vnd.oasis.opendocument.spreadsheet":"OO","application/vnd.oasis.opendocument.spreadsheet-template":"OO","application/vnd.oasis.opendocument.chart":"OO","application/vnd.oasis.opendocument.formula":"OO","application/vnd.oasis.opendocument.database":"OO","application/vnd.oasis.opendocument.image":"OO","application/vnd.openofficeorg.extension":"OO","application/x-shockwave-flash":"AppFlash","application/flash-video":"Flash video","application/x-bittorrent":"Torrent","application/javascript":"JS","application/rtf":"RTF","application/rtfd":"RTF","application/x-font-ttf":"TTF","application/x-font-otf":"OTF","application/x-rpm":"RPM","application/x-web-config":"TextPlain","application/xhtml+xml":"HTML","application/docbook+xml":"DOCBOOK","application/x-awk":"AWK","application/x-gzip":"GZIP","application/x-bzip2":"BZIP","application/x-xz":"XZ","application/zip":"ZIP","application/x-zip":"ZIP","application/x-rar":"RAR","application/x-tar":"TAR","application/x-7z-compressed":"7z","application/x-jar":"JAR","text/plain":"TextPlain","text/x-php":"PHP","text/html":"HTML","text/javascript":"JS","text/css":"CSS","text/rtf":"RTF","text/rtfd":"RTF","text/x-c":"C","text/x-csrc":"C","text/x-chdr":"CHeader","text/x-c++":"CPP","text/x-c++src":"CPP","text/x-c++hdr":"CPPHeader","text/x-shellscript":"Shell","application/x-csh":"Shell","text/x-python":"Python","text/x-java":"Java","text/x-java-source":"Java","text/x-ruby":"Ruby","text/x-perl":"Perl","text/x-sql":"SQL","text/xml":"XML","text/x-comma-separated-values":"CSV","text/x-markdown":"Markdown","image/x-ms-bmp":"BMP","image/jpeg":"JPEG","image/gif":"GIF","image/png":"PNG","image/tiff":"TIFF","image/x-targa":"TGA","image/vnd.adobe.photoshop":"PSD","image/xbm":"XBITMAP","image/pxm":"PXM","audio/mpeg":"AudioMPEG","audio/midi":"AudioMIDI","audio/ogg":"AudioOGG","audio/mp4":"AudioMPEG4","audio/x-m4a":"AudioMPEG4","audio/wav":"AudioWAV","audio/x-mp3-playlist":"AudioPlaylist","video/x-dv":"VideoDV","video/mp4":"VideoMPEG4","video/mpeg":"VideoMPEG","video/x-msvideo":"VideoAVI","video/quicktime":"VideoMOV","video/x-ms-wmv":"VideoWM","video/x-flv":"VideoFlash","video/x-matroska":"VideoMKV","video/ogg":"VideoOGG"},mimeTypes:{},rules:{defaults:function(e){return!(!e||e.added&&!Array.isArray(e.added)||e.removed&&!Array.isArray(e.removed)||e.changed&&!Array.isArray(e.changed))},open:function(t){return t&&t.cwd&&t.files&&e.isPlainObject(t.cwd)&&Array.isArray(t.files)},tree:function(e){return e&&e.tree&&Array.isArray(e.tree)},parents:function(e){return e&&e.tree&&Array.isArray(e.tree)},tmb:function(t){return t&&t.images&&(e.isPlainObject(t.images)||Array.isArray(t.images))},upload:function(t){return t&&(e.isPlainObject(t.added)||Array.isArray(t.added))},search:function(e){return e&&e.files&&Array.isArray(e.files)}},commands:{},cmdsToAdd:"archive duplicate extract mkdir mkfile paste rm upload",parseUploadData:function(t){var n,i=this;if(!e.trim(t))return{error:["errResponse","errDataEmpty"]};try{n=JSON.parse(t)}catch(a){return{error:["errResponse","errDataNotJSON"]}}return n=i.normalize(n),i.validResponse("upload",n)?(n.removed=e.merge(n.removed||[],e.map(n.added||[],function(e){return i.file(e.hash)?e.hash:null})),n):{error:response.norError||["errResponse"]}},iframeCnt:0,uploads:{xhrUploading:!1,failSyncTm:null,chunkfailReq:{},checkExists:function(t,n,i,a){var o,r=e.Deferred(),s=[],l={},c=function(){for(var e=t.length;--e>-1;)t[e]._remove=!0},d=function(){r.resolve(s,l)},p=function(){var r=[],p=[],u=n!==i.cwd().hash?i.path(n,!0)+i.option("separator",n):"",h=function(e){var n=e==p.length-1,o={cssClass:"elfinder-confirm-upload",title:i.i18n("cmdupload"),text:["errExists",u+p[e].name,"confirmRepl"],all:!n,accept:{label:"btnYes",callback:function(t){n||t?d():h(++e)}},reject:{label:"btnNo",callback:function(i){var a;if(i)for(a=p.length;e<a--;)t[p[a].i]._remove=!0;else t[p[e].i]._remove=!0;n||i?d():h(++e)}},cancel:{label:"btnCancel",callback:function(){c(),d()}},buttons:[{label:"btnBackup",cssClass:"elfinder-confirm-btn-backup",callback:function(t){var i;if(t)for(i=p.length;e<i--;)s.push(p[i].name);else s.push(p[e].name);n||t?d():h(++e)}}]};a||o.buttons.push({label:"btnRename"+(n?"":"All"),cssClass:"elfinder-confirm-btn-rename",callback:function(){s=null,d()}}),i.iframeCnt>0&&delete o.reject,i.confirm(o)};return i.file(n).read?(o=e.map(t,function(e,t){return!e.name||i.UA.iOS&&"image.jpg"===e.name?null:{i:t,name:e.name}}),void i.request({data:{cmd:"ls",target:n,intersect:e.map(o,function(e){return e.name})},notify:{type:"preupload",cnt:1,hideCnt:!0},preventDefault:!0}).done(function(t){var a,s;t&&(t.error?c():i.options.overwriteUploadConfirm&&i.option("uploadOverwrite",n)&&t.list&&(Array.isArray(t.list)?r=t.list||[]:(a=[],r=e.map(t.list,function(e){return"string"==typeof e?e:(a=a.concat(e),!1)}),a.length&&(r=r.concat(a)),l=t.list),p=e.grep(o,function(t){return e.inArray(t.name,r)!==-1}),p.length&&r.length&&n==i.cwd().hash&&(s=e.map(i.files(n),function(e){return e.name}),e.grep(r,function(t){return e.inArray(t,s)===-1}).length&&i.sync()))),p.length>0?h(0):d()}).fail(function(e){c(),d(),e&&i.error(e)})):void d()};return i.api>=2.1&&"object"==typeof t[0]?p():d(),r},checkFile:function(t,n,i){if(t.checked||"files"==t.type)return t.files;if("data"==t.type){var a,o,r=e.Deferred(),s=e.Deferred(),l=[],c=[],d=0,p=[],u=!1,h=function(e){return Array.prototype.slice.call(e||[],0)},f=function(e){var t,i,a=n.options.folderUploadExclude[n.OS]||null,o=e.length,r=function(){--d<1&&"pending"===s.state()&&s.resolve()},m=function(e){a&&e.name.match(a)||(c.push(t.fullPath||""),l.push(e)),r()},i=function(e){var t=[],n=function(){e.readEntries(function(e){if(u||!e.length){for(var i=0;i<t.length;i++){if(u){s.reject();break}f([t[i]])}r()}else t=t.concat(h(e)),n()},r)};n()};d++;for(var g=0;g<o;g++){if(u){s.reject();break}t=e[g],t&&(t.isFile?(d++,t.file(m,r)):t.isDirectory&&n.api>=2.1&&(d++,p.push(t.fullPath),i(t.createReader())))}return r(),s};return a=e.map(t.files.items,function(e){return e.getAsEntry?e.getAsEntry():e.webkitGetAsEntry()}),e.each(a,function(e,t){if(t.isDirectory)return o=!0,!1}),a.length>0?(n.uploads.checkExists(a,i,n,o).done(function(o,s){var d=[];n.options.overwriteUploadConfirm&&n.option("uploadOverwrite",i)&&(null===o&&(t.overwrite=0,o=[]),a=e.grep(a,function(t){var a,r,l,c;return t.isDirectory&&o.length&&(a=e.inArray(t.name,o),a!==-1&&(o.splice(a,1),r=n.uniqueName(t.name+n.options.backupSuffix,null,""),e.each(s,function(e,n){if(t.name==n)return l=e,!1}),l||(l=n.fileByName(t.name,i).hash),n.lockfiles({files:[l]}),c=n.request({data:{cmd:"rename",target:l,name:r},notify:{type:"rename",cnt:1}}).fail(function(){t._remove=!0,n.sync()}).always(function(){n.unlockfiles({files:[l]})}),d.push(c))),!t._remove})),e.when.apply(e,d).done(function(){var e,t,i=+new Date;a.length>0?(t=n.escape(a[0].name),a.length>1&&(t+=" ... "+a.length+n.i18n("items")),e=setTimeout(function(){n.notify({type:"readdir",id:i,cnt:1,hideCnt:!0,msg:n.i18n("ntfreaddir")+" ("+t+")",cancel:function(){u=!0}})},n.options.notifyDelay),f(a).done(function(){e&&clearTimeout(e),n.notify({type:"readdir",id:i,cnt:-1}),u?r.reject():r.resolve([l,c,o,s,p])}).fail(function(){r.reject()})):r.reject()})}),r.promise()):r.reject()}var m=[],g=[],v=t.files[0];if("html"==t.type){var b,y=e("<html/>").append(e.parseHTML(v.replace(/ src=/gi," _elfsrc=")));e("img[_elfsrc]",y).each(function(){var n,i,a=e(this),o=a.closest("a");o&&o.attr("href")&&o.attr("href").match(/\.(?:jpe?g|gif|bmp|png)/i)&&(i=o.attr("href")),n=a.attr("_elfsrc"),n&&(i?(e.inArray(i,m)==-1&&m.push(i),e.inArray(n,g)==-1&&g.push(n)):e.inArray(n,m)==-1&&m.push(n)),1===m.length&&m[0].match(/^data:image\/png/)&&(t.clipdata=!0)}),b=e("a[href]",y),b.each(function(){var t,n,i=function(e){var t=document.createElement("a");return t.href=e,t};(t=e(this).text())&&(n=i(e(this).attr("href")),n.href&&n.href.match(/^(?:ht|f)tp/i)&&(1===b.length||!n.pathname.match(/(?:\.html?|\/[^\/.]*)$/i)||e.trim(t).match(/\.[a-z0-9-]{1,10}$/i))&&e.inArray(n.href,m)==-1&&e.inArray(n.href,g)==-1&&m.push(n.href))})}else{var w,x,k;for(w=/((?:ht|f)tps?:\/\/[-_.!~*\'()a-z0-9;\/?:\@&=+\$,%#\*\[\]]+)/gi;x=w.exec(v);)k=x[1].replace(/&amp;/g,"&"),e.inArray(k,m)==-1&&m.push(k)}return m},xhr:function(t,n){var i=n?n:this,a=i.getUI(),o=new XMLHttpRequest,r=null,s=null,l=t.checked,c=t.isDataType||"data"==t.type,d=t.target||i.cwd().hash,p=t.dropEvt||null,u=t.extraData||null,h=i.option("uploadMaxConn",d)!=-1,f=Math.min(5,Math.max(1,i.option("uploadMaxConn",d))),m=1e4,g=30,v=0,b=function(t){var n=e.Deferred();return t.promise?t.always(function(e){n.resolve(Array.isArray(e)&&e.length?c?e[0][0]:e[0]:{})}):n.resolve(t.length?c?t[0][0]:t[0]:{}),n},y=e.Deferred().fail(function(e){var t,a=i.parseError(e);"userabort"===a&&(t=!0,a=void 0),x&&(i.uploads.xhrUploading||t)?b(x).done(function(e){t||P(a,e),e._cid?i.uploads.chunkfailReq[e._cid]||(i.uploads.chunkfailReq[e._cid]=!0,setTimeout(function(){n.request({data:{cmd:"upload",target:d,chunk:e._chunk,cid:e._cid,upload:["chunkfail"],mimes:"chunkfail"},options:{type:"post",url:i.uploadURL},preventDefault:!0}).always(function(){delete i.uploads.chunkfailReq[e._chunk]})},1e3)):(i.uploads.failSyncTm&&clearTimeout(i.uploads.failSyncTm),i.uploads.failSyncTm=setTimeout(function(){i.sync(d)},1e3))}):P(a),!t&&i.sync(),i.uploads.xhrUploading=!1,x=null}).done(function(t){i.uploads.xhrUploading=!1,x=null,t&&(i.currentReqCmd="upload",t.warning&&P(t.warning),i.updateCache(t),t.removed&&t.removed.length&&i.remove(t),t.added&&t.added.length&&i.add(t),t.changed&&t.changed.length&&i.change(t),i.trigger("upload",t,!1),i.trigger("uploaddone"),t.toasts&&Array.isArray(t.toasts)&&e.each(t.toasts,function(){this.msg&&i.toast(this)}),t.sync&&i.sync(),t.debug&&n.debug("backend-debug",t))}).always(function(){i.abortXHR(o),a.off("uploadabort",M),e(window).off("unload",M),r&&clearTimeout(r),s&&clearTimeout(s),l&&!t.multiupload&&j()&&i.notify({type:"upload",cnt:-k,progress:0,size:0}),N&&S.children(".elfinder-notify-chunkmerge").length&&i.notify({type:"chunkmerge",cnt:-1})}),w=new FormData,x=t.input?t.input.files:i.uploads.checkFile(t,i,d),k=t.checked&&c?x[0].length:x.length,C=0,z=0,T=0,A=!1,S=i.ui.notify,I=!0,O=!1,j=function(){return!A&&(L=S.children(".elfinder-notify-upload")).length&&(A=!0),A},M=function(e,t){O=!0,i.abortXHR(o,{quiet:!0,abort:!0}),y.reject(t),j()&&i.notify({type:"upload",cnt:L.data("cnt")*-1,progress:0,size:0})},F=function(e){L.children(".elfinder-notify-cancel")[e?"show":"hide"]()},D=function(e){return e||(e=T),setTimeout(function(){A=!0,i.notify({type:"upload",cnt:k,progress:C-z,size:e,cancel:function(){a.trigger("uploadabort","userabort")}}),L=S.children(".elfinder-notify-upload"),z=C,t.multiupload?I&&F(!0):F(I&&C<e)},i.options.notifyDelay)},E=function(){v++<=g?(j()&&z&&i.notify({type:"upload",cnt:0,progress:0,size:z}),i.abortXHR(o,{quiet:!0}),z=C=0,setTimeout(function(){var e;O||(o.open("POST",i.uploadURL,!0),i.api>=2.1029&&(e=(+new Date).toString(16)+Math.floor(1e3*Math.random()).toString(16),"function"==typeof w["delete"]&&w["delete"]("reqid"),w.append("reqid",e),o._requestId=e),o.send(w))},m)):a.trigger("uploadabort",["errAbort","errTimeout"])},U=function(){A&&y.notifyWith(L,[{cnt:L.data("cnt"),progress:L.data("progress"),total:L.data("total")}])},P=function(e,t,n){e&&i.trigger("xhruploadfail",{error:e,file:t}),n?e&&(q<i.options.maxErrorDialogs&&(Array.isArray(e)?R=R.concat(e):R.push(e)),q++):e?i.error(e):(R.length&&(q>=i.options.maxErrorDialogs&&(R=R.concat("moreErrors",q-i.options.maxErrorDialogs)),i.error(R)),R=[],q=0)},R=[],q=0,H=t.renames||null,_=t.hashes||null,N=!1,L=e();if(a.one("uploadabort",M),e(window).one("unload."+n.namespace,M),!N&&(z=C),!c&&!k)return y.reject(["errUploadNoFiles"]);o.addEventListener("error",function(){0==o.status?O?y.reject():!c&&t.files&&e.grep(t.files,function(e){return!e.type&&e.size===(i.UA.Safari?1802:0)}).length?y.reject(["errAbort","errFolderUpload"]):t.input&&e.grep(t.input.files,function(e){return!e.type&&e.size===(i.UA.Safari?1802:0)}).length?y.reject(["errUploadNoFiles"]):E():a.trigger("uploadabort","errConnect")},!1),o.addEventListener("load",function(e){var n,l,d=o.status,p=0,u="";if(d>=400?u=d>500?"errResponse":["errResponse","errServerError"]:o.responseText||(u=["errResponse","errDataEmpty"]),u&&(a.trigger("uploadabort"),b(x).done(function(e){return y.reject(e._cid?null:u)})),C=T,j()&&(p=C-z)&&(i.notify({type:"upload",cnt:0,progress:p,size:0}),U()),n=i.parseUploadData(o.responseText),n._chunkmerged){w=new FormData;var h=[{_chunkmerged:n._chunkmerged,_name:n._name,_mtime:n._mtime}];return N=!0,a.off("uploadabort",M),s=setTimeout(function(){i.notify({type:"chunkmerge",cnt:1})},i.options.notifyDelay),void(c?W(h,x[1]):W(h))}n._multiupload=!!t.multiupload,n.error?(l={cmd:"upload",err:n,xhr:o,rc:o.status},i.trigger("uploadfail",n),i.trigger("requestError",l),l._event&&l._event.isDefaultPrevented()&&(n.error=""),n._chunkfailure||n._multiupload?(O=!0,i.uploads.xhrUploading=!1,r&&clearTimeout(r),L.length?(i.notify({type:"upload",cnt:-k,progress:0,size:0}),y.reject(n)):y.reject()):y.reject(n)):y.resolve(n)},!1),o.upload.addEventListener("loadstart",function(e){!N&&e.lengthComputable&&(C=e.loaded,v&&(C=0),T=e.total,C||(C=parseInt(.05*T)),j()&&(i.notify({type:"upload",cnt:0,progress:C-z,size:t.multiupload?0:T}),z=C,U()))},!1),o.upload.addEventListener("progress",function(e){var n;e.lengthComputable&&!N&&o.readyState<2&&(C=e.loaded,!t.checked&&C>0&&!r&&(r=D(o._totalSize-C)),T||(T=e.total,C||(C=parseInt(.05*T))),n=C-z,j()&&n/e.total>=.05&&(i.notify({type:"upload",cnt:0,progress:n,size:0}),z=C,U()),!t.multiupload&&C>=T&&(I=!1,F(!1)))},!1);var W=function(a,s){var m,g,v,b,x,C,z,T,A,S,M,E,U,q,N,L=0,W=1,B=[],$=0,K=k,V=0,X=[],J=(new Date).getTime().toString().substr(-9),G=Math.min((n.uplMaxSize?n.uplMaxSize:2097152)-8190,n.options.uploadMaxChunkSize),Y=!h&&"",Q=function(a,o){var s,l,u=[],h=0;if(!O){for(;a.length&&u.length<o;)u.push(a.shift());if(h=u.length){l=h;for(var f=0;f<h&&!O;f++)s=c?u[f][0][0]._cid||null:u[f][0]._cid||null,q[s]?U--:n.exec("upload",{type:t.type,isDataType:c,files:u[f],checked:!0,target:d,dropEvt:p,renames:H,hashes:_,multiupload:!0,overwrite:0===t.overwrite?0:void 0,clipdata:t.clipdata},void 0,d).fail(function(e){e&&"No such command"===e&&(O=!0,n.error(["errUpload","errPerm"])),s&&(q[s]=!0)}).always(function(t){t&&t.added&&(M=e.merge(M,t.added)),U<=++E&&(n.trigger("multiupload",{added:M}),r&&clearTimeout(r),j()&&i.notify({type:"upload",cnt:-k,progress:0,size:0})),a.length?Q(a,1):--l<=1&&(I=!1,F(!1))})}}(u.length<1||O)&&(O?(r&&clearTimeout(r),s&&(q[s]=!0),y.reject()):(y.resolve(),i.uploads.xhrUploading=!1))},Z=function(){i.uploads.xhrUploading?setTimeout(Z,100):(i.uploads.xhrUploading=!0,Q(B,f))};if(!l&&(c||"files"==t.type)){for((m=n.option("uploadMaxSize",d))||(m=0),x=0;x<a.length;x++){try{A=a[x],g=A.size,Y===!1&&(Y="",i.api>=2.1&&("slice"in A?Y="slice":"mozSlice"in A?Y="mozSlice":"webkitSlice"in A&&(Y="webkitSlice")))}catch(ee){k--,K--;continue}if(m&&g>m||!Y&&n.uplMaxSize&&g>n.uplMaxSize)P(["errUploadFile",A.name,"errUploadFileSize"],A,!0),k--,K--;else if(!A.type||i.uploadMimeCheck(A.type,d))if(Y&&g>G){for(C=0,z=G,T=-1,K=Math.floor((g-1)/G),v=A.lastModified?Math.round(A.lastModified/1e3):0,b=t.clipdata?n.date(n.nonameDateFormat)+".png":A.name,V+=g,X[J]=0;C<g;)S=A[Y](C,z),S._chunk=b+"."+ ++T+"_"+K+".part",S._cid=J,S._range=C+","+S.size+","+g,S._mtime=v,X[J]++,L&&$++,"undefined"==typeof B[$]&&(B[$]=[],c&&(B[$][0]=[],B[$][1]=[])),L=G,W=1,c?(B[$][0].push(S),B[$][1].push(s[x])):B[$].push(S),C=z,z=C+G;null==S?(P(["errUploadFile",A.name,"errUploadFileSize"],A,!0),k--,K--):(K+=T,L=0,W=1,$++)}else(n.uplMaxSize&&L+g>n.uplMaxSize||W>n.uplMaxFile)&&(L=0,W=1,$++),"undefined"==typeof B[$]&&(B[$]=[],c&&(B[$][0]=[],B[$][1]=[])),c?(B[$][0].push(A),B[$][1].push(s[x])):B[$].push(A),L+=g,V+=g,W++;else P(["errUploadFile",A.name,"errUploadMime","("+A.type+")"],A,!0),k--,K--}if(R.length&&P(),0==B.length)return t.checked=!0,!1;if(B.length>1)return r=D(V),M=[],E=0,U=B.length,q=[],Z(),!0;c?(a=B[0][0],s=B[0][1]):a=B[0]}return l||(n.UA.Safari&&t.files?o._totalSize=V:r=D(V)),l=!0,a.length||y.reject(["errUploadNoFiles"]),o.open("POST",i.uploadURL,!0),n.customHeaders&&e.each(n.customHeaders,function(e){o.setRequestHeader(e,this)}),n.xhrFields&&e.each(n.xhrFields,function(e){e in o&&(o[e]=this)}),i.api>=2.1029&&(N=(+new Date).toString(16)+Math.floor(1e3*Math.random()).toString(16),w.append("reqid",N),o._requestId=N),w.append("cmd","upload"),w.append(i.newAPI?"target":"current",d),H&&H.length&&(e.each(H,function(e,t){w.append("renames[]",t)}),w.append("suffix",n.options.backupSuffix)),_&&e.each(_,function(e,t){w.append("hashes["+e+"]",t)}),e.each(i.customData,function(e,t){w.append(e,t)}),e.each(i.options.onlyMimes,function(e,t){w.append("mimes[]",t)}),e.each(a,function(e,i){var a;i._chunkmerged?(w.append("chunk",i._chunkmerged),w.append("upload[]",i._name),w.append("mtime[]",i._mtime),t.clipdata&&w.append("overwrite",0)):(i._chunkfail?(w.append("upload[]","chunkfail"),w.append("mimes","chunkfail")):(t.clipdata?i._chunk||(t.overwrite=0,a=n.date(n.nonameDateFormat)+".png"):i.name&&(a=i.name,n.UA.iOS&&(a.match(/^image\.jpe?g$/i)?(t.overwrite=0,a=n.date(n.nonameDateFormat)+".jpg"):a.match(/^capturedvideo\.mov$/i)&&(t.overwrite=0,a=n.date(n.nonameDateFormat)+".mov"))),a?w.append("upload[]",i,a):w.append("upload[]",i)),i._chunk?(w.append("chunk",i._chunk),w.append("cid",i._cid),w.append("range",i._range),w.append("mtime[]",i._mtime)):w.append("mtime[]",i.lastModified?Math.round(i.lastModified/1e3):0))}),c&&e.each(s,function(e,t){w.append("upload_path[]",t)}),0===t.overwrite&&w.append("overwrite",0),p&&w.append("dropWith",parseInt((p.altKey?"1":"0")+(p.ctrlKey?"1":"0")+(p.metaKey?"1":"0")+(p.shiftKey?"1":"0"),2)),u&&e.each(u,function(e,t){w.append(e,t)}),o.send(w),!0};if(c)l?W(x[0],x[1]):x.done(function(t){if(H=[],k=t[0].length){if(t[4]&&t[4].length)return void n.request({data:{cmd:"mkdir",target:d,dirs:t[4]},notify:{type:"mkdir",cnt:t[4].length},preventFail:!0}).fail(function(e){e=e||["errUnknown"],"errCmdParams"===e[0]?f=1:(f=0,y.reject(e))}).done(function(n){var i=!1;n.hashes||(n.hashes={}),t[1]=e.map(t[1],function(e,a){return e=e.replace(/\/[^\/]*$/,""),""===e?d:n.hashes[e]?n.hashes[e]:(i=!0,t[0][a]._remove=!0,null)}),i&&(t[0]=e.grep(t[0],function(e){return!e._remove}))}).always(function(e){f&&(H=t[2],_=t[3],W(t[0],t[1]))});t[1]=e.map(t[1],function(){return d}),H=t[2],_=t[3],W(t[0],t[1])}else y.reject(["errUploadNoFiles"])}).fail(function(){y.reject()});else if(x.length>0)if(t.clipdata||null!=H)W(x)||y.reject();else{var B=[],$=[],K=n.options.folderUploadExclude[n.OS]||null;e.each(x,function(t,n){var i,a,o=n.webkitRelativePath||n.relativePath||"";return!!o&&(K&&n.name.match(K)?(n._remove=!0,o=void 0):(o="/"+o.replace(/\/[^\/]*$/,"").replace(/^\//,""),o&&e.inArray(o,B)===-1&&(B.push(o),i=o.substr(1).indexOf("/"),i!==-1&&(a=o.substr(0,i+1))&&e.inArray(a,B)===-1&&B.unshift(a))),void $.push(o))}),H=[],_={},B.length?!function(){var t=e.map(B,function(e){return e.substr(1).indexOf("/")===-1?{name:e.substr(1)}:null}),i=[];n.uploads.checkExists(t,d,n,!0).done(function(a,o){var r,s,l,p=[];n.options.overwriteUploadConfirm&&n.option("uploadOverwrite",d)&&(i=e.map(t,function(e){return e._remove?e.name:null}),t=e.grep(t,function(e){return!e._remove})),i.length&&e.each($.concat(),function(t,n){0===e.inArray(n,i)&&(x[t]._remove=!0,$[t]=void 0)}),x=e.grep(x,function(e){return!e._remove}),$=e.grep($,function(e){return void 0!==e}),t.length?(r=e.Deferred(),a.length?e.each(a,function(t,i){s=n.uniqueName(i+n.options.backupSuffix,null,""),e.each(o,function(e,t){if(a[0]==t)return l=e,!1}),l||(l=n.fileByName(a[0],d).hash),n.lockfiles({files:[l]}),p.push(n.request({data:{cmd:"rename",target:l,name:s},notify:{type:"rename",cnt:1}}).fail(function(e){y.reject(e),n.sync()}).always(function(){n.unlockfiles({files:[l]})}))}):p.push(null),e.when.apply(e,p).done(function(){n.request({data:{cmd:"mkdir",target:d,dirs:B},notify:{type:"mkdir",cnt:B.length},preventFail:!0}).fail(function(e){e=e||["errUnknown"],"errCmdParams"===e[0]?f=1:(f=0,y.reject(e))}).done(function(t){var n=!1;t.hashes||(t.hashes={}),$=e.map($.concat(),function(e,i){return"/"===e?d:t.hashes[e]?t.hashes[e]:(n=!0,x[i]._remove=!0,null)}),n&&(x=e.grep(x,function(e){return!e._remove}))}).always(function(e){f&&(c=!0,W(x,$)||y.reject())})})):y.reject()})}():n.uploads.checkExists(x,d,n).done(function(i,a){n.options.overwriteUploadConfirm&&n.option("uploadOverwrite",d)&&(_=a,null===i?t.overwrite=0:H=i,x=e.grep(x,function(e){return!e._remove})),k=x.length,k>0?W(x)||y.reject():y.reject()})}else y.reject();return y},iframe:function(t,n){var i,a,o,r,s=n?n:this,l=!!t.input&&t.input,c=!l&&s.uploads.checkFile(t,s),d=e.Deferred().fail(function(e){e&&s.error(e)}),p="iframe-"+n.namespace+ ++s.iframeCnt,u=e('<form action="'+s.uploadURL+'" method="post" enctype="multipart/form-data" encoding="multipart/form-data" target="'+p+'" style="display:none"><input type="hidden" name="cmd" value="upload" /></form>'),h=this.UA.IE,f=function(){r&&clearTimeout(r),o&&clearTimeout(o),a&&s.notify({type:"upload",cnt:-i}),setTimeout(function(){h&&e('<iframe src="javascript:false;"/>').appendTo(u),u.remove(),m.remove()},100)},m=e('<iframe src="'+(h?"javascript:false;":"about:blank")+'" name="'+p+'" style="position:absolute;left:-1000px;top:-1000px" />').on("load",function(){m.off("load").on("load",function(){f(),d.resolve()}),o=setTimeout(function(){a=!0,s.notify({type:"upload",cnt:i})},s.options.notifyDelay),s.options.iframeTimeout>0&&(r=setTimeout(function(){f(),d.reject(["errConnect","errTimeout"])},s.options.iframeTimeout)),u.submit()}),g=t.target||s.cwd().hash,v=[],b=[],y=[],w={};if(c&&c.length)e.each(c,function(e,t){u.append('<input type="hidden" name="upload[]" value="'+t+'"/>')}),i=1;else{if(!(l&&e(l).is(":file")&&e(l).val()))return d.reject();n.options.overwriteUploadConfirm&&n.option("uploadOverwrite",g)&&(v=l.files?l.files:[{name:e(l).val().replace(/^(?:.+[\\\/])?([^\\\/]+)$/,"$1")}],b.push(s.uploads.checkExists(v,g,s).done(function(n,a){w=a,null===n?t.overwrite=0:(y=n,i=e.grep(v,function(e){return!e._remove}).length,i!=v.length&&(i=0))}))),i=l.files?l.files.length:1,u.append(l)}return e.when.apply(e,b).done(function(){return i<1?d.reject():(u.append('<input type="hidden" name="'+(s.newAPI?"target":"current")+'" value="'+g+'"/>').append('<input type="hidden" name="html" value="1"/>').append('<input type="hidden" name="node" value="'+s.id+'"/>').append(e(l).attr("name","upload[]")),y.length>0&&(e.each(y,function(e,t){u.append('<input type="hidden" name="renames[]" value="'+s.escape(t)+'"/>')}),u.append('<input type="hidden" name="suffix" value="'+n.options.backupSuffix+'"/>')),w&&e.each(y,function(e,t){u.append('<input type="hidden" name="['+e+']" value="'+s.escape(t)+'"/>')}),0===t.overwrite&&u.append('<input type="hidden" name="overwrite" value="0"/>'),e.each(s.options.onlyMimes||[],function(e,t){u.append('<input type="hidden" name="mimes[]" value="'+s.escape(t)+'"/>')}),e.each(s.customData,function(e,t){u.append('<input type="hidden" name="'+e+'" value="'+s.escape(t)+'"/>')}),u.appendTo("body"),void m.appendTo("body"))}),d}},one:function(e,t,n){var i=this,a=e.toLowerCase(),o=function(e,n){return i.toUnbindEvents[a]||(i.toUnbindEvents[a]=[]),i.toUnbindEvents[a].push({type:a,callback:o}),(t.done?t.done:t).apply(this,arguments)};return t.done&&(o={done:o}),this.bind(a,o,n)},localStorage:function(t,n){var i,a,o,r,s,l=this,c=window.localStorage,d="elfinder-"+(t||"")+this.id,p=window.location.pathname+"-elfinder-",u=this.id,h=[];if("undefined"==typeof t)return r=p.length,s=u.length*-1,e.each(c,function(e){e.substr(0,r)===p&&e.substr(s)===u&&h.push(e)}),e.each(h,function(e,t){c.removeItem(t)}),!0;if(t=p+t+u,null===n)return c.removeItem(t);if(void 0===n&&!(i=c.getItem(t))&&(a=c.getItem(d))&&(n=a,c.removeItem(d)),void 0!==n){o=typeof n,"string"!==o&&"number"!==o&&(n=JSON.stringify(n));try{c.setItem(t,n)}catch(f){try{c.clear(),c.setItem(t,n)}catch(f){l.debug("error",f.toString())}}i=c.getItem(t)}if(i&&("{"===i.substr(0,1)||"["===i.substr(0,1)))try{return JSON.parse(i)}catch(f){}return i},cookie:function(t,n){var i,a,o,r,s,l;if(t="elfinder-"+t+this.id,void 0===n){if(document.cookie&&""!=document.cookie)for(o=document.cookie.split(";"),t+="=",r=0;r<o.length;r++)if(o[r]=e.trim(o[r]),o[r].substring(0,t.length)==t){if(s=decodeURIComponent(o[r].substring(t.length)),"{"===s.substr(0,1)||"["===s.substr(0,1))try{return JSON.parse(s)}catch(c){}return s}return null}if(a=Object.assign({},this.options.cookie),null===n?(n="",a.expires=-1):(l=typeof n,"string"!==l&&"number"!==l&&(n=JSON.stringify(n))),"number"==typeof a.expires&&(i=new Date,i.setTime(i.getTime()+864e5*a.expires),a.expires=i),document.cookie=t+"="+encodeURIComponent(n)+"; expires="+a.expires.toUTCString()+(a.path?"; path="+a.path:"")+(a.domain?"; domain="+a.domain:"")+(a.secure?"; secure":""),n&&("{"===n.substr(0,1)||"["===n.substr(0,1)))try{return JSON.parse(n)}catch(c){}return n},startDir:function(){var e=window.location.hash;return e&&e.match(/^#elf_/)?e.replace(/^#elf_/,""):this.options.startPathHash?this.options.startPathHash:this.lastDir()},lastDir:function(e){return this.options.rememberLastDir?this.storage("lastdir",e):""},_node:e("<span/>"),escape:function(e){return this._node.text(e).html().replace(/"/g,"&quot;").replace(/'/g,"&#039;")},normalize:function(t){var n,i,a,o,r,s=this,l=function(){var e,t;return(t=s.options.fileFilter)&&("function"==typeof t?e=function(e){return t.call(s,e)}:t instanceof RegExp&&(e=function(e){return t.test(e.name)})),e?e:null}(),c=function(t){var n;t.uiCmdMap&&(e.isPlainObject(t.uiCmdMap)&&Object.keys(t.uiCmdMap).length?(t.disabledFlip||(t.disabledFlip={}),
12
- n=t.disabledFlip,e.each(t.uiCmdMap,function(e,i){"hidden"!==i||n[e]||(t.disabled.push(e),t.disabledFlip[e]=!0)})):delete t.uiCmdMap)},d=function(t){var n=function(e){var t=typeof e;return"object"===t&&Array.isArray(e)&&(t="array"),t};return e.each(s.optionProperties,function(e,i){void 0!==i&&t[e]&&n(t[e])!==n(i)&&(t[e]=i)}),t.disabled?t.disabledFlip=s.arrayFlip(t.disabled,!0):t.disabledFlip={},t},p=function(t,r,p){var u,h,m,g,v=!r||t,b=!!r&&null;if(t&&t.hash&&t.name&&t.mime){if("application/x-empty"===t.mime&&(t.mime="text/plain"),m=s.isRoot(t),m&&!t.volumeid&&s.debug("warning","The volume root statuses requires `volumeid` property."),m||"directory"===t.mime){if(t.phash){if(t.phash===t.hash)return f=f.concat(['Parent folder of "$1" is itself.',t.name]),b;if(m&&t.volumeid&&0===t.phash.indexOf(t.volumeid))return f=f.concat(['Parent folder of "$1" is inner itself.',t.name]),b}t.volumeid&&(u=t.volumeid,m&&(t.phash&&(s.leafRoots[t.phash]?e.inArray(t.hash,s.leafRoots[t.phash])===-1&&s.leafRoots[t.phash].push(t.hash):s.leafRoots[t.phash]=[t.hash]),s.hasVolOptions=!0,s.volOptions[u]||(s.volOptions[u]={dispInlineRegex:s.options.dispInlineRegex}),h=s.volOptions[u],t.options&&Object.assign(h,t.options),t.disabled&&(h.disabled=t.disabled,h.disabledFlip=s.arrayFlip(t.disabled,!0)),t.tmbUrl&&(h.tmbUrl=t.tmbUrl),h.url&&"/"!==h.url.substr(-1)&&(h.url+="/"),c(h),h.trashHash&&(s.trashes[h.trashHash]===!1?delete h.trashHash:s.trashes[h.trashHash]=t.hash),e.each(s.optionProperties,function(e){h[e]&&(t[e]=h[e])}),"cwd"!==p&&(s.roots[u]=t.hash),t.expires&&(s.volumeExpires[u]=t.expires)),o!==u&&(o=u,a=s.option("i18nFolderName",u))),m&&!t.i18&&(n="volume_"+t.name,i=s.i18n(!1,n),n!==i&&(t.i18=i)),a&&!t.i18&&(n="folder_"+t.name,i=s.i18n(!1,n),n!==i&&(t.i18=i)),m&&(g=s.storage("rootNames"))&&(g[t.hash]&&(t._name=t.name,t._i18=t.i18,t.name=g[t.hash]=g[t.hash],delete t.i18),s.storage("rootNames",g)),s.trashes[t.hash]&&(t.locked=!0)}else{if(l)try{if(!l(t))return b}catch(y){s.debug(y)}0==t.size&&(t.mime=s.getMimetype(t.name,t.mime))}return t.options&&(s.optionsByHashes[t.hash]=d(t.options)),delete t.options,v}return b},u=function(t){var n=[];return e.each(s.files(),function(i,a){e.each(s.parents(i),function(a,o){if(e.inArray(o,t)!==-1&&e.inArray(i,t)===-1)return n.push(i),!1})}),n},h=function(n,i){e.each(n,function(n,a){var o,r;s.leafRoots[a.hash]&&s.applyLeafRootStats(a),"change"!==i&&a.phash&&s.isRoot(a)&&(o=s.file(a.phash))&&(s.applyLeafRootStats(o),t.changed?(e.each(t.changed,function(e,n){if(n.hash===o.hash)return t.changed[e]=o,r=!0,!1}),r||t.changed.push(o)):t.changed=[o])})},f=[];if(t.customData&&t.customData!==s.prevCustomData){s.prevCustomData=t.customData;try{r=JSON.parse(t.customData),e.isPlainObject(r)&&(s.prevCustomData=r,e.each(Object.keys(r),function(e,t){null===r[t]&&(delete r[t],delete s.optsCustomData[t])}),s.customData=Object.assign({},s.optsCustomData,r))}catch(m){}}return t.options&&d(t.options),t.cwd&&(t.cwd.volumeid&&t.options&&Object.keys(t.options).length&&s.isRoot(t.cwd)&&(s.hasVolOptions=!0,s.volOptions[t.cwd.volumeid]=t.options),t.cwd=p(t.cwd,!0,"cwd")),t.files&&(t.files=e.grep(t.files,p)),t.tree&&(t.tree=e.grep(t.tree,p)),t.added&&(t.added=e.grep(t.added,p)),t.changed&&(t.changed=e.grep(t.changed,p)),t.removed&&t.removed.length&&2===s.searchStatus.state&&(t.removed=t.removed.concat(u(t.removed))),t.api&&(t.init=!0),Object.keys(s.leafRoots).length&&(t.files&&h(t.files),t.tree&&h(t.tree),t.added&&h(t.added),t.changed&&h(t.changed,"change")),t.cwd&&t.cwd.options&&t.options&&Object.assign(t.options,d(t.cwd.options)),t.options&&t.options.url&&"/"!==t.options.url.substr(-1)&&(t.options.url+="/"),f.length&&(t.norError=["errResponse"].concat(f)),t},setSort:function(e,t,n,i){this.storage("sortType",this.sortType=this.sortRules[e]?e:"name"),this.storage("sortOrder",this.sortOrder=/asc|desc/.test(t)?t:"asc"),this.storage("sortStickFolders",(this.sortStickFolders=!!n)?1:""),this.storage("sortAlsoTreeview",(this.sortAlsoTreeview=!!i)?1:""),this.trigger("sortchange")},_sortRules:{name:function(e,t){return i.prototype.naturalCompare(e.i18||e.name,t.i18||t.name)},size:function(e,t){var n=parseInt(e.size)||0,i=parseInt(t.size)||0;return n===i?0:n>i?1:-1},kind:function(e,t){return i.prototype.naturalCompare(e.mime,t.mime)},date:function(e,t){var n=e.ts||e.date||0,i=t.ts||t.date||0;return n===i?0:n>i?1:-1},perm:function(e,t){var n=function(e){return(e.write?2:0)+(e.read?1:0)},i=n(e),a=n(t);return i===a?0:i>a?1:-1},mode:function(e,t){var n=e.mode||e.perm||"",a=t.mode||t.perm||"";return i.prototype.naturalCompare(n,a)},owner:function(e,t){var n=e.owner||"",a=t.owner||"";return i.prototype.naturalCompare(n,a)},group:function(e,t){var n=e.group||"",a=t.group||"";return i.prototype.naturalCompare(n,a)}},sorters:{},naturalCompare:function(e,t){var n=i.prototype.naturalCompare;return"undefined"==typeof n.loc&&(n.loc=navigator.userLanguage||navigator.browserLanguage||navigator.language||"en-US"),"undefined"==typeof n.sort&&("11".localeCompare("2",n.loc,{numeric:!0})>0?window.Intl&&window.Intl.Collator?n.sort=new Intl.Collator(n.loc,{numeric:!0}).compare:n.sort=function(e,t){return e.localeCompare(t,n.loc,{numeric:!0})}:(n.sort=function(e,t){var i,a,o=/(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,r=/(^[ ]*|[ ]*$)/g,s=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,l=/^0x[0-9a-f]+$/i,c=/^0/,d=/^[\x01\x21-\x2f\x3a-\x40\x5b-\x60\x7b-\x7e]/,p=function(e){return n.sort.insensitive&&(""+e).toLowerCase()||""+e},u=p(e).replace(r,"").replace(/^_/,"")||"",h=p(t).replace(r,"").replace(/^_/,"")||"",f=u.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=h.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),g=parseInt(u.match(l))||1!=f.length&&u.match(s)&&Date.parse(u),v=parseInt(h.match(l))||g&&h.match(s)&&Date.parse(h)||null,b=0;if(v){if(g<v)return-1;if(g>v)return 1}for(var y=0,w=Math.max(f.length,m.length);y<w;y++){if(i=!(f[y]||"").match(c)&&parseFloat(f[y])||f[y]||0,a=!(m[y]||"").match(c)&&parseFloat(m[y])||m[y]||0,isNaN(i)!==isNaN(a)){if(isNaN(i)&&("string"!=typeof i||!i.match(d)))return 1;if("string"!=typeof a||!a.match(d))return-1}if(0===parseInt(i,10)&&(i=0),0===parseInt(a,10)&&(a=0),typeof i!=typeof a&&(i+="",a+=""),n.sort.insensitive&&"string"==typeof i&&"string"==typeof a&&(b=i.localeCompare(a,n.loc),0!==b))return b;if(i<a)return-1;if(i>a)return 1}return 0},n.sort.insensitive=!0)),n.sort(e,t)},compare:function(e,t){var n,i=this,a=i.sortType,o="asc"==i.sortOrder,r=i.sortStickFolders,s=i.sortRules,l=s[a],c="directory"==e.mime,d="directory"==t.mime;if(r){if(c&&!d)return-1;if(!c&&d)return 1}return n=o?l(e,t):l(t,e),"name"!==a&&0===n?n=o?s.name(e,t):s.name(t,e):n},sortFiles:function(e){return e.sort(this.compare)},notify:function(t){var n,i,a,o=t.type,r=t.id?"elfinder-notify-"+t.id:"",s=this.i18n("undefined"!=typeof t.msg?t.msg:this.messages["ntf"+o]?"ntf"+o:"ntfsmth"),l=this.ui.notify,c=l.children(".elfinder-notify-"+o+(r?"."+r:"")),d=c.children("div.elfinder-notify-cancel").children("button"),p='<div class="elfinder-notify elfinder-notify-{type}'+(r?" "+r:"")+'"><span class="elfinder-dialog-icon elfinder-dialog-icon-{type}"/><span class="elfinder-notify-msg">{msg}</span> <span class="elfinder-notify-cnt"/><div class="elfinder-notify-progressbar"><div class="elfinder-notify-progress"/></div><div class="elfinder-notify-cancel"/></div>',u=t.cnt,h="undefined"!=typeof t.size?parseInt(t.size):null,f="undefined"!=typeof t.progress&&t.progress>=0?t.progress:null,m=t.cancel,g="ui-state-hover",v=function(){c._esc&&e(document).off("keydown",c._esc),c.remove(),!l.children().length&&l.elfinderdialog("close")};return o?(c.length?"undefined"!=typeof t.msg&&c.children("span.elfinder-notify-msg").html(s):(c=e(p.replace(/\{type\}/g,o).replace(/\{msg\}/g,s)).appendTo(l).data("cnt",0),null!=f&&c.data({progress:0,total:0}),m&&(d=e('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"><span class="ui-button-text">'+this.i18n("btnCancel")+"</span></button>").on("mouseenter mouseleave",function(t){e(this).toggleClass(g,"mouseenter"===t.type)}),c.children("div.elfinder-notify-cancel").append(d))),n=u+parseInt(c.data("cnt")),n>0?(m&&d.length&&(e.isFunction(m)||"object"==typeof m&&m.promise)&&(c._esc=function(t){"keydown"==t.type&&t.keyCode!=e.ui.keyCode.ESCAPE||(t.preventDefault(),t.stopPropagation(),v(),m.promise?m.reject(0):m(t))},d.on("click",function(e){c._esc(e)}),e(document).on("keydown."+this.namespace,c._esc)),!t.hideCnt&&c.children(".elfinder-notify-cnt").text("("+n+")"),l.is(":hidden")&&l.elfinderdialog("open",this).height("auto"),c.data("cnt",n),null!=f&&(i=c.data("total"))>=0&&(a=c.data("progress"))>=0&&(i+=null!=h?h:u,a+=f,null==h&&u<0&&(a+=100*u),c.data({progress:a,total:i}),null!=h&&(a*=100,i=Math.max(1,i)),f=parseInt(a/i),c.find(".elfinder-notify-progress").animate({width:(f<100?f:100)+"%"},20))):v(),this):this},confirm:function(t){var n,i,a=this,o=!1,r={cssClass:"elfinder-dialog-confirm",modal:!0,resizable:!1,title:this.i18n(t.title||"confirmReq"),buttons:{},close:function(){!o&&t.cancel.callback(),e(this).elfinderdialog("destroy")}},s=this.i18n("apllyAll");return t.cssClass&&(r.cssClass+=" "+t.cssClass),r.buttons[this.i18n(t.accept.label)]=function(){t.accept.callback(!(!n||!n.prop("checked"))),o=!0,e(this).elfinderdialog("close")},r.buttons[this.i18n(t.accept.label)]._cssClass="elfinder-confirm-accept",t.reject&&(r.buttons[this.i18n(t.reject.label)]=function(){t.reject.callback(!(!n||!n.prop("checked"))),o=!0,e(this).elfinderdialog("close")},r.buttons[this.i18n(t.reject.label)]._cssClass="elfinder-confirm-reject"),t.buttons&&t.buttons.length>0&&(i=1,e.each(t.buttons,function(t,s){r.buttons[a.i18n(s.label)]=function(){s.callback(!(!n||!n.prop("checked"))),o=!0,e(this).elfinderdialog("close")},r.buttons[a.i18n(s.label)]._cssClass="elfinder-confirm-extbtn"+i++,s.cssClass&&(r.buttons[a.i18n(s.label)]._cssClass+=" "+s.cssClass)})),r.buttons[this.i18n(t.cancel.label)]=function(){e(this).elfinderdialog("close")},r.buttons[this.i18n(t.cancel.label)]._cssClass="elfinder-confirm-cancel",t.all&&(r.create=function(){var t=e('<div class="elfinder-dialog-confirm-applyall"/>');n=e('<input type="checkbox" />'),e(this).next().find(".ui-dialog-buttonset").prepend(t.append(e("<label>"+s+"</label>").prepend(n)))}),t.optionsCallback&&e.isFunction(t.optionsCallback)&&t.optionsCallback(r),this.dialog('<span class="elfinder-dialog-icon elfinder-dialog-icon-confirm"/>'+this.i18n(t.text),r)},uniqueName:function(e,t,n){var i,a,o=0,r="";if(e=this.i18n(!1,e),t=t||this.cwd().hash,n="undefined"==typeof n?" ":n,(i=e.match(/^(.+)(\.[^.]+)$/))&&(r=i[2],e=i[1]),a=e+r,!this.fileByName(a,t))return a;for(;o<1e4;)if(a=e+n+ ++o+r,!this.fileByName(a,t))return a;return e+Math.random()+r},i18n:function(){var t,n,i,a,o,r=this,s=this.messages,l=[],c=[],d=function(e){var t;return 0===e.indexOf("#")&&(t=r.file(e.substr(1)))?t.name:e},p=0;for(arguments.length&&arguments[0]===!1&&(a=function(e){return e},p=1),t=p;t<arguments.length;t++)if(i=arguments[t],Array.isArray(i))for(n=0;n<i.length;n++)i[n]instanceof jQuery?l.push(i[n]):"undefined"!=typeof i[n]&&l.push(d(""+i[n]));else i instanceof jQuery?l.push(i[n]):"undefined"!=typeof i&&l.push(d(""+i));for(t=0;t<l.length;t++)e.inArray(t,c)===-1&&(i=l[t],"string"==typeof i?(o=!(!s[i]||!i.match(/^err/)),i=s[i]||(a?a(i):r.escape(i)),i=i.replace(/\$(\d+)/g,function(e,n){var i;return n=t+parseInt(n),n>0&&l[n]&&c.push(n),i=a?a(l[n]):r.escape(l[n]),o&&(i='<span class="elfinder-err-var elfinder-err-var'+n+'">'+i+"</span>"),i})):i=i.get(0).outerHTML,l[t]=i);return e.grep(l,function(t,n){return e.inArray(n,c)===-1}).join("<br>")},getIconStyle:function(t,n){var i=this,a={background:"url('{url}') 0 0 no-repeat","background-size":"contain"},o="",r={},s=0;return t.icon&&(o='style="',e.each(a,function(e,a){0===s++&&(a=a.replace("{url}",i.escape(t.icon))),n?r[e]=a:o+=e+":"+a+";"}),o+='"'),n?r:o},mime2class:function(e){var t="elfinder-cwd-icon-",n=e.toLowerCase(),i=this.textMimes[n];return n=n.split("/"),i?n[0]+=" "+t+"text":n[1]&&n[1].match(/\+xml$/)&&(n[0]+=" "+t+"xml"),t+n[0]+(n[1]?" "+t+n[1].replace(/(\.|\+)/g,"-"):"")},mime2kind:function(e){var t,n="object"==typeof e,i=n?e.mime:e;return n&&e.alias&&"symlink-broken"!=i?t="Alias":this.kinds[i]&&(t=!n||"directory"!==i||e.phash&&!e.isroot?this.kinds[i]:"Root"),t||(t=0===i.indexOf("text")?"Text":0===i.indexOf("image")?"Image":0===i.indexOf("audio")?"Audio":0===i.indexOf("video")?"Video":0===i.indexOf("application")?"App":i),this.messages["kind"+t]?this.i18n("kind"+t):i},mimeIsText:function(e){return!!(this.textMimes[e.toLowerCase()]||0===e.indexOf("text/")&&"rtf"!==e.substr(5,3)||e.match(/^application\/.+\+xml$/))},date:function(e,t){var n,i,a,o,r,s,l,c,d,p=this;return t||(t=new Date),s=t[p.getHours](),l=s>12?s-12:s,c=t[p.getMinutes](),d=t[p.getSeconds](),i=t[p.getDate](),a=t[p.getDay](),o=t[p.getMonth]()+1,r=t[p.getFullYear](),n=e.replace(/[a-z]/gi,function(e){switch(e){case"d":return i>9?i:"0"+i;case"j":return i;case"D":return p.i18n(p.i18.daysShort[a]);case"l":return p.i18n(p.i18.days[a]);case"m":return o>9?o:"0"+o;case"n":return o;case"M":return p.i18n(p.i18.monthsShort[o-1]);case"F":return p.i18n(p.i18.months[o-1]);case"Y":return r;case"y":return(""+r).substr(2);case"H":return s>9?s:"0"+s;case"G":return s;case"g":return l;case"h":return l>9?l:"0"+l;case"a":return s>=12?"pm":"am";case"A":return s>=12?"PM":"AM";case"i":return c>9?c:"0"+c;case"s":return d>9?d:"0"+d}return e})},formatDate:function(e,t){var n,i,a,o=this,r=t||e.ts;o.i18;return o.options.clientFormatDate&&r>0?(n=new Date(1e3*r),i=r>=this.yesterday?this.fancyFormat:this.dateFormat,a=o.date(i,n),r>=this.yesterday?a.replace("$1",this.i18n(r>=this.today?"Today":"Yesterday")):a):e.date?e.date.replace(/([a-z]+)\s/i,function(e,t){return o.i18n(t)+" "}):o.i18n("dateUnknown")},toLocaleString:function(e){var t=new Number(e);return t?t.toLocaleString?t.toLocaleString():String(e).replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"):e},perms2class:function(e){var t="";return e.read||e.write?e.read?e.write||(t="elfinder-ro"):t="elfinder-wo":t="elfinder-na",e.type&&(t+=" elfinder-"+this.escape(e.type)),t},formatPermissions:function(e){var t=[];return e.read&&t.push(this.i18n("read")),e.write&&t.push(this.i18n("write")),t.length?t.join(" "+this.i18n("and")+" "):this.i18n("noaccess")},formatSize:function(e){var t=1,n="b";return"unknown"==e?this.i18n("unknown"):(e>1073741824?(t=1073741824,n="GB"):e>1048576?(t=1048576,n="MB"):e>1024&&(t=1024,n="KB"),e/=t,(e>0?t>=1048576?e.toFixed(2):Math.round(e):0)+" "+n)},formatFileMode:function(t,n){var i,a,o,r,s,l,c,d,p;if(n||(n=this.options.fileModeStyle.toLowerCase()),t=e.trim(t),t.match(/[rwxs-]{9}$/i)){if(d=t=t.substr(-9),"string"==n)return d;for(p="",o=0,i=0;i<7;i+=3)a=t.substr(i,3),r=0,a.match(/[r]/i)&&(r+=4),a.match(/[w]/i)&&(r+=2),a.match(/[xs]/i)&&(a.match(/[xs]/)&&(r+=1),a.match(/[s]/i)&&(0==i?o+=4:3==i&&(o+=2))),p+=r.toString(8);o&&(p=o.toString(8)+p)}else{if(t=parseInt(t,8),p=t?t.toString(8):"",!t||"octal"==n)return p;for(a=t.toString(8),o=0,a.length>3&&(a=a.substr(-4),o=parseInt(a.substr(0,1),8),a=a.substr(1)),s=1==(1&o),c=2==(2&o),l=4==(4&o),d="",i=0;i<3;i++)d+=4==(4&parseInt(a.substr(i,1),8))?"r":"-",d+=2==(2&parseInt(a.substr(i,1),8))?"w":"-",d+=1==(1&parseInt(a.substr(i,1),8))?0==i&&l||1==i&&c?"s":"x":"-"}return"both"==n?d+" ("+p+")":"string"==n?d:p},registRawStringDecoder:function(t){e.isFunction(t)&&(this.decodeRawString=this.options.rawStringDecoder=t)},uploadMimeCheck:function(t,n){n=n||this.cwd().hash;var i,a,o=!0,r=this.option("uploadMime",n),s=function(n){var i=!1;return"string"==typeof n&&"all"===n.toLowerCase()?i=!0:Array.isArray(n)&&n.length&&e.each(n,function(e,n){if(n=n.toLowerCase(),"all"===n||0===t.indexOf(n))return i=!0,!1}),i};return t&&e.isPlainObject(r)&&(t=t.toLowerCase(),i=s(r.allow),a=s(r.deny),"allow"===r.firstOrder?(o=!1,a||i!==!0||(o=!0)):(o=!0,a!==!0||i||(o=!1))),o},sequence:function(e){var t=e.length,n=function(t,i){return++i,e[i]?n(t.then(e[i]),i):t};return t>1?n(e[0](),0):e[0]()},reloadContents:function(t){var n,i=e.Deferred();try{n=e('<iframe width="1" height="1" scrolling="no" frameborder="no" style="position:absolute; top:-1px; left:-1px" crossorigin="use-credentials">').attr("src",t).one("load",function(){var n=e(this);try{this.contentDocument.location.reload(!0),n.one("load",function(){n.remove(),i.resolve()})}catch(a){n.attr("src","").attr("src",t).one("load",function(){n.remove(),i.resolve()})}}).appendTo("body")}catch(a){n&&n.remove(),i.reject()}return i},makeNetmountOptionOauth:function(t,n,i,a){var o,r="boolean"==typeof a?a:null,s=Object.assign({noOffline:!1,root:"root",pathI18n:"folderId",folders:!0},null===r?a||{}:{noOffline:r}),l=function(n,a,r){var d,p=this,u=Object.keys(e.isPlainObject(r)?r:{}).length;a.next().remove(),u&&(d=e('<select class="ui-corner-all elfinder-tabstop" style="max-width:200px;">').append(e(e.map(r,function(e,t){return'<option value="'+n.escape((t+"").trim())+'">'+n.escape(e)+"</option>"}).join(""))).on("change click",function(a){var r,d=e(this),u=d.val();p.inputs.path.val(u),!s.folders||"change"!==a.type&&d.data("current")===u||(d.next().remove(),d.data("current",u),u!=s.root&&(r=c(),o&&"pending"===o.state()&&n.abortXHR(o,{quiet:!0,abort:!0}),d.after(r),o=n.request({data:{cmd:"netmount",protocol:t,host:i,user:"init",path:u,pass:"folders"},preventDefault:!0}).done(function(e){l.call(p,n,d,e.folders)}).always(function(){n.abortXHR(o,{quiet:!0}),r.remove()}).xhr))}),a.after(e("<div/>").append(d)).closest(".ui-dialog").trigger("tabstopsInit"),d.trigger("focus"))},c=function(){return e('<div class="elfinder-netmount-spinner"/>').append('<span class="elfinder-spinner"/>')};return{vars:{},name:n,inputs:{offline:e('<input type="checkbox"/>').on("change",function(){e(this).parents("table.elfinder-netmount-tb").find("select:first").trigger("change","reset")}),host:e('<span><span class="elfinder-spinner"/></span><input type="hidden"/>'),path:e('<input type="text" value="'+s.root+'"/>'),user:e('<input type="hidden"/>'),pass:e('<input type="hidden"/>')},select:function(n,a,o){var r=this.inputs,l=r.offline,c=e(r.host[0]),d=o||null;this.vars.mbtn=r.host.closest(".ui-dialog").children(".ui-dialog-buttonpane:first").find("button.elfinder-btncnt-0"),c.data("inrequest")||!c.find("span.elfinder-spinner").length&&"reset"!==d&&("winfocus"!==d||c.siblings("span.elfinder-button-icon-reload").length)?(l.closest("tr")[s.noOffline||r.user.val()?"hide":"show"](),c.data("funcexpup")&&c.data("funcexpup")()):(1===l.parent().children().length&&(r.path.parent().prev().html(n.i18n(s.pathI18n)),l.attr("title",n.i18n("offlineAccess")),l.uniqueId().after(e("<label/>").attr("for",l.attr("id")).html(" "+n.i18n("offlineAccess")))),c.data("inrequest",!0).empty().addClass("elfinder-spinner").parent().find("span.elfinder-button-icon").remove(),n.request({data:{cmd:"netmount",protocol:t,host:i,user:"init",options:{id:n.id,offline:l.prop("checked")?1:0,pass:r.host[1].value}},preventDefault:!0}).done(function(e){c.removeClass("elfinder-spinner").html(e.body.replace(/\{msg:([^}]+)\}/g,function(e,t){return n.i18n(t,i)}))}),s.noOffline&&l.closest("tr").hide()),this.vars.mbtn[e(r.host[1]).val()?"show":"hide"]()},done:function(n,a){var o=this.inputs,r=this.protocol,c=e(o.host[0]),d=e(o.host[1]),p="&nbsp;";if(s.noOffline&&o.offline.closest("tr").hide(),"makebtn"==a.mode)c.removeClass("elfinder-spinner").removeData("expires").removeData("funcexpup"),o.host.find("input").on("mouseenter mouseleave",function(){e(this).toggleClass("ui-state-hover")}),d.val(""),o.path.val(s.root).next().remove(),o.user.val(""),o.pass.val(""),!s.noOffline&&o.offline.closest("tr").show(),this.vars.mbtn.hide();else if("folders"==a.mode)a.folders&&l.call(this,n,o.path.nextAll(":last"),a.folders);else{if(a.expires&&(p="()",c.data("expires",a.expires)),c.html(i+p).removeClass("elfinder-spinner"),a.expires&&(c.data("funcexpup",function(){var e=Math.floor((c.data("expires")-+new Date/1e3)/60);e<3?c.parent().children(".elfinder-button-icon-reload").click():(c.text(c.text().replace(/\(.*\)/,"("+n.i18n(["minsLeft",e])+")")),setTimeout(function(){c.is(":visible")&&c.data("funcexpup")()},6e4))}),c.data("funcexpup")()),a.reset)return void r.trigger("change","reset");c.parent().append(e('<span class="elfinder-button-icon elfinder-button-icon-reload" title="'+n.i18n("reAuth")+'">').on("click",function(){d.val("reauth"),r.trigger("change","reset")})),d.val(t),this.vars.mbtn.show(),a.folders&&l.call(this,n,o.path,a.folders),o.user.val("done"),o.pass.val("done"),o.offline.closest("tr").hide()}c.removeData("inrequest")},fail:function(t,n){e(this.inputs.host[0]).removeData("inrequest"),this.protocol.trigger("change","reset")},integrateInfo:s.integrate}},findCwdNodes:function(t,n){var i=this,a=(this.getUI("cwd"),this.cwd().hash),o=e();return n=n||{},e.each(t,function(e,t){if((t.phash===a||i.searchStatus.state>1)&&(o=o.add(i.cwdHash2Elm(t.hash)),n.firstOnly))return!1}),o},convAbsUrl:function(e){if(e.match(/^http/i))return e;if("//"===e.substr(0,2))return window.location.protocol+e;var t,n=window.location.protocol+"//"+window.location.host,i=/[^\/]+\/\.\.\//;for(t="/"===e.substr(0,1)?n+e:n+window.location.pathname.replace(/\/[^\/]+$/,"/")+e,t=t.replace("/./","/");i.test(t);)t=t.replace(i,"");return t},isSameOrigin:function(e){var t;if(e=this.convAbsUrl(e),location.origin&&window.URL)try{return t=new URL(e),location.origin===t.origin}catch(n){}return t=document.createElement("a"),t.href=e,location.protocol===t.protocol&&location.host===t.host&&location.port&&t.port},navHash2Id:function(e){return this.navPrefix+e},navId2Hash:function(e){return"string"==typeof e&&e.substr(this.navPrefix.length)},cwdHash2Id:function(e){return this.cwdPrefix+e},cwdId2Hash:function(e){return"string"==typeof e&&e.substr(this.cwdPrefix.length)},navHash2Elm:function(t){return e(document.getElementById(this.navHash2Id(t)))},cwdHash2Elm:function(t){return e(document.getElementById(this.cwdHash2Id(t)))},isInWindow:function(e,t){var n,i;return!!(n=e.get(0))&&(!(!t&&null===n.offsetParent)&&(i=n.getBoundingClientRect(),!!document.elementFromPoint(i.left,i.top)))},zIndexCalc:function(){var t=this,n=this.getUI(),i=n.css("z-index");i&&"auto"!==i&&"inherit"!==i?t.zIndex=i:n.parents().each(function(n,i){var a=e(i).css("z-index");if("auto"!==a&&"inherit"!==a&&(a=parseInt(a)))return t.zIndex=a,!1})},loadScript:function(t,n,i,a){var o,r,s={dataType:"script",cache:!0},l={},c={};return i=i||{},i.tryRequire&&this.hasRequire?require(t,n,i.error):(o=function(){var t,o,r;e.each(c,function(e,t){if("success"!==t&&"notmodified"!==t)return r=!0,!1}),r?i.error&&e.isFunction(i.error)&&i.error({loadResults:c}):e.isFunction(n)&&(a&&"undefined"==typeof a.obj[a.name]?(t=a.timeout?a.timeout/10:1,o=setInterval(function(){(--t<0||"undefined"!=typeof a.obj[a.name])&&(clearInterval(o),n())},10)):n())},"tag"===i.loadType?(e("head > script").each(function(){l[this.src]=this}),r=t.length,e.each(t,function(t,n){var a,s=!1;l[n]?(c[t]=l[n]._error||"success",--r<1&&o()):(a=document.createElement("script"),a.charset=i.charset||"UTF-8",e("head").append(a),a.onload=a.onreadystatechange=function(){s||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(s=!0,c[t]="success",--r<1&&o())},a.onerror=function(e){c[t]=a._error=e&&e.type?e.type:"error",--r<1&&o()},a.src=n)})):(i=e.isPlainObject(i)?Object.assign(s,i):s,r=0,function d(n,a){void 0!==n&&(c[r++]=a),t.length?e.ajax(Object.assign({},i,{url:t.shift(),success:d,error:d})):o()}())),this},loadCss:function(t,n){var i,a,o=this;return"string"==typeof t&&(t=[t]),n&&(n.className&&(i=n.className),n.dfd&&n.dfd.promise&&(a=[])),e.each(t,function(t,n){var r;n=o.convAbsUrl(n).replace(/^https?:/i,""),a&&(a[t]=e.Deferred()),e("head > link[href='+url+']").length?a&&a[t].resolve():(r=document.createElement("link"),r.type="text/css",r.rel="stylesheet",r.href=n,i&&(r.className=i),a&&(r.onload=function(){a[t].resolve()},r.onerror=function(){a[t].reject()}),e("head").append(r))}),a&&e.when.apply(null,a).done(function(){n.dfd.resolve()}).fail(function(){n.dfd.reject()}),this},asyncJob:function(t,n,i){var a,o,r=e.Deferred(),s=!1,l=Object.assign({interval:0,numPerOnce:1},i||{}),c=[],d=[],p=[];return r._abort=function(e){o&&clearTimeout(o),d=[],s=!0,"pending"===r.state()&&r[e?"resolve":"reject"](c)},r.fail(function(){r._abort()}).always(function(){r._abort=function(){}}),"function"==typeof t&&Array.isArray(n)?(d=n.concat(),a=function(){var e,n,i;if(!s){for(p=d.splice(0,l.numPerOnce),n=p.length,e=0;e<n&&!s;e++)i=t(p[e]),null!==i&&c.push(i);s||(d.length?o=setTimeout(a,l.interval):r.resolve(c))}},d.length?o=setTimeout(a,0):r.resolve(c)):r.reject(),r},getSize:function(t){var n=this,i=[],a=t.length,o=e.Deferred().fail(function(){e.each(i,function(e,t){t&&(t.syncOnFail&&t.syncOnFail(!1),t.reject())})}),r=function(t){var i=[];return"directory"===t.mime&&e.each(n.leafRoots,function(e,a){var o;if(e===t.hash)i.push.apply(i,a);else for(o=(n.file(e)||{}).phash;o;)o===t.hash&&i.push.apply(i,a),o=(n.file(o)||{}).phash}),i},s=function(t){var i=e.Deferred(),a=n.file(t),o=a?a.phash:t;return o&&!n.file(o)?n.request({data:{cmd:"parents",target:o},preventFail:!0}).done(function(){n.one("parentsdone",function(){i.resolve()})}).fail(function(){i.resolve()}):i.resolve(),i},l=function(){var t=e.Deferred(),i=Object.keys(n.leafRoots).length;return i>0?e.each(n.leafRoots,function(e){s(e).done(function(){--i,i<1&&t.resolve()})}):t.resolve(),t};return n.autoSync("stop"),l().done(function(){var s=[],l={},c=[],d=[],p={};e.each(t,function(){s.push.apply(s,r(n.file(this)))}),t.push.apply(t,s),e.each(t,function(){var t=n.root(this),i=n.file(this);i&&(i.sizeInfo||"directory"!==i.mime)?d.push(e.Deferred().resolve(i.sizeInfo?i.sizeInfo:{size:i.size,dirCnt:0,fileCnt:1})):l[t]?l[t].push(this.toString()):l[t]=[this.toString()]}),e.each(l,function(){var e=c.length;1===this.length&&(p[e]=this[0]),c.push(n.request({data:{cmd:"size",targets:this},preventDefault:!0}))}),i.push.apply(i,c),c.push.apply(c,d),e.when.apply(e,c).fail(function(){o.reject()}).done(function(){var t,i,r,s=function(t,i){var a;(a=n.file(t))&&(a.sizeInfo={isCache:!0},e.each(["size","dirCnt","fileCnt"],function(){a.sizeInfo[this]=i[this]||0}),a.size=parseInt(a.sizeInfo.size),m.push(a))},l=0,c=0,d=0,u=arguments.length,h=[],f="",m=[];for(t=0;t<u;t++)r=arguments[t],i=null,r.isCache||(p[t]&&(i=n.file(p[t]))?s(p[t],r):r.sizes&&e.isPlainObject(r.sizes)&&e.each(r.sizes,function(e,t){s(e,t)})),l+=parseInt(r.size),c!==!1&&("undefined"==typeof r.fileCnt&&(c=!1),c+=parseInt(r.fileCnt||0)),d!==!1&&("undefined"==typeof r.dirCnt&&(d=!1),d+=parseInt(r.dirCnt||0));m.length&&n.change({changed:m}),d!==!1&&h.push(n.i18n("folders")+": "+(d-(a>1?0:1))),c!==!1&&h.push(n.i18n("files")+": "+c),h.length&&(f="<br>"+h.join(", ")),o.resolve({size:l,fileCnt:c,dirCnt:d,formated:(l>=0?n.formatSize(l):n.i18n("unknown"))+f})}),n.autoSync()}),o},getTheme:function(t){var n,i,a=this,o=e.Deferred(),r=function(t,n){return n||(n=a.convAbsUrl(a.baseUrl)),Array.isArray(t)?e.map(t,function(e){return r(e,n)}):t.match(/^(?:http|\/\/)/i)?t:n+t.replace(/^(?:\.\/|\/)/,"")};return t&&(n=a.options.themes[t])?"string"==typeof n?(url=r(n),(i=url.match(/^(.+\/)[^\/]+\.json$/i))?e.getJSON(url).done(function(e){n=e,n.id=t,n.cssurls&&(n.cssurls=r(n.cssurls,i[1])),o.resolve(n)}).fail(function(){o.reject()}):o.resolve({id:t,name:t,cssurls:[url]})):e.isPlainObject(n)&&n.cssurls?(n.id=t,n.cssurls=r(n.cssurls),Array.isArray(n.cssurls)||(n.cssurls=[n.cssurls]),n.name||(n.name=t),o.resolve(n)):o.reject():o.reject(),o},changeTheme:function(t){var n=this;return t&&(!n.options.themes[t]||n.theme&&n.theme.id===t?"default"===t&&n.theme&&(e("head>link.elfinder-theme-ext").remove(),n.theme=null,n.trigger&&n.trigger("themechange")):n.getTheme(t).done(function(t){t.cssurls&&(e("head>link.elfinder-theme-ext").remove(),n.loadCss(t.cssurls,{className:"elfinder-theme-ext",dfd:e.Deferred().done(function(){n.theme=t,n.trigger&&n.trigger("themechange")})}))})),this},applyLeafRootStats:function(t,n){var i=this,a=n?t:i.file(t.hash)||t,o=a.ts,r=!1;return!n&&t._realStats||(t._realStats={locked:t.locked||0,dirs:t.dirs||0,ts:t.ts}),t.locked=1,a.locked||(r=!0),t.dirs=1,a.dirs||(r=!0),e.each(i.leafRoots[t.hash],function(){var e=i.file(this);e&&e.ts&&(t.ts||0)<e.ts&&(t.ts=e.ts)}),o!==t.ts&&(r=!0),r},abortXHR:function(e,t){var n=t||{};e&&(n.quiet&&(e.quiet=!0),n.abort&&e._requestId&&this.request({data:{cmd:"abort",id:e._requestId},preventDefault:!0}),e.abort(),e=void 0)},getRequestId:function(){return(+new Date).toString(16)+Math.floor(1e3*Math.random()).toString(16)},arrayFlip:function(t,n){var i,a={},o=e.isArray(t);for(i in t)(o||t.hasOwnProperty(i))&&(a[t[i]]=n||i);return a},splitFileExtention:function(e){var t;return(t=e.match(/^(.+?)?\.((?:tar\.(?:gz|bz|bz2|z|lzo))|cpio\.gz|ps\.gz|xcf\.(?:gz|bz2)|[a-z0-9]{1,10})$/i))?("undefined"==typeof t[1]&&(t[1]=""),[t[1],t[2]]):[e,""]},sliceArrayBuffer:function(e,t){for(var n=[],i=0;i*t<e.byteLength;)n.push(e.slice(i*t,(i+1)*t)),i++;return n},arrayBufferToBase64:function(e){if(!window.btoa)return"";var t=new Uint8Array(e),n=Array.prototype.slice.call(t),i=n.map(function(e){return String.fromCharCode(e)});return window.btoa(i.join(""))},log:function(e){return window.console&&window.console.log&&window.console.log(e),this},debug:function(e,t){var n=this.options.debug;return n&&("all"===n||n[e])&&window.console&&window.console.log&&window.console.log("elfinder debug: ["+e+"] ["+this.id+"]",t),"backend-error"===e?(!this.cwd().hash||n&&("all"===n||n["backend-error"]))&&(t=Array.isArray(t)?t:[t],this.error(t)):"backend-debug"===e&&this.trigger("backenddebug",t),this},time:function(e){window.console&&window.console.time&&window.console.time(e)},timeEnd:function(e){window.console&&window.console.timeEnd&&window.console.timeEnd(e)}},Object.keys||(Object.keys=function(){var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=n.length;return function(a){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.keys called on non-object");var o=[];for(var r in a)e.call(a,r)&&o.push(r);if(t)for(var s=0;s<i;s++)e.call(a,n[s])&&o.push(n[s]);return o}}()),Array.isArray||(Array.isArray=function(e){return jQuery.isArray(e)}),Object.assign||(Object.assign=function(){return jQuery.extend.apply(null,arguments)}),String.prototype.repeat||(String.prototype.repeat=function(e){"use strict";if(null==this)throw new TypeError("can't convert "+this+" to object");var t=""+this;if(e=+e,e!=e&&(e=0),e<0)throw new RangeError("repeat count must be non-negative");if(e==1/0)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0==t.length||0==e)return"";if(t.length*e>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");for(var n="",i=0;i<e;i++)n+=t;return n}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),function(){try{return void Array.apply(null,{})}catch(e){}var t=Object.prototype.toString,n="[object Array]",i=Function.prototype.apply,a=Array.prototype.slice;Function.prototype.apply=function(e,o){return i.call(this,e,t.call(o)===n?o:a.call(o))}}(),Array.from||(Array.from=function(e){return 1===e.length?[e[0]]:Array.apply(null,e)}),window.cancelAnimationFrame||!function(){for(var e=0,t=["ms","moz","webkit","o"],n=0;n<t.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[t[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[n]+"CancelAnimationFrame"]||window[t[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t,n){var i=(new Date).getTime(),a=Math.max(0,16-(i-e)),o=window.setTimeout(function(){
13
- t(i+a)},a);return e=i+a,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}(),i.prototype.version="2.1.46",function(){if(e.ui&&e.ui.ddmanager){var t=e.ui.ddmanager.prepareOffsets;e.ui.ddmanager.prepareOffsets=function(n,i){var a=function(e){if(e.is(":hidden"))return!0;var t=e[0].getBoundingClientRect();return!document.elementFromPoint(t.left,t.top)&&!document.elementFromPoint(t.left+t.width,t.top+t.height)};if("mousedown"===i.type||n.options.elfRefresh){var o,r,s=e.ui.ddmanager.droppables[n.options.scope]||[],l=s.length;for(o=0;o<l;o++)r=s[o],r.options.autoDisable&&(!r.options.disabled||r.options.autoDisable>1)&&(r.options.disabled=a(r.element),r.options.autoDisable=r.options.disabled?2:1)}return t(n,i)}}}(),e.ajaxTransport("+binary",function(e,t,n){if(window.FormData&&(e.dataType&&"binary"==e.dataType||e.data&&(window.ArrayBuffer&&e.data instanceof ArrayBuffer||window.Blob&&e.data instanceof Blob))){var i;return{send:function(t,n){i=new XMLHttpRequest;var a=e.url,o=e.type,r=e.async||!0,s=e.responseType||"blob",l=e.data||null,c=e.username,d=e.password;i.addEventListener("load",function(){var t={};t[e.dataType]=i.response,n(i.status,i.statusText,t,i.getAllResponseHeaders())}),i.open(o,a,r,c,d);for(var p in t)i.setRequestHeader(p,t[p]);if(e.xhrFields)for(var u in e.xhrFields)u in i&&(i[u]=e.xhrFields[u]);i.responseType=s,i.send(l)},abort:function(){i.abort()}}}}),function(e){function t(t,n){if(!(t.originalEvent.touches.length>1)){e(t.currentTarget).hasClass("touch-punch-keep-default")||t.preventDefault();var i=t.originalEvent.changedTouches[0],a=document.createEvent("MouseEvents");a.initMouseEvent(n,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(a)}}if(e.support.touch="ontouchend"in document,e.support.touch){var n,i,a,o=e.ui.mouse.prototype,r=o._mouseInit,s=o._mouseDestroy;o._touchStart=function(e){var o=this;!n&&o._mouseCapture(e.originalEvent.changedTouches[0])&&(i=e.originalEvent.changedTouches[0].screenX.toFixed(0),a=e.originalEvent.changedTouches[0].screenY.toFixed(0),n=!0,o._touchMoved=!1,t(e,"mouseover"),t(e,"mousemove"),t(e,"mousedown"))},o._touchMove=function(e){if(n){var o=e.originalEvent.changedTouches[0].screenX.toFixed(0),r=e.originalEvent.changedTouches[0].screenY.toFixed(0);Math.abs(i-o)<=4&&Math.abs(a-r)<=4||(this._touchMoved=!0,t(e,"mousemove"))}},o._touchEnd=function(e){n&&(t(e,"mouseup"),t(e,"mouseout"),this._touchMoved||t(e,"click"),n=!1,this._touchMoved=!1)},o._mouseInit=function(){var t=this;t.element.hasClass("touch-punch")&&t.element.on({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),r.call(t)},o._mouseDestroy=function(){var t=this;t.element.hasClass("touch-punch")&&t.element.off({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),s.call(t)}}}(jQuery),e.fn.elfinder=function(t,n){return"instance"===t?this.getElFinder():this.each(function(){var a,o="string"==typeof t?t:"",r="function"==typeof n?n:void 0,s=this.elfinder;if(s)switch(o){case"close":case"hide":s.hide();break;case"open":case"show":s.show();break;case"destroy":s.destroy();break;case"reload":case"restart":s&&(a=e.extend(!0,s.options,e.isPlainObject(n)?n:{}),r=s.bootCallback,s.reloadCallback&&e.isFunction(s.reloadCallback)?s.reloadCallback(a,r):(s.destroy(),new i(this,a,r)))}else e.isPlainObject(t)&&new i(this,t,r)})},e.fn.getElFinder=function(){var e;return this.each(function(){if(this.elfinder)return e=this.elfinder,!1}),e},e.fn.elfUiWidgetInstance=function(e){try{return this[e]("instance")}catch(t){var n=this.data("ui-"+e);return n&&"object"==typeof n&&n.widgetFullName==="ui-"+e?n:null}},e.fn.scrollRight||e.fn.extend({scrollRight:function(e){var t=this.get(0);return void 0===e?Math.max(0,t.scrollWidth-(t.scrollLeft+t.clientWidth)):this.scrollLeft(t.scrollWidth-t.clientWidth-e)}}),e.fn.scrollBottom||e.fn.extend({scrollBottom:function(e){var t=this.get(0);return void 0===e?Math.max(0,t.scrollHeight-(t.scrollTop+t.clientHeight)):this.scrollTop(t.scrollHeight-t.clientHeight-e)}}),i.prototype.mimeTypes={"application/x-executable":"exe","application/x-jar":"jar","application/x-gzip":"gz","application/x-bzip2":"tbz","application/x-rar":"rar","text/x-php":"php","text/javascript":"js","application/rtfd":"rtfd","text/x-python":"py","text/x-ruby":"rb","text/x-shellscript":"sh","text/x-perl":"pl","text/xml":"xml","text/x-csrc":"c","text/x-chdr":"h","text/x-c++src":"cpp","text/x-c++hdr":"hh","text/x-markdown":"md","text/x-yaml":"yml","image/x-ms-bmp":"bmp","image/x-targa":"tga","image/xbm":"xbm","image/pxm":"pxm","audio/wav":"wav","video/x-dv":"dv","video/x-ms-wmv":"wm","video/ogg":"ogm","video/MP2T":"m2ts","application/x-mpegURL":"m3u8","application/dash+xml":"mpd","application/andrew-inset":"ez","application/applixware":"aw","application/atom+xml":"atom","application/atomcat+xml":"atomcat","application/atomsvc+xml":"atomsvc","application/ccxml+xml":"ccxml","application/cdmi-capability":"cdmia","application/cdmi-container":"cdmic","application/cdmi-domain":"cdmid","application/cdmi-object":"cdmio","application/cdmi-queue":"cdmiq","application/cu-seeme":"cu","application/davmount+xml":"davmount","application/docbook+xml":"dbk","application/dssc+der":"dssc","application/dssc+xml":"xdssc","application/ecmascript":"ecma","application/emma+xml":"emma","application/epub+zip":"epub","application/exi":"exi","application/font-tdpfr":"pfr","application/gml+xml":"gml","application/gpx+xml":"gpx","application/gxf":"gxf","application/hyperstudio":"stk","application/inkml+xml":"ink","application/ipfix":"ipfix","application/java-serialized-object":"ser","application/java-vm":"class","application/json":"json","application/jsonml+json":"jsonml","application/lost+xml":"lostxml","application/mac-binhex40":"hqx","application/mac-compactpro":"cpt","application/mads+xml":"mads","application/marc":"mrc","application/marcxml+xml":"mrcx","application/mathematica":"ma","application/mathml+xml":"mathml","application/mbox":"mbox","application/mediaservercontrol+xml":"mscml","application/metalink+xml":"metalink","application/metalink4+xml":"meta4","application/mets+xml":"mets","application/mods+xml":"mods","application/mp21":"m21","application/mp4":"mp4s","application/msword":"doc","application/mxf":"mxf","application/octet-stream":"bin","application/oda":"oda","application/oebps-package+xml":"opf","application/ogg":"ogx","application/omdoc+xml":"omdoc","application/onenote":"onetoc","application/oxps":"oxps","application/patch-ops-error+xml":"xer","application/pdf":"pdf","application/pgp-encrypted":"pgp","application/pgp-signature":"asc","application/pics-rules":"prf","application/pkcs10":"p10","application/pkcs7-mime":"p7m","application/pkcs7-signature":"p7s","application/pkcs8":"p8","application/pkix-attr-cert":"ac","application/pkix-cert":"cer","application/pkix-crl":"crl","application/pkix-pkipath":"pkipath","application/pkixcmp":"pki","application/pls+xml":"pls","application/postscript":"ai","application/prs.cww":"cww","application/pskc+xml":"pskcxml","application/rdf+xml":"rdf","application/reginfo+xml":"rif","application/relax-ng-compact-syntax":"rnc","application/resource-lists+xml":"rl","application/resource-lists-diff+xml":"rld","application/rls-services+xml":"rs","application/rpki-ghostbusters":"gbr","application/rpki-manifest":"mft","application/rpki-roa":"roa","application/rsd+xml":"rsd","application/rss+xml":"rss","application/rtf":"rtf","application/sbml+xml":"sbml","application/scvp-cv-request":"scq","application/scvp-cv-response":"scs","application/scvp-vp-request":"spq","application/scvp-vp-response":"spp","application/sdp":"sdp","application/set-payment-initiation":"setpay","application/set-registration-initiation":"setreg","application/shf+xml":"shf","application/smil+xml":"smi","application/sparql-query":"rq","application/sparql-results+xml":"srx","application/srgs":"gram","application/srgs+xml":"grxml","application/sru+xml":"sru","application/ssdl+xml":"ssdl","application/ssml+xml":"ssml","application/tei+xml":"tei","application/thraud+xml":"tfi","application/timestamped-data":"tsd","application/vnd.3gpp.pic-bw-large":"plb","application/vnd.3gpp.pic-bw-small":"psb","application/vnd.3gpp.pic-bw-var":"pvb","application/vnd.3gpp2.tcap":"tcap","application/vnd.3m.post-it-notes":"pwn","application/vnd.accpac.simply.aso":"aso","application/vnd.accpac.simply.imp":"imp","application/vnd.acucobol":"acu","application/vnd.acucorp":"atc","application/vnd.adobe.air-application-installer-package+zip":"air","application/vnd.adobe.formscentral.fcdt":"fcdt","application/vnd.adobe.fxp":"fxp","application/vnd.adobe.xdp+xml":"xdp","application/vnd.adobe.xfdf":"xfdf","application/vnd.ahead.space":"ahead","application/vnd.airzip.filesecure.azf":"azf","application/vnd.airzip.filesecure.azs":"azs","application/vnd.amazon.ebook":"azw","application/vnd.americandynamics.acc":"acc","application/vnd.amiga.ami":"ami","application/vnd.android.package-archive":"apk","application/vnd.anser-web-certificate-issue-initiation":"cii","application/vnd.anser-web-funds-transfer-initiation":"fti","application/vnd.antix.game-component":"atx","application/vnd.apple.installer+xml":"mpkg","application/vnd.aristanetworks.swi":"swi","application/vnd.astraea-software.iota":"iota","application/vnd.audiograph":"aep","application/vnd.blueice.multipass":"mpm","application/vnd.bmi":"bmi","application/vnd.businessobjects":"rep","application/vnd.chemdraw+xml":"cdxml","application/vnd.chipnuts.karaoke-mmd":"mmd","application/vnd.cinderella":"cdy","application/vnd.claymore":"cla","application/vnd.cloanto.rp9":"rp9","application/vnd.clonk.c4group":"c4g","application/vnd.cluetrust.cartomobile-config":"c11amc","application/vnd.cluetrust.cartomobile-config-pkg":"c11amz","application/vnd.commonspace":"csp","application/vnd.contact.cmsg":"cdbcmsg","application/vnd.cosmocaller":"cmc","application/vnd.crick.clicker":"clkx","application/vnd.crick.clicker.keyboard":"clkk","application/vnd.crick.clicker.palette":"clkp","application/vnd.crick.clicker.template":"clkt","application/vnd.crick.clicker.wordbank":"clkw","application/vnd.criticaltools.wbs+xml":"wbs","application/vnd.ctc-posml":"pml","application/vnd.cups-ppd":"ppd","application/vnd.curl.car":"car","application/vnd.curl.pcurl":"pcurl","application/vnd.dart":"dart","application/vnd.data-vision.rdz":"rdz","application/vnd.dece.data":"uvf","application/vnd.dece.ttml+xml":"uvt","application/vnd.dece.unspecified":"uvx","application/vnd.dece.zip":"uvz","application/vnd.denovo.fcselayout-link":"fe_launch","application/vnd.dna":"dna","application/vnd.dolby.mlp":"mlp","application/vnd.dpgraph":"dpg","application/vnd.dreamfactory":"dfac","application/vnd.ds-keypoint":"kpxx","application/vnd.dvb.ait":"ait","application/vnd.dvb.service":"svc","application/vnd.dynageo":"geo","application/vnd.ecowin.chart":"mag","application/vnd.enliven":"nml","application/vnd.epson.esf":"esf","application/vnd.epson.msf":"msf","application/vnd.epson.quickanime":"qam","application/vnd.epson.salt":"slt","application/vnd.epson.ssf":"ssf","application/vnd.eszigno3+xml":"es3","application/vnd.ezpix-album":"ez2","application/vnd.ezpix-package":"ez3","application/vnd.fdf":"fdf","application/vnd.fdsn.mseed":"mseed","application/vnd.fdsn.seed":"seed","application/vnd.flographit":"gph","application/vnd.fluxtime.clip":"ftc","application/vnd.framemaker":"fm","application/vnd.frogans.fnc":"fnc","application/vnd.frogans.ltf":"ltf","application/vnd.fsc.weblaunch":"fsc","application/vnd.fujitsu.oasys":"oas","application/vnd.fujitsu.oasys2":"oa2","application/vnd.fujitsu.oasys3":"oa3","application/vnd.fujitsu.oasysgp":"fg5","application/vnd.fujitsu.oasysprs":"bh2","application/vnd.fujixerox.ddd":"ddd","application/vnd.fujixerox.docuworks":"xdw","application/vnd.fujixerox.docuworks.binder":"xbd","application/vnd.fuzzysheet":"fzs","application/vnd.genomatix.tuxedo":"txd","application/vnd.geogebra.file":"ggb","application/vnd.geogebra.tool":"ggt","application/vnd.geometry-explorer":"gex","application/vnd.geonext":"gxt","application/vnd.geoplan":"g2w","application/vnd.geospace":"g3w","application/vnd.gmx":"gmx","application/vnd.google-earth.kml+xml":"kml","application/vnd.google-earth.kmz":"kmz","application/vnd.grafeq":"gqf","application/vnd.groove-account":"gac","application/vnd.groove-help":"ghf","application/vnd.groove-identity-message":"gim","application/vnd.groove-injector":"grv","application/vnd.groove-tool-message":"gtm","application/vnd.groove-tool-template":"tpl","application/vnd.groove-vcard":"vcg","application/vnd.hal+xml":"hal","application/vnd.handheld-entertainment+xml":"zmm","application/vnd.hbci":"hbci","application/vnd.hhe.lesson-player":"les","application/vnd.hp-hpgl":"hpgl","application/vnd.hp-hpid":"hpid","application/vnd.hp-hps":"hps","application/vnd.hp-jlyt":"jlt","application/vnd.hp-pcl":"pcl","application/vnd.hp-pclxl":"pclxl","application/vnd.hydrostatix.sof-data":"sfd-hdstx","application/vnd.ibm.minipay":"mpy","application/vnd.ibm.modcap":"afp","application/vnd.ibm.rights-management":"irm","application/vnd.ibm.secure-container":"sc","application/vnd.iccprofile":"icc","application/vnd.igloader":"igl","application/vnd.immervision-ivp":"ivp","application/vnd.immervision-ivu":"ivu","application/vnd.insors.igm":"igm","application/vnd.intercon.formnet":"xpw","application/vnd.intergeo":"i2g","application/vnd.intu.qbo":"qbo","application/vnd.intu.qfx":"qfx","application/vnd.ipunplugged.rcprofile":"rcprofile","application/vnd.irepository.package+xml":"irp","application/vnd.is-xpr":"xpr","application/vnd.isac.fcs":"fcs","application/vnd.jam":"jam","application/vnd.jcp.javame.midlet-rms":"rms","application/vnd.jisp":"jisp","application/vnd.joost.joda-archive":"joda","application/vnd.kahootz":"ktz","application/vnd.kde.karbon":"karbon","application/vnd.kde.kchart":"chrt","application/vnd.kde.kformula":"kfo","application/vnd.kde.kivio":"flw","application/vnd.kde.kontour":"kon","application/vnd.kde.kpresenter":"kpr","application/vnd.kde.kspread":"ksp","application/vnd.kde.kword":"kwd","application/vnd.kenameaapp":"htke","application/vnd.kidspiration":"kia","application/vnd.kinar":"kne","application/vnd.koan":"skp","application/vnd.kodak-descriptor":"sse","application/vnd.las.las+xml":"lasxml","application/vnd.llamagraphics.life-balance.desktop":"lbd","application/vnd.llamagraphics.life-balance.exchange+xml":"lbe","application/vnd.lotus-1-2-3":123,"application/vnd.lotus-approach":"apr","application/vnd.lotus-freelance":"pre","application/vnd.lotus-notes":"nsf","application/vnd.lotus-organizer":"org","application/vnd.lotus-screencam":"scm","application/vnd.lotus-wordpro":"lwp","application/vnd.macports.portpkg":"portpkg","application/vnd.mcd":"mcd","application/vnd.medcalcdata":"mc1","application/vnd.mediastation.cdkey":"cdkey","application/vnd.mfer":"mwf","application/vnd.mfmp":"mfm","application/vnd.micrografx.flo":"flo","application/vnd.micrografx.igx":"igx","application/vnd.mif":"mif","application/vnd.mobius.daf":"daf","application/vnd.mobius.dis":"dis","application/vnd.mobius.mbk":"mbk","application/vnd.mobius.mqy":"mqy","application/vnd.mobius.msl":"msl","application/vnd.mobius.plc":"plc","application/vnd.mobius.txf":"txf","application/vnd.mophun.application":"mpn","application/vnd.mophun.certificate":"mpc","application/vnd.mozilla.xul+xml":"xul","application/vnd.ms-artgalry":"cil","application/vnd.ms-cab-compressed":"cab","application/vnd.ms-excel":"xls","application/vnd.ms-excel.addin.macroenabled.12":"xlam","application/vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","application/vnd.ms-excel.sheet.macroenabled.12":"xlsm","application/vnd.ms-excel.template.macroenabled.12":"xltm","application/vnd.ms-fontobject":"eot","application/vnd.ms-htmlhelp":"chm","application/vnd.ms-ims":"ims","application/vnd.ms-lrm":"lrm","application/vnd.ms-officetheme":"thmx","application/vnd.ms-pki.seccat":"cat","application/vnd.ms-pki.stl":"stl","application/vnd.ms-powerpoint":"ppt","application/vnd.ms-powerpoint.addin.macroenabled.12":"ppam","application/vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","application/vnd.ms-powerpoint.slide.macroenabled.12":"sldm","application/vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","application/vnd.ms-powerpoint.template.macroenabled.12":"potm","application/vnd.ms-project":"mpp","application/vnd.ms-word.document.macroenabled.12":"docm","application/vnd.ms-word.template.macroenabled.12":"dotm","application/vnd.ms-works":"wps","application/vnd.ms-wpl":"wpl","application/vnd.ms-xpsdocument":"xps","application/vnd.mseq":"mseq","application/vnd.musician":"mus","application/vnd.muvee.style":"msty","application/vnd.mynfc":"taglet","application/vnd.neurolanguage.nlu":"nlu","application/vnd.nitf":"ntf","application/vnd.noblenet-directory":"nnd","application/vnd.noblenet-sealer":"nns","application/vnd.noblenet-web":"nnw","application/vnd.nokia.n-gage.data":"ngdat","application/vnd.nokia.n-gage.symbian.install":"n-gage","application/vnd.nokia.radio-preset":"rpst","application/vnd.nokia.radio-presets":"rpss","application/vnd.novadigm.edm":"edm","application/vnd.novadigm.edx":"edx","application/vnd.novadigm.ext":"ext","application/vnd.oasis.opendocument.chart":"odc","application/vnd.oasis.opendocument.chart-template":"otc","application/vnd.oasis.opendocument.database":"odb","application/vnd.oasis.opendocument.formula":"odf","application/vnd.oasis.opendocument.formula-template":"odft","application/vnd.oasis.opendocument.graphics":"odg","application/vnd.oasis.opendocument.graphics-template":"otg","application/vnd.oasis.opendocument.image":"odi","application/vnd.oasis.opendocument.image-template":"oti","application/vnd.oasis.opendocument.presentation":"odp","application/vnd.oasis.opendocument.presentation-template":"otp","application/vnd.oasis.opendocument.spreadsheet":"ods","application/vnd.oasis.opendocument.spreadsheet-template":"ots","application/vnd.oasis.opendocument.text":"odt","application/vnd.oasis.opendocument.text-master":"odm","application/vnd.oasis.opendocument.text-template":"ott","application/vnd.oasis.opendocument.text-web":"oth","application/vnd.olpc-sugar":"xo","application/vnd.oma.dd2+xml":"dd2","application/vnd.openofficeorg.extension":"oxt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/vnd.openxmlformats-officedocument.presentationml.slide":"sldx","application/vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","application/vnd.openxmlformats-officedocument.presentationml.template":"potx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","application/vnd.osgeo.mapguide.package":"mgp","application/vnd.osgi.dp":"dp","application/vnd.osgi.subsystem":"esa","application/vnd.palm":"pdb","application/vnd.pawaafile":"paw","application/vnd.pg.format":"str","application/vnd.pg.osasli":"ei6","application/vnd.picsel":"efif","application/vnd.pmi.widget":"wg","application/vnd.pocketlearn":"plf","application/vnd.powerbuilder6":"pbd","application/vnd.previewsystems.box":"box","application/vnd.proteus.magazine":"mgz","application/vnd.publishare-delta-tree":"qps","application/vnd.pvi.ptid1":"ptid","application/vnd.quark.quarkxpress":"qxd","application/vnd.realvnc.bed":"bed","application/vnd.recordare.musicxml":"mxl","application/vnd.recordare.musicxml+xml":"musicxml","application/vnd.rig.cryptonote":"cryptonote","application/vnd.rim.cod":"cod","application/vnd.rn-realmedia":"rm","application/vnd.rn-realmedia-vbr":"rmvb","application/vnd.route66.link66+xml":"link66","application/vnd.sailingtracker.track":"st","application/vnd.seemail":"see","application/vnd.sema":"sema","application/vnd.semd":"semd","application/vnd.semf":"semf","application/vnd.shana.informed.formdata":"ifm","application/vnd.shana.informed.formtemplate":"itp","application/vnd.shana.informed.interchange":"iif","application/vnd.shana.informed.package":"ipk","application/vnd.simtech-mindmapper":"twd","application/vnd.smaf":"mmf","application/vnd.smart.teacher":"teacher","application/vnd.solent.sdkm+xml":"sdkm","application/vnd.spotfire.dxp":"dxp","application/vnd.spotfire.sfs":"sfs","application/vnd.stardivision.calc":"sdc","application/vnd.stardivision.draw":"sda","application/vnd.stardivision.impress":"sdd","application/vnd.stardivision.math":"smf","application/vnd.stardivision.writer":"sdw","application/vnd.stardivision.writer-global":"sgl","application/vnd.stepmania.package":"smzip","application/vnd.stepmania.stepchart":"sm","application/vnd.sun.xml.calc":"sxc","application/vnd.sun.xml.calc.template":"stc","application/vnd.sun.xml.draw":"sxd","application/vnd.sun.xml.draw.template":"std","application/vnd.sun.xml.impress":"sxi","application/vnd.sun.xml.impress.template":"sti","application/vnd.sun.xml.math":"sxm","application/vnd.sun.xml.writer":"sxw","application/vnd.sun.xml.writer.global":"sxg","application/vnd.sun.xml.writer.template":"stw","application/vnd.sus-calendar":"sus","application/vnd.svd":"svd","application/vnd.symbian.install":"sis","application/vnd.syncml+xml":"xsm","application/vnd.syncml.dm+wbxml":"bdm","application/vnd.syncml.dm+xml":"xdm","application/vnd.tao.intent-module-archive":"tao","application/vnd.tcpdump.pcap":"pcap","application/vnd.tmobile-livetv":"tmo","application/vnd.trid.tpt":"tpt","application/vnd.triscape.mxs":"mxs","application/vnd.trueapp":"tra","application/vnd.ufdl":"ufd","application/vnd.uiq.theme":"utz","application/vnd.umajin":"umj","application/vnd.unity":"unityweb","application/vnd.uoml+xml":"uoml","application/vnd.vcx":"vcx","application/vnd.visio":"vsd","application/vnd.visionary":"vis","application/vnd.vsf":"vsf","application/vnd.wap.wbxml":"wbxml","application/vnd.wap.wmlc":"wmlc","application/vnd.wap.wmlscriptc":"wmlsc","application/vnd.webturbo":"wtb","application/vnd.wolfram.player":"nbp","application/vnd.wordperfect":"wpd","application/vnd.wqd":"wqd","application/vnd.wt.stf":"stf","application/vnd.xara":"xar","application/vnd.xfdl":"xfdl","application/vnd.yamaha.hv-dic":"hvd","application/vnd.yamaha.hv-script":"hvs","application/vnd.yamaha.hv-voice":"hvp","application/vnd.yamaha.openscoreformat":"osf","application/vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","application/vnd.yamaha.smaf-audio":"saf","application/vnd.yamaha.smaf-phrase":"spf","application/vnd.yellowriver-custom-menu":"cmp","application/vnd.zul":"zir","application/vnd.zzazz.deck+xml":"zaz","application/voicexml+xml":"vxml","application/widget":"wgt","application/winhlp":"hlp","application/wsdl+xml":"wsdl","application/wspolicy+xml":"wspolicy","application/x-7z-compressed":"7z","application/x-abiword":"abw","application/x-ace-compressed":"ace","application/x-apple-diskimage":"dmg","application/x-authorware-bin":"aab","application/x-authorware-map":"aam","application/x-authorware-seg":"aas","application/x-bcpio":"bcpio","application/x-bittorrent":"torrent","application/x-blorb":"blb","application/x-bzip":"bz","application/x-cbr":"cbr","application/x-cdlink":"vcd","application/x-cfs-compressed":"cfs","application/x-chat":"chat","application/x-chess-pgn":"pgn","application/x-conference":"nsc","application/x-cpio":"cpio","application/x-csh":"csh","application/x-debian-package":"deb","application/x-dgc-compressed":"dgc","application/x-director":"dir","application/x-doom":"wad","application/x-dtbncx+xml":"ncx","application/x-dtbook+xml":"dtb","application/x-dtbresource+xml":"res","application/x-dvi":"dvi","application/x-envoy":"evy","application/x-eva":"eva","application/x-font-bdf":"bdf","application/x-font-ghostscript":"gsf","application/x-font-linux-psf":"psf","application/x-font-pcf":"pcf","application/x-font-snf":"snf","application/x-font-type1":"pfa","application/x-freearc":"arc","application/x-futuresplash":"spl","application/x-gca-compressed":"gca","application/x-glulx":"ulx","application/x-gnumeric":"gnumeric","application/x-gramps-xml":"gramps","application/x-gtar":"gtar","application/x-hdf":"hdf","application/x-install-instructions":"install","application/x-iso9660-image":"iso","application/x-java-jnlp-file":"jnlp","application/x-latex":"latex","application/x-lzh-compressed":"lzh","application/x-mie":"mie","application/x-mobipocket-ebook":"prc","application/x-ms-application":"application","application/x-ms-shortcut":"lnk","application/x-ms-wmd":"wmd","application/x-ms-wmz":"wmz","application/x-ms-xbap":"xbap","application/x-msaccess":"mdb","application/x-msbinder":"obd","application/x-mscardfile":"crd","application/x-msclip":"clp","application/x-msdownload":"dll","application/x-msmediaview":"mvb","application/x-msmetafile":"wmf","application/x-msmoney":"mny","application/x-mspublisher":"pub","application/x-msschedule":"scd","application/x-msterminal":"trm","application/x-mswrite":"wri","application/x-netcdf":"nc","application/x-nzb":"nzb","application/x-pkcs12":"p12","application/x-pkcs7-certificates":"p7b","application/x-pkcs7-certreqresp":"p7r","application/x-research-info-systems":"ris","application/x-shar":"shar","application/x-shockwave-flash":"swf","application/x-silverlight-app":"xap","application/x-sql":"sql","application/x-stuffit":"sit","application/x-stuffitx":"sitx","application/x-subrip":"srt","application/x-sv4cpio":"sv4cpio","application/x-sv4crc":"sv4crc","application/x-t3vm-image":"t3","application/x-tads":"gam","application/x-tar":"tar","application/x-tcl":"tcl","application/x-tex":"tex","application/x-tex-tfm":"tfm","application/x-texinfo":"texinfo","application/x-tgif":"obj","application/x-ustar":"ustar","application/x-wais-source":"src","application/x-x509-ca-cert":"der","application/x-xfig":"fig","application/x-xliff+xml":"xlf","application/x-xpinstall":"xpi","application/x-xz":"xz","application/x-zmachine":"z1","application/xaml+xml":"xaml","application/xcap-diff+xml":"xdf","application/xenc+xml":"xenc","application/xhtml+xml":"xhtml","application/xml":"xsl","application/xml-dtd":"dtd","application/xop+xml":"xop","application/xproc+xml":"xpl","application/xslt+xml":"xslt","application/xspf+xml":"xspf","application/xv+xml":"mxml","application/yang":"yang","application/yin+xml":"yin","application/zip":"zip","audio/adpcm":"adp","audio/basic":"au","audio/midi":"mid","audio/mp4":"m4a","audio/mpeg":"mpga","audio/ogg":"oga","audio/s3m":"s3m","audio/silk":"sil","audio/vnd.dece.audio":"uva","audio/vnd.digital-winds":"eol","audio/vnd.dra":"dra","audio/vnd.dts":"dts","audio/vnd.dts.hd":"dtshd","audio/vnd.lucent.voice":"lvp","audio/vnd.ms-playready.media.pya":"pya","audio/vnd.nuera.ecelp4800":"ecelp4800","audio/vnd.nuera.ecelp7470":"ecelp7470","audio/vnd.nuera.ecelp9600":"ecelp9600","audio/vnd.rip":"rip","audio/webm":"weba","audio/x-aac":"aac","audio/x-aiff":"aif","audio/x-caf":"caf","audio/x-flac":"flac","audio/x-matroska":"mka","audio/x-mpegurl":"m3u","audio/x-ms-wax":"wax","audio/x-ms-wma":"wma","audio/x-pn-realaudio":"ram","audio/x-pn-realaudio-plugin":"rmp","audio/xm":"xm","chemical/x-cdx":"cdx","chemical/x-cif":"cif","chemical/x-cmdf":"cmdf","chemical/x-cml":"cml","chemical/x-csml":"csml","chemical/x-xyz":"xyz","font/collection":"ttc","font/otf":"otf","font/ttf":"ttf","font/woff":"woff","font/woff2":"woff2","image/cgm":"cgm","image/g3fax":"g3","image/gif":"gif","image/ief":"ief","image/jpeg":"jpeg","image/ktx":"ktx","image/png":"png","image/prs.btif":"btif","image/sgi":"sgi","image/svg+xml":"svg","image/tiff":"tiff","image/vnd.adobe.photoshop":"psd","image/vnd.dece.graphic":"uvi","image/vnd.djvu":"djvu","image/vnd.dvb.subtitle":"sub","image/vnd.dwg":"dwg","image/vnd.dxf":"dxf","image/vnd.fastbidsheet":"fbs","image/vnd.fpx":"fpx","image/vnd.fst":"fst","image/vnd.fujixerox.edmics-mmr":"mmr","image/vnd.fujixerox.edmics-rlc":"rlc","image/vnd.ms-modi":"mdi","image/vnd.ms-photo":"wdp","image/vnd.net-fpx":"npx","image/vnd.wap.wbmp":"wbmp","image/vnd.xiff":"xif","image/webp":"webp","image/x-3ds":"3ds","image/x-cmu-raster":"ras","image/x-cmx":"cmx","image/x-freehand":"fh","image/x-icon":"ico","image/x-mrsid-image":"sid","image/x-pcx":"pcx","image/x-pict":"pic","image/x-portable-anymap":"pnm","image/x-portable-bitmap":"pbm","image/x-portable-graymap":"pgm","image/x-portable-pixmap":"ppm","image/x-rgb":"rgb","image/x-xpixmap":"xpm","image/x-xwindowdump":"xwd","message/rfc822":"eml","model/iges":"igs","model/mesh":"msh","model/vnd.collada+xml":"dae","model/vnd.dwf":"dwf","model/vnd.gdl":"gdl","model/vnd.gtw":"gtw","model/vnd.vtu":"vtu","model/vrml":"wrl","model/x3d+binary":"x3db","model/x3d+vrml":"x3dv","model/x3d+xml":"x3d","text/cache-manifest":"appcache","text/calendar":"ics","text/css":"css","text/csv":"csv","text/html":"html","text/n3":"n3","text/plain":"txt","text/prs.lines.tag":"dsc","text/richtext":"rtx","text/sgml":"sgml","text/tab-separated-values":"tsv","text/troff":"t","text/turtle":"ttl","text/uri-list":"uri","text/vcard":"vcard","text/vnd.curl":"curl","text/vnd.curl.dcurl":"dcurl","text/vnd.curl.mcurl":"mcurl","text/vnd.curl.scurl":"scurl","text/vnd.fly":"fly","text/vnd.fmi.flexstor":"flx","text/vnd.graphviz":"gv","text/vnd.in3d.3dml":"3dml","text/vnd.in3d.spot":"spot","text/vnd.sun.j2me.app-descriptor":"jad","text/vnd.wap.wml":"wml","text/vnd.wap.wmlscript":"wmls","text/x-asm":"s","text/x-c":"cc","text/x-fortran":"f","text/x-java-source":"java","text/x-nfo":"nfo","text/x-opml":"opml","text/x-pascal":"p","text/x-setext":"etx","text/x-sfv":"sfv","text/x-uuencode":"uu","text/x-vcalendar":"vcs","text/x-vcard":"vcf","video/3gpp":"3gp","video/3gpp2":"3g2","video/h261":"h261","video/h263":"h263","video/h264":"h264","video/jpeg":"jpgv","video/jpm":"jpm","video/mj2":"mj2","video/mp4":"mp4","video/mpeg":"mpeg","video/quicktime":"qt","video/vnd.dece.hd":"uvh","video/vnd.dece.mobile":"uvm","video/vnd.dece.pd":"uvp","video/vnd.dece.sd":"uvs","video/vnd.dece.video":"uvv","video/vnd.dvb.file":"dvb","video/vnd.fvt":"fvt","video/vnd.mpegurl":"mxu","video/vnd.ms-playready.media.pyv":"pyv","video/vnd.uvvu.mp4":"uvu","video/vnd.vivo":"viv","video/webm":"webm","video/x-f4v":"f4v","video/x-fli":"fli","video/x-flv":"flv","video/x-m4v":"m4v","video/x-matroska":"mkv","video/x-mng":"mng","video/x-ms-asf":"asf","video/x-ms-vob":"vob","video/x-ms-wmx":"wmx","video/x-ms-wvx":"wvx","video/x-msvideo":"avi","video/x-sgi-movie":"movie","video/x-smv":"smv","x-conference/x-cooltalk":"ice","text/x-sql":"sql","image/x-pixlr-data":"pxd","image/x-adobe-dng":"dng","image/x-sketch":"sketch","image/x-xcf":"xcf","audio/amr":"amr","application/plt":"plt","application/sat":"sat","application/step":"step","text/x-httpd-cgi":"cgi","text/x-asap":"asp","text/x-jsp":"jsp"},i.prototype._options={cdns:{ace:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.2",codemirror:"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0",ckeditor:"https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.11.2",ckeditor5:"https://cdn.ckeditor.com/ckeditor5/11.2.0",tinymce:"https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.0.0",simplemde:"https://cdnjs.cloudflare.com/ajax/libs/simplemde/1.11.2",fabric16:"https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.6.7",tui:"https://uicdn.toast.com",hls:"https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.10.1/hls.min.js",dash:"https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.9.2/dash.all.min.js",flv:"https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.5.0/flv.min.js",prettify:"https://cdn.jsdelivr.net/gh/google/code-prettify@453bd5f51e61245339b738b1bbdd42d7848722ba/loader/run_prettify.js",psd:"https://cdnjs.cloudflare.com/ajax/libs/psd.js/3.2.0/psd.min.js",rar:"https://cdn.jsdelivr.net/gh/nao-pon/rar.js@6cef13ec66dd67992fc7f3ea22f132d770ebaf8b/rar.min.js",zlibUnzip:"https://cdn.jsdelivr.net/gh/imaya/zlib.js@0.3.1/bin/unzip.min.js",zlibGunzip:"https://cdn.jsdelivr.net/gh/imaya/zlib.js@0.3.1/bin/gunzip.min.js",
14
- marked:"https://cdnjs.cloudflare.com/ajax/libs/marked/0.6.0/marked.min.js",sparkmd5:"https://cdnjs.cloudflare.com/ajax/libs/spark-md5/3.0.0/spark-md5.min.js",jssha:"https://cdnjs.cloudflare.com/ajax/libs/jsSHA/2.3.1/sha.js",amr:"https://cdn.jsdelivr.net/gh/yxl/opencore-amr-js@dcf3d2b5f384a1d9ded2a54e4c137a81747b222b/js/amrnb.js"},url:"",requestType:"get",cors:null,requestMaxConn:3,transport:{},urlUpload:"",dragUploadAllow:"auto",overwriteUploadConfirm:!0,uploadMaxChunkSize:10485760,folderUploadExclude:{win:/^(?:desktop\.ini|thumbs\.db)$/i,mac:/^\.ds_store$/i},iframeTimeout:0,customData:{},handlers:{},customHeaders:{},xhrFields:{},lang:"en",baseUrl:"",i18nBaseUrl:"",cssAutoLoad:!0,themes:{},theme:null,maxErrorDialogs:5,cssClass:"",commands:["*"],commandsOptions:{getfile:{onlyURL:!1,multiple:!1,folders:!1,oncomplete:"",onerror:"",getPath:!0,getImgSize:!1},open:{method:"post",into:"window",selectAction:"open"},opennew:{url:"",useOriginQuery:!0},upload:{ui:"button"},download:{maxRequests:10,minFilesZipdl:2},quicklook:{autoplay:!0,width:450,height:300,mediaControlsList:"",pdfToolbar:!0,textMaxlen:2e3,contain:!1,docked:0,dockHeight:"auto",dockAutoplay:!1,googleMapsApiKey:"",googleMapsOpts:{maps:{},kml:{suppressInfoWindows:!1,preserveViewport:!1}},viewerjs:{url:"",mimes:["application/pdf","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation"]},sharecadMimes:[],googleDocsMimes:[],officeOnlineMimes:[],getDimThreshold:2e5,mimeRegexNotEmptyCheck:/^application\/vnd\.google-apps\./},edit:{dialogWidth:void 0,mimes:[],makeTextMimes:["text/plain","text/css","text/html"],useStoredEditor:!1,editorMaximized:!1,editors:[],encodings:["Big5","Big5-HKSCS","Cp437","Cp737","Cp775","Cp850","Cp852","Cp855","Cp857","Cp858","Cp862","Cp866","Cp874","EUC-CN","EUC-JP","EUC-KR","GB18030","ISO-2022-CN","ISO-2022-JP","ISO-2022-KR","ISO-8859-1","ISO-8859-2","ISO-8859-3","ISO-8859-4","ISO-8859-5","ISO-8859-6","ISO-8859-7","ISO-8859-8","ISO-8859-9","ISO-8859-13","ISO-8859-15","KOI8-R","KOI8-U","Shift-JIS","Windows-1250","Windows-1251","Windows-1252","Windows-1253","Windows-1254","Windows-1257"],extraOptions:{uploadOpts:{},tuiImgEditOpts:{iconsPath:void 0,theme:{}},pixo:{apikey:""},creativeCloudApiKey:"",managerUrl:null,ckeditor:{},ckeditor5:{mode:"inline"},tinymce:{},onlineConvert:{maxSize:100,showLink:!0}}},fullscreen:{mode:"screen"},search:{incsearch:{enable:!0,minlen:1,wait:500},searchTypes:{SearchMime:{name:"btnMime",title:"searchMime"}}},info:{nullUrlDirLinkSelf:!0,hideItems:[],showHashMaxsize:104857600,showHashAlgorisms:["md5","sha256"],custom:{}},mkdir:{intoNewFolderToolbtn:!1},resize:{grid8px:"disable",presetSize:[[320,240],[400,400],[640,480],[800,600]],getDimThreshold:204800,dimSubImgSize:307200},rm:{quickTrash:!0,infoCheckWait:10,toTrashMaxItems:1e3},help:{view:["about","shortcuts","help","integrations","debug"],helpSource:""},preference:{width:600,height:400,categories:null,prefs:null,langs:null,selectActions:["open","edit/download","resize/edit/download","download","quicklook"]}},bootCallback:null,getFileCallback:null,defaultView:"icons",startPathHash:"",sound:!0,ui:["toolbar","places","tree","path","stat"],uiOptions:{toolbar:[["home","back","forward","up","reload"],["netmount"],["mkdir","mkfile","upload"],["open","download","getfile"],["undo","redo"],["copy","cut","paste","rm","empty","hide"],["duplicate","rename","edit","resize","chmod"],["selectall","selectnone","selectinvert"],["quicklook","info"],["extract","archive"],["search"],["view","sort"],["preference","help"],["fullscreen"]],toolbarExtra:{displayTextLabel:!1,labelExcludeUA:["Mobile"],autoHideUA:["Mobile"],defaultHides:["home","reload"],showPreferenceButton:"none",preferenceInContextmenu:!0},tree:{attrTitle:!0,openRootOnLoad:!0,openCwdOnOpen:!0,syncTree:!0,subTreeMax:100,subdirsMaxConn:2,subdirsAtOnce:5,durations:{slideUpDown:"fast",autoScroll:"fast"}},navbar:{minWidth:150,maxWidth:500,autoHideUA:[]},navdock:{disabled:!1,initMaxHeight:"50%",maxHeight:"90%"},cwd:{oldSchool:!1,showSelectCheckboxUA:["Touch"],listView:{columns:["perm","date","size","kind"],columnsCustomName:{},fixedHeader:!0},iconsView:{size:0,sizeMax:3,sizeNames:{0:"viewSmall",1:"viewMedium",2:"viewLarge",3:"viewExtraLarge"}}},path:{toWorkzoneWithoutNavbar:!0},dialog:{focusOnMouseOver:!0},toast:{animate:{showMethod:"fadeIn",showDuration:300,showEasing:"swing",timeOut:3e3,hideMethod:"fadeOut",hideDuration:1500,hideEasing:"swing"}}},dispInlineRegex:"^(?:(?:image|video|audio)|application/(?:x-mpegURL|dash+xml)|(?:text/plain|application/pdf)$)",onlyMimes:[],sortRules:{},sortType:"name",sortOrder:"asc",sortStickFolders:!0,sortAlsoTreeview:!1,clientFormatDate:!0,UTCDate:!1,dateFormat:"",fancyDateFormat:"",fileModeStyle:"both",width:"auto",height:400,heightBase:null,resizable:!0,notifyDelay:500,notifyDialog:{position:{},width:null},dialogContained:!1,allowShortcuts:!0,rememberLastDir:!0,reloadClearHistory:!1,useBrowserHistory:!0,showFiles:50,showThreshold:50,validName:!1,fileFilter:!1,backupSuffix:"~",sync:0,syncStart:!0,loadTmbs:5,cookie:{expires:30,domain:"",path:"/",secure:!1},contextmenu:{navbar:["open","opennew","download","|","upload","mkdir","|","copy","cut","paste","duplicate","|","rm","empty","hide","|","rename","|","archive","|","places","info","chmod","netunmount"],cwd:["undo","redo","|","back","up","reload","|","upload","mkdir","mkfile","paste","|","empty","hide","|","view","sort","selectall","colwidth","|","places","info","chmod","netunmount","|","fullscreen","|","preference"],files:["getfile","|","open","opennew","download","opendir","quicklook","|","upload","mkdir","|","copy","cut","paste","duplicate","|","rm","empty","hide","|","rename","edit","resize","|","archive","extract","|","selectall","selectinvert","|","places","info","chmod","netunmount"]},enableAlways:!1,enableByMouseOver:!0,windowCloseConfirm:["hasNotifyDialog","editingFile"],rawStringDecoder:"object"==typeof Encoding&&e.isFunction(Encoding.convert)?function(e){return Encoding.convert(e,{to:"UNICODE",type:"string"})}:null,debug:["error","warning","event-destroy"]},i.prototype._options.commandsOptions.netmount={ftp:{name:"FTP",inputs:{host:e('<input type="text"/>'),port:e('<input type="number" placeholder="21" class="elfinder-input-optional"/>'),path:e('<input type="text" value="/"/>'),user:e('<input type="text"/>'),pass:e('<input type="password" autocomplete="new-password"/>'),FTPS:e('<input type="checkbox" value="1" title="File Transfer Protocol over SSL/TLS"/>'),encoding:e('<input type="text" placeholder="Optional" class="elfinder-input-optional"/>'),locale:e('<input type="text" placeholder="Optional" class="elfinder-input-optional"/>')}},dropbox2:i.prototype.makeNetmountOptionOauth("dropbox2","Dropbox","Dropbox",{noOffline:!0,root:"/",pathI18n:"path",integrate:{title:"Dropbox.com",link:"https://www.dropbox.com"}}),googledrive:i.prototype.makeNetmountOptionOauth("googledrive","Google Drive","Google",{integrate:{title:"Google Drive",link:"https://www.google.com/drive/"}}),onedrive:i.prototype.makeNetmountOptionOauth("onedrive","One Drive","OneDrive",{integrate:{title:"Microsoft OneDrive",link:"https://onedrive.live.com"}}),box:i.prototype.makeNetmountOptionOauth("box","Box","Box",{noOffline:!0,integrate:{title:"Box.com",link:"https://www.box.com"}})},i.prototype.history=function(t){var n,i=this,a=!0,o=[],r=function(){o=[t.cwd().hash],n=0,a=!0},s=t.options.useBrowserHistory&&window.history&&window.history.pushState?window.history:null,l=function(s){return s&&i.canForward()||!s&&i.canBack()?(a=!1,t.exec("open",o[s?++n:--n]).fail(r)):e.Deferred().reject()},c=function(e){!s||s.state&&s.state.thash===e||s.pushState({thash:e},null,location.pathname+location.search+(e?"#elf_"+e:""))};this.canBack=function(){return n>0},this.canForward=function(){return n<o.length-1},this.back=l,this.forward=function(){return l(!0)},t.bind("init",function(){s&&!s.state&&c(t.startDir())}).open(function(){var e=o.length,i=t.cwd().hash;a&&(n>=0&&e>n+1&&o.splice(n+1),o[o.length-1]!=i&&o.push(i),n=o.length-1),a=!0,c(i)}).reload(t.options.reloadClearHistory&&r)},i.prototype.command=function(t){this.fm=t,this.name="",this.dialogClass="",this.className="",this.title="",this.linkedCmds=[],this.state=-1,this.alwaysEnabled=!1,this.noChangeDirOnRemovedCwd=!1,this._disabled=!1,this.disableOnSearch=!1,this.updateOnSelect=!0,this.syncTitleOnChange=!1,this.keepContextmenu=!1,this._handlers={enable:function(){this.update(void 0,this.value)},disable:function(){this.update(-1,this.value)},"open reload load sync":function(){this._disabled=!(this.alwaysEnabled||this.fm.isCommandEnabled(this.name)),this.update(void 0,this.value),this.change()}},this.handlers={},this.shortcuts=[],this.options={ui:"button"},this.listeners=[],this.setup=function(t,n){var i,a,o,r=this,s=this.fm,l=function(t){var n=t.callback||function(e){s.exec(r.name,void 0,{_userAction:!0,_currentType:"shortcut"})};t.callback=function(t){var i,a={};r.enabled()&&(s.searchStatus.state<2?i=s.isCommandEnabled(r.name):(e.each(s.selected(),function(t,n){s.optionsByHashes[n]?a[n]=!0:e.each(s.volOptions,function(e){if(!a[e]&&0===n.indexOf(e))return a[e]=!0,!1})}),e.each(a,function(e){if(i=s.isCommandEnabled(r.name,e),!i)return!1})),i&&(r.event=t,n.call(r),delete r.event))}};for(this.name=t,this.title=s.messages["cmd"+t]?s.i18n("cmd"+t):this.extendsCmd&&s.messages["cmd"+this.extendsCmd]?s.i18n("cmd"+this.extendsCmd):t,this.options=Object.assign({},this.options,n),this.listeners=[],this.dialogClass="elfinder-dialog-"+t,n.shortcuts&&("function"==typeof n.shortcuts?o=n.shortcuts(this.fm,this.shortcuts):Array.isArray(n.shortcuts)&&(o=n.shortcuts),this.shortcuts=o||[]),this.updateOnSelect&&(this._handlers.select=function(){this.update(void 0,this.value)}),e.each(Object.assign({},r._handlers,r.handlers),function(t,n){s.bind(t,e.proxy(n,r))}),i=0;i<this.shortcuts.length;i++)a=this.shortcuts[i],l(a),!a.description&&(a.description=this.title),s.shortcut(a);this.disableOnSearch&&s.bind("search searchend",function(){r._disabled="search"===this.type||!(this.alwaysEnabled||s.isCommandEnabled(t)),r.update(void 0,r.value)}),this.init()},this.init=function(){},this.exec=function(t,n){return e.Deferred().reject()},this.getUndo=function(e,t){return!1},this.disabled=function(){return this.state<0},this.enabled=function(){return this.state>-1},this.active=function(){return this.state>0},this.getstate=function(){return-1},this.update=function(e,t){var n=this.state,i=this.value;this._disabled&&0===this.fm.searchStatus?this.state=-1:this.state=void 0!==e?e:this.getstate(),this.value=t,n==this.state&&i==this.value||this.change()},this.change=function(e){var t,n;if("function"==typeof e)this.listeners.push(e);else for(n=0;n<this.listeners.length;n++){t=this.listeners[n];try{t(this.state,this.value)}catch(i){this.fm.debug("error",i)}}return this},this.hashes=function(n){return n?e.grep(Array.isArray(n)?n:[n],function(e){return!!t.file(e)}):t.selected()},this.files=function(t){var n=this.fm;return t?e.map(Array.isArray(t)?t:[t],function(e){return n.file(e)||null}):n.selectedFiles()},this.fmDialog=function(e,t){return t.cssClass?t.cssClass+=" "+this.dialogClass:t.cssClass=this.dialogClass,this.fm.dialog(e,t)}},i.prototype.resources={"class":{hover:"ui-state-hover",active:"ui-state-active",disabled:"ui-state-disabled",draggable:"ui-draggable",droppable:"ui-droppable",adroppable:"elfinder-droppable-active",cwdfile:"elfinder-cwd-file",cwd:"elfinder-cwd",tree:"elfinder-tree",treeroot:"elfinder-navbar-root",navdir:"elfinder-navbar-dir",navdirwrap:"elfinder-navbar-dir-wrapper",navarrow:"elfinder-navbar-arrow",navsubtree:"elfinder-navbar-subtree",navcollapse:"elfinder-navbar-collapsed",navexpand:"elfinder-navbar-expanded",treedir:"elfinder-tree-dir",placedir:"elfinder-place-dir",searchbtn:"elfinder-button-search",editing:"elfinder-to-editing",preventback:"elfinder-prevent-back",tabstab:"ui-state-default ui-tabs-tab ui-corner-top ui-tab",tabsactive:"ui-tabs-active ui-state-active"},tpl:{perms:'<span class="elfinder-perms"/>',lock:'<span class="elfinder-lock"/>',symlink:'<span class="elfinder-symlink"/>',navicon:'<span class="elfinder-nav-icon"/>',navspinner:'<span class="elfinder-spinner elfinder-navbar-spinner"/>',navdir:'<div class="elfinder-navbar-wrapper{root}"><span id="{id}" class="ui-corner-all elfinder-navbar-dir {cssclass}"{title}><span class="elfinder-navbar-arrow"/><span class="elfinder-navbar-icon" {style}/>{symlink}{permissions}{name}</span><div class="elfinder-navbar-subtree" style="display:none"/></div>',placedir:'<div class="elfinder-navbar-wrapper"><span id="{id}" class="ui-corner-all elfinder-navbar-dir {cssclass}"{title}><span class="elfinder-navbar-arrow"/><span class="elfinder-navbar-icon" {style}/>{symlink}{permissions}{name}</span><div class="elfinder-navbar-subtree" style="display:none"/></div>'},mimes:{text:["application/dash+xml","application/docbook+xml","application/javascript","application/json","application/plt","application/sat","application/sql","application/step","application/vnd.hp-hpgl","application/x-awk","application/x-config","application/x-csh","application/x-empty","application/x-mpegurl","application/x-perl","application/x-php","application/x-web-config","application/xhtml+xml","application/xml","audio/x-mp3-playlist","image/cgm","image/svg+xml","image/vnd.dxf","model/iges"]},mixin:{make:function(){var t,n,i,a,o,r,s,l,c,d,p=this,u=this.fm,h=this.name,f=this.requestCmd||h,m=u.getUI("workzone"),g=this.origin&&"navbar"===this.origin?"tree":"cwd",v="tree"===g,b=v?"navHash2Elm":"cwdHash2Elm",y=!v&&"list"!=u.storage("view"),w=u.selected(),x=this.move||!1,k=m.hasClass("elfinder-cwd-wrapper-empty"),C=function(){requestAnimationFrame(function(){U&&U.trigger("blur")})},z=function(){F.is(":hidden")||F.elfinderoverlay("hide").off("click close",E),i.removeClass("ui-front").css("position","").off("unselect."+u.namespace,C),y?n&&n.css("max-height",""):v||i.css("width","").parent("td").css("overflow","")},T=e.Deferred().fail(function(e){r&&o.attr("class",r),k&&m.addClass("elfinder-cwd-wrapper-empty"),w&&(x&&u.trigger("unlockfiles",{files:w}),u.clipboard([]),u.trigger("selectfiles",{files:w})),e&&u.error(e)}).always(function(){z(),D(),u.enable().unbind("open",q).trigger("resMixinMake")}),A="tmp_"+parseInt(1e5*Math.random()),S=this.data&&this.data.target?this.data.target:v?u.file(w[0]).hash:u.cwd().hash,I=new Date,O={hash:A,phash:S,name:u.uniqueName(this.prefix,S),mime:this.mime,read:!0,write:!0,date:"Today "+I.getHours()+":"+I.getMinutes(),move:x},j=(u.getUI(g).trigger("create."+u.namespace,O),this.data||{}),M=u[b](A),F=u.getUI("overlay"),D=function(){M&&M.length&&(U.off(),M.hide(),u.unselectfiles({files:[A]}).unbind("resize",R),requestAnimationFrame(function(){v?M.closest(".elfinder-navbar-wrapper").remove():M.remove()}))},E=function(e){F.is(":hidden")||i.css("z-index",""),H||(D(),T.reject(),e&&(e.stopPropagation(),e.preventDefault()))},U=e(y?"<textarea/>":'<input type="text"/>').on("keyup text",function(){y?(this.style.height="1px",this.style.height=this.scrollHeight+"px"):t&&(this.style.width=t+"px",this.scrollWidth>t&&(this.style.width=this.scrollWidth+10+"px"))}).on("keydown",function(t){t.stopImmediatePropagation(),t.keyCode==e.ui.keyCode.ESCAPE?T.reject():t.keyCode==e.ui.keyCode.ENTER&&(t.preventDefault(),U.trigger("blur"))}).on("mousedown click dblclick",function(e){e.stopPropagation(),"dblclick"===e.type&&e.preventDefault()}).on("blur",function(){var t,n=e.trim(U.val()),o=U.parent(),r=!0;if(F.is(":hidden")||i.css("z-index",""),""===n)return E();if(!H&&o.length){if(u.options.validName&&u.options.validName.test)try{r=u.options.validName.test(n)}catch(s){r=!1}if(!n||"."===n||".."===n||!r)return H=!0,u.error("directory"===O.mime?"errInvDirname":"errInvName",{modal:!0,close:function(){setTimeout(P,120)}}),!1;if(u.fileByName(n,S))return H=!0,u.error(["errExists",n],{modal:!0,close:function(){setTimeout(P,120)}}),!1;t=w&&x?u.exec("cut",w):null,e.when(t).done(function(){var t={},i={};z(),U.hide().before(e("<span>").text(n)),u.lockfiles({files:[A]}),u.request({data:Object.assign({cmd:f,name:n,target:S},j||{}),notify:{type:f,cnt:1},preventFail:!0,syncOnFail:!0,navigate:{toast:t}}).fail(function(t){u.unlockfiles({files:[A]}),H=!0,U.show().prev().remove(),u.error(t,{modal:!0,close:function(){Array.isArray(t)&&e.inArray("errUploadMime",t)!==-1?T.notify("errUploadMime").reject():setTimeout(P,120)}})}).done(function(n){if(n&&n.added&&n.added[0]){var o,r=n.added[0],s=r.hash,l=(u[b](s),{directory:{cmd:"open",msg:"cmdopendir"},text:{cmd:"edit",msg:"cmdedit"},"default":{cmd:"open",msg:"cmdopen"}});w&&x&&u.one(f+"done",function(){u.exec("paste",s)}),x||(u.mimeIsText(r.mime)&&!u.mimesCanMakeEmpty[r.mime]&&u.mimeTypes[r.mime]&&(u.trigger("canMakeEmptyFile",{mimes:[r.mime],unshift:!0}),o={},o[r.mime]=u.mimeTypes[r.mime],u.storage("mkfileTextMimes",Object.assign(o,u.storage("mkfileTextMimes")||{}))),Object.assign(i,a||l[r.mime]||l[r.mime.split("/")[0]]||l[u.mimesCanMakeEmpty[r.mime]||e.inArray(r.mime,u.resources.mimes.text)!==-1?"text":"none"]||l["default"]),Object.assign(t,i.cmd?{incwd:{msg:u.i18n(["complete",u.i18n("cmd"+h)]),action:i},inbuffer:{msg:u.i18n(["complete",u.i18n("cmd"+h)]),action:i}}:{inbuffer:{msg:u.i18n(["complete",u.i18n("cmd"+h)])}}))}T.resolve(n)})}).fail(function(){T.reject()})}}).on("dragenter dragleave dragover drop",function(e){e.stopPropagation()}),P=function(){var e=u.splitFileExtention(U.val())[0];H||!u.UA.Mobile||u.UA.iOS||(F.on("click close",E).elfinderoverlay("show"),i.css("z-index",F.css("z-index")+1)),H=!1,!u.enabled()&&u.enable(),U.trigger("focus").trigger("select"),U[0].setSelectionRange&&U[0].setSelectionRange(0,e.length)},R=function(){M.trigger("scrolltoview",{blink:!1})},q=function(){T&&"pending"===T.state()&&T.reject()},H=!1;return u.isCommandEnabled(f,S)&&M.length?(e.isPlainObject(p.nextAction)&&(a=Object.assign({},p.nextAction)),v?(o=u[b](S),s=u.res("class","navcollapse"),l=u.res("class","navexpand"),c=u.res("class","navarrow"),d=u.res("class","navsubtree"),M.closest("."+d).show(),o.hasClass(s)||(r=o.attr("class"),o.addClass(s+" "+l+" elfinder-subtree-loaded")),o.is("."+s+":not(."+l+")")&&o.children("."+c).trigger("click").data("dfrd").done(function(){U.val()===O.name&&U.val(u.uniqueName(p.prefix,S)).trigger("select").trigger("focus")}),n=M.contents().filter(function(){return 3==this.nodeType&&e(this).parent().attr("id")===u.navHash2Id(O.hash)}),i=n.parent(),n.replaceWith(U.val(O.name))):(k&&m.removeClass("elfinder-cwd-wrapper-empty"),n=M.find(".elfinder-cwd-filename"),i=n.parent(),y?n.css("max-height","none"):(t=i.width(),i.width(t-15).parent("td").css("overflow","visible")),n.empty().append(U.val(O.name))),i.addClass("ui-front").css("position","relative").on("unselect."+u.namespace,C),u.bind("resize",R).one("open",q),U.trigger("keyup"),P(),T):T.reject()}},blink:function(e,t){var n,i={slowonce:function(){e.hide().delay(250).fadeIn(750).delay(500).fadeOut(3500)},lookme:function(){e.show().fadeOut(500).fadeIn(750)}};t=t||"slowonce",n=i[t]||i.lookme,e.stop(!0,!0),n()}},e.fn.dialogelfinder=function(t,n){var i,a,o="elfinderPosition",r="elfinderDestroyOnClose";if(e.isPlainObject(t))this.not(".elfinder").each(function(){t.handlers=t.handlers||{};var i,a=e(this),s=(e(document),e('<div class="ui-widget-header dialogelfinder-drag ui-corner-top">'+(t.title||"Files")+"</div>")),l=(e('<a href="#" class="dialogelfinder-drag-close ui-corner-all"><span class="ui-icon ui-icon-closethick"> </span></a>').appendTo(s).on("click",function(e){e.preventDefault(),a.dialogelfinder("close")}),t.handlers.init);t.handlers.init=function(e,t){a.prepend(s),l&&l(e,t)},i=a.addClass("elfinder dialogelfinder touch-punch").css("position","absolute").hide().appendTo("body").draggable({handle:".dialogelfinder-drag",containment:"window",stop:function(){a.trigger("resize"),i.trigger("resize")}}).elfinder(t,n).elfinder("instance"),i.reloadCallback=function(e,t){i.destroy(),e.handlers.init=l,a.dialogelfinder(e,t).dialogelfinder("open")},a.width(parseInt(a.width())||840).data(r,!!t.destroyOnClose).find(".elfinder-toolbar").removeClass("ui-corner-top"),t.position&&a.data(o,t.position),t.autoOpen!==!1&&e(this).dialogelfinder("open")});else if("open"===t)i=e(this),a=i.data(o)||{top:parseInt(e(document).scrollTop()+(e(window).height()<i.height()?2:(e(window).height()-i.height())/2)),left:parseInt(e(document).scrollLeft()+(e(window).width()<i.width()?2:(e(window).width()-i.width())/2))},i.is(":hidden")&&(i.addClass("ui-front").css(a).show().trigger("resize"),setTimeout(function(){i.trigger("resize").trigger("mousedown")},200));else if("close"===t)i=e(this).removeClass("ui-front"),i.is(":visible")&&(i.data(r)?i.elfinder("destroy").remove():i.elfinder("close"));else if("instance"===t)return e(this).getElFinder();return this},"function"==typeof i&&i.prototype.i18&&(i.prototype.i18.en={translator:"Troex Nevelin &lt;troex@fury.scancode.ru&gt;, Naoki Sawada &lt;hypweb+elfinder@gmail.com&gt;",language:"English",direction:"ltr",dateFormat:"M d, Y h:i A",fancyDateFormat:"$1 h:i A",nonameDateFormat:"ymd-His",messages:{error:"Error",errUnknown:"Unknown error.",errUnknownCmd:"Unknown command.",errJqui:"Invalid jQuery UI configuration. Selectable, draggable and droppable components must be included.",errNode:"elFinder requires DOM Element to be created.",errURL:"Invalid elFinder configuration! URL option is not set.",errAccess:"Access denied.",errConnect:"Unable to connect to backend.",errAbort:"Connection aborted.",errTimeout:"Connection timeout.",errNotFound:"Backend not found.",errResponse:"Invalid backend response.",errConf:"Invalid backend configuration.",errJSON:"PHP JSON module not installed.",errNoVolumes:"Readable volumes not available.",errCmdParams:'Invalid parameters for command "$1".',errDataNotJSON:"Data is not JSON.",errDataEmpty:"Data is empty.",errCmdReq:"Backend request requires command name.",errOpen:'Unable to open "$1".',errNotFolder:"Object is not a folder.",errNotFile:"Object is not a file.",errRead:'Unable to read "$1".',errWrite:'Unable to write into "$1".',errPerm:"Permission denied.",errLocked:'"$1" is locked and can not be renamed, moved or removed.',errExists:'Item named "$1" already exists.',errInvName:"Invalid file name.",errInvDirname:"Invalid folder name.",errFolderNotFound:"Folder not found.",errFileNotFound:"File not found.",errTrgFolderNotFound:'Target folder "$1" not found.',errPopup:"Browser prevented opening popup window. To open file enable it in browser options.",errMkdir:'Unable to create folder "$1".',errMkfile:'Unable to create file "$1".',errRename:'Unable to rename "$1".',errCopyFrom:'Copying files from volume "$1" not allowed.',errCopyTo:'Copying files to volume "$1" not allowed.',errMkOutLink:"Unable to create a link to outside the volume root.",errUpload:"Upload error.",errUploadFile:'Unable to upload "$1".',errUploadNoFiles:"No files found for upload.",errUploadTotalSize:"Data exceeds the maximum allowed size.",errUploadFileSize:"File exceeds maximum allowed size.",errUploadMime:"File type not allowed.",errUploadTransfer:'"$1" transfer error.',errUploadTemp:"Unable to make temporary file for upload.",errNotReplace:'Object "$1" already exists at this location and can not be replaced by object with another type.',errReplace:'Unable to replace "$1".',errSave:'Unable to save "$1".',errCopy:'Unable to copy "$1".',errMove:'Unable to move "$1".',errCopyInItself:'Unable to copy "$1" into itself.',errRm:'Unable to remove "$1".',errTrash:"Unable into trash.",errRmSrc:"Unable remove source file(s).",errExtract:'Unable to extract files from "$1".',errArchive:"Unable to create archive.",errArcType:"Unsupported archive type.",errNoArchive:"File is not archive or has unsupported archive type.",errCmdNoSupport:"Backend does not support this command.",errReplByChild:'The folder "$1" can\'t be replaced by an item it contains.',errArcSymlinks:"For security reason denied to unpack archives contains symlinks or files with not allowed names.",errArcMaxSize:"Archive files exceeds maximum allowed size.",errResize:'Unable to resize "$1".',errResizeDegree:"Invalid rotate degree.",errResizeRotate:"Unable to rotate image.",errResizeSize:"Invalid image size.",errResizeNoChange:"Image size not changed.",errUsupportType:"Unsupported file type.",errNotUTF8Content:'File "$1" is not in UTF-8 and cannot be edited.',errNetMount:'Unable to mount "$1".',errNetMountNoDriver:"Unsupported protocol.",errNetMountFailed:"Mount failed.",errNetMountHostReq:"Host required.",errSessionExpires:"Your session has expired due to inactivity.",errCreatingTempDir:'Unable to create temporary directory: "$1"',errFtpDownloadFile:'Unable to download file from FTP: "$1"',errFtpUploadFile:'Unable to upload file to FTP: "$1"',errFtpMkdir:'Unable to create remote directory on FTP: "$1"',errArchiveExec:'Error while archiving files: "$1"',errExtractExec:'Error while extracting files: "$1"',errNetUnMount:"Unable to unmount.",errConvUTF8:"Not convertible to UTF-8",errFolderUpload:"Try the modern browser, If you'd like to upload the folder.",errSearchTimeout:'Timed out while searching "$1". Search result is partial.',errReauthRequire:"Re-authorization is required.",errMaxTargets:"Max number of selectable items is $1.",errRestore:"Unable to restore from the trash. Can't identify the restore destination.",errEditorNotFound:"Editor not found to this file type.",errServerError:"Error occurred on the server side.",errEmpty:'Unable to empty folder "$1".',moreErrors:"There are $1 more errors.",cmdarchive:"Create archive",cmdback:"Back",cmdcopy:"Copy",cmdcut:"Cut",cmddownload:"Download",cmdduplicate:"Duplicate",cmdedit:"Edit file",cmdextract:"Extract files from archive",cmdforward:"Forward",cmdgetfile:"Select files",cmdhelp:"About this software",cmdhome:"Root",cmdinfo:"Get info",cmdmkdir:"New folder",cmdmkdirin:"Into New Folder",cmdmkfile:"New file",cmdopen:"Open",cmdpaste:"Paste",cmdquicklook:"Preview",cmdreload:"Reload",cmdrename:"Rename",cmdrm:"Delete",cmdtrash:"Into trash",cmdrestore:"Restore",cmdsearch:"Find files",cmdup:"Go to parent folder",cmdupload:"Upload files",cmdview:"View",cmdresize:"Resize & Rotate",cmdsort:"Sort",cmdnetmount:"Mount network volume",cmdnetunmount:"Unmount",cmdplaces:"To Places",cmdchmod:"Change mode",cmdopendir:"Open a folder",cmdcolwidth:"Reset column width",cmdfullscreen:"Full Screen",cmdmove:"Move",cmdempty:"Empty the folder",cmdundo:"Undo",cmdredo:"Redo",cmdpreference:"Preferences",cmdselectall:"Select all",cmdselectnone:"Select none",cmdselectinvert:"Invert selection",cmdopennew:"Open in new window",cmdhide:"Hide (Preference)",cmdshare:"Share",btnClose:"Close",btnSave:"Save",btnRm:"Remove",btnApply:"Apply",btnCancel:"Cancel",btnNo:"No",btnYes:"Yes",btnMount:"Mount",btnApprove:"Goto $1 & approve",btnUnmount:"Unmount",btnConv:"Convert",btnCwd:"Here",btnVolume:"Volume",btnAll:"All",btnMime:"MIME Type",btnFileName:"Filename",btnSaveClose:"Save & Close",btnBackup:"Backup",btnRename:"Rename",btnRenameAll:"Rename(All)",btnPrevious:"Prev ($1/$2)",btnNext:"Next ($1/$2)",btnSaveAs:"Save As",ntfopen:"Open folder",ntffile:"Open file",ntfreload:"Reload folder content",ntfmkdir:"Creating folder",ntfmkfile:"Creating files",ntfrm:"Delete items",ntfcopy:"Copy items",ntfmove:"Move items",ntfprepare:"Checking existing items",ntfrename:"Rename files",ntfupload:"Uploading files",ntfdownload:"Downloading files",ntfsave:"Save files",ntfarchive:"Creating archive",ntfextract:"Extracting files from archive",ntfsearch:"Searching files",ntfresize:"Resizing images",ntfsmth:"Doing something",ntfloadimg:"Loading image",ntfnetmount:"Mounting network volume",ntfnetunmount:"Unmounting network volume",ntfdim:"Acquiring image dimension",ntfreaddir:"Reading folder infomation",ntfurl:"Getting URL of link",ntfchmod:"Changing file mode",ntfpreupload:"Verifying upload file name",ntfzipdl:"Creating a file for download",ntfparents:"Getting path infomation",ntfchunkmerge:"Processing the uploaded file",ntftrash:"Doing throw in the trash",ntfrestore:"Doing restore from the trash",ntfchkdir:"Checking destination folder",ntfundo:"Undoing previous operation",ntfredo:"Redoing previous undone",ntfchkcontent:"Checking contents",volume_Trash:"Trash",dateUnknown:"unknown",Today:"Today",Yesterday:"Yesterday",msJan:"Jan",msFeb:"Feb",msMar:"Mar",msApr:"Apr",msMay:"May",msJun:"Jun",msJul:"Jul",msAug:"Aug",msSep:"Sep",msOct:"Oct",msNov:"Nov",msDec:"Dec",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",Sunday:"Sunday",Monday:"Monday",Tuesday:"Tuesday",Wednesday:"Wednesday",Thursday:"Thursday",Friday:"Friday",Saturday:"Saturday",Sun:"Sun",Mon:"Mon",Tue:"Tue",Wed:"Wed",Thu:"Thu",Fri:"Fri",Sat:"Sat",sortname:"by name",sortkind:"by kind",sortsize:"by size",sortdate:"by date",sortFoldersFirst:"Folders first",sortperm:"by permission",sortmode:"by mode",sortowner:"by owner",sortgroup:"by group",sortAlsoTreeview:"Also Treeview","untitled file.txt":"NewFile.txt","untitled folder":"NewFolder",Archive:"NewArchive","untitled file":"NewFile.$1",extentionfile:"$1: File",extentiontype:"$1: $2",confirmReq:"Confirmation required",confirmRm:"Are you sure you want to permanently remove items?<br/>This cannot be undone!",confirmRepl:"Replace old file with new one? (If it contains folders, it will be merged. To backup and replace, select Backup.)",confirmRest:"Replace existing item with the item in trash?",confirmConvUTF8:"Not in UTF-8<br/>Convert to UTF-8?<br/>Contents become UTF-8 by saving after conversion.",confirmNonUTF8:"Character encoding of this file couldn't be detected. It need to temporarily convert to UTF-8 for editting.<br/>Please select character encoding of this file.",confirmNotSave:"It has been modified.<br/>Losing work if you do not save changes.",confirmTrash:"Are you sure you want to move items to trash bin?",apllyAll:"Apply to all",name:"Name",size:"Size",perms:"Permissions",modify:"Modified",kind:"Kind",read:"read",write:"write",noaccess:"no access",and:"and",unknown:"unknown",selectall:"Select all items",selectfiles:"Select item(s)",selectffile:"Select first item",selectlfile:"Select last item",viewlist:"List view",viewicons:"Icons view",viewSmall:"Small icons",viewMedium:"Medium icons",viewLarge:"Large icons",viewExtraLarge:"Extra large icons",places:"Places",calc:"Calculate",path:"Path",aliasfor:"Alias for",locked:"Locked",dim:"Dimensions",files:"Files",folders:"Folders",items:"Items",yes:"yes",no:"no",link:"Link",searcresult:"Search results",selected:"selected items",about:"About",shortcuts:"Shortcuts",help:"Help",webfm:"Web file manager",ver:"Version",protocolver:"protocol version",homepage:"Project home",docs:"Documentation",github:"Fork us on GitHub",twitter:"Follow us on Twitter",facebook:"Join us on Facebook",team:"Team",chiefdev:"chief developer",developer:"developer",contributor:"contributor",maintainer:"maintainer",translator:"translator",icons:"Icons",dontforget:"and don't forget to take your towel",shortcutsof:"Shortcuts disabled",dropFiles:"Drop files here",or:"or",selectForUpload:"Select files",moveFiles:"Move items",copyFiles:"Copy items",restoreFiles:"Restore items",rmFromPlaces:"Remove from places",aspectRatio:"Aspect ratio",scale:"Scale",width:"Width",height:"Height",resize:"Resize",crop:"Crop",rotate:"Rotate","rotate-cw":"Rotate 90 degrees CW","rotate-ccw":"Rotate 90 degrees CCW",degree:"°",netMountDialogTitle:"Mount network volume",protocol:"Protocol",host:"Host",port:"Port",user:"User",pass:"Password",confirmUnmount:"Are you sure to unmount $1?",dropFilesBrowser:"Drop or Paste files from browser",dropPasteFiles:"Drop files, Paste URLs or images(clipboard) here",encoding:"Encoding",locale:"Locale",searchTarget:"Target: $1",searchMime:"Search by input MIME Type",owner:"Owner",group:"Group",other:"Other",execute:"Execute",perm:"Permission",mode:"Mode",
15
- emptyFolder:"Folder is empty",emptyFolderDrop:"Folder is empty\\A Drop to add items",emptyFolderLTap:"Folder is empty\\A Long tap to add items",quality:"Quality",autoSync:"Auto sync",moveUp:"Move up",getLink:"Get URL link",selectedItems:"Selected items ($1)",folderId:"Folder ID",offlineAccess:"Allow offline access",reAuth:"To re-authenticate",nowLoading:"Now loading...",openMulti:"Open multiple files",openMultiConfirm:"You are trying to open the $1 files. Are you sure you want to open in browser?",emptySearch:"Search results is empty in search target.",editingFile:"It is editing a file.",hasSelected:"You have selected $1 items.",hasClipboard:"You have $1 items in the clipboard.",incSearchOnly:"Incremental search is only from the current view.",reinstate:"Reinstate",complete:"$1 complete",contextmenu:"Context menu",pageTurning:"Page turning",volumeRoots:"Volume roots",reset:"Reset",bgcolor:"Background color",colorPicker:"Color picker","8pxgrid":"8px Grid",enabled:"Enabled",disabled:"Disabled",emptyIncSearch:"Search results is empty in current view.\\A Press [Enter] to expand search target.",emptyLetSearch:"First letter search results is empty in current view.",textLabel:"Text label",minsLeft:"$1 mins left",openAsEncoding:"Reopen with selected encoding",saveAsEncoding:"Save with the selected encoding",selectFolder:"Select folder",firstLetterSearch:"First letter search",presets:"Presets",tooManyToTrash:"It's too many items so it can't into trash.",TextArea:"TextArea",folderToEmpty:'Empty the folder "$1".',filderIsEmpty:'There are no items in a folder "$1".',preference:"Preference",language:"Language",clearBrowserData:"Initialize the settings saved in this browser",toolbarPref:"Toolbar settings",charsLeft:"... $1 chars left.",sum:"Sum",roughFileSize:"Rough file size",autoFocusDialog:"Focus on the element of dialog with mouseover",select:"Select",selectAction:"Action when select file",useStoredEditor:"Open with the editor used last time",selectinvert:"Invert selection",renameMultiple:"Are you sure you want to rename $1 selected items like $2?<br/>This cannot be undone!",batchRename:"Batch rename",plusNumber:"+ Number",asPrefix:"Add prefix",asSuffix:"Add suffix",changeExtention:"Change extention",columnPref:"Columns settings (List view)",reflectOnImmediate:"All changes will reflect immediately to the archive.",reflectOnUnmount:"Any changes will not reflect until un-mount this volume.",unmountChildren:"The following volume(s) mounted on this volume also unmounted. Are you sure to unmount it?",selectionInfo:"Selection Info",hashChecker:"Algorithms to show the file hash",infoItems:"Info Items (Selection Info Panel)",pressAgainToExit:"Press again to exit.",toolbar:"Toolbar",workspace:"Work Space",dialog:"Dialog",all:"All",iconSize:"Icon Size (Icons view)",editorMaximized:"Open the maximized editor window",editorConvNoApi:"Because conversion by API is not currently available, please convert on the website.",editorConvNeedUpload:"After conversion, you must be upload with the item URL or a downloaded file to save the converted file.",convertOn:"Convert on the site of $1",integrations:"Integrations",integrationWith:"This elFinder has the following external services integrated. Please check the terms of use, privacy policy, etc. before using it.",showHidden:"Show hidden items",hideHidden:"Hide hidden items",toggleHidden:"Show/Hide hidden items",makefileTypes:'File types to enable with "New file"',typeOfTextfile:"Type of the Text file",add:"Add",theme:"Theme","default":"Default",description:"Description",website:"Website",author:"Author",email:"Email",license:"License",exportToSave:"This item can't be saved. To avoid losing the edits you need to export to your PC.",dblclickToSelect:"Double click on the file to select it.",useFullscreen:"Use fullscreen mode",kindUnknown:"Unknown",kindRoot:"Volume Root",kindFolder:"Folder",kindSelects:"Selections",kindAlias:"Alias",kindAliasBroken:"Broken alias",kindApp:"Application",kindPostscript:"Postscript document",kindMsOffice:"Microsoft Office document",kindMsWord:"Microsoft Word document",kindMsExcel:"Microsoft Excel document",kindMsPP:"Microsoft Powerpoint presentation",kindOO:"Open Office document",kindAppFlash:"Flash application",kindPDF:"Portable Document Format (PDF)",kindTorrent:"Bittorrent file",kind7z:"7z archive",kindTAR:"TAR archive",kindGZIP:"GZIP archive",kindBZIP:"BZIP archive",kindXZ:"XZ archive",kindZIP:"ZIP archive",kindRAR:"RAR archive",kindJAR:"Java JAR file",kindTTF:"True Type font",kindOTF:"Open Type font",kindRPM:"RPM package",kindText:"Text document",kindTextPlain:"Plain text",kindPHP:"PHP source",kindCSS:"Cascading style sheet",kindHTML:"HTML document",kindJS:"Javascript source",kindRTF:"Rich Text Format",kindC:"C source",kindCHeader:"C header source",kindCPP:"C++ source",kindCPPHeader:"C++ header source",kindShell:"Unix shell script",kindPython:"Python source",kindJava:"Java source",kindRuby:"Ruby source",kindPerl:"Perl script",kindSQL:"SQL source",kindXML:"XML document",kindAWK:"AWK source",kindCSV:"Comma separated values",kindDOCBOOK:"Docbook XML document",kindMarkdown:"Markdown text",kindImage:"Image",kindBMP:"BMP image",kindJPEG:"JPEG image",kindGIF:"GIF Image",kindPNG:"PNG Image",kindTIFF:"TIFF image",kindTGA:"TGA image",kindPSD:"Adobe Photoshop image",kindXBITMAP:"X bitmap image",kindPXM:"Pixelmator image",kindAudio:"Audio media",kindAudioMPEG:"MPEG audio",kindAudioMPEG4:"MPEG-4 audio",kindAudioMIDI:"MIDI audio",kindAudioOGG:"Ogg Vorbis audio",kindAudioWAV:"WAV audio",AudioPlaylist:"MP3 playlist",kindVideo:"Video media",kindVideoDV:"DV movie",kindVideoMPEG:"MPEG movie",kindVideoMPEG4:"MPEG-4 movie",kindVideoAVI:"AVI movie",kindVideoMOV:"Quick Time movie",kindVideoWM:"Windows Media movie",kindVideoFlash:"Flash movie",kindVideoMKV:"Matroska movie",kindVideoOGG:"Ogg movie"}}),e.fn.elfinderbutton=function(t){return this.each(function(){var n,i,a="class",o=t.fm,r=o.res(a,"disabled"),s=o.res(a,"active"),l=o.res(a,"hover"),c="elfinder-button-menu-item",d="elfinder-button-menu-item-selected",p=e('<span class="elfinder-button-text">'+t.title+"</span>"),u=t.className?t.className:t.name,h=e(this).addClass("ui-state-default elfinder-button").attr("title",t.title).append('<span class="elfinder-button-icon elfinder-button-icon-'+u+'"/>',p).on("mouseenter mouseleave",function(e){!h.hasClass(r)&&h["mouseleave"==e.type?"removeClass":"addClass"](l)}).on("click",function(e){h.hasClass(r)||(n&&t.variants.length>=1?(n.is(":hidden")&&o.getUI().click(),e.stopPropagation(),n.css(m()).slideToggle({duration:100,done:function(e){o[n.is(":visible")?"toFront":"toHide"](n)}})):o.exec(t.name,g(),{_userAction:!0,_currentType:"toolbar",_currentNode:h}))}),f=function(){o.toHide(n)},m=function(){var e=o.getUI(),t=e.offset(),n=h.offset();return{top:n.top-t.top,left:n.left-t.left,maxHeight:e.height()-40}},g=function(){var e,t=o.selected();return t.length||(t=(e=o.cwd())?[o.cwd().hash]:void 0),t};p.hide(),t.button=h,Array.isArray(t.variants)&&(h.addClass("elfinder-menubutton"),n=e('<div class="ui-front ui-widget ui-widget-content elfinder-button-menu elfinder-button-'+u+'-menu ui-corner-all"/>').hide().appendTo(o.getUI()).on("mouseenter mouseleave","."+c,function(){e(this).toggleClass(l)}).on("click","."+c,function(i){var a=e(this).data("value");i.preventDefault(),i.stopPropagation(),h.removeClass(l),o.toHide(n),"undefined"==typeof a&&(a={}),"object"==typeof a&&(a._userAction=!0),o.exec(t.name,g(),a)}).on("close",f),o.bind("disable select",f).getUI().on("click",f),t.change(function(){n.html(""),e.each(t.variants,function(i,a){n.append(e('<div class="'+c+'">'+a[1]+"</div>").data("value",a[0]).addClass(a[0]==t.value?d:""))})})),t.change(function(){var e;i&&cancelAnimationFrame(i),i=requestAnimationFrame(function(){t.disabled()?h.removeClass(s+" "+l).addClass(r):(h.removeClass(r),h[t.active()?"addClass":"removeClass"](s)),t.syncTitleOnChange&&(e=t.className?t.className:t.name,u!==e&&(h.children(".elfinder-button-icon").removeClass("elfinder-button-icon-"+u).addClass("elfinder-button-icon-"+e),n&&n.removeClass("elfinder-button-"+u+"-menu").addClass("elfinder-button-"+e+"-menu"),u=e),p.html(t.title),h.attr("title",t.title))})}).change()})},e.fn.elfindercontextmenu=function(t){return this.each(function(){var n,i,a,o,r,s,l,c=(e(this),"elfinder-contextmenu-item"),d="elfinder-contextsubmenu-item",p="elfinder-contextmenu-extra-icon",u=t.res("class","hover"),h={distance:8,start:function(){f.data("drag",!0).data("touching")&&f.find("."+u).removeClass(u)},stop:function(){f.data("draged",!0).removeData("drag")}},f=e(this).addClass("touch-punch ui-helper-reset ui-front ui-widget ui-state-default ui-corner-all elfinder-contextmenu elfinder-contextmenu-"+t.direction).hide().on("touchstart",function(e){f.data("touching",!0).children().removeClass(u)}).on("touchend",function(e){f.removeData("touching")}).on("mouseenter mouseleave","."+c,function(t){e(this).toggleClass(u,!("mouseenter"!==t.type&&(f.data("draged")||!f.data("submenuKeep")))),f.data("draged")&&f.data("submenuKeep")&&f.find(".elfinder-contextmenu-sub:visible").parent().addClass(u)}).on("mouseenter mouseleave","."+p,function(t){e(this).parent().toggleClass(u,"mouseleave"===t.type)}).on("mouseenter mouseleave","."+c+",."+d,function(t){var n=function(t,n){e.each(n?r:a,function(e,i){if(t[0]===i)return(n?r:a)._cur=e,n?s=t:o=t,!1})};if(t.originalEvent){var i=e(this),l=function(){o&&!o.children("div.elfinder-contextmenu-sub:visible").length&&o.removeClass(u)};"mouseenter"===t.type?i.hasClass(d)?(s&&s.removeClass(u),o&&(r=o.find("div."+d)),n(i,!0)):(l(),n(i)):i.hasClass(d)?(s=null,r=null):(l(),function(e){setTimeout(function(){e===o&&(o=null)},250)}(o))}}).on("contextmenu",function(){return!1}).on("mouseup",function(){setTimeout(function(){f.removeData("draged")},100)}).draggable(h),m="ltr"===t.direction,g=m?"left":"right",v=Object.assign({},t.options.contextmenu),b='<div class="'+c+'{className}"><span class="elfinder-button-icon {icon} elfinder-contextmenu-icon"{style}/><span>{label}</span></div>',y=function(n,i,a,o){var r,s,l="",c="",d="";return o&&(o.className&&(l=" "+o.className),o.iconClass&&(d=o.iconClass,i=""),o.iconImg&&(r=o.iconImg.split(/ +/),s=r[1]&&r[2]?t.escape(r[1]+"px "+r[2]+"px"):"",c=" style=\"background:url('"+t.escape(r[0])+"') "+(s?s:"0 0")+" no-repeat;"+(s?"":"posbackground-size:contain;")+'"')),e(b.replace("{icon}",i?"elfinder-button-icon-"+i:d?d:"").replace("{label}",n).replace("{style}",c).replace("{className}",l)).on("click",function(e){e.stopPropagation(),e.preventDefault(),a()})},w=function(e){var t=e.split(/ +/),n=t[1]&&t[2]?t[1]+"px "+t[2]+"px":"";return{backgroundImage:'url("'+t[0]+'")',backgroundRepeat:"no-repeat",backgroundPosition:n?n:"",backgroundSize:n?"":"contain"}},x=function(){var n="touchstart.contextmenuAutoToggle";f.data("hideTm")&&clearTimeout(f.data("hideTm")),f.is(":visible")&&f.on("touchstart",function(e){e.originalEvent.touches.length>1||(f.stop(),t.toFront(f),f.data("hideTm")&&clearTimeout(f.data("hideTm")))}).data("hideTm",setTimeout(function(){f.is(":visible")&&(i.find(".elfinder-cwd-file").off(n),i.find(".elfinder-cwd-file.ui-selected").one(n,function(t){if(!(t.originalEvent.touches.length>1)){var a=e(t.target);return!f.first().length||a.is("input:checkbox")||a.hasClass("elfinder-cwd-select")?void i.find(".elfinder-cwd-file").off(n):(t.stopPropagation(),C(t.originalEvent.touches[0].pageX,t.originalEvent.touches[0].pageY),i.data("longtap",!0),void a.one("touchend",function(){setTimeout(function(){i.removeData("longtap")},80)}))}}).one("unselect."+t.namespace,function(){i.find(".elfinder-cwd-file").off(n)}),f.fadeOut({duration:300,fail:function(){f.css("opacity","1").show()},done:function(){t.toHide(f)}}))},4500))},k=function(n){var i=n.keyCode,l=e.ui.keyCode.ESCAPE,c=e.ui.keyCode.ENTER,p=e.ui.keyCode.LEFT,h=e.ui.keyCode.RIGHT,f=e.ui.keyCode.UP,m=e.ui.keyCode.DOWN,g="ltr"===t.direction?h:p,v=g===h?p:h;e.inArray(i,[l,c,p,h,f,m])!==-1&&(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),i==l||i===v?o&&r&&s?(s.trigger("mouseleave").trigger("submenuclose"),o.addClass(u),r=null,s=null):i==l&&z():i==f||i==m?r?(s&&s.trigger("mouseleave"),i==m&&(!s||r.length<=++r._cur)?r._cur=0:i==f&&(!s||--r._cur<0)&&(r._cur=r.length-1),s=r.eq(r._cur).trigger("mouseenter")):(r=null,o&&o.trigger("mouseleave"),i==m&&(!o||a.length<=++a._cur)?a._cur=0:i==f&&(!o||--a._cur<0)&&(a._cur=a.length-1),o=a.eq(a._cur).addClass(u)):!o||i!=c&&i!==g||(o.hasClass("elfinder-contextmenu-group")?s?i==c&&s.click():(o.trigger("mouseenter"),r=o.find("div."+d),r._cur=0,s=r.first().addClass(u)):i==c&&o.click()))},C=function(i,a,c){var d,p=f.outerWidth(),u=f.outerHeight(),h=n.attr("style"),m=n.offset(),v=n.width(),b=n.height(),y=t.UA.Mobile?40:2,w=t.UA.Mobile?20:2,i=i-(m?m.left:0),a=a-(m?m.top:0),c=Object.assign(c||{},{top:Math.max(0,a+w+u<b?a+w:a-(a+u-b)),left:Math.max(0,i<p+y||i+y+p<v?i+y:i-y-p),opacity:"1"});l=!0,t.autoSync("stop"),n.width(v),f.stop().removeAttr("style").css(c),t.toFront(f),f.show(),n.attr("style",h),c[g]=parseInt(f.width()),f.find(".elfinder-contextmenu-sub").css(c),t.UA.iOS&&e("div.elfinder div.overflow-scrolling-touch").css("-webkit-overflow-scrolling","auto"),o=null,r=null,s=null,e(document).on("keydown."+t.namespace,k),d=e._data(document).events,d&&d.keydown&&d.keydown.unshift(d.keydown.pop()),t.UA.Mobile&&x(),requestAnimationFrame(function(){t.getUI().one("click."+t.namespace,z)})},z=function(){if(t.getUI().off("click."+t.namespace,z),e(document).off("keydown."+t.namespace,k),S=I=null,f.is(":visible")||f.children().length){t.toHide(f.removeAttr("style").empty().removeData("submenuKeep"));try{f.draggable("instance")||f.draggable(h)}catch(n){f.hasClass("ui-draggable")||f.draggable(h)}f.data("prevNode")&&(f.data("prevNode").after(f),f.removeData("prevNode")),t.trigger("closecontextmenu"),t.UA.iOS&&e("div.elfinder div.overflow-scrolling-touch").css("-webkit-overflow-scrolling","touch")}l&&t.searchStatus.state<1&&!t.searchStatus.ininc&&t.autoSync(),l=!1},T=function(i,o){var r,s=!1,l=!1,h=[],g="cwd"===i,b=0;S=i,I=o,(r=t.option("uiCmdMap",g?void 0:o[0]))||(r={}),g||(h=t.getDisabledCmds(o)),b=t.selected().length,b>1&&f.append('<div class="ui-corner-top ui-widget-header elfinder-contextmenu-header"><span>'+t.i18n("selectedItems",""+b)+"</span></div>"),a=e(),e.each(v[i]||[],function(v,b){var x,k,C,T,A,S;if("|"===b)return void(s&&(l=!0));if(r[b]?(k=r[b],C=!0):k=b,x=t.getCommand(k),!x||g||t.searchStatus.state&&x.disableOnSearch||(x.__disabled=x._disabled,x._disabled=!(x.alwaysEnabled||!!t._commands[k]&&!(e.inArray(b,h)!==-1||C&&h[k])),e.each(x.linkedCmds,function(e,n){var i;(i=t.getCommand(n))&&(i.__disabled=i._disabled,i._disabled=!(i.alwaysEnabled||!!t._commands[n]&&!h[n]))})),x&&!x._disabled&&x.getstate(o)!=-1){if(x.variants){if(!x.variants.length)return;T=y(x.title,x.className?x.className:x.name,function(){},x.contextmenuOpts),A=e('<div class="ui-front ui-corner-all elfinder-contextmenu-sub"/>').hide().css("max-height",t.getUI().height()-30).appendTo(T.append('<span class="elfinder-contextmenu-arrow"/>')),S=function(e){if(e){var i=n.attr("style");n.width(n.width()),A.css({top:"-1000px",left:"auto",right:"auto"});var a,o,r=T.offset(),s=r.left,l=r.top,c=T.outerWidth(),d=A.outerWidth(!0),p=A.outerHeight(!0),u=n.offset(),h=u.left+n.width(),g=u.top+n.height(),v=m,b=c;m?(o=s+c+d-h,o>10&&(s>d-5?(b-=5,v=!1):t.UA.Mobile||(b=c-o))):(o=d-s,o>0&&(s+c+d-15<h?(b-=5,v=!0):t.UA.Mobile||(b=c-o))),o=l+5+p-g,a=o>0&&l<g?5-o:o>0?30-p:5,f.find(".elfinder-contextmenu-sub:visible").hide(),A.css({top:a,left:v?b:"auto",right:v?"auto":b,overflowY:"auto"}).show(),n.attr("style",i)}else A.hide()},T.addClass("elfinder-contextmenu-group").on("mouseleave",".elfinder-contextmenu-sub",function(e){f.data("draged")||f.removeData("submenuKeep")}).on("submenuclose",".elfinder-contextmenu-sub",function(e){S(!1)}).on("click","."+d,function(n){var a,r;n.stopPropagation(),f.data("draged")||(r=e(this),x.keepContextmenu?(r.removeClass(u),T.addClass(u)):f.hide(),a=r.data("exec"),"undefined"==typeof a&&(a={}),"object"==typeof a&&(a._userAction=!0,a._currentType=i,a._currentNode=r),!x.keepContextmenu&&z(),t.exec(x.name,o,a))}).on("touchend",function(e){f.data("drag")||(S(!0),f.data("submenuKeep",!0))}).on("mouseenter mouseleave",function(t){f.data("touching")||(T.data("timer")&&(clearTimeout(T.data("timer")),T.removeData("timer")),e(t.target).closest(".elfinder-contextmenu-sub",f).length||("mouseleave"===t.type?f.data("submenuKeep")||T.data("timer",setTimeout(function(){T.removeData("timer"),S(!1)},250)):T.data("timer",setTimeout(function(){T.removeData("timer"),S(!0)},a.find("div.elfinder-contextmenu-sub:visible").length?250:0))))}),e.each(x.variants,function(t,n){var i,a="|"===n?'<div class="elfinder-contextmenu-separator"/>':e('<div class="'+c+" "+d+'"><span>'+n[1]+"</span></div>").data("exec",n[0]);"undefined"!=typeof n[2]&&(i=e("<span/>").addClass("elfinder-button-icon elfinder-contextmenu-icon"),/\//.test(n[2])?i.css(w(n[2])):i.addClass("elfinder-button-icon-"+n[2]),a.prepend(i).addClass(d+"-icon")),A.append(a)})}else T=y(x.title,x.className?x.className:x.name,function(){f.data("draged")||(!x.keepContextmenu&&z(),t.exec(x.name,o,{_userAction:!0,_currentType:i,_currentNode:T}))},x.contextmenuOpts),x.extra&&x.extra.node?(e('<span class="elfinder-button-icon elfinder-button-icon-'+(x.extra.icon||"")+" "+p+'"/>').append(x.extra.node).appendTo(T),e(x.extra.node).trigger("ready",{targets:o})):T.remove("."+p);x.extendsCmd&&T.children("span.elfinder-button-icon").addClass("elfinder-button-icon-"+x.extendsCmd),l&&f.append('<div class="elfinder-contextmenu-separator"/>'),f.append(T),s=!0,l=!1}x&&"undefined"!=typeof x.__disabled&&(x._disabled=x.__disabled,delete x.__disabled,e.each(x.linkedCmds,function(e,n){var i;(i=t.getCommand(n))&&(i._disabled=i.__disabled,delete i.__disabled)}))}),a=f.children("div."+c)},A=function(t){S="raw",e.each(t,function(e,t){var n;"|"===t?f.append('<div class="elfinder-contextmenu-separator"/>'):t.label&&"function"==typeof t.callback&&(n=y(t.label,t.icon,function(){f.data("draged")||(!t.remain&&z(),t.callback())},t.options||null),f.append(n))}),a=f.children("div."+c)},S=null,I=null;t.one("load",function(){n=t.getUI(),i=t.getUI("cwd"),t.bind("contextmenu",function(n){var a,o=n.data,r={};o.type&&"files"!==o.type&&i.trigger("unselectall"),z(),o.type&&o.targets?(t.trigger("contextmenucreate",o),T(o.type,o.targets),t.trigger("contextmenucreatedone",o)):o.raw&&A(o.raw),f.children().length&&(a=o.prevNode||null,a&&(f.data("prevNode",f.prev()),a.after(f)),o.fitHeight&&(r={maxHeight:Math.min(t.getUI().height(),e(window).height()),overflowY:"auto"},f.draggable("destroy").removeClass("ui-draggable")),C(o.x,o.y,r),o.opened&&"function"==typeof o.opened&&o.opened.call(f))}).one("destroy",function(){f.remove()}).bind("disable",z).bind("select",function(e){"files"===S&&(!e.data||e.data.selected.toString()!==I.toString())&&z()})}).shortcut({pattern:"mac"===t.OS?"ctrl+m":"contextmenu shift+f10",description:"contextmenu",callback:function(n){n.stopPropagation(),n.preventDefault(),e(document).one("contextmenu."+t.namespace,function(e){e.preventDefault(),e.stopPropagation()});var i,a,o,r,s=t.selected();s.length?(i="files",a=s,r=t.cwdHash2Elm(s[0])):(i="cwd",a=[t.cwd().hash],o=t.getUI("workzone").offset()),r&&r.length||(r=t.getUI("workzone")),o=r.offset(),o.top+=r.height()/2,o.left+=r.width()/2,t.trigger("contextmenu",{type:i,targets:a,x:o.left,y:o.top})}})})},e.fn.elfindercwd=function(t,n){return this.not(".elfinder-cwd").each(function(){var i,a,o,r,s,l,c,d=t.UA.Mobile,p="list"==t.viewType,u="select."+t.namespace,h="unselect."+t.namespace,f="disable."+t.namespace,m="enable."+t.namespace,g="class",v=t.res(g,"cwdfile"),b="."+v,y="ui-selected",w=t.res(g,"disabled"),x=t.res(g,"draggable"),k=t.res(g,"droppable"),C=t.res(g,"hover"),z=t.res(g,"active"),T=t.res(g,"adroppable"),A=v+"-tmp",S="elfinder-cwd-selectchk",I=t.options.loadTmbs>0?t.options.loadTmbs:5,O="",j={},M=[],F=[],D=void 0,E=[],U="",P=function(){for(var e="",t=0;t<E.length;t++)e+='<td class="elfinder-col-'+E[t]+'">{'+E[t]+"}</td>";return e},R=function(){return'<tr id="{id}" class="'+v+' {permsclass} {dirclass}" title="{tooltip}"{css}><td class="elfinder-col-name"><div class="elfinder-cwd-file-wrapper"><span class="elfinder-cwd-icon {mime}"{style}/>{marker}<span class="elfinder-cwd-filename">{name}</span></div>'+q+"</td>"+P()+"</tr>"},q=e.map(n.showSelectCheckboxUA,function(e){return!(!t.UA[e]&&!e.match(/^all$/i))||null}).length?'<div class="elfinder-cwd-select"><input type="checkbox" class="'+S+'"></div>':"",H=!1,_=null,N={icon:'<div id="{id}" class="'+v+' {permsclass} {dirclass} ui-corner-all" title="{tooltip}"><div class="elfinder-cwd-file-wrapper ui-corner-all"><div class="elfinder-cwd-icon {mime} ui-corner-all" unselectable="on"{style}/>{marker}</div><div class="elfinder-cwd-filename" title="{nametitle}">{name}</div>'+q+"</div>",row:""},L=t.res("tpl","perms"),W=t.res("tpl","lock"),B=t.res("tpl","symlink"),$={id:function(e){return t.cwdHash2Id(e.hash)},name:function(e){var n=t.escape(e.i18||e.name);return!p&&(n=n.replace(/([_.])/g,"&#8203;$1")),n},nametitle:function(e){return t.escape(e.i18||e.name)},permsclass:function(e){return t.perms2class(e)},perm:function(e){return t.formatPermissions(e)},dirclass:function(e){var i="directory"==e.mime?"directory":"";return e.isroot&&(i+=" isroot"),e.csscls&&(i+=" "+t.escape(e.csscls)),n.getClass&&(i+=" "+n.getClass(e)),i},style:function(e){return e.icon?t.getIconStyle(e):""},mime:function(e){var n=t.mime2class(e.mime);return e.icon&&(n+=" elfinder-cwd-bgurl"),n},size:function(e){return"directory"!==e.mime||e.size?t.formatSize(e.size):"-"},date:function(e){return t.formatDate(e)},kind:function(e){return t.mime2kind(e)},mode:function(e){return e.perm?t.formatFileMode(e.perm):""},modestr:function(e){return e.perm?t.formatFileMode(e.perm,"string"):""},modeoct:function(e){return e.perm?t.formatFileMode(e.perm,"octal"):""},modeboth:function(e){return e.perm?t.formatFileMode(e.perm,"both"):""},marker:function(e){return(e.alias||"symlink-broken"==e.mime?B:"")+(e.read&&e.write?"":L)+(e.locked?W:"")},tooltip:function(e){var n=t.formatDate(e)+(e.size>0?" ("+t.formatSize(e.size)+")":""),i="";return i=O&&e.path?t.escape(e.path.replace(/\/[^\/]*$/,"")):e.tooltip?t.escape(e.tooltip).replace(/\r/g,"&#13;"):"",p&&(i+=(i?"&#13;":"")+t.escape(e.i18||e.name)),i?i+"&#13;"+n:n}},K={},V=function(n,i){var o,r,s;if(n&&!K[n]&&("undefined"==typeof a&&(e("#elfinderAddBadgeStyle"+t.namespace).length&&e("#elfinderAddBadgeStyle"+t.namespace).remove(),a=e('<style id="addBadgeStyle'+t.namespace+'"/>').insertBefore(e("head").children(":first")).get(0).sheet||null),a)){if(n=n.toLowerCase(),s=n.split("/"),r=t.escape(t.mimeTypes[n]||(i.replace(/.bac?k$/i,"").match(/\.([^.]+)$/)||["",""])[1])){o=".elfinder-cwd-icon-"+s[0].replace(/(\.|\+)/g,"-"),"undefined"!=typeof s[1]&&(o+=".elfinder-cwd-icon-"+s[1].replace(/(\.|\+)/g,"-"));try{a.insertRule(o+':before{content:"'+r.toLowerCase()+'"}',0)}catch(l){}}K[n]=!0}},X=function(e){return e.mime&&"directory"!==e.mime&&!K[e.mime]&&V(e.mime,e.name),N[p?"row":"icon"].replace(/\{([a-z0-9_]+)\}/g,function(n,i){return $[i]?$[i](e,t):e[i]?e[i]:""})},J=e(),G=!1,Y=function(t,n){function i(e,t){return e[t+"All"]("[id]:not(."+w+"):not(.elfinder-cwd-parent):first")}var a,o,r,s,l,c=e.ui.keyCode,d=t==c.LEFT||t==c.UP,f=Ue.find("[id]."+y);if(f.length)if(a=f.filter(d?":first":":last"),r=i(a,d?"prev":"next"),r.length)if(p||t==c.LEFT||t==c.RIGHT)o=r;else if(s=a.position().top,l=a.position().left,o=a,d){do o=o.prev("[id]");while(o.length&&!(o.position().top<s&&o.position().left<=l));o.hasClass(w)&&(o=i(o,"next"))}else{do o=o.next("[id]");while(o.length&&!(o.position().top>s&&o.position().left>=l));o.hasClass(w)&&(o=i(o,"prev")),o.length||(r=Ue.find("[id]:not(."+w+"):last"),r.position().top>s&&(o=r))}else o=a;else o=J.length?d?J.prev():J:Ue.find("[id]:not(."+w+"):not(.elfinder-cwd-parent):"+(d?"last":"first"));o&&o.length&&!o.hasClass("elfinder-cwd-parent")&&(a&&n?o=a.add(a[d?"prevUntil":"nextUntil"]("#"+o.attr("id"))).add(o):f.trigger(h),o.trigger(u),re(o.filter(d?":first":":last")),oe())},Q={},Z=function(e){t.cwdHash2Elm(e).trigger(u)},ee=!1,te=function(){t.cwd().hash;q&&qe.find("input").prop("checked",!0),t.lazy(function(){var n;t.maxTargets&&(D||F).length>t.maxTargets?(ne({notrigger:!0}),n=e.map(D||F,function(e){return t.file(e)||null}),n=n.slice(0,t.maxTargets),Q={},e.each(n,function(e,n){Q[n.hash]=!0,t.cwdHash2Elm(n.hash).trigger(u)}),t.toast({mode:"warning",msg:t.i18n(["errMaxTargets",t.maxTargets])})):(Ue.find("[id]:not(."+y+"):not(.elfinder-cwd-parent)").trigger(u),Q=t.arrayFlip(D||F,!0)),oe(),q&&qe.data("pending",!1)},0,{repaint:!0})},ne=function(e){var t=e||{};q&&qe.find("input").prop("checked",!1),Object.keys(Q).length&&(G=!1,Q={},Ue.find("[id]."+y).trigger(h),q&&Ue.find("input:checkbox."+S).prop("checked",!1)),!t.notrigger&&oe(),q&&qe.data("pending",!1),Ue.removeClass("elfinder-cwd-allselected")},ie=function(){var n={};ee?ne():Object.keys(Q).length?(e.each(D||F,function(e,i){var a=t.cwdHash2Elm(i);Q[i]?a.length&&a.trigger(h):(n[i]=!0,a.length&&a.trigger(u))}),Q=n,oe()):te()},ae=void 0,oe=function(){var e=Object.keys(Q),n={selected:e,origin:"cwd"};ge&&(e.length>1||e[0]!==t.cwdId2Hash(ge.attr("id")))&&ge.hasClass(y)&&ge.trigger(h),ee=e.length&&e.length===(D||F).length&&(!t.maxTargets||e.length<=t.maxTargets),q&&(qe.find("input").prop("checked",ee),Ue[ee?"addClass":"removeClass"]("elfinder-cwd-allselected")),ee?n.selectall=!0:e.length||(n.unselectall=!0),t.trigger("select",n)},re=function(e,n){if(e.length){var i=e.position().top,a=e.outerHeight(!0),o=Pe.scrollTop(),r=Pe.get(0).clientHeight,s=we?we.outerHeight(!0):0;i+s+a>o+r?Pe.scrollTop(parseInt(i+s+a-r)):i<o&&Pe.scrollTop(i),p&&Pe.scrollLeft(0),!!n&&t.resources.blink(e,"lookme")}},se=[],le={},ce=function(e){for(var t=se.length;t--;)if(se[t].hash==e)return t;return-1},de="elfscrstart",pe="elfscrstop",ue=!1,he={disabled:!0,filter:"[id]:first",stop:oe,delay:250,appendTo:"body",autoRefresh:!1,selected:function(t,n){e(n.selected).trigger(u)},unselected:function(t,n){e(n.unselected).trigger(h)}},fe={},me=function(a,o){if(le.renderd){var r=(p?Ue.find("tbody:first"):Ue).children("[id]"+(n.oldSchool?":not(.elfinder-cwd-parent)":"")+":first");if(r.length){var s,l,c=Ue.data("selectable"),d=function(){var n=Pe.offset(),a=Pe.width(),o=e(window),s=r.width()/2,l=Math.min(n.left-o.scrollLeft()+("ltr"===t.direction?s:a-s),n.left+a-10),c=n.top-o.scrollTop()+10+(p?i:0);return{left:Math.max(0,Math.round(l)),top:Math.max(0,Math.round(c))}}(),u=a?r:e(document.elementFromPoint(d.left,d.top)),h={},f={},m=5,g=Math.ceil((le.hpi?Math.ceil(Le.data("rectangle").height/le.hpi*1.5):be)/m),y=function(){var e,n,i;for(i=0;i<m&&(e=u.attr("id"),e&&(le.getTmbs=[],n=t.cwdId2Hash(e),fe[n]=e,le.attachTmbs[n]&&(f[n]=le.attachTmbs[n]),c&&(h[e]=!0)),u=u.next(),u.length);i++);},w=function(){var e;Ue.data("selectable")&&(Object.assign(h,Q),e=Object.keys(h),e.length&&(he.filter="#"+e.join(", #"),Ue.selectable("enable").selectable("option",{filter:he.filter}).selectable("refresh"))),Object.keys(f).length&&(le.getTmbs=[],Ae(f))},x=function(){u.hasClass(v)||(u=u.closest(b))};if(fe={},c&&Ue.selectable("option","disabled"),u.length&&(u.hasClass(v)||u.closest(b).length||(l=t.getUI().find(".ui-dialog:visible,.ui-widget:visible"),l.length?(l.hide(),u=e(document.elementFromPoint(d.left,d.top)),l.show()):l=null),x(),u.length||(l&&l.hide(),u=e(document.elementFromPoint(d.left,d.top+5)),l&&l.show(),x())),u.length){if(u.attr("id"))if(a){for(var k=0;k<g&&(y(),u.length);k++);w()}else le.repaintJob&&"pending"===le.repaintJob.state()&&le.repaintJob.reject(),s=new Array(g),le.repaintJob=t.asyncJob(function(){y(),u.length||(w(),le.repaintJob&&"pending"===le.repaintJob.state()&&le.repaintJob.reject())},s).done(w)}else a&&le.renderd&&(o=o||0,o<10&&requestAnimationFrame(function(){me(a,++o)}))}}},ge=null,ve=function(n){var i=t.cwd().phash,a=t.file(i)||null,o=function(n){n&&(ge=e(X(e.extend(!0,{},n,{name:"..",i18:"..",mime:"directory"}))).addClass("elfinder-cwd-parent").on("dblclick",function(){var e=t.cwdId2Hash(this.id);t.trigger("select",{selected:[e]}).exec("open",e)}),(p?ge.children("td:first"):ge).children(".elfinder-cwd-select").remove(),(p?Ue.find("tbody"):Ue).prepend(ge),t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1))};a?o(a):t.getUI("tree").length?t.one("parents",function(){o(t.file(i)||null),Pe.trigger(pe)}):t.request({data:{cmd:"parents",target:t.cwd().hash},preventFail:!0}).done(function(e){o(t.file(i)||null),Pe.trigger(pe)})},be=t.options.showFiles,ye=function(){if(!(le.rendering||le.renderd&&!se.length)){var i,a,o=p?Ue.children("table").children("tbody"):Ue,r=!!e.htmlPrefilter,s=e(r?document.createDocumentFragment():"<div/>"),l=function(n){var i,a,l,c=n||null,h=[],f=!1,m={},g="self"===t.option("tmbUrl"),v=!le.renderd;i=se.splice(0,be+(c||0)/(le.hpi||1)),le.renderd+=i.length,se.length||(Re.hide(),Pe.off(pe,ye)),a=[],h=e.map(i,function(e){return e.hash&&e.name?("directory"==e.mime&&(f=!0),(e.tmb&&(1!=e.tmb||e.size>0)||g&&0===e.mime.indexOf("image/"))&&(m[e.hash]=e.tmb||"self"),j[e.hash]&&a.push(e.hash),X(e)):null}),s.empty().append(h.join("")),f&&!d&&Te(s),l=[],Object.keys(Q).length&&s.find("[id]:not(."+y+"):not(.elfinder-cwd-parent)").each(function(){Q[t.cwdId2Hash(this.id)]&&l.push(e(this))}),o.append(r?s:s.children()),l.length&&(e.each(l,function(e,t){t.trigger(u)}),oe()),a.length&&t.trigger("lockfiles",{files:a}),!le.hpi&&Fe(o,i.length),p&&(Ue.find("thead").show(),ke({fitWidth:!_})),Object.keys(m).length&&Object.assign(le.attachTmbs,m),v&&(d||Ue.data("selectable")||Ue.selectable(he).data("selectable",!0)),!ue&&Pe.trigger(pe)};le.renderd||(le.rendering=!0,Pe.scrollTop(0),i=t.cwd().phash,l(),n.oldSchool&&(i&&!O?ve(i):ge=e()),p&&(_&&Ce(),ke({fitWidth:!0})),le.itemH=(p?o.find("tr:first"):o.find("[id]:first")).outerHeight(!0),t.trigger("cwdrender"),le.rendering=!1,me(!0)),!le.rendering&&se.length?(a=Pe.height()+Pe.scrollTop()+t.options.showThreshold+le.row-le.renderd*le.hpi)>0?(le.rendering=!0,t.lazy(function(){l(a),le.rendering=!1})):!t.enabled()&&_e():_e()}},we=null,xe=t.UA.CSS.positionSticky&&t.UA.CSS.widthMaxContent,ke=function(a){if(i=0,n.listView.fixedHeader){var o,r,s,l,c,d,p,u,h,f,m,g,v,b=function(){var e,n;n="ltr"===t.direction?"left":"right",e=("ltr"===t.direction?Pe.scrollLeft():s.outerWidth(!0)-Pe.width()-Pe.scrollLeft())*-1,r.css(n)!==e&&r.css(n,e)},y=a||{};if(c=Ue.find("tbody"),u=c.children("tr:first"),u.length&&u.is(":visible")){if(s=c.parent(),we?(l=e("#"+t.namespace+"-cwd-thead"),p=l.children("tr:first")):(v=!0,c.addClass("elfinder-cwd-fixheader"),l=Ue.find("thead").attr("id",t.namespace+"-cwd-thead"),p=l.children("tr:first"),d=p.outerHeight(!0),Ue.css("margin-top",d-parseInt(s.css("padding-top"))),xe?(we=e('<div class="elfinder-table-header-sticky"/>').addClass(Ue.attr("class")).append(e("<table/>").append(l)),Ue.after(we),Pe.on("resize.fixheader",function(e){e.stopPropagation(),ke({fitWidth:!0})})):(r=e("<div/>").addClass(Ue.attr("class")).append(e("<table/>").append(l)),we=e("<div/>").addClass(Pe.attr("class")+" elfinder-cwd-fixheader").removeClass("ui-droppable native-droppable").css(Pe.position()).css({height:d,width:Ue.outerWidth()}).append(r),"rtl"===t.direction&&we.css("left",Pe.data("width")-Pe.width()+"px"),b(),Pe.after(we).on("scroll.fixheader resize.fixheader",function(e){b(),"resize"===e.type&&(e.stopPropagation(),we.css(Pe.position()),Pe.data("width",Pe.css("overflow","hidden").width()),Pe.css("overflow","auto"),ke())}))),v||y.fitWidth||Math.abs(u.outerWidth()-p.outerWidth())>2){o=E.length+1;for(var w=0;w<o&&(h=p.children("td:eq("+w+")"),f=u.children("td:eq("+w+")"),m=h.width(),g=f.width(),"undefined"==typeof h.data("delta")&&h.data("delta",h.outerWidth()-m-(f.outerWidth()-g)),g-=h.data("delta"),v||y.fitWidth||m!==g);w++)h.css("width",g+"px")}xe||(we.data("widthTimer")&&cancelAnimationFrame(we.data("widthTimer")),
16
- we.data("widthTimer",requestAnimationFrame(function(){we&&(we.css("width",We.width()+"px"),"rtl"===t.direction&&we.css("left",Pe.data("width")-Pe.width()+"px"))}))),i=l.height()}}},Ce=function(){if(p&&_){var t,n="elfinder-cwd-colwidth",i=Ue.find("tr[id]:first");i.hasClass(n)||(t=Ue.find("tr."+n),t.removeClass(n).find("td").css("width",""),i.addClass(n),Ue.find("table:first").css("table-layout","fixed"),e.each(e.merge(["name"],E),function(e,t){var n=_[t]||i.find("td.elfinder-col-"+t).width();i.find("td.elfinder-col-"+t).width(n)}))}},ze=Object.assign({},t.droppable,{over:function(n,i){var a,o,r,s=e(this),l=i.helper,c=n.shiftKey||n.ctrlKey||n.metaKey;return n.stopPropagation(),l.data("dropover",l.data("dropover")+1),s.data("dropover",!0),l.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus"),l.data("namespace")===t.namespace&&t.insideWorkzone(n.pageX,n.pageY)?(s.hasClass(t.res(g,"cwdfile"))?(a=t.cwdId2Hash(s.attr("id")),s.data("dropover",a)):(a=t.cwd().hash,t.cwd().write&&s.data("dropover",a)),r=t.file(l.data("files")[0]).phash===a,s.data("dropover")===a?e.each(l.data("files"),function(e,t){if(t===a||r&&!c&&!l.hasClass("elfinder-drag-helper-plus"))return s.removeClass(T),!1}):s.removeClass(T),l.data("locked")||r?o="elfinder-drag-helper-plus":(o="elfinder-drag-helper-move",c&&(o+=" elfinder-drag-helper-plus")),s.hasClass(T)&&l.addClass(o),void requestAnimationFrame(function(){s.hasClass(T)&&l.addClass(o)})):void s.removeClass(T)},out:function(t,n){var i=n.helper;t.stopPropagation(),i.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus").data("dropover",Math.max(i.data("dropover")-1,0)),e(this).removeData("dropover").removeClass(T)},deactivate:function(){e(this).removeData("dropover").removeClass(T)},drop:function(e,n){ne({notrigger:!0}),t.droppable.drop.call(this,e,n)}}),Te=function(n){n=n?n:p?Ue.find("tbody"):Ue;var i=n.children(".directory:not(."+k+",.elfinder-na,.elfinder-ro)");t.isCommandEnabled("paste")&&i.droppable(ze),t.isCommandEnabled("upload")&&i.addClass("native-droppable"),n.children(".isroot").each(function(n,i){var a=e(i),o=t.cwdId2Hash(i.id);t.isCommandEnabled("paste",o)?a.hasClass(k+",elfinder-na,elfinder-ro")||a.droppable(ze):a.hasClass(k)&&a.droppable("destroy"),t.isCommandEnabled("upload",o)?a.hasClass("native-droppable,elfinder-na,elfinder-ro")||a.addClass("native-droppable"):a.hasClass("native-droppable")&&a.removeClass("native-droppable")})},Ae=function(n,i){var a=function(t,n){e("<img/>").on("load",function(){t.find(".elfinder-cwd-icon").addClass(n.className).css("background-image","url('"+n.url+"')")}).attr("src",n.url)},o=function(e,n){var o,r,s=t.cwdHash2Elm(e);s.length&&("1"!=n?(o=t.file(e),o.tmb!==n&&(o.tmb=n),r=t.tmb(o),i?s.find(".elfinder-cwd-icon").addClass(r.className).css("background-image","url('"+r.url+"')"):a(s,r),delete le.attachTmbs[e]):i?Se([e]):le.tmbLoading[e]||le.getTmbs.push(e))};e.isPlainObject(n)&&Object.keys(n).length&&(Object.assign(le.attachTmbs,n),e.each(n,o),i||!le.getTmbs.length||Object.keys(le.tmbLoading).length||Se())},Se=function(n){var i=[],a=!1;return t.oldAPI?void t.request({data:{cmd:"tmb",current:t.cwd().hash},preventFail:!0}).done(function(e){e.images&&Object.keys(e.images).length&&Ae(e.images),e.tmb&&Se()}):(n?(a=!0,i=n.splice(0,I)):i=le.getTmbs.splice(0,I),void(i.length&&(a||fe[i[0]]||fe[i[i.length-1]])&&(e.each(i,function(e,t){le.tmbLoading[t]=!0}),t.request({data:{cmd:"tmb",targets:i},preventFail:!0}).done(function(t){var o,r=[];t.images&&((o=Object.keys(t.images).length)?(o<i.length&&e.each(i,function(e,n){t.images[n]||r.push(n)}),Ae(t.images,a)):r=i,r.length&&e.each(r,function(e,t){delete le.attachTmbs[t]})),a&&n.length&&Se(n)}).always(function(){le.tmbLoading={},!a&&le.getTmbs.length&&Se()}))))},Ie=function(n,i){var a,o,r,s,l,c,u=p?Ue.find("tbody"):Ue,h=n.length,f={},m=function(e){for(var n,i=Ue.find("[id]:first");i.length;){if(n=t.file(t.cwdId2Hash(i.attr("id"))),!i.hasClass("elfinder-cwd-parent")&&n&&t.compare(e,n)<0)return i;i=i.next("[id]")}},g=function(e){var n,i=se.length;for(n=0;n<i;n++)if(t.compare(e,se[n])<0)return n;return i||-1},v=!!e.htmlPrefilter,b=e(v?document.createDocumentFragment():"<div/>");if(h>be)Ee(),Q=t.arrayFlip(e.map(n,function(e){return e.hash}),!0),oe();else{for(h&&Le.removeClass("elfinder-cwd-wrapper-empty"),c="self"===t.option("tmbUrl");h--;)a=n[h],o=a.hash,t.cwdHash2Elm(o).length||((r=m(a))&&!r.length&&(r=null),!r&&(l=g(a))>=0?se.splice(l,0,a):(b.empty().append(X(a)),"directory"===a.mime&&!d&&Te(b),s=v?b:b.children(),r?r.before(s):u.append(s),++le.renderd),t.cwdHash2Elm(o).length&&(a.tmb&&(1!=a.tmb||a.size>0)||c&&0===a.mime.indexOf("image/"))&&(f[o]=a.tmb||"self"));p&&(Ce(),ke({fitWidth:!_})),Fe(u),Object.keys(f).length&&Object.assign(le.attachTmbs,f)}},Oe=function(n){var i,a,o,r,s=n.length,l=t.searchStatus.state>1,c=t.getCommand(t.currentReqCmd)||{};if(!t.cwd().hash&&!c.noChangeDirOnRemovedCwd)return e.each(M.reverse(),function(e,n){if(t.file(n))return r=!0,t.one(t.currentReqCmd+"done",function(){!t.cwd().hash&&t.exec("open",n)}),!1}),void(!r&&!t.cwd().hash&&t.exec("open",t.roots[Object.keys(t.roots)[0]]));for(;s--;){if(i=n[s],(a=t.cwdHash2Elm(i)).length)try{a.remove(),--le.renderd}catch(d){t.debug("error",d)}else(o=ce(i))!==-1&&se.splice(o,1);Q[i]&&delete Q[i],l&&(o=e.inArray(i,F))!==-1&&F.splice(o,1)}l&&t.trigger("cwdhasheschange",F),p&&(Ce(),ke({fitWidth:!_}))},je=function(){for(var e="",n="",i=0;i<E.length;i++)e=t.getColumnName(E[i]),n+='<td class="elfinder-cwd-view-th-'+E[i]+' sortable-item">'+e+"</td>";return n},Me=function(e){var t,n;e.height||(t=p?Ue.find("tbody"):Ue,n=t.find(p?"tr:first":"[id]:first"),e.height=n.outerHeight(!0),p||(e.width=n.outerWidth(!0)))},Fe=function(e,n){var i,a=e||(p?Ue.find("tbody"):Ue),o=Ke[t.viewType],r=1;se.length>0&&(le.hpi?p||(r=Math.floor(a.width()/o.width)):(Me(o),p?le.row=le.hpi=o.height:(r=Math.floor(a.width()/o.width),le.row=o.height,le.hpi=le.row/r)),i=Math.ceil((se.length+(n||0))/r),p&&we&&++i,Re.css({top:le.row*i+"px"}).show())},De={contextmenu:function(e){return e.preventDefault(),void 0!==Ue.data("longtap")?void e.stopPropagation():void t.trigger("contextmenu",{type:"cwd",targets:[t.cwd().hash],x:e.pageX,y:e.pageY})},touchstart:function(e){e.originalEvent.touches.length>1||(Ue.data("longtap")!==!1&&(Pe.data("touching",{x:e.originalEvent.touches[0].pageX,y:e.originalEvent.touches[0].pageY}),Ue.data("tmlongtap",setTimeout(function(){Ue.data("longtap",!0),t.trigger("contextmenu",{type:"cwd",targets:[t.cwd().hash],x:Pe.data("touching").x,y:Pe.data("touching").y})},500))),Ue.data("longtap",null))},touchend:function(e){"touchmove"===e.type?(!Pe.data("touching")||Math.abs(Pe.data("touching").x-e.originalEvent.touches[0].pageX)+Math.abs(Pe.data("touching").y-e.originalEvent.touches[0].pageY)>4)&&Pe.data("touching",null):setTimeout(function(){Ue.removeData("longtap")},80),clearTimeout(Ue.data("tmlongtap"))},click:function(e){Ue.data("longtap")&&(e.preventDefault(),e.stopPropagation())}},Ee=function(){t.lazy(function(){var n;Le.append(qe).removeClass("elfinder-cwd-wrapper-empty elfinder-search-result elfinder-incsearch-result elfinder-letsearch-result"),(t.searchStatus.state>1||t.searchStatus.ininc)&&Le.addClass("elfinder-search-result"+(t.searchStatus.ininc?" elfinder-"+("/"===O.substr(0,1)?"let":"inc")+"search-result":"")),le.attachThumbJob&&le.attachThumbJob._abort(),Ue.data("selectable")&&Ue.selectable("disable").selectable("destroy").removeData("selectable"),t.trigger("cwdinit"),J=e();try{Ue.empty()}catch(i){Ue.html("")}we&&(Pe.off("scroll.fixheader resize.fixheader"),we.remove(),we=null),Ue.removeClass("elfinder-cwd-view-icons elfinder-cwd-view-list").addClass("elfinder-cwd-view-"+(p?"list":"icons")).attr("style","").css("height","auto"),Re.hide(),Pe[p?"addClass":"removeClass"]("elfinder-cwd-wrapper-list")._padding=parseInt(Pe.css("padding-top"))+parseInt(Pe.css("padding-bottom")),t.UA.iOS&&Pe.removeClass("overflow-scrolling-touch").addClass("overflow-scrolling-touch"),p&&(Ue.html("<table><thead/><tbody/></table>"),n=e('<tr class="ui-state-default"><td class="elfinder-cwd-view-th-name">'+t.getColumnName("name")+"</td>"+je()+"</tr>"),Ue.find("thead").hide().append(n).find("td:first").append(qe),e.fn.sortable&&n.addClass("touch-punch touch-punch-keep-default").sortable({axis:"x",distance:8,items:"> .sortable-item",start:function(t,n){e(n.item[0]).data("dragging",!0),n.placeholder.width(n.helper.removeClass("ui-state-hover").width()).removeClass("ui-state-active").addClass("ui-state-hover").css("visibility","visible")},update:function(n,i){var a,o,r=e(i.item[0]).attr("class").split(" ")[0].replace("elfinder-cwd-view-th-","");E=e.map(e(this).children(),function(t){var n=e(t).attr("class").split(" ")[0].replace("elfinder-cwd-view-th-","");return o||(r===n?o=!0:a=n),"name"===n?null:n}),N.row=R(),t.storage("cwdCols",E),a=".elfinder-col-"+a+":first",r=".elfinder-col-"+r+":first",t.lazy(function(){Ue.find("tbody tr").each(function(){var t=e(this);t.children(a).after(t.children(r))})})},stop:function(t,n){setTimeout(function(){e(n.item[0]).removeData("dragging")},100)}}),n.find("td").addClass("touch-punch").resizable({handles:"ltr"===t.direction?"e":"w",start:function(t,n){var i=Ue.find("td.elfinder-col-"+n.element.attr("class").split(" ")[0].replace("elfinder-cwd-view-th-","")+":first");n.element.data("dragging",!0).data("resizeTarget",i).data("targetWidth",i.width()),H=!0,"fixed"!==Ue.find("table").css("table-layout")&&(Ue.find("tbody tr:first td").each(function(){e(this).width(e(this).width())}),Ue.find("table").css("table-layout","fixed"))},resize:function(e,t){t.element.data("resizeTarget").width(t.element.data("targetWidth")-(t.originalSize.width-t.size.width))},stop:function(n,i){H=!1,ke({fitWidth:!0}),_={},Ue.find("tbody tr:first td").each(function(){var t=e(this).attr("class").split(" ")[0].replace("elfinder-col-","");_[t]=e(this).width()}),t.storage("cwdColWidth",_),setTimeout(function(){i.element.removeData("dragging")},100)}}).find(".ui-resizable-handle").addClass("ui-icon ui-icon-grip-dotted-vertical")),se=e.map(D||F,function(e){return t.file(e)||null}),se=t.sortFiles(se),D?D=e.map(se,function(e){return e.hash}):F=e.map(se,function(e){return e.hash}),le={renderd:0,attachTmbs:{},getTmbs:[],tmbLoading:{},lazyOpts:{tm:0}},Le[se.length<1?"addClass":"removeClass"]("elfinder-cwd-wrapper-empty"),Pe.off(pe,ye).on(pe,ye).trigger(pe),t.cwd().write?(Pe[t.isCommandEnabled("upload")?"addClass":"removeClass"]("native-droppable"),Pe.droppable(t.isCommandEnabled("paste")?"enable":"disable")):Pe.removeClass("native-droppable").droppable("disable").removeClass("ui-state-disabled")})},Ue=e(this).addClass("ui-helper-clearfix elfinder-cwd").attr("unselectable","on").on("click."+t.namespace,b,function(n){var i,a,o,r,s,l=this.id?e(this):e(this).parents("[id]:first"),c=e(n.target);if(q&&(c.is("input:checkbox."+S)||c.hasClass("elfinder-cwd-select")))return n.stopPropagation(),n.preventDefault(),l.trigger(l.hasClass(y)?h:u),oe(),void requestAnimationFrame(function(){c.prop("checked",l.hasClass(y))});if(Ue.data("longtap")||c.hasClass("elfinder-cwd-nonselect"))return void n.stopPropagation();if(U||(U=l.attr("id"),setTimeout(function(){U=""},500)),n.shiftKey&&(i=l.prevAll(ae||"."+y+":first"),a=l.nextAll(ae||"."+y+":first"),o=i.length,r=a.length),n.shiftKey&&(o||r))s=o?l.prevUntil("#"+i.attr("id")):l.nextUntil("#"+a.attr("id")),s.add(l).trigger(u);else if(n.ctrlKey||n.metaKey)l.trigger(l.hasClass(y)?h:u);else{if(Pe.data("touching")&&l.hasClass(y))return Pe.data("touching",null),void t.dblclick({file:t.cwdId2Hash(this.id)});ne({notrigger:!0}),l.trigger(u)}oe()}).on("dblclick."+t.namespace,b,function(n){if(U){var i=t.cwdId2Hash(U);n.stopPropagation(),this.id!==U&&(e(this).trigger(h),e("#"+U).trigger(u),oe()),t.dblclick({file:i})}}).on("touchstart."+t.namespace,b,function(n){if(!(n.originalEvent.touches.length>1)){var i,a=this.id?e(this):e(this).parents("[id]:first"),o=e(n.target),r=n.target.nodeName;if("INPUT"===r&&"text"===n.target.type||"TEXTAREA"===r||o.hasClass("elfinder-cwd-nonselect"))return void n.stopPropagation();if(a.find("input:text,textarea").length)return n.stopPropagation(),void n.preventDefault();Pe.data("touching",{x:n.originalEvent.touches[0].pageX,y:n.originalEvent.touches[0].pageY}),q&&(o.is("input:checkbox."+S)||o.hasClass("elfinder-cwd-select"))||(i=a.prevAll("."+y+":first").length+a.nextAll("."+y+":first").length,Ue.data("longtap",null),(Object.keys(Q).length||p&&"TD"!==n.target.nodeName||!p&&this!==n.target)&&(Ue.data("longtap",!1),a.addClass(C),a.data("tmlongtap",setTimeout(function(){Ue.data("longtap",!0),a.trigger(u),oe(),t.trigger("contextmenu",{type:"files",targets:t.selected(),x:n.originalEvent.touches[0].pageX,y:n.originalEvent.touches[0].pageY})},500))))}}).on("touchmove."+t.namespace+" touchend."+t.namespace,b,function(n){var i,a=e(n.target);if(!q||!a.is("input:checkbox."+S)&&!a.hasClass("elfinder-cwd-select")){if("INPUT"==n.target.nodeName||"TEXTAREA"==n.target.nodeName)return void n.stopPropagation();i=this.id?e(this):e(this).parents("[id]:first"),clearTimeout(i.data("tmlongtap")),"touchmove"===n.type?(Pe.data("touching",null),i.removeClass(C)):(Pe.data("touching")&&!Ue.data("longtap")&&i.hasClass(y)&&(n.preventDefault(),Pe.data("touching",null),t.dblclick({file:t.cwdId2Hash(this.id)})),setTimeout(function(){Ue.removeData("longtap")},80))}}).on("mouseenter."+t.namespace,b,function(n){if(!ue){var i=e(this),a=null;if(!(d||i.data("dragRegisted")||i.hasClass(A)||i.hasClass(x)||i.hasClass(w))){if(i.data("dragRegisted",!0),!t.isCommandEnabled("copy",t.searchStatus.state>1||i.hasClass("isroot")?t.cwdId2Hash(i.attr("id")):void 0))return;i.on("mousedown",function(n){var a=n.shiftKey||n.altKey,o=!1;a&&!t.UA.IE&&Ue.data("selectable")&&(Ue.selectable("disable").selectable("destroy").removeData("selectable"),requestAnimationFrame(function(){Ue.selectable(he).selectable("option",{disabled:!1}).selectable("refresh").data("selectable",!0)})),i.removeClass("ui-state-disabled"),a?i.draggable("option","disabled",!0).attr("draggable","true"):(i.hasClass(y)||(o=p?e(n.target).closest("span,tr").is("tr"):e(n.target).hasClass("elfinder-cwd-file")),o?i.draggable("option","disabled",!0):i.draggable("option","disabled",!1).removeAttr("draggable").draggable("option","cursorAt",{left:50-parseInt(e(n.currentTarget).css("margin-left")),top:47}))}).on("dragstart",function(n){var i=n.dataTransfer||n.originalEvent.dataTransfer||null;if(a=null,i&&!t.UA.IE){var o,r=this.id?e(this):e(this).parents("[id]:first"),s=e("<span>"),l="",c=null,d=null,p=[],h=function(n){var i,a=n.mime,o=t.tmb(n);return i='<div class="elfinder-cwd-icon elfinder-cwd-icon-drag '+t.mime2class(a)+' ui-corner-all"/>',o&&(i=e(i).addClass(o.className).css("background-image","url('"+o.url+"')").get(0).outerHTML),i},f=[];if(r.trigger(u),oe(),e.each(Q,function(n){var i=t.file(n),a=i.url;if(i&&"directory"!==i.mime){if(a){if("1"==a)return f.push(n),!0}else a=t.url(i.hash);a&&(a=t.convAbsUrl(a),p.push(n),e("<a>").attr("href",a).text(a).appendTo(s),l+=a+"\n",c||(c=i.mime+":"+i.name+":"+a),d||(d=a+"\n"+i.name))}}),f.length)return e.each(f,function(e,n){var i=t.file(n);i.url="",t.request({data:{cmd:"url",target:n},notify:{type:"url",cnt:1},preventDefault:!0}).always(function(e){i.url=e.url?e.url:"1"})}),!1;if(!l)return!1;i.setDragImage&&(a=e('<div class="elfinder-drag-helper html5-native"></div>').append(h(t.file(p[0]))).appendTo(e(document.body)),(o=p.length)>1&&a.append(h(t.file(p[o-1]))+'<span class="elfinder-drag-num">'+o+"</span>"),i.setDragImage(a.get(0),50,47)),i.effectAllowed="copyLink",i.setData("DownloadURL",c),i.setData("text/x-moz-url",d),i.setData("text/uri-list",l),i.setData("text/plain",l),i.setData("text/html",s.html()),i.setData("elfinderfrom",window.location.href+t.cwd().hash),i.setData("elfinderfrom:"+i.getData("elfinderfrom"),"")}}).on("dragend",function(e){ne({notrigger:!0}),a&&a.remove()}).draggable(t.draggable)}}}).on(u,b,function(n){var i=e(this),a=t.cwdId2Hash(i.attr("id"));G||i.hasClass(w)||(ae="#"+this.id,i.addClass(y).children().addClass(C).find("input:checkbox."+S).prop("checked",!0),Q[a]||(Q[a]=!0),J=Ue.find("[id]."+y+":last").next())}).on(h,b,function(n){var i=e(this),a=t.cwdId2Hash(i.attr("id"));G||(i.removeClass(y).children().removeClass(C).find("input:checkbox."+S).prop("checked",!1),Ue.hasClass("elfinder-cwd-allselected")&&(q&&qe.children("input").prop("checked",!1),Ue.removeClass("elfinder-cwd-allselected")),Q[a]&&delete Q[a])}).on(f,b,function(){var t=e(this).removeClass(C+" "+y).addClass(w),n=t.children(),i=p?t:n.find("div.elfinder-cwd-file-wrapper,div.elfinder-cwd-filename");n.removeClass(C+" "+y),t.hasClass(k)&&t.droppable("disable"),i.hasClass(x)&&i.draggable("disable")}).on(m,b,function(){var t=e(this).removeClass(w),n=p?t:t.children("div.elfinder-cwd-file-wrapper,div.elfinder-cwd-filename");t.hasClass(k)&&t.droppable("enable"),n.hasClass(x)&&n.draggable("enable")}).on("scrolltoview",b,function(t,n){re(e(this),!n||"undefined"==typeof n.blink||n.blink)}).on("mouseenter."+t.namespace+" mouseleave."+t.namespace,b,function(n){var i="mouseenter"===n.type;i&&(ue||t.UA.Mobile)||(t.trigger("hover",{hash:t.cwdId2Hash(e(this).attr("id")),type:n.type}),e(this).toggleClass(C,"mouseenter"==n.type))}).on("mouseenter."+t.namespace+" mouseleave."+t.namespace,".elfinder-cwd-file-wrapper,.elfinder-cwd-filename",function(t){var n="mouseenter"===t.type;n&&ue||e(this).closest(b).children(".elfinder-cwd-file-wrapper,.elfinder-cwd-filename").toggleClass(z,"mouseenter"==t.type)}).on("contextmenu."+t.namespace,function(n){var i=e(n.target).closest(b);if(i.get(0)!==n.target||Q[t.cwdId2Hash(i.get(0).id)])return i.find("input:text,textarea").length?void n.stopPropagation():void(i.length&&("TD"!=n.target.nodeName||Q[t.cwdId2Hash(i.get(0).id)])&&(n.stopPropagation(),n.preventDefault(),i.hasClass(w)||Pe.data("touching")||(i.hasClass(y)||(ne({notrigger:!0}),i.trigger(u),oe()),t.trigger("contextmenu",{type:"files",targets:t.selected(),x:n.pageX,y:n.pageY}))))}).on("click."+t.namespace,function(e){e.target!==this||Ue.data("longtap")||!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&ne()}).on("create."+t.namespace,function(n,i){var a=p?Ue.find("tbody"):Ue,o=a.find(".elfinder-cwd-parent"),r=i.move||!1,s=e(X(i)).addClass(A),l=t.selected();l.length?r&&t.trigger("lockfiles",{files:l}):ne(),o.length?o.after(s):a.prepend(s),Ce(),Pe.scrollTop(0).scrollLeft(0)}).on("unselectall",ne).on("selectfile",function(e,n){t.cwdHash2Elm(n).trigger(u),oe()}).on("colwidth",function(){p&&(Ue.find("table").css("table-layout","").find("td").css("width",""),ke({fitWidth:!0}),t.storage("cwdColWidth",_=null))}).on("iconpref",function(e,t){Ue.removeClass(function(e,t){return(t.match(/\belfinder-cwd-size\S+/g)||[]).join(" ")}),s=t?parseInt(t.size)||0:0,p||(s>0&&Ue.addClass("elfinder-cwd-size"+s),le.renderd&&requestAnimationFrame(function(){Ke.icons={},le.hpi=null,Fe(Ue,le.renderd),me()}))}).on("onwheel"in document?"wheel":"mousewheel",function(e){var i,a,o;!p&&(e.ctrlKey&&!e.metaKey||!e.ctrlKey&&e.metaKey)&&(e.stopPropagation(),e.preventDefault(),i=Ue.data("wheelTm"),"undefined"!=typeof i?(clearTimeout(i),Ue.data("wheelTm",setTimeout(function(){Ue.removeData("wheelTm")},200))):(Ue.data("wheelTm",!1),a=s||0,o=e.originalEvent.deltaY?e.originalEvent.deltaY:-e.originalEvent.wheelDelta,o>0?s>0&&(a=s-1):s<n.iconsView.sizeMax&&(a=s+1),a!==s&&(t.storage("iconsize",a),Ue.trigger("iconpref",{size:a}))))}),Pe=e('<div class="elfinder-cwd-wrapper"/>').droppable(Object.assign({},ze,{autoDisable:!1})).on("contextmenu."+t.namespace,De.contextmenu).on("touchstart."+t.namespace,De.touchstart).on("touchmove."+t.namespace+" touchend."+t.namespace,De.touchend).on("click."+t.namespace,De.click).on("scroll."+t.namespace,function(){ue||(Ue.data("selectable")&&Ue.selectable("disable"),Pe.trigger(de)),ue=!0,le.scrtm&&cancelAnimationFrame(le.scrtm),le.scrtm&&Math.abs((le.scrolltop||0)-(le.scrolltop=this.scrollTop||e(this).scrollTop()))<5&&(le.scrtm=0,Pe.trigger(pe)),le.scrtm=requestAnimationFrame(function(){le.scrtm=0,Pe.trigger(pe)})}).on(pe,function(){ue=!1,me()}),Re=e("<div>&nbsp;</div>").css({position:"absolute",width:"1px",height:"1px"}).hide(),qe=q?e('<div class="elfinder-cwd-selectall"><input type="checkbox"/></div>').attr("title",t.i18n("selectall")).on("touchstart mousedown click",function(t){return t.stopPropagation(),t.preventDefault(),!e(this).data("pending")&&"click"!==t.type&&(qe.data("pending",!0),void(Ue.hasClass("elfinder-cwd-allselected")?(qe.find("input").prop("checked",!1),requestAnimationFrame(function(){ne()})):te()))}):e(),He=null,_e=function(t){var n=function(){if("undefined"!=typeof le.renderd){var t=0;Pe.siblings("div.elfinder-panel:visible").each(function(){t+=e(this).outerHeight(!0)}),Pe.height(Le.height()-t-Pe._padding)}};t&&n(),He&&cancelAnimationFrame(He),He=requestAnimationFrame(function(){!t&&n();var e,i;Ue.css("height","auto"),e=Pe[0].clientHeight-parseInt(Pe.css("padding-top"))-parseInt(Pe.css("padding-bottom"))-parseInt(Ue.css("margin-top")),i=Ue.outerHeight(!0),i<e&&Ue.height(e)}),p&&!H&&(t?Pe.trigger("resize.fixheader"):ke()),me()},Ne=e(this).parent().on("resize",_e),Le=Ne.children(".elfinder-workzone").append(Pe.append(this).append(Re)),We=e('<div class="elfinder-cwd-message-board"/>').insertAfter(Ue),Be=e('<div class="elfinder-cwd-expires" />'),$e=function(){var e,n,i;o&&clearTimeout(o),l&&t.volumeExpires[l]&&(n=t.volumeExpires[l]-+new Date/1e3,i=n%60+.1,e=Math.floor(n/60),Be.html(t.i18n(["minsLeft",e])).show(),e&&(o=setTimeout($e,1e3*i)))},Ke={icons:{},list:{}};t.UA.ltIE10||We.append(e('<div class="elfinder-cwd-trash" />').html(t.i18n("volume_Trash"))).append(Be),$=Object.assign($,n.replacement||{});try{_=t.storage("cwdColWidth")?t.storage("cwdColWidth"):null}catch(Ve){_=null}t.bind("columnpref",function(i){var a=i.data||{};(E=t.storage("cwdCols"))?(E=e.grep(E,function(e){return n.listView.columns.indexOf(e)!==-1}),n.listView.columns.length>E.length&&e.each(n.listView.columns,function(e,t){E.indexOf(t)===-1&&E.push(t)})):E=n.listView.columns;var o=t.storage("columnhides")||null;o&&Object.keys(o).length&&(E=e.grep(E,function(e){return!o[e]})),N.row=R(),p&&a.repaint&&Ee()}).trigger("columnpref"),d&&e("body").on("touchstart touchmove touchend",function(e){}),q&&Ue.addClass("elfinder-has-checkbox"),e(window).on("scroll."+t.namespace,function(){c&&cancelAnimationFrame(c),c=requestAnimationFrame(function(){Pe.trigger(pe)})}),e(document).on("keydown."+t.namespace,function(n){n.keyCode==e.ui.keyCode.ESCAPE&&(t.getUI().find(".ui-widget:visible").length||ne())}),t.one("init",function(){var i,a,o,s,l=document.createElement("style"),c=0;document.head&&(document.head.appendChild(l),i=l.sheet,i.insertRule('.elfinder-cwd-wrapper-empty .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyFolder")+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty .native-droppable .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyFolder"+(d?"LTap":"Drop"))+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty .ui-droppable-disabled .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyFolder")+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty.elfinder-search-result .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptySearch")+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty.elfinder-search-result.elfinder-incsearch-result .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyIncSearch")+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty.elfinder-search-result.elfinder-letsearch-result .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyLetSearch")+'" }',c++)),(s=t.storage("iconsize")||n.iconsView.size||0)&&(s=Math.min(s,n.iconsView.sizeMax),Ue.trigger("iconpref",{size:s})),d||(t.one("open",function(){i&&t.zIndex&&i.insertRule(".ui-selectable-helper{z-index:"+t.zIndex+";}",c++)}),o=e('<div style="position:absolute"/>'),a=t.getUI(),a.on("resize",function(e,t){var n;e.preventDefault(),e.stopPropagation(),t&&t.fullscreen&&(n=a.offset(),"on"===t.fullscreen?(o.css({top:n.top*-1,left:n.left*-1}).appendTo(a),he.appendTo=o):(o.detach(),he.appendTo="body"),Ue.data("selectable")&&Ue.selectable("option",{appendTo:he.appendTo}))})),r=t.getUI("tree").length}).bind("enable",function(){_e()}).bind("request.open",function(){le.getTmbs=[]}).one("open",function(){t.maxTargets&&(I=Math.min(t.maxTargets,I))}).bind("open add remove searchend",function(){var n=t.cwd().hash,i=this.type;if(("open"===i||"searchend"===i||t.searchStatus.state<2)&&(F=e.map(t.files(n),function(e){return e.hash}),t.trigger("cwdhasheschange",F)),"open"===i){var a=function(){var n=!1;return e.each(M,function(e,i){if(t.trashes[i])return n=!0,!1}),n},o=n&&(!t.file(n)||r)?r?function(){var n=e.Deferred();return t.one("treesync",function(e){e.data.always(function(){n.resolve()})}),n}():t.request({data:{cmd:"parents",target:t.cwd().hash},preventFail:!0}):null,s=t.cwd();s.volumeid!==l&&(Be.empty().hide(),l&&Pe.removeClass("elfinder-cwd-wrapper-"+l),l=s.volumeid,$e(),Pe.addClass("elfinder-cwd-wrapper-"+l)),e.when(o).done(function(){M=t.parents(s.hash),Pe[a()?"addClass":"removeClass"]("elfinder-cwd-wrapper-trash")}),D=void 0,ne({notrigger:!0}),Ee()}}).bind("search",function(n){F=e.map(n.data.files,function(e){return e.hash}),t.trigger("cwdhasheschange",F),D=void 0,t.searchStatus.ininc=!1,Ee(),t.autoSync("stop")}).bind("searchend",function(e){(O||D)&&(O="",D?t.trigger("incsearchend",e.data):e.data&&e.data.noupdate||Ee()),t.autoSync()}).bind("searchstart",function(e){ne(),O=e.data.query}).bind("incsearchstart",function(n){Q={},t.lazy(function(){var i,a,o="";a=O=n.data.query||"",a?("/"===a.substr(0,1)&&(a=a.substr(1),o="^"),i=new RegExp(o+a.replace(/([\\*\;\.\?\[\]\{\}\(\)\^\$\-\|])/g,"\\$1"),"i"),D=e.grep(F,function(e){var n=t.file(e);return!(!n||!(n.name.match(i)||n.i18&&n.i18.match(i)))}),t.trigger("incsearch",{hashes:D,query:a}).searchStatus.ininc=!0,Ee(),t.autoSync("stop")):t.trigger("incsearchend")})}).bind("incsearchend",function(e){O="",t.searchStatus.ininc=!1,D=void 0,e.data&&e.data.noupdate||Ee(),t.autoSync()}).bind("sortchange",function(){var e=Pe.scrollLeft(),n=Ue.hasClass("elfinder-cwd-allselected");Ee(),t.one("cwdrender",function(){Pe.scrollLeft(e),n&&(Q=t.arrayFlip(D||F,!0)),(n||Object.keys(Q).length)&&oe()})}).bind("viewchange",function(){var e="list"==t.storage("view"),n=Ue.hasClass("elfinder-cwd-allselected");e!=p&&(p=e,t.viewType=p?"list":"icons",s&&t.one("cwdinit",function(){Ue.trigger("iconpref",{size:s})}),Ee(),_e(),n&&(Ue.addClass("elfinder-cwd-allselected"),qe.find("input").prop("checked",!0)),Object.keys(Q).length&&oe())}).bind("wzresize",function(){var e,n=p?Ue.find("tbody"):Ue;_e(!0),le.hpi&&Fe(n,n.find("[id]").length),e=Ue.offset(),Le.data("rectangle",Object.assign({width:Le.width(),height:Le.height(),cwdEdge:"ltr"===t.direction?e.left:e.left+Ue.width()},Le.offset())),le.itemH=(p?n.find("tr:first"):n.find("[id]:first")).outerHeight(!0)}).bind("changeclipboard",function(t){j={},t.data&&t.data.clipboard&&t.data.clipboard.length&&e.each(t.data.clipboard,function(e,t){t.cut&&(j[t.hash]=!0)})}).bind("resMixinMake",function(){Ce()}).bind("tmbreload",function(t){var n={},i=t.data&&t.data.files?t.data.files:null;e.each(i,function(e,t){t.tmb&&"1"!=t.tmb&&(n[t.hash]=t.tmb)}),Object.keys(n).length&&Ae(n,!0)}).add(function(n){var i=O?new RegExp(O.replace(/([\\*\;\.\?\[\]\{\}\(\)\^\$\-\|])/g,"\\$1"),"i"):null,a=t.searchStatus.mime,o=t.searchStatus.state>1,r=o&&t.searchStatus.target?t.searchStatus.target:t.cwd().hash,s=t.path(r),l=function(n){var l,c;return l=n.phash===r,!l&&o&&(c=n.path||t.path(n.hash),l=s&&0===c.indexOf(s),!l&&t.searchStatus.mixed&&(l=!!e.grep(t.searchStatus.mixed,function(e){return 0===n.hash.indexOf(e)}).length)),l&&o&&(l=a?0===n.mime.indexOf(a):!!(n.name.match(i)||n.i18&&n.i18.match(i))),l},c=e.grep(n.data.added||[],function(e){return!!l(e)});Ie(c),2===t.searchStatus.state&&(e.each(c,function(t,n){e.inArray(n.hash,F)===-1&&F.push(n.hash)}),t.trigger("cwdhasheschange",F)),p&&_e(),Pe.trigger(pe)}).change(function(n){var i,a=t.cwd().hash,o=t.selected();O?e.each(n.data.changed||[],function(n,a){t.cwdHash2Elm(a.hash).length&&(Oe([a.hash]),Ie([a],"change"),e.inArray(a.hash,o)!==-1&&Z(a.hash),i=!0)}):e.each(e.grep(n.data.changed||[],function(e){return e.phash==a}),function(n,a){t.cwdHash2Elm(a.hash).length&&(Oe([a.hash]),Ie([a],"change"),e.inArray(a.hash,o)!==-1&&Z(a.hash),i=!0)}),i&&(t.trigger("cwdhasheschange",F),p&&_e(),Pe.trigger(pe)),oe()}).remove(function(e){var t=p?Ue.find("tbody"):Ue;Oe(e.data.removed||[]),oe(),se.length<1&&t.children(b+(n.oldSchool?":not(.elfinder-cwd-parent)":"")).length<1?(Le.addClass("elfinder-cwd-wrapper-empty"),q&&qe.find("input").prop("checked",!1),Re.hide(),Pe.off(pe,ye),_e()):(Fe(t),Pe.trigger(pe))}).dragstart(function(t){var n=e(t.data.target),i=t.data.originalEvent;n.hasClass(v)&&(n.hasClass(y)||(!(i.ctrlKey||i.metaKey||i.shiftKey)&&ne({notrigger:!0}),n.trigger(u),oe())),Ue.removeClass(w).data("selectable")&&Ue.selectable("disable"),G=!0}).dragstop(function(){Ue.data("selectable")&&Ue.selectable("enable"),G=!1}).bind("lockfiles unlockfiles selectfiles unselectfiles",function(n){var i,a,o,r={lockfiles:f,unlockfiles:m,selectfiles:u,unselectfiles:h},s=r[n.type],l=n.data.files||[],c=l.length,d=n.data.helper||e();if(c>0&&(i=t.parents(l[0])),s!==u&&s!==h||(o=s===u,e.each(l,function(e,t){var n=Ue.hasClass("elfinder-cwd-allselected");Q[t]?(n&&(q&&qe.children("input").prop("checked",!1),Ue.removeClass("elfinder-cwd-allselected"),n=!1),!o&&delete Q[t]):o&&(Q[t]=!0)})),!d.data("locked")){for(;c--;)try{t.cwdHash2Elm(l[c]).trigger(s)}catch(n){}!n.data.inselect&&oe()}Pe.data("dropover")&&i.indexOf(Pe.data("dropover"))!==-1&&(a="lockfiles"!==n.type,d.toggleClass("elfinder-drag-helper-plus",a),Pe.toggleClass(T,a))}).bind("mkdir mkfile duplicate upload rename archive extract paste multiupload",function(n){if("upload"!=n.type||!n.data._multiupload){var i=t.cwd().hash;ne({notrigger:!0}),e.each((n.data.added||[]).concat(n.data.changed||[]),function(e,t){t&&t.phash==i&&Z(t.hash)}),oe()}}).shortcut({pattern:"ctrl+a",description:"selectall",callback:te}).shortcut({pattern:"ctrl+shift+i",description:"selectinvert",callback:ie}).shortcut({pattern:"left right up down shift+left shift+right shift+up shift+down",description:"selectfiles",type:"keydown",callback:function(e){Y(e.keyCode,e.shiftKey)}}).shortcut({pattern:"home",description:"selectffile",callback:function(e){ne({notrigger:!0}),re(Ue.find("[id]:first").trigger(u)),oe()}}).shortcut({pattern:"end",description:"selectlfile",callback:function(e){ne({notrigger:!0}),re(Ue.find("[id]:last").trigger(u)),oe()}}).shortcut({pattern:"page_up",description:"pageTurning",callback:function(e){le.itemH&&Pe.scrollTop(Math.round(Pe.scrollTop()-Math.floor((Pe.height()+(p?le.itemH*-1:16))/le.itemH)*le.itemH))}}).shortcut({pattern:"page_down",description:"pageTurning",callback:function(e){le.itemH&&Pe.scrollTop(Math.round(Pe.scrollTop()+Math.floor((Pe.height()+(p?le.itemH*-1:16))/le.itemH)*le.itemH))}})}),this},e.fn.elfinderdialog=function(t,n){var i,a,o,r,s=window.navigator.platform.indexOf("Win")!=-1,l={},c={enabled:!1,width:!1,height:!1,defaultSize:null},d=function(t){var i,a;c.enabled&&(a=n.options.dialogContained?o:e(window),i={maxWidth:c.width?a.width()-l.width:null,maxHeight:c.height?a.height()-l.height:null},Object.assign(r,i),t.css(i).trigger("resize"),t.data("hasResizable")&&(t.resizable("option","maxWidth")<i.maxWidth||t.resizable("option","maxHeight")<i.maxHeight)&&t.resizable("option",i))},p=function(e){var t=e.data;i&&cancelAnimationFrame(i),i=requestAnimationFrame(function(){c.enabled&&d(t)})},u=function(){var e="elfinder-dialog",t=o.children("."+e+"."+n.res("class","editing")+":visible");n[t.length?"disable":"enable"]()},h={};return n&&n.ui?o=n.getUI():(o=this.closest(".elfinder"),n||(n=o.elfinder("instance"))),"string"==typeof t?((a=this.closest(".ui-dialog")).length&&("open"===t?"none"===a.css("display")&&(a.trigger("posinit").show().trigger("open").hide(),
17
- a.fadeIn(120,function(){n.trigger("dialogopened",{dialog:a})})):"close"===t||"destroy"===t?(a.stop(!0),(a.is(":visible")||o.is(":hidden"))&&(a.trigger("close"),n.trigger("dialogclosed",{dialog:a})),"destroy"===t&&(a.remove(),n.trigger("dialogremoved",{dialog:a}))):"toTop"===t?(a.trigger("totop"),n.trigger("dialogtotoped",{dialog:a})):"posInit"===t?(a.trigger("posinit"),n.trigger("dialogposinited",{dialog:a})):"tabstopsInit"===t?(a.trigger("tabstopsInit"),n.trigger("dialogtabstopsinited",{dialog:a})):"checkEditing"===t&&u()),this):(t=Object.assign({},e.fn.elfinderdialog.defaults,t),t.allowMinimize&&"auto"===t.allowMinimize&&(t.allowMinimize=!!this.find("textarea,input").length),t.openMaximized=t.allowMinimize&&t.openMaximized,t.headerBtnPos&&"auto"===t.headerBtnPos&&(t.headerBtnPos=s?"right":"left"),t.headerBtnOrder&&"auto"===t.headerBtnOrder&&(t.headerBtnOrder=s?"close:maximize:minimize":"close:minimize:maximize"),t.modal&&t.allowMinimize&&(t.allowMinimize=!1),n.options.dialogContained?c.width=c.height=c.enabled=!0:(c.width="window"===t.maxWidth,c.height="window"===t.maxHeight,(c.width||c.height)&&(c.enabled=!0)),h=n.arrayFlip(t.propagationEvents,!0),this.filter(":not(.ui-dialog-content)").each(function(){var i,a,f=e(this).addClass("ui-dialog-content ui-widget-content"),m="elfinder-dialog-active",g="elfinder-dialog",v="elfinder-dialog-notify",b="ui-state-hover",y="elfinder-tabstop",w="elfinder-focus",x="elfinder-dialog-modal",k=parseInt(1e6*Math.random()),C=e('<div class="ui-dialog-titlebar ui-widget-header ui-corner-top ui-helper-clearfix"><span class="elfinder-dialog-title">'+t.title+"</span></div>"),z=e('<div class="ui-dialog-buttonset"/>'),T=e('<div class=" ui-helper-clearfix ui-dialog-buttonpane ui-widget-content"/>').append(z),A=0,S=0,I=e(),O=e('<div style="width:100%;height:100%;position:absolute;top:0px;left:0px;"/>').hide(),j=function(){t.optimizeNumber&&P.find("input[type=number]").each(function(){e(this).attr("inputmode","numeric"),e(this).attr("pattern","[0-9]*")})},M=function(){I=P.find("."+y),I.length&&(I.attr("tabindex","-1"),I.filter("."+w).length||z.children("."+y+":"+(s?"first":"last")).addClass(w))},F=function(t){var n=I.filter(":visible:enabled"),i=t?null:n.filter("."+w+":first");return i&&i.length||(i=n.first()),t&&e.each(n,function(e,a){if(a===t&&n[e+1])return i=n.eq(e+1),!1}),i},D=function(t){var n=I.filter(":visible:enabled"),i=n.last();return e.each(n,function(e,a){if(a===t&&n[e-1])return i=n.eq(e-1),!1}),i},E=function(){e.each(t.headerBtnOrder.split(":").reverse(),function(e,t){U[t]&&U[t]()}),s&&C.children(".elfinder-titlebar-button").addClass("elfinder-titlebar-button-right")},U={close:function(){C.prepend(e('<span class="ui-widget-header ui-dialog-titlebar-close ui-corner-all elfinder-titlebar-button"><span class="ui-icon ui-icon-closethick"/></span>').on("mousedown",function(e){e.preventDefault(),e.stopPropagation(),f.elfinderdialog("close")}))},maximize:function(){t.allowMaximize&&(P.on("resize",function(e,t){var n,i;if(e.preventDefault(),e.stopPropagation(),t&&t.maximize){if(i=C.find(".elfinder-titlebar-full"),n="on"===t.maximize,i.children("span.ui-icon").toggleClass("ui-icon-plusthick",!n).toggleClass("ui-icon-arrowreturnthick-1-s",n),n){try{P.hasClass("ui-draggable")&&P.draggable("disable"),P.hasClass("ui-resizable")&&P.resizable("disable")}catch(e){}f.css("width","100%").css("height",P.height()-P.children(".ui-dialog-titlebar").outerHeight(!0)-T.outerHeight(!0))}else{f.attr("style",i.data("style")),i.removeData("style"),R();try{P.hasClass("ui-draggable")&&P.draggable("enable"),P.hasClass("ui-resizable")&&P.resizable("enable")}catch(e){}}P.trigger("resize",{init:!0})}}),C.prepend(e('<span class="ui-widget-header ui-corner-all elfinder-titlebar-button elfinder-titlebar-full"><span class="ui-icon ui-icon-plusthick"/></span>').on("mousedown",function(i){var a=e(this);i.preventDefault(),i.stopPropagation(),P.hasClass("elfinder-maximized")||"undefined"!=typeof a.data("style")||(f.height(f.height()),a.data("style",f.attr("style")||"")),n.toggleMaximize(P),"function"==typeof t.maximize&&t.maximize.call(f[0])})))},minimize:function(){var i,a,o;t.allowMinimize&&(i=e('<span class="ui-widget-header ui-corner-all elfinder-titlebar-button elfinder-titlebar-minimize"><span class="ui-icon ui-icon-minusthick"/></span>').on("mousedown",function(i){var r=e(this),s=n.getUI("bottomtray"),l={width:70,height:24},c=e("<div/>").css(l).addClass(P.get(0).className+" elfinder-dialog-minimized"),d={};i.preventDefault(),i.stopPropagation(),P.data("minimized")?(P.removeData("minimized").before(a.css(Object.assign({position:"absolute"},a.offset()))),n.toFront(a),a.animate(Object.assign({width:P.width(),height:P.height()},o),function(){P.show(),n.toFront(P),a.remove(),R(),u(),P.trigger("resize",{init:!0}),"function"==typeof t.minimize&&t.minimize.call(f[0])})):(o=P.data("minimized",!0).position(),a=P.clone().on("mousedown",function(){r.trigger("mousedown")}).removeClass("ui-draggable ui-resizable elfinder-frontmost"),s.append(c),Object.assign(d,c.offset(),l),c.remove(),a.height(P.height()).children(".ui-dialog-content:first").empty(),n.toHide(P.before(a)),a.children(".ui-dialog-content:first,.ui-dialog-buttonpane,.ui-resizable-handle").remove(),a.find(".elfinder-titlebar-minimize,.elfinder-titlebar-full").remove(),a.find(".ui-dialog-titlebar-close").on("mousedown",function(e){e.stopPropagation(),e.preventDefault(),a.remove(),P.show(),f.elfinderdialog("close")}),a.animate(d,function(){a.attr("style","").css({maxWidth:P.width()}).addClass("elfinder-dialog-minimized").appendTo(s),u(),"function"==typeof t.minimize&&t.minimize.call(f[0])}))}),C.on("dblclick",function(t){e(this).children(".elfinder-titlebar-minimize").trigger("mousedown")}).prepend(i),P.on("togleminimize",function(){i.trigger("mousedown")}))}},P=e('<div class="ui-front ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable std42-dialog touch-punch '+g+" "+t.cssClass+'"/>').hide().append(f).appendTo(o).draggable({containment:n.options.dialogContained?o:null,handle:".ui-dialog-titlebar",start:function(){O.show()},drag:function(e,t){var i=t.offset.top,a=t.offset.left;i<0&&(t.position.top=t.position.top-i),a<0&&(t.position.left=t.position.left-a),n.options.dialogContained&&(t.position.top<0&&(t.position.top=0),t.position.left<0&&(t.position.left=0))},stop:function(e,n){O.hide(),P.css({height:t.height}),f.data("draged",!0)}}).css({width:t.width,height:t.height,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}).on("touchstart touchmove touchend click dblclick mouseup mouseenter mouseleave mouseout mouseover mousemove",function(e){!h[e.type]&&e.stopPropagation()}).on("mousedown",function(t){!h[t.type]&&t.stopPropagation(),requestAnimationFrame(function(){P.is(":visible")&&!P.hasClass("elfinder-frontmost")&&(a=e(":focus"),a.length||(a=void 0),P.trigger("totop"))})}).on("open",function(){P.data("margin-y",f.outerHeight(!0)-f.height()),c.enabled&&(t.height&&"auto"!==t.height&&P.trigger("resize",{init:!0}),c.defaultSize||(c.defaultSize={width:f.width(),height:f.height()}),d(P),P.trigger("resize").trigger("posinit"),o.on("resize."+n.namespace,P,p)),P.hasClass(v)||o.children("."+g+":visible:not(."+v+")").each(function(){var t=e(this),n=parseInt(t.css("top")),i=parseInt(t.css("left")),a=parseInt(P.css("top")),o=parseInt(P.css("left")),r=Math.abs(n-a)<10,s=Math.abs(i-o)<10;t[0]!=P[0]&&(r||s)&&P.css({top:r?n+10:a,left:s?i+10:o})}),P.data("modal")&&(P.addClass(x),n.getUI("overlay").elfinderoverlay("show")),P.trigger("totop"),t.openMaximized&&n.toggleMaximize(P),n.trigger("dialogopen",{dialog:P}),"function"==typeof t.open&&e.proxy(t.open,f[0])(),t.closeOnEscape&&e(document).on("keydown."+k,function(t){t.keyCode==e.ui.keyCode.ESCAPE&&P.hasClass("elfinder-frontmost")&&f.elfinderdialog("close")}),P.hasClass(n.res("class","editing"))&&u()}).on("close",function(i){var a,r;t.beforeclose&&"function"==typeof t.beforeclose?(r=t.beforeclose(),r&&r.promise||(r=r?e.Deferred().resolve():e.Deferred().reject())):r=e.Deferred().resolve(),r.done(function(){c.enabled&&o.off("resize."+n.namespace,p),t.closeOnEscape&&e(document).off("keyup."+k),t.allowMaximize&&n.toggleMaximize(P,!1),n.toHide(P),P.data("modal")&&n.getUI("overlay").elfinderoverlay("hide"),"function"==typeof t.close&&e.proxy(t.close,f[0])(),t.destroyOnClose&&P.parent().length&&P.hide().remove(),a=o.children("."+g+":visible"),P.hasClass(n.res("class","editing"))&&u()})}).on("totop frontmost",function(){var e=n.storage("autoFocusDialog");P.data("focusOnMouseOver",e?e>0:n.options.uiOptions.dialog.focusOnMouseOver),P.data("minimized")&&C.children(".elfinder-titlebar-minimize").trigger("mousedown"),!P.data("modal")&&n.getUI("overlay").is(":visible")?n.getUI("overlay").before(P):n.toFront(P),o.children("."+g+":not(."+x+")").removeClass(m),P.addClass(m),!n.UA.Mobile&&(a||F()).trigger("focus"),a=void 0}).on("posinit",function(){var i,a,s,l,c,d,p,u=t.position;if(!P.hasClass("elfinder-maximized")){if(!u&&!P.data("resizing")){if(p=o.hasClass("elfinder-fullscreen")||n.options.enableAlways,P.css(p?{maxWidth:"100%",maxHeight:"100%",overflow:"auto"}:r),n.UA.Mobile&&!p&&P.data("rotated")===n.UA.Rotated)return;P.data("rotated",n.UA.Rotated),c=e(window),i=o.offset(),l={width:P.outerWidth(!0),height:P.outerHeight(!0)},l.right=i.left+l.width,l.bottom=i.top+l.height,d={scrLeft:c.scrollLeft(),scrTop:c.scrollTop(),width:c.width(),height:c.height()},d.right=d.scrLeft+d.width,d.bottom=d.scrTop+d.height,n.options.dialogContained||p?(a=0,s=0):(a=i.top*-1+d.scrTop,s=i.left*-1+d.scrLeft),u={top:l.height>=d.height?a:Math.max(a,parseInt((o.height()-l.height)/2-42)),left:l.width>=d.width?s:Math.max(s,parseInt((o.width()-l.width)/2))},l.right+u.left>d.right&&(u.left=Math.max(s,d.right-l.right)),l.bottom+u.top>d.bottom&&(u.top=Math.max(a,d.bottom-l.bottom))}t.absolute&&(u.position="absolute"),u&&P.css(u)}}).on("resize",function(n,i){var a,o,r=0,s=i&&i.init;i&&(i.minimize||i.maxmize)||P.data("minimized")||(n.stopPropagation(),n.preventDefault(),P.children(".ui-widget-header,.ui-dialog-buttonpane").each(function(){r+=e(this).outerHeight(!0)}),a=s||!c.enabled||n.originalEvent||P.hasClass("elfinder-maximized")?P.height()-r-P.data("margin-y"):Math.min(c.defaultSize.height,Math.max(parseInt(P.css("max-height")),parseInt(P.css("min-height")))-r-P.data("margin-y")),f.height(a),s||(R(),o=f.height(),o=a<o?o+r+P.data("margin-y"):t.minHeight,P.css("min-height",o),P.data("hasResizable")&&P.resizable("option",{minHeight:o}),"function"==typeof t.resize&&e.proxy(t.resize,f[0])(n,i)))}).on("tabstopsInit",M).on("focus","."+y,function(){e(this).addClass(b).parent("label").addClass(b),this.id&&e(this).parent().find("label[for="+this.id+"]").addClass(b)}).on("click","select."+y,function(){var t=e(this);t.data("keepFocus")?t.removeData("keepFocus"):t.data("keepFocus",!0)}).on("blur","."+y,function(){e(this).removeClass(b).removeData("keepFocus").parent("label").removeClass(b),this.id&&e(this).parent().find("label[for="+this.id+"]").removeClass(b)}).on("mouseenter mouseleave","."+y+",label",function(n){var i,a=e(this);("LABEL"!==this.nodeName||a.children("."+y).length||(i=a.attr("for"))&&e("#"+i).hasClass(y))&&(t.btnHoverFocus&&P.data("focusOnMouseOver")?"mouseenter"!==n.type||e(":focus").data("keepFocus")||a.trigger("focus"):a.toggleClass(b,"mouseenter"==n.type))}).on("keydown","."+y,function(t){var n,i,a=e(this);if(a.is(":focus")){if(n=t.keyCode===e.ui.keyCode.ESCAPE,t.keyCode===e.ui.keyCode.ENTER?(t.preventDefault(),a.trigger("click")):t.keyCode===e.ui.keyCode.TAB&&t.shiftKey||t.keyCode===e.ui.keyCode.LEFT||t.keyCode==e.ui.keyCode.UP?i="prev":t.keyCode!==e.ui.keyCode.TAB&&t.keyCode!=e.ui.keyCode.RIGHT&&t.keyCode!=e.ui.keyCode.DOWN||(i="next"),i&&(a.is("textarea")&&!t.ctrlKey&&!t.metaKey||a.is("select,span.ui-slider-handle")&&t.keyCode!==e.ui.keyCode.TAB||a.is("input:not(:checkbox,:radio)")&&!t.ctrlKey&&!t.metaKey&&t.keyCode===e.ui.keyCode["prev"===i?"LEFT":"RIGHT"]))return void t.stopPropagation();n?a.is("input:not(:checkbox,:radio),textarea")&&""!==a.val()&&(a.val(""),t.stopPropagation()):t.stopPropagation(),i&&(t.preventDefault(),("prev"===i?D:F)(this).trigger("focus"))}}).data({modal:t.modal}),R=function(){var e,t=n.getUI();t.hasClass("elfinder-fullscreen")&&(e=P.position(),P.css("top",Math.max(Math.min(Math.max(e.top,0),t.height()-100),0)),P.css("left",Math.max(Math.min(Math.max(e.left,0),t.width()-200),0)))};P.prepend(C),E(),e.each(t.buttons,function(t,n){var i=e('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only elfinder-btncnt-'+S++ +" "+y+'"><span class="ui-button-text">'+t+"</span></button>").on("click",e.proxy(n,f[0]));n._cssClass&&i.addClass(n._cssClass),s?z.append(i):z.prepend(i)}),z.children().length&&(P.append(T),P.show(),T.find("button").each(function(t,n){A+=e(n).outerWidth(!0)}),P.hide(),A+=20,P.width()<A&&P.width(A)),P.append(O),c.enabled&&(l.width=P.outerWidth(!0)-P.width()+(P.outerWidth()-P.width())/2,l.height=P.outerHeight(!0)-P.height()+(P.outerHeight()-P.height())/2),n.options.dialogContained&&(i={maxWidth:o.width()-l.width,maxHeight:o.height()-l.height},t.maxWidth=t.maxWidth?Math.min(i.maxWidth,t.maxWidth):i.maxWidth,t.maxHeight=t.maxHeight?Math.min(i.maxHeight,t.maxHeight):i.maxHeight,P.css(i)),r={maxWidth:P.css("max-width"),maxHeight:P.css("max-height"),overflow:P.css("overflow")},t.resizable&&P.resizable({minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,start:function(){O.show(),P.data("resizing")!==!0&&P.data("resizing")&&clearTimeout(P.data("resizing")),P.data("resizing",!0)},stop:function(e,t){O.hide(),P.data("resizing",setTimeout(function(){P.data("resizing",!1)},200)),c.enabled&&(c.defaultSize={width:f.width(),height:f.height()})}}).data("hasResizable",!0),j(),M(),"function"==typeof t.create&&e.proxy(t.create,this)(),t.autoOpen&&(t.open?requestAnimationFrame(function(){f.elfinderdialog("open")}):f.elfinderdialog("open")),t.resize&&n.bind("themechange",function(){setTimeout(function(){P.data("margin-y",f.outerHeight(!0)-f.height()),P.trigger("resize",{init:!0})},300)})}),this)},e.fn.elfinderdialog.defaults={cssClass:"",title:"",modal:!1,resizable:!0,autoOpen:!0,closeOnEscape:!0,destroyOnClose:!1,buttons:{},btnHoverFocus:!0,position:null,absolute:!1,width:320,height:"auto",minWidth:200,minHeight:70,maxWidth:null,maxHeight:null,allowMinimize:"auto",allowMaximize:!1,openMaximized:!1,headerBtnPos:"auto",headerBtnOrder:"auto",optimizeNumber:!0,propagationEvents:["mousemove","mouseup"]},e.fn.elfinderfullscreenbutton=function(t){return this.each(function(){var n,i=e(this).elfinderbutton(t),a=i.children(".elfinder-button-icon");t.change(function(){n&&cancelAnimationFrame(n),n=requestAnimationFrame(function(){var e=t.value;a.addClass("elfinder-button-icon-fullscreen").toggleClass("elfinder-button-icon-unfullscreen",e),t.className=e?"unfullscreen":""})})})},e.fn.elfindernavbar=function(t,n){return this.not(".elfinder-navbar").each(function(){var i,a,o,r,s,l,c,d=e(this).hide().addClass("ui-state-default elfinder-navbar"),p=d.css("overflow","hidden").parent(),u=p.children(".elfinder-workzone").append(d),h="ltr"==t.direction,f=function(){var e=t.getUI("cwd"),n=t.getUI("workzone"),i=n.data("rectangle"),a=e.offset();n.data("rectangle",Object.assign(i,{cwdEdge:"ltr"===t.direction?a.left:a.left+e.width()}))},m=function(){d.css("overflow","hidden"),i=Math.round(d.outerHeight()-d.height()),a=Math.round(c.outerWidth()-c.innerWidth()),d.css("overflow","auto")};t.one("init",function(){c=t.getUI("navdock");var e=function(){m(),t.bind("wzresize",function(){var e=0;c.width(d.outerWidth()-a),c.children().length>1&&(e=c.outerHeight(!0)),d.height(u.height()-e-i)}).trigger("wzresize")};t.cssloaded?e():t.one("cssloaded",e)}).one("opendone",function(){o&&o.trigger("resize"),d.css("overflow","auto")}).bind("themechange",m),t.UA.Touch&&(s=t.storage("autoHide")||{},"undefined"==typeof s.navbar&&(s.navbar=n.autoHideUA&&n.autoHideUA.length>0&&e.grep(n.autoHideUA,function(e){return!!t.UA[e]}).length,t.storage("autoHide",s)),s.navbar&&t.one("init",function(){d.children().length&&t.uiAutoHide.push(function(){d.stop(!0,!0).trigger("navhide",{duration:"slow",init:!0})})}),t.bind("load",function(){d.children().length&&(r=e('<div class="elfinder-navbar-swipe-handle"/>').hide().appendTo(u),"none"!==r.css("pointer-events")&&(r.remove(),r=null))}),d.on("navshow navhide",function(e,n){var i="navshow"===e.type?"show":"hide",a=n&&n.duration?n.duration:"fast",o=n&&n.handleW?n.handleW:Math.max(50,t.getUI().width()/10);d.stop(!0,!0)[i]({duration:a,step:function(){t.trigger("wzresize")},complete:function(){r&&("show"===i?r.stop(!0,!0).hide():(r.width(o?o:""),t.resources.blink(r,"slowonce"))),t.trigger("navbar"+i),n.init&&t.trigger("uiautohide"),f()}}),s.navbar="show"!==i,t.storage("autoHide",Object.assign(t.storage("autoHide"),{navbar:s.navbar}))}).on("touchstart",function(n){e(this)["scroll"+("ltr"===t.direction?"Right":"Left")]()>5&&(n.originalEvent._preventSwipeX=!0)})),t.UA.Mobile||(o=d.resizable({handles:h?"e":"w",minWidth:n.minWidth||150,maxWidth:n.maxWidth||500,resize:function(){t.trigger("wzresize")},stop:function(e,n){t.storage("navbarWidth",n.size.width),f()}}).on("resize scroll",function(n){var i=e(this),a=i.data("posinit");n.preventDefault(),n.stopPropagation(),h||"resize"!==n.type||d.css("left",0),a&&cancelAnimationFrame(a),i.data("posinit",requestAnimationFrame(function(){var e=t.UA.Opera&&d.scrollLeft()?20:2;o.css("top",0).css({top:parseInt(d.scrollTop())+"px",left:h?"auto":parseInt(d.scrollRight()-e)*-1,right:h?parseInt(d.scrollLeft()-e)*-1:"auto"}),"resize"===n.type&&t.getUI("cwd").trigger("resize")}))}).children(".ui-resizable-handle").addClass("ui-front")),(l=t.storage("navbarWidth"))?d.width(l):t.UA.Mobile&&t.one("cssloaded",function(){var n=function(){l=d.parent().width()/2,d.data("defWidth")>l?d.width(l):d.width(d.data("defWidth")),d.data("width",d.width()),t.trigger("wzresize")};d.data("defWidth",d.width()),e(window).on("resize."+t.namespace,n),n()})}),this},e.fn.elfindernavdock=function(t,n){return this.not(".elfinder-navdock").each(function(){var i,a,o=e(this).hide().addClass("ui-state-default elfinder-navdock touch-punch"),r=o.parent(),s=(r.children(".elfinder-workzone").append(o),function(n,i){var a,r=i||o.height(),s=n-r,l=Object.keys(c).length,d=l?s/l:0;s&&(a=o.css("overflow"),o.css("overflow","hidden"),o.height(n),e.each(c,function(e,n){n.height(n.height()+d).trigger("resize."+t.namespace)}),t.trigger("wzresize"),o.css("overflow",a))}),l=e('<div class="ui-front ui-resizable-handle ui-resizable-n"/>').appendTo(o),c={},d=(parseInt(n.initMaxHeight)||50)/100,p=(parseInt(n.maxHeight)||90)/100;o.data("addNode",function(e,n){var r,u,h,f=t.getUI("workzone").height(),m=f*d;return n=Object.assign({first:!1,sizeSync:!0,init:!1},n),e.attr("id")||e.attr("id",t.namespace+"-navdock-"+ +new Date),n.sizeSync&&(c[e.attr("id")]=e),r=o.height(),u=r+e.outerHeight(!0),n.first?l.after(e):o.append(e),a=!0,o.resizable("enable").height(u).show(),t.trigger("wzresize"),n.init&&(h=t.storage("navdockHeight"),u=h?h:u>m?m:u,i=u),s(Math.min(u,f*p)),o}).data("removeNode",function(n,i){var r=e("#"+n);return delete c[n],o.height(o.height()-e("#"+n).outerHeight(!0)),i?"detach"===i?r=r.detach():i.append(r):r.remove(),o.children().length<=1&&(a=!1,o.resizable("disable").height(0).hide()),t.trigger("wzresize"),r}),n.disabled||t.one("init",function(){var e;t.getUI("navbar").children().not(".ui-resizable-handle").length&&(o.data("dockEnabled",!0),o.resizable({maxHeight:t.getUI("workzone").height()*p,handles:{n:l},start:function(n,i){e=o.css("overflow"),o.css("overflow","hidden"),t.trigger("navdockresizestart",{event:n,ui:i},!0)},resize:function(e,n){o.css("top",""),t.trigger("wzresize",{inNavdockResize:!0})},stop:function(n,a){t.trigger("navdockresizestop",{event:n,ui:a},!0),o.css("top",""),i=a.size.height,t.storage("navdockHeight",i),s(i,a.originalSize.height),o.css("overflow",e)}}),t.bind("wzresize",function(e){var n,a;o.is(":visible")&&(n=t.getUI("workzone").height()*p,e.data&&e.data.inNavdockResize||(a=o.height(),n<i?Math.abs(a-n)>1&&s(n):Math.abs(a-i)>1&&s(i)),o.resizable("option","maxHeight",n))}).bind("themechange",function(){var e=Math.round(o.height());requestAnimationFrame(function(){var t=Math.round(o.height()),n=e-t;0!==n&&s(o.height(),t-n)})})),t.bind("navbarshow navbarhide",function(e){o[a&&"navbarshow"===e.type?"show":"hide"]()})})}),this},e.fn.elfinderoverlay=function(t){var n,i,a,o,r=this.parent().elfinder("instance");return this.filter(":not(.elfinder-overlay)").each(function(){t=Object.assign({},t),e(this).addClass("ui-front ui-widget-overlay elfinder-overlay").hide().on("mousedown",function(e){e.preventDefault(),e.stopPropagation()}).data({cnt:0,show:"function"==typeof t.show?t.show:function(){},hide:"function"==typeof t.hide?t.hide:function(){}})}),"show"==t&&(n=this.eq(0),i=n.data("cnt")+1,a=n.data("show"),r.toFront(n),n.data("cnt",i),n.is(":hidden")&&(n.show(),a())),"hide"==t&&(n=this.eq(0),i=n.data("cnt")-1,o=n.data("hide"),n.data("cnt",i),i<=0&&(n.hide(),o())),this},e.fn.elfinderpanel=function(t){return this.each(function(){var n=e(this).addClass("elfinder-panel ui-state-default ui-corner-all"),i="margin-"+("ltr"==t.direction?"left":"right");t.one("load",function(e){var a=t.getUI("navbar");n.css(i,parseInt(a.outerWidth(!0))),a.on("resize",function(e){e.preventDefault(),e.stopPropagation(),n.is(":visible")&&n.css(i,parseInt(a.outerWidth(!0)))})})})},e.fn.elfinderpath=function(t,n){return this.each(function(){var a,o,r="",s="",l=[],c="statusbar",d=t.res("class","hover"),p="path"+(i.prototype.uniqueid?i.prototype.uniqueid:"")+"-",u=e('<div class="ui-widget-header ui-helper-clearfix elfinder-workzone-path"/>'),h=e(this).addClass("elfinder-path").html("&nbsp;").on("mousedown","span.elfinder-path-dir",function(n){var i=e(this).attr("id").substr(p.length);n.preventDefault(),i!=t.cwd().hash&&(e(this).addClass(d),r?t.exec("search",r,{target:i,mime:l.join(" ")}):t.trigger("select",{selected:[i]}).exec("open",i))}).prependTo(t.getUI("statusbar").show()),f=e('<div class="elfinder-path-roots"/>').on("click",function(n){n.stopPropagation(),n.preventDefault();var i=e.map(t.roots,function(e){return t.file(e)}),a=[];e.each(i,function(e,n){n.phash||t.root(t.cwd().hash,!0)===n.hash||a.push({label:t.escape(n.i18||n.name),icon:"home",callback:function(){t.exec("open",n.hash)},options:{iconClass:n.csscls||"",iconImg:n.icon||""}})}),t.trigger("contextmenu",{raw:a,x:n.pageX,y:n.pageY})}).append('<span class="elfinder-button-icon elfinder-button-icon-menu" />').appendTo(u),m=function(n){var i=[],a=[];return e.each(t.parents(n),function(e,o){var r=n===o?"elfinder-path-dir elfinder-path-cwd":"elfinder-path-dir",s=t.file(o),l=t.escape(s.i18||s.name);a.push(l),i.push('<span id="'+p+o+'" class="'+r+'" title="'+a.join(t.option("separator"))+'">'+l+"</span>")}),i.join('<span class="elfinder-path-other">'+t.option("separator")+"</span>")},g=function(){var n;h.children("span.elfinder-path-dir").attr("style",""),n="ltr"===t.direction?e("#"+p+t.cwd().hash).prevAll("span.elfinder-path-dir:first"):e(),h.scrollLeft(n.length?n.position().left:0)},v=function(){if(!t.UA.CSS.flex){var n,i,a=h.children("span.elfinder-path-dir"),o=a.length;if("workzone"===c||o<2)return void a.attr("style","");h.width(h.css("max-width")),a.css({maxWidth:100/o+"%",display:"inline-block"}),n=h.width()-9,h.children("span.elfinder-path-other").each(function(){n-=e(this).width()}),i=[],a.each(function(t){var a=e(this),o=a.width();n-=o,o<this.scrollWidth&&i.push(t)}),h.width(""),i.length?(n>0&&(n/=i.length,e.each(i,function(t,i){var o=e(a[i]);o.css("max-width",o.width()+n)})),a.last().attr("style","")):a.attr("style","")}};t.one("init",function(){a=t.getUI("tree").length,o=t.getUI("stat").length,!a&&n.toWorkzoneWithoutNavbar&&(u.append(h).insertBefore(t.getUI("workzone")),c="workzone",t.bind("open",g).one("opendone",function(){t.getUI().trigger("resize")}))}).bind("open searchend parents",function(){r="",s="",l=[],h.html(m(t.cwd().hash)),Object.keys(t.roots).length>1?(h.css("margin",""),f.show()):(h.css("margin",0),f.hide()),!o&&v()}).bind("searchstart",function(e){e.data&&(r=e.data.query||"",s=e.data.target||"",l=e.data.mimes||[])}).bind("search",function(e){var n="";n=s?m(s):t.i18n("btnAll"),h.html('<span class="elfinder-path-other">'+t.i18n("searcresult")+": </span>"+n),v()}).bind("navbarshow navbarhide",function(){var e=t.getUI("workzone");"navbarshow"===this.type?(t.unbind("open",g),h.prependTo(t.getUI("statusbar")),u.detach(),c="statusbar"):(u.append(h).insertBefore(e),c="workzone",g(),t.bind("open",g)),t.trigger("uiresize")}).bind("resize uistatchange",v)})},e.fn.elfinderplaces=function(t,n){return this.each(function(){var i={},a="class",o=t.res(a,"navdir"),r=t.res(a,"navcollapse"),s=t.res(a,"navexpand"),l=t.res(a,"hover"),c=t.res(a,"treeroot"),d=t.res(a,"adroppable"),p=t.res("tpl","placedir"),u=t.res("tpl","perms"),h=e(t.res("tpl","navspinner")),f=n.suffix?n.suffix:"",m="places"+f,g=null,v=function(e){return e.substr(6)},b=function(e){return"place-"+e},y=function(t){return e(document.getElementById(b(t)))},w=function(){var n=[],a={};n=e.map(F.children().find("[id]"),function(e){return v(e.id)}),n.length?e.each(n.reverse(),function(e,t){a[t]=i[t]}):a=null,t.storage(m,a)},x=function(){var a,o;m="places"+(n.suffix?n.suffix:""),i={},a=t.storage(m),"string"==typeof a?(a=e.grep(a.split(","),function(e){return!!e}),e.each(a,function(e,t){var n=t.split("#");i[n[0]]=n[1]?n[1]:n[0]})):e.isPlainObject(a)&&(i=a),t.trigger("placesload",{dirs:i,storageKey:m},!0),o=Object.keys(i),o.length&&(M.prepend(h),t.request({data:{cmd:"info",targets:o},preventDefault:!0}).done(function(n){var a={};n.files&&n.files.length&&t.cache(n.files),e.each(n.files,function(e,t){var n=t.hash;a[n]=t}),e.each(i,function(e,t){C(a[e]||Object.assign({notfound:!0},t))}),t.storage("placesState")>0&&M.trigger("click")}).always(function(){h.remove()}))},k=function(n,i){return e(p.replace(/\{id\}/,b(n?n.hash:i)).replace(/\{name\}/,t.escape(n?n.i18||n.name:i)).replace(/\{cssclass\}/,n?t.perms2class(n)+(n.notfound?" elfinder-na":"")+(n.csscls?" "+n.csscls:""):"").replace(/\{permissions\}/,!n||n.read&&n.write&&!n.notfound?"":u).replace(/\{title\}/,n?' title="'+t.escape(t.path(n.hash,!0)||n.i18||n.name)+'"':"").replace(/\{symlink\}/,"").replace(/\{style\}/,n&&n.icon?t.getIconStyle(n):""))},C=function(e){var n,a;return"directory"===e.mime&&(a=e.hash,t.files().hasOwnProperty(a)||t.trigger("tree",{tree:[e]}),n=k(e,a),i[a]=e,F.prepend(n),M.addClass(r),O.toggle(F.children().length>1),!0)},z=function(e){var t,n,a=null;return i[e]&&(delete i[e],t=y(e),t.length&&(a=t.text(),t.parent().remove(),n=F.children().length,O.toggle(n>1),n||(M.removeClass(r),D.removeClass(s),F.slideToggle(!1)))),a},T=function(e){var n=y(e),i=n.parent(),a=i.prev("div"),o="ui-state-hover",r=t.getUI("contextmenu");g&&clearTimeout(g),a.length&&(r.find(":first").data("placesHash",e),n.addClass(o),i.insertBefore(a),a=i.prev("div"),g=setTimeout(function(){n.removeClass(o),r.find(":first").data("placesHash")===e&&r.hide().empty()},1500)),a.length||(n.removeClass(o),r.hide().empty())},A=function(e,t){var n=e.hash,a=y(t||n),o=k(e,n);return a.length>0&&(a.parent().replaceWith(o),i[n]=e,!0)},S=function(){F.empty(),M.removeClass(r),D.removeClass(s),F.slideToggle(!1)},I=function(){e.each(i,function(n,i){var a=t.file(n)||i,r=k(a,n),s=null;return a||r.hide(),!(!F.children().length||(e.each(F.children(),function(){var t=e(this);if((a.i18||a.name).localeCompare(t.children("."+o).text())<0)return s=!r.insertBefore(t)}),null===s))||void(!y(n).length&&F.append(r))}),w()},O=e('<span class="elfinder-button-icon elfinder-button-icon-sort elfinder-places-root-icon" title="'+t.i18n("cmdsort")+'"/>').hide().on("click",function(e){e.stopPropagation(),F.empty(),I()}),j=k({hash:"root-"+t.namespace,name:t.i18n(n.name,"places"),read:!0,write:!0}),M=j.children("."+o).addClass(c).on("click",function(e){e.stopPropagation(),M.hasClass(r)&&(D.toggleClass(s),F.slideToggle(),t.storage("placesState",D.hasClass(s)?1:0))}).append(O),F=j.children("."+t.res(a,"navsubtree")),D=e(this).addClass(t.res(a,"tree")+" elfinder-places ui-corner-all").hide().append(j).appendTo(t.getUI("navbar")).on("mouseenter mouseleave","."+o,function(t){e(this).toggleClass("ui-state-hover","mouseenter"==t.type)}).on("click","."+o,function(n){var i=e(this);return i.data("longtap")?void n.stopPropagation():void(!i.hasClass("elfinder-na")&&t.exec("open",i.attr("id").substr(6)))}).on("contextmenu","."+o+":not(."+c+")",function(n){var i=e(this),a=i.attr("id").substr(6);n.preventDefault(),t.trigger("contextmenu",{raw:[{label:t.i18n("moveUp"),icon:"up",remain:!0,callback:function(){T(a),w()}},"|",{label:t.i18n("rmFromPlaces"),icon:"rm",callback:function(){z(a),w()}}],x:n.pageX,y:n.pageY}),i.addClass("ui-state-hover"),t.getUI("contextmenu").children().on("mouseenter",function(){i.addClass("ui-state-hover")}),t.bind("closecontextmenu",function(){i.removeClass("ui-state-hover")})}).droppable({tolerance:"pointer",accept:".elfinder-cwd-file-wrapper,.elfinder-tree-dir,.elfinder-cwd-file",hoverClass:t.res("class","adroppable"),classes:{"ui-droppable-hover":t.res("class","adroppable")},over:function(n,a){var o=a.helper,r=e.grep(o.data("files"),function(e){return"directory"===t.file(e).mime&&!i[e]});n.stopPropagation(),o.data("dropover",o.data("dropover")+1),t.insideWorkzone(n.pageX,n.pageY)&&(r.length>0?(o.addClass("elfinder-drag-helper-plus"),t.trigger("unlockfiles",{files:o.data("files"),helper:o})):e(this).removeClass(d))},out:function(t,n){var i=n.helper;t.stopPropagation(),i.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus").data("dropover",Math.max(i.data("dropover")-1,0)),e(this).removeData("dropover").removeClass(d)},drop:function(n,a){var o=a.helper,r=!0;e.each(o.data("files"),function(e,n){var a=t.file(n);a&&"directory"==a.mime&&!i[a.hash]?C(a):r=!1}),w(),r&&o.hide()}}).on("touchstart","."+o+":not(."+c+")",function(n){if(!(n.originalEvent.touches.length>1))var i=e(this).attr("id").substr(6),a=e(this).addClass(l).data("longtap",null).data("tmlongtap",setTimeout(function(){a.data("longtap",!0),t.trigger("contextmenu",{raw:[{label:t.i18n("rmFromPlaces"),icon:"rm",callback:function(){z(i),w()}}],x:n.originalEvent.touches[0].pageX,y:n.originalEvent.touches[0].pageY})},500))}).on("touchmove touchend","."+o+":not(."+c+")",function(t){clearTimeout(e(this).data("tmlongtap")),"touchmove"==t.type&&e(this).removeClass(l)});e.fn.sortable&&F.addClass("touch-punch").sortable({appendTo:t.getUI(),revert:!1,helper:function(n){var i=e(n.target).parent();return i.children().removeClass("ui-state-hover"),e('<div class="ui-widget elfinder-place-drag elfinder-'+t.direction+'"/>').append(e('<div class="elfinder-navbar"/>').show().append(i.clone()))},stop:function(t,n){var i=e(n.item[0]),a=D.offset().top,o=D.offset().left,r=D.width(),s=D.height(),l=t.pageX,c=t.pageY;l>o&&l<o+r&&c>a&&c<c+s||(z(v(i.children(":first").attr("id"))),w())},update:function(e,t){w()}}),e(this).on("regist",function(t,n){var a=!1;e.each(n,function(e,t){t&&"directory"==t.mime&&!i[t.hash]&&C(t)&&(a=!0)}),a&&w()}),t.one("load",function(){t.oldAPI||(D.show().parent().show(),x(),t.change(function(t){var n=!1;e.each(t.data.changed,function(e,t){i[t.hash]&&("directory"!==t.mime?z(t.hash)&&(n=!0):A(t)&&(n=!0))}),n&&w()}).bind("rename",function(t){var n=!1;t.data.removed&&e.each(t.data.removed,function(e,i){t.data.added[e]&&A(t.data.added[e],i)&&(n=!0)}),n&&w()}).bind("rm paste",function(t){var n=[],i=!1;t.data.removed&&e.each(t.data.removed,function(e,t){var i=z(t);i&&n.push(i)}),n.length&&(i=!0),t.data.added&&n.length&&e.each(t.data.added,function(t,i){1!==e.inArray(i.name,n)&&"directory"==i.mime&&C(i)}),i&&w()}).bind("sync netmount",function(){var a,o=this,r=n.suffix?n.suffix:"";return"sync"===o.type&&f!==r?(f=r,S(),void x()):(a=Object.keys(i),void(a.length&&(M.prepend(h),t.request({
18
- data:{cmd:"info",targets:a},preventDefault:!0}).done(function(n){var a={},r=!1,s=t.cwd().hash;e.each(n.files||[],function(e,n){var i=n.hash;a[i]=n,t.files().hasOwnProperty(n.hash)||t.trigger("tree",{tree:[n]})}),e.each(i,function(e,t){t.notfound===Boolean(a[e])?t.phash===s&&"netmount"!==o.type||a[e]&&"directory"!==a[e].mime?z(e)&&(r=!0):A(a[e]||Object.assign({notfound:!0},t))&&(r=!0):a[e]&&a[e].phash!=s&&A(a[e])}),r&&w()}).always(function(){h.remove()}))))}))})})},e.fn.elfindersearchbutton=function(t){return this.each(function(){var n,i,a,o,r=!1,s=t.fm,l=(s.res("class","disabled"),t.options.incsearch||{enable:!1}),c=t.options.searchTypes,d=function(e){return s.namespace+s.escape(e)},p=s.getUI("toolbar"),u=s.res("class","searchbtn"),h=e(this).hide().addClass("ui-widget-content elfinder-button "+u).on("click",function(e){e.stopPropagation()}),f=function(){var e=s.getUI(),t=e.offset(),n=h.offset();return{top:n.top-t.top,maxHeight:e.height()-40}},m=function(){b.data("inctm")&&clearTimeout(b.data("inctm"));var n=e.trim(b.val()),a=!e("#"+d("SearchFromAll")).prop("checked"),o=e("#"+d("SearchMime")).prop("checked"),l="";a&&(a=e("#"+d("SearchFromVol")).prop("checked")?s.root(s.cwd().hash):s.cwd().hash),o&&(o=n,n="."),i&&(l=i.children("input:checked").val()),n?(b.trigger("focus"),t.exec(n,a,o,l).done(function(){r=!0}).fail(function(){g()})):s.trigger("searchend")},g=function(){b.data("inctm")&&clearTimeout(b.data("inctm")),b.val("").trigger("blur"),(r||v)&&(r=!1,v="",s.lazy(function(){s.trigger("searchend")}))},v="",b=e('<input type="text" size="42"/>').on("focus",function(){!h.hasClass("ui-state-active")&&s.getUI().click(),o=!0,v="",h.addClass("ui-state-active"),s.trigger("uiresize"),n&&n.css(f()).slideDown(function(){h.addClass("ui-state-active"),s.toFront(n)})}).on("blur",function(){o=!1,n?n.data("infocus")?n.data("infocus",!1):n.slideUp(function(){h.removeClass("ui-state-active"),s.trigger("uiresize"),s.toHide(n)}):h.removeClass("ui-state-active")}).appendTo(h).on("keypress",function(e){e.stopPropagation()}).on("keydown",function(t){t.stopPropagation(),t.keyCode===e.ui.keyCode.ENTER?m():t.keyCode===e.ui.keyCode.ESCAPE&&(t.preventDefault(),g())});l.enable&&(l.minlen=l.minlen||2,l.wait=l.wait||500,b.attr("title",s.i18n("incSearchOnly")).on("compositionstart",function(){b.data("composing",!0)}).on("compositionend",function(){b.removeData("composing"),b.trigger("input")}).on("input",function(){b.data("composing")||(b.data("inctm")&&clearTimeout(b.data("inctm")),b.data("inctm",setTimeout(function(){var e=b.val();(0===e.length||e.length>=l.minlen)&&(v!==e&&s.trigger("incsearchstart",{query:e}),v=e,""===e&&s.searchStatus.state>1&&s.searchStatus.query&&b.val(s.searchStatus.query).trigger("select"))},l.wait)))}),s.UA.ltIE8&&b.on("keydown",function(e){229===e.keyCode&&(b.data("imetm")&&clearTimeout(b.data("imetm")),b.data("composing",!0),b.data("imetm",setTimeout(function(){b.removeData("composing")},100)))}).on("keyup",function(t){b.data("imetm")&&clearTimeout(b.data("imetm")),b.data("composing")?t.keyCode===e.ui.keyCode.ENTER&&b.trigger("compositionend"):b.trigger("input")})),e('<span class="ui-icon ui-icon-search" title="'+t.title+'"/>').appendTo(h).on("mousedown",function(e){e.stopPropagation(),e.preventDefault(),h.hasClass("ui-state-active")?m():b.trigger("focus")}),e('<span class="ui-icon ui-icon-close"/>').appendTo(h).on("mousedown",function(e){e.stopPropagation(),e.preventDefault(),""!==b.val()||h.hasClass("ui-state-active")?g():b.trigger("focus")}),s.bind("toolbarload",function(){var e=h.parent();if(e.length&&(p.prepend(h.show()),e.remove(),s.UA.ltIE7)){var t=h.children("ltr"==s.direction?".ui-icon-close":".ui-icon-search");t.css({right:"",left:parseInt(h.width())-t.outerWidth(!0)})}}),s.one("init",function(){s.getUI("cwd").on("touchstart click",function(){o&&b.trigger("blur")})}).one("open",function(){n=s.api<2.1?null:e('<div class="ui-front ui-widget ui-widget-content elfinder-button-menu elfinder-button-search-menu ui-corner-all"/>').append(e('<div class="buttonset"/>').append(e('<input id="'+d("SearchFromCwd")+'" name="serchfrom" type="radio" checked="checked"/><label for="'+d("SearchFromCwd")+'">'+s.i18n("btnCwd")+"</label>"),e('<input id="'+d("SearchFromVol")+'" name="serchfrom" type="radio"/><label for="'+d("SearchFromVol")+'">'+s.i18n("btnVolume")+"</label>"),e('<input id="'+d("SearchFromAll")+'" name="serchfrom" type="radio"/><label for="'+d("SearchFromAll")+'">'+s.i18n("btnAll")+"</label>")),e('<div class="buttonset elfinder-search-type"/>').append(e('<input id="'+d("SearchName")+'" name="serchcol" type="radio" checked="checked" value="SearchName"/><label for="'+d("SearchName")+'">'+s.i18n("btnFileName")+"</label>"))).hide().appendTo(s.getUI()),n&&(c&&(i=n.find(".elfinder-search-type"),e.each(t.options.searchTypes,function(t,n){i.append(e('<input id="'+d(t)+'" name="serchcol" type="radio" value="'+s.escape(t)+'"/><label for="'+d(t)+'">'+s.i18n(n.name)+"</label>"))})),n.find("div.buttonset").buttonset(),e("#"+d("SearchFromAll")).next("label").attr("title",s.i18n("searchTarget",s.i18n("btnAll"))),c&&e.each(c,function(t,n){n.title&&e("#"+d(t)).next("label").attr("title",s.i18n(n.title))}),n.on("mousedown","div.buttonset",function(e){e.stopPropagation(),n.data("infocus",!0)}).on("click","input",function(t){t.stopPropagation(),e.trim(b.val())?m():b.trigger("focus")}).on("close",function(){b.trigger("blur")}))}).bind("searchend",function(){b.val("")}).bind("open parents",function(){var t=[],n=s.file(s.root(s.cwd().hash));n&&(e.each(s.parents(s.cwd().hash),function(e,n){t.push(s.file(n).name)}),e("#"+d("SearchFromCwd")).next("label").attr("title",s.i18n("searchTarget",t.join(s.option("separator")))),e("#"+d("SearchFromVol")).next("label").attr("title",s.i18n("searchTarget",n.name)))}).bind("open",function(){v&&g()}).bind("cwdinit",function(){a=!1}).bind("cwdrender",function(){a=!0}).bind("keydownEsc",function(){v&&"/"===v.substr(0,1)&&(v="",b.val(""),s.trigger("searchend"))}).shortcut({pattern:"ctrl+f f3",description:t.title,callback:function(){b.trigger("select").trigger("focus")}}).shortcut({pattern:"a b c d e f g h i j k l m n o p q r s t u v w x y z dig0 dig1 dig2 dig3 dig4 dig5 dig6 dig7 dig8 dig9 num0 num1 num2 num3 num4 num5 num6 num7 num8 num9",description:s.i18n("firstLetterSearch"),callback:function(t){if(a){var n,i=t.originalEvent.keyCode,o=function(){var t=s.selected(),n=e.ui.keyCode[!t.length||s.cwdHash2Elm(t[0]).next("[id]").length?"RIGHT":"HOME"];e(document).trigger(e.Event("keydown",{keyCode:n,ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1}))};i>=96&&i<=105&&(i-=48),n="/"+String.fromCharCode(i),v!==n?(b.val(n),v=n,s.trigger("incsearchstart",{query:n}).one("cwdrender",o)):o()}}})})},e.fn.elfindersortbutton=function(t){return this.each(function(){var n,i=t.fm,a=t.name,o="class",r=i.res(o,"disabled"),s=i.res(o,"hover"),l="elfinder-button-menu-item",c=l+"-selected",d=c+"-asc",p=c+"-desc",u=e('<span class="elfinder-button-text">'+t.title+"</span>"),h=e(this).addClass("ui-state-default elfinder-button elfinder-menubutton elfiner-button-"+a).attr("title",t.title).append('<span class="elfinder-button-icon elfinder-button-icon-'+a+'"/>',u).on("mouseenter mouseleave",function(e){!h.hasClass(r)&&h.toggleClass(s,"mouseenter"===e.type)}).on("click",function(e){h.hasClass(r)||(e.stopPropagation(),m.is(":hidden")&&i.getUI().click(),m.css(v()).slideToggle({duration:100,done:function(e){i[m.is(":visible")?"toFront":"toHide"](m)}}))}),f=function(){i.toHide(m)},m=e('<div class="ui-front ui-widget ui-widget-content elfinder-button-menu elfinder-button-sort-menu ui-corner-all"/>').hide().appendTo(i.getUI()).on("mouseenter mouseleave","."+l,function(t){e(this).toggleClass(s,"mouseenter"===t.type)}).on("click",function(e){e.preventDefault(),e.stopPropagation()}).on("close",f),g=function(){m.children("[rel]").removeClass(c+" "+d+" "+p).filter('[rel="'+i.sortType+'"]').addClass(c+" "+("asc"==i.sortOrder?d:p)),m.children(".elfinder-sort-stick").toggleClass(c,i.sortStickFolders),m.children(".elfinder-sort-tree").toggleClass(c,i.sortAlsoTreeview)},v=function(){var e=i.getUI().offset(),t=h.offset();return{top:t.top-e.top,left:t.left-e.left}};u.hide(),e.each(i.sortRules,function(t,n){m.append(e('<div class="'+l+'" rel="'+t+'"><span class="ui-icon ui-icon-arrowthick-1-n"/><span class="ui-icon ui-icon-arrowthick-1-s"/>'+i.i18n("sort"+t)+"</div>").data("type",t))}),m.children().on("click",function(n){t.exec([],e(this).removeClass(s).attr("rel"))}),e('<div class="'+l+" "+l+'-separated elfinder-sort-ext elfinder-sort-stick"><span class="ui-icon ui-icon-check"/>'+i.i18n("sortFoldersFirst")+"</div>").appendTo(m).on("click",function(){t.exec([],"stick")}),i.one("init",function(){i.ui.tree&&null!==i.options.sortAlsoTreeview&&e('<div class="'+l+" "+l+'-separated elfinder-sort-ext elfinder-sort-tree"><span class="ui-icon ui-icon-check"/>'+i.i18n("sortAlsoTreeview")+"</div>").appendTo(m).on("click",function(){t.exec([],"tree")})}).bind("disable select",f).bind("sortchange",g).getUI().on("click",f),m.children().length>1?t.change(function(){n&&cancelAnimationFrame(n),n=requestAnimationFrame(function(){h.toggleClass(r,t.disabled()),g()})}).change():h.addClass(r)})},e.fn.elfinderstat=function(t){return this.each(function(){var n=e(this).addClass("elfinder-stat-size"),i=e('<div class="elfinder-stat-selected"/>').on("click","a",function(n){var i=e(this).data("hash");n.preventDefault(),t.exec("opendir",[i])}),a=t.i18n("items"),o=t.i18n("selected"),r=t.i18n("size"),s=function(i){var o=0,r=0,s=t.cwd(),l=!0,c=!0;(s.sizeInfo||s.size)&&(r=s.size,l=!1),e.each(i,function(e,t){o++,l&&(r+=parseInt(t.size)||0,c!==!0||"directory"!==t.mime||t.sizeInfo||(c=!1))}),n.html(a+': <span class="elfinder-stat-incsearch"></span>'+o+',&nbsp;<span class="elfinder-stat-size'+(c?" elfinder-stat-size-recursive":"")+'">'+t.i18n(c?"sum":"size")+": "+t.formatSize(r)+"</span>").attr("title",n.text()),t.trigger("uistatchange")},l=function(e){n.find("span.elfinder-stat-incsearch").html(e?e.hashes.length+" / ":""),n.attr("title",n.text()),t.trigger("uistatchange")},c=function(n){var a,s,l=0,c=0,d=[];1===n.length?(s=n[0],l=s.size,2===t.searchStatus.state&&(a=t.escape(s.path?s.path.replace(/\/[^\/]*$/,""):".."),d.push('<a href="#elf_'+s.phash+'" data-hash="'+s.hash+'" title="'+a+'">'+a+"</a>")),d.push(t.escape(s.i18||s.name)),i.html(d.join("/")+(l>0?", "+t.formatSize(l):""))):n.length?(e.each(n,function(e,t){c++,l+=parseInt(t.size)||0}),i.html(c?o+": "+c+", "+r+": "+t.formatSize(l):"&nbsp;")):i.html(""),i.attr("title",i.text()),t.trigger("uistatchange")};t.getUI("statusbar").prepend(n).append(i).show(),t.UA.Mobile&&e.fn.tooltip&&t.getUI("statusbar").tooltip({classes:{"ui-tooltip":"elfinder-ui-tooltip ui-widget-shadow"},tooltipClass:"elfinder-ui-tooltip ui-widget-shadow",track:!0}),t.bind("cwdhasheschange",function(n){s(e.map(n.data,function(e){return t.file(e)}))}).change(function(i){var a=i.data.changed||[],o=t.cwd().hash;e.each(a,function(){if(this.hash===o)return this.size&&(n.children(".elfinder-stat-size").addClass("elfinder-stat-size-recursive").html(t.i18n("sum")+": "+t.formatSize(this.size)),n.attr("title",n.text())),!1})}).select(function(){c(t.selectedFiles())}).bind("open",function(){c([])}).bind("incsearch",function(e){l(e.data)}).bind("incsearchend",function(){l()})})},e.fn.elfindertoast=function(t,n){var i=Object.assign({mode:"success",msg:"",showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1500,hideEasing:"swing",onHidden:void 0,timeOut:3e3,extNode:void 0,button:void 0,width:void 0},e.isPlainObject(n.options.uiOptions.toast.defaults)?n.options.uiOptions.toast.defaults:{});return this.each(function(){t=Object.assign({},i,t||{});var a,o=e(this),r=function(e){o.stop(),n.toFront(o),o[t.showMethod]({duration:t.showDuration,easing:t.showEasing,complete:function(){t.onShown&&t.onShown(),!e&&t.timeOut&&(a=setTimeout(s,t.timeOut))}})},s=function(){o[t.hideMethod]({duration:t.hideDuration,easing:t.hideEasing,complete:function(){t.onHidden&&t.onHidden(),o.remove()}})};o.on("click",function(e){e.stopPropagation(),e.preventDefault(),a&&clearTimeout(a),t.onHidden&&t.onHidden(),o.stop().remove()}).on("mouseenter mouseleave",function(e){t.timeOut&&(a&&clearTimeout(a),a=null,"mouseenter"===e.type?r(!0):a=setTimeout(s,t.timeOut))}).hide().addClass("toast-"+t.mode).append(e('<div class="elfinder-toast-msg"/>').html(t.msg.replace(/%([a-zA-Z0-9]+)%/g,function(e,t){return n.i18n(t)}))),t.extNode&&o.append(t.extNode),t.button&&o.append(e('<button class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"/>').append(e('<span class="ui-button-text"/>').text(n.i18n(t.button.text))).on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"==t.type)}).on("click",t.button.click||function(){})),t.width&&o.css("max-width",t.width),r()})},e.fn.elfindertoolbar=function(t,n){return this.not(".elfinder-toolbar").each(function(){var i,a,o,r,s,l,c,d,p,u=t._commands,h=e(this).addClass("ui-helper-clearfix ui-widget-header elfinder-toolbar"),f={displayTextLabel:!1,labelExcludeUA:["Mobile"],autoHideUA:["Mobile"],showPreferenceButton:"none"},m=function(t){return e.grep(t,function(t){return!e.isPlainObject(t)||(f=Object.assign(f,t),!1)})},g=function(n){var l,c;for(e.each(v,function(e,t){t.detach()}),h.empty(),i=b.length;i--;)if(b[i]){for(r=e('<div class="ui-widget-content ui-corner-all elfinder-buttonset"/>'),a=b[i].length;a--;)l=b[i][a],n&&n[l]||!(o=u[l])||(s="elfinder"+o.options.ui,!v[l]&&e.fn[s]&&(v[l]=e("<div/>")[s](o)),v[l]&&(v[l].children(".elfinder-button-text")[d?"show":"hide"](),r.prepend(v[l])));r.children().length&&h.prepend(r),r.children(":gt(0)").before('<span class="ui-widget-content elfinder-toolbar-button-separator"/>')}(c=u.preference)&&("always"===f.showPreferenceButton||!h.children().length&&"auto"===f.showPreferenceButton)&&(r=e('<div class="ui-widget-content ui-corner-all elfinder-buttonset"/>'),l="preference",s="elfinder"+o.options.ui,v[l]=e("<div/>")[s](c),v[l].children(".elfinder-button-text")[d?"show":"hide"](),r.prepend(v[l]),h.append(r)),!h.data("swipeClose")&&h.children().length?h.show():h.hide(),x=h[0].clientHeight,t.trigger("toolbarload").trigger("uiresize")},v={},b=m(n||[]),y=null,w="",x=0,k=[];f.showPreferenceButton=f.showPreferenceButton.toLowerCase(),"none"!==f.displayTextLabel&&(d=t.storage("toolbarTextLabel"),d=null===d?f.displayTextLabel&&(!f.labelExcludeUA||!f.labelExcludeUA.length||!e.grep(f.labelExcludeUA,function(e){return!!t.UA[e]}).length):1==d,k.push({label:t.i18n("textLabel"),icon:"text",callback:function(){d=!d,h.css("height","").find(".elfinder-button-text")[d?"show":"hide"](),t.trigger("uiresize").storage("toolbarTextLabel",d?"1":"0")}})),f.preferenceInContextmenu&&u.preference&&k.push({label:t.i18n("toolbarPref"),icon:"preference",callback:function(){t.exec("preference",void 0,{tab:"toolbar"})}}),k.length&&h.on("contextmenu",function(e){e.stopPropagation(),e.preventDefault(),t.trigger("contextmenu",{raw:k,x:e.pageX,y:e.pageY})}).on("touchstart",function(e){e.originalEvent.touches.length>1||(h.data("tmlongtap")&&clearTimeout(h.data("tmlongtap")),h.removeData("longtap").data("longtap",{x:e.originalEvent.touches[0].pageX,y:e.originalEvent.touches[0].pageY}).data("tmlongtap",setTimeout(function(){h.removeData("longtapTm").trigger({type:"contextmenu",pageX:h.data("longtap").x,pageY:h.data("longtap").y}).data("longtap",{longtap:!0})},500)))}).on("touchmove touchend",function(e){h.data("tmlongtap")&&(("touchend"===e.type||Math.abs(h.data("longtap").x-e.originalEvent.touches[0].pageX)+Math.abs(h.data("longtap").y-e.originalEvent.touches[0].pageY)>4)&&clearTimeout(h.data("tmlongtap")),h.removeData("longtapTm"))}).on("click",function(e){h.data("longtap")&&h.data("longtap").longtap&&(e.stopImmediatePropagation(),e.preventDefault())}).on("touchend click",".elfinder-button",function(e){h.data("longtap")&&h.data("longtap").longtap&&(e.stopImmediatePropagation(),e.preventDefault())}),h.prev().length&&h.parent().prepend(this),g(),t.bind("open sync select toolbarpref",function(){var n,i,a,o=Object.assign({},t.option("disabledFlip")),r=t.storage("toolbarhides");if(!r&&Array.isArray(f.defaultHides)&&(r={},e.each(f.defaultHides,function(){r[this]=!0}),t.storage("toolbarhides",r)),"select"===this.type){if(t.searchStatus.state<2)return;i=t.selected(),i.length&&(o=t.getDisabledCmds(i,!0))}e.each(r,function(e){o[e]||(o[e]=!0)}),Object.keys(t.commandMap).length&&e.each(t.commandMap,function(e,t){"hidden"===t&&(o[e]=!0)}),a=Object.keys(o),y&&y.toString()===a.sort().toString()||(g(a.length?o:null),n=!0),y=a.sort(),(n||w!==JSON.stringify(t.commandMap))&&(w=JSON.stringify(t.commandMap),n||e.each(e("div.elfinder-button"),function(){var t=e(this).data("origin");t&&e(this).after(t).detach()}),Object.keys(t.commandMap).length&&e.each(t.commandMap,function(n,i){var a,o=t._commands[i],r=o?"elfinder"+o.options.ui:null;r&&e.fn[r]&&(a=v[n],a&&(!v[i]&&e.fn[r]&&(v[i]=e("<div/>")[r](o),v[i]&&(v[i].children(".elfinder-button-text")[d?"show":"hide"](),o.extendsCmd&&v[i].children("span.elfinder-button-icon").addClass("elfinder-button-icon-"+o.extendsCmd))),v[i]&&(a.after(v[i]),v[i].data("origin",a.detach()))))}))}).bind("resize",function(e){p&&cancelAnimationFrame(p),p=requestAnimationFrame(function(){var e=h[0].clientHeight;x!==e&&(x=e,t.trigger("uiresize"))})}),t.UA.Touch&&(c=t.storage("autoHide")||{},"undefined"==typeof c.toolbar&&(c.toolbar=f.autoHideUA&&f.autoHideUA.length>0&&e.grep(f.autoHideUA,function(e){return!!t.UA[e]}).length,t.storage("autoHide",c)),c.toolbar&&t.one("init",function(){t.uiAutoHide.push(function(){h.stop(!0,!0).trigger("toggle",{duration:500,init:!0})})}),t.bind("load",function(){l=e('<div class="elfinder-toolbar-swipe-handle"/>').hide().appendTo(t.getUI()),"none"!==l.css("pointer-events")&&(l.remove(),l=null)}),h.on("toggle",function(e,n){var i=t.getUI("workzone"),a=h.is(":hidden"),o=i.height(),r=h.height(),s=h.outerHeight(!0),d=s-r,p=Object.assign({step:function(e){i.height(o+(a?(e+d)*-1:r-e)),t.trigger("resize")},always:function(){requestAnimationFrame(function(){h.css("height",""),t.trigger("uiresize"),l&&(a?l.stop(!0,!0).hide():(l.height(n.handleH?n.handleH:""),t.resources.blink(l,"slowonce"))),a&&h.scrollTop("0px"),n.init&&t.trigger("uiautohide")})}},n);h.data("swipeClose",!a).stop(!0,!0).animate({height:"toggle"},p),c.toolbar=!a,t.storage("autoHide",Object.assign(t.storage("autoHide"),{toolbar:c.toolbar}))}).on("touchstart",function(e){h.scrollBottom()>5&&(e.originalEvent._preventSwipeY=!0)}))}),this},e.fn.elfindertree=function(t,n){var i=t.res("class","tree");return this.not("."+i).each(function(){var a,o,r,s,l="class",c=t.UA.Mobile,d=t.res(l,"treeroot"),p=n.openRootOnLoad,u=n.openCwdOnOpen,h=u||n.syncTree,f=t.res(l,"navsubtree"),m=t.res(l,"treedir"),g="span."+m,v=t.res(l,"navcollapse"),b=t.res(l,"navexpand"),y="elfinder-subtree-loaded",w="elfinder-subtree-chksubdir",x=t.res(l,"navarrow"),k=t.res(l,"active"),C=t.res(l,"adroppable"),z=t.res(l,"hover"),T=t.res(l,"disabled"),A=t.res(l,"draggable"),S=t.res(l,"droppable"),I="elfinder-navbar-wrapper-root",O="elfinder-navbar-wrapper-pastable",j="elfinder-navbar-wrapper-uploadable",M=function(e){var t=se.offset().left;return t<=e&&e<=t+se.width()},F={},D=[],E=function(n){var i=[];if(e.each(n,function(e,n){F[n]&&i.push(t.navId2Hash(n)),delete F[n]}),i.length)return t.request({data:{cmd:"subdirs",targets:i,preventDefault:!0}}).done(function(n){n&&n.subdirs&&e.each(n.subdirs,function(e,n){var i=t.navHash2Elm(e);i.removeClass(w),i[n?"addClass":"removeClass"](v)})})},U=null,P=function(){var n=Object.keys(F);n.length&&(U&&U._abort(),a&&clearTimeout(a),D=[],U=t.asyncJob(function(n){return t.isInWindow(e("#"+n))?n:null},n,{numPerOnce:200}).done(function(e){e.length&&(D=e,q())}))},R=0,q=function(){var e,i=n.subdirsMaxConn-R,o=t.maxTargets?Math.min(t.maxTargets,n.subdirsAtOnce):n.subdirsAtOnce;if(a&&cancelAnimationFrame(a),D.length)if(i>0)for(e=0;e<i;e++)D.length&&(R++,E(D.splice(0,o)).always(function(){R--,q()}));else a=requestAnimationFrame(function(){D.length&&q()})},H=t.droppable.drop,_=e.extend(!0,{},t.droppable,{over:function(n,i){var a,o,r=e(this),s=i.helper,l=z+" "+C;return n.stopPropagation(),s.data("dropover",s.data("dropover")+1),r.data("dropover",!0),i.helper.data("namespace")===t.namespace&&t.insideWorkzone(n.pageX,n.pageY)?M(n.clientX)?(s.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus"),r.addClass(z),r.is("."+v+":not(."+b+")")&&r.data("expandTimer",setTimeout(function(){r.is("."+v+"."+z)&&r.children("."+x).trigger("click")},500)),r.is(".elfinder-ro,.elfinder-na")?void r.removeClass(C):(a=t.navId2Hash(r.attr("id")),r.data("dropover",a),e.each(i.helper.data("files"),function(e,n){if(n===a||t.file(n).phash===a&&!i.helper.hasClass("elfinder-drag-helper-plus"))return r.removeClass(l),!1}),s.data("locked")?o="elfinder-drag-helper-plus":(o="elfinder-drag-helper-move",(n.shiftKey||n.ctrlKey||n.metaKey)&&(o+=" elfinder-drag-helper-plus")),r.hasClass(C)&&s.addClass(o),void requestAnimationFrame(function(){r.hasClass(C)&&s.addClass(o)}))):void r.removeClass(l):(r.removeClass(l),void s.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus"))},out:function(t,n){var i=e(this),a=n.helper;t.stopPropagation(),M(t.clientX)&&a.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus"),a.data("dropover",Math.max(a.data("dropover")-1,0)),i.data("expandTimer")&&clearTimeout(i.data("expandTimer")),i.removeData("dropover").removeClass(z+" "+C)},deactivate:function(){e(this).removeData("dropover").removeClass(z+" "+C)},drop:function(e,t){M(e.clientX)&&H.call(this,e,t)}}),N=e(t.res("tpl","navspinner")),L=t.res("tpl","navdir"),W=t.res("tpl","perms"),B=(t.res("tpl","lock"),t.res("tpl","symlink")),$={},K={id:function(e){return t.navHash2Id(e.hash)},name:function(e){return t.escape(e.i18||e.name)},cssclass:function(e){var i=(e.phash&&!e.isroot?"":d)+" "+m+" "+t.perms2class(e);return e.dirs&&!e.link&&(i+=" "+v)&&e.dirs==-1&&(i+=" "+w),n.getClass&&(i+=" "+n.getClass(e)),e.csscls&&(i+=" "+t.escape(e.csscls)),i},title:function(e){return n.attrTitle?' title="'+t.escape(t.path(e.hash,!0)||e.i18||e.name)+'"':""},root:function(t){var n="";return!t.phash||t.isroot?(n+=" "+I,!t.disabled||t.disabled.length<1?n+=" "+O+" "+j:(e.inArray("paste",t.disabled)===-1&&(n+=" "+O),e.inArray("upload",t.disabled)===-1&&(n+=" "+j)),n):""},permissions:function(e){return e.read&&e.write?"":W},symlink:function(e){return e.alias?B:""},style:function(e){return e.icon?t.getIconStyle(e):""}},V=function(e){return L.replace(/(?:\{([a-z]+)\})/gi,function(t,n){var i=K[n]?K[n](e):e[n]||"";return"id"===n&&e.dirs==-1&&(F[i]=i),i})},X=function(n,i){return e.map(n||[],function(e){return"directory"!==e.mime||i&&!t.navHash2Elm(e.hash).length?null:e})},J=function(e){return e?t.navHash2Elm(e).next("."+f):oe},G=function(e,n){for(var i,a=e.children(":first");a.length;){if(i=t.file(t.navId2Hash(a.children("[id]").attr("id"))),(i=t.file(t.navId2Hash(a.children("[id]").attr("id"))))&&Q(n,i)<0)return a;a=a.next()}return e.children("button.elfinder-navbar-pager-next")},Y=function(i){for(var a,o,r,s,l,d,p=i.length,u=[],h=p,f=e(),m={},g=t.cwd(),v=function(i,a,o,r){var s={},l=0,d=t.newAPI?Math.min(1e4,Math.max(10,n.subTreeMax)):1e4,p=function(){s={},e.each(a,function(e,t){s[t.hash]=e})},u=function(t){"prepare"===t?e.each(a,function(e,t){t.node&&i.append(t.node.hide())}):"done"===t&&e.each(a,function(e,t){t.node&&t.node.detach().show()})},h=function(t,n){var i;return t.stopPropagation(),n.select?void v(f(n.select)):n.change?void u(n.change):(n.removed&&n.removed.length&&(a=e.grep(a,function(e){return n.removed.indexOf(e.hash)===-1||(!i&&(i=!0),!1)})),n.added&&n.added.length&&(a=a.concat(e.grep(n.added,function(e){return void 0===s[e.hash]&&(!i&&(i=!0),!0)}))),void(i&&(a.sort(Q),p(),v(l))))},f=function(e){if(void 0!==s[e])return Math.floor(s[e]/d)*d},m=t.navId2Hash(i.prev("[id]").attr("id")),v=function(n,o){var r,s,u,y,w,x,k,C,z=[],T={};delete $[m],l=n,i.off("update."+t.namespace,h),a.length>d&&(i.on("update."+t.namespace,h),void 0===n&&(u=0,p(),n=f(g.hash),void 0===n&&(n=0)),y=a.slice(n,n+d),$[m]=i,w=n?Math.max(-1,n-d):-1,x=n+d>=a.length?0:n+d,r=Math.ceil(a.length/d),s=Math.ceil(n/d)),e.each(y||a,function(e,t){z.push(V(t)),t.node&&(T[t.hash]=t.node)}),k=w>-1?e('<button class="elfinder-navbar-pager elfinder-navbar-pager-prev"/>').text(t.i18n("btnPrevious",s,r)).button({icons:{primary:"ui-icon-caret-1-n"}}).on("click",function(e){e.preventDefault(),e.stopPropagation(),v(w,"up")}):e(),C=x?e('<button class="elfinder-navbar-pager elfinder-navbar-pager-next"/>').text(t.i18n("btnNext",s+2,r)).button({icons:{primary:"ui-icon-caret-1-s"}}).on("click",function(e){e.preventDefault(),e.stopPropagation(),v(x,"down")}):e(),b(),i.empty()[y?"addClass":"removeClass"]("elfinder-navbar-hasmore").append(k,z.join(""),C),e.each(T,function(e,n){t.navHash2Elm(e).parent().replaceWith(n)}),o&&Z(t.navHash2Id(y["up"===o?y.length-1:0].hash)),!c&&t.lazy(function(){ie(null,i)})},b=function(){e.each(i.children(".elfinder-navbar-wrapper"),function(n,i){var o,r,l=e(i),c=l.children("[id]:first");c.hasClass(y)&&(o=t.navId2Hash(c.attr("id")),o&&void 0!==(r=s[o])&&(a[r].node=l.detach()))})};v()},b={},w=[],x=!0;h--;)a=i[h],m[a.hash]||t.navHash2Elm(a.hash).length||(m[a.hash]=!0,(o=J(a.phash)).length?a.phash&&((s=!o.children().length)||o.hasClass("elfinder-navbar-hasmore")||(r=G(o,a)).length)?s?(b[a.phash]||(b[a.phash]=[]),b[a.phash].push(a)):r?(d=V(a),r.before(d),!c&&(f=f.add(d))):w.push(a):(d=V(a),o[x||a.phash?"append":"prepend"](d),x=!1,a.phash&&!a.isroot||(l=t.navHash2Elm(a.hash).parent()),!c&&ie(null,l)):u.push(a));return Object.keys(b).length&&e.each(b,function(e,t){var n=J(e);t.sort(Q),v(n,t)}),w.length&&o.trigger("update."+t.namespace,{added:w}),u.length&&u.length<p?void Y(u):void(!c&&f.length&&t.lazy(function(){ie(f)}))},Q=function(e,n){if(t.sortAlsoTreeview){var i,a="asc"==t.sortOrder,o=t.sortType,r=t.sortRules;return i=a?r[t.sortType](e,n):r[t.sortType](n,e),"name"!==o&&0===i?i=a?r.name(e,n):r.name(n,e):i}return t.sortRules.name(e,n)},Z=function(i){var a,r,s,l,c,d,p=e.Deferred();return o&&clearTimeout(o),o=setTimeout(function(){a=e(document.getElementById(i||t.navHash2Id(t.cwd().hash))),a.length?((u?a:a.parent()).parents(".elfinder-navbar-wrapper").children("."+y).addClass(b).next("."+f).show(),r=oe.parent().stop(!1,!0),s=r.offset().top,l=r.height(),c=s+l-a.outerHeight(),d=a.offset().top,d<s||d>c?r.animate({scrollTop:r.scrollTop()+d-s-l/3},{duration:n.durations.autoScroll,complete:function(){p.resolve()}}):p.resolve()):p.reject()},100),p},ee=function(e){var n,i,a,o=e||t.cwd(),r=o.hash?[o.hash]:[];for(i=t.root(o.hash),a=t.file(i);a&&(n=a.phash)&&(r.unshift(n),i=t.root(n),a=t.file(i),!t.navHash2Elm(a.hash).hasClass(y)););return r},te=function(e){var n=e||t.cwd(),i=n.hash,a=t.navHash2Elm(i);if(!a.length){for(;n&&n.phash;)$[n.phash]&&!t.navHash2Elm(n.hash).length&&$[n.phash].trigger("update."+t.namespace,{select:n.hash}),n=t.file(n.phash);a=t.navHash2Elm(i)}return a},ne=function(n,i){var a,o,s=t.cwd(),l=s.hash,c=void 0===i?h:i,d=function(n){var i,r,s=e.Deferred(),l=[],d=ee(n),p=function(e,n,i){var a={cmd:e,target:n};return i&&(a.until=i),t.request({data:a,preventFail:!0})};return l=e.map(d,function(e){var n,a,o=t.file(e),r=!!o&&t.isRoot(o),s=t.navHash2Elm(e),l=function(e,n){var i,a,o=n||1;return a=!!(i=t.file(e))&&i.phash,a&&o>1?l(a,--o):a},c=function(){var i=l(e);for(n=i;i&&!t.navHash2Elm(i).hasClass(y);)n=i,i=l(i);return i||(n=void 0,i=t.root(e)),i}();return s.hasClass(y)||!r&&o&&t.navHash2Elm(o.phash).hasClass(y)?null:(r||c===l(e)||c===l(e,2)?(n=void 0,a="tree",r||(e=l(e))):a="parents",i||(i="tree"===a?e:c),p(a,e,n))}),l.length?(te(t.file(i)),r=t.navHash2Id(i),c&&Z(r),a=e("#"+r),o=e(t.res("tpl","navspinner")).insertBefore(a.children("."+x)),a.removeClass(v),e.when.apply(e,l).done(function(){var e,t,n,i={};if(t=arguments.length,t>0)for(n=0;n<t;n++)e=arguments[n].tree||[],i[d[n]]=Object.assign([],X(e));s.resolve(i)}).fail(function(){s.reject()}),s):s.resolve()},u=function(i,o){var r,l=function(){p&&a&&(J(a.hash).show().prev(g).addClass(b),p=!1),c?Z().done(P):P()};i&&e.each(i,function(e,n){n&&Y(n),te(t.file(e)),n&&ae(n,y)}),n&&(t.api<2.1&&n.push(s),Y(n)),r=te(),r.hasClass(k)||(oe.find(g+"."+k).removeClass(k),r.addClass(k)),r.parents(".elfinder-navbar-wrapper").children("."+m).addClass(y),i?t.lazy(l).done(function(){o.resolve()}):(l(),o.resolve())},f=function(e){a&&(o.remove(),a.addClass(v+(e?"":" "+y)))},w=e.Deferred();return t.navHash2Elm(l).length?u(void 0,w):(r=!0,d().done(function(e){u(e,w),f()}).fail(function(){f(!0),w.reject()}).always(function(){r=!1})),t.trigger("treesync",w),w},ie=function(n,i){n||(i&&!i.closest("div."+I).hasClass(j)||(i||oe.find("div."+j)).find(g+":not(.elfinder-ro,.elfinder-na)").addClass("native-droppable"),n=!i||i.closest("div."+I).hasClass(O)?(i||oe.find("div."+O)).find(g+":not(."+S+")"):e(),i&&i.children("div."+I).each(function(){ie(null,e(this))})),n.length&&t.asyncJob(function(t){e(t).droppable(_)},e.makeArray(n),{interval:20,numPerOnce:100})},ae=function(n,i){var a=i==y?"."+v+":not(."+y+")":":not(."+v+")";e.each(n,function(n,o){t.navHash2Elm(o.phash).filter(a).filter(function(){return e.grep(e(this).next("."+f).children(),function(t){return!e(t).children().hasClass(d)}).length>0}).addClass(i)})},oe=e(this).addClass(i).on("mouseenter mouseleave",g,function(i){var a="mouseenter"===i.type;if(!a||!re){var o,r,s=e(this);s.hasClass(C+" "+T)||(c||!a||s.data("dragRegisted")||s.hasClass(d+" "+A+" elfinder-na elfinder-wo")||(s.data("dragRegisted",!0),t.isCommandEnabled("copy",o=t.navId2Hash(s.attr("id")))&&s.draggable(t.draggable)),s.toggleClass(z,a)),a&&n.attrTitle&&(r=t.file(o||t.navId2Hash(s.attr("id"))),r.isroot||s.attr("title")!==(r.i18||r.name)||s.attr("title",t.path(o,!0)))}}).on("dragenter",g,function(t){if(t.originalEvent.dataTransfer){var n=e(this);n.addClass(z),n.is("."+v+":not(."+b+")")&&n.data("expandTimer",setTimeout(function(){n.is("."+v+"."+z)&&n.children("."+x).trigger("click")},500))}}).on("dragleave",g,function(t){if(t.originalEvent.dataTransfer){var n=e(this);n.data("expandTimer")&&clearTimeout(n.data("expandTimer")),n.removeClass(z)}}).on("click",g,function(n){var i=e(this),a=t.navId2Hash(i.attr("id"));t.file(a);return i.data("longtap")?(i.removeData("longtap"),void n.stopPropagation()):(i.hasClass(k)||(oe.find(g+"."+k).removeClass(k),i.addClass(k)),void(a==t.cwd().hash||i.hasClass(T)?(i.hasClass(v)&&i.children("."+x).trigger("click"),t.select({selected:[a],origin:"navbar"})):t.exec("open",a).done(function(){t.one("opendone",function(){t.select({selected:[a],origin:"navbar"})})})))}).on("touchstart",g,function(n){if(!(n.originalEvent.touches.length>1)){var i,a=n.originalEvent;return"INPUT"===n.target.nodeName?void n.stopPropagation():void(i=e(this).addClass(z).removeData("longtap").data("tmlongtap",setTimeout(function(e){i.data("longtap",!0),t.trigger("contextmenu",{type:"navbar",targets:[t.navId2Hash(i.attr("id"))],x:a.touches[0].pageX,y:a.touches[0].pageY})},500)))}}).on("touchmove touchend",g,function(t){return"INPUT"===t.target.nodeName?void t.stopPropagation():(clearTimeout(e(this).data("tmlongtap")),e(this).removeData("tmlongtap"),void("touchmove"==t.type&&e(this).removeClass(z)))}).on("click",g+"."+v+" ."+x,function(i){var a,o=e(this),r=o.parent(g),s=r.next("."+f),l=e.Deferred(),c=30;i.stopPropagation(),r.hasClass(y)?(r.toggleClass(b),t.lazy(function(){a=r.hasClass(b)?s.children().length+s.find("div.elfinder-navbar-subtree[style*=block]").children().length:s.find("div:visible").length,a>c?(s.toggle(),t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1),P()):s.stop(!0,!0)[r.hasClass(b)?"slideDown":"slideUp"](n.durations.slideUpDown,function(){t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1),P()})}).always(function(){l.resolve()})):(N.insertBefore(o),r.removeClass(v),t.request({cmd:"tree",target:t.navId2Hash(r.attr("id"))
19
- }).done(function(e){Y(Object.assign([],X(e.tree))),s.children().length&&(r.addClass(v+" "+b),s.children().length>c?(s.show(),t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1),P()):s.stop(!0,!0).slideDown(n.durations.slideUpDown,function(){t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1),P()}))}).always(function(e){N.remove(),r.addClass(y),t.one("treedone",function(){l.resolve()})})),o.data("dfrd",l)}).on("contextmenu",g,function(n){var i=e(this);return i.find("input:text").length?void n.stopPropagation():(n.preventDefault(),i.data("tmlongtap")||t.trigger("contextmenu",{type:"navbar",targets:[t.navId2Hash(e(this).attr("id"))],x:n.pageX,y:n.pageY}),i.addClass("ui-state-hover"),t.getUI("contextmenu").children().on("mouseenter",function(){i.addClass("ui-state-hover")}),void t.bind("closecontextmenu",function(){i.removeClass("ui-state-hover")}))}).on("scrolltoview",g,function(n,i){var a=e(this);Z(a.attr("id")).done(function(){i&&"undefined"!==i.blink&&!i.blink||t.resources.blink(a,"lookme")})}).on("create."+t.namespace,function(n,i){var a=J(i.phash),o=i.move||!1,r=e(V(i)).addClass("elfinder-navbar-wrapper-tmp"),s=t.selected();o&&s.length&&t.trigger("lockfiles",{files:s}),a.prepend(r)}),re=!1,se=t.getUI("navbar").append(oe).show().on("scroll",function(){re=!0,s&&cancelAnimationFrame(s),s=requestAnimationFrame(function(){re=!1,P()})}),le=t.sortAlsoTreeview;t.open(function(e){var n=e.data,i=X(n.files),a=t.getUI("contextmenu");n.init&&oe.empty(),t.UA.iOS&&se.removeClass("overflow-scrolling-touch").addClass("overflow-scrolling-touch"),i.length?t.lazy(function(){a.data("cmdMaps")||a.data("cmdMaps",{}),Y(i),ae(i,y),ne(i)}):ne()}).add(function(e){var t=X(e.data.added);t.length&&(Y(t),ae(t,v))}).change(function(n){if(!r){var i,a,o,s,l,d,p,u,h,m,v,w,x=X(n.data.changed,!0),k=x.length,C=k;e();for(e.each($,function(e,n){n.trigger("update."+t.namespace,{change:"prepare"})});C--;)if(i=x[C],a=i.phash,(o=t.navHash2Elm(i.hash)).length){if(v=o.parent(),a){if(l=o.closest("."+f),d=J(a),p=o.parent().next(),u=G(d,i),!d.length)continue;d[0]===l[0]&&p.get(0)===u.get(0)||(u.length?u.before(v):d.append(v))}h=o.hasClass(b),m=o.hasClass(y),s=e(V(i)),o.replaceWith(s.children(g)),!c&&ie(null,v),i.dirs&&(h||m)&&(o=t.navHash2Elm(i.hash))&&o.next("."+f).children().length&&(h&&o.addClass(b),m&&o.addClass(y)),w|=i.dirs==-1}w&&P(),e.each($,function(e,n){n.trigger("update."+t.namespace,{change:"done"})}),k&&ne(void 0,!1)}}).remove(function(n){var i,a,o,r=n.data.removed,s=r.length;for(e.each($,function(e,n){n.trigger("update."+t.namespace,{removed:r}),n.trigger("update."+t.namespace,{change:"prepare"})});s--;)(i=t.navHash2Elm(r[s])).length&&(o=!0,a=i.closest("."+f),i.parent().detach(),a.children().length||a.hide().prev(g).removeClass(v+" "+b+" "+y));o&&t.getUI("navbar").children(".ui-resizable-handle").trigger("resize"),e.each($,function(e,n){n.trigger("update."+t.namespace,{change:"done"})})}).bind("lockfiles unlockfiles",function(n){var i="lockfiles"==n.type,a=!!n.data.helper&&n.data.helper.data("locked"),o=i&&!a?"disable":"enable",r=e.grep(n.data.files||[],function(e){var n=t.file(e);return!(!n||"directory"!=n.mime)});e.each(r,function(e,n){var r=t.navHash2Elm(n);r.length&&!a&&(r.hasClass(A)&&r.draggable(o),r.hasClass(S)&&r.droppable(o),r[i?"addClass":"removeClass"](T))})}).bind("sortchange",function(){if(t.sortAlsoTreeview||le!==t.sortAlsoTreeview){var n,i,a=[],o={},r={},s="",l=!1;t.lazy(function(){n=X(t.files()),le=t.sortAlsoTreeview,oe.empty(),Y(e.map(t.roots,function(e){var n=t.file(e);return n&&!n.phash?n:null})),Object.keys($).length?(a=ee(),a.length>1?(e.each(a,function(e,n){var i=t.file(t.root(n)).volumeid;0===e&&(s=i),r[i]=n,o[n]=[]}),e.each(n,function(e,t){return t.volumeid?void o[r[t.volumeid]||r[s]].push(t):(l=!0,!1)})):l=!0,l?e.each(a,function(e,a){Y(n),i=te(t.file(a)),ae(n,y)}):e.each(o,function(e,n){Y(n),i=te(t.file(e)),ae(n,y)})):(Y(n),i=te(),ae(n,y)),ne()},100)}})}),this},e.fn.elfinderuploadbutton=function(t){return this.each(function(){var n,i=t.fm,a=e(this).elfinderbutton(t).off("click"),o=e("<form/>").appendTo(a),r=e('<input type="file" multiple="true" title="'+t.fm.i18n("selectForUpload")+'"/>').on("change",function(){var t=e(this);t.val()&&(i.exec("upload",{input:t.remove()[0]},void 0,i.cwd().hash),r.clone(!0).appendTo(o))}).on("dragover",function(e){e.originalEvent.dataTransfer.dropEffect="copy"});o.append(r.clone(!0)),t.change(function(){n&&cancelAnimationFrame(n),n=requestAnimationFrame(function(){var e=t.disabled();o.is("visible")?!e&&o.hide():e&&o.show()})}).change()})},e.fn.elfinderviewbutton=function(t){return this.each(function(){var n,i=e(this).elfinderbutton(t),a=i.children(".elfinder-button-icon"),o=i.children(".elfinder-button-text");t.change(function(){n&&cancelAnimationFrame(n),n=requestAnimationFrame(function(){var e="icons"==t.value;a.toggleClass("elfinder-button-icon-view-list",e),t.className=e?"view-list":"",t.title=t.fm.i18n(e?"viewlist":"viewicons"),i.attr("title",t.title),o.html(t.title)})})})},e.fn.elfinderworkzone=function(t){var n="elfinder-workzone";return this.not("."+n).each(function(){var i,a=e(this).addClass(n),o=Math.round(a.height()),r=a.parent(),s=function(){i=a.outerHeight(!0)-a.height()},l=function(s){var l=r.height()-i,c=r.attr("style"),d=Math.round(a.height());s&&(s.preventDefault(),s.stopPropagation()),r.css("overflow","hidden").children(":visible:not(."+n+")").each(function(){var t=e(this);"absolute"!=t.css("position")&&"fixed"!=t.css("position")&&(l-=t.outerHeight(!0))}),r.attr("style",c||""),l=Math.max(0,Math.round(l)),o===l&&d===l||(o=Math.round(a.height()),a.height(l),t.trigger("wzresize"))},c=function(){i=a.outerHeight(!0)-a.height(),l()};s(),r.on("resize."+t.namespace,l),t.one("cssloaded",c).bind("uiresize",l).bind("themechange",s)}),this},i.prototype.commands.archive=function(){var t,n=this,i=n.fm,a=[];this.variants=[],this.disableOnSearch=!1,this.nextAction={},i.bind("open reload",function(){n.variants=[],e.each(a=i.option("archivers").create||[],function(e,t){n.variants.push([t,i.mime2kind(t)])}),n.change()}),this.getstate=function(n){var o,r=this.files(n),s=r.length,l=s&&!i.isRoot(r[0])&&(i.file(r[0].phash)||{}).write&&!e.grep(r,function(e){return!e.read}).length;return l&&i.searchStatus.state>1&&(o=i.cwd().volumeid,l=s===e.grep(r,function(e){return!(!e.read||0!==e.hash.indexOf(o))}).length),l&&!this._disabled&&a.length&&(s||t&&"pending"==t.state())?0:-1},this.exec=function(o,r){var s,l,c=this.files(o),d=c.length,p=r||a[0],u=i.file(c[0].phash)||null,h=["errArchive","errPerm","errCreatingTempDir","errFtpDownloadFile","errFtpUploadFile","errFtpMkdir","errArchiveExec","errExtractExec","errRm"];if(t=e.Deferred().fail(function(e){e&&i.error(e)}),!d||!a.length||e.inArray(p,a)===-1)return t.reject();if(!u.write)return t.reject(h);for(s=0;s<d;s++)if(!c[s].read)return t.reject(h);return n.mime=p,n.prefix=(d>1?"Archive":c[0].name)+(i.option("archivers").createext?"."+i.option("archivers").createext[p]:""),n.data={targets:n.hashes(o),type:p},i.cwd().hash!==u.hash?l=i.exec("open",u.hash).done(function(){i.one("cwdrender",function(){i.selectfiles({files:o}),t=e.proxy(i.res("mixin","make"),n)()})}):(i.selectfiles({files:o}),t=e.proxy(i.res("mixin","make"),n)()),t}},(i.prototype.commands.back=function(){this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+left backspace"}],this.getstate=function(){return this.fm.history.canBack()?0:-1},this.exec=function(){return this.fm.history.back()}}).prototype={forceLoad:!0},i.prototype.commands.chmod=function(){this.updateOnSelect=!1;var t=this.fm,n={0:"owner",1:"group",2:"other"},i={read:t.i18n("read"),write:t.i18n("write"),execute:t.i18n("execute"),perm:t.i18n("perm"),kind:t.i18n("kind"),files:t.i18n("files")},a=function(e){return!isNaN(parseInt(e,8)&&parseInt(e,8)<=511)||e.match(/^([r-][w-][x-]){3}$/i)};this.tpl={main:'<div class="ui-helper-clearfix elfinder-info-title"><span class="elfinder-cwd-icon {class} ui-corner-all"/>{title}</div>{dataTable}',itemTitle:'<strong>{name}</strong><span id="elfinder-info-kind">{kind}</span>',groupTitle:"<strong>{items}: {num}</strong>",dataTable:'<table id="{id}-table-perm"><tr><td>{0}</td><td>{1}</td><td>{2}</td></tr></table><div class="">'+i.perm+': <input class="elfinder-tabstop elfinder-focus" id="{id}-perm" type="text" size="4" maxlength="3" value="{value}"></div>',fieldset:'<fieldset id="{id}-fieldset-{level}"><legend>{f_title}{name}</legend><input type="checkbox" value="4" class="elfinder-tabstop" id="{id}-read-{level}-perm"{checked-r}> <label for="{id}-read-{level}-perm">'+i.read+'</label><br><input type="checkbox" value="6" class="elfinder-tabstop" id="{id}-write-{level}-perm"{checked-w}> <label for="{id}-write-{level}-perm">'+i.write+'</label><br><input type="checkbox" value="5" class="elfinder-tabstop" id="{id}-execute-{level}-perm"{checked-x}> <label for="{id}-execute-{level}-perm">'+i.execute+"</label><br>"},this.shortcuts=[{}],this.getstate=function(e){var t=this.fm;return e=e||t.selected(),0==e.length&&(e=[t.cwd().hash]),this.checkstate(this.files(e))?0:-1},this.checkstate=function(t){var n=t.length;if(!n)return!1;var i=e.grep(t,function(e){return!(!(e.isowner&&e.perm&&a(e.perm))||1!=n&&"directory"==e.mime)}).length;return n==i},this.exec=function(t){var o=this.hashes(t),r=this.files(o);r.length||(o=[this.fm.cwd().hash],r=this.files(o));var s,l,c=this.fm,d=e.Deferred().always(function(){c.enable()}),p=this.tpl,u=r.length,h=r[0],f=c.namespace+"-perm-"+h.hash,m=p.main,g=' checked="checked"',v=function(){var e={};return e[c.i18n("btnApply")]=b,e[c.i18n("btnCancel")]=function(){A.elfinderdialog("close")},e},b=function(){var t,n=e.trim(e("#"+f+"-perm").val());return!!a(n)&&(A.elfinderdialog("close"),t={cmd:"chmod",targets:o,mode:n},void c.request({data:t,notify:{type:"chmod",cnt:u}}).fail(function(e){d.reject(e)}).done(function(n){n.changed&&n.changed.length&&(n.undo={cmd:"chmod",callback:function(){var t=[];return e.each(S,function(e,n){t.push(c.request({data:{cmd:"chmod",targets:n,mode:e},notify:{type:"undo",cnt:n.length}}))}),e.when.apply(null,t)}},n.redo={cmd:"chmod",callback:function(){return c.request({data:t,notify:{type:"redo",cnt:o.length}})}}),d.resolve(n)}))},y=function(){for(var t,i="",a=0;a<3;a++)t=0,e("#"+f+"-read-"+n[a]+"-perm").is(":checked")&&(t=4|t),e("#"+f+"-write-"+n[a]+"-perm").is(":checked")&&(t=2|t),e("#"+f+"-execute-"+n[a]+"-perm").is(":checked")&&(t=1|t),i+=t.toString(8);e("#"+f+"-perm").val(i)},w=function(t){for(var i,a=0;a<3;a++)i=parseInt(t.slice(a,a+1),8),e("#"+f+"-read-"+n[a]+"-perm").prop("checked",!1),e("#"+f+"-write-"+n[a]+"-perm").prop("checked",!1),e("#"+f+"-execute-"+n[a]+"-perm").prop("checked",!1),4==(4&i)&&e("#"+f+"-read-"+n[a]+"-perm").prop("checked",!0),2==(2&i)&&e("#"+f+"-write-"+n[a]+"-perm").prop("checked",!0),1==(1&i)&&e("#"+f+"-execute-"+n[a]+"-perm").prop("checked",!0);y()},x=function(e){for(var t,n,i,a="777",o="",r=e.length,s=0;s<r;s++){t=z(e[s].perm),S[t]||(S[t]=[]),S[t].push(e[s].hash),o="";for(var l=0;l<3;l++)n=parseInt(t.slice(l,l+1),8),i=parseInt(a.slice(l,l+1),8),4!=(4&n)&&4==(4&i)&&(i-=4),2!=(2&n)&&2==(2&i)&&(i-=2),1!=(1&n)&&1==(1&i)&&(i-=1),o+=i.toString(8);a=o}return a},k=function(e){return e?":"+e:""},C=function(e,t){for(var a,o,r="",s=p.dataTable,l=0;l<3;l++)a=parseInt(e.slice(l,l+1),8),r+=a.toString(8),o=p.fieldset.replace("{f_title}",c.i18n(n[l])).replace("{name}",k(t[n[l]])).replace(/\{level\}/g,n[l]),s=s.replace("{"+l+"}",o).replace("{checked-r}",4==(4&a)?g:"").replace("{checked-w}",2==(2&a)?g:"").replace("{checked-x}",1==(1&a)?g:"");return s=s.replace("{value}",r).replace("{valueCaption}",i.perm)},z=function(e){if(isNaN(parseInt(e,8))){for(var t=e.split(""),n=[],i=0,a=t.length;i<a;i++)0===i||3===i||6===i?t[i].match(/[r]/i)?n.push(1):t[i].match(/[-]/)&&n.push(0):1===i||4===i||7===i?t[i].match(/[w]/i)?n.push(1):t[i].match(/[-]/)&&n.push(0):t[i].match(/[x]/i)?n.push(1):t[i].match(/[-]/)&&n.push(0);n.splice(3,0,","),n.splice(7,0,",");for(var o=n.join(""),r=o.split(","),s=[],l=0,c=r.length;l<c;l++){var d=parseInt(r[l],2).toString(8);s.push(d)}e=s.join("")}else e=parseInt(e,8).toString(8);return e},T={title:this.title,width:"auto",buttons:v(),close:function(){e(this).elfinderdialog("destroy")}},A=c.getUI().find("#"+f),S={},I="";return A.length?(A.elfinderdialog("toTop"),e.Deferred().resolve()):(m=m.replace("{class}",u>1?"elfinder-cwd-icon-group":c.mime2class(h.mime)),u>1?s=p.groupTitle.replace("{items}",c.i18n("items")).replace("{num}",u):(s=p.itemTitle.replace("{name}",h.name).replace("{kind}",c.mime2kind(h)),I=c.tmb(h)),l=C(x(r),1==r.length?r[0]:{}),m=m.replace("{title}",s).replace("{dataTable}",l).replace(/{id}/g,f),A=this.fmDialog(m,T),A.attr("id",f),I&&e("<img/>").on("load",function(){A.find(".elfinder-cwd-icon").addClass(I.className).css("background-image","url('"+I.url+"')")}).attr("src",I.url),e("#"+f+"-table-perm :checkbox").on("click",function(){y("perm")}),e("#"+f+"-perm").on("keydown",function(t){var n=t.keyCode;if(n==e.ui.keyCode.ENTER)return t.stopPropagation(),void b()}).on("focus",function(t){e(this).trigger("select")}).on("keyup",function(t){3==e(this).val().length&&(e(this).trigger("select"),w(e(this).val()))}),d)}},i.prototype.commands.colwidth=function(){this.alwaysEnabled=!0,this.updateOnSelect=!1,this.getstate=function(){return"fixed"===this.fm.getUI("cwd").find("table").css("table-layout")?0:-1},this.exec=function(){return this.fm.getUI("cwd").trigger("colwidth"),e.Deferred().resolve()}},i.prototype.commands.copy=function(){this.shortcuts=[{pattern:"ctrl+c ctrl+insert"}],this.getstate=function(t){var n=this.files(t),i=n.length;return i&&e.grep(n,function(e){return!!e.read}).length==i?0:-1},this.exec=function(t){var n=this.fm,i=e.Deferred().fail(function(e){n.error(e)});return e.each(this.files(t),function(e,t){if(!t.read)return!i.reject(["errCopy",t.name,"errPerm"])}),"rejected"==i.state()?i:i.resolve(n.clipboard(this.hashes(t)))}},i.prototype.commands.cut=function(){var t=this.fm;this.shortcuts=[{pattern:"ctrl+x shift+insert"}],this.getstate=function(n){var i=this.files(n),a=i.length;return a&&e.grep(i,function(e){return!(!e.read||e.locked||t.isRoot(e))}).length==a?0:-1},this.exec=function(n){var i=e.Deferred().fail(function(e){t.error(e)});return e.each(this.files(n),function(e,n){return!n.read||n.locked||t.isRoot(n)?!i.reject(["errCopy",n.name,"errPerm"]):n.locked?!i.reject(["errLocked",n.name]):void 0}),"rejected"==i.state()?i:i.resolve(t.clipboard(this.hashes(n),!0))}},i.prototype.commands.zipdl=function(){},i.prototype.commands.download=function(){var t=this,n=this.fm,i=null,a=!1,o=!1,r=!1,s=window.location.pathname||"/",l=function(r,s){var l,c;if(null!==i&&(n.searchStatus.state>1?o=n.searchStatus.mixed:n.leafRoots[n.cwd().hash]&&(l=n.cwd().volumeid,e.each(r,function(e,t){if(0!==t.indexOf(l))return o=!0,!1})),a=n.isCommandEnabled("zipdl",r[0])),o){if(c=i?"zipdl":"download",r=e.grep(r,function(e){var t=n.file(e),a=!(!t||!i&&"directory"===t.mime||!n.isCommandEnabled(c,e));return t&&s&&!a&&n.cwdHash2Elm(t.hash).trigger("unselect"),a}),!r.length)return[]}else if(!n.isCommandEnabled("download",r[0]))return[];return e.grep(t.files(r),function(e){var t=!(!e.read||!a&&"directory"==e.mime);return s&&!t&&n.cwdHash2Elm(e.hash).trigger("unselect"),t})};this.linkedCmds=["zipdl"],this.shortcuts=[{pattern:"shift+enter"}],this.getstate=function(e){var t=this.hashes(e),i=t.length,o=this.options.maxRequests||10;return i<1?-1:(i=l(t).length,i&&(a||i<=o&&(!n.UA.IE&&!n.UA.Mobile||1==i))?0:-1)},n.bind("contextmenu",function(n){var i,a,o=t.fm,r=null,s=function(t){var n=t.url||o.url(t.hash);return{icon:"link",node:e("<a/>").attr({href:n,target:"_blank",title:o.i18n("link")}).text(t.name).on("mousedown click touchstart touchmove touchend contextmenu",function(e){e.stopPropagation()}).on("dragstart",function(n){var i=n.dataTransfer||n.originalEvent.dataTransfer||null;if(r=null,i){var a=function(t){var n,i=t.mime,a=o.tmb(t);return n='<div class="elfinder-cwd-icon '+o.mime2class(i)+' ui-corner-all"/>',a&&(n=e(n).addClass(a.className).css("background-image","url('"+a.url+"')").get(0).outerHTML),n};i.effectAllowed="copyLink",i.setDragImage&&(r=e('<div class="elfinder-drag-helper html5-native">').append(a(t)).appendTo(e(document.body)),i.setDragImage(r.get(0),50,47)),o.UA.IE||(i.setData("elfinderfrom",window.location.href+t.phash),i.setData("elfinderfrom:"+i.getData("elfinderfrom"),""))}}).on("dragend",function(e){r&&r.remove()})}};if(t.extra=null,n.data&&(i=n.data.targets||[],1===i.length&&(a=o.file(i[0]))&&"directory"!==a.mime))if("1"!=a.url)t.extra=s(a);else{var l;t.extra={icon:"link",node:e("<a/>").attr({href:"#",title:o.i18n("getLink"),draggable:"false"}).text(a.name).on("click touchstart",function(e){if(!("touchstart"===e.type&&e.originalEvent.touches.length>1)){var t=l.parent();e.stopPropagation(),e.preventDefault(),t.removeClass("ui-state-disabled").addClass("elfinder-button-icon-spinner"),o.request({data:{cmd:"url",target:a.hash},preventDefault:!0}).always(function(e){if(t.removeClass("elfinder-button-icon-spinner"),e.url){var n=o.file(a.hash);n.url=e.url,l.replaceWith(s(a).node)}else t.addClass("ui-state-disabled")})}})},l=t.extra.node,l.ready(function(){requestAnimationFrame(function(){l.parent().addClass("ui-state-disabled").css("pointer-events","auto")})})}}).one("open",function(){n.api>=2.1012&&(i=n.getCommand("zipdl")),r=n.api>2.1038&&!n.isCORS}),this.exec=function(n){var i,c,d,p,u,h,f,m=this.hashes(n),g=this.fm,v=(g.options.url,l(m,!0)),b=e.Deferred(),y="",w={},x=!1,k=function(n){return function(){var i,a,o,r=e.Deferred(),s=g.file(g.root(n[0])),l=1===n.length,d=s?s.i18||s.name:null;return l?(i=g.file(n[0]))&&(a=i.i18||i.name):(e.each(n,function(){var e=g.file(this);return!e||o&&o!==e.phash?(o=null,!1):void(o=e.phash)}),o&&(i=g.file(o))&&(a=(i.i18||i.name)+"-"+n.length)),a&&(d=a),d&&(d=" ("+d+")"),g.request({data:{cmd:"zipdl",targets:n},notify:{type:"zipdl",cnt:1,hideCnt:!0,msg:g.i18n("ntfzipdl")+d},cancel:!0,eachCancel:!0,preventDefault:!0}).done(function(i){var o,s,l,d,u,h,f={},m="dlw"+ +new Date;i.error?(g.error(i.error),r.resolve()):i.zipdl&&(o=i.zipdl,a?(h=g.splitFileExtention(o.name||""),a+=h[1]?"."+h[1]:".zip"):a=o.name,p&&(!g.UA.Safari||g.isSameOrigin(g.options.url))||x?(c=g.options.url+(g.options.url.indexOf("?")===-1?"?":"&")+"cmd=zipdl&download=1",e.each([n[0],o.file,a,o.mime],function(e,t){c+="&targets%5B%5D="+encodeURIComponent(t)}),e.each(g.customData,function(e,t){c+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t)}),c+="&"+encodeURIComponent(a),l=e("<a/>").attr("href",c).attr("download",g.escape(a)).on("click",function(){r.resolve(),s&&s.elfinderdialog("destroy")}),x?(l.attr("target","_blank").append('<span class="elfinder-button-icon elfinder-button-icon-download"></span>'+g.escape(a)),f[g.i18n("btnCancel")]=function(){s.elfinderdialog("destroy")},s=t.fmDialog(l,{title:g.i18n("link"),buttons:f,width:"200px",destroyOnClose:!0,close:function(){"resolved"!==r.state()&&r.resolve()}})):(C(l.hide().appendTo("body").get(0)),l.remove())):(d=e('<form action="'+g.options.url+'" method="post" target="'+m+'" style="display:none"/>').append('<input type="hidden" name="cmd" value="zipdl"/>').append('<input type="hidden" name="download" value="1"/>'),e.each([n[0],o.file,a,o.mime],function(e,t){d.append('<input type="hidden" name="targets[]" value="'+g.escape(t)+'"/>')}),e.each(g.customData,function(e,t){d.append('<input type="hidden" name="'+e+'" value="'+g.escape(t)+'"/>')}),d.attr("target",m).appendTo("body"),u=e('<iframe style="display:none" name="'+m+'">').appendTo("body").ready(function(){d.submit().remove(),r.resolve(),setTimeout(function(){u.remove()},2e4)})))}).fail(function(e){e&&g.error(e),r.resolve()}),r.promise()}},C=function(e){var t;"function"==typeof MouseEvent?t=new MouseEvent("click"):(t=document.createEvent("MouseEvents"),t.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)),g.pauseUnloadCheck(!0),e.dispatchEvent(t)},z=function(e){var t,n="elfdl"+e;t=document.cookie.split(n+"="),2===t.length?(h&&clearTimeout(h),document.cookie=n+"=; path="+s+"; max-age=0",T()):setTimeout(function(){z(e)},200)},T=function(){g.ui.notify.children(".elfinder-notify-download").length&&g.notify({type:"download",cnt:-1})},A=[];if(!v.length)return b.reject();if(u=e.grep(v,function(e){return"directory"!==e.mime}).length,d=e("<a>").hide().appendTo("body"),p="string"==typeof d.get(0).download,a&&(u!==v.length||u>=(this.options.minFilesZipdl||1)))return d.remove(),x=!p&&g.UA.Mobile,o?(w={},e.each(v,function(e,t){var n=t.hash.split("_",2);w[n[0]]?w[n[0]].push(t.hash):w[n[0]]=[t.hash]}),!x&&g.UA.Mobile&&Object.keys(w).length>1&&(x=!0)):w=[e.map(v,function(e){return e.hash})],b=g.sequence(e.map(w,function(e){return k(e)})).always(function(){g.trigger("download",{files:v})});for(A=[],i=0;i<v.length;i++)c=g.openUrl(v[i].hash,!0),r&&c.substr(0,g.options.url.length)===g.options.url&&(f=g.getRequestId(),A.push(f),c+="&cpath="+s+"&reqid="+f,h=setTimeout(function(){g.notify({type:"download",cnt:1,cancel:g.UA.IE||g.UA.Edge?void 0:function(){A.length&&e.each(A,function(){g.request({data:{cmd:"abort",id:this},preventDefault:!0})}),A=[]}})},g.notifyDelay),z(f)),!p||g.UA.Safari&&!g.isSameOrigin(c)?g.UA.Mobile?setTimeout(function(){window.open(c)||(g.error("errPopup"),h&&cleaerTimeout(h),T())},100):y+='<iframe class="downloader" id="downloader-'+v[i].hash+'" style="display:none" src="'+c+'"/>':C(d.attr("href",c).attr("download",g.escape(v[i].name)).get(0));return d.remove(),e(y).appendTo("body").ready(function(){setTimeout(function(){e(y).each(function(){e("#"+e(this).attr("id")).remove()})},2e4+1e4*i)}),g.trigger("download",{files:v}),b.resolve()}},i.prototype.commands.duplicate=function(){var t=this.fm;this.getstate=function(n){var i=this.files(n),a=i.length;return a&&t.cwd().write&&e.grep(i,function(e){return!(!e.read||e.phash!==t.cwd().hash||t.isRoot(e))}).length==a?0:-1},this.exec=function(t){var n=this.fm,i=this.files(t),a=i.length,o=e.Deferred().fail(function(e){e&&n.error(e)});return a?(e.each(i,function(e,t){if(!t.read||!n.file(t.phash).write)return!o.reject(["errCopy",t.name,"errPerm"])}),"rejected"==o.state()?o:n.request({data:{cmd:"duplicate",targets:this.hashes(t)},notify:{type:"copy",cnt:a},navigate:{toast:{inbuffer:{msg:n.i18n(["complete",n.i18n("cmdduplicate")])}}}})):o.reject()}},i.prototype.commands.edit=function(){var t,n=this,i=this.fm,a=i.res("class","editing"),o=[],r=[],s=!1,l=function(e){return e.replace(/\s+$/,"")},c=function(t){var a,o=e('<select class="ui-corner-all"/>');return t&&e.each(t,function(e,t){a=i.escape(t.value),o.append('<option value="'+a+'">'+(t.caption?i.escape(t.caption):a)+"</option>")}),e.each(n.options.encodings,function(e,t){o.append('<option value="'+t+'">'+t+"</option>")}),o},d=function(){var t,a;return a="string"==typeof n.options.dialogWidth&&(t=n.options.dialogWidth.match(/(\d+)%/))?parseInt(i.getUI().width()*(t[1]/100)):parseInt(n.options.dialogWidth||650),Math.min(a,e(window).width())},p=function(t){var a,l,c,d=t.length;return d>1&&(a=t[0].mime,l=t[0].name.replace(/^.*(\.[^.]+)$/,"$1")),e.grep(t,function(t){var p;return!c&&"directory"!==t.mime&&(p=t.read&&(s||i.mimeIsText(t.mime)||e.inArray(t.mime,1===d?o:r)!==-1)&&(!n.onlyMimes.length||e.inArray(t.mime,n.onlyMimes)!==-1)&&(1===d||t.mime===a&&t.name.substr(l.length*-1)===l)&&!!i.uploadMimeCheck(t.mime,t.phash)&&v(t,d)&&Object.keys(m).length,p||(c=!0),p)})},u=function(e){var t,n=i.file(e);i.request({cmd:"info",targets:[e],preventDefault:!0}).done(function(e){var a;e&&e.files&&e.files.length&&(t=e.files[0],n.ts==t.ts&&n.size==t.size||(a={changed:[t]},i.updateCache(a),i.change(a)))})},h=function(t,o,r,s,p){var h,m,g,v,b,y,x=e.Deferred(),k=!1,C=function(){return!!k||(i.toast({mode:"warning",msg:i.i18n("nowLoading")}),!1)},z=function(){var t,n,i=v?v.val():void 0,a=e.Deferred().fail(function(e){g.show().find("button.elfinder-btncnt-0,button.elfinder-btncnt-1").hide()});return C()?(h.editor&&(h.editor.save(h[0],h.editor.instance),t=h.editor.confObj,t.info&&(t.info.schemeContent||t.info.arrayBufferContent)&&(i="scheme")),n=M(),F(n),n.promise?n.done(function(e){x.notifyWith(h,[i,h.data("hash"),m,a])}).fail(function(e){a.reject(e)}):x.notifyWith(h,[i,h.data("hash"),m,a]),a):a.resolve()},T=function(){C()&&z().fail(function(e){e&&i.error(e)})},A=function(){h.elfinderdialog("close")},S=function(){C()&&(z().done(function(){k=!1,g.show(),A()}).fail(function(e){g.show(),e&&i.error(e)}),g.hide())},I=function(){if(C()){var t=m,r=i.file(o.phash)?o.phash:i.cwd().hash,s=function(e){d.addClass(a).fadeIn(function(){e&&i.error(e)}),m=t,i.disable()},l=function(){n.mime=E.mime||o.mime,n.prefix=(E.name||o.name).replace(/ \d+(\.[^.]+)?$/,"$1"),n.requestCmd="mkfile",n.nextAction={},n.data={target:r},e.proxy(i.res("mixin","make"),n)().done(function(e){e.added&&e.added.length?(h.data("hash",e.added[0].hash),z().done(function(){k=!1,g.show(),A(),d.fadeIn()}).fail(s)):s()}).progress(function(e){e&&"errUploadMime"===e&&h.trigger("saveAsFail")}).fail(s).always(function(){delete n.mime,delete n.prefix,delete n.nextAction,delete n.data}),i.trigger("unselectfiles",{files:[o.hash]})},c=null,d=i.getUI().children("."+n.dialogClass+":visible");g.is(":hidden")&&(d=d.add(g)),d.removeClass(a).fadeOut(),i.enable(),i.searchStatus.state<2&&r!==i.cwd().hash&&(c=i.exec("open",[r],{thash:r})),e.when([c]).done(function(){c?i.one("cwdrender",l):l()}).fail(s)}},O=function(){var t,n,a=e.Deferred();return k?(h.editor&&h.editor.save(h[0],h.editor.instance),t=M(),t&&t.promise?(n=setTimeout(function(){i.notify({type:"chkcontent",cnt:1,hideCnt:!0})},100),t.always(function(){n&&clearTimeout(n),i.notify({type:"chkcontent",cnt:-1})}).done(function(e){a.resolve(m!==e)}).fail(function(e){a.resolve(e||!0)})):a.resolve(m!==t),a):a.resolve(!1)},j={title:i.escape(o.name),width:d(),buttons:{},cssClass:a,maxWidth:"window",maxHeight:"window",allowMinimize:!0,allowMaximize:!0,openMaximized:w()||p&&p.info&&p.info.openMaximized,btnHoverFocus:!1,closeOnEscape:!1,propagationEvents:["mousemove","mouseup","click"],minimize:function(){var e;h.editor&&g.closest(".ui-dialog").is(":hidden")&&(e=h.editor.confObj,e.info&&e.info.syncInterval&&u(o.hash))},close:function(){var e=function(){var e;x.resolve(),h.editor&&(h.editor.close(h[0],h.editor.instance),e=h.editor.confObj,e.info&&e.info.syncInterval&&u(o.hash)),h.elfinderdialog("destroy")},t="undefined"!=typeof E.name,a=t?{label:"btnSaveAs",callback:function(){requestAnimationFrame(I)}}:{label:"btnSaveClose",callback:function(){z().done(function(){e()})}};O().done(function(o){var r=["confirmNotSave"];o?("string"==typeof o&&r.unshift(o),i.confirm({title:n.title,text:r,accept:a,cancel:{label:"btnClose",callback:e},buttons:t?null:[{label:"btnSaveAs",callback:function(){requestAnimationFrame(I)}}]})):e()})},open:function(){var e,n,a;if(h.initEditArea.call(h,t,o,r,i),h.editor){if(e=h.editor.load(h[0])||null,e&&e.done)e.always(function(){k=!0}).done(function(e){h.editor.instance=e,h.editor.focus(h[0],h.editor.instance),F(M()),requestAnimationFrame(function(){g.trigger("resize")})}).fail(function(e){e&&i.error(e),h.elfinderdialog("destroy")});else{if(k=!0,e&&("string"==typeof e||Array.isArray(e)))return i.error(e),void h.elfinderdialog("destroy");h.editor.instance=e,h.editor.focus(h[0],h.editor.instance),F(M()),requestAnimationFrame(function(){g.trigger("resize")})}n=h.editor.confObj,n.info&&n.info.syncInterval&&(a=parseInt(n.info.syncInterval))&&setTimeout(function(){D(a)},a)}else k=!0,F(M())},resize:function(e,t){h.editor&&h.editor.resize(h[0],h.editor.instance,e,t||{})}},M=function(){return h.getContent.call(h,h[0])},F=function(e){e&&e.promise?e.done(function(e){m=e}):m=e},D=function(e){g.is(":visible")&&(u(o.hash),setTimeout(function(){D(e)},e))},E={};if(p&&(p.html&&(h=e(p.html)),b={init:p.init||null,load:p.load,getContent:p.getContent||null,save:p.save,beforeclose:"function"==typeof p.beforeclose?p.beforeclose:void 0,close:"function"==typeof p.close?p.close:function(){},focus:"function"==typeof p.focus?p.focus:function(){},resize:"function"==typeof p.resize?p.resize:function(){},instance:null,doSave:T,doCancel:A,doClose:S,file:o,fm:i,confObj:p,trigger:function(e,t){i.trigger("editEditor"+e,Object.assign({},p.info||{},t))}}),!h){if(!i.mimeIsText(o.mime))return x.reject("errEditorNotFound");!function(){var n=function(){v&&O().done(function(e){e?v.attr("title",i.i18n("saveAsEncoding")).addClass("elfinder-edit-changed"):v.attr("title",i.i18n("openAsEncoding")).removeClass("elfinder-edit-changed")})};h=e('<textarea class="elfinder-file-edit" rows="20" id="'+t+'-ta"></textarea>').on("input propertychange",n),h.editor&&h.editor.info&&!h.editor.info.useTextAreaEvent||h.on("keydown",function(t){var n,i,a=t.keyCode;t.stopPropagation(),a==e.ui.keyCode.TAB&&(t.preventDefault(),this.setSelectionRange&&(n=this.value,i=this.selectionStart,this.value=n.substr(0,i)+"\t"+n.substr(this.selectionEnd),i+=1,this.setSelectionRange(i,i))),(t.ctrlKey||t.metaKey)&&(a!="Q".charCodeAt(0)&&a!="W".charCodeAt(0)||(t.preventDefault(),A()),a=="S".charCodeAt(0)&&(t.preventDefault(),T()))}).on("mouseenter",function(){this.focus()}),h.initEditArea=function(t,a,o){var r=s&&"unknown"!==s?[{value:s}]:[],l=e("<select/>").hide(),d=function(t){t&&l.appendTo(v.parent()),l.empty().append(e("<option/>").text(v.val())),v.width(l.width())};h.hide().val(o),""!==o&&s&&"UTF-8"===s||r.push({value:"UTF-8"}),v=c(r).on("touchstart",function(e){e.stopPropagation()}).on("change",function(){O().done(function(e){e||""===M()||(A(),f(a,v.val(),p).fail(function(e){e&&i.error(e)}))}),d()}).on("mouseover",n),h.parent().next().prepend(e('<div class="ui-dialog-buttonset elfinder-edit-extras"/>').append(v)),d(!0)}}()}return h.data("hash",o.hash),b&&(h.editor=b,"function"==typeof b.beforeclose&&(j.beforeclose=function(){return b.beforeclose(h[0],b.instance)}),"function"==typeof b.init&&(h.initEditArea=b.init),"function"==typeof b.getContent&&(h.getContent=b.getContent)),h.initEditArea||(h.initEditArea=function(){}),h.getContent||(h.getContent=function(){return l(h.val())}),p&&p.info&&p.info.preventGet||(j.buttons[i.i18n("btnSave")]=T,j.buttons[i.i18n("btnSaveClose")]=S,j.buttons[i.i18n("btnSaveAs")]=I,j.buttons[i.i18n("btnCancel")]=A),p&&"function"==typeof p.prepare&&p.prepare(h,j,o),g=n.fmDialog(h,j).attr("id",t).on("keydown keyup keypress",function(e){e.stopPropagation()}).css({overflow:"hidden",minHeight:"7em"}).addClass("elfinder-edit-editor").closest(".ui-dialog").on("changeType",function(t,n){if(n.extention&&n.mime){var a=(n.extention,n.mime,e(this).children(".ui-dialog-buttonpane").children(".ui-dialog-buttonset"));a.children(".elfinder-btncnt-0,.elfinder-btncnt-1").hide(),E.name=i.splitFileExtention(o.name)[0]+"."+n.extention,E.mime=n.mime,n.keepEditor||a.children(".elfinder-btncnt-2").trigger("click")}}),y=(i.options.dialogContained?elfNode:e(window)).width(),g.width()>y&&g.width(y),x.promise()},f=function(t,a,o){var r,s,l,d=t.hash,p=(i.options,e.Deferred()),u="edit-"+i.namespace+"-"+t.hash,m=i.getUI().find("#"+u),g=a?a:0,v=!1;if(m.length)return m.elfinderdialog("toTop"),p.resolve();if(!(t.read&&(t.write||o.info&&o.info.converter)))return s=["errOpen",t.name,"errPerm"],p.reject(s);if(o&&o.info){if("function"==typeof o.info.edit)return l=o.info.edit.call(i,t,o),l.promise?l.done(function(){p.resolve()}).fail(function(e){p.reject(e)}):l?p.resolve():p.reject(),p;v=o.info.preventGet||o.info.noContent,o.info.urlAsContent||v?(r=e.Deferred(),o.info.urlAsContent?i.url(d,{async:!0,onetime:!0,temporary:!0}).done(function(e){r.resolve({content:e})}):r.resolve({})):r=i.request({data:{cmd:"get",target:d,conv:g,_t:t.ts},options:{type:"get",cache:!0},notify:{type:"file",cnt:1},preventDefault:!0}),r.done(function(a){var r,s,l;a.doconv?i.confirm({title:n.title,text:"unknown"===a.doconv?"confirmNonUTF8":"confirmConvUTF8",accept:{label:"btnConv",callback:function(){p=f(t,r.val(),o)}},cancel:{label:"btnCancel",callback:function(){p.reject()}},optionsCallback:function(t){
20
- t.create=function(){var t=e('<div class="elfinder-dialog-confirm-encoding"/>'),n={value:a.doconv};"unknown"===a.doconv&&(n.caption="-"),r=c([n]),e(this).next().find(".ui-dialog-buttonset").prepend(t.append(e("<label>"+i.i18n("encoding")+" </label>").append(r)))}}}):(!v&&i.mimeIsText(t.mime)&&(s=new RegExp("^(data:"+t.mime.replace(/([.+])/g,"\\$1")+";base64,)","i"),o.info.dataScheme?window.btoa&&!a.content.match(s)&&(a.content="data:"+t.mime+";base64,"+btoa(a.content)):window.atob&&(l=a.content.match(s))&&(a.content=atob(a.content.substr(l[1].length)))),h(u,t,a.content,a.encoding,o).done(function(e){p.resolve(e)}).progress(function(e,t,n,a){var o=this;t&&(d=t),i.request({options:{type:"post"},data:{cmd:"put",target:d,encoding:e||n.encoding,content:n},notify:{type:"save",cnt:1},syncOnFail:!0,preventFail:!0,navigate:{target:"changed",toast:{inbuffer:{msg:i.i18n(["complete",i.i18n("btnSave")])}}}}).fail(function(e){p.reject(e),a.reject()}).done(function(e){requestAnimationFrame(function(){o.trigger("focus"),o.editor&&o.editor.focus(o[0],o.editor.instance)}),a.resolve()})}).fail(function(e){p.reject(e)}))}).fail(function(e){var t=i.parseError(e);t=Array.isArray(t)?t[0]:t,"errConvUTF8"!==t&&i.sync(),p.reject(e)})}return p.promise()},m={},g={info:{id:"textarea",name:"TextArea",useTextAreaEvent:!0},load:function(t){this.trigger("Prepare",{node:t,editorObj:void 0,instance:void 0,opts:{}}),t.setSelectionRange&&t.setSelectionRange(0,0),e(t).trigger("focus").show()},save:function(){}},v=function(a,o){var r=function(t,n){if(n){if("*"===n[0]||e.inArray(t,n)!==-1)return!0;var a,o;for(o=n.length,a=0;a<o;a++)if(0===t.indexOf(n[a]))return!0;return!1}return i.mimeIsText(t)},s=function(e,t){if(!t||!t.length)return!0;var n,i,a=e.replace(/^.+\.([^.]+)|(.+)$/,"$1$2").toLowerCase();for(i=t.length,n=0;n<i;n++)if(a===t[n].toLowerCase())return!0;return!1},l=n.options.editors||[],c=i.cwd().write;return t=i.storage("storedEditors")||{},m={},l.length||(l=[g]),e.each(l,function(e,t){var n;(1===o||!t.info.single)&&(t.info&&t.info.converter?c:a.write)&&(a.size>0||!t.info.converter&&(t.info.canMakeEmpty||t.info.canMakeEmpty!==!1&&i.mimeIsText(a.mime)))&&(!t.info.maxSize||a.size<=t.info.maxSize)&&r(a.mime,t.mimes||null)&&s(a.name,t.exts||null)&&"function"==typeof t.load&&"function"==typeof t.save&&(n=t.info.name?t.info.name:"Editor "+e,t.id=t.info.id?t.info.id:"editor"+e,t.name=n,t.i18n=i.i18n(n),m[t.id]=t)}),!!Object.keys(m).length},b=function(n,a){n&&a&&(e.isPlainObject(t)||(t={}),t[n]=a.id,i.storage("storedEditors",t),i.trigger("selectfiles",{files:i.selected()}))},y=function(){var e=i.storage("useStoredEditor");return e?e>0:n.options.useStoredEditor},w=function(){var e=i.storage("editorMaximized");return e?e>0:n.options.editorMaximized},x=function(t,n){var a=[];return e.each(m,function(e,o){a.push({label:i.escape(o.i18n),icon:o.info&&o.info.icon?o.info.icon:"edit",options:{iconImg:o.info&&o.info.iconImg?i.baseUrl+o.info.iconImg:void 0},callback:function(){b(t[0].mime,o),n&&n.call(o)}})}),a},k=function(e){return e.toLowerCase().replace(/ +/g,"")},C=function(e){var n=t[e];return n&&Object.keys(m).length?m[k(n)]:void 0};this.shortcuts=[{pattern:"ctrl+e"}],this.init=function(){var t,n,i=this,a=this.fm,l=this.options,c=[];this.onlyMimes=this.options.mimes||[],a.one("open",function(){l.editors&&Array.isArray(l.editors)&&(a.trigger("canMakeEmptyFile",{mimes:Object.keys(a.storage("mkfileTextMimes")||{}).concat(l.makeTextMimes||["text/plain"])}),e.each(l.editors,function(e,t){t.info&&t.info.cmdCheck&&c.push(t.info.cmdCheck)}),c.length?a.api>=2.103?n=a.request({data:{cmd:"editor",name:c,method:"enabled"},preventDefault:!0}).done(function(e){t=e}).fail(function(){t={}}):(t={},n=e.Deferred().resolve()):n=e.Deferred().resolve(),n.always(function(){t&&(l.editors=e.grep(l.editors,function(e){return!e.info||!e.info.cmdCheck||!!t[e.info.cmdCheck]})),e.each(l.editors,function(e,t){t.setup&&"function"==typeof t.setup&&t.setup.call(t,l,a),t.disabled||(t.mimes&&Array.isArray(t.mimes)&&(o=o.concat(t.mimes),t.info&&t.info.single||(r=r.concat(t.mimes))),!s&&t.mimes&&"*"===t.mimes[0]&&(s=!0),t.info||(t.info={}),t.info.integrate&&a.trigger("helpIntegration",Object.assign({cmd:"edit"},t.info.integrate)),t.info.canMakeEmpty&&a.trigger("canMakeEmptyFile",{mimes:t.mimes}))}),o=(e.uniqueSort||e.unique)(o),r=(e.uniqueSort||e.unique)(r),l.editors=e.grep(l.editors,function(e){return!e.disabled})}))}).bind("select",function(){m=null}).bind("contextmenucreate",function(t){var n,o,r=function(e){var t=i.title;a.one("contextmenucreatedone",function(){i.title=t}),i.title=a.escape(e.i18n),e.info&&e.info.iconImg&&(i.contextmenuOpts={iconImg:a.baseUrl+e.info.iconImg}),delete i.variants};i.contextmenuOpts=void 0,"files"===t.data.type&&i.enabled()&&(n=a.file(t.data.targets[0]),v(n,t.data.targets.length)&&(Object.keys(m).length>1?y()&&(o=C(n.mime))?(r(o),i.extra={icon:"menu",node:e("<span/>").attr({title:a.i18n("select")}).on("click touchstart",function(t){if(!("touchstart"===t.type&&t.originalEvent.touches.length>1)){var n=e(this);t.stopPropagation(),t.preventDefault(),a.trigger("contextmenu",{raw:x(a.selectedFiles(),function(){var e=a.selected();a.exec("edit",e,{editor:this}),a.trigger("selectfiles",{files:e})}),x:n.offset().left,y:n.offset().top})}})}):(delete i.extra,i.variants=[],e.each(m,function(e,t){i.variants.push([{editor:t},t.i18n,t.info&&t.info.iconImg?a.baseUrl+t.info.iconImg:"edit"])})):(r(m[Object.keys(m)[0]]),delete i.extra)))}).bind("canMakeEmptyFile",function(t){if(t.data&&t.data.resetTexts){var n=a.arrayFlip(i.options.makeTextMimes||["text/plain"]),o=a.storage("mkfileHides")||{};e.each(a.storage("mkfileTextMimes")||{},function(e,t){n[e]||(delete a.mimesCanMakeEmpty[e],delete o[e])}),a.storage("mkfileTextMimes",null),Object.keys(o).length?a.storage("mkfileHides",o):a.storage("mkfileHides",null)}})},this.getstate=function(e){var t=this.files(e),n=t.length;return n&&p(t).length==n?0:-1},this.exec=function(t,n){var i,a=this.fm,o=p(this.files(t)),r=e.map(o,function(e){return e.hash}),s=[],l=n&&n.editor?n.editor:null,c=e(n&&n._currentNode?n._currentNode:a.cwdHash2Elm(r[0])),d=function(){var t=e.Deferred();return!l&&Object.keys(m).length>1?y()&&(l=C(o[0].mime))?t.resolve(l):(a.trigger("contextmenu",{raw:x(o,function(){t.resolve(this)}),x:c.offset().left,y:c.offset().top+22,opened:function(){a.one("closecontextmenu",function(){requestAnimationFrame(function(){"pending"===t.state()&&t.reject()})})}}),a.trigger("selectfiles",{files:r}),t):(Object.keys(m).length>1&&l&&b(o[0].mime,l),t.resolve(l?l:Object.keys(m).length?m[Object.keys(m)[0]]:null))},u=e.Deferred();return null===m&&v(o[0],r.length),c.length||(c=a.getUI("cwd")),d().done(function(t){for(;i=o.shift();)s.push(f(i,void 0,t).fail(function(e){e&&a.error(e)}));s.length?e.when.apply(null,s).done(function(){u.resolve()}).fail(function(){u.reject()}):u.reject()}).fail(function(){u.reject()}),u}},i.prototype.commands.empty=function(){var t,n,i=function(e){var i=t.files(e);return i.length||(i=[n.cwd()]),i};this.linkedCmds=["rm"],this.init=function(){t=this,n=this.fm},this.getstate=function(t){var n,a=i(t);return n=a.length,e.grep(a,function(e){return!(!e.read||!e.write||"directory"!==e.mime)}).length==n?0:-1},this.exec=function(t){var a=i(t),o=a.length,r=e.Deferred().done(function(){var t={changed:{}};n.toast({msg:n.i18n(['"'+s.join('", ')+'"',"complete",n.i18n("cmdempty")])}),e.each(a,function(e,n){t.changed[n.hash]=n}),n.change(t)}).always(function(){var t=n.cwd().hash;n.trigger("selectfiles",{files:e.map(a,function(e){return t===e.phash?e.hash:null})})}),s=[],l=function(e){"number"==typeof e?(s.push(a[e].name),delete a[e].dirs):e&&n.error(e),--o<1&&r[s.length?"resolve":"reject"]()};return e.each(a,function(t,i){var a;return i.write&&"directory"===i.mime?n.isCommandEnabled("rm",i.hash)?(a=setTimeout(function(){n.notify({type:"search",cnt:1,hideCnt:!(o>1)})},n.notifyDelay),void n.request({data:{cmd:"open",target:i.hash},preventDefault:!0,asNotOpen:!0}).done(function(r){var s=[];a&&clearTimeout(a),n.ui.notify.children(".elfinder-notify-search").length&&n.notify({type:"search",cnt:-1,hideCnt:!(o>1)}),r&&r.files&&r.files.length?r.files.length>n.maxTargets?l(["errEmpty",i.name,"errMaxTargets",n.maxTargets]):(n.updateCache(r),e.each(r.files,function(e,t){return!t.write||t.locked?(l(["errEmpty",i.name,"errRm",t.name,"errPerm"]),s=[],!1):void s.push(t.hash)}),s.length&&n.exec("rm",s,{_userAction:!0,addTexts:[n.i18n("folderToEmpty",i.name)]}).fail(function(e){n.trigger("unselectfiles",{files:n.selected()}),l(n.parseError(e)||"")}).done(function(){l(t)})):(n.toast({mode:"warning",msg:n.i18n("filderIsEmpty",i.name)}),l(""))}).fail(function(e){l(n.parseError(e)||"")})):(l(["errCmdNoSupport",'"rm"']),null):(l(["errEmpty",i.name,"errPerm"]),null)}),r}},i.prototype.commands.extract=function(){var t=this,n=t.fm,i=[],a=function(t){return e.grep(t,function(t){return!(!t.read||e.inArray(t.mime,i)===-1)})};this.variants=[],this.disableOnSearch=!0,n.bind("open reload",function(){i=n.option("archivers").extract||[],n.api>2?t.variants=[[{makedir:!0},n.i18n("cmdmkdir")],[{},n.i18n("btnCwd")]]:t.variants=[[{},n.i18n("btnCwd")]],t.change()}),this.getstate=function(e){var t=this.files(e),n=t.length;return n&&this.fm.cwd().write&&a(t).length==n?0:-1},this.exec=function(t,a){var o,r,s,l=this.files(t),c=e.Deferred(),d=l.length,p=a&&a.makedir?1:0,u=!1,h=!1,f=0,m=e.map(n.files(t),function(e){return e.name}),g={};e.grep(n.files(t),function(e){return g[e.name]=e,!1});var v=function(e){switch(e){case"overwrite_all":u=!0;break;case"omit_all":h=!0}},b=function(t){t.read&&n.file(t.phash).write?e.inArray(t.mime,i)===-1?(r=["errExtract",t.name,"errNoArchive"],n.error(r),c.reject(r)):n.request({data:{cmd:"extract",target:t.hash,makedir:p},notify:{type:"extract",cnt:1},syncOnFail:!0,navigate:{toast:p?{incwd:{msg:n.i18n(["complete",n.i18n("cmdextract")]),action:{cmd:"open",msg:"cmdopen"}},inbuffer:{msg:n.i18n(["complete",n.i18n("cmdextract")]),action:{cmd:"open",msg:"cmdopen"}}}:{inbuffer:{msg:n.i18n(["complete",n.i18n("cmdextract")])}}}}).fail(function(e){"rejected"!=c.state()&&c.reject(e)}).done(function(){}):(r=["errExtract",t.name,"errPerm"],n.error(r),c.reject(r))},y=function(t,i){var a=t[i],r=n.splitFileExtention(a.name)[0],l=e.inArray(r,m)>=0,w=function(){i+1<d?y(t,i+1):c.resolve()};!p&&l&&"directory"!=g[r].mime?n.confirm({title:n.i18n("ntfextract"),text:["errExists",r,"confirmRepl"],accept:{label:"btnYes",callback:function(e){if(s=e?"overwrite_all":"overwrite",v(s),u||h){if(u){for(o=i;o<d;o++)b(t[o]);c.resolve()}}else"overwrite"==s&&b(a),i+1<d?y(t,i+1):c.resolve()}},reject:{label:"btnNo",callback:function(e){s=e?"omit_all":"omit",v(s),!u&&!h&&i+1<d?y(t,i+1):h&&c.resolve()}},cancel:{label:"btnCancel",callback:function(){c.resolve()}},all:i+1<d}):p?(b(a),w()):0==f?n.confirm({title:n.i18n("cmdextract"),text:[n.i18n("cmdextract")+' "'+a.name+'"',"confirmRepl"],accept:{label:"btnYes",callback:function(e){e&&(f=1),b(a),w()}},reject:{label:"btnNo",callback:function(e){e&&(f=-1),w()}},cancel:{label:"btnCancel",callback:function(){c.resolve()}},all:i+1<d}):(f>0&&b(a),w())};return this.enabled()&&d&&i.length?(d>0&&y(l,0),c):c.reject()}},(i.prototype.commands.forward=function(){this.alwaysEnabled=!0,this.updateOnSelect=!0,this.shortcuts=[{pattern:"ctrl+right"}],this.getstate=function(){return this.fm.history.canForward()?0:-1},this.exec=function(){return this.fm.history.forward()}}).prototype={forceLoad:!0},i.prototype.commands.fullscreen=function(){var t=this,n=this.fm,i=function(e,n){e.preventDefault(),e.stopPropagation(),n&&n.fullscreen&&t.update(void 0,"on"===n.fullscreen)};this.alwaysEnabled=!0,this.updateOnSelect=!1,this.syncTitleOnChange=!0,this.value=!1,this.options={ui:"fullscreenbutton"},this.getstate=function(){return 0},this.exec=function(){var i=n.getUI().get(0),a=i===n.toggleFullscreen(i);return t.title=n.i18n(a?"reinstate":"cmdfullscreen"),t.update(void 0,a),e.Deferred().resolve()},n.bind("init",function(){n.getUI().off("resize."+n.namespace,i).on("resize."+n.namespace,i)})},(i.prototype.commands.getfile=function(){var t=this,n=this.fm,i=function(n){var i=t.options;return n=e.grep(n,function(e){return!("directory"==e.mime&&!i.folders||!e.read)}),i.multiple||1==n.length?n:[]};this.alwaysEnabled=!0,this.callback=n.options.getFileCallback,this._disabled="function"==typeof this.callback,this.getstate=function(e){var t=this.files(e),n=t.length;return this.callback&&n&&i(t).length==n?0:-1},this.exec=function(n){var i,a,o,r=this.fm,s=this.options,l=this.files(n),c=l.length,d=r.option("url"),p=r.option("tmbUrl"),u=e.Deferred().done(function(e){var n,i=function(){"close"==s.oncomplete?r.hide():"destroy"==s.oncomplete&&r.destroy()},a=function(e){"close"==s.onerror?r.hide():"destroy"==s.onerror?r.destroy():e&&r.error(e)};r.trigger("getfile",{files:e});try{n=t.callback(e,r)}catch(o){return void a(["Error in `getFileCallback`.",o.message])}"object"==typeof n&&"function"==typeof n.done?n.done(i).fail(a):i()}),h=function(t){return s.onlyURL?s.multiple?e.map(l,function(e){return e.url}):l[0].url:s.multiple?l:l[0]},f=[];for(i=0;i<c;i++){if(a=l[i],"directory"==a.mime&&!s.folders)return u.reject();a.baseUrl=d,"1"==a.url?f.push(r.request({data:{cmd:"url",target:a.hash},notify:{type:"url",cnt:1,hideCnt:!0},preventDefault:!0}).done(function(e){if(e.url){var t=r.file(this.hash);t.url=this.url=e.url}}.bind(a))):a.url=r.url(a.hash),s.onlyURL||(s.getPath&&(a.path=r.path(a.hash),""===a.path&&a.phash&&!function(){var t=e.Deferred();f.push(t),r.path(a.hash,!1,{}).done(function(e){a.path=e}).fail(function(){a.path=""}).always(function(){t.resolve()})}()),a.tmb&&1!=a.tmb&&(a.tmb=p+a.tmb),a.width||a.height||(a.dim?(o=a.dim.split("x"),a.width=o[0],a.height=o[1]):s.getImgSize&&a.mime.indexOf("image")!==-1&&f.push(r.request({data:{cmd:"dim",target:a.hash},notify:{type:"dim",cnt:1,hideCnt:!0},preventDefault:!0}).done(function(e){if(e.dim){var t=e.dim.split("x"),n=r.file(this.hash);n.width=this.width=t[0],n.height=this.height=t[1]}}.bind(a)))))}return f.length?(e.when.apply(null,f).always(function(){u.resolve(h(l))}),u):u.resolve(h(l))}}).prototype={forceLoad:!0},(i.prototype.commands.help=function(){var t,n,i,a,o,r,s=this.fm,l=this,c='<div class="elfinder-help-link"> <a href="{url}" target="_blank">{link}</a></div>',d='<div class="elfinder-help-team"><div>{author}</div>{work}</div>',p=/\{url\}/,u=/\{link\}/,h=/\{author\}/,f=/\{work\}/,m="replace",g="ui-priority-primary",v="ui-priority-secondary",b="elfinder-help-license",y='<li class="'+s.res("class","tabstab")+' elfinder-help-tab-{id}"><a href="#'+s.namespace+'-help-{id}" class="ui-tabs-anchor">{title}</a></li>',w=['<div class="ui-tabs ui-widget ui-widget-content ui-corner-all elfinder-help">','<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-top">'],x='<div class="elfinder-help-shortcut"><div class="elfinder-help-shortcut-pattern">{pattern}</div> {descrip}</div>',k='<div class="elfinder-help-separator"/>',C=e("base").length?document.location.href.replace(/#.*$/,""):"",z=s.res("class","tabsactive"),T=function(){var e;return e=s.theme&&s.theme.author?d[m]("elfinder-help-team","elfinder-help-team elfinder-help-term-theme")[m](h,s.i18n(s.theme.author)+(s.theme.email?" &lt;"+s.theme.email+"&gt;":""))[m](f,s.i18n("theme")+" ("+s.i18n(s.theme.name)+")"):'<div class="elfinder-help-team elfinder-help-term-theme" style="display:none"></div>'},A=function(){w.push('<div id="'+s.namespace+'-help-about" class="ui-tabs-panel ui-widget-content ui-corner-bottom"><div class="elfinder-help-logo"/>'),w.push("<h3>elFinder</h3>"),w.push('<div class="'+g+'">'+s.i18n("webfm")+"</div>"),w.push('<div class="'+v+'">'+s.i18n("ver")+": "+s.version+"</div>"),w.push('<div class="'+v+'">'+s.i18n("protocolver")+': <span class="apiver"></span></div>'),w.push('<div class="'+v+'">jQuery/jQuery UI: '+e().jquery+"/"+e.ui.version+"</div>"),w.push(k),w.push(c[m](p,"https://studio-42.github.io/elFinder/")[m](u,s.i18n("homepage"))),w.push(c[m](p,"https://github.com/Studio-42/elFinder/wiki")[m](u,s.i18n("docs"))),w.push(c[m](p,"https://github.com/Studio-42/elFinder")[m](u,s.i18n("github"))),w.push(k),w.push('<div class="'+g+'">'+s.i18n("team")+"</div>"),w.push(d[m](h,'Dmitry "dio" Levashov &lt;dio@std42.ru&gt;')[m](f,s.i18n("chiefdev"))),w.push(d[m](h,"Naoki Sawada &lt;hypweb+elfinder@gmail.com&gt;")[m](f,s.i18n("developer"))),w.push(d[m](h,"Troex Nevelin &lt;troex@fury.scancode.ru&gt;")[m](f,s.i18n("maintainer"))),w.push(d[m](h,"Alexey Sukhotin &lt;strogg@yandex.ru&gt;")[m](f,s.i18n("contributor"))),s.i18[s.lang].translator&&e.each(s.i18[s.lang].translator.split(", "),function(){w.push(d[m](h,e.trim(this))[m](f,s.i18n("translator")+" ("+s.i18[s.lang].language+")"))}),w.push(T()),w.push(k),w.push('<div class="'+b+'">'+s.i18n("icons")+': Pixelmixer, <a href="http://p.yusukekamiyamane.com" target="_blank">Fugue</a>, <a href="https://icons8.com" target="_blank">Icons8</a></div>'),w.push(k),w.push('<div class="'+b+'">Licence: 3-clauses BSD Licence</div>'),w.push('<div class="'+b+'">Copyright © 2009-2019, Studio 42</div>'),w.push('<div class="'+b+'">„ …'+s.i18n("dontforget")+" ”</div>"),w.push("</div>")},S=function(){var t=s.shortcuts();w.push('<div id="'+s.namespace+'-help-shortcuts" class="ui-tabs-panel ui-widget-content ui-corner-bottom">'),t.length?(w.push('<div class="ui-widget-content elfinder-help-shortcuts">'),e.each(t,function(e,t){w.push(x.replace(/\{pattern\}/,t[0]).replace(/\{descrip\}/,t[1]))}),w.push("</div>")):w.push('<div class="elfinder-help-disabled">'+s.i18n("shortcutsof")+"</div>"),w.push("</div>")},I=function(){w.push('<div id="'+s.namespace+'-help-help" class="ui-tabs-panel ui-widget-content ui-corner-bottom">'),w.push('<a href="https://github.com/Studio-42/elFinder/wiki" target="_blank" class="elfinder-dont-panic"><span>DON\'T PANIC</span></a>'),w.push("</div>")},O=!1,j=function(){O=!0,w.push('<div id="'+s.namespace+'-help-integrations" class="ui-tabs-panel ui-widget-content ui-corner-bottom"/>')},M=!1,F=function(){M=!0,w.push('<div id="'+s.namespace+'-help-debug" class="ui-tabs-panel ui-widget-content ui-corner-bottom">'),w.push('<div class="ui-widget-content elfinder-help-debug"><ul></ul></div>'),w.push("</div>")},D=function(){var n,i,a,c,d,p,u=function(t,n){return e.each(n,function(n,i){t.append(e("<dt/>").text(n)),"undefined"==typeof i?t.append(e("<dd/>").append(e("<span/>").text("undfined"))):"object"!=typeof i||i?"object"==typeof i&&(e.isPlainObject(i)||i.length)?t.append(e("<dd/>").append(u(e("<dl/>"),i))):t.append(e("<dd/>").append(e("<span/>").text(i&&"object"==typeof i?"[]":i?i:'""'))):t.append(e("<dd/>").append(e("<span/>").text("null")))}),t},h=r.children("li").length;(l.debug.options||l.debug.debug)&&(h>=5&&(d=r.children("li:last"),p=o.children("div:last"),p.is(":hidden")?(d.remove(),p.remove()):(d.prev().remove(),p.prev().remove())),a=s.namespace+"-help-debug-"+ +new Date,n=e("<li/>").html('<a href="'+C+"#"+a+'">'+l.debug.debug.cmd+"</a>").prependTo(r),i=e('<div id="'+a+'"/>').data("debug",l.debug),n.on("click.debugrender",function(){var t=i.data("debug");i.removeData("debug"),t&&(i.hide(),t.debug&&(c=e("<fieldset>").append(e("<legend/>").text("debug"),u(e("<dl/>"),t.debug)),i.append(c)),t.options&&(c=e("<fieldset>").append(e("<legend/>").text("options"),u(e("<dl/>"),t.options)),i.append(c)),i.show()),n.off("click.debugrender")}),r.after(i),t&&o.tabs("refresh"))},E="";this.alwaysEnabled=!0,this.updateOnSelect=!1,this.state=-1,this.shortcuts=[{pattern:"f1",description:this.title}],s.bind("load",function(){var c,d,p,u,h,f,g=l.options.view||["about","shortcuts","help","integrations","debug"];(c=e.inArray("preference",g))!==-1&&g.splice(c,1),e.fn.tabs||(c=e.inArray(g,"debug"))!==-1&&g.splice(c,1),e.each(g,function(e,t){w.push(y[m](/\{id\}/g,t)[m](/\{title\}/,s.i18n(t)))}),w.push("</ul>"),e.inArray("about",g)!==-1&&A(),e.inArray("shortcuts",g)!==-1&&S(),e.inArray("help",g)!==-1&&(d=s.i18nBaseUrl+"help/%s.html.js",I()),e.inArray("integrations",g)!==-1&&j(),e.inArray("debug",g)!==-1&&F(),w.push("</div>"),E=e(w.join("")),E.find(".ui-tabs-nav li").on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"===t.type)}).on("focus blur","a",function(t){e(t.delegateTarget).toggleClass("ui-state-focus","focusin"===t.type)}).children().on("click",function(t){var n=e(this);t.preventDefault(),t.stopPropagation(),n.parent().addClass(z).siblings().removeClass(z),E.children(".ui-tabs-panel").hide().filter(n.attr("href")).show()}).filter(":first").trigger("click"),O&&(n=E.find(".elfinder-help-tab-integrations").hide(),i=E.find("#"+s.namespace+"-help-integrations").hide().append(e('<div class="elfinder-help-integrations-desc"/>').html(s.i18n("integrationWith"))),s.bind("helpIntegration",function(t){var a,o,r,l,c=i.children("ul:first");t.data&&(e.isPlainObject(t.data)?(a=Object.assign({link:"",title:"",banner:""},t.data),(a.title||a.link)&&(a.title||(a.title=a.link),o=a.link?e("<a/>").attr("href",a.link).attr("target","_blank").text(a.title):e("<span/>").text(a.title),a.banner&&(o=e("<span/>").append(e("<img/>").attr(a.banner),o)))):(o=e(t.data),o.filter("a").each(function(){var t=e(this);t.attr("target")||t.attr("target","_blank")})),o&&(n.show(),c.length||(c=e('<ul class="elfinder-help-integrations"/>').appendTo(i)),a&&a.cmd?(l="elfinder-help-integration-"+a.cmd,r=c.find("ul."+l),r.length||(r=e('<ul class="'+l+'"/>'),c.append(e("<li/>").append(e("<span/>").html(s.i18n("cmd"+a.cmd))).append(r))),o=r.append(e("<li/>").append(o))):c.append(e("<li/>").append(o))))}).bind("themechange",function(){E.find("div.elfinder-help-term-theme").replaceWith(T())})),M&&(a=E.find(".elfinder-help-tab-debug").hide(),o=E.find("#"+s.namespace+"-help-debug").children("div:first"),r=o.children("ul:first").on("click",function(e){e.preventDefault(),e.stopPropagation()}),l.debug={},s.bind("backenddebug",function(e){M&&e.data&&e.data.debug&&(l.debug={options:e.data.options,debug:Object.assign({cmd:s.currentReqCmd},e.data.debug)},l.dialog&&D())})),E.find("#"+s.namespace+"-help-about").find(".apiver").text(s.api),l.dialog=l.fmDialog(E,{title:l.title,width:530,maxWidth:"window",maxHeight:"window",autoOpen:!1,destroyOnClose:!1,close:function(){M&&(a.hide(),o.tabs("destroy")),t=!1}}).on("click",function(e){e.stopPropagation()}).css({overflow:"hidden"}),p=l.dialog.children(".ui-tabs"),u=p.children(".ui-tabs-nav:first"),h=p.children(".ui-tabs-panel"),f=l.dialog.outerHeight(!0)-l.dialog.height(),l.dialog.closest(".ui-dialog").on("resize",function(){h.height(l.dialog.height()-f-u.outerHeight(!0)-20)}),d&&l.dialog.one("initContents",function(){e.ajax({url:l.options.helpSource?l.options.helpSource:d.replace("%s",s.lang),dataType:"html"}).done(function(t){e("#"+s.namespace+"-help-help").html(t)}).fail(function(){e.ajax({url:d.replace("%s","en"),dataType:"html"}).done(function(t){e("#"+s.namespace+"-help-help").html(t)})})}),l.state=0,s.trigger("helpBuilded",l.dialog)}).one("open",function(){var e=!1;s.one("backenddebug",function(){e=!0}).one("opendone",function(){requestAnimationFrame(function(){!e&&M&&(M=!1,a.hide(),o.hide(),r.hide())})})}),this.getstate=function(){return 0},this.exec=function(n,i){var s=i?i.tab:void 0,l=function(){M&&(o.tabs(),r.find("a:first").trigger("click"),a.show(),t=!0)};return l(),this.dialog.trigger("initContents").elfinderdialog("open").find((s?".elfinder-help-tab-"+s:".ui-tabs-nav li")+" a:first").trigger("click"),e.Deferred().resolve()}}).prototype={forceLoad:!0},i.prototype.commands.hidden=function(){this.hidden=!0,this.updateOnSelect=!1,this.getstate=function(){return-1}},i.prototype.commands.hide=function(){var t,n,i,a,o=this,r={};this.syncTitleOnChange=!0,this.shortcuts=[{pattern:"ctrl+shift+dot",description:this.fm.i18n("toggleHidden")}],this.init=function(){var e=this.fm;t=e.storage("hide")||{items:{}},n=Object.keys(t.items).length,this.title=e.i18n(t.show?"hideHidden":"showHidden"),o.update(void 0,o.title)},this.fm.bind("select contextmenucreate closecontextmenu",function(e,r){var s=(e.data?e.data.selected||e.data.targets:null)||r.selected();"select"===e.type&&e.data?a=e.data.origin:"contextmenucreate"===e.type&&(i=e.data.type),!s.length||("contextmenucreate"!==e.type&&"navbar"!==a||"cwd"===i)&&s[0]===r.cwd().hash?o.title=r.i18n(t.show?"hideHidden":"showHidden"):o.title=r.i18n("cmdhide"),"closecontextmenu"!==e.type?o.update("cwd"===i?n?0:-1:void 0,o.title):(i="",requestAnimationFrame(function(){o.update(void 0,o.title)}))}),this.getstate=function(e){return"cwd"!==i&&(e||this.fm.selected()).length||n?0:-1},this.exec=function(i,s){var l,c,d=this.fm,p=e.Deferred().done(function(){d.trigger("hide",{items:h,opts:s})}).fail(function(e){d.error(e)}),u=s||{},h=u.targets?u.targets:i||d.selected(),f=[];if(t=d.storage("hide")||{},e.isPlainObject(t)||(t={}),e.isPlainObject(t.items)||(t.items={}),("shortcut"===s._currentType||!h.length||"navbar"!==s._currentType&&"navbar"!==a&&h[0]===d.cwd().hash)&&(t.show?u.hide=!0:Object.keys(t.items).length&&(u.show=!0)),u.reset&&(u.show=!0,n=0),u.show||u.hide){if(u.show?t.show=!0:delete t.show,u.show)return d.storage("hide",u.reset?null:t),o.title=d.i18n("hideHidden"),o.update(u.reset?-1:void 0,o.title),e.each(t.items,function(e){var t=d.file(e,!0);t&&(d.searchStatus.state||!t.phash||d.file(t.phash))&&f.push(t)}),f.length&&(d.updateCache({added:f}),d.add({added:f})),u.reset&&(t={items:{}}),p.resolve();h=Object.keys(t.items)}return h.length&&(e.each(h,function(e,n){var i;t.items[n]||(i=d.file(n),i&&(r[n]=i.i18||i.name),t.items[n]=r[n]?r[n]:n)}),n=Object.keys(t.items).length,l=this.files(h),d.storage("hide",t),d.remove({removed:h}),t.show&&this.exec(void 0,{hide:!0}),u.hide||(c={},c.undo={cmd:"hide",callback:function(){var t=d.storage("hide");t&&(e.each(h,function(e,n){delete t.items[n]}),n=Object.keys(t.items).length,d.storage("hide",t),d.trigger("hide",{items:h,opts:{}}),o.update(n?0:-1)),d.updateCache({added:l}),d.add({added:l})}},c.redo={cmd:"hide",callback:function(){return d.exec("hide",void 0,{targets:h})}})),"rejected"==p.state()?p:p.resolve(c)}},(i.prototype.commands.home=function(){this.title="Home",this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+home ctrl+shift+up",description:"Home"}],this.getstate=function(){var e=this.fm.root(),t=this.fm.cwd().hash;return e&&t&&e!=t?0:-1},this.exec=function(){return this.fm.exec("open",this.fm.root())}}).prototype={forceLoad:!0},(i.prototype.commands.info=function(){var t=this.fm,n="elfinder-spinner",i="elfinder-info-button",a={calc:t.i18n("calc"),size:t.i18n("size"),unknown:t.i18n("unknown"),path:t.i18n("path"),aliasfor:t.i18n("aliasfor"),modify:t.i18n("modify"),perms:t.i18n("perms"),locked:t.i18n("locked"),dim:t.i18n("dim"),kind:t.i18n("kind"),files:t.i18n("files"),folders:t.i18n("folders"),roots:t.i18n("volumeRoots"),items:t.i18n("items"),yes:t.i18n("yes"),no:t.i18n("no"),link:t.i18n("link"),owner:t.i18n("owner"),group:t.i18n("group"),perm:t.i18n("perm"),getlink:t.i18n("getLink")},o=function(e,t){return t?e.replace(/\u200B/g,""):e.replace(/(\/|\\)/g,"$1​")};this.items=["size","aliasfor","path","link","dim","modify","perms","locked","owner","group","perm"],this.options.custom&&Object.keys(this.options.custom).length&&e.each(this.options.custom,function(e,t){t.label&&this.items.push(t.label)}),this.tpl={main:'<div class="ui-helper-clearfix elfinder-info-title {dirclass}"><span class="elfinder-cwd-icon {class} ui-corner-all"{style}/>{title}</div><table class="elfinder-info-tb">{content}</table>',itemTitle:'<strong>{name}</strong><span class="elfinder-info-kind">{kind}</span>',groupTitle:"<strong>{items}: {num}</strong>",row:'<tr><td class="elfinder-info-label">{label} : </td><td class="{class}">{value}</td></tr>',spinner:'<span>{text}</span> <span class="'+n+" "+n+'-{name}"/>'},this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+i"}],this.init=function(){e.each(a,function(e,n){a[e]=t.i18n(n)})},this.getstate=function(){return 0},this.exec=function(t){var r=this.files(t);r.length||(r=this.files([this.fm.cwd().hash]));var s,l,c,d,p,u,h,f,m,g=this,v=this.fm,b=this.options,y=this.tpl,w=y.row,x=r.length,k=[],C=y.main,z="{label}",T="{value}",A=[],S=null,I={title:v.i18n("selectionInfo"),width:"auto",close:function(){e(this).elfinderdialog("destroy"),S&&"pending"===S.state()&&S.reject(),e.grep(A,function(e){e&&"pending"===e.state()&&e.reject()})}},O=[],j=function(e,t,i){F.find("."+n+"-"+t).parent().html(e).addClass(i||"")},M=v.namespace+"-info-"+e.map(r,function(e){return e.hash}).join("-"),F=v.getUI().find("#"+M),D=[],E="",U="elfinder-font-mono elfinder-info-hash";if(!x)return e.Deferred().reject();if(F.length)return F.elfinderdialog("toTop"),e.Deferred().resolve();if(m=v.storage("infohides")||v.arrayFlip(b.hideItems,!0),1===x){if(c=r[0],c.icon&&(E=" "+v.getIconStyle(c)),C=C.replace("{dirclass}",c.csscls?v.escape(c.csscls):"").replace("{class}",v.mime2class(c.mime)).replace("{style}",E),d=y.itemTitle.replace("{name}",v.escape(c.i18||c.name)).replace("{kind}",'<span title="'+v.escape(c.mime)+'">'+v.mime2kind(c)+"</span>"),l=v.tmb(c),c.read?"directory"!=c.mime||c.alias?s=v.formatSize(c.size):(s=y.spinner.replace("{text}",a.calc).replace("{name}","size"),O.push(c.hash)):s=a.unknown,!m.size&&k.push(w.replace(z,a.size).replace(T,s)),!m.aleasfor&&c.alias&&k.push(w.replace(z,a.aliasfor).replace(T,c.alias)),m.path||((h=v.path(c.hash,!0))?k.push(w.replace(z,a.path).replace(T,o(v.escape(h))).replace("{class}","elfinder-info-path")):(k.push(w.replace(z,a.path).replace(T,y.spinner.replace("{text}",a.calc).replace("{name}","path")).replace("{class}","elfinder-info-path")),A.push(v.path(c.hash,!0,{notify:null}).fail(function(){j(a.unknown,"path")}).done(function(e){j(o(e),"path")})))),!m.link&&c.read){var P,R=v.escape(c.name);if("1"==c.url)k.push(w.replace(z,a.link).replace(T,'<button class="'+i+" "+n+'-url">'+a.getlink+"</button>"));else{if(c.url)P=c.url;else if("directory"===c.mime)if(b.nullUrlDirLinkSelf&&null===c.url){var q=window.location;P=q.pathname+q.search+"#elf_"+c.hash}else""!==c.url&&v.option("url",!v.isRoot(c)&&c.phash||c.hash)&&(P=v.url(c.hash));else P=v.url(c.hash);P&&k.push(w.replace(z,a.link).replace(T,'<a href="'+P+'" target="_blank">'+R+"</a>"))}}m.dim||(c.dim?k.push(w.replace(z,a.dim).replace(T,c.dim)):c.mime.indexOf("image")!==-1&&(c.width&&c.height?k.push(w.replace(z,a.dim).replace(T,c.width+"x"+c.height)):(k.push(w.replace(z,a.dim).replace(T,y.spinner.replace("{text}",a.calc).replace("{name}","dim"))),A.push(v.request({data:{cmd:"dim",target:c.hash},preventDefault:!0}).fail(function(){j(a.unknown,"dim")}).done(function(e){if(j(e.dim||a.unknown,"dim"),e.dim){var t=e.dim.split("x"),n=v.file(c.hash);n.width=t[0],n.height=t[1]}}))))),!m.modify&&k.push(w.replace(z,a.modify).replace(T,v.formatDate(c))),!m.perms&&k.push(w.replace(z,a.perms).replace(T,v.formatPermissions(c))),!m.locked&&k.push(w.replace(z,a.locked).replace(T,c.locked?a.yes:a.no)),!m.owner&&c.owner&&k.push(w.replace(z,a.owner).replace(T,c.owner)),!m.group&&c.group&&k.push(w.replace(z,a.group).replace(T,c.group)),!m.perm&&c.perm&&k.push(w.replace(z,a.perm).replace(T,v.formatFileMode(c.perm))),window.ArrayBuffer&&(v.options.cdns.sparkmd5||v.options.cdns.jssha)&&"directory"!==c.mime&&c.size>0&&(!b.showHashMaxsize||c.size<=b.showHashMaxsize)&&(f=[],e.each(v.storage("hashchekcer")||b.showHashAlgorisms,function(e,t){c[t]?k.push(w.replace(z,v.i18n(t)).replace(T,c[t]).replace("{class}",U)):(k.push(w.replace(z,v.i18n(t)).replace(T,y.spinner.replace("{text}",a.calc).replace("{name}",t))),f.push(t))}),A.push(v.getContentsHashes(c.hash,f).progress(function(t){e.each(f,function(e,n){t[n]&&j(t[n],n,U)})}).always(function(){e.each(f,function(e,t){j(a.unknown,t)})}))),b.custom&&e.each(b.custom,function(t,n){m[n.label]||n.mimes&&!e.grep(n.mimes,function(e){return c.mime===e||0===c.mime.indexOf(e+"/")}).length||n.hashRegex&&!c.hash.match(n.hashRegex)||(k.push(w.replace(z,v.i18n(n.label)).replace(T,n.tpl.replace("{id}",M))),
21
- n.action&&"function"==typeof n.action&&D.push(n.action))})}else C=C.replace("{class}","elfinder-cwd-icon-group"),d=y.groupTitle.replace("{items}",a.items).replace("{num}",x),p=e.grep(r,function(e){return"directory"==e.mime}).length,p?(u=e.grep(r,function(e){return!("directory"!==e.mime||e.phash&&!e.isroot)}).length,p-=u,k.push(w.replace(z,a.kind).replace(T,u===x||p===x?a[u?"roots":"folders"]:e.map({roots:u,folders:p,files:x-u-p},function(e,t){return e?a[t]+" "+e:null}).join(", "))),!m.size&&k.push(w.replace(z,a.size).replace(T,y.spinner.replace("{text}",a.calc).replace("{name}","size"))),O=e.map(r,function(e){return e.hash})):(s=0,e.each(r,function(e,t){var n=parseInt(t.size);n>=0&&s>=0?s+=n:s="unknown"}),k.push(w.replace(z,a.kind).replace(T,a.files)),!m.size&&k.push(w.replace(z,a.size).replace(T,v.formatSize(s))));return C=C.replace("{title}",d).replace("{content}",k.join("").replace(/{class}/g,"")),F=g.fmDialog(C,I),F.attr("id",M).one("mousedown",".elfinder-info-path",function(){e(this).html(o(e(this).html(),!0))}),v.UA.Mobile&&e.fn.tooltip&&F.children(".ui-dialog-content .elfinder-info-title").tooltip({classes:{"ui-tooltip":"elfinder-ui-tooltip ui-widget-shadow"},tooltipClass:"elfinder-ui-tooltip ui-widget-shadow",track:!0}),c&&"1"==c.url&&F.on("click","."+n+"-url",function(){e(this).parent().html(y.spinner.replace("{text}",v.i18n("ntfurl")).replace("{name}","url")),v.request({data:{cmd:"url",target:c.hash},preventDefault:!0}).fail(function(){j(R,"url")}).done(function(e){if(e.url){j('<a href="'+e.url+'" target="_blank">'+R+"</a>"||R,"url");var t=v.file(c.hash);t.url=e.url}else j(R,"url")})}),l&&e("<img/>").on("load",function(){F.find(".elfinder-cwd-icon").addClass(l.className).css("background-image","url('"+l.url+"')")}).attr("src",l.url),O.length&&(S=v.getSize(O).done(function(e){j(e.formated,"size")}).fail(function(){j(a.unknown,"size")})),D.length&&e.each(D,function(e,t){try{t(c,v,F)}catch(n){v.debug("error",n)}}),e.Deferred().resolve()}}).prototype={forceLoad:!0},i.prototype.commands.mkdir=function(){var t,n=this.fm,i=this;this.value="",this.disableOnSearch=!0,this.updateOnSelect=!1,this.syncTitleOnChange=!0,this.mime="directory",this.prefix="untitled folder",this.exec=function(a,o){var r;return a&&a.length&&o&&o._currentType&&"navbar"===o._currentType?(this.origin=o._currentType,this.data={target:a[0]}):(r=n.cwd().hash===a[0],this.origin=t&&!r?t:"cwd",delete this.data),a||this.options.intoNewFolderToolbtn||n.getUI("cwd").trigger("unselectall"),this.move=this.value===n.i18n("cmdmkdirin"),e.proxy(n.res("mixin","make"),i)()},this.shortcuts=[{pattern:"ctrl+shift+n"}],this.init=function(){this.options.intoNewFolderToolbtn&&(this.syncTitleOnChange=!0)},n.bind("select contextmenucreate closecontextmenu",function(e){var a=(e.data?e.data.selected||e.data.targets:null)||n.selected();i.className="mkdir",t=e.data&&a.length?e.data.origin||e.data.type||"":"",i.options.intoNewFolderToolbtn||""!==t||(t="cwd"),a.length&&"navbar"!==t&&"cwd"!==t&&n.cwd().hash!==a[0]?(i.title=n.i18n("cmdmkdirin"),i.className+=" elfinder-button-icon-mkdirin"):i.title=n.i18n("cmdmkdir"),"closecontextmenu"!==e.type?i.update(void 0,i.title):requestAnimationFrame(function(){i.update(void 0,i.title)})}),this.getstate=function(i){var a=n.cwd(),o="navbar"===t||i&&i[0]!==a.hash?this.files(i||n.selected()):[],r=o.length;return"navbar"===t?r&&o[0].write&&o[0].read?0:-1:!a.write||r&&e.grep(o,function(e){return!(!e.read||e.locked)}).length!=r?-1:0}},i.prototype.commands.mkfile=function(){var t=this;this.disableOnSearch=!0,this.updateOnSelect=!1,this.mime="text/plain",this.prefix="untitled file.txt",this.variants=[],this.getTypeName=function(e,n){var i,a=t.fm;return i=(i=a.messages["kind"+a.kinds[e]])?a.i18n(["extentiontype",n.toUpperCase(),i]):a.i18n(["extentionfile",n.toUpperCase()])},this.fm.bind("open reload canMakeEmptyFile",function(){var n=t.fm,i=n.storage("mkfileHides")||{};t.variants=[],n.mimesCanMakeEmpty&&e.each(n.mimesCanMakeEmpty,function(e,a){a&&!i[e]&&n.uploadMimeCheck(e)&&t.variants.push([e,t.getTypeName(e,a)])}),t.change()}),this.getstate=function(){return this.fm.cwd().write?0:-1},this.exec=function(n,i){var a,o,r=t.fm;if(a=r.mimesCanMakeEmpty[i]){if(r.uploadMimeCheck(i))return this.mime=i,this.prefix=r.i18n(["untitled file",a]),e.proxy(r.res("mixin","make"),t)();o=["errMkfile",t.getTypeName(i,a)]}return e.Deferred().reject(o)}},i.prototype.commands.netmount=function(){var t,n=this,i=!1;this.alwaysEnabled=!0,this.updateOnSelect=!1,this.drivers=[],this.handlers={load:function(){var t=n.fm;n.drivers=t.netDrivers,n.drivers.length&&requestAnimationFrame(function(){e.each(n.drivers,function(){var e=n.options[this];e&&(i=!0,e.integrateInfo&&t.trigger("helpIntegration",Object.assign({cmd:"netmount"},e.integrateInfo)))})})}},this.getstate=function(){return i?0:-1},this.exec=function(){var i,a=n.fm,o=e.Deferred(),r=n.options,s=function(){var s,l=function(){c.protocol.trigger("change","winfocus")},c={protocol:e("<select/>").on("change",function(e,n){var o=this.value;t.find(".elfinder-netmount-tr").hide(),t.find(".elfinder-netmount-tr-"+o).show(),i&&i.children(".ui-dialog-buttonpane:first").find("button").show(),"function"==typeof r[o].select&&r[o].select(a,e,n),requestAnimationFrame(function(){t.find("input:text.elfinder-tabstop:visible:first").trigger("focus")})}).addClass("ui-corner-all")},d={title:a.i18n("netMountDialogTitle"),resizable:!1,modal:!0,destroyOnClose:!1,open:function(){e(window).on("focus."+a.namespace,l),c.protocol.trigger("change")},close:function(){"pending"==o.state()&&o.reject(),e(window).off("focus."+a.namespace,l)},buttons:{}},p=function(){var i=c.protocol.val(),s={cmd:"netmount",protocol:i},l=r[i];return e.each(t.find("input.elfinder-netmount-inputs-"+i),function(t,n){var i,a;a=e(n),a.is(":radio,:checkbox")?a.is(":checked")&&(i=e.trim(a.val())):i=e.trim(a.val()),i&&(s[n.name]=i)}),s.host?(a.request({data:s,notify:{type:"netmount",cnt:1,hideCnt:!0}}).done(function(e){var t;e.added&&e.added.length&&(e.added[0].phash&&(t=a.file(e.added[0].phash))&&(t.dirs||(t.dirs=1,a.change({changed:[t]}))),a.one("netmountdone",function(){a.exec("open",e.added[0].hash)})),o.resolve()}).fail(function(e){l.fail&&"function"==typeof l.fail&&l.fail(a,a.parseError(e)),o.reject(e)}),void n.dialog.elfinderdialog("close")):a.trigger("error",{error:"errNetMountHostReq",opts:{modal:!0}})},u=e('<form autocomplete="off"/>').on("keydown","input",function(t){var n,i=!0;t.keyCode===e.ui.keyCode.ENTER&&(e.each(u.find("input:visible:not(.elfinder-input-optional)"),function(){if(""===e(this).val())return i=!1,n=e(this),!1}),i?p():n.trigger("focus"))}),h=e("<div/>");return t=e('<table class="elfinder-info-tb elfinder-netmount-tb"/>').append(e("<tr/>").append(e("<td>"+a.i18n("protocol")+"</td>")).append(e("<td/>").append(c.protocol))),e.each(n.drivers,function(n,i){r[i]&&(c.protocol.append('<option value="'+i+'">'+a.i18n(r[i].name||i)+"</option>"),e.each(r[i].inputs,function(n,o){o.attr("name",n),"hidden"!=o.attr("type")?(o.addClass("ui-corner-all elfinder-netmount-inputs-"+i),t.append(e("<tr/>").addClass("elfinder-netmount-tr elfinder-netmount-tr-"+i).append(e("<td>"+a.i18n(n)+"</td>")).append(e("<td/>").append(o)))):(o.addClass("elfinder-netmount-inputs-"+i),h.append(o))}),r[i].protocol=c.protocol)}),t.append(h),t.find(".elfinder-netmount-tr").hide(),d.buttons[a.i18n("btnMount")]=p,d.buttons[a.i18n("btnCancel")]=function(){n.dialog.elfinderdialog("close")},t.find("select,input").addClass("elfinder-tabstop"),s=n.fmDialog(u.append(t),d),i=s.closest(".ui-dialog"),s.ready(function(){c.protocol.trigger("change"),s.elfinderdialog("posInit")}),s};return n.dialog?n.dialog.elfinderdialog("open"):n.dialog=s(),o.promise()},n.fm.bind("netmount",function(e){var i=e.data||null,a=n.options;i&&i.protocol&&a[i.protocol]&&"function"==typeof a[i.protocol].done&&(a[i.protocol].done(n.fm,i),t.find("select,input").addClass("elfinder-tabstop"),n.dialog.elfinderdialog("tabstopsInit"))})},i.prototype.commands.netunmount=function(){this.alwaysEnabled=!0,this.updateOnSelect=!1,this.drivers=[],this.handlers={load:function(){this.drivers=this.fm.netDrivers}},this.getstate=function(e){var t,n=this.fm;return e&&this.drivers.length&&!this._disabled&&(t=n.file(e[0]))&&t.netkey?0:-1},this.exec=function(t){var n=this,i=this.fm,a=e.Deferred().fail(function(e){e&&i.error(e)}),o=i.file(t[0]),r=function(t){var n,a=[];return i.leafRoots&&(n=[],e.each(i.leafRoots,function(a,o){var r,s=i.parents(a);(r=e.inArray(t,s))!==-1&&(r=s.length-r,e.each(o,function(e,t){n.push({i:r,hash:t})}))}),n.length&&(n.sort(function(e,t){return e.i<t.i}),e.each(n,function(e,t){a.push(t.hash)}))),a};return this._disabled?a.reject():("pending"==a.state()&&i.confirm({title:n.title,text:i.i18n("confirmUnmount",o.name),accept:{label:"btnUnmount",callback:function(){var t=o.hash,s=r(t),l=[],c=[],d=function(){e.when(l).done(function(){i.request({data:{cmd:"netmount",protocol:"netunmount",host:o.netkey,user:t,pass:"dum"},notify:{type:"netunmount",cnt:1,hideCnt:!0},preventFail:!0}).fail(function(e){a.reject(e)}).done(function(e){o.volumeid&&delete i.volumeExpires[o.volumeid],a.resolve()})}).fail(function(e){c.length&&i.remove({removed:c}),a.reject(e)})};s.length?i.confirm({title:n.title,text:function(){var t=["unmountChildren"];return e.each(s,function(e,n){t.push([i.file(n).name])}),t}(),accept:{label:"btnUnmount",callback:function(){e.each(s,function(e,t){var n=i.file(t);n.netkey&&l.push(i.request({data:{cmd:"netmount",protocol:"netunmount",host:n.netkey,user:n.hash,pass:"dum"},notify:{type:"netunmount",cnt:1,hideCnt:!0},preventDefault:!0}).done(function(e){e.removed&&(n.volumeid&&delete i.volumeExpires[n.volumeid],c=c.concat(e.removed))}))}),d()}},cancel:{label:"btnCancel",callback:function(){a.reject()}}}):(l=null,d())}},cancel:{label:"btnCancel",callback:function(){a.reject()}}}),a)}},(i.prototype.commands.open=function(){var t=this.fm;this.alwaysEnabled=!0,this.noChangeDirOnRemovedCwd=!0,this._handlers={dblclick:function(e){e.preventDefault(),t.exec("open",e.data&&e.data.file?[e.data.file]:void 0)},"select enable disable reload":function(e){this.update("disable"==e.type?-1:void 0)}},this.shortcuts=[{pattern:"ctrl+down numpad_enter"+("mac"!=t.OS&&" enter")}],this.getstate=function(n){var i=this.files(n),a=i.length;return 1==a?i[0].read?0:-1:a&&!t.UA.Mobile&&e.grep(i,function(e){return!("directory"==e.mime||!e.read)}).length==a?0:-1},this.exec=function(n,i){var a,o,r,s,l,c,d,p,u,h,f,m,g,v,b=e.Deferred().fail(function(e){e&&t.error(e)}),y=this.files(n),w=y.length,x="object"==typeof i&&i.thash,k=this.options,C=k.into||"window";if(!w&&!x)return b.reject();if(x||1==w&&(a=y[0])&&"directory"==a.mime)return x||!a||a.read?t.keyState.ctrlKey&&(t.keyState.shiftKey||"function"!=typeof t.options.getFileCallback)&&t.getCommand("opennew")?t.exec("opennew",[x?x:a.hash]):t.request({data:{cmd:"open",target:x||a.hash},notify:{type:"open",cnt:1,hideCnt:!0},syncOnFail:!0,lazy:!1}):b.reject(["errOpen",a.name,"errPerm"]);if(y=e.grep(y,function(e){return"directory"!=e.mime}),w!=y.length)return b.reject();var z=function(){var i,g,v;try{u=new RegExp(t.option("dispInlineRegex"),"i")}catch(x){u=!1}for(h=e("<a>").hide().appendTo(e("body")),f="string"==typeof h.get(0).download,w=y.length;w--;){if(g="elf_open_window",a=y[w],!a.read)return b.reject(["errOpen",a.name,"errPerm"]);if(m=u&&a.mime.match(u),o=t.openUrl(a.hash,!m),t.UA.Mobile||!m){if(f)m?h.attr("target","_blank"):h.attr("download",a.name),h.attr("href",o).get(0).click();else if(i=window.open(o),!i)return b.reject("errPopup")}else{if(v="string"==typeof k.method&&"get"===k.method.toLowerCase(),!v&&0===o.indexOf(t.options.url)&&t.customData&&Object.keys(t.customData).length&&!a.mime.match(/^(?:video|audio)/)&&(o=""),"window"===C?(l=d=Math.round(2*screen.availWidth/3),c=p=Math.round(2*screen.availHeight/3),parseInt(a.width)&&parseInt(a.height)?(l=parseInt(a.width),c=parseInt(a.height)):a.dim&&(r=a.dim.split("x"),l=parseInt(r[0]),c=parseInt(r[1])),d>=l&&p>=c?(d=l,p=c):l-d>c-p?p=Math.round(c*(d/l)):d=Math.round(l*(p/c)),s="width="+d+",height="+p,i=window.open(o,g,s+",top=50,left=50,scrollbars=yes,resizable=yes,titlebar=no")):("tabs"===C&&(g=a.hash),i=window.open("about:blank",g)),!i)return b.reject("errPopup");if(""===o){var z=document.createElement("form");z.action=t.options.url,z.method="POST",z.target=g,z.style.display="none";var T=Object.assign({},t.customData,{cmd:"file",target:a.hash,_t:a.ts||parseInt(+new Date/1e3)});e.each(T,function(e,t){var n=document.createElement("input");n.name=e,n.value=t,z.appendChild(n)}),document.body.appendChild(z),z.submit()}else"window"!==C&&(i.location=o);e(i).trigger("focus")}}return h.remove(),b.resolve(n)};if(w>1)t.confirm({title:"openMulti",text:["openMultiConfirm",w+""],accept:{label:"cmdopen",callback:function(){z()}},cancel:{label:"btnCancel",callback:function(){b.reject()}},buttons:t.getCommand("zipdl")&&t.isCommandEnabled("zipdl",t.cwd().hash)?[{label:"cmddownload",callback:function(){t.exec("download",n),b.reject()}}]:[]});else{if(g=t.storage("selectAction")||k.selectAction,g&&(e.each(g.split("/"),function(){var e=this.valueOf();return("open"===e||!(v=t.getCommand(e))||!v.enabled())&&void(v=null)}),v))return t.exec(v.name);z()}return b}}).prototype={forceLoad:!0},i.prototype.commands.opendir=function(){this.alwaysEnabled=!0,this.getstate=function(){var e,t=this.fm.selected(),n=t.length;return 1!==n?-1:(e=this.fm.getUI("workzone"),e.hasClass("elfinder-search-result")?0:-1)},this.exec=function(t){var n,i=this.fm,a=e.Deferred(),o=this.files(t),r=o.length;return r&&o[0].phash?(n=o[0].phash,i.trigger("searchend",{noupdate:!0}),i.request({data:{cmd:"open",target:n},notify:{type:"open",cnt:1,hideCnt:!0},syncOnFail:!1}),a):a.reject()}},i.prototype.commands.opennew=function(){var t=this.fm;this.shortcuts=[{pattern:("function"==typeof t.options.getFileCallback?"shift+":"")+"ctrl+enter"}],this.getstate=function(e){var t=this.files(e),n=t.length;return 1===n&&"directory"===t[0].mime&&t[0].read?0:-1},this.exec=function(t){var n,i,a,o,r=e.Deferred(),s=this.files(t),l=s.length,c=this.options;return 1===l&&(n=s[0])&&"directory"===n.mime?(i=window.location,a=c.url?c.url:i.pathname,c.useOriginQuery&&(a.match(/\?/)?i.search&&(a+="&"+i.search.substr(1)):a+=i.search),a+="#elf_"+n.hash,o=window.open(a,"_blank"),setTimeout(function(){o.focus()},1e3),r.resolve()):r.reject()}},i.prototype.commands.paste=function(){this.updateOnSelect=!1,this.handlers={changeclipboard:function(){this.update()}},this.shortcuts=[{pattern:"ctrl+v shift+insert"}],this.getstate=function(e){if(this._disabled)return-1;if(e){if(Array.isArray(e)){if(1!=e.length)return-1;e=this.fm.file(e[0])}}else e=this.fm.cwd();return this.fm.clipboard().length&&"directory"==e.mime&&e.write?0:-1},this.exec=function(t,n){var i,a,o=this,r=o.fm,s=n||{},l=t?this.files(t)[0]:r.cwd(),c=r.clipboard(),d=c.length,p=!!d&&c[0].cut,u=s._cmd?s._cmd:p?"move":"copy",h="err"+u.charAt(0).toUpperCase()+u.substr(1),f=[],m=[],g=e.Deferred().fail(function(e){e&&r.error(e)}).always(function(){r.unlockfiles({files:e.map(c,function(e){return e.hash})})}),v=function(t){return t.length&&r._commands.duplicate?r.exec("duplicate",t):e.Deferred().resolve()},b=function(t){var n,i=e.Deferred(),a=[],c={},d=function(t,n){for(var i=[],a=t.length;a--;)e.inArray(t[a].name,n)!==-1&&i.unshift(a);return i},h=function(e){var n=a[e],o=t[n],s=e==a.length-1;o&&r.confirm({title:r.i18n(u+"Files"),text:["errExists",o.name,"restore"===u?"confirmRest":"confirmRepl"],all:!s,accept:{label:"btnYes",callback:function(n){s||n?m(t):h(++e)}},reject:{label:"btnNo",callback:function(n){var i;if(n)for(i=a.length;e<i--;)t[a[i]].remove=!0;else t[a[e]].remove=!0;s||n?m(t):h(++e)}},cancel:{label:"btnCancel",callback:function(){i.resolve()}},buttons:[{label:"btnBackup",callback:function(n){var i;if(n)for(i=a.length;e<i--;)t[a[i]].rename=!0;else t[a[e]].rename=!0;s||n?m(t):h(++e)}}]})},f=function(n){var i,o={};n&&(Array.isArray(n)?n.length&&("string"==typeof n[0]?a=d(t,n):(e.each(n,function(e,t){o[t.name]=t.hash}),a=d(t,e.map(o,function(e,t){return t})),e.each(t,function(e,t){o[t.name]&&(c[o[t.name]]=t.name)}))):(i=[],a=e.map(n,function(e){return"string"==typeof e?e:(i=i.concat(e),!1)}),i.length&&(a=a.concat(i)),a=d(t,a),c=n)),a.length?h(0):m(t)},m=function(t){var n,a,o=[],d=e.grep(t,function(e){return e.rename&&o.push(e.name),!e.remove}),h=d.length;return h?(n=e.map(d,function(e){return e.hash}),a={cmd:"paste",dst:l.hash,targets:n,cut:p?1:0,renames:o,hashes:c,suffix:r.options.backupSuffix},r.api<2.1&&(a.src=d[0].phash),void r.request({data:a,notify:{type:u,cnt:h},navigate:{toast:s.noToast?{}:{inbuffer:{msg:r.i18n(["complete",r.i18n("cmd"+u)]),action:{cmd:"open",msg:"cmdopendir",data:[l.hash],done:"select",cwdNot:l.hash}}}}}).done(function(t){var n={},o=t.added&&t.added.length?t.added:null;p&&o&&(e.each(d,function(t,i){var a=i.phash,r=function(t){var n;return e.each(o,function(e,i){if(i.name===t)return n=i.hash,!1}),n},s=r(i.name);s&&(n[a]?n[a].push(s):n[a]=[s])}),Object.keys(n).length&&(t.undo={cmd:"move",callback:function(){var t=[];return e.each(n,function(e,n){t.push(r.request({data:{cmd:"paste",dst:e,targets:n,cut:1},notify:{type:"undo",cnt:n.length}}))}),e.when.apply(null,t)}},t.redo={cmd:"move",callback:function(){return r.request({data:a,notify:{type:"redo",cnt:h}})}})),i.resolve(t)}).fail(function(){i.reject()}).always(function(){r.unlockfiles({files:d})})):i.resolve()};return r.isCommandEnabled(o.name,l.hash)&&t.length?(r.oldAPI?m(t):r.option("copyOverwrite",l.hash)?(n=e.map(t,function(e){return e.name}),l.hash==r.cwd().hash?f(e.map(r.files(),function(e){return e.phash==l.hash?{hash:e.hash,name:e.name}:null})):r.request({data:{cmd:"ls",target:l.hash,intersect:n},notify:{type:"prepare",cnt:1,hideCnt:!0},preventFail:!0}).always(function(e){f(e.list)})):m(t),i):i.resolve()};return d&&l&&"directory"==l.mime?l.write?(i=r.parents(l.hash),e.each(c,function(t,n){return n.read?p&&n.locked?!g.reject(["errLocked",n.name]):e.inArray(n.hash,i)!==-1?!g.reject(["errCopyInItself",n.name]):n.mime&&"directory"!==n.mime&&!r.uploadMimeCheck(n.mime,l.hash)?!g.reject([h,n.name,"errUploadMime"]):(a=r.parents(n.hash),a.pop(),e.inArray(l.hash,a)!==-1&&e.grep(a,function(e){var t=r.file(e);return t.phash==l.hash&&t.name==n.name}).length?!g.reject(["errReplByChild",n.name]):void(n.phash==l.hash?m.push(n.hash):f.push({hash:n.hash,phash:n.phash,name:n.name}))):!g.reject([h,n.name,"errPerm"])}),"rejected"==g.state()?g:(e.when(v(m),b(f)).done(function(e,t){g.resolve(t&&t.undo?t:void 0)}).fail(function(){g.reject()}).always(function(){p&&r.clipboard([])}),g)):g.reject([h,c[0].name,"errPerm"]):g.reject()}},i.prototype.commands.places=function(){var t=this,n=this.fm,i=function(n){return e.grep(t.files(n),function(e){return"directory"==e.mime})},a=null;this.getstate=function(e){var t=this.hashes(e),n=t.length;return a&&n&&n==i(t).length?0:-1},this.exec=function(t){var n=this.files(t);return a.trigger("regist",[n]),e.Deferred().resolve()},n.one("load",function(){a=n.ui.places})},i.prototype.commands.preference=function(){var t,n,i=this,a=this.fm,o="replace",r='<li class="'+a.res("class","tabstab")+' elfinder-preference-tab-{id}"><a href="#'+a.namespace+'-preference-{id}" id="'+a.namespace+'-preference-tab-{id}" class="ui-tabs-anchor {class}">{title}</a></li>',s=e('<div class="ui-tabs ui-widget ui-widget-content ui-corner-all elfinder-preference">'),l=e('<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-top">'),c=e('<div class="elfinder-preference-tabs ui-tabs-panel ui-widget-content ui-corner-bottom"/>'),d=(e("base").length?document.location.href.replace(/#.*$/,""):"",function(t){e("#"+a.namespace+"-preference-tab-"+t).trigger("mouseover").trigger("click"),n=t}),p=a.res("class","tabsactive"),u=function(){var u=i.options.categories||{language:["language"],theme:["theme"],toolbar:["toolbarPref"],workspace:["iconSize","columnPref","selectAction","makefileTypes","useStoredEditor","editorMaximized","useFullscreen","showHidden"],dialog:["autoFocusDialog"],selectionInfo:["infoItems","hashChecker"],reset:["clearBrowserData"],all:!0},h=i.options.prefs||["language","theme","toolbarPref","iconSize","columnPref","selectAction","makefileTypes","useStoredEditor","editorMaximized","useFullscreen","showHidden","infoItems","hashChecker","autoFocusDialog","clearBrowserData"];h=a.arrayFlip(h,!0),a.options.getFileCallback&&delete h.selectAction,h.language&&(h.language=function(){var t=e("<select/>").on("change",function(){var t=e(this).val();a.storage("lang",t),e("#"+a.id).elfinder("reload")}),n=[],o=i.options.langs||{ar:"اللغة العربية",bg:"Български",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",el:"Ελληνικά",en:"English",es:"Español",fa:"فارسی",fo:"Føroyskt",fr:"Français",he:"עברית",hr:"Hrvatski",hu:"Magyar",id:"Bahasa Indonesia",it:"Italiano",ja:"日本語",ko:"한국어",nl:"Nederlands",no:"Norsk",pl:"Polski",pt_BR:"Português",ro:"Română",ru:"Pусский",si:"සිංහල",sk:"Slovenčina",sl:"Slovenščina",sr:"Srpski",sv:"Svenska",tr:"Türkçe",ug_CN:"ئۇيغۇرچە",uk:"Український",vi:"Tiếng Việt",zh_CN:"简体中文",zh_TW:"正體中文"};return e.each(o,function(e,t){n.push('<option value="'+e+'">'+t+"</option>")}),t.append(n.join("")).val(a.lang)}()),h.theme&&(h.theme=function(){var t=a.options.themes?Object.keys(a.options.themes).length:0;if(0===t||1===t&&a.options.themes["default"])return null;var n=e("<select/>").on("change",function(){var t=e(this).val();a.changeTheme(t).storage("theme",t)}),i={image:'<img class="elfinder-preference-theme elfinder-preference-theme-image" src="$2" />',link:'<a href="$1" target="_blank" title="$3">$2</a>',data:'<dt>$1</dt><dd><span class="elfinder-preference-theme elfinder-preference-theme-$0">$2</span></dd>'},o=["image","description","author","email","license"],r=e('<button class="ui-button ui-corner-all ui-widget elfinder-preference-theme-default"/>').text(a.i18n("default")).on("click",function(e){n.val("default").trigger("change")}),s=e('<div class="elfinder-reference-hide-taball"/>').on("click","button",function(){var t=e(this).data("themeid");n.val(t).trigger("change")});return a.options.themes["default"]||n.append('<option value="default">'+a.i18n("default")+"</option>"),e.each(a.options.themes,function(t,r){var l,c=e('<option class="elfinder-theme-option-'+t+'" value="'+t+'">'+a.i18n(t)+"</option>"),d=e('<fieldset class="ui-widget ui-widget-content ui-corner-all elfinder-theme-list-'+t+'"><legend>'+a.i18n(t)+'</legend><div><span class="elfinder-spinner"/></div></fieldset>');n.append(c),s.append(d),l=setTimeout(function(){d.find("span.elfinder-spinner").replaceWith(a.i18n(["errRead",t]))},1e4),a.getTheme(t).always(function(){l&&clearTimeout(l)}).done(function(r){var s,l=e(),p=e("<dl/>");s=r.link?i.link.replace(/\$1/g,r.link).replace(/\$3/g,a.i18n("website")):"$2",r.name&&c.html(a.i18n(r.name)),d.children("legend").html(s.replace(/\$2/g,a.i18n(r.name)||t)),e.each(o,function(o,s){var l,c=i[s]||i.data;r[s]&&(l=c.replace(/\$0/g,a.escape(s)).replace(/\$1/g,a.i18n(s)).replace(/\$2/g,a.i18n(r[s])),"image"===s&&r.link&&(l=e(l).on("click",function(){n.val(t).trigger("change")}).attr("title",a.i18n("select"))),p.append(l))}),l=l.add(p),l=l.add(e('<div class="elfinder-preference-theme-btn"/>').append(e('<button class="ui-button ui-corner-all ui-widget"/>').data("themeid",t).html(a.i18n("select")))),d.find("span.elfinder-spinner").replaceWith(l)}).fail(function(){d.find("span.elfinder-spinner").replaceWith(a.i18n(["errRead",t]))})}),e("<div/>").append(n.val(a.theme&&a.theme.id?a.theme.id:"default"),r,s)}()),h.toolbarPref&&(h.toolbarPref=function(){var t=e.map(a.options.uiOptions.toolbar,function(t){return e.isArray(t)?t:null}),n=[],i=a.storage("toolbarhides")||{};return e.each(t,function(){var e=this,t=a.i18n("cmd"+e);t==="cmd"+e&&(t=a.i18n(e)),n.push('<span class="elfinder-preference-toolbar-item"><label><input type="checkbox" value="'+e+'" '+(i[e]?"":"checked")+"/>"+t+"</label></span>")}),e(n.join(" ")).on("change","input",function(){var t=e(this).val(),n=e(this).is(":checked");n||i[t]?n&&i[t]&&delete i[t]:i[t]=!0,a.storage("toolbarhides",i),a.trigger("toolbarpref")})}()),h.iconSize&&(h.iconSize=function(){var t=a.options.uiOptions.cwd.iconsView.sizeMax||3,n=a.storage("iconsize")||0,i=e('<div class="touch-punch"/>').slider({classes:{"ui-slider-handle":"elfinder-tabstop"},value:n,max:t,slide:function(e,t){a.getUI("cwd").trigger("iconpref",{size:t.value})},change:function(e,t){a.storage("iconsize",t.value)}});return a.getUI("cwd").on("iconpref",function(e,t){i.slider("option","value",t.size)}),i}()),h.columnPref&&(h.columnPref=function(){var t=a.options.uiOptions.cwd.listView.columns,n=[],i=a.storage("columnhides")||{};return e.each(t,function(){var e=this,t=a.getColumnName(e);n.push('<span class="elfinder-preference-column-item"><label><input type="checkbox" value="'+e+'" '+(i[e]?"":"checked")+"/>"+t+"</label></span>")}),e(n.join(" ")).on("change","input",function(){var t=e(this).val(),n=e(this).is(":checked");n||i[t]?n&&i[t]&&delete i[t]:i[t]=!0,a.storage("columnhides",i),a.trigger("columnpref",{repaint:!0})})}()),h.selectAction&&(h.selectAction=function(){var t=e("<select/>").on("change",function(){var t=e(this).val();a.storage("selectAction","default"===t?null:t)}),n=[],o=i.options.selectActions,r=a.getCommand("open").options.selectAction||"open";return e.inArray(r,o)===-1&&o.unshift(r),e.each(o,function(t,i){var o=e.map(i.split("/"),function(e){var t=a.i18n("cmd"+e);return t==="cmd"+e&&(t=a.i18n(e)),t});n.push('<option value="'+i+'">'+o.join("/")+"</option>")}),t.append(n.join("")).val(a.storage("selectAction")||r)}()),h.makefileTypes&&(h.makefileTypes=function(){var t=a.storage("mkfileHides")||{},n=function(){var n=[];return t=a.storage("mkfileHides")||{},e.each(a.mimesCanMakeEmpty,function(e,i){var o=a.getCommand("mkfile").getTypeName(e,i);n.push('<span class="elfinder-preference-column-item" title="'+a.escape(o)+'"><label><input type="checkbox" value="'+e+'" '+(t[e]?"":"checked")+"/>"+i+"</label></span>")}),n.join(" ")},i=e("<div/>").on("change","input",function(){var n=e(this).val(),i=e(this).is(":checked");i||t[n]?i&&t[n]&&delete t[n]:t[n]=!0,a.storage("mkfileHides",t),a.trigger("canMakeEmptyFile")}).append(n()),o=e("<div/>").append(e('<input type="text" placeholder="'+a.i18n("typeOfTextfile")+'"/>').on("keydown",function(t){t.keyCode===e.ui.keyCode.ENTER&&e(this).next().trigger("click")}),e('<button class="ui-button"/>').html(a.i18n("add")).on("click",function(){var t,n=e(this).prev(),i=n.val(),o=a.getUI("toast"),r=function(){return o.appendTo(n.closest(".ui-dialog")),a.toast({msg:a.i18n("errUsupportType"),mode:"warning",onHidden:function(){1===o.children().length&&o.appendTo(a.getUI())}}),n.trigger("focus"),!1};if(!i.match(/\//)){if(i=a.arrayFlip(a.mimeTypes)[i],!i)return r();n.val(i)}return a.mimeIsText(i)&&a.mimeTypes[i]?(a.trigger("canMakeEmptyFile",{mimes:[i],unshift:!0}),t={},t[i]=a.mimeTypes[i],a.storage("mkfileTextMimes",Object.assign(t,a.storage("mkfileTextMimes")||{})),n.val(""),o.appendTo(n.closest(".ui-dialog")),void a.toast({msg:a.i18n(["complete",i+" ("+t[i]+")"]),onHidden:function(){1===o.children().length&&o.appendTo(a.getUI())}})):r()}),e('<button class="ui-button"/>').html(a.i18n("reset")).on("click",function(){a.one("canMakeEmptyFile",{done:function(){i.empty().append(n())}}),a.trigger("canMakeEmptyFile",{resetTexts:!0})}));return a.bind("canMakeEmptyFile",{done:function(e){e.data&&e.data.mimes&&e.data.mimes.length&&i.empty().append(n())}}),e("<div/>").append(i,o)}()),h.useStoredEditor&&(h.useStoredEditor=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("useStoredEditor");return e?e>0:a.options.commandsOptions.edit.useStoredEditor}()).on("change",function(t){a.storage("useStoredEditor",e(this).is(":checked")?1:-1)})),h.editorMaximized&&(h.editorMaximized=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("editorMaximized");return e?e>0:a.options.commandsOptions.edit.editorMaximized}()).on("change",function(t){a.storage("editorMaximized",e(this).is(":checked")?1:-1)})),a.UA.Fullscreen&&h.useFullscreen&&(h.useFullscreen=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("useFullscreen");return e?e>0:"screen"===a.options.commandsOptions.fullscreen.mode}()).on("change",function(t){a.storage("useFullscreen",e(this).is(":checked")?1:-1)})),h.showHidden&&!function(){var t,n=function(){var n,i=a.storage("hide"),o=[];i&&i.items&&e.each(i.items,function(e,t){o.push(a.escape(t))}),r.prop("disabled",!o.length)[o.length?"removeClass":"addClass"]("ui-state-disabled"),n=o.length?o.join("\n"):"",h.showHidden.attr("title",n),t&&h.showHidden.tooltip("option","content",n.replace(/\n/g,"<br>")).tooltip("close")},i=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("hide");return e&&e.show}()).on("change",function(t){var n={};n[e(this).is(":checked")?"show":"hide"]=!0,a.exec("hide",void 0,n)}),o=e('<button class="ui-button ui-corner-all ui-widget"/>').append(a.i18n("reset")).on("click",function(){a.exec("hide",void 0,{reset:!0}),e(this).parent().find("input:first").prop("checked",!1),n()}),r=e().add(i).add(o);h.showHidden=e("<div/>").append(i,o),a.bind("hide",function(e){var t=e.data;t.opts&&(t.opts.show||t.opts.hide)||n()}),a.UA.Mobile&&e.fn.tooltip&&(t=!0,h.showHidden.tooltip({classes:{"ui-tooltip":"elfinder-ui-tooltip ui-widget-shadow"},tooltipClass:"elfinder-ui-tooltip ui-widget-shadow",track:!0}).css("user-select","none"),o.css("user-select","none")),n()}(),h.infoItems&&(h.infoItems=function(){var t=a.getCommand("info").items,n=[],i=a.storage("infohides")||a.arrayFlip(a.options.commandsOptions.info.hideItems,!0);return e.each(t,function(){var e=this,t=a.i18n(e);n.push('<span class="elfinder-preference-info-item"><label><input type="checkbox" value="'+e+'" '+(i[e]?"":"checked")+"/>"+t+"</label></span>")}),e(n.join(" ")).on("change","input",function(){var t=e(this).val(),n=e(this).is(":checked");n||i[t]?n&&i[t]&&delete i[t]:i[t]=!0,a.storage("infohides",i),a.trigger("infopref",{repaint:!0})})}()),h.hashChecker&&a.hashCheckers.length&&(h.hashChecker=function(){var t=[],n=a.arrayFlip(a.storage("hashchekcer")||a.options.commandsOptions.info.showHashAlgorisms,!0);return e.each(a.hashCheckers,function(){var e=this,i=a.i18n(e);t.push('<span class="elfinder-preference-hashchecker-item"><label><input type="checkbox" value="'+e+'" '+(n[e]?"checked":"")+"/>"+i+"</label></span>")}),e(t.join(" ")).on("change","input",function(){var t=e(this).val(),i=e(this).is(":checked");i?n[t]=!0:n[t]&&delete n[t],a.storage("hashchekcer",e.grep(a.hashCheckers,function(e){return n[e]}))})}()),h.autoFocusDialog&&(h.autoFocusDialog=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("autoFocusDialog");return e?e>0:a.options.uiOptions.dialog.focusOnMouseOver}()).on("change",function(t){a.storage("autoFocusDialog",e(this).is(":checked")?1:-1)})),h.clearBrowserData&&(h.clearBrowserData=e("<button/>").text(a.i18n("reset")).button().on("click",function(t){t.preventDefault(),a.storage(),e("#"+a.id).elfinder("reload")})),e.each(u,function(t,i){var s,d;i===!0?d=1:i&&(s=e(),e.each(i,function(t,n){var i,o,r,l="";(i=h[n])&&(d=2,o=a.i18n(n),r=e(i).filter('input[type="checkbox"]'),r.length||(r=e(i).find('input[type="checkbox"]')),1===r.length?(r.attr("id")||r.attr("id","elfinder-preference-"+n+"-checkbox"),o='<label for="'+r.attr("id")+'">'+o+"</label>"):r.length>1&&(l=" elfinder-preference-checkboxes"),s=s.add(e('<dt class="elfinder-preference-'+n+l+'">'+o+"</dt>")).add(e('<dd class="elfinder-preference-'+n+l+'"/>').append(i)))})),d&&(l.append(r[o](/\{id\}/g,t)[o](/\{title\}/,a.i18n(t))[o](/\{class\}/,n===t?"elfinder-focus":"")),2===d&&c.append(e('<div id="'+a.namespace+"-preference-"+t+'" class="elfinder-preference-content"/>').hide().append(e("<dl/>").append(s))))}),l.on("click","a",function(t){var n=e(t.target),i=n.attr("href");t.preventDefault(),t.stopPropagation(),l.children().removeClass(p),
22
- n.removeClass("ui-state-hover").parent().addClass(p),i.match(/all$/)?c.addClass("elfinder-preference-taball").children().show():(c.removeClass("elfinder-preference-taball").children().hide(),e(i).show())}).on("focus blur","a",function(t){e(this).parent().toggleClass("ui-state-focus","focusin"===t.type)}).on("mouseenter mouseleave","li",function(t){e(this).toggleClass("ui-state-hover","mouseenter"===t.type)}),c.find("a,input,select,button").addClass("elfinder-tabstop"),s.append(l,c),t=i.fmDialog(s,{title:i.title,width:i.options.width||600,height:i.options.height||400,maxWidth:"window",maxHeight:"window",autoOpen:!1,destroyOnClose:!1,allowMinimize:!1,open:function(){n&&d(n),n=null},resize:function(){c.height(t.height()-l.outerHeight(!0)-(c.outerHeight(!0)-c.height())-5)}}).on("click",function(e){e.stopPropagation()}).css({overflow:"hidden"}),t.closest(".ui-dialog").css({overflow:"hidden"}).addClass("elfinder-bg-translucent"),n="all"};this.shortcuts=[{pattern:"ctrl+comma",description:this.title}],this.alwaysEnabled=!0,this.getstate=function(){return 0},this.exec=function(n,i){return!t&&u(),i&&(i.tab?d(i.tab):"cwd"===i._currentType&&d("workspace")),t.elfinderdialog("open"),e.Deferred().resolve()}},(i.prototype.commands.quicklook=function(){var t,n,i,a,o,r,s,l,c,d,p=this,u=p.fm,h=0,f=1,m=2,g=3,v=4,b=h,y=Element.update?"quicklookupdate":"update",w="elfinder-quicklook-navbar-icon",x="elfinder-quicklook-fullscreen",k="elfinder-quicklook-info-wrapper",C=function(t){e(document).trigger(e.Event("keydown",{keyCode:t,ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1}))},z=function(e){var t=u.getUI().offset(),n=function(){var t=e.find(".elfinder-cwd-file-wrapper");return t.length?t:e}(),i=n.offset()||{top:0,left:0};return{opacity:0,width:n.width(),height:n.height()-30,top:i.top-t.top,left:i.left-t.left}},T=function(){var i=p.options.contain,a=i?u.getUI():e(window),o=u.getUI().offset(),r=Math.min(t,a.width()-10),s=Math.min(n,a.height()-80);return{opacity:1,width:r,height:s,top:parseInt((a.height()-s-60)/2+(i?0:a.scrollTop()-o.top)),left:parseInt((a.width()-r)/2+(i?0:a.scrollLeft()-o.left))}},A={},S=function(e,t){var n=t||e.substr(0,e.indexOf("/")),i=A[n]?A[n]:A[n]=document.createElement(n),a=!1;try{a=i.canPlayType&&i.canPlayType(e)}catch(o){}return!(!a||""===a||"no"==a)},I=window.navigator.platform.indexOf("Win")!=-1,O=!1,j=!1,M=!1,F=null,D=e.ui.keyCode.LEFT,E=e.ui.keyCode.RIGHT,U="mousemove touchstart "+("onwheel"in document?"wheel":"onmousewheel"in document?"mousewheel":"DOMMouseScroll"),P=e('<span class="elfinder-dialog-title elfinder-quicklook-title"/>'),R=e("<div/>"),q=e('<div class="elfinder-quicklook-info"/>'),H=e('<div class="ui-front elfinder-quicklook-cover"/>'),_=e('<div class="'+w+" "+w+'-fullscreen"/>').on("click touchstart",function(t){if(!M){var n=p.window,i=n.hasClass(x),o=e(window),r=function(){p.preview.trigger("changesize")};t.stopPropagation(),t.preventDefault(),i?(G="",L(),n.toggleClass(x).css(n.data("position")),o.trigger(p.resize).off(p.resize,r),K.off("mouseenter mouseleave"),H.off(U)):(n.toggleClass(x).data("position",{left:n.css("left"),top:n.css("top"),width:n.width(),height:n.height(),display:"block"}).removeAttr("style"),e(window).on(p.resize,r).trigger(p.resize),H.on(U,function(e){j||("mousemove"!==e.type&&"touchstart"!==e.type||(L(),F=setTimeout(function(){(u.UA.Mobile||K.parent().find(".elfinder-quicklook-navbar:hover").length<1)&&K.fadeOut("slow",function(){H.show()})},3e3)),H.is(":visible")&&(W(),H.data("tm",setTimeout(function(){H.show()},3e3))))}).show().trigger("mousemove"),K.on("mouseenter mouseleave",function(e){j||("mouseenter"===e.type?L():H.trigger("mousemove"))})),u.zIndex&&n.css("z-index",u.zIndex+1),u.UA.Mobile?K.attr("style",G):K.attr("style",G).draggable(i?"destroy":{start:function(){j=!0,M=!0,H.show(),L()},stop:function(){j=!1,G=p.navbar.attr("style"),requestAnimationFrame(function(){M=!1})}}),e(this).toggleClass(w+"-fullscreen-off");var s=n;a.is(".ui-resizable")&&(s=s.add(a)),s.resizable(i?"enable":"disable").removeClass("ui-state-disabled"),n.trigger("viewchange")}}),N=function(){p.update(void 0,function(){var t=p.fm,n=t.selectedFiles(),i=n.length,a=(p.docked(),function(){var a=0;return e.each(n,function(e,t){var n=parseInt(t.ts);a>=0?n>a&&(a=n):a="unknown"}),{hash:n[0].hash+"/"+ +new Date,name:t.i18n("items")+": "+i,mime:"group",size:J,ts:a,files:e.map(n,function(e){return e.hash}),getSize:!0}});return i||(i=1,n=[t.cwd()]),1===i?n[0]:a()}())},L=function(){p.window.hasClass(x)&&(F&&clearTimeout(F),F=null,K.stop(!0,!0).css("display","block"),W())},W=function(){H.data("tm")&&clearTimeout(H.data("tm")),H.removeData("tm"),H.hide()},B=e('<div class="'+w+" "+w+'-prev"/>').on("click touchstart",function(e){return!M&&C(D),!1}),$=e('<div class="'+w+" "+w+'-next"/>').on("click touchstart",function(e){return!M&&C(E),!1}),K=e('<div class="elfinder-quicklook-navbar"/>').append(B).append(_).append($).append('<div class="elfinder-quicklook-navbar-separator"/>').append(e('<div class="'+w+" "+w+'-close"/>').on("click touchstart",function(e){return!M&&p.window.trigger("close"),!1})),V=e('<span class="ui-front ui-icon elfinder-icon-close ui-icon-closethick"/>').on("mousedown",function(e){e.stopPropagation(),p.window.trigger("close")}),X=e('<span class="ui-front ui-icon elfinder-icon-minimize ui-icon-minusthick"/>').on("mousedown",function(e){e.stopPropagation(),p.docked()?p.window.trigger("navdockout"):p.window.trigger("navdockin")}),J='<span class="elfinder-spinner-text">'+u.i18n("calc")+'</span><span class="elfinder-spinner"/>',G="",Y=!0;this.cover=H,this.evUpdate=y,(this.navbar=K)._show=L,this.resize="resize."+u.namespace,this.info=e("<div/>").addClass(k).append(R).append(q),this.autoPlay=function(){return!!p.opened()&&!!p.options[p.docked()?"dockAutoplay":"autoplay"]},this.preview=e('<div class="elfinder-quicklook-preview ui-helper-clearfix"/>').on("change",function(){L(),K.attr("style",G),p.docked()&&K.hide(),p.preview.attr("style","").removeClass("elfinder-overflow-auto"),p.info.attr("style","").hide(),p.cover.removeClass("elfinder-quicklook-coverbg"),R.removeAttr("class").attr("style",""),q.html("")}).on(y,function(t){var n,i,a=(p.preview,t.file),r='<div class="elfinder-quicklook-info-data">{value}</div>',s=function(){var s=p.window.css("overflow","hidden");i=u.escape(a.i18||a.name),!a.read&&t.stopImmediatePropagation(),p.window.data("hash",a.hash),p.preview.off("changesize").trigger("change").children().remove(),P.html(i),B.css("visibility",""),$.css("visibility",""),a.hash===u.cwdId2Hash(o.find("[id]:not(.elfinder-cwd-parent):first").attr("id"))&&B.css("visibility","hidden"),a.hash===u.cwdId2Hash(o.find("[id]:last").attr("id"))&&$.css("visibility","hidden"),"directory"===a.mime?c=[a.hash]:"group"===a.mime&&a.getSize&&(c=a.files),q.html(r.replace(/\{value\}/,i)+r.replace(/\{value\}/,u.mime2kind(a))+r.replace(/\{value\}/,c.length?J:u.formatSize(a.size))+r.replace(/\{value\}/,u.i18n("modify")+": "+u.formatDate(a))),c.length&&(l=u.getSize(c).done(function(e){q.find("span.elfinder-spinner").parent().html(e.formated)}).fail(function(){q.find("span.elfinder-spinner").parent().html(u.i18n("unknown"))}).always(function(){l=null}),l._hash=a.hash),R.addClass("elfinder-cwd-icon ui-corner-all "+u.mime2class(a.mime)),a.icon&&R.css(u.getIconStyle(a,!0)),p.info.attr("class",k),a.csscls&&p.info.addClass(a.csscls),a.read&&(n=u.tmb(a))&&e("<img/>").hide().appendTo(p.preview).on("load",function(){R.addClass(n.className).css("background-image","url('"+n.url+"')"),e(this).remove()}).attr("src",n.url),p.info.delay(100).fadeIn(10),p.window.hasClass(x)&&H.trigger("mousemove"),s.css("overflow","")},c=[];a&&!Object.keys(a).length&&(a=u.cwd()),a&&l&&"pending"===l.state()&&l._hash!==a.hash&&l.reject(),a&&(t.forceUpdate||p.window.data("hash")!==a.hash)?s():t.stopImmediatePropagation()}),this.window=e('<div class="ui-front ui-helper-reset ui-widget elfinder-quicklook touch-punch" style="position:absolute"/>').hide().addClass(u.UA.Touch?"elfinder-touch":"").on("click",function(e){var t=this;e.stopPropagation(),b===m&&requestAnimationFrame(function(){b===m&&u.toFront(t)})}).append(e('<div class="ui-dialog-titlebar ui-widget-header ui-corner-top ui-helper-clearfix elfinder-quicklook-titlebar"/>').append(e('<span class="ui-widget-header ui-dialog-titlebar-close ui-corner-all elfinder-titlebar-button elfinder-quicklook-titlebar-icon'+(I?" elfinder-titlebar-button-right":"")+'"/>').append(V,X),P),this.preview,p.info.hide(),H.hide(),K).draggable({handle:"div.elfinder-quicklook-titlebar"}).on("open",function(e,t){var n=p.window,i=p.value,a=u.getUI("cwd"),o=function(e){b=e,p.update(1,p.value),p.change(),n.trigger("resize."+u.namespace)};Y||b!==h?b===v&&(u.getUI("navdock").data("addNode")(c),o(g),p.preview.trigger("changesize"),u.storage("previewDocked","1"),0===u.getUI("navdock").width()&&n.trigger("navdockout")):(i&&i.hash!==r&&(a=u.cwdHash2Elm(i.hash.split("/",2)[0])),G="",K.attr("style",""),b=f,a.trigger("scrolltoview"),W(),n.css(t||z(a)).show().animate(T(),550,function(){o(m),L()}),u.toFront(n))}).on("close",function(e,t){var n,i=p.window,a=p.preview.trigger("change"),r=(p.value,(i.data("hash")||"").split("/",2)[0]),s=function(e,n){b=e,n&&u.toHide(i),a.children().remove(),p.update(0,p.value),i.data("hash",""),t&&t.resolve()};p.opened()&&(l&&"pending"===l.state()&&l.reject(),p.docked()?(c=u.getUI("navdock").data("removeNode")(p.window.attr("id"),"detach"),s(v),u.storage("previewDocked","2")):(b=f,i.hasClass(x)&&_.click(),r&&(n=o.find("#"+r)).length?i.animate(z(n),500,function(){s(h,!0)}):s(h,!0)))}).on("navdockin",function(e,t){var n=p.window,a=u.getUI("navdock"),o=s||a.width(),r=t||{};Y&&(r.init=!0),b=g,i=n.attr("style"),n.toggleClass("ui-front").removeClass("ui-widget").draggable("disable").resizable("disable").removeAttr("style").css({width:"100%",height:o,boxSizing:"border-box",paddingBottom:0,zIndex:"unset"}),K.hide(),X.toggleClass("ui-icon-plusthick ui-icon-minusthick elfinder-icon-full elfinder-icon-minimize"),u.toHide(n,!0),a.data("addNode")(n,r),p.preview.trigger("changesize"),u.storage("previewDocked","1")}).on("navdockout",function(t){var n=p.window,a=u.getUI("navdock"),o=(e.Deferred(),z(p.preview));s=n.outerHeight(),a.data("removeNode")(n.attr("id"),u.getUI()),n.toggleClass("ui-front").addClass("ui-widget").draggable("enable").resizable("enable").attr("style",i),X.toggleClass("ui-icon-plusthick ui-icon-minusthick elfinder-icon-full elfinder-icon-minimize"),b=h,n.trigger("open",o),u.storage("previewDocked","0")}).on("resize."+u.namespace,function(){p.preview.trigger("changesize")}),this.alwaysEnabled=!0,this.value=null,this.handlers={select:function(e,t){d&&cancelAnimationFrame(d),e.data&&e.data.selected&&e.data.selected.length?p.opened()&&N():d=requestAnimationFrame(function(){p.opened()&&N()})},error:function(){p.window.is(":visible")&&p.window.trigger("close")},"searchshow searchhide":function(){this.opened()&&this.window.trigger("close")},navbarshow:function(){requestAnimationFrame(function(){p.docked()&&p.preview.trigger("changesize")})},destroy:function(){p.window.remove()}},this.shortcuts=[{pattern:"space"}],this.support={audio:{ogg:S("audio/ogg;"),webm:S("audio/webm;"),mp3:S("audio/mpeg;"),wav:S("audio/wav;"),m4a:S("audio/mp4;")||S("audio/x-m4a;")||S("audio/aac;"),flac:S("audio/flac;"),amr:S("audio/amr;")},video:{ogg:S("video/ogg;"),webm:S("video/webm;"),mp4:S("video/mp4;"),mkv:S("video/x-matroska;")||S("video/webm;"),"3gp":S("video/3gpp;")||S("video/mp4;"),m3u8:S("application/x-mpegURL","video")||S("application/vnd.apple.mpegURL","video"),mpd:S("application/dash+xml","video")}},A={},this.closed=function(){return b==h||b==v},this.opened=function(){return b==m||b==g},this.docked=function(){return b==g},this.addIntegration=function(e){requestAnimationFrame(function(){u.trigger("helpIntegration",Object.assign({cmd:"quicklook"},e))})},this.init=function(){var i,l=this.options,c=this.window,d=this.preview;t=l.width>0?parseInt(l.width):450,n=l.height>0?parseInt(l.height):300,"auto"!==l.dockHeight&&(s=parseInt(l.dockHeight),s||(s=void 0)),u.one("load",function(){O=u.getUI("navdock").data("dockEnabled"),!O&&X.hide(),a=u.getUI(),o=u.getUI("cwd"),u.zIndex&&c.css("z-index",u.zIndex+1),c.appendTo(a),e(document).on("keydown."+u.namespace,function(t){t.keyCode==e.ui.keyCode.ESCAPE&&p.opened()&&!p.docked()&&c.hasClass("elfinder-frontmost")&&c.trigger("close")}),c.resizable({handles:"se",minWidth:350,minHeight:120,resize:function(){d.trigger("changesize")}}),p.change(function(){p.opened()&&p.value&&(p.value.tmb&&1==p.value.tmb&&(p.value=Object.assign({},u.file(p.value.hash))),d.trigger(e.Event(y,{file:p.value})))}),d.on(y,function(e){var t,n,a;if(t=e.file){if(n=t.hash,a=u.searchStatus.mixed&&u.searchStatus.state>1,"directory"!==t.mime)if(parseInt(t.size)||t.mime.match(l.mimeRegexNotEmptyCheck)){if(p.dispInlineRegex=i,a||u.optionsByHashes[n])try{p.dispInlineRegex=new RegExp(u.option("dispInlineRegex",n),"i")}catch(e){try{p.dispInlineRegex=new RegExp(u.isRoot(t)?u.options.dispInlineRegex:u.option("dispInlineRegex",t.phash),"i")}catch(e){p.dispInlineRegex=/^$/}}}else e.stopImmediatePropagation();else p.dispInlineRegex=/^$/;p.info.show()}else e.stopImmediatePropagation()}),e.each(u.commands.quicklook.plugins||[],function(e,t){"function"==typeof t&&new t(p)})}).one("open",function(){var e,t=Number(u.storage("previewDocked")||l.docked);O&&t>=1&&(e=p.window,p.exec(),e.trigger("navdockin",{init:!0}),2===t?e.trigger("close"):(p.update(void 0,u.cwd()),p.change())),Y=!1}).bind("open",function(){r=u.cwd().hash,p.value=u.cwd();try{i=new RegExp(u.option("dispInlineRegex"),"i")}catch(e){i=/^$/}}).bind("change",function(t){t.data&&t.data.changed&&p.opened()&&e.each(t.data.changed,function(){if(p.window.data("hash")===this.hash)return p.window.data("hash",null),p.preview.trigger(y),!1})}).bind("navdockresizestart navdockresizestop",function(e){H["navdockresizestart"===e.type?"show":"hide"]()})},this.getstate=function(){return p.opened()?1:0},this.exec=function(){return p.closed()&&N(),p.enabled()&&p.window.trigger(p.opened()?"close":"open"),e.Deferred().resolve()},this.hideinfo=function(){this.info.stop(!0,!0).hide()}}).prototype={forceLoad:!0},i.prototype.commands.quicklook.plugins=[function(t){var n,i,a=["image/jpeg","image/png","image/gif","image/svg+xml","image/x-ms-bmp"],o=t.preview;n=new Image,n.onload=n.onerror=function(){2==n.height&&a.push("image/webp")},n.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA",e.each(navigator.mimeTypes,function(t,n){var i=n.type;0===i.indexOf("image/")&&e.inArray(i,a)&&a.push(i)}),o.on(t.evUpdate,function(n){var r,s,l,c=t.fm,d=n.file,p=!1,u=null,h=function(e){var t=c.file(d.hash);t.width=e[0],t.height=e[1]},f=function(){var e,t,n,i,a;u&&u.state&&"pending"===u.state()&&u.reject(),p||(p=!0,e=s.get(0),t=d.width&&d.height?{w:d.width,h:d.height}:e.naturalWidth?null:{w:s.width(),h:s.height()},t&&s.removeAttr("width").removeAttr("height"),n=d.width||e.naturalWidth||e.width||s.width(),i=d.height||e.naturalHeight||e.height||s.height(),d.width&&d.height||h([n,i]),t&&s.width(t.w).height(t.h),a=(n/i).toFixed(2),o.on("changesize",function(){var e,t,n=parseInt(o.width()),i=parseInt(o.height());a<(n/i).toFixed(2)?(t=i,e=Math.floor(t*a)):(e=n,t=Math.floor(e/a)),s.width(e).height(t).css("margin-top",t<i?Math.floor((i-t)/2):0)}).trigger("changesize"),s.fadeIn(100))},m=function(){l.remove(),t.hideinfo()};i||(i=c.arrayFlip(a)),i[d.mime]&&t.dispInlineRegex.test(d.mime)&&(n.stopImmediatePropagation(),l=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+c.i18n("nowLoading")+'</span><span class="elfinder-spinner"/></div>').appendTo(t.info.find(".elfinder-quicklook-info")),r=c.openUrl(d.hash),s=e("<img/>").hide().appendTo(o).on("load",function(){m(),f()}).on("error",function(){l.remove()}).attr("src",r),d.width&&d.height?f():d.size>(t.options.getDimThreshold||0)&&(u=c.request({data:{cmd:"dim",target:d.hash},preventDefault:!0}).done(function(e){if(e.dim){var t=e.dim.split("x");d.width=t[0],d.height=t[1],h(t),f()}})))})},function(t){var n,i=t.fm,a=i.arrayFlip(["image/vnd.adobe.photoshop","image/x-photoshop"]),o=t.preview,r=function(e,a,r){try{i.replaceXhrSend(),n.fromURL(e).then(function(e){var n;a.attr("src",e.image.toBase64()),requestAnimationFrame(function(){n=(a.width()/a.height()).toFixed(2),o.on("changesize",function(){var e,t,i=parseInt(o.width()),r=parseInt(o.height());n<(i/r).toFixed(2)?(t=r,e=Math.floor(t*n)):(e=i,t=Math.floor(e/n)),a.width(e).height(t).css("margin-top",t<r?Math.floor((r-t)/2):0)}).trigger("changesize"),r.remove(),t.hideinfo(),a.fadeIn(100)})},function(){r.remove(),a.remove()}),i.restoreXhrSend()}catch(s){i.restoreXhrSend(),r.remove(),a.remove()}};o.on(t.evUpdate,function(s){var l,c,d,p,u,h=s.file;a[h.mime]&&i.options.cdns.psd&&!i.UA.ltIE10&&t.dispInlineRegex.test(h.mime)&&(s.stopImmediatePropagation(),d=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+i.i18n("nowLoading")+'</span><span class="elfinder-spinner"/></div>').appendTo(t.info.find(".elfinder-quicklook-info")),l=i.openUrl(h.hash),i.isSameOrigin(l)||(l=i.openUrl(h.hash,!0)),c=e("<img/>").hide().appendTo(o),n?r(l,c,d):(p=window.define,u=window.require,window.require=null,window.define=null,i.loadScript([i.options.cdns.psd],function(){n=require("psd"),p?window.define=p:delete window.define,u?window.require=u:delete window.require,r(l,c,d)})))})},function(t){var n=t.fm,i=n.arrayFlip(["text/html","application/xhtml+xml"]),a=t.preview;a.on(t.evUpdate,function(o){var r,s,l=o.file;i[l.mime]&&t.dispInlineRegex.test(l.mime)&&(!t.options.getSizeMax||l.size<=t.options.getSizeMax)&&(o.stopImmediatePropagation(),s=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"/></div>').appendTo(t.info.find(".elfinder-quicklook-info")),a.one("change",function(){"pending"==r.state()&&r.reject()}).addClass("elfinder-overflow-auto"),r=n.request({data:{cmd:"get",target:l.hash,conv:1,_t:l.ts},options:{type:"get",cache:!0},preventDefault:!0}).done(function(n){t.hideinfo();var i=e('<iframe class="elfinder-quicklook-preview-html"/>').appendTo(a)[0].contentWindow.document;i.open(),i.write(n.content),i.close()}).always(function(){s.remove()}))})},function(t){var n=t.fm,i=n.arrayFlip(["text/x-markdown"]),a=t.preview,o=null,r=function(n,i){t.hideinfo();var r=e('<iframe class="elfinder-quicklook-preview-html"/>').appendTo(a)[0].contentWindow.document;r.open(),r.write(o(n.content)),r.close(),i.remove()},s=function(e){o=!1,e.remove()};a.on(t.evUpdate,function(l){var c,d,p=l.file;i[p.mime]&&n.options.cdns.marked&&o!==!1&&t.dispInlineRegex.test(p.mime)&&(!t.options.getSizeMax||p.size<=t.options.getSizeMax)&&(l.stopImmediatePropagation(),d=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"/></div>').appendTo(t.info.find(".elfinder-quicklook-info")),a.one("change",function(){"pending"==c.state()&&c.reject()}).addClass("elfinder-overflow-auto"),c=n.request({data:{cmd:"get",target:p.hash,conv:1,_t:p.ts},options:{type:"get",cache:!0},preventDefault:!0}).done(function(e){o||window.marked?(o||(o=window.marked),r(e,d)):n.loadScript([n.options.cdns.marked],function(t){o=t||window.marked||!1,delete window.marked,o?r(e,d):s(d)},{tryRequire:!0,error:function(){s(d)}})}).fail(function(){s(d)}))})},function(t){if(t.options.viewerjs){var n=t.fm,i=t.preview,a=t.options.viewerjs,o=a.url?n.arrayFlip(a.mimes||[]):[];a.url&&i.on("update",function(r){var s,l,c=(t.window,r.file);if(o[c.mime]){var d=n.openUrl(c.hash);d&&n.isSameOrigin(d)&&(r.stopImmediatePropagation(),l=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"/></div>').appendTo(t.info.find(".elfinder-quicklook-info")),s=e('<iframe class="elfinder-quicklook-preview-iframe"/>').css("background-color","transparent").on("load",function(){t.hideinfo(),l.remove(),s.css("background-color","#fff")}).on("error",function(){l.remove(),s.remove()}).appendTo(i).attr("src",a.url+"#"+d),i.one("change",function(){l.remove(),s.off("load").remove()}))}})}},function(t){var n=t.fm,i="application/pdf",a=t.preview,o=!1,r="";n.UA.Safari&&"mac"===n.OS&&!n.UA.iOS||n.UA.IE||n.UA.Firefox?o=!0:e.each(navigator.plugins,function(t,n){e.each(n,function(e,t){if(t.type===i)return!(o=!0)})}),o&&("undefined"==typeof t.options.pdfToolbar||t.options.pdfToolbar||(r="#toolbar=0"),a.on(t.evUpdate,function(s){var l=s.file;o&&l.mime===i&&t.dispInlineRegex.test(l.mime)&&(s.stopImmediatePropagation(),t.hideinfo(),t.cover.addClass("elfinder-quicklook-coverbg"),e('<object class="elfinder-quicklook-preview-pdf" data="'+n.openUrl(l.hash)+r+'" type="application/pdf" />').on("error",function(e){o=!1,t.update(void 0,n.cwd()),t.update(void 0,l)}).appendTo(a))}))},function(t){var n=t.fm,i="application/x-shockwave-flash",a=t.preview,o=!1;e.each(navigator.plugins,function(t,n){e.each(n,function(e,t){if(t.type===i)return!(o=!0)})}),o&&a.on(t.evUpdate,function(o){var r,s=o.file;s.mime===i&&t.dispInlineRegex.test(s.mime)&&(o.stopImmediatePropagation(),t.hideinfo(),r=e('<embed class="elfinder-quicklook-preview-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+n.openUrl(s.hash)+'" quality="high" type="application/x-shockwave-flash" wmode="transparent" />').appendTo(a))})},function(t){var n,i,a,o,r=t.fm,s=t.preview,l={"audio/mpeg":"mp3","audio/mpeg3":"mp3","audio/mp3":"mp3","audio/x-mpeg3":"mp3","audio/x-mp3":"mp3","audio/x-wav":"wav","audio/wav":"wav","audio/x-m4a":"m4a","audio/aac":"m4a","audio/mp4":"m4a","audio/x-mp4":"m4a","audio/ogg":"ogg","audio/webm":"webm","audio/flac":"flac","audio/x-flac":"flac","audio/amr":"amr"},c=t.window,d=t.navbar,p="string"==typeof t.options.mediaControlsList&&t.options.mediaControlsList?' controlsList="'+r.escape(t.options.mediaControlsList)+'"':"",u=function(){d.css("bottom",c.hasClass("elfinder-quicklook-fullscreen")?"50px":"")},h=function(t,i){return e('<audio class="elfinder-quicklook-preview-audio ui-front" controls'+p+' preload="auto" autobuffer><source src="'+t+'" /></audio>').on("change",function(e){e.stopPropagation()}).on("error",function(e){n&&n.data("hash")===i&&g()}).data("hash",i).appendTo(s)},f=function(t){var n,i=e.Deferred(),o=e.Deferred().done(function(){r.getContents(t).done(function(e){try{var t=a.toWAV(new Uint8Array(e));t?i.resolve(URL.createObjectURL(new Blob([t],{type:"audio/x-wav"}))):i.reject()}catch(n){i.reject()}}).fail(function(){i.reject()})}).fail(function(){a=!1,i.reject()});return window.TextEncoder&&window.URL&&URL.createObjectURL&&"undefined"==typeof a?(n=window.AMR,delete window.AMR,r.loadScript([r.options.cdns.amr],function(){a=!!window.AMR&&window.AMR,window.AMR=n,o[a?"resolve":"reject"]()},{error:function(){o.reject()}})):o[a?"resolve":"reject"](),i},m=function(e){var t,i=n.data("hash");o&&(t=e.play()),t&&t["catch"]&&t["catch"](function(t){e.paused||n&&n.data("hash")===i&&g()})},g=function(){if(n&&n.parent().length){var e=n[0],t=n.children("source").attr("src");c.off("viewchange.audio");try{e.pause(),n.empty(),t.match(/^blob:/)&&URL.revokeObjectURL(t),e.src="",e.load()}catch(i){}n.remove(),n=null}};s.on(t.evUpdate,function(e){var s,d,p=e.file,g=l[p.mime];l[p.mime]&&t.dispInlineRegex.test(p.mime)&&((s=t.support.audio[g])||"amr"===g)&&(o=t.autoPlay(),i=p.hash,d=s?r.openUrl(i):"",s?(e.stopImmediatePropagation(),n=h(d,i),m(n[0]),c.on("viewchange.audio",u),u()):r.options.cdns.amr&&"amr"===g&&a!==!1&&(e.stopImmediatePropagation(),n=h(d,i),f(p.hash).done(function(e){if(i===p.hash){var t=n[0];try{n.children("source").attr("src",e),t.pause(),t.load(),m(t),c.on("viewchange.audio",u),u()}catch(a){URL.revokeObjectURL(e),n.remove()}}else URL.revokeObjectURL(e)}).fail(function(){n.remove()})))}).on("change",g)},function(t){var n,i,a,o,r,s,l,c,d=t.fm,p=t.preview,u={"video/mp4":"mp4","video/x-m4v":"mp4","video/quicktime":"mp4","video/mpeg":"mpeg","video/ogg":"ogg","application/ogg":"ogg","video/webm":"webm","video/x-matroska":"mkv","video/3gpp":"3gp","application/vnd.apple.mpegurl":"m3u8","application/x-mpegurl":"m3u8","application/dash+xml":"mpd","video/x-flv":"flv","video/x-msvideo":"avi"},h=t.window,f=t.navbar,m="string"==typeof t.options.mediaControlsList&&t.options.mediaControlsList?' controlsList="'+d.escape(t.options.mediaControlsList)+'"':"",g=function(){d.UA.iOS?h.hasClass("elfinder-quicklook-fullscreen")?(p.css("height","-webkit-calc(100% - 50px)"),f._show()):p.css("height",""):f.css("bottom",h.hasClass("elfinder-quicklook-fullscreen")?"50px":"")},v=function(i,a){var r,s=function(e){l>1&&(c&&clearTimeout(c),c=setTimeout(function(){!r&&C(!0)},800))},l=0;o=null,a=a||{},t.hideinfo(),n=e('<video class="elfinder-quicklook-preview-video" controls'+m+' preload="auto" autobuffer playsinline></video>').on("change",function(e){e.stopPropagation()}).on("timeupdate progress",s).on("canplay",function(){r=!0}).data("hash",i.hash),n[0].addEventListener("error",function(e){a.src&&d.convAbsUrl(a.src)===d.convAbsUrl(e.target.src)&&(++l,s())},!0),a.src&&n.append('<source src="'+a.src+'" type="'+i.mime+'"/><source src="'+a.src+'"/>'),n.appendTo(p),h.on("viewchange.video",g),g()},b=function(e){var t;v(e),t=new i,t.loadSource(d.openUrl(e.hash)),t.attachMedia(n[0]),l&&t.on(i.Events.MANIFEST_PARSED,function(){k(n[0])})},y=function(e){v(e),o=window.dashjs.MediaPlayer().create(),o.getDebug().setLogToBrowserConsole(!1),o.initialize(n[0],d.openUrl(e.hash),l),o.on("error",function(e){C(!0)})},w=function(e){if(!r.isSupported())return void(r=!1);var t=r.createPlayer({type:"flv",url:d.openUrl(e.hash)});v(e),t.on(r.Events.ERROR,function(){t.destroy(),C(!0)}),t.attachMediaElement(n[0]),t.load(),k(t)},x=function(e){v(e),n[0].src=d.openUrl(e.hash),s(n[0],{src:d.openUrl(e.hash)})},k=function(e){var t,i=n.data("hash");l&&(t=e.play()),t&&t["catch"]&&t["catch"](function(t){e.paused||n&&n.data("hash")===i&&C(!0)})},C=function(e){if(c&&clearTimeout(c),n&&n.parent().length){var i=n[0];h.off("viewchange.video"),o&&o.reset();try{i.pause(),n.empty(),i.src="",i.load()}catch(a){}n.remove(),n=null}e&&t.info.show()};p.on(t.evUpdate,function(e){var o,c=e.file,p=c.mime.toLowerCase(),h=u[p];u[p]&&t.dispInlineRegex.test(c.mime)&&(l=t.autoPlay(),t.support.video[h]&&("m3u8"!==h||d.UA.Safari)?(e.stopImmediatePropagation(),v(c,{src:d.openUrl(c.hash)}),k(n[0])):i!==!1&&d.options.cdns.hls&&"m3u8"===h?(e.stopImmediatePropagation(),i?b(c):(o=window.Hls,delete window.Hls,d.loadScript([d.options.cdns.hls],function(e){i=e||window.Hls||!1,window.Hls=o,i&&b(c)},{tryRequire:!0,error:function(){i=!1}}))):a!==!1&&d.options.cdns.dash&&"mpd"===h?(e.stopImmediatePropagation(),a?y(c):d.loadScript([d.options.cdns.dash],function(){a=!!window.dashjs,a&&y(c)},{tryRequire:!0,error:function(){a=!1}})):r!==!1&&d.options.cdns.flv&&"flv"===h?(e.stopImmediatePropagation(),r?w(c):(o=window.flvjs,delete window.flvjs,d.loadScript([d.options.cdns.flv],function(e){r=e||window.flvjs||!1,window.flvjs=o,r&&w(c)},{tryRequire:!0,error:function(){r=!1}}))):s?x(c):d.loadScript(["https://cdnjs.cloudflare.com/ajax/libs/video.js/7.5.0/video.min.js"],function(e){s=e||window.videojs||!1,s&&x(c)},{tryRequire:!0,error:function(){s=!1}}).loadCss(["https://cdnjs.cloudflare.com/ajax/libs/video.js/7.5.0/video-js.min.css"]))}).on("change",C)},function(t){var n,i=t.preview,a=[],o=t.window,r=t.navbar;e.each(navigator.plugins,function(t,n){e.each(n,function(e,t){(0===t.type.indexOf("audio/")||0===t.type.indexOf("video/"))&&a.push(t.type)})}),a=t.fm.arrayFlip(a),i.on(t.evUpdate,function(s){var l,c=s.file,d=c.mime,p=function(){r.css("bottom",o.hasClass("elfinder-quicklook-fullscreen")?"50px":"")};a[c.mime]&&t.dispInlineRegex.test(c.mime)&&(s.stopImmediatePropagation(),(l=0===d.indexOf("video/"))&&t.hideinfo(),n=e('<embed src="'+t.fm.openUrl(c.hash)+'" type="'+d+'" class="elfinder-quicklook-preview-'+(l?"video":"audio")+'"/>').appendTo(i),o.on("viewchange.embed",p),p())}).on("change",function(){n&&n.parent().length&&(o.off("viewchange.embed"),n.remove(),n=null)})},function(t){var n,i=t.fm,a=i.arrayFlip(["application/zip","application/x-gzip","application/x-tar"]),o=t.preview,r=function(){var e,t,n,a=[];for(this.Y(),n=this.i,e=0,t=n.length;e<t;++e)a[e]=n[e].filename+(n[e].J?" ("+i.formatSize(n[e].J)+")":"");return a},s=function(e){for(var t,n,a,o,r,s=[],l=e.length,c=0,d=function(e){return String.fromCharCode.apply(null,e).replace(/\0+$/,"")};c<l&&0!==e[c];)t=e.subarray(c,c+512),n=d(t.subarray(0,100)),(a=d(t.subarray(345,500)))&&(n=a+n),o=parseInt(d(t.subarray(124,136)),8),r=512*Math.ceil(o/512),"././@LongLink"===n&&(n=d(e.subarray(c+512,c+512+r))),"pax_global_header"!==n&&s.push(n+(o?" ("+i.formatSize(o)+")":"")),c=c+512+r;return s};window.Uint8Array&&window.DataView&&i.options.cdns.zlibUnzip&&i.options.cdns.zlibGunzip&&o.on(t.evUpdate,function(l){var c=l.file,d="application/x-tar"===c.mime;if(a[c.mime]&&(d||("undefined"==typeof n||n)&&("application/zip"===c.mime||"application/x-gzip"===c.mime))){var p,u,h,f,m=function(){h=i.openUrl(c.hash),i.isSameOrigin(h)||(h=i.openUrl(c.hash,!0)),p=i.request({data:{cmd:"get"},options:{url:h,type:"get",cache:!0,dataType:"binary",responseType:"arraybuffer",processData:!1}}).fail(function(){u.remove()}).done(function(e){var t,a;try{"application/zip"===c.mime?(t=new n.Unzip(new Uint8Array(e)),a=r.call(t)):"application/x-gzip"===c.mime?(t=new n.Gunzip(new Uint8Array(e)),a=s(t.decompress())):"application/x-tar"===c.mime&&(a=s(new Uint8Array(e))),g(a)}catch(o){u.remove(),i.debug("error",o)}})},g=function(n){var a,r;n&&n.length&&(n=e.map(n,function(e){return i.decodeRawString(e)}),n.sort(),u.remove(),a="<strong>"+i.escape(c.mime)+"</strong> ("+i.formatSize(c.size)+")<hr/>",r=e('<div class="elfinder-quicklook-preview-archive-wrapper">'+a+'<pre class="elfinder-quicklook-preview-text">'+i.escape(n.join("\n"))+"</pre></div>").on("touchstart",function(t){e(this)["scroll"+("ltr"===i.direction?"Right":"Left")]()>5&&(t.originalEvent._preventSwipeX=!0)}).appendTo(o),t.hideinfo())};l.stopImmediatePropagation(),u=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+i.i18n("nowLoading")+'</span><span class="elfinder-spinner"/></div>').appendTo(t.info.find(".elfinder-quicklook-info")),o.one("change",function(){"pending"===p.state()&&p.reject(),u.remove()}),n?m():(window.Zlib&&(f=window.Zlib,delete window.Zlib),i.loadScript([i.options.cdns.zlibUnzip,i.options.cdns.zlibGunzip],function(){window.Zlib&&(n=window.Zlib)?(f?window.Zlib=f:delete window.Zlib,m()):error()}))}})},function(t){var n,i=t.fm,a=i.arrayFlip(["application/x-rar"]),o=t.preview;window.DataView&&o.on(t.evUpdate,function(r){var s=r.file;if(a[s.mime]&&i.options.cdns.rar&&n!==!1){var l,c,d,p,u,h=function(a){if(p)return void l.remove();try{d=n({file:a,type:2,xhrHeaders:i.customHeaders,xhrFields:i.xhrFields},function(n){l.remove();var a,r,c=[];return p||n?void(n&&i.debug("error",n)):(e.each(d.entries,function(){c.push(this.path+(this.size?" ("+i.formatSize(this.size)+")":""))}),void(c.length&&(c=e.map(c,function(e){return i.decodeRawString(e)}),c.sort(),a="<strong>"+i.escape(s.mime)+"</strong> ("+i.formatSize(s.size)+")<hr/>",r=e('<div class="elfinder-quicklook-preview-archive-wrapper">'+a+'<pre class="elfinder-quicklook-preview-text">'+i.escape(c.join("\n"))+"</pre></div>").on("touchstart",function(t){e(this)["scroll"+("ltr"===i.direction?"Right":"Left")]()>5&&(t.originalEvent._preventSwipeX=!0)}).appendTo(o),t.hideinfo())))})}catch(r){l.remove()}},f=function(){n=!1,l.remove()};r.stopImmediatePropagation(),l=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+i.i18n("nowLoading")+'</span><span class="elfinder-spinner"/></div>').appendTo(t.info.find(".elfinder-quicklook-info")),o.one("change",function(){d&&(d.abort=!0),l.remove(),p=!0}),c=i.openUrl(s.hash),i.isSameOrigin(c)||(c=i.openUrl(s.hash,!0)),
23
- n?h(c):(window.RarArchive&&(u=window.RarArchive,delete window.RarArchive),i.loadScript([i.options.cdns.rar],function(){i.hasRequire?require(["rar"],function(e){n=e,h(c)},f):(n=window.RarArchive)?(u?window.RarArchive=u:delete window.RarArchive,h(c)):f()},{tryRequire:!0,error:f}))}})},function(t){var n,i=t.fm,a=i.arrayFlip(t.options.sharecadMimes||[]),o=t.preview;t.window;t.options.sharecadMimes.length&&t.addIntegration({title:"ShareCAD.org CAD and 3D-Models viewer",link:"https://sharecad.org/DWGOnlinePlugin"}),o.on(t.evUpdate,function(r){var s=r.file;if(a[s.mime.toLowerCase()]&&!i.option("onetimeUrl",s.hash)){var l,c;t.window;r.stopImmediatePropagation(),"1"==s.url&&(o.hide(),e('<div class="elfinder-quicklook-info-data"><button class="elfinder-info-button">'+i.i18n("getLink")+"</button></div>").appendTo(t.info.find(".elfinder-quicklook-info")).on("click",function(){var n=e(this);n.html('<span class="elfinder-spinner">'),i.request({data:{cmd:"url",target:s.hash},preventDefault:!0}).always(function(){n.html("")}).done(function(e){var n=i.file(s.hash);s.url=n.url=e.url||"",s.url&&o.trigger({type:t.evUpdate,file:s,forceUpdate:!0})})})),""!==s.url&&"1"!=s.url&&(o.one("change",function(){l.remove(),n.off("load").remove(),n=null}).addClass("elfinder-overflow-auto"),l=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+i.i18n("nowLoading")+'</span><span class="elfinder-spinner"/></div>').appendTo(t.info.find(".elfinder-quicklook-info")),c=i.convAbsUrl(i.url(s.hash)),n=e('<iframe class="elfinder-quicklook-preview-iframe" scrolling="no"/>').css("background-color","transparent").appendTo(o).on("load",function(){t.hideinfo(),l.remove(),t.preview.after(t.info),e(this).css("background-color","#fff").show()}).on("error",function(){l.remove(),t.preview.after(t.info)}).attr("src","//sharecad.org/cadframe/load?url="+encodeURIComponent(c)),t.info.after(t.preview))}})},function(t){var n,i,a,o,r,s=t.fm,l={"application/vnd.google-earth.kml+xml":!0,"application/vnd.google-earth.kmz":!0},c=t.preview;t.options.googleMapsApiKey&&(t.addIntegration({title:"Google Maps",link:"https://www.google.com/intl/"+s.lang.replace("_","-")+"/help/terms_maps.html"}),n=window.google&&google.maps,i=function(e,i){var a=t.options.googleMapsOpts.maps;s.forExternalUrl(e.hash).done(function(e){if(e)try{new n.KmlLayer(e,Object.assign({map:new n.Map(i.get(0),a)},t.options.googleMapsOpts.kml)),t.hideinfo()}catch(r){o()}else o()})},a=window.gm_authFailure,o=function(){r=null},r="https://maps.googleapis.com/maps/api/js?key="+t.options.googleMapsApiKey,window.gm_authFailure=function(){o(),a&&a()},c.on(t.evUpdate,function(a){var o=a.file;if(r&&l[o.mime.toLowerCase()]){var d,p=(t.window,"1"==o.url&&!s.option("onetimeUrl",o.hash));a.stopImmediatePropagation(),p&&(c.hide(),e('<div class="elfinder-quicklook-info-data"><button class="elfinder-info-button">'+s.i18n("getLink")+"</button></div>").appendTo(t.info.find(".elfinder-quicklook-info")).on("click",function(){var n=e(this);n.html('<span class="elfinder-spinner">'),s.request({data:{cmd:"url",target:o.hash},preventDefault:!0}).always(function(){n.html("")}).done(function(e){var n=s.file(o.hash);o.url=n.url=e.url||"",o.url&&c.trigger({type:t.evUpdate,file:o,forceUpdate:!0})})})),""===o.url||p||(d=e('<div style="width:100%;height:100%;"/>').appendTo(c),c.one("change",function(){d.remove(),d=null}),n?i(o,d):s.loadScript([r],function(){n=window.google&&google.maps,n&&i(o,d)}))}}))},function(t){var n,i,a=t.fm,o=Object.assign(a.arrayFlip(t.options.googleDocsMimes||[],"g"),a.arrayFlip(t.options.officeOnlineMimes||[],"m")),r=t.preview,s=(t.window,t.navbar),l={g:"docs.google.com/gview?embedded=true&url=",m:"view.officeapps.live.com/op/embed.aspx?wdStartOn=0&src="},c={g:"56px",m:"24px"},d={xls:5242880,xlsb:5242880,xlsx:5242880,xlsm:5242880,other:10485760};t.options.googleDocsMimes.length&&(i=!0,t.addIntegration({title:"Google Docs Viewer",link:"https://docs.google.com/"})),t.options.officeOnlineMimes.length&&(i=!0,t.addIntegration({title:"MS Online Doc Viewer",link:"https://products.office.com/office-online/view-office-documents-online"})),i&&r.on(t.evUpdate,function(i){var p,u=i.file;if(u.size<=26214400&&(p=o[u.mime])){var h,f=t.window,m=function(){s.css("bottom",f.hasClass("elfinder-quicklook-fullscreen")?c[p]:"")},g=a.mimeTypes[u.mime],v="1"==u.url&&!a.option("onetimeUrl",u.hash);"m"===p&&(d[g]&&u.size>d[g]||u.size>d.other)&&(p="g"),v&&(r.hide(),e('<div class="elfinder-quicklook-info-data"><button class="elfinder-info-button">'+a.i18n("getLink")+"</button></div>").appendTo(t.info.find(".elfinder-quicklook-info")).on("click",function(){var n=e(this);n.html('<span class="elfinder-spinner">'),a.request({data:{cmd:"url",target:u.hash},preventDefault:!0}).always(function(){n.html("")}).done(function(e){var n=a.file(u.hash);u.url=n.url=e.url||"",u.url&&r.trigger({type:t.evUpdate,file:u,forceUpdate:!0})})})),""===u.url||v||(i.stopImmediatePropagation(),r.one("change",function(){f.off("viewchange.googledocs"),h.remove(),n.off("load").remove(),n=null}).addClass("elfinder-overflow-auto"),h=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+a.i18n("nowLoading")+'</span><span class="elfinder-spinner"/></div>').appendTo(t.info.find(".elfinder-quicklook-info")),n=e('<iframe class="elfinder-quicklook-preview-iframe"/>').css("background-color","transparent").appendTo(r),a.forExternalUrl(u.hash).done(function(i){i?(u.ts&&(i+=(i.match(/\?/)?"&":"?")+"_t="+u.ts),n.on("load",function(){t.hideinfo(),h.remove(),t.preview.after(t.info),e(this).css("background-color","#fff").show()}).on("error",function(){h.remove(),t.preview.after(t.info)}).attr("src","https://"+l[p]+encodeURIComponent(i))):(h.remove(),n.remove())}),f.on("viewchange.googledocs",m),m(),t.info.after(t.preview))}})},function(t){var n=t.fm,i=t.preview,a=parseInt(t.options.textMaxlen)||2e3,o=function(){n.options.cdns.prettify?(n.loadScript([n.options.cdns.prettify+(n.options.cdns.prettify.match(/\?/)?"&":"?")+"autorun=false"]),o=function(){return!0}):o=function(){return!1}},r=function(e,t){o()&&("undefined"==typeof window.PR&&t--?setTimeout(function(){r(e,t)},100):"object"==typeof window.PR?(e.css("cursor","wait"),requestAnimationFrame(function(){PR.prettyPrint&&PR.prettyPrint(null,e.get(0)),e.css("cursor","")})):o=function(){return!1})};i.on(t.evUpdate,function(s){var l,c,d=s.file;d.mime;n.mimeIsText(d.mime)&&(!t.options.getSizeMax||d.size<=t.options.getSizeMax)&&(s.stopImmediatePropagation(),"undefined"==typeof window.PR&&o(),c=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"/></div>').appendTo(t.info.find(".elfinder-quicklook-info")),i.one("change",function(){"pending"==l.state()&&l.reject()}),l=n.request({data:{cmd:"get",target:d.hash,conv:1,_t:d.ts},options:{type:"get",cache:!0},preventDefault:!0}).done(function(o){var s,l,c,p,u=new RegExp("^(data:"+d.mime.replace(/([.+])/g,"\\$1")+";base64,)","i"),h=o.content;t.hideinfo(),window.atob&&(p=h.match(u))&&(h=atob(h.substr(p[1].length))),l=h.length-a,l>100?s=h.substr(0,a)+"...":l=0,c=e('<div class="elfinder-quicklook-preview-text-wrapper"><pre class="elfinder-quicklook-preview-text prettyprint"></pre></div>'),l&&c.append(e('<div class="elfinder-quicklook-preview-charsleft"><hr/><span>'+n.i18n("charsLeft",n.toLocaleString(l))+"</span></div>").on("click",function(){var t=c.scrollTop();e(this).remove(),c.children("pre").removeClass("prettyprinted").text(h).scrollTop(t),r(c,100)})),c.children("pre").text(s||h),c.on("touchstart",function(t){e(this)["scroll"+("ltr"===n.direction?"Right":"Left")]()>5&&(t.originalEvent._preventSwipeX=!0)}).appendTo(i),r(c,100)}).always(function(){c.remove()}))})}],(i.prototype.commands.reload=function(){var t=this,n=!1;this.alwaysEnabled=!0,this.updateOnSelect=!0,this.shortcuts=[{pattern:"ctrl+shift+r f5"}],this.getstate=function(){return 0},this.init=function(){this.fm.bind("search searchend",function(){n="search"==this.type})},this.fm.bind("contextmenu",function(){var n=t.fm;n.options.sync>=1e3&&(t.extra={icon:"accept",node:e("<span/>").attr({title:n.i18n("autoSync")}).on("click touchstart",function(t){"touchstart"===t.type&&t.originalEvent.touches.length>1||(t.stopPropagation(),t.preventDefault(),e(this).parent().toggleClass("ui-state-disabled",n.options.syncStart).parent().removeClass("ui-state-hover"),n.options.syncStart=!n.options.syncStart,n.autoSync(n.options.syncStart?null:"stop"))}).on("ready",function(){e(this).parent().toggleClass("ui-state-disabled",!n.options.syncStart).css("pointer-events","auto")})})}),this.exec=function(){var t=this.fm;if(!n){var i=t.sync(),a=setTimeout(function(){t.notify({type:"reload",cnt:1,hideCnt:!0}),i.always(function(){t.notify({type:"reload",cnt:-1})})},t.notifyDelay);return i.always(function(){clearTimeout(a),t.trigger("reload")})}e("div.elfinder-toolbar > div."+t.res("class","searchbtn")+" > span.ui-icon-search").click()}}).prototype={forceLoad:!0},i.prototype.commands.rename=function(){"use strict";this.alwaysEnabled=!0,this.syncTitleOnChange=!0;var t=this,n=t.fm,i=function(t,i,a,o){var r,s=i?[a.hash].concat(i):[a.hash],l=s.length,c={};if(n.lockfiles({files:s}),n.isRoot(a)){if((r=n.storage("rootNames"))||(r={}),""===o){if(!r[a.hash])return t&&t.reject(),void n.unlockfiles({files:s}).trigger("selectfiles",{files:s});a.name=a._name,a.i18=a._i18,delete r[a.hash],delete a._name,delete a._i18}else"undefined"==typeof a._name&&(a._name=a.name,a._i18=a.i18),a.name=r[a.hash]=o,delete a.i18;return n.storage("rootNames",r),c={changed:[a]},n.updateCache(c),n.change(c),t&&t.resolve(c),void n.unlockfiles({files:s}).trigger("selectfiles",{files:s})}c={cmd:"rename",name:o,target:a.hash},l>1&&(c.targets=i,o.match(/\*/)&&(c.q=o)),n.request({data:c,notify:{type:"rename",cnt:l},navigate:{}}).fail(function(e){var i=n.parseError(e);t&&t.reject(),i&&Array.isArray(i)&&"errRename"===i[0]||n.sync()}).done(function(i){var r;i.added&&i.added.length&&1===l&&(i.undo={cmd:"rename",callback:function(){return n.request({data:{cmd:"rename",target:i.added[0].hash,name:a.name},notify:{type:"undo",cnt:1}})}},i.redo={cmd:"rename",callback:function(){return n.request({data:{cmd:"rename",target:a.hash,name:o},notify:{type:"rename",cnt:1}})}}),t&&t.resolve(i),(r=n.cwd().hash)&&r!==a.hash||n.exec("open",e.map(i.added,function(e){return"directory"===e.mime?e.hash:null})[0])}).always(function(){n.unlockfiles({files:s}).trigger("selectfiles",{files:s})})},a=function(e,t){var i,a,o,r=t||n.selected(),s=n.splitFileExtention(e),l=n.file(r[0]),c=n.file(r[1]);return i=s[1]?"."+s[1]:"",s[1]&&"*"===s[0]?(a='"'+n.splitFileExtention(l.name)[0]+i+'", ',a+='"'+n.splitFileExtention(c.name)[0]+i+'"'):s[0].length>1&&("*"===s[0].substr(-1)?(o=s[0].substr(0,s[0].length-1),a='"'+o+l.name+'", ',a+='"'+o+c.name+'"'):"*"===s[0].substr(0,1)&&(o=s[0].substr(1),a='"'+n.splitFileExtention(l.name)[0]+o+i+'", ',a+='"'+n.splitFileExtention(c.name)[0]+o+i+'"')),a||(a='"'+s[0]+"1"+i+'", "'+s[0]+"2"+i+'"'),r.length>2&&(a+=" ..."),a},o=function(){var o,r=n.selected(),s='<input name="type" type="radio" class="elfinder-tabstop">',l=function(t,i){return e('<label class="elfinder-rename-batch-checks">'+n.i18n(i)+"</label>").prepend(t)},c=e('<input type="text" class="ui-corner-all elfinder-tabstop">'),d=e(s),p=e(s),u=e(s),h=e(s),f=e("<div/>").append(l(d,"plusNumber"),l(p,"asPrefix"),l(u,"asSuffix"),l(h,"changeExtention")),m=e('<div class="elfinder-rename-batch-preview"/>'),g=e('<div class="elfinder-rename-batch"/>').append(e('<div class="elfinder-rename-batch-name"/>').append(c),e('<div class="elfinder-rename-batch-type"/>').append(f),m),v={title:n.i18n("batchRename"),modal:!0,destroyOnClose:!0,width:Math.min(380,n.getUI().width()-20),buttons:{},open:function(){c.on("input",y).trigger("focus")}},b=function(){var e=c.val(),t=n.splitFileExtention(n.file(r[0]).name)[1];return(""!==e||d.is(":checked"))&&(p.is(":checked")?e+="*":u.is(":checked")?e="*"+e+"."+t:h.is(":checked")?e="*."+e:t&&(e+="."+t)),e},y=function(){var e=b();""!==e?m.html(n.i18n(["renameMultiple",r.length,a(e)])):m.empty()},w=f.find("input:radio").on("change",y);v.buttons[n.i18n("btnApply")]=function(){var e,t,a=b();""!==a&&(o.elfinderdialog("close"),t=r,e=n.file(t.shift()),i(void 0,t,e,a))},v.buttons[n.i18n("btnCancel")]=function(){o.elfinderdialog("close")},e.fn.checkboxradio?w.checkboxradio({create:function(e,t){this===d.get(0)&&d.prop("checked",!0).change()}}):f.buttonset({create:function(e,t){d.prop("checked",!0).change()}}),o=t.fmDialog(g,v)};this.noChangeDirOnRemovedCwd=!0,this.shortcuts=[{pattern:"f2"+("mac"==n.OS?" enter":"")},{pattern:"shift+f2",description:"batchRename",callback:function(){n.selected().length>1&&o()}}],this.getstate=function(i){var a,r,s,l,c,d,p=this.files(i),u=p.length;return u?(u>1&&p[0].phash&&(a=p[0].phash,r=n.splitFileExtention(p[0].name)[1].toLowerCase(),s=p[0].mime),1===u&&(d=n.isRoot(p[0])),c=1===u&&(d||!p[0].locked)||n.api>2.103&&u===e.grep(p,function(e){return!(l||e.locked||e.phash!==a||n.isRoot(e)||s!==e.mime&&r!==n.splitFileExtention(e.name)[1].toLowerCase())||(l&&(l=!0),!1)}).length?0:-1,!d&&0===c&&n.option("disabledFlip",p[0].hash).rename&&(c=-1),c!==-1&&u>1?t.extra={icon:"preference",node:e("<span/>").attr({title:n.i18n("batchRename")}).on("click touchstart",function(e){"touchstart"===e.type&&e.originalEvent.touches.length>1||(e.stopPropagation(),e.preventDefault(),n.getUI().trigger("click"),o())})}:delete t.extra,c):-1},this.exec=function(t,o){var r,s=(n.getUI("cwd"),t||!!n.selected().length&&n.selected()||[n.cwd().hash]),l=s.length,c=n.file(s.shift()),d=".elfinder-cwd-filename",p=o||{},u=n.cwd().hash==c.hash,h="navbar"===p._currentType||"files"===p._currentType?p._currentType:u?"navbar":"files",f="files"!==h,m=n[f?"navHash2Elm":"cwdHash2Elm"](c.hash),g=!f&&"list"!=n.storage("view"),v=function(){requestAnimationFrame(function(){x&&x.trigger("blur")})},b=function(){T.is(":hidden")||T.elfinderoverlay("hide").off("click close",A),z.removeClass("ui-front").css("position","").off("unselect."+n.namespace,v),g?C&&C.css("max-height",""):f||z.css("width","").parent("td").css("overflow","")},y=e.Deferred().fail(function(e){var t=x.parent(),i=n.escape(c.i18||c.name);x.off(),g&&(i=i.replace(/([_.])/g,"&#8203;$1")),requestAnimationFrame(function(){f?x.replaceWith(i):t.length?(x.remove(),t.html(i)):m.find(d).html(i)}),e&&n.error(e)}).always(function(){b(),n.unbind("resize",S),n.enable()}),w=function(t){var o=e.trim(x.val()),r=(n.splitFileExtention(o),!0),d=function(){x.off(),b(),f?x.replaceWith(n.escape(o)):C.html(n.escape(o)),i(y,s,c,o)};if(T.is(":hidden")||z.css("z-index",""),""===o){if(!n.isRoot(c))return A();f?x.replaceWith(n.escape(c.name)):C.html(n.escape(c.name))}if(!I&&z.length){if(x.off("blur"),1===l&&o===c.name)return y.reject();if(n.options.validName&&n.options.validName.test)try{r=n.options.validName.test(o)}catch(t){r=!1}if("."===o||".."===o||!r)return I=!0,n.error("directory"===c.mime?"errInvDirname":"errInvName",{modal:!0,close:function(){setTimeout(k,120)}}),!1;if(1===l&&n.fileByName(o,c.phash))return I=!0,n.error(["errExists",o],{modal:!0,close:function(){setTimeout(k,120)}}),!1;1===l?d():(n.confirm({title:"cmdrename",text:["renameMultiple",l,a(o,[c.hash].concat(s))],accept:{label:"btnYes",callback:d},cancel:{label:"btnCancel",callback:function(){setTimeout(function(){I=!0,k()},120)}}}),setTimeout(function(){n.trigger("unselectfiles",{files:n.selected()}).trigger("selectfiles",{files:[c.hash].concat(s)})},120))}},x=e(g?"<textarea/>":'<input type="text"/>').on("keyup text",function(){g?(this.style.height="1px",this.style.height=this.scrollHeight+"px"):r&&(this.style.width=r+"px",this.scrollWidth>r&&(this.style.width=this.scrollWidth+10+"px"))}).on("keydown",function(t){t.stopImmediatePropagation(),t.keyCode==e.ui.keyCode.ESCAPE?y.reject():t.keyCode==e.ui.keyCode.ENTER&&(t.preventDefault(),x.trigger("blur"))}).on("mousedown click dblclick",function(e){e.stopPropagation(),"dblclick"===e.type&&e.preventDefault()}).on("blur",w).on("dragenter dragleave dragover drop",function(e){e.stopPropagation()}),k=function(){var e=n.splitFileExtention(x.val())[0];I||!n.UA.Mobile||n.UA.iOS||(T.on("click close",A).elfinderoverlay("show"),z.css("z-index",T.css("z-index")+1)),!n.enabled()&&n.enable(),I&&(I=!1,x.on("blur",w)),x.trigger("focus").trigger("select"),x[0].setSelectionRange&&x[0].setSelectionRange(0,e.length)},C=f?m.contents().filter(function(){return 3==this.nodeType&&e(this).parent().attr("id")===n.navHash2Id(c.hash)}):m.find(d),z=C.parent(),T=n.getUI("overlay"),A=function(e){T.is(":hidden")||z.css("z-index",""),I||(y.reject(),e&&(e.stopPropagation(),e.preventDefault()))},S=function(){m.trigger("scrolltoview",{blink:!1})},I=!1;return z.addClass("ui-front").css("position","relative").on("unselect."+n.namespace,v),n.bind("resize",S),f?C.replaceWith(x.val(c.name)):(g?C.css("max-height","none"):f||(r=z.width(),z.width(r-15).parent("td").css("overflow","visible")),C.empty().append(x.val(c.name))),l>1&&n.api<=2.103?y.reject():c&&C.length?c.locked&&!n.isRoot(c)?y.reject(["errLocked",c.name]):(n.one("select",function(){x.parent().length&&c&&e.inArray(c.hash,n.selected())===-1&&x.trigger("blur")}),x.trigger("keyup"),k(),y):y.reject("errCmdParams",this.title)},n.bind("select contextmenucreate closecontextmenu",function(e){var i,a=(e.data?e.data.selected||e.data.targets:null)||n.selected();a&&1===a.length&&(i=n.file(a[0]))&&n.isRoot(i)?t.title=n.i18n("kindAlias")+" ("+n.i18n("preference")+")":t.title=n.i18n("cmdrename"),"closecontextmenu"!==e.type?t.update(void 0,t.title):requestAnimationFrame(function(){t.update(void 0,t.title)})}).remove(function(t){var i;t.data&&t.data.removed&&(i=n.storage("rootNames"))&&(e.each(t.data.removed,function(e,t){i[t]&&delete i[t]}),n.storage("rootNames",i))})},i.prototype.commands.resize=function(){"use strict";var t=0,n=function(t,n,i){var a=[{x:t/2,y:n/2},{x:-t/2,y:n/2},{x:-t/2,y:-n/2},{x:t/2,y:-n/2}],o=[],r={x:Number.MAX_VALUE,y:Number.MAX_VALUE},s={x:Number.MIN_VALUE,y:Number.MIN_VALUE};return e.each(a,function(e,t){o.push({x:t.x*Math.cos(i)-t.y*Math.sin(i),y:t.x*Math.sin(i)+t.y*Math.cos(i)})}),e.each(o,function(e,t){r.x=Math.min(r.x,t.x),r.y=Math.min(r.y,t.y),s.x=Math.max(s.x,t.x),s.y=Math.max(s.y,t.y)}),{width:s.x-r.x,height:s.y-r.y}};this.updateOnSelect=!1,this.getstate=function(){var e=this.fm.selectedFiles();return 1==e.length&&e[0].read&&e[0].write&&e[0].mime.indexOf("image/")!==-1?0:-1},this.resizeRequest=function(t,n,i){var a=this.fm,o=n||a.file(t.target),r=(o?o.tmb:null,a.isCommandEnabled("resize",t.target));if(r&&(!o||o&&o.read&&o.write&&o.mime.indexOf("image/")!==-1))return a.request({data:Object.assign(t,{cmd:"resize"}),notify:{type:"resize",cnt:1}}).fail(function(e){i&&i.reject(e)}).done(function(){t.quality&&a.storage("jpgQuality",t.quality===a.option("jpgQuality")?null:t.quality),i&&i.resolve()});var s;return s=o?o.mime.indexOf("image/")===-1?["errResize",o.name,"errUsupportType"]:["errResize",o.name,"errPerm"]:["errResize",t.target,"errPerm"],i?i.reject(s):a.error(s),e.Deferred().reject(s)},this.exec=function(i){var a,o,r=this,s=this.fm,l=this.files(i),c=e.Deferred(),d=s.api>1,p=this.options,u=650,h=s.getUI(),f=e().controlgroup?"controlgroup":"buttonset",m="undefined"==typeof p.grid8px||"disable"!==p.grid8px,g=Array.isArray(p.presetSize)?p.presetSize:[],v="elfinder-dialog-active",b=s.res("class","editing"),y=function(i,a){var o,l,y,w,x,k="image/jpeg"===i.mime,C=e('<div class="elfinder-resize-container"/>'),z='<input type="number" class="ui-corner-all"/>',T='<div class="elfinder-resize-row"/>',A='<div class="elfinder-resize-label"/>',S=null,I=!1,O=function(){I=!0},j=function(){I&&(I=!1,M.trigger("change"))},M=e('<div class="elfinder-resize-control"/>').on("focus","input[type=text],input[type=number]",function(){e(this).trigger("select")}).on("change",function(){S&&cancelAnimationFrame(S),S=requestAnimationFrame(function(){var e,t,i,a,o,r,l,c,d,p,u,h;nt&&!I&&(i=nt.data("canvas"))&&(e=M.children("div.elfinder-resize-control-panel:visible"),t=e.find("input.elfinder-resize-quality"),t.is(":visible")&&(a=nt.data("ctx"),o=nt.get(0),e.hasClass("elfinder-resize-uiresize")?(c=i.width=$.val(),d=i.height=K.val(),a.drawImage(o,0,0,c,d)):e.hasClass("elfinder-resize-uicrop")?(r=V.val(),l=X.val(),c=J.val(),d=G.val(),i.width=c,i.height=d,a.drawImage(o,r,l,c,d,0,0,c,d)):(p=Q.val(),u=Q.val()*Math.PI/180,h=n(pe,ue,u),c=i.width=h.width,d=i.height=h.height,a.save(),p%90!==0&&(a.fillStyle=se.val()||"#FFF",a.fillRect(0,0,c,d)),a.translate(c/2,d/2),a.rotate(u),a.drawImage(o,-o.width/2,-o.height/2,pe,ue),a.restore()),i.toBlob(function(e){e&&t.next("span").text(" ("+s.formatSize(e.size)+")")},"image/jpeg",Math.max(Math.min(t.val(),100),1)/100)))})}).on("mouseup","input",function(t){e(t.target).trigger("change")}),F=e('<div class="elfinder-resize-preview"/>').on("touchmove",function(t){e(t.target).hasClass("touch-punch")&&(t.stopPropagation(),t.preventDefault())}),D=e('<div class="elfinder-resize-loading">'+s.i18n("ntfloadimg")+"</div>"),E=e('<div class="elfinder-resize-handle touch-punch"/>'),U=e('<div class="elfinder-resize-handle touch-punch"/>'),P=e('<div class="elfinder-resize-uiresize elfinder-resize-control-panel"/>'),R=e('<div class="elfinder-resize-uicrop elfinder-resize-control-panel"/>'),q=e('<div class="elfinder-resize-rotate elfinder-resize-control-panel"/>'),H=e("<button/>").attr("title",s.i18n("rotate-cw")).append(e('<span class="elfinder-button-icon elfinder-button-icon-rotate-l"/>')),_=e("<button/>").attr("title",s.i18n("rotate-ccw")).append(e('<span class="elfinder-button-icon elfinder-button-icon-rotate-r"/>')),N=e("<span />"),L=e('<button class="elfinder-resize-reset">').text(s.i18n("reset")).on("click",function(){_e()}).button({icons:{primary:"ui-icon-arrowrefresh-1-n"},text:!1}),W=e('<div class="elfinder-resize-type"/>').append('<input type="radio" name="type" id="'+a+'-resize" value="resize" checked="checked" /><label for="'+a+'-resize">'+s.i18n("resize")+"</label>",'<input class="api2" type="radio" name="type" id="'+a+'-crop" value="crop" /><label class="api2" for="'+a+'-crop">'+s.i18n("crop")+"</label>",'<input class="api2" type="radio" name="type" id="'+a+'-rotate" value="rotate" /><label class="api2" for="'+a+'-rotate">'+s.i18n("rotate")+"</label>"),B="resize",$=(W[f]()[f]("disable").find("input").on("change",function(){B=e(this).val(),_e(),Be(!0),$e(!0),Ke(!0),"resize"==B?(P.show(),q.hide(),R.hide(),Be(),k&&Ce.insertAfter(P.find(".elfinder-resize-grid8"))):"crop"==B?(q.hide(),P.hide(),R.show(),$e(),k&&Ce.insertAfter(R.find(".elfinder-resize-grid8"))):"rotate"==B&&(P.hide(),R.hide(),q.show(),Ke())}),e(z).on("change",function(){var e=He(parseInt($.val())),t=He(he?e/ce:parseInt(K.val()));e>0&&t>0&&(Ne.updateView(e,t),$.val(e),K.val(t))}).addClass("elfinder-focus")),K=e(z).on("change",function(){var e=He(parseInt(K.val())),t=He(he?e*ce:parseInt($.val()));t>0&&e>0&&(Ne.updateView(t,e),$.val(t),K.val(e))}),V=e(z).on("change",function(){Le.updateView()}),X=e(z).on("change",function(){Le.updateView()}),J=e(z).on("change",function(){Le.updateView("w")}),G=e(z).on("change",function(){Le.updateView("h")}),Y=k&&d?e(z).val(s.storage("jpgQuality")>0?s.storage("jpgQuality"):s.option("jpgQuality")).addClass("elfinder-resize-quality").attr("min","1").attr("max","100").attr("title","1 - 100").on("blur",function(){var e=Math.min(100,Math.max(1,parseInt(this.value)));M.find("input.elfinder-resize-quality").val(e)}):null,Q=e('<input type="number" class="ui-corner-all" maxlength="3" value="0" />').on("change",function(){We.update()}),Z=e('<div class="elfinder-resize-rotate-slider touch-punch"/>').slider({min:0,max:360,value:Q.val(),animate:!0,start:O,stop:j,change:function(e,t){t.value!=Z.slider("value")&&We.update(t.value)},slide:function(e,t){We.update(t.value,!1)}}).find(".ui-slider-handle").addClass("elfinder-tabstop").off("keydown").on("keydown",function(t){t.keyCode!=e.ui.keyCode.LEFT&&t.keyCode!=e.ui.keyCode.RIGHT||(t.stopPropagation(),t.preventDefault(),We.update(Number(Q.val())+(t.keyCode==e.ui.keyCode.RIGHT?1:-1),!1))}).end(),ee={},te=function(e){var t,n,i,a,o,r,s;try{t=ee[Math.round(e.offsetX)][Math.round(e.offsetY)]}catch(e){}t&&(n=t[0],i=t[1],a=t[2],o=t[3],r=t[4],s=t[5],ie(n,i,a,"click"===e.type))},ne=function(t){ie(e(this).css("backgroundColor"),"","","click"===t.type)},ie=function(t,n,i,a){var o,r,s;"string"==typeof t&&(n="",t&&(o=e("<span>").css("backgroundColor",t).css("backgroundColor"))&&(r=o.match(/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i))&&(t=Number(r[1]),n=Number(r[2]),i=Number(r[3]))),s=""===n?t:"#"+ae(t,n,i),se.val(s).css({backgroundColor:s,backgroundImage:"none",color:t+n+i<384?"#fff":"#000"}),F.css("backgroundColor",s),a&&(qe.off(".picker").removeClass("elfinder-resize-picking"),le.off(".picker").removeClass("elfinder-resize-picking"))},ae=function(t,n,i){return e.map([t,n,i],function(e){return("0"+parseInt(e).toString(16)).slice(-2)}).join("")},oe=e("<button>").text(s.i18n("colorPicker")).on("click",function(){qe.on("mousemove.picker click.picker",te).addClass("elfinder-resize-picking"),le.on("mousemove.picker click.picker","span",ne).addClass("elfinder-resize-picking")}).button({icons:{primary:"ui-icon-pin-s"},text:!1}),re=e("<button>").text(s.i18n("reset")).on("click",function(){ie("","","",!0)}).button({icons:{primary:"ui-icon-arrowrefresh-1-n"},text:!1}),se=e('<input class="ui-corner-all elfinder-resize-bg" type="text">').on("focus",function(){e(this).attr("style","")}).on("blur",function(){ie(e(this).val())}),le=e('<div class="elfinder-resize-pallet">').on("click","span",function(){ie(e(this).css("backgroundColor"))}),ce=1,de=1,pe=0,ue=0,he=!0,fe=!1,me=0,ge=0,ve=0,be=0,ye=0,we=!!k&&m,xe=e("<button>").html(s.i18n("aspectRatio")).on("click",function(){he=!he,xe.button("option",{icons:{primary:he?"ui-icon-locked":"ui-icon-unlocked"}}),Ne.fixHeight(),E.resizable("option","aspectRatio",he).data("uiResizable")._aspectRatio=he}).button({icons:{primary:he?"ui-icon-locked":"ui-icon-unlocked"},text:!1}),ke=e("<button>").html(s.i18n("aspectRatio")).on("click",function(){fe=!fe,ke.button("option",{icons:{primary:fe?"ui-icon-locked":"ui-icon-unlocked"}}),U.resizable("option","aspectRatio",fe).data("uiResizable")._aspectRatio=fe}).button({icons:{primary:fe?"ui-icon-locked":"ui-icon-unlocked"},text:!1}),Ce=e("<button>").html(s.i18n(we?"enabled":"disabled")).toggleClass("ui-state-active",we).on("click",function(){we=!we,Ce.html(s.i18n(we?"enabled":"disabled")).toggleClass("ui-state-active",we),ze()}).button(),ze=function(){var t=we?8:1;e.each([$,K,J,G,V,X],function(){this.attr("step",t)}),we&&($.val(He($.val())),K.val(He(K.val())),J.val(He(J.val())),G.val(He(G.val())),V.val(He(V.val())),X.val(He(X.val())),P.is(":visible")?Ne.updateView($.val(),K.val()):R.is(":visible")&&Le.updateView())},Te=function(){var t,n=function(){se.parent().hide(),le.hide()};t=Math.min(me,ge)/Math.sqrt(Math.pow(pe,2)+Math.pow(ue,2)),ve=Math.ceil(pe*t),be=Math.ceil(ue*t),qe.width(ve).height(be).css("margin-top",(ge-be)/2+"px").css("margin-left",(me-ve)/2+"px"),qe.is(":visible")&&se.is(":visible")&&("image/png"!==i.mime?(F.css("backgroundColor",se.val()),o=e("<img>"),s.isCORS&&o.attr("crossorigin","use-credentials"),o.on("load",function(){l&&l.width!==ve&&Se()}).on("error",n).attr("src",tt)):n())},Ae=function(){Ne.updateView(pe,ue),Te(),Ue.width(Ee.width()).height(Ee.height()),Pe.width(Ee.width()).height(Ee.height()),Le.updateView(),it()},Se=function(){if(y){var t,n,i,a,r,s,c,d,p,u,h,f,m,g,v,b,w,x,k,C={},z=[],T=function(e,t,n){var i,a,o,r=Math.max(Math.max(e,t),n),s=Math.min(Math.min(e,t),n);return r===s?i=0:e===r?i=((t-n)/(r-s)*60+360)%360:t===r?i=(n-e)/(r-s)*60+120:n===r&&(i=(e-t)/(r-s)*60+240),a=(r-s)/r,o=(.3*e+.59*t+.11*n)/255,[i,a,o,"hsl"]},A=function(e){return 8*Math.round(e/8)};e:try{n=l.width=qe.width(),i=l.height=qe.height(),m=n/pe,y.scale(m,m),y.drawImage(o.get(0),0,0),f=y.getImageData(0,0,n,i).data,g=.1*n,v=.9*n,b=.1*i,w=.9*i;for(var S=0;S<i-1;S++)for(var I=0;I<n-1;I++){if(t=4*I+S*n*4,a=f[t],r=f[t+1],s=f[t+2],c=f[t+3],255!==c){se.parent().hide(),le.hide();break e}u=T(a,r,s),h=Math.round(u[0]),d=Math.round(100*u[1]),p=Math.round(100*u[2]),ee[I]||(ee[I]={}),ee[I][S]=[a,r,s,h,d,p],(I<g||I>v)&&(S<b||S>w)&&(x=A(a)+","+A(r)+","+A(s),C[x]?++C[x]:C[x]=1)}le.children(":first").length||(k=1,e.each(C,function(e,t){z.push({c:e,v:t})}),e.each(z.sort(function(e,t){return e.v>t.v?-1:1}),function(){return!(this.v<2||k>10)&&(le.append(e('<span style="width:20px;height:20px;display:inline-block;background-color:rgb('+this.c+');">')),void++k)}))}catch(O){oe.hide(),le.hide()}}},Ie=function(){try{l=document.createElement("canvas"),y=l.getContext("2d")}catch(e){oe.hide(),le.hide()}},Oe=function(){ot.on("click","span.elfinder-resize-preset",function(){var t=e(this),n=t.data("s")[0],i=t.data("s")[1],a=pe/ue;t.data("s",[i,n]).text(i+"x"+n),pe>n||ue>i?pe<=n?n=He(i*a):ue<=i?i=He(n/a):pe-n>ue-i?i=He(n/a):n=He(i*a):(n=pe,i=ue),$.val(n),K.val(i),Ne.updateView(n,i),it()}),rt.on("click","span.elfinder-resize-preset",function(){var t=e(this),n=t.data("s")[0],i=t.data("s")[1],a=V.val(),o=X.val();t.data("s",[i,n]).text(i+"x"+n),pe>=n&&ue>=i&&(pe-n-a<0&&(a=pe-n),ue-i-o<0&&(o=ue-i),V.val(a),X.val(o),J.val(n),G.val(i),Le.updateView(),it())}),rt.children("span.elfinder-resize-preset").each(function(){var t=e(this),n=t.data("s")[0],i=t.data("s")[1];t[pe>=n&&ue>=i?"show":"hide"]()})},je=null,Me=!1,Fe=function(e){var t=s.file(i.hash);t.width=e[0],t.height=e[1]},De=function(){var n,a,o;Me||(Me=!0,je&&je.state&&"pending"===je.state()&&je.reject(),s.api>=2.103?0===t&&s.request({data:{cmd:"resize",target:i.hash,degree:0,mode:"rotate"},preventDefault:!0}).done(function(e){t=e.losslessRotate?1:-1,1===t&&Q.val()%90===0&&q.children("div.elfinder-resize-quality").hide()}).fail(function(){t=-1}):t=-1,n=Ee.get(0),a=i.width&&i.height?{w:i.width,h:i.height}:n.naturalWidth?null:{w:Ee.width(),h:Ee.height()},a&&Ee.removeAttr("width").removeAttr("height"),pe=i.width||n.naturalWidth||n.width||Ee.width(),ue=i.height||n.naturalHeight||n.height||Ee.height(),i.width&&i.height||Fe([pe,ue]),a&&Ee.width(a.w).height(a.h),w.show(),o=ue/pe,o<1&&F.height()>F.width()*o&&F.height(F.width()*o),F.height()>Ee.height()+20&&F.height(Ee.height()+20),ge=F.height()-(E.outerHeight()-E.height()),D.remove(),ce=pe/ue,E.append(Ee.show()).show(),$.val(pe),K.val(ue),Ie(),Oe(),Ae(),W[f]("enable"),M.find("input,select").prop("disabled",!1).filter(":text").on("keydown",function(t){var n;if(t.keyCode==e.ui.keyCode.ENTER)return t.stopPropagation(),t.preventDefault(),n={title:e("input:checked",W).val(),text:"confirmReq",accept:{label:"btnApply",callback:function(){Xe()}},cancel:{label:"btnCancel",callback:function(){e(this).trigger("focus")}}},st&&(n.buttons=[{label:"btnSaveAs",callback:function(){requestAnimationFrame(Je)}}]),void s.confirm(n)}).on("keyup",function(){var t=e(this);t.hasClass("elfinder-resize-bg")||requestAnimationFrame(function(){t.val(t.val().replace(/[^0-9]/g,""))})}).filter(":first"),ze(),!s.UA.Mobile&&$.trigger("focus"),Be())},Ee=e("<img/>").on("load",De).on("error",function(){D.text("Unable to load image").css("background","transparent")}),Ue=e("<div/>"),Pe=e("<img/>"),Re=e("<div/>"),qe=e('<img class="elfinder-resize-imgrotate" />'),He=function(e,t){return e=we?8*Math.round(e/8):Math.round(e),e=Math.max(0,e),t&&e>t&&(e=we?8*Math.floor(t/8):t),e},_e=function(){$.val(pe),K.val(ue),Ne.updateView(pe,ue),V.val(0),X.val(0),J.val(pe),G.val(ue),Le.updateView(),it()},Ne={update:function(){$.val(He(Ee.width()/de)),K.val(He(Ee.height()/de)),it()},updateView:function(e,t){e>me||t>ge?e/me>t/ge?(de=me/e,Ee.width(me).height(He(t*de))):(de=ge/t,Ee.height(ge).width(He(e*de))):Ee.width(He(e)).height(He(t)),de=Ee.width()/e,N.text("1 : "+(1/de).toFixed(2)),Ne.updateHandle()},updateHandle:function(){E.width(Ee.width()).height(Ee.height())},fixHeight:function(){var e,t;he&&(e=$.val(),t=He(e/ce),Ne.updateView(e,t),K.val(t))}},Le={
24
- update:function(e){V.val(He((U.data("x")||U.position().left)/de,pe)),X.val(He((U.data("y")||U.position().top)/de,ue)),"xy"!==e&&(J.val(He((U.data("w")||U.width())/de,pe-V.val())),G.val(He((U.data("h")||U.height())/de,ue-X.val()))),it()},updateView:function(e){var t,n,i,a,o;V.val(He(V.val(),pe-(we?8:1))),X.val(He(X.val(),ue-(we?8:1))),J.val(He(J.val(),pe-V.val())),G.val(He(G.val(),ue-X.val())),fe&&(t=Re.width()/Re.height(),"w"===e?G.val(He(parseInt(J.val())/t)):"h"===e&&J.val(He(parseInt(G.val())*t))),n=Math.round(parseInt(V.val())*de),i=Math.round(parseInt(X.val())*de),"xy"!==e?(a=Math.round(parseInt(J.val())*de),o=Math.round(parseInt(G.val())*de)):(a=U.data("w"),o=U.data("h")),U.data({x:n,y:i,w:a,h:o}).width(a).height(o).css({left:n,top:i}),Re.width(a).height(o)},resize_update:function(e,t){U.data({x:t.position.left,y:t.position.top,w:t.size.width,h:t.size.height}),Le.update(),Le.updateView()},drag_update:function(e,t){U.data({x:t.position.left,y:t.position.top}),Le.update("xy")}},We={mouseStartAngle:0,imageStartAngle:0,imageBeingRotated:!1,setQuality:function(){q.children("div.elfinder-resize-quality")[t>0&&Q.val()%90===0?"hide":"show"]()},update:function(e,t){"undefined"==typeof e&&(ye=e=parseInt(Q.val())),"undefined"==typeof t&&(t=!0),!t||s.UA.Opera||s.UA.ltIE8?qe.rotate(e):qe.animate({rotate:e+"deg"}),e%=360,e<0&&(e+=360),Q.val(parseInt(e)),Z.slider("value",Q.val()),We.setQuality()},execute:function(e){if(We.imageBeingRotated){var t=We.getCenter(qe),n=e.originalEvent.touches?e.originalEvent.touches[0]:e,i=n.pageX-t[0],a=n.pageY-t[1],o=Math.atan2(a,i),r=o-We.mouseStartAngle+We.imageStartAngle;return r=Math.round(180*parseFloat(r)/Math.PI),e.shiftKey&&(r=15*Math.round((r+6)/15)),qe.rotate(r),r%=360,r<0&&(r+=360),Q.val(r),Z.slider("value",Q.val()),We.setQuality(),!1}},start:function(t){if(!qe.hasClass("elfinder-resize-picking")){O(),We.imageBeingRotated=!0;var n=We.getCenter(qe),i=t.originalEvent.touches?t.originalEvent.touches[0]:t,a=i.pageX-n[0],o=i.pageY-n[1];return We.mouseStartAngle=Math.atan2(o,a),We.imageStartAngle=parseFloat(qe.rotate())*Math.PI/180,e(document).on("mousemove",We.execute),qe.on("touchmove",We.execute),!1}},stop:function(t){if(We.imageBeingRotated)return e(document).off("mousemove",We.execute),qe.off("touchmove",We.execute),requestAnimationFrame(function(){We.imageBeingRotated=!1}),j(),!1},getCenter:function(e){var t=qe.rotate();qe.rotate(0);var n=qe.offset(),i=n.left+qe.width()/2,a=n.top+qe.height()/2;return qe.rotate(t),Array(i,a)}},Be=function(e){e?(E.filter(":ui-resizable").resizable("destroy"),E.hide()):(E.show(),E.resizable({alsoResize:Ee,aspectRatio:he,resize:Ne.update,start:O,stop:function(e){Ne.fixHeight,Ne.updateView($.val(),K.val()),j()}}),at())},$e=function(e){e?(U.filter(":ui-resizable").resizable("destroy").filter(":ui-draggable").draggable("destroy"),Ue.hide()):(Ue.show(),U.resizable({containment:Ue,aspectRatio:fe,resize:Le.resize_update,start:O,stop:j,handles:"all"}).draggable({handle:Re,containment:Pe,drag:Le.drag_update,start:O,stop:function(){Le.updateView("xy"),j()}}),at(),Le.update())},Ke=function(e){e?qe.hide():(qe.show(),at())},Ve=function(){var e,t,n,i,a,o,r="";if("resize"==B)e=parseInt($.val())||0,t=parseInt(K.val())||0;else if("crop"==B)e=parseInt(J.val())||0,t=parseInt(G.val())||0,n=parseInt(V.val())||0,i=parseInt(X.val())||0;else if("rotate"==B){if(e=pe,t=ue,a=parseInt(Q.val())||0,a<0||a>360)return s.error("Invalid rotate degree"),!1;if(0==a||360==a)return s.error("errResizeNoChange"),!1;r=se.val()}if(o=Y?parseInt(Y.val()):0,"rotate"!=B){if(e<=0||t<=0)return s.error("Invalid image size"),!1;if(e==pe&&t==ue)return s.error("errResizeNoChange"),!1}return{w:e,h:t,x:n,y:i,d:a,q:o,b:r}},Xe=function(){var e;(e=Ve())&&(C.elfinderdialog("close"),r.resizeRequest({target:i.hash,width:e.w,height:e.h,x:e.x,y:e.y,degree:e.d,quality:e.q,bg:e.b,mode:B},i,c))},Je=function(){var t,n=function(){t.addClass(b).fadeIn(function(){x.addClass(v)}),s.disable()},a=function(){r.mime=i.mime,r.prefix=i.name.replace(/ \d+(\.[^.]+)?$/,"$1"),r.requestCmd="mkfile",r.nextAction={},r.data={target:i.phash},e.proxy(s.res("mixin","make"),r)().done(function(a){var o,r;a.added&&a.added.length?(o=a.added[0].hash,r=s.api<2.1032?s.url(i.hash,{async:!0,temporary:!0}):null,e.when(r).done(function(e){s.request({options:{type:"post"},data:{cmd:"put",target:o,encoding:r?"scheme":"hash",content:r?s.convAbsUrl(e):i.hash},notify:{type:"copy",cnt:1},syncOnFail:!0}).fail(n).done(function(e){e=s.normalize(e),s.updateCache(e),i=s.file(o),e.changed&&e.changed.length&&s.change(e),x.show().find(".elfinder-dialog-title").html(s.escape(i.name)),Xe(),t.fadeIn()})}).fail(n)):n()}).fail(n).always(function(){delete r.mime,delete r.prefix,delete r.nextAction,delete r.data}),s.trigger("unselectfiles",{files:[i.hash]})},o=null;Ve()&&(t=h.children("."+r.dialogClass+":visible").removeClass(b).fadeOut(),x.removeClass(v),s.enable(),s.searchStatus.state<2&&i.phash!==s.cwd().hash&&(o=s.exec("open",[i.phash],{thash:i.phash})),e.when([o]).done(function(){o?s.one("cwdrender",a):a()}).fail(n))},Ge={},Ye="elfinder-resize-handle-hline",Qe="elfinder-resize-handle-vline",Ze="elfinder-resize-handle-point",et=s.openUrl(i.hash),tt=s.openUrl(i.hash,!s.isSameOrigin(et)),nt=Y?e("<img>").attr("crossorigin",s.isCORS?"use-credentials":"").attr("src",tt).on("load",function(){try{var e=document.createElement("canvas");nt.data("canvas",e).data("ctx",e.getContext("2d")),it()}catch(t){nt.removeData("canvas").removeData("ctx")}}):null,it=function(){M.find("input.elfinder-resize-quality:visible").trigger("change")},at=function(t){if(!x.hasClass("elfinder-dialog-minimized")&&!x.is(":hidden")){ot.hide(),rt.hide();var n,i,a,o=s.options.dialogContained?h:e(window),r=o.height(),l=o.width(),c="auto",d=!0;x.width(Math.min(u,l-30)),F.attr("style",""),pe&&ue&&(me=F.width()-(E.outerWidth()-E.width()),ge=F.height()-(E.outerHeight()-E.height()),Ne.updateView(pe,ue)),i=C.find("div.elfinder-resize-control").width(),a=F.width(),n=C.width()-20,a>n?(F.width(n),d=!1):n-a<i&&(l>r?F.width(n-i-20):(F.css({"float":"none",marginLeft:"auto",marginRight:"auto"}),d=!1)),d&&(c=i),me=F.width()-(E.outerWidth()-E.width()),h.hasClass("elfinder-fullscreen")?x.height()>r&&(r-=2,F.height(r-x.height()+F.height()),x.css("top",0-h.offset().top)):(r-=30,F.height()>r&&F.height(r)),ge=F.height()-(E.outerHeight()-E.height()),pe&&ue&&Ae(),Ee.height()&&F.height()>Ee.height()+20&&(F.height(Ee.height()+20),ge=F.height()-(E.outerHeight()-E.height()),Te()),ot.css("width",c).show(),rt.css("width",c).show(),rt.children("span.elfinder-resize-preset:visible").length||rt.hide()}},ot=function(){var t,n=e('<fieldset class="elfinder-resize-preset-container">').append(e("<legend>").html(s.i18n("presets"))).hide();return e.each(g,function(i,a){2===a.length&&(t=!0,n.append(e('<span class="elfinder-resize-preset"/>').data("s",a).text(a[0]+"x"+a[1]).button()))}),t?n:e()}(),rt=ot.clone(!0),st=s.uploadMimeCheck(i.mime,i.phash);P.append(e(T).append(e(A).text(s.i18n("width")),$),e(T).append(e(A).text(s.i18n("height")),K,e('<div class="elfinder-resize-whctrls">').append(xe,L)),Y?e(T).append(e(A).text(s.i18n("quality")),Y,e("<span/>")):e(),k?e(T).append(e(A).text(s.i18n("8pxgrid")).addClass("elfinder-resize-grid8"),Ce):e(),e(T).append(e(A).text(s.i18n("scale")),N),e(T).append(ot)),d&&(R.append(e(T).append(e(A).text("X"),V),e(T).append(e(A).text("Y")).append(X),e(T).append(e(A).text(s.i18n("width")),J),e(T).append(e(A).text(s.i18n("height")),G,e('<div class="elfinder-resize-whctrls">').append(ke,L.clone(!0))),Y?e(T).append(e(A).text(s.i18n("quality")),Y.clone(!0),e("<span/>")):e(),k?e(T).append(e(A).text(s.i18n("8pxgrid")).addClass("elfinder-resize-grid8")):e(),e(T).append(rt)),q.append(e(T).addClass("elfinder-resize-degree").append(e(A).text(s.i18n("rotate")),Q,e("<span/>").text(s.i18n("degree")),e("<div/>").append(H,_)[f]()),e(T).css("height","20px").append(Z),Y?e(T)[t<1?"show":"hide"]().addClass("elfinder-resize-quality").append(e(A).text(s.i18n("quality")),Y.clone(!0),e("<span/>")):e(),e(T).append(e(A).text(s.i18n("bgcolor")),se,oe,re),e(T).css("height","20px").append(le)),H.on("click",function(){ye-=90,We.update(ye)}),_.on("click",function(){ye+=90,We.update(ye)})),C.append(W).on("resize",function(e){e.stopPropagation()}),d?M.append(P,R.hide(),q.hide()):M.append(P),E.append('<div class="'+Ye+" "+Ye+'-top"/>','<div class="'+Ye+" "+Ye+'-bottom"/>','<div class="'+Qe+" "+Qe+'-left"/>','<div class="'+Qe+" "+Qe+'-right"/>','<div class="'+Ze+" "+Ze+'-e"/>','<div class="'+Ze+" "+Ze+'-se"/>','<div class="'+Ze+" "+Ze+'-s"/>'),F.append(D).append(E.hide()).append(Ee.hide()),d&&(U.css("position","absolute").append('<div class="'+Ye+" "+Ye+'-top"/>','<div class="'+Ye+" "+Ye+'-bottom"/>','<div class="'+Qe+" "+Qe+'-left"/>','<div class="'+Qe+" "+Qe+'-right"/>','<div class="'+Ze+" "+Ze+'-n"/>','<div class="'+Ze+" "+Ze+'-e"/>','<div class="'+Ze+" "+Ze+'-s"/>','<div class="'+Ze+" "+Ze+'-w"/>','<div class="'+Ze+" "+Ze+'-ne"/>','<div class="'+Ze+" "+Ze+'-se"/>','<div class="'+Ze+" "+Ze+'-sw"/>','<div class="'+Ze+" "+Ze+'-nw"/>'),F.append(Ue.css("position","absolute").hide().append(Pe,U.append(Re))),F.append(qe.hide())),F.css("overflow","hidden"),C.append(F,M),Ge[s.i18n("btnApply")]=Xe,st&&(Ge[s.i18n("btnSaveAs")]=function(){requestAnimationFrame(Je)}),Ge[s.i18n("btnCancel")]=function(){C.elfinderdialog("close")},C.find("input,button").addClass("elfinder-tabstop"),x=r.fmDialog(C,{title:s.escape(i.name),width:u,resizable:!1,buttons:Ge,open:function(){var e=!!(s.option("substituteImg",i.hash)&&i.size>p.dimSubImgSize),t=!(!i.width||!i.height);if(C.parent().css("overflow","hidden"),w=x.find(".ui-dialog-titlebar .elfinder-titlebar-minimize").hide(),s.bind("resize",at),Ee.attr("src",et),Pe.attr("src",et),qe.attr("src",et),d&&(qe.on("mousedown touchstart",We.start).on("touchend",We.stop),x.on("mouseup",We.stop)),t&&!e)return De();if(i.size>(p.getDimThreshold||0))je=s.request({data:{cmd:"dim",target:i.hash,substitute:e?400:""},preventDefault:!0}).done(function(e){if(e.dim){var t=e.dim.split("x");return i.width=t[0],i.height=t[1],Fe(t),e.url&&(Ee.attr("src",e.url),Pe.attr("src",e.url),qe.attr("src",e.url)),De()}});else if(t)return De()},close:function(){d&&(qe.off("mousedown touchstart",We.start).off("touchend",We.stop),e(document).off("mouseup",We.stop)),s.unbind("resize",at),e(this).elfinderdialog("destroy")},resize:function(e,t){t&&"off"===t.minimize&&at()}}).attr("id",a).closest(".ui-dialog").addClass(b),s.UA.ltIE8&&e(".elfinder-dialog").css("filter",""),Re.css({opacity:.2,"background-color":"#fff",position:"absolute"}),U.css("cursor","move"),U.find(".elfinder-resize-handle-point").css({"background-color":"#fff",opacity:.5,"border-color":"#000"}),d||W.find(".api2").remove(),M.find("input,select").prop("disabled",!0),M.find("input.elfinder-resize-quality").next("span").addClass("elfinder-resize-jpgsize").attr("title",s.i18n("roughFileSize"))};return l.length&&l[0].mime.indexOf("image/")!==-1?(a="resize-"+s.namespace+"-"+l[0].hash,o=h.find("#"+a),o.length?(o.elfinderdialog("toTop"),c.resolve()):(y(l[0],a),c)):c.reject()}},function(e){var t=function(e,t){var n=0;for(n in t)if("undefined"!=typeof e[t[n]])return t[n];return e[t[n]]="",t[n]};if(e.cssHooks.rotate={get:function(t,n,i){return e(t).rotate()},set:function(t,n){return e(t).rotate(n),n}},e.cssHooks.transform={get:function(e,n,i){var a=t(e.style,["WebkitTransform","MozTransform","OTransform","msTransform","transform"]);return e.style[a]},set:function(e,n){var i=t(e.style,["WebkitTransform","MozTransform","OTransform","msTransform","transform"]);return e.style[i]=n,n}},e.fn.rotate=function(e){var t;return"undefined"==typeof e?window.opera?(t=this.css("transform").match(/rotate\((.*?)\)/),t&&t[1]?Math.round(180*parseFloat(t[1])/Math.PI):0):(t=this.css("transform").match(/rotate\((.*?)\)/),t&&t[1]?parseInt(t[1]):0):(this.css("transform",this.css("transform").replace(/none|rotate\(.*?\)/,"")+"rotate("+parseInt(e)+"deg)"),this)},e.fx.step.rotate=function(t){0==t.state&&(t.start=e(t.elem).rotate(),t.now=t.start),e(t.elem).rotate(t.now)},"undefined"==typeof window.addEventListener&&"undefined"==typeof document.getElementsByClassName){var n=function(e){for(var t=e,n=t.offsetLeft,i=t.offsetTop;t.offsetParent&&(t=t.offsetParent,t==document.body||"static"==t.currentStyle.position);)t!=document.body&&t!=document.documentElement&&(n-=t.scrollLeft,i-=t.scrollTop),n+=t.offsetLeft,i+=t.offsetTop;return{x:n,y:i}},i=function(e){if("static"==e.currentStyle.position){var t=n(e);e.style.position="absolute",e.style.left=t.x+"px",e.style.top=t.y+"px"}},a=function(e,t){var n,a=1,o=1,r=1,s=1;if("undefined"!=typeof e.style.msTransform)return!0;i(e),n=t.match(/rotate\((.*?)\)/);var l=n&&n[1]?parseInt(n[1]):0;l%=360,l<0&&(l=360+l);var c=l*Math.PI/180,d=Math.cos(c),p=Math.sin(c);a*=d,o*=-p,r*=p,s*=d,e.style.filter=(e.style.filter||"").replace(/progid:DXImageTransform\.Microsoft\.Matrix\([^)]*\)/,"")+("progid:DXImageTransform.Microsoft.Matrix(M11="+a+",M12="+o+",M21="+r+",M22="+s+",FilterType='bilinear',sizingMethod='auto expand')");var u=parseInt(e.style.width||e.width||0),h=parseInt(e.style.height||e.height||0);c=l*Math.PI/180;var f=Math.abs(Math.cos(c)),m=Math.abs(Math.sin(c)),g=(u-(u*f+h*m))/2,v=(h-(u*m+h*f))/2;return e.style.marginLeft=Math.floor(g)+"px",e.style.marginTop=Math.floor(v)+"px",!0},o=e.cssHooks.transform.set;e.cssHooks.transform.set=function(e,t){return o.apply(this,[e,t]),a(e,t),t}}}(jQuery),(i.prototype.commands.restore=function(){"use strict";var t=this,n=this.fm,i=0,a=function(t){var o,r=e.Deferred(),s=[],l=[],c=[],d=[];return r._xhrReject=function(){e.each(c,function(){this&&this.reject&&this.reject()}),o&&o._xhrReject()},e.each(t,function(e,t){"directory"===t.mime?s.push(t):l.push(t)}),s.length?(e.each(s,function(e,t){c.push(n.request({data:{cmd:"open",target:t.hash},preventDefault:!0,asNotOpen:!0})),d[e]=t.hash}),e.when.apply(e,c).fail(function(){r.reject()}).done(function(){var t=[];e.each(arguments,function(e,n){n.files&&(n.files.length?t=t.concat(n.files):t.push({hash:"fakefile_"+i++,phash:d[e],mime:"fakefile",name:"fakefile",ts:0}))}),n.cache(t),o=a(t).done(function(e){l=l.concat(e),r.resolve(l)})})):r.resolve(l),r},o=function(t,o,r,s){var l,c,d={},p=[],u=!1,h=[],f=s||{},m=+new Date;n.lockfiles({files:r}),h=e.map(o,function(e){return"directory"===e.mime?e.hash:null}),t.done(function(){h&&n.exec("rm",h,{forceRm:!0,quiet:!0})}).always(function(){n.unlockfiles({files:r})}),l=setTimeout(function(){n.notify({type:"search",id:m,cnt:1,hideCnt:!0,cancel:function(){c&&c._xhrReject(),t.reject()}})},n.notifyDelay),i=0,c=a(o).always(function(){l&&clearTimeout(l),n.notify({type:"search",id:m,cnt:-1,hideCnt:!0})}).fail(function(){t.reject("errRestore","errFileNotFound")}).done(function(i){var a=["errRestore","errFolderNotFound"],o="";i.length?(e.each(i,function(t,i){for(var a,r,s,l=i.phash;l;){if(r=n.trashes[l]){if(!d[r]){if(u)return p.push(i.hash),null;d[r]={},u=!0}s=n.path(i.hash).substr(n.path(l).length).replace(/\\/g,"/"),s=s.replace(/\/[^\/]+?$/,""),""===s&&(s="/"),d[r][s]||(d[r][s]=[]),"fakefile"===i.mime?n.updateCache({removed:[i.hash]}):d[r][s].push(i.hash),(!o||o.length>s.length)&&(o=s);break}a=n.file(l),a?l=a.phash:(l=!1,e.each(n.trashes,function(e){var t=n.file(e),a=n.path(e);if((!t.volumeid||0===i.hash.indexOf(t.volumeid))&&0===n.path(i.hash).indexOf(a))return l=e,!1}))}}),u?e.each(d,function(i,s){var l=Object.keys(s),c=l.length;n.request({data:{cmd:"mkdir",target:i,dirs:l},notify:{type:"chkdir",cnt:c},preventFail:!0}).fail(function(e){t.reject(e),n.unlockfiles({files:r})}).done(function(i){var r,l;(l=i.hashes)?(r=n.getCommand("paste"),r?n.one("mkdirdone",function(){var i=!1;e.each(s,function(e,r){l[e]&&(r.length?n.file(l[e])?(n.clipboard(r,!0),n.exec("paste",[l[e]],{_cmd:"restore",noToast:f.noToast||e!==o}).done(function(e){e&&(e.error||e.warning)&&(i=!0)}).fail(function(){i=!0}).always(function(){--c<1&&(t[i?"reject":"resolve"](),p.length&&n.exec("restore",p))})):t.reject(a):--c<1&&(t.resolve(),p.length&&n.exec("restore",p)))})}):t.reject(["errRestore","errCmdNoSupport","(paste)"])):t.reject(a)})}):t.reject(a)):(t.reject("errFileNotFound"),h&&n.exec("rm",h,{forceRm:!0,quiet:!0}))})};this.restore=o,this.linkedCmds=["copy","paste","mkdir","rm"],this.updateOnSelect=!1,this.init=function(){t=this,n=this.fm},this.getstate=function(t,i){return t=t||n.selected(),t.length&&e.grep(t,function(e){var t=n.file(e);return!(!t||t.locked||n.isRoot(t))}).length==t.length?0:-1},this.exec=function(i,a){var o=e.Deferred().fail(function(e){e&&n.error(e)}),r=t.files(i);return r.length?(e.each(r,function(e,t){return n.isRoot(t)?!o.reject(["errRestore",t.name]):t.locked?!o.reject(["errLocked",t.name]):void 0}),"pending"===o.state()&&this.restore(o,r,i,a),o):o.reject()}}).prototype={forceLoad:!0},i.prototype.commands.rm=function(){"use strict";var t=this,n=this.fm,i='<div class="ui-helper-clearfix elfinder-rm-title"><span class="elfinder-cwd-icon {class} ui-corner-all"/>{title}<div class="elfinder-rm-desc">{desc}</div></div>',a=function(a,o,s,c,d){var p,u,h,f,m,g,v=o.length,b=n.cwd().hash,y=[],w=n.i18n("calc")+'<span class="elfinder-spinner"/>';v>1?(f=0,e.each(s,function(e,t){if(!t.size||"unknown"==t.size||"directory"===t.mime)return f="unknown",!1;var n=parseInt(t.size);n>=0&&f>=0&&(f+=n)}),l="unknown"===f,y.push(n.i18n("size")+": "+(l?w:n.formatSize(f))),u=[e(i.replace("{class}","elfinder-cwd-icon-group").replace("{title}","<strong>"+n.i18n("items")+": "+v+"</strong>").replace("{desc}",y.join("<br>")))]):(m=s[0],h=n.tmb(m),l="directory"===m.mime,y.push(n.i18n("size")+": "+(l?w:n.formatSize(m.size))),y.push(n.i18n("modify")+": "+n.formatDate(m)),g=n.escape(m.i18||m.name).replace(/([_.])/g,"&#8203;$1"),u=[e(i.replace("{class}",n.mime2class(m.mime)).replace("{title}","<strong>"+g+"</strong>").replace("{desc}",y.join("<br>")))]),d&&(u=u.concat(d)),u.push(c?"confirmTrash":"confirmRm"),p=n.confirm({title:t.title,text:u,accept:{label:"btnRm",callback:function(){c?t.toTrash(a,o,c):r(a,o)}},cancel:{label:"btnCancel",callback:function(){n.unlockfiles({files:o}),1===o.length&&n.file(o[0]).phash!==b?n.select({selected:o}):n.selectfiles({files:o}),a.reject()}}}),h&&e("<img/>").on("load",function(){p.find(".elfinder-cwd-icon").addClass(h.className).css("background-image","url('"+h.url+"')")}).attr("src",h.url),l&&(l=n.getSize(e.map(s,function(e){return"directory"===e.mime?e.hash:null})).done(function(e){p.find("span.elfinder-spinner").parent().html(n.i18n("size")+": "+e.formated)}).fail(function(){p.find("span.elfinder-spinner").parent().html(n.i18n("size")+": "+n.i18n("unknown"))}).always(function(){l=!1}))},o=function(i,a,o){var r,s,l,c={},d=a.length,p=t.options.toTrashMaxItems,u=[],h=e.Deferred();return d>p?void t.confirm(i,a,t.files(a),null,[n.i18n("tooManyToTrash")]):(e.each(a,function(e,t){var i=n.file(t),a=n.path(t).replace(/\\/g,"/"),o=a.match(/^[^\/]+?(\/(?:[^\/]+?\/)*)[^\/]+?$/);i&&(o&&(o[1]=o[1].replace(/(^\/.*?)\/?$/,"$1"),c[o[1]]||(c[o[1]]=[]),c[o[1]].push(t)),"directory"===i.mime&&u.push(t))}),u.length?(r=n.request({data:{cmd:"size",targets:u},notify:{type:"readdir",cnt:1,hideCnt:!0},preventDefault:!0}).done(function(e){var t=0;e.fileCnt&&(t+=parseInt(e.fileCnt)),e.dirCnt&&(t+=parseInt(e.dirCnt)),h[t>p?"reject":"resolve"]()}).fail(function(){h.reject()}),setTimeout(function(){var e=r&&r.xhr?r.xhr:null;e&&"pending"==e.state()&&(r.syncOnFail(!1),r.reject(),h.reject())},1e3*t.options.infoCheckWait)):h.resolve(),void h.done(function(){s=Object.keys(c),l=s.length,l?n.request({data:{cmd:"mkdir",target:o,dirs:s},notify:{type:"chkdir",cnt:l},preventFail:!0}).fail(function(e){i.reject(e),n.unlockfiles({files:a})}).done(function(t){var o,r,s,d,p=function(t,i,o){var r,s,l,c;e.each(t,function(e,t){Array.isArray(t)&&(h[e]?h[e]=h[e].concat(t):h[e]=t)}),t.sync&&(h.sync=1),t.added&&t.added.length&&(r=function(){var i=[],a=e.map(t.added,function(e){return"directory"===e.mime?e.hash:null});return e.each(t.added,function(t,n){e.inArray(n.phash,a)===-1&&i.push(n.hash)}),n.exec("restore",i,{noToast:!0})},l=function(){return n.request({data:o,notify:{type:"redo",cnt:a.length}})},h.undo?(s=h.undo,h.undo=function(){r(),s()}):h.undo=r,h.redo?(c=h.redo,h.redo=function(){l(),c()}):h.redo=l)},u=["errTrash"],h={},f=function(){return n.ui.notify.children(".elfinder-notify-trash").length};(o=t.hashes)?(s=1/l*100,d=1===l?100:5,r=setTimeout(function(){n.notify({type:"trash",cnt:1,hideCnt:!0,progress:d})},n.notifyDelay),e.each(c,function(t,c){var m,g=n.file(c[0]).phash;o[t]&&(m={cmd:"paste",dst:o[t],targets:c,cut:1},n.request({data:m,preventDefault:!0}).fail(function(e){e&&(u=u.concat(e))}).done(function(e){e=n.normalize(e),n.updateCache(e),p(e,g,m),e.warning&&(u=u.concat(e.warning),delete e.warning),e.removed&&e.removed.length&&n.remove(e),e.added&&e.added.length&&n.add(e),e.changed&&e.changed.length&&n.change(e),n.trigger("paste",e),n.trigger("pastedone"),e.sync&&n.sync()}).always(function(){var t=[],o=2;f()?n.notify({type:"trash",cnt:0,hideCnt:!0,progress:s}):d+=s,--l<1&&(r&&clearTimeout(r),f()&&n.notify({type:"trash",cnt:-1}),n.unlockfiles({files:a}),Object.keys(h).length?(u.length>1&&((h.removed||h.removed.length)&&(t=e.grep(a,function(t){return e.inArray(t,h.removed)===-1})),t.length?(u.length>o&&(o=(n.messages[u[o-1]]||"").indexOf("$")===-1?o:o+1),i.reject(),n.exec("rm",t,{addTexts:u.slice(0,o),forceRm:!0})):n.error(u)),h._noSound=!0,h.undo&&h.redo&&(h.undo={cmd:"trash",callback:h.undo},h.redo={cmd:"trash",callback:h.redo}),i.resolve(h)):i.reject(u))}))})):(i.reject("errFolderNotFound"),n.unlockfiles({files:a}))}):(i.reject(["error","The folder hierarchy to be deleting can not be determined."]),n.unlockfiles({files:a}))}).fail(function(){t.confirm(i,a,t.files(a),null,[n.i18n("tooManyToTrash")])}))},r=function(e,t,i){var a=i?{}:{type:"rm",cnt:t.length};n.request({data:{cmd:"rm",targets:t},notify:a,preventFail:!0}).fail(function(t){e.reject(t)}).done(function(t){(t.error||t.warning)&&(t.sync=!0),e.resolve(t)}).always(function(){n.unlockfiles({files:t})})},s=function(t){var i,a=null;return t&&t.length&&(t.length>1&&2===n.searchStatus.state?(i=n.file(n.root(t[0])).volumeid,e.grep(t,function(e){return 0!==e.indexOf(i)}).length||(a=n.option("trashHash",t[0]))):a=n.option("trashHash",t[0])),a},l=!1;this.confirm=a,this.toTrash=o,this.remove=r,this.syncTitleOnChange=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"delete ctrl+backspace shift+delete"}],this.value="rm",this.init=function(){t=this,n=this.fm,t.change(function(){var i;delete t.extra,t.title=n.i18n("cmd"+t.value),t.className=t.value,t.button&&t.button.children("span.elfinder-button-icon")["trash"===t.value?"addClass":"removeClass"]("elfinder-button-icon-trash"),"trash"===t.value&&(t.extra={icon:"rm",node:e("<span/>").attr({title:n.i18n("cmdrm")}).on("ready",function(e,t){i=t.targets}).on("click touchstart",function(e){"touchstart"===e.type&&e.originalEvent.touches.length>1||(e.stopPropagation(),e.preventDefault(),n.getUI().trigger("click"),n.exec("rm",i,{_userAction:!0,forceRm:!0}))})})})},this.getstate=function(t){var i=this.hashes(t);return i.length&&e.grep(i,function(e){var t=n.file(e);return!(!t||t.locked||n.isRoot(t))}).length==i.length?0:-1},this.exec=function(i,a){var o,c=a||{},d=e.Deferred().always(function(){l&&l.state&&"pending"===l.state()&&l.reject()}).fail(function(e){e&&n.error(e)}).done(function(e){!c.quiet&&!e._noSound&&e.removed&&e.removed.length&&n.trigger("playsound",{soundFile:"rm.wav"})}),p=t.files(i),u=p.length,h=null,f=c.addTexts?c.addTexts:null,m=c.forceRm,g=c.quiet;return u?(e.each(p,function(e,t){return n.isRoot(t)?!d.reject(["errRm",t.name,"errPerm"]):t.locked?!d.reject(["errLocked",t.name]):void 0}),"pending"===d.state()&&(o=t.hashes(i),u=p.length,(m||t.event&&t.event.originalEvent&&t.event.originalEvent.shiftKey)&&(h="",t.title=n.i18n("cmdrm")),null===h&&(h=s(o)),n.lockfiles({files:o}),h&&t.options.quickTrash?t.toTrash(d,o,h):g?r(d,o,g):t.confirm(d,o,p,h,f)),d):d.reject()},n.bind("select contextmenucreate closecontextmenu",function(e){var i=(e.data?e.data.selected||e.data.targets:null)||n.selected();i&&i.length&&t.update(void 0,(i?s(i):n.option("trashHash"))?"trash":"rm")})},i.prototype.commands.search=function(){"use strict";this.title="Find files",this.options={ui:"searchbutton"},this.alwaysEnabled=!0,this.updateOnSelect=!1,this.getstate=function(){return 0},this.exec=function(t,n,i,a){var o,r=this.fm,s=[],l=a||"",c=r.options.onlyMimes,d=[],p=function(e){return l&&"SearchName"!==l&&"SearchMime"!==l&&(e.type=l),e};return"string"==typeof t&&t?("object"==typeof n&&(i=n.mime||"",n=n.target||""),n=n?n:"",i?(i=e.trim(i).replace(","," ").split(" "),c.length&&(i=e.map(i,function(t){return t=e.trim(t),t&&(e.inArray(t,c)!==-1||e.grep(c,function(e){return 0===t.indexOf(e)}).length)?t:null}))):i=[].concat(c),r.trigger("searchstart",p({query:t,target:n,mimes:i})),!c.length||i.length?""===n&&r.api>=2.1?e.each(r.roots,function(e,n){s.push(r.request({data:p({cmd:"search",q:t,target:n,mimes:i}),notify:{type:"search",cnt:1,hideCnt:!s.length},cancel:!0,preventDone:!0}))}):(s.push(r.request({data:p({cmd:"search",q:t,target:n,mimes:i}),notify:{type:"search",cnt:1,hideCnt:!0},cancel:!0,preventDone:!0})),""!==n&&r.api>=2.1&&Object.keys(r.leafRoots).length&&e.each(r.leafRoots,function(a,l){for(o=a;o;)n===o&&e.each(l,function(){var e=r.file(this);e&&e.volumeid&&d.push(e.volumeid),s.push(r.request({data:p({cmd:"search",q:t,target:this,mimes:i}),notify:{type:"search",cnt:1,hideCnt:!1},cancel:!0,preventDone:!0}))}),o=(r.file(o)||{}).phash})):s=[e.Deferred().resolve({files:[]})],r.searchStatus.mixed=s.length>1&&d,e.when.apply(e,s).done(function(e){var t,n=arguments.length;if(e.warning&&r.error(e.warning),n>1)for(e.files=e.files||[],t=1;t<n;t++)arguments[t].warning&&r.error(arguments[t].warning),arguments[t].files&&e.files.push.apply(e.files,arguments[t].files);e.files&&e.files.length&&r.cache(e.files),r.lazy(function(){r.trigger("search",e)}).then(function(){return r.lazy(function(){r.trigger("searchdone")})}).then(function(){e.sync&&r.sync()})})):(r.getUI("toolbar").find("."+r.res("class","searchbtn")+" :text").trigger("focus"),e.Deferred().reject())}},i.prototype.commands.selectall=function(){"use strict";var t=0;this.fm.bind("select",function(e){t=e.data&&e.data.selectall?-1:0}),this.state=0,this.updateOnSelect=!1,this.getstate=function(){return t},this.exec=function(){return e(document).trigger(e.Event("keydown",{keyCode:65,ctrlKey:!0,shiftKey:!1,altKey:!1,metaKey:!1})),e.Deferred().resolve()}},i.prototype.commands.selectinvert=function(){"use strict";this.updateOnSelect=!1,this.getstate=function(){return 0},this.exec=function(){return e(document).trigger(e.Event("keydown",{keyCode:73,ctrlKey:!0,shiftKey:!0,altKey:!1,metaKey:!1})),e.Deferred().resolve()}},i.prototype.commands.selectnone=function(){"use strict";var t=this.fm,n=-1;t.bind("select",function(e){n=e.data&&e.data.unselectall?-1:0}),this.state=-1,this.updateOnSelect=!1,this.getstate=function(){return n},this.exec=function(){return t.getUI("cwd").trigger("unselectall"),e.Deferred().resolve()}},i.prototype.i18.en.messages.cmdemail="Email",i.prototype._options.commands.push("email"),i.prototype.commands.email=function(){"use strict";var e=this,t=e.fm;this.exec=function(e,n){var i=e||!!t.selected().length&&t.selected()||[t.cwd().hash],a=t.option("url"),o=t.url(e),r=t.file(i.shift()),s="A file has bee shared to you: "+r.name+" "+o;s=encodeURIComponent(s);var l="File shared from "+a;l=encodeURIComponent(l);var c="",d="mailto:toaihimel@gmail.com?subject="+l+"&body="+s+"&email_to="+c;window.open(d,"_blank")},this.getstate=function(){return 0}},i.prototype.commands.sort=function(){"use strict";var t=this,n=t.fm,i=function(){t.variants=[],e.each(n.sortRules,function(e,i){if(n.sorters[e]){var a=e===n.sortType?"asc"===n.sortOrder?"n":"s":"";t.variants.push([e,(a?'<span class="ui-icon ui-icon-arrowthick-1-'+a+'"></span>':"")+"&nbsp;"+n.i18n("sort"+e)])}}),t.variants.push("|"),t.variants.push(["stick",(n.sortStickFolders?'<span class="ui-icon ui-icon-check"/>':"")+"&nbsp;"+n.i18n("sortFoldersFirst")]),n.ui.tree&&null!==n.options.sortAlsoTreeview&&(t.variants.push("|"),t.variants.push(["tree",(n.sortAlsoTreeview?'<span class="ui-icon ui-icon-check"/>':"")+"&nbsp;"+n.i18n("sortAlsoTreeview")])),a()},a=function(){var t,i,a=n.getUI("contextmenu");a.is(":visible")&&(t=a.find("span.elfinder-button-icon-sort"),i=t.siblings("div.elfinder-contextmenu-sub"),i.find("span.ui-icon").remove(),i.children("div.elfinder-contextsubmenu-item").each(function(){var t,i=e(this).children("span"),a=i.text().trim();a===(o.stick||(o.stick=n.i18n("sortFoldersFirst")))?n.sortStickFolders&&i.prepend('<span class="ui-icon ui-icon-check"/>'):a===(o.tree||(o.tree=n.i18n("sortAlsoTreeview")))?n.sortAlsoTreeview&&i.prepend('<span class="ui-icon ui-icon-check"/>'):a===(o[n.sortType]||(o[n.sortType]=n.i18n("sort"+n.sortType)))&&(t="asc"===n.sortOrder?"n":"s",i.prepend('<span class="ui-icon ui-icon-arrowthick-1-'+t+'"></span>'))}))},o={};this.options={ui:"sortbutton"},this.keepContextmenu=!0,n.bind("sortchange",i).bind("sorterupdate",function(){i(),n.getUI().children(".elfinder-button-sort-menu").children(".elfinder-button-menu-item").each(function(){var t=e(this),i=t.attr("rel");t.toggle(!(i&&!n.sorters[i]))})}).bind("cwdrender",function(){var t=e(n.cwd).find("div.elfinder-cwd-wrapper-list table");t.length&&e.each(n.sortRules,function(i,a){var o=t.find("thead tr td.elfinder-cwd-view-th-"+i);if(o.length){var r,s=i==n.sortType,l={type:i,order:s?"asc"==n.sortOrder?"desc":"asc":n.sortOrder};s&&(o.addClass("ui-state-active"),r="asc"==n.sortOrder?"n":"s",e('<span class="ui-icon ui-icon-triangle-1-'+r+'"/>').appendTo(o)),e(o).on("click",function(t){e(this).data("dragging")||(t.stopPropagation(),n.getUI("cwd").data("longtap")||n.exec("sort",[],l))}).on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"===t.type)})}})}),this.getstate=function(){return 0},this.exec=function(t,n){var i=this.fm,a=e.isPlainObject(n)?n:function(){n+="";var e={};return"stick"===n?e.stick=!i.sortStickFolders:"tree"===n?e.tree=!i.sortAlsoTreeview:i.sorters[n]&&(i.sortType===n?e.order="asc"===i.sortOrder?"desc":"asc":e.type=n),e}(),o=Object.assign({type:i.sortType,order:i.sortOrder,stick:i.sortStickFolders,tree:i.sortAlsoTreeview},a);return i.lazy(function(){i.setSort(o.type,o.order,o.stick,o.tree),this.resolve()})}},i.prototype.commands.undo=function(){"use strict";var t=this,n=this.fm,i=function(e){e?(t.title=n.i18n("cmdundo")+" "+n.i18n("cmd"+e.cmd),t.state=0):(t.title=n.i18n("cmdundo"),t.state=-1),t.change()},a=[];this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+z"}],this.syncTitleOnChange=!0,this.getstate=function(){return a.length?0:-1},this.setUndo=function(t,o){var r={};t&&e.isPlainObject(t)&&t.cmd&&t.callback&&(Object.assign(r,t),o?(delete o.undo,r.redo=o):n.getCommand("redo").setRedo(null),a.push(r),i(r))},this.exec=function(){var t,o,r=n.getCommand("redo"),s=e.Deferred(),l={};return a.length?(t=a.pop(),t.redo?(Object.assign(l,t.redo),delete t.redo):l=null,s.done(function(){l&&r.setRedo(l,t)}),i(a.length?a[a.length-1]:void 0),o=t.callback(),o&&o.done?o.done(function(){s.resolve()}).fail(function(){s.reject()}):s.resolve(),a.length?this.update(0,a[a.length-1].name):this.update(-1,"")):s.reject(),s},n.bind("exec",function(e){var n=e.data||{};n.opts&&n.opts._userAction&&n.dfrd&&n.dfrd.done&&n.dfrd.done(function(e){e&&e.undo&&e.redo&&(e.undo.redo=e.redo,t.setUndo(e.undo))})})},i.prototype.commands.redo=function(){"use strict";var t=this,n=this.fm,i=function(e){e&&e.callback?(t.title=n.i18n("cmdredo")+" "+n.i18n("cmd"+e.cmd),t.state=0):(t.title=n.i18n("cmdredo"),t.state=-1),t.change()},a=[];this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"shift+ctrl+z ctrl+y"}],this.syncTitleOnChange=!0,this.getstate=function(){return a.length?0:-1},this.setRedo=function(e,t){null===e?(a=[],i()):e&&e.cmd&&e.callback&&(t&&(e.undo=t),
25
- a.push(e),i(e))},this.exec=function(){var t,o,r=n.getCommand("undo"),s=e.Deferred(),l={},c={};return a.length?(t=a.pop(),t.undo&&(Object.assign(l,t.undo),Object.assign(c,t),delete c.undo,s.done(function(){r.setUndo(l,c)})),i(a.length?a[a.length-1]:void 0),o=t.callback(),o&&o.done?o.done(function(){s.resolve()}).fail(function(){s.reject()}):s.resolve(),s):s.reject()}},(i.prototype.commands.up=function(){"use strict";this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+up"}],this.getstate=function(){return this.fm.cwd().phash?0:-1},this.exec=function(){var t=this.fm,n=t.cwd().hash;return this.fm.cwd().phash?this.fm.exec("open",this.fm.cwd().phash).done(function(){t.one("opendone",function(){t.selectfiles({files:[n]})})}):e.Deferred().reject()}}).prototype={forceLoad:!0},i.prototype.commands.upload=function(){"use strict";var t=this.fm.res("class","hover");this.disableOnSearch=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+u"}],this.getstate=function(e){var t,n=this.fm,i=e||[n.cwd().hash];return this._disabled||1!=i.length||(t=n.file(i[0])),t&&"directory"==t.mime&&t.write?0:-1},this.exec=function(n){var i,a,o,r,s,l,c,d=this.fm,p=d.cwd().hash,u=function(){var e,t=n&&n instanceof Array?n:null;return(!n||n instanceof Array)&&(t||1!==(e=d.selected()).length||"directory"!==d.file(e[0]).mime?t&&1===t.length&&"directory"===d.file(t[0]).mime||(t=[p]):t=e),t},h=u(),f=h?h[0]:n&&n.target?n.target:null,m=f?d.file(f):d.cwd(),g=function(t){d.upload(t).fail(function(e){w.reject(e)}).done(function(t){var n;d.getUI("cwd");if(w.resolve(t),t&&t.added&&t.added[0]&&!d.ui.notify.children(".elfinder-notify-upload").length){var i=d.findCwdNodes(t.added);i.length?i.trigger("scrolltoview"):(m.hash!==p?n=e("<div/>").append(e('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"><span class="ui-button-text">'+d.i18n("cmdopendir")+"</span></button>").on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"==t.type)}).on("click",function(){d.exec("open",f).done(function(){d.one("opendone",function(){d.trigger("selectfiles",{files:e.map(t.added,function(e){return e.hash})})})})})):d.trigger("selectfiles",{files:e.map(t.added,function(e){return e.hash})}),d.toast({msg:d.i18n(["complete",d.i18n("cmdupload")]),extNode:n}))}}).progress(function(){w.notifyWith(this,Array.from(arguments))})},v=function(e){i.elfinderdialog("close"),h&&(e.target=h[0]),g(e)},b=function(){var t=m.hash,n=e.map(d.files(t),function(e){return"directory"===e.mime&&e.write?e:null});return n.length?e('<div class="elfinder-upload-dirselect elfinder-tabstop" title="'+d.i18n("folders")+'"/>').on("click",function(t){t.stopPropagation(),t.preventDefault(),n=d.sortFiles(n);var a=e(this),o=(d.cwd(),i.closest("div.ui-dialog")),r=function(e,t){return{label:d.escape(e.i18||e.name),icon:t,remain:!1,callback:function(){var t=o.children(".ui-dialog-titlebar:first").find("span.elfinder-upload-target");h=[e.hash],t.html(" - "+d.escape(e.i18||e.name)),a.trigger("focus")},options:{className:h&&h.length&&e.hash===h[0]?"ui-state-active":"",iconClass:e.csscls||"",iconImg:e.icon||""}}},s=[r(m,"opendir"),"|"];e.each(n,function(e,t){s.push(r(t,"dir"))}),a.trigger("blur"),d.trigger("contextmenu",{raw:s,x:t.pageX||e(this).offset().left,y:t.pageY||e(this).offset().top,prevNode:o,fitHeight:!0})}).append('<span class="elfinder-button-icon elfinder-button-icon-dir" />'):e()},y=function(n,i){var a=e('<input type="file" '+n+"/>").on("click",function(){d.UA.IE&&setTimeout(function(){o.css("display","none").css("position","relative"),requestAnimationFrame(function(){o.css("display","").css("position","")})},100)}).on("change",function(){v({input:a.get(0),type:"files"})}).on("dragover",function(e){e.originalEvent.dataTransfer.dropEffect="copy"}),o=e("<form/>").append(a).on("click",function(e){e.stopPropagation()});return e('<div class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only elfinder-tabstop elfinder-focus"><span class="ui-button-text">'+d.i18n(i)+"</span></div>").append(o).on("click",function(e){e.stopPropagation(),e.preventDefault(),a.trigger("click")}).on("mouseenter mouseleave",function(n){e(this).toggleClass(t,"mouseenter"===n.type)})},w=e.Deferred();return r=function(t){t.stopPropagation(),t.preventDefault();var n,i=!1,a="",o=null,r="",s=null,l=t._target||null,c=t.dataTransfer||null,p=c.items&&c.items.length&&c.items[0].kind?c.items[0].kind:"";if(c){try{if(o=c.getData("elfinderfrom"),o&&(r=window.location.href+d.cwd().hash,!l&&o===r||l===r))return void w.reject()}catch(t){}if("file"===p&&(c.items[0].getAsEntry||c.items[0].webkitGetAsEntry))i=c,a="data";else if("string"!==p&&c.files&&c.files.length&&e.inArray("Text",c.types)===-1)i=c.files,a="files";else{try{(s=c.getData("text/html"))&&s.match(/<(?:img|a)/i)&&(i=[s],a="html")}catch(t){}i||((s=c.getData("text"))?(i=[s],a="text"):c&&c.files&&(p="file"))}}i?g({files:i,type:a,target:l,dropEvt:t}):(n=["errUploadNoFiles"],"file"===p&&n.push("errFolderUpload"),d.error(n),w.reject())},!h&&n?(n.input||n.files?(n.type="files",g(n)):n.dropEvt&&r(n.dropEvt),w):(s=function(t){var n,i=t.originalEvent||t,a=[],o=[];if(i.clipboardData){if(i.clipboardData.items&&i.clipboardData.items.length){o=i.clipboardData.items;for(var r=0;r<o.length;r++)"file"==i.clipboardData.items[r].kind&&(n=i.clipboardData.items[r].getAsFile(),a.push(n))}else i.clipboardData.files&&i.clipboardData.files.length&&(a=i.clipboardData.files);if(a.length)return void v({files:a,type:"files",clipdata:!0})}var s=i.target||i.srcElement;requestAnimationFrame(function(){var t,n="text";s.innerHTML&&(e(s).find("img").each(function(t,n){n.src.match(/^webkit-fake-url:\/\//)&&e(n).remove()}),e(s).find("a,img").length&&(n="html"),t=s.innerHTML,s.innerHTML="",v({files:[t],type:n}))})},i=e('<div class="elfinder-upload-dialog-wrapper"/>').append(y("multiple","selectForUpload")),!d.UA.Mobile&&function(e){return"undefined"!=typeof e.webkitdirectory||"undefined"!=typeof e.directory}(document.createElement("input"))&&i.append(y("multiple webkitdirectory directory","selectFolder")),m.dirs&&(m.hash===p||d.navHash2Elm(m.hash).hasClass("elfinder-subtree-loaded")?b().appendTo(i):(l=e('<div class="elfinder-upload-dirselect" title="'+d.i18n("nowLoading")+'"/>').append('<span class="elfinder-button-icon elfinder-button-icon-spinner" />').appendTo(i),d.request({cmd:"tree",target:m.hash}).done(function(){d.one("treedone",function(){l.replaceWith(b()),c.elfinderdialog("tabstopsInit")})}).fail(function(){l.remove()}))),d.dragUpload?a=e('<div class="ui-corner-all elfinder-upload-dropbox elfinder-tabstop" contenteditable="true" data-ph="'+d.i18n("dropPasteFiles")+'"></div>').on("paste",function(e){s(e)}).on("mousedown click",function(){e(this).trigger("focus")}).on("focus",function(){this.innerHTML=""}).on("mouseover",function(){e(this).addClass(t)}).on("mouseout",function(){e(this).removeClass(t)}).on("dragenter",function(n){n.stopPropagation(),n.preventDefault(),e(this).addClass(t)}).on("dragleave",function(n){n.stopPropagation(),n.preventDefault(),e(this).removeClass(t)}).on("dragover",function(n){n.stopPropagation(),n.preventDefault(),n.originalEvent.dataTransfer.dropEffect="copy",e(this).addClass(t)}).on("drop",function(e){i.elfinderdialog("close"),h&&(e.originalEvent._target=h[0]),r(e.originalEvent)}).prependTo(i).after('<div class="elfinder-upload-dialog-or">'+d.i18n("or")+"</div>")[0]:o=e('<div class="ui-corner-all elfinder-upload-dropbox" contenteditable="true">'+d.i18n("dropFilesBrowser")+"</div>").on("paste drop",function(e){s(e)}).on("mousedown click",function(){e(this).trigger("focus")}).on("focus",function(){this.innerHTML=""}).on("dragenter mouseover",function(){e(this).addClass(t)}).on("dragleave mouseout",function(){e(this).removeClass(t)}).prependTo(i).after('<div class="elfinder-upload-dialog-or">'+d.i18n("or")+"</div>")[0],c=this.fmDialog(i,{title:this.title+'<span class="elfinder-upload-target">'+(m?" - "+d.escape(m.i18||m.name):"")+"</span>",modal:!0,resizable:!1,destroyOnClose:!0,propagationEvents:["mousemove","mouseup","click"],close:function(){var e=d.getUI("contextmenu");e.is(":visible")&&e.click()}}),w)}},i.prototype.commands.view=function(){"use strict";var t,n=this,i=this.fm;this.value=i.viewType,this.alwaysEnabled=!0,this.updateOnSelect=!1,this.options={ui:"viewbutton"},this.getstate=function(){return 0},this.extra={icon:"menu",node:e("<span/>").attr({title:i.i18n("viewtype")}).on("click touchstart",function(t){if(!("touchstart"===t.type&&t.originalEvent.touches.length>1)){var n=e(this);t.stopPropagation(),t.preventDefault(),i.trigger("contextmenu",{raw:getSubMenuRaw(),x:n.offset().left,y:n.offset().top})}})},this.exec=function(){var e=this,t=i.storage("view","list"==this.value?"icons":"list");return i.lazy(function(){i.viewchange(),e.update(void 0,t),this.resolve()})},i.bind("init",function(){t=function(){var e,t=i.getUI("cwd"),a=[],o=i.options.uiOptions.cwd.iconsView.sizeNames,r=i.options.uiOptions.cwd.iconsView.sizeMax;for(e=0;e<=r;e++)a.push({label:i.i18n(o[e]||"Size-"+e+" icons"),icon:"view",callback:function(e){return function(){t.trigger("iconpref",{size:e}),i.storage("iconsize",e),"list"===n.value&&n.exec()}}(e)});return a.push("|"),a.push({label:i.i18n("viewlist"),icon:"view-list",callback:function(){"list"!==n.value&&n.exec()}}),a}()}).bind("contextmenucreate",function(){n.extra={icon:"menu",node:e("<span/>").attr({title:i.i18n("cmdview")}).on("click touchstart",function(a){if(!("touchstart"===a.type&&a.originalEvent.touches.length>1)){var o,r,s=e(this);t.concat();for(o="list"===n.value?t.length-1:parseInt(i.storage("iconsize")||0),r=0;r<t.length;r++)"|"!==t[r]&&(t[r].options=r===o?{className:"ui-state-active"}:void 0);a.stopPropagation(),a.preventDefault(),i.trigger("contextmenu",{raw:t,x:s.offset().left,y:s.offset().top})}})}})},i});
1
  /*!
2
  * elFinder - file manager for web
3
+ * Version 2.1.57 (2021-01-08)
4
  * http://elfinder.org
5
  *
6
+ * Copyright 2009-2021, Studio 42
7
  * Licensed under a 3-clauses BSD license
8
  */
9
+ !function(e,t){if("function"==typeof define&&define.amd)define(["jquery","jquery-ui"],t);else if("undefined"!=typeof exports){var n,i;try{n=require("jquery"),i=require("jquery-ui")}catch(a){}module.exports=t(n,i)}else t(e.jQuery,e.jQuery.ui,!0)}(this,function(e,t,n){n=n||!1;var i=function(t,n,a){var o,r,s,l,c,d,p,u=this,h=[],f=["button","tooltip"],m=e(t),g=e.extend(!0,{},e._data(m.get(0),"events")),v=e("<div></div>").append(m.contents()).attr("class",m.attr("class")||"").attr("style",m.attr("style")||""),b=m.attr("id")||m.attr("id","elfauto"+e(".elfinder").length).attr("id"),y="elfinder-"+b,w="mousedown."+y,x="keydown."+y,k="keypress."+y,C="keyup."+y,z=!1,T=!1,A=["enable","disable","load","open","reload","select","add","remove","change","dblclick","getfile","lockfiles","unlockfiles","selectfiles","unselectfiles","dragstart","dragstop","search","searchend","viewchange"],j="",O={path:"",url:"",tmbUrl:"",disabled:[],separator:"/",archives:[],extract:[],copyOverwrite:!0,uploadOverwrite:!0,uploadMaxSize:0,jpgQuality:100,tmbCrop:!1,tmbReqCustomData:!1,tmb:!1},S={},I={},M={},E={},F=[],D={},U={},P=[],q={},R=[],H=[],_=new u.command(u),N="auto",L=400,W=null,B="sounds/",$="",V=!1,K=e(document.createElement("audio")).hide().appendTo("body")[0],X=0,J="",G=null,Y=function(t){var n,i,a,o,r,s,l,c,d={},p={};u.api>=2.1?(u.commandMap=t.options.uiCmdMap&&Object.keys(t.options.uiCmdMap).length?t.options.uiCmdMap:{},J!==JSON.stringify(u.commandMap)&&(J=JSON.stringify(u.commandMap))):u.options.sync=0,t.init?(I={},E={}):(s=j,n="elfinder-subtree-loaded "+u.res("class","navexpand"),r=u.res("class","navcollapse"),i=Object.keys(I),a=function(e){if(!I[e])return!0;var t="directory"===I[e].mime,i=I[e].phash;!(!t||d[i]||!p[i]&&u.navHash2Elm(I[e].hash).is(":hidden")&&u.navHash2Elm(i).next(".elfinder-navbar-subtree").children().length>100)||!t&&i===j||q[e]?t&&(p[i]=!0):(t&&!d[i]&&(d[i]=!0,u.navHash2Elm(i).removeClass(n).next(".elfinder-navbar-subtree").empty()),ee(I[e]))},o=function(){i.length&&(G&&G._abort(),G=u.asyncJob(a,i,{interval:20,numPerOnce:100}).done(function(){var t=u.storage("hide")||{items:{}};Object.keys(M).length&&e.each(M,function(e){t.items[e]||delete M[e]})}))},u.trigger("filesgc").one("filesgc",function(){i=[]}),u.one("opendone",function(){s!==j&&(m.data("lazycnt")?u.one("lazydone",o):o())})),u.sorters={},j=t.cwd.hash,Q(t.files),I[j]?(c=u.diff([t.cwd],!0),c.changed.length&&(Q(c.changed,"change"),u.change({changed:c.changed}))):Q([t.cwd]),t.changed&&t.changed.length&&Q(t.changed,"change"),l=JSON.stringify(u.sorters),$!==l&&(u.trigger("sorterupdate"),$=l),u.lastDir(j),u.autoSync()},Q=function(t,n){var i,a,o,r,s,n=n||"files",l=["sizeInfo","encoding"],c={name:!0,perm:!0,date:!0,size:!0,kind:!0},d=!u.sorters._checked&&"files"===n,p=t.length,h=function(t){var n=t||{},i=[];e.each(u.sortRules,function(e){(c[e]||"undefined"!=typeof n[e]||"mode"===e&&"undefined"!=typeof n.perm)&&i.push(e)}),u.sorters=u.arrayFlip(i,!0),u.sorters._checked=!0},f={},m=u.storage("hide")||{},g=m.items||{};for(a=0;a<p;a++)if(i=Object.assign({},t[a]),s=!(m.show||!g[i.hash]),i.name&&i.hash&&i.mime){if(s||(d&&i.phash===j&&(h(i),d=!1),!i.phash||"add"!==n&&("change"!==n||I[i.hash]&&i.size===I[i.hash])||(r=u.parents(i.phash))&&e.each(r,function(){f[this]=!0})),I[i.hash]){for(o=0;o<l.length;o++)I[i.hash][l[o]]&&!i[l[o]]&&(i[l[o]]=I[i.hash][l[o]]);i.sizeInfo&&!i.size&&(i.size=i.sizeInfo.size),ee(I[i.hash],!0)}g[i.hash]&&(M[i.hash]=i),s?(p--,t.splice(a--,1)):(I[i.hash]=i,"directory"!==i.mime||E[i.hash]||(E[i.hash]={}),i.phash&&(E[i.phash]||(E[i.phash]={}),E[i.phash][i.hash]=!0))}e.each(Object.keys(f),function(){var e=I[this];e&&e.sizeInfo&&delete e.sizeInfo}),d&&h()},Z=function(t){var n,i=t.length,a={},o=function(t){var i=I[t];i&&("directory"===i.mime&&(a[t]&&delete u.roots[a[t]],e.each(u.leafRoots,function(n,i){var a,o;(a=e.inArray(t,i))!==-1&&(1===i.length?((o=Object.assign({},I[n]))&&o._realStats&&(e.each(o._realStats,function(e,t){o[e]=t}),Z(I[n]._realStats),u.change({changed:[o]})),delete u.leafRoots[n]):u.leafRoots[n].splice(a,1))}),u.searchStatus.state<2&&e.each(I,function(e,n){n.phash==t&&o(e)})),i.phash&&(n=u.parents(i.phash))&&e.each(n,function(){r[this]=!0}),ee(I[t]))},r={};for(e.each(u.roots,function(e,t){a[t]=e});i--;)o(t[i]);e.each(Object.keys(r),function(){var e=I[this];e&&e.sizeInfo&&delete e.sizeInfo})},ee=function(e,t){var n=e.hash,i=e.phash;i&&E[i]&&delete E[i][n],t||(E[n]&&delete E[n],u.optionsByHashes[n]&&delete u.optionsByHashes[n]),delete I[n]},te=0,ne=[],ie=null,ae=function(t){var n,i=t.keyCode,a=!(!t.ctrlKey&&!t.metaKey),o="mousedown"===t.type;if(!o&&(u.keyState.keyCode=i),u.keyState.ctrlKey=a,u.keyState.shiftKey=t.shiftKey,u.keyState.metaKey=t.metaKey,u.keyState.altKey=t.altKey,!o)return"keyup"===t.type?void(u.keyState.keyCode=null):void(z&&(e.each(U,function(e,n){n.type==t.type&&n.keyCode==i&&n.shiftKey==t.shiftKey&&n.ctrlKey==a&&n.altKey==t.altKey&&(t.preventDefault(),t.stopPropagation(),n.callback(t,u),u.debug("shortcut-exec",e+" : "+n.description))}),i!=e.ui.keyCode.TAB||e(t.target).is(":input")||t.preventDefault(),"keydown"===t.type&&i==e.ui.keyCode.ESCAPE&&(m.find(".ui-widget:visible").length||u.clipboard().length&&u.clipboard([]),e.ui.ddmanager&&(n=e.ui.ddmanager.current,n&&n.helper&&n.cancel()),u.toHide(m.find(".ui-widget.elfinder-button-menu.elfinder-frontmost:visible")),u.trigger("keydownEsc",t))))},oe=new Date,re=window.parent!==window,se=function(){var t,n;if(re)try{n=e("iframe",window.parent.document),n.length&&e.each(n,function(n,i){if(i.contentWindow===window)return t=e(i),!1})}catch(i){}return t}();n||(n={}),u.UA.Mobile&&e(window).on("orientationchange."+y,function(){var e=(screen&&screen.orientation&&screen.orientation.angle||window.orientation||0)+0;e===-90&&(e=270),u.UA.Angle=e,u.UA.Rotated=e%180!==0}).trigger("orientationchange."+y),n.bootCallback&&"function"==typeof n.bootCallback&&!function(){var e=a,t=n.bootCallback;a=function(n,i){e&&"function"==typeof e&&e.call(this,n,i),t.call(this,n,i)}}(),delete n.bootCallback,this.api=null,this.newAPI=!1,this.oldAPI=!1,this.netDrivers=[],this.baseUrl="",this.i18nBaseUrl="",this.cssloaded=!1,this.theme=null,this.mimesCanMakeEmpty={},this.bootCallback,this.reloadCallback,this.id=b,this.storage=function(){try{return"localStorage"in window&&null!==window.localStorage?(u.UA.Safari&&(window.localStorage.setItem("elfstoragecheck",1),window.localStorage.removeItem("elfstoragecheck")),u.localStorage):u.cookie}catch(e){return u.cookie}}(),this.pauseUnloadCheck=function(e,t){return"undefined"==typeof e?V:(V=!!e,void(e&&!t&&requestAnimationFrame(function(){V=!1})))},this.options=Object.assign({},this._options),n.uiOptions&&n.uiOptions.toolbar&&Array.isArray(n.uiOptions.toolbar)&&e.isPlainObject(n.uiOptions.toolbar[n.uiOptions.toolbar.length-1])&&(u.options.uiOptions.toolbarExtra=Object.assign(u.options.uiOptions.toolbarExtra||{},n.uiOptions.toolbar.pop())),function(){var t=function(n,i){e.isPlainObject(n)&&e.each(n,function(n,a){e.isPlainObject(a)?(i[n]||(i[n]={}),t(a,i[n])):i[n]=a})};t(n,u.options)}(),this.options.uiOptions.toolbar.push(this.options.uiOptions.toolbarExtra),delete this.options.uiOptions.toolbarExtra,this.toUnbindEvents={},this.bind=function(e,t,n){var i,a;if(t&&("function"==typeof t||"function"==typeof t.done))for(e=(""+e).toLowerCase().replace(/^\s+|\s+$/g,"").split(/\s+/),a=e.length,i=0;i<a;i++)void 0===D[e[i]]&&(D[e[i]]=[]),D[e[i]][n?"unshift":"push"](t);return this},this.unbind=function(t,n){var i,a,o,r;for(t=(""+t).toLowerCase().split(/\s+/),a=t.length,i=0;i<a;i++)(o=D[t[i]])&&(r=e.inArray(n,o),r>-1&&o.splice(r,1));return n=null,this},this.trigger=function(t,n,i){var a,o,r,s,l=t.toLowerCase(),c="object"==typeof n,d=D[l]||[],p=[];if(this.debug("event-"+l,n),c&&"undefined"!=typeof i||(i=!0),o=d.length){for(s=e.Event(l),n&&(n._getEvent=function(){return s}),i&&(s.data=n),a=0;a<o;a++)if(d[a])if(d[a].done)p.push(d[a].done);else{if(d[a].length&&!i){if("undefined"==typeof r)try{r=JSON.stringify(n)}catch(h){r=!1}s.data=r?JSON.parse(r):n}try{if(d[a].call(s,s,this)===!1||s.isDefaultPrevented()){this.debug("event-stoped",s.type);break}}catch(f){window.console&&window.console.log&&window.console.log(f)}}if(o=p.length)for(a=0;a<o;a++)try{if(p[a].call(s,s,this)===!1||s.isDefaultPrevented()){this.debug("event-stoped",s.type+"(done)");break}}catch(f){window.console&&window.console.log&&window.console.log(f)}this.toUnbindEvents[l]&&this.toUnbindEvents[l].length&&(e.each(this.toUnbindEvents[l],function(e,t){u.unbind(t.type,t.callback)}),delete this.toUnbindEvents[l])}return this},this.getListeners=function(e){return e?D[e.toLowerCase()]:D},this.baseUrl=function(){var t,n,i;return u.options.baseUrl?u.options.baseUrl:(i="",t=null,e("head > script").each(function(){if(this.src&&this.src.match(/js\/elfinder(?:-[a-z0-9_-]+)?\.(?:min|full)\.js(?:$|\?)/i))return t=e(this),!1}),t&&(i=t.attr("src").replace(/js\/[^\/]+$/,""),i.match(/^(https?\/\/|\/)/)||(n=e("head > base[href]").attr("href"))&&(i=n.replace(/\/$/,"")+"/"+i)),""!==i?u.options.baseUrl=i:(u.options.baseUrl||(u.options.baseUrl="./"),i=u.options.baseUrl),i)}(),this.i18nBaseUrl=(this.options.i18nBaseUrl||this.baseUrl+"js/i18n").replace(/\/$/,"")+"/",this.options.maxErrorDialogs=Math.max(1,parseInt(this.options.maxErrorDialogs||5)),O.dispInlineRegex=this.options.dispInlineRegex,this.options.cssAutoLoad&&!function(){var t=u.baseUrl,n=e('head > link[href$="css/elfinder.min.css"],link[href$="css/elfinder.full.css"]:first').length,i=function(){m.data("cssautoloadHide")&&(m.data("cssautoloadHide").remove(),m.removeData("cssautoloadHide"))},a=function(){u.cssloaded||(i(),u.cssloaded=!0,u.trigger("cssloaded"))};n||(u.cssloaded=null),Array.isArray(u.options.cssAutoLoad)&&(u.options.themes["default"]?u.cssloaded===!0?u.loadCss(u.options.cssAutoLoad):u.bind("cssloaded",function(){u.loadCss(u.options.cssAutoLoad)}):(u.options.themes=Object.assign({"default":{name:"default",cssurls:u.options.cssAutoLoad}},u.options.themes),u.options.theme||(u.options.theme="default"))),null===u.cssloaded&&(m.addClass("elfinder").data("cssautoloadHide",e("<style>.elfinder{visibility:hidden;overflow:hidden}</style>")),e("head").append(m.data("cssautoloadHide")),u.options.themes["default"]||(u.options.themes=Object.assign({"default":{name:"default",cssurls:"css/theme.css",author:"elFinder Project",license:"3-clauses BSD"}},u.options.themes),u.options.theme||(u.options.theme="default")),requestAnimationFrame(function(){"hidden"===m.css("visibility")?u.loadCss([t+"css/elfinder.min.css"],{dfd:e.Deferred().done(function(){a()}).fail(function(){i(),u.cssloaded||(u.cssloaded=!1,u.bind("init",function(){u.cssloaded||u.error(["errRead","CSS (elfinder.min)"])}))})}):a()}))}(),function(){var e,t=u.options.themes,n=Object.keys(t||{});n.length&&(e=u.storage("theme")||u.options.theme,t[e]||(e=n[0]),u.cssloaded?u.changeTheme(e):u.bind("cssloaded",function(){u.changeTheme(e)}))}(),this.optionProperties={icon:void 0,csscls:void 0,tmbUrl:void 0,uiCmdMap:{},netkey:void 0,disabled:[]},re||this.options.enableAlways||2!==e("body").children().length||(this.options.enableAlways=!0),this.options.debug===!0?this.options.debug="all":Array.isArray(this.options.debug)?!function(){var t={};e.each(u.options.debug,function(){t[this]=!0}),u.options.debug=t}():this.options.debug=!1,this.noConflicts={},this.noConflict=function(){e.each(f,function(t,n){e.fn[n]&&"function"==typeof e.fn[n].noConflict&&(u.noConflicts[n]=e.fn[n].noConflict())})},this.noConflict(),this.isCORS=!1,function(){if("undefined"!=typeof u.options.cors&&null!==u.options.cors)u.isCORS=!!u.options.cors;else{var t,i=document.createElement("a"),a=window.location.protocol,o=function(e){return e=e&&":"!==e?e:a,"https:"===e?/\:443$/:/\:80$/},r=window.location.host.replace(o(a),"");i.href=n.url,n.urlUpload&&n.urlUpload!==n.url&&(t=document.createElement("a"),t.href=n.urlUpload),(r!==i.host.replace(o(i.protocol),"")||":"!==i.protocol&&""!==i.protocol&&a!==i.protocol||t&&(r!==t.host.replace(o(t.protocol),"")||":"!==t.protocol&&""!==t.protocol&&a!==t.protocol))&&(u.isCORS=!0)}u.isCORS&&(e.isPlainObject(u.options.customHeaders)||(u.options.customHeaders={}),e.isPlainObject(u.options.xhrFields)||(u.options.xhrFields={}),u.options.requestType="post",u.options.customHeaders["X-Requested-With"]="XMLHttpRequest",u.options.xhrFields.withCredentials=!0)}(),this.requestType=/^(get|post)$/i.test(this.options.requestType)?this.options.requestType.toLowerCase():"get",s=Math.max(parseInt(this.options.requestMaxConn),1),this.optsCustomData=e.isPlainObject(this.options.customData)?this.options.customData:{},this.customData=Object.assign({},this.optsCustomData),this.prevCustomData=null,this.customHeaders=e.isPlainObject(this.options.customHeaders)?this.options.customHeaders:{},this.xhrFields=e.isPlainObject(this.options.xhrFields)?this.options.xhrFields:{},this.replaceXhrSend=function(){p||(p=XMLHttpRequest.prototype.send),XMLHttpRequest.prototype.send=function(){var t=this;return u.customHeaders&&e.each(u.customHeaders,function(e){t.setRequestHeader(e,this)}),u.xhrFields&&e.each(u.xhrFields,function(e){e in t&&(t[e]=this)}),p.apply(this,arguments)}},this.restoreXhrSend=function(){p&&(XMLHttpRequest.prototype.send=p)},this.abortCmdsOnOpen=this.options.abortCmdsOnOpen||["tmb","parents"],this.navPrefix="nav"+(i.prototype.uniqueid?i.prototype.uniqueid:"")+"-",this.cwdPrefix=i.prototype.uniqueid?"cwd"+i.prototype.uniqueid+"-":"",++i.prototype.uniqueid,this.uploadURL=n.urlUpload||n.url,this.namespace=y,this.today=new Date(oe.getFullYear(),oe.getMonth(),oe.getDate()).getTime()/1e3,this.yesterday=this.today-86400,l=this.options.UTCDate?"UTC":"",this.getHours="get"+l+"Hours",this.getMinutes="get"+l+"Minutes",this.getSeconds="get"+l+"Seconds",this.getDate="get"+l+"Date",this.getDay="get"+l+"Day",this.getMonth="get"+l+"Month",this.getFullYear="get"+l+"FullYear",this.zIndex,this.searchStatus={state:0,query:"",target:"",mime:"",mixed:!1,ininc:!1},this.lang=this.storage("lang")||this.options.lang,"jp"===this.lang&&(this.lang=this.options.lang="ja"),this.viewType=this.storage("view")||this.options.defaultView||"icons",this.sortType=this.storage("sortType")||this.options.sortType||"name",this.sortOrder=this.storage("sortOrder")||this.options.sortOrder||"asc",this.sortStickFolders=this.storage("sortStickFolders"),null===this.sortStickFolders?this.sortStickFolders=!!this.options.sortStickFolders:this.sortStickFolders=!!this.sortStickFolders,this.sortAlsoTreeview=this.storage("sortAlsoTreeview"),null===this.sortAlsoTreeview||null===this.options.sortAlsoTreeview?this.sortAlsoTreeview=!!this.options.sortAlsoTreeview:this.sortAlsoTreeview=!!this.sortAlsoTreeview,this.sortRules=e.extend(!0,{},this._sortRules,this.options.sortRules),e.each(this.sortRules,function(e,t){"function"!=typeof t&&delete u.sortRules[e]}),this.compare=e.proxy(this.compare,this),this.notifyDelay=this.options.notifyDelay>0?parseInt(this.options.notifyDelay):500,this.draggingUiHelper=null,this.droppable={greedy:!0,tolerance:"pointer",accept:".elfinder-cwd-file-wrapper,.elfinder-navbar-dir,.elfinder-cwd-file,.elfinder-cwd-filename",hoverClass:this.res("class","adroppable"),classes:{"ui-droppable-hover":this.res("class","adroppable")},autoDisable:!0,drop:function(t,n){var i,a,o,r=e(this),s=e.grep(n.helper.data("files")||[],function(e){return!!e}),l=[],c=[],d=[],p=n.helper.hasClass("elfinder-drag-helper-plus"),h="class";if("undefined"==typeof t.button||n.helper.data("namespace")!==y||!u.insideWorkzone(t.pageX,t.pageY))return!1;for(a=r.hasClass(u.res(h,"cwdfile"))?u.cwdId2Hash(r.attr("id")):r.hasClass(u.res(h,"navdir"))?u.navId2Hash(r.attr("id")):j,i=s.length;i--;)o=s[i],o!=a&&I[o].phash!=a?l.push(o):(p&&o!==a&&I[a].write?c:d).push(o);return!d.length&&(n.helper.data("droped",!0),c.length&&(n.helper.hide(),u.exec("duplicate",c,{_userAction:!0})),void(l.length&&(n.helper.hide(),u.clipboard(l,!p),u.exec("paste",a,{_userAction:!0},a).always(function(){u.clipboard([]),u.trigger("unlockfiles",{files:s})}),u.trigger("drop",{files:s}))))}},this.enabled=function(){return z&&this.visible()},this.visible=function(){return m[0].elfinder&&m.is(":visible")},this.isRoot=function(e){return!(!e.isroot&&e.phash)},this.root=function(t,n){t=t||j;var i,a;if(!n&&(e.each(u.roots,function(e,n){if(0===t.indexOf(e))return i=n,!1}),i))return i;for(i=I[t];i&&i.phash&&(n||!i.isroot);)i=I[i.phash];if(i)return i.hash;for(;a in I&&I.hasOwnProperty(a);)if(i=I[a],"directory"===i.mime&&!i.phash&&i.read)return i.hash;return""},this.cwd=function(){return I[j]||{}},this.option=function(t,n){var i,a;return n=n||j,u.optionsByHashes[n]&&"undefined"!=typeof u.optionsByHashes[n][t]?u.optionsByHashes[n][t]:!u.hasVolOptions||j===n||(a=u.file(n))&&a.phash===j?S[t]||"":(i="",e.each(u.volOptions,function(e,a){if(0===n.indexOf(e))return i=a[t]||"",!1}),i)},this.getDisabledCmds=function(t,n){var i={hidden:!0};return Array.isArray(t)||(t=[t]),e.each(t,function(e,t){var n=u.option("disabledFlip",t);n&&Object.assign(i,n)}),n?i:Object.keys(i)},this.file=function(e,t){return e?I[e]||(t?M[e]:void 0):void 0},this.files=function(t){var n={};return t?E[t]?(e.each(E[t],function(e){I[e]?n[e]=I[e]:delete E[t][e]}),Object.assign({},n)):{}:Object.assign({},I)},this.parents=function(e){for(var t,n=[];e&&(t=this.file(e));)n.unshift(t.hash),e=t.phash;return n},this.path2array=function(e,t){for(var n,i=[];e;){if(!(n=I[e])||!n.hash){i=[];break}i.unshift(t&&n.i18?n.i18:n.name),e=n.isroot?null:n.phash}return i},this.path=function(t,n,i){var a=I[t]&&I[t].path?I[t].path:this.path2array(t,n).join(S.separator);if(i&&I[t]){i=Object.assign({notify:{type:"parents",cnt:1,hideCnt:!0}},i);var o,r=e.Deferred(),s=i.notify,l=!1,c=function(){u.request({data:{cmd:"parents",target:I[t].phash},notify:s,preventFail:!0}).done(d).fail(function(){r.reject()})},d=function(){u.one("parentsdone",function(){a=u.path(t,n),""===a&&l?(l=!1,c()):(s&&(clearTimeout(o),s.cnt=-parseInt(s.cnt||0),u.notify(s)),r.resolve(a))})};return a?r.resolve(a):(u.ui.tree?(s&&(o=setTimeout(function(){u.notify(s)},u.notifyDelay)),l=!0,d(!0)):c(),r)}return a},this.url=function(t,n){var i,a=I[t],o=n||{},r=o.async||!1,s=o.temporary||!1,l=o.onetime&&u.option("onetimeUrl",t)||!1,c=o.absurl||!1,d=r||l?e.Deferred():null,p=function(e){return e&&c&&(e=u.convAbsUrl(e)),e},h=function(n){if(n)return p(n);if(a.url)return p(a.url);if("undefined"==typeof i&&(i=f()),i)return p(i+e.map(u.path2array(t),function(e){return encodeURIComponent(e)}).slice(1).join("/"));var o=Object.assign({},u.customData,{cmd:"file",target:a.hash});return u.oldAPI&&(o.cmd="open",o.current=a.phash),p(u.options.url+(u.options.url.indexOf("?")===-1?"?":"&")+e.param(o,!0))},f=function(){return u.option("url",!u.isRoot(a)&&a.phash||a.hash)};if(!a||!a.read)return r?d.resolve(""):"";if(!l||a.url&&"1"!=a.url||(i=f()))if("1"==a.url||s&&!a.url&&!(i=f()))this.request({data:{cmd:"url",target:t,options:{temporary:s?1:0}},preventDefault:!0,options:{async:r},notify:r?{type:s?"file":"url",cnt:1,hideCnt:!0}:{},progressBar:o.progressBar}).done(function(e){a.url=e.url||""}).fail(function(){a.url=""}).always(function(){var e;return a.url&&s&&(e=a.url,a.url="1"),r?void d.resolve(h(e)):h(e)});else{if(!r)return h();d.resolve(h())}else r=!0,this.request({data:{cmd:"url",target:t,options:{onetime:1}},preventDefault:!0,options:{async:r},notify:{type:"file",cnt:1,hideCnt:!0},progressBar:o.progressBar}).done(function(e){d.resolve(p(e.url||""))}).fail(function(){d.resolve("")});return r?d:void 0},this.forExternalUrl=function(e,t){var n=u.option("onetimeUrl",e),i={async:!0,absurl:!0};return i[n?"onetime":"temporary"]=!0,u.url(e,Object.assign({},t,i))},this.openUrl=function(t,n,i,a){var o=I[t],r="",s=(a||{}).onetimeSize||5242880;return o&&o.read?n&&"sameorigin"!==n||(o.url?1!=o.url&&(r=o.url):S.url&&0===o.hash.indexOf(u.cwd().volumeid)&&(r=S.url+e.map(this.path2array(t),function(e){return encodeURIComponent(e)}).slice(1).join("/")),n&&!this.isSameOrigin(r)||!r)?i&&this.hasParrotHeaders()?(a?delete a.onetimeSize:a={},!a.onetime&&!a.temporary&&o.size>s&&(o.mime.match(/^video|audio/)?a.temporary=!0:a.onetime=!0),a.onetime||a.temporary?this.url(o.hash,Object.assign({async:!0},a)).done(function(e){i(e)}).fail(function(){i("")}):this.getContents(t,"blob",a).done(function(e){r=(window.URL||window.webkitURL).createObjectURL(e),i(r)}).fail(function(){i("")})):(r=this.options.url,r=r+(r.indexOf("?")===-1?"?":"&")+(this.oldAPI?"cmd=open&current="+o.phash:"cmd=file")+"&target="+o.hash+"&_t="+(o.ts||parseInt(+new Date/1e3)),n===!0&&(r+="&download=1"),e.each(this.customData,function(e,t){r+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t)}),i?void i(r):r):(r+=(r.match(/\?/)?"&":"?")+"_".repeat((r.match(/[\?&](_+)t=/g)||["&t="]).sort().shift().match(/[\?&](_*)t=/)[1].length+1)+"t="+(o.ts||parseInt(+new Date/1e3)),i?void i(r):r):""},this.tmb=function(t){var n,i,a="elfinder-cwd-bgurl",o="",r={},s=0;return!(!e.isPlainObject(t)||(u.searchStatus.state&&0!==t.hash.indexOf(u.cwd().volumeid)?(n=u.option("tmbUrl",t.hash),i=u.option("tmbCrop",t.hash)):(n=S.tmbUrl,i=S.tmbCrop),i&&(a+=" elfinder-cwd-bgurl-crop"),"self"===n&&0===t.mime.indexOf("image/")?(o=u.openUrl(t.hash),a+=" elfinder-cwd-bgself"):(u.oldAPI||n)&&t&&t.tmb&&1!=t.tmb?o=n+t.tmb:u.newAPI&&t&&t.tmb&&1!=t.tmb&&(o=t.tmb),!o))&&("self"!==n&&(t.ts&&(r._t=t.ts),S.tmbReqCustomData&&Object.keys(this.customData).length&&(r=Object.assign(r,this.customData)),Object.keys(r).length&&(o+=o.match(/\?/)?"&":"?",e.each(r,function(e,t){o+=(0===s++?"":"&")+encodeURIComponent(e)+"="+encodeURIComponent(t)}))),{url:o,className:a})},this.selected=function(){return F.slice(0)},this.selectedFiles=function(){return e.map(F,function(e){return I[e]?Object.assign({},I[e]):null})},this.fileByName=function(e,t){var n;for(n in I)if(I.hasOwnProperty(n)&&I[n].phash==t&&I[n].name==e)return I[n]},this.validResponse=function(e,t){return t.error||this.rules[this.rules[e]?e:"defaults"](t)},this.returnBytes=function(e){var t;return isNaN(e)?(e||(e=""),e=e.replace(/b$/i,""),t=e.charAt(e.length-1).toLowerCase(),e=e.replace(/[tgmk]$/i,""),"t"==t?e=1024*e*1024*1024*1024:"g"==t?e=1024*e*1024*1024:"m"==t?e=1024*e*1024:"k"==t&&(e=1024*e),e=isNaN(e)?0:parseInt(e)):(e=parseInt(e),e<1&&(e=0)),e},this.request=function(t){var n,i,a,o,r=this,l=this.options,c=e.Deferred(),d=(+new Date).toString(16)+Math.floor(1e3*Math.random()).toString(16),p=Object.assign({},r.customData,{mimes:l.onlyMimes},t.data||t),u=p.cmd,h="binary"===(t.options||{}).dataType,f=!t.asNotOpen&&"open"===u,m=!(h||t.preventDefault||t.preventFail),g=!(h||t.preventDefault||t.preventDone),v=t.progressVal||20,b=null,y=!1,w=t.progressBar?{}:t.notify?Object.assign({progress:v*t.notify.cnt},t.notify):{},x=!!t.cancel,k=h||!!t.raw,C=t.syncOnFail,z=!!t.lazy,T=t.prepare,A=t.navigate,I=(t.options||{}).cache,M=Object.assign({url:l.url,async:!0,type:this.requestType,dataType:"json",cache:r.api>=2.1029,data:p,headers:this.customHeaders,xhrFields:this.xhrFields,progress:function(e){var n=e.loaded/e.total*100;if(b&&clearTimeout(b),t.progressBar)try{t.progressBar.width(n+"%")}catch(e){}else y&&w.type&&(n*=w.cnt,v<n&&(r.notify({type:w.type,progress:n-v,cnt:0,hideCnt:w.hideCnt}),v=n));if(t.progress)try{t.progress(e)}catch(e){}}},t.options||{}),E=function(t){t.warning&&r.error(t.warning),f?Y(t):r.updateCache(t),r.lazy(function(){t.removed&&t.removed.length&&r.remove(t),t.added&&t.added.length&&r.add(t),t.changed&&t.changed.length&&r.change(t)}).then(function(){return r.lazy(function(){r.trigger(u,t,!1)})}).then(function(){return r.lazy(function(){r.trigger(u+"done")})}).then(function(){t.toasts&&Array.isArray(t.toasts)&&e.each(t.toasts,function(){this.msg&&r.toast(this)}),t.sync&&r.sync()})},F=function(e,t){var n,i,a=r.options.debug;switch(t){case"abort":n=e.quiet?"":["errConnect","errAbort"];break;case"timeout":n=["errConnect","errTimeout"];break;case"parsererror":n=["errResponse","errDataNotJSON"],e.responseText&&(!j||a&&("all"===a||a["backend-error"]))&&n.push(e.responseText);break;default:if(e.responseText)try{i=JSON.parse(e.responseText),i&&i.error&&(n=i.error)}catch(o){}if(!n)if(403==e.status)n=["errConnect","errAccess","HTTP error "+e.status];else if(404==e.status)n=["errConnect","errNotFound","HTTP error "+e.status];else if(e.status>=500)n=["errResponse","errServerError","HTTP error "+e.status];else{if(414==e.status&&"get"===M.type)return M.type="post",r.abortXHR(e),void(c.xhr=e=r.transport.send(M).fail(n).done(D));n=e.quiet?"":["errConnect","HTTP error "+e.status]}}r.trigger(u+"done"),c.reject({error:n},e,t)},D=function(t){if(r.currentReqCmd=u,t.debug&&r.responseDebug(t),r.setCustomHeaderByXhr(i),k)return r.abortXHR(i),t&&t.debug&&r.debug("backend-debug",t),c.resolve(t);if(!t)return c.reject({error:["errResponse","errDataEmpty"]},i,t);if(!e.isPlainObject(t))return c.reject({error:["errResponse","errDataNotJSON"]},i,t);if(t.error)return f&&e.each(r.leafRoots,function(t,n){r.leafRoots[t]=e.grep(n,function(e){return e!==p.target})}),c.reject({error:t.error},i,t);var n=function(){var n,a=function(n){r.leafRoots[p.target]&&t[n]&&e.each(r.leafRoots[p.target],function(e,i){var a;(a=r.file(i))&&t[n].push(a)})},o=function(){r.textMimes={},e.each(r.res("mimes","text"),function(){r.textMimes[this.toLowerCase()]=!0})};return f?a("files"):"tree"===u&&a("tree"),t=r.normalize(t),r.validResponse(u,t)?(f&&(r.api||(r.api=t.api||1,"2.0"==r.api&&"undefined"!=typeof t.options.uploadMaxSize&&(r.api="2.1"),r.newAPI=r.api>=2,r.oldAPI=!r.newAPI),t.textMimes&&Array.isArray(t.textMimes)&&(r.resources.mimes.text=t.textMimes,o()),!r.textMimes&&o(),t.options&&(S=Object.assign({},O,t.options)),t.netDrivers&&(r.netDrivers=t.netDrivers),t.maxTargets&&(r.maxTargets=t.maxTargets),p.init&&(r.uplMaxSize=r.returnBytes(t.uplMaxSize),r.uplMaxFile=t.uplMaxFile?Math.min(parseInt(t.uplMaxFile),50):20)),"function"==typeof T&&T(t),A&&(n=A.target||"added",t[n]&&t[n].length&&r.one(u+"done",function(){var i=t[n],a=r.findCwdNodes(i),o=function(){var t=r.cwd().hash;return e.map(i,function(e){return e.phash&&t===e.phash?e.hash:null})},s=o(),l=function(t){var n,i,a,l=void 0,c=t.action?t.action.data:void 0;return(c||s.length)&&t.action&&(i=t.action.msg)&&(n=t.action.cmd)&&(!t.action.cwdNot||t.action.cwdNot!==r.cwd().hash)&&(a=t.action.done,c=t.action.data,l=e("<div></div>").append(e('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"><span class="ui-button-text">'+r.i18n(i)+"</span></button>").on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"==t.type)}).on("click",function(){r.exec(n,c||s,{_userAction:!0,_currentType:"toast",_currentNode:e(this)}),a&&r.one(n+"done",function(){"function"==typeof a?a():"select"===a&&r.trigger("selectfiles",{files:o()})})}))),delete t.action,t.extNode=l,t};A.toast||(A.toast={}),!A.noselect&&r.trigger("selectfiles",{files:r.searchStatus.state>1?e.map(i,function(e){return e.hash}):s}),a.length?(A.noscroll||(a.first().trigger("scrolltoview",{blink:!1}),r.resources.blink(a,"lookme")),e.isPlainObject(A.toast.incwd)&&r.toast(l(A.toast.incwd))):e.isPlainObject(A.toast.inbuffer)&&r.toast(l(A.toast.inbuffer))})),c.resolve(t),void(t.debug&&r.debug("backend-debug",t))):c.reject({error:t.norError||"errResponse"},i,t)};r.abortXHR(i),z?r.lazy(n):n()},U=function(e){i&&"pending"===i.state()&&(r.abortXHR(i,{quiet:!0,abort:!0}),(!e||"unload"!==e.type&&"destroy"!==e.type)&&r.autoSync())},P=function(e){if(r.trigger(u+"done"),"autosync"==e.type){if("stop"!=e.data.action)return}else if(!("unload"==e.type||"destroy"==e.type||"openxhrabort"==e.type||e.data.added&&e.data.added.length))return;U(e)},q=function(t){var n=function(){C=!1,c.reject()};if(t&&"cmd"===t)return u;if(f){if(ie&&"pending"===ie.state()){if(ie._target===p.target)return c.reject("openabort");ie.xhr?ie.xhr.queueAbort():ie.reject("openabort")}ie=c,ie._target=p.target}if(c.always(function(){delete M.headers["X-elFinderReqid"],f&&(ie=null)}).fail(function(t,n,i){var a,s;f&&"openabort"===t&&(t="",C=!1),a={cmd:u,err:t,xhr:n,rc:i},0===t&&ne.length&&(ne=e.grep(ne,function(e){return e("cmd")!==u})),r.trigger("requestError",a),a._getEvent&&a._getEvent().isDefaultPrevented()&&(m=!1,C=!1,t&&(t.error="")),U(),f&&(o=r.file(p.target),o&&o.volumeid&&r.isRoot(o)&&delete r.volumeExpires[o.volumeid]),r.trigger(u+"fail",i),s="object"==typeof t?t.error:t,s&&(m?r.error(s):r.debug("error",r.i18n(s))),C&&r.sync()}),!u)return C=!1,c.reject({error:"errCmdReq"});if(r.maxTargets&&p.targets&&p.targets.length>r.maxTargets)return C=!1,c.reject({error:["errMaxTargets",r.maxTargets]});if(g&&c.done(E),f){for(;a=R.pop();)a.queueAbort();if(j!==p.target)for(;a=H.pop();)a.queueAbort()}return e.inArray(u,(r.cmdsToAdd+" autosync").split(" "))!==-1&&("autosync"!==u&&(r.autoSync("stop"),c.always(function(){r.autoSync()})),r.trigger("openxhrabort")),delete M.preventFail,r.api>=2.1029&&(I?M.headers["X-elFinderReqid"]=d:Object.assign(M.data,{reqid:d})),c.syncOnFail=function(e){C=!!e},te++,c.xhr=i=r.transport.send(M).always(function(){M._xhr&&"undefined"!=typeof M._xhr.responseURL&&(i.responseURL=M._xhr.responseURL||""),--te,ne.length&&ne.shift()()}).fail(F).done(D),r.api>=2.1029&&(i._requestId=d),f||p.compare&&"info"===u?(i.queueAbort=n,R.unshift(i),p.compare&&r.bind(r.cmdsToAdd+" autosync openxhrabort",P),c.always(function(){var t=e.inArray(i,R);p.compare&&r.unbind(r.cmdsToAdd+" autosync openxhrabort",P),t!==-1&&R.splice(t,1)})):e.inArray(u,r.abortCmdsOnOpen)!==-1&&(i.queueAbort=n,H.unshift(i),c.always(function(){var t=e.inArray(i,H);t!==-1&&H.splice(t,1)})),r.bind("unload destroy",P),c.always(function(){r.unbind("unload destroy",P)}),c},_=function(){return w.type&&w.cnt&&(x&&(w.cancel=c,t.eachCancel&&(w.id=+new Date)),n=setTimeout(function(){b=setTimeout(N,1e3),r.notify(w),y=!0,c.always(function(){w.cnt=-(parseInt(w.cnt)||0),r.notify(w),y=!1})},r.notifyDelay),c.always(function(){clearTimeout(n)})),te<s?q():(f?ne.unshift(q):ne.push(q),c)},N=function(){var e;y&&b&&(e=1*w.cnt,b=null,r.notify({type:w.type,progress:e,cnt:0,hideCnt:w.hideCnt}),v+=e,v/w.cnt<80&&(b=setTimeout(N,500)))},L={opts:t,result:!0};return r.api||p.init?(r.trigger("request."+u,L,!0),L.result?"object"==typeof L.result&&L.result.promise?(L.result.done(_).fail(function(){r.trigger(u+"done"),c.reject()}),c):_():(r.trigger(u+"done"),c.reject())):(C=!1,c.reject())},this.cache=function(e,t){Array.isArray(e)||(e=[e]),Q(e,t)},this.updateCache=function(t){e.isPlainObject(t)&&(t.files&&t.files.length&&Q(t.files,"files"),t.tree&&t.tree.length&&Q(t.tree,"tree"),t.removed&&t.removed.length&&Z(t.removed),t.added&&t.added.length&&Q(t.added,"add"),t.changed&&t.changed.length&&Q(t.changed,"change"))},this.diff=function(t,n,i){var a={},o=[],r=[],s=[],l=null,c=function(e){for(var t=s.length;t--;)if(s[t].hash==e)return!0};return e.each(t,function(e,t){a[t.hash]=t}),i&&i.length&&(l={},e.each(i,function(){l[this]=!0})),e.each(I,function(e,t){a[e]||n&&t.phash!==n||r.push(e)}),e.each(a,function(t,n){var i,a=I[t],r={};a?(e.each(Object.keys(a),function(){r[this]=!0}),e.each(n,function(e){if(delete r[e],!(l&&l[e]||n[e]===a[e]))return s.push(n),r={},!1}),i=Object.keys(r).length,0!==i&&(l&&e.each(r,function(e){l[e]&&--i}),0!==i&&s.push(n))):o.push(n)}),e.each(r,function(t,n){var i=I[n],o=i.phash;o&&"directory"==i.mime&&e.inArray(o,r)===-1&&a[o]&&!c(o)&&s.push(a[o])}),{added:o,removed:r,changed:s}},this.sync=function(t,n){this.autoSync("stop");var i,a=this,o=function(){var i="",a=0,o=0;return t&&n&&e.each(I,function(e,n){n.phash&&n.phash===t&&(++a,o=Math.max(o,n.ts)),i=a+":"+o}),i},r=o(),s=e.Deferred().always(function(){!i&&a.trigger("sync")}),l=[this.request({data:{cmd:"open",reload:1,target:j,tree:!t&&this.ui.tree?1:0,compare:r},preventDefault:!0})],c=function(){for(var e,t=[],n=a.file(a.root(j)),i=n?n.volumeid:null,o=a.cwd().phash;o;)(e=a.file(o))?(0!==o.indexOf(i)&&(t.push({target:o,cmd:"tree"}),a.isRoot(e)||t.push({target:o,cmd:"parents"}),n=a.file(a.root(o)),i=n?n.volumeid:null),o=e.phash):o=null;return t};return!t&&a.api>=2&&(j!==this.root()&&l.push(this.request({
10
+ data:{cmd:"parents",target:j},preventDefault:!0})),e.each(c(),function(e,t){l.push(a.request({data:{cmd:t.cmd,target:t.target},preventDefault:!0}))})),e.when.apply(e,l).fail(function(t,o){i=o&&200!=o.status,n&&e.inArray("errOpen",t)===-1?s.reject(t&&0!=o.status?t:void 0):(s.reject(t),a.parseError(t)&&a.request({data:{cmd:"open",target:a.lastDir("")||a.root(),tree:1,init:1},notify:{type:"open",cnt:1,hideCnt:!0}}))}).done(function(e){var n,i,o;if(e.cwd.compare&&r===e.cwd.compare)return s.reject();if(n={tree:[]},i=arguments.length,i>1)for(o=1;o<i;o++)arguments[o].tree&&arguments[o].tree.length&&n.tree.push.apply(n.tree,arguments[o].tree);if(a.api<2.1&&(n.tree||(n.tree=[]),n.tree.push(e.cwd)),e=a.normalize(e),!a.validResponse("open",e))return s.reject(e.norError||"errResponse");if(n=a.normalize(n),!a.validResponse("tree",n))return s.reject(n.norError||"errResponse");var l=a.diff(e.files.concat(n&&n.tree?n.tree:[]),t);return l.added.push(e.cwd),a.updateCache(l),l.removed.length&&a.remove(l),l.added.length&&a.add(l),l.changed.length&&a.change(l),s.resolve(l)}).always(function(){a.autoSync()}),s},this.upload=function(e){return this.transport.upload(e,this)},this.shortcut=function(t){var n,i,a,o,r;if(this.options.allowShortcuts&&t.pattern&&e.isFunction(t.callback))for(n=t.pattern.toUpperCase().split(/\s+/),o=0;o<n.length;o++)i=n[o],r=i.split("+"),a=1==(a=r.pop()).length?a>0?a:a.charCodeAt(0):a>0?a:e.ui.keyCode[a],a&&!U[i]&&(U[i]={keyCode:a,altKey:e.inArray("ALT",r)!=-1,ctrlKey:e.inArray("CTRL",r)!=-1,shiftKey:e.inArray("SHIFT",r)!=-1,type:t.type||"keydown",callback:t.callback,description:t.description,pattern:i});return this},this.shortcuts=function(){var t=[];return e.each(U,function(e,n){t.push([n.pattern,u.i18n(n.description)])}),t},this.clipboard=function(t,n){var i=function(){return e.map(P,function(e){return e.hash})};return void 0!==t&&(P.length&&this.trigger("unlockfiles",{files:i()}),q={},P=e.map(t||[],function(e){var t=I[e];return t?(q[e]=!0,{hash:e,phash:t.phash,name:t.name,mime:t.mime,read:t.read,locked:t.locked,cut:!!n}):null}),this.trigger("changeclipboard",{clipboard:P.slice(0,P.length)}),n&&this.trigger("lockfiles",{files:i()})),P.slice(0,P.length)},this.isCommandEnabled=function(e,t){var n,i,a=u.cwd().volumeid||"";return!t&&u.searchStatus.state>1&&u.selected().length&&(t=u.selected()[0]),n=!t||a&&0===t.indexOf(a)?S.disabledFlip:u.