@bbn/bbn 1.0.25 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/dist/bundle.d.ts +224 -238
  2. package/dist/bundle.js +939 -906
  3. package/dist/fn/_addLoader.js +1 -1
  4. package/dist/fn/_deleteLoader.d.ts +1 -1
  5. package/dist/fn/_deleteLoader.js +2 -2
  6. package/dist/fn/abort.js +4 -4
  7. package/dist/fn/abortURL.js +2 -2
  8. package/dist/fn/addColors.d.ts +1 -1
  9. package/dist/fn/addColors.js +23 -6
  10. package/dist/fn/addInputs.d.ts +1 -2
  11. package/dist/fn/addInputs.js +4 -5
  12. package/dist/fn/adjustHeight.js +1 -1
  13. package/dist/fn/adjustSize.js +1 -1
  14. package/dist/fn/adjustWidth.js +1 -1
  15. package/dist/fn/ajax.d.ts +1 -1
  16. package/dist/fn/ajax.js +8 -7
  17. package/dist/fn/analyzeFunction.js +5 -5
  18. package/dist/fn/animateCss.js +8 -7
  19. package/dist/fn/baseName.d.ts +1 -1
  20. package/dist/fn/baseName.js +1 -1
  21. package/dist/fn/br2nl.d.ts +1 -1
  22. package/dist/fn/br2nl.js +1 -1
  23. package/dist/fn/calendar.js +1 -1
  24. package/dist/fn/callback.d.ts +1 -1
  25. package/dist/fn/callback.js +5 -5
  26. package/dist/fn/camelToCss.js +4 -2
  27. package/dist/fn/canvasToImage.js +1 -1
  28. package/dist/fn/center.js +3 -5
  29. package/dist/fn/checkProps.d.ts +1 -1
  30. package/dist/fn/checkProps.js +1 -1
  31. package/dist/fn/checkPropsDetails.d.ts +1 -4
  32. package/dist/fn/checkPropsDetails.js +10 -11
  33. package/dist/fn/checkPropsOrDie.d.ts +1 -1
  34. package/dist/fn/checkPropsOrDie.js +1 -1
  35. package/dist/fn/checkType.d.ts +1 -1
  36. package/dist/fn/checkType.js +3 -3
  37. package/dist/fn/chrono.d.ts +3 -0
  38. package/dist/fn/chrono.js +23 -0
  39. package/dist/fn/circularReplacer.js +2 -2
  40. package/dist/fn/clone.d.ts +0 -1
  41. package/dist/fn/clone.js +1 -1
  42. package/dist/fn/colorToHex.js +1 -1
  43. package/dist/fn/compare.js +44 -44
  44. package/dist/fn/compareConditions.d.ts +0 -1
  45. package/dist/fn/compareConditions.js +3 -3
  46. package/dist/fn/copy.js +9 -9
  47. package/dist/fn/correctCase.js +1 -1
  48. package/dist/fn/count.d.ts +1 -1
  49. package/dist/fn/count.js +2 -2
  50. package/dist/fn/crc32.js +11 -3
  51. package/dist/fn/createObject.d.ts +1 -1
  52. package/dist/fn/createObject.js +3 -3
  53. package/dist/fn/cssExists.js +7 -4
  54. package/dist/fn/date.js +5 -5
  55. package/dist/fn/dateSQL.js +4 -3
  56. package/dist/fn/deepPath.d.ts +1 -2
  57. package/dist/fn/defaultAjaxAbortFunction.d.ts +1 -1
  58. package/dist/fn/defaultAjaxAbortFunction.js +1 -1
  59. package/dist/fn/defaultAjaxErrorFunction.d.ts +1 -1
  60. package/dist/fn/defaultAjaxErrorFunction.js +0 -12
  61. package/dist/fn/defaultAlertFunction.d.ts +1 -1
  62. package/dist/fn/defaultAlertFunction.js +2 -3
  63. package/dist/fn/defaultConfirmFunction.d.ts +1 -1
  64. package/dist/fn/defaultEndLoadingFunction.d.ts +1 -1
  65. package/dist/fn/defaultEndLoadingFunction.js +1 -17
  66. package/dist/fn/defaultPostLinkFunction.d.ts +1 -1
  67. package/dist/fn/defaultPostLinkFunction.js +1 -1
  68. package/dist/fn/defaultPreLinkFunction.d.ts +1 -1
  69. package/dist/fn/defaultPreLinkFunction.js +2 -10
  70. package/dist/fn/defaultStartLoadingFunction.d.ts +1 -1
  71. package/dist/fn/defaultStartLoadingFunction.js +2 -13
  72. package/dist/fn/deleteProp.d.ts +1 -1
  73. package/dist/fn/deleteProp.js +3 -2
  74. package/dist/fn/diffObj.d.ts +1 -2
  75. package/dist/fn/diffObj.js +13 -14
  76. package/dist/fn/dirName.d.ts +1 -1
  77. package/dist/fn/download.d.ts +1 -1
  78. package/dist/fn/download.js +3 -5
  79. package/dist/fn/downloadContent.d.ts +1 -1
  80. package/dist/fn/each.js +1 -1
  81. package/dist/fn/error.js +2 -2
  82. package/dist/fn/escapeRegExp.js +1 -1
  83. package/dist/fn/escapeTicks.js +1 -1
  84. package/dist/fn/escapeUrl.js +1 -1
  85. package/dist/fn/extend.d.ts +1 -2
  86. package/dist/fn/extend.js +11 -11
  87. package/dist/fn/extendOut.d.ts +1 -2
  88. package/dist/fn/extendOut.js +3 -3
  89. package/dist/fn/fdate.d.ts +1 -1
  90. package/dist/fn/fdatetime.d.ts +1 -1
  91. package/dist/fn/fdatetime.js +1 -1
  92. package/dist/fn/fieldValue.js +2 -2
  93. package/dist/fn/fileExt.js +1 -1
  94. package/dist/fn/filter.d.ts +1 -2
  95. package/dist/fn/filter.js +13 -12
  96. package/dist/fn/filterToConditions.d.ts +11 -3
  97. package/dist/fn/filterToConditions.js +6 -6
  98. package/dist/fn/findAll.d.ts +0 -1
  99. package/dist/fn/findAll.js +1 -1
  100. package/dist/fn/fori.d.ts +1 -1
  101. package/dist/fn/fori.js +2 -2
  102. package/dist/fn/forir.d.ts +1 -1
  103. package/dist/fn/forir.js +2 -2
  104. package/dist/fn/formdata.d.ts +1 -1
  105. package/dist/fn/formdata.js +12 -13
  106. package/dist/fn/fromXml.js +6 -6
  107. package/dist/fn/ftime.js +1 -1
  108. package/dist/fn/getAllTags.d.ts +1 -1
  109. package/dist/fn/getAllTags.js +1 -1
  110. package/dist/fn/getAncestors.d.ts +1 -1
  111. package/dist/fn/getAncestors.js +7 -8
  112. package/dist/fn/getAttributes.js +2 -2
  113. package/dist/fn/getBrowserName.js +9 -9
  114. package/dist/fn/getBrowserVersion.js +2 -2
  115. package/dist/fn/getCookie.js +1 -1
  116. package/dist/fn/getDeviceType.js +3 -3
  117. package/dist/fn/getEventData.js +11 -8
  118. package/dist/fn/getField.d.ts +1 -1
  119. package/dist/fn/getField.js +4 -3
  120. package/dist/fn/getFieldValues.d.ts +1 -1
  121. package/dist/fn/getFieldValues.js +2 -2
  122. package/dist/fn/getHTMLOfSelection.d.ts +1 -1
  123. package/dist/fn/getHTMLOfSelection.js +9 -19
  124. package/dist/fn/getLoader.d.ts +1 -1
  125. package/dist/fn/getPath.d.ts +1 -1
  126. package/dist/fn/getPath.js +4 -4
  127. package/dist/fn/getProp.js +3 -2
  128. package/dist/fn/getProperty.js +1 -1
  129. package/dist/fn/getRow.d.ts +1 -1
  130. package/dist/fn/getRow.js +1 -1
  131. package/dist/fn/getScrollBarSize.js +9 -7
  132. package/dist/fn/getText.d.ts +1 -1
  133. package/dist/fn/getTimeoff.js +1 -1
  134. package/dist/fn/happy.js +1 -1
  135. package/dist/fn/hash.d.ts +1 -1
  136. package/dist/fn/hash.js +1 -1
  137. package/dist/fn/hex2rgb.js +7 -5
  138. package/dist/fn/html2text.d.ts +1 -1
  139. package/dist/fn/imageToCanvas.js +2 -2
  140. package/dist/fn/imgToBase64.d.ts +1 -1
  141. package/dist/fn/imgToBase64.js +3 -3
  142. package/dist/fn/info.js +1 -1
  143. package/dist/fn/init.js +29 -29
  144. package/dist/fn/isActiveInterface.js +2 -2
  145. package/dist/fn/isColor.d.ts +1 -1
  146. package/dist/fn/isColor.js +11 -4
  147. package/dist/fn/isCp.js +7 -7
  148. package/dist/fn/isDimension.d.ts +1 -1
  149. package/dist/fn/isDimension.js +11 -4
  150. package/dist/fn/isEmail.d.ts +1 -1
  151. package/dist/fn/isEmail.js +11 -4
  152. package/dist/fn/isEmpty.js +1 -1
  153. package/dist/fn/isFocused.d.ts +1 -1
  154. package/dist/fn/isFocused.js +1 -1
  155. package/dist/fn/isHostname.js +1 -1
  156. package/dist/fn/isIP.js +1 -1
  157. package/dist/fn/isInside.js +1 -1
  158. package/dist/fn/isIterable.js +1 -1
  159. package/dist/fn/isNumber.js +1 -1
  160. package/dist/fn/isPercent.js +1 -1
  161. package/dist/fn/isPrimitive.js +1 -1
  162. package/dist/fn/isPropSize.js +1 -1
  163. package/dist/fn/isSQLDate.js +1 -1
  164. package/dist/fn/isSame.d.ts +1 -2
  165. package/dist/fn/isSame.js +3 -3
  166. package/dist/fn/isURL.js +1 -1
  167. package/dist/fn/isValidDimension.js +2 -3
  168. package/dist/fn/isValue.js +1 -1
  169. package/dist/fn/isVue.d.ts +1 -1
  170. package/dist/fn/isVue.js +5 -5
  171. package/dist/fn/iterate.d.ts +1 -1
  172. package/dist/fn/iterate.js +3 -3
  173. package/dist/fn/lightenDarkenHex.js +2 -2
  174. package/dist/fn/link.d.ts +1 -2
  175. package/dist/fn/link.js +17 -19
  176. package/dist/fn/log.js +4 -4
  177. package/dist/fn/makeReactive.d.ts +0 -1
  178. package/dist/fn/makeReactive.js +35 -23
  179. package/dist/fn/map.d.ts +0 -1
  180. package/dist/fn/md5.js +30 -10
  181. package/dist/fn/money.d.ts +1 -1
  182. package/dist/fn/money.js +47 -34
  183. package/dist/fn/move.d.ts +1 -1
  184. package/dist/fn/move.js +1 -1
  185. package/dist/fn/multiorder.d.ts +1 -1
  186. package/dist/fn/multiorder.js +5 -5
  187. package/dist/fn/nl2br.d.ts +1 -1
  188. package/dist/fn/nl2br.js +1 -1
  189. package/dist/fn/numProperties.d.ts +1 -1
  190. package/dist/fn/numProperties.js +1 -1
  191. package/dist/fn/objectToFormData.d.ts +1 -1
  192. package/dist/fn/objectToFormData.js +3 -3
  193. package/dist/fn/outerHeight.d.ts +1 -1
  194. package/dist/fn/outerHeight.js +5 -4
  195. package/dist/fn/outerWidth.d.ts +1 -1
  196. package/dist/fn/outerWidth.js +1 -2
  197. package/dist/fn/pickValue.d.ts +1 -1
  198. package/dist/fn/post.d.ts +1 -1
  199. package/dist/fn/post.js +3 -3
  200. package/dist/fn/postOut.d.ts +1 -1
  201. package/dist/fn/postOut.js +2 -2
  202. package/dist/fn/printf.js +1 -3
  203. package/dist/fn/quotes2html.d.ts +1 -1
  204. package/dist/fn/quotes2html.js +3 -3
  205. package/dist/fn/randomInt.d.ts +1 -1
  206. package/dist/fn/randomString.d.ts +1 -1
  207. package/dist/fn/randomString.js +9 -8
  208. package/dist/fn/removeAccents.d.ts +1 -1
  209. package/dist/fn/removeAccents.js +1 -1
  210. package/dist/fn/removeEmpty.d.ts +1 -1
  211. package/dist/fn/removeExtraSpaces.d.ts +1 -1
  212. package/dist/fn/removeHtmlComments.d.ts +1 -1
  213. package/dist/fn/removePrivateProp.d.ts +1 -2
  214. package/dist/fn/removePrivateProp.js +6 -6
  215. package/dist/fn/removeTrailingChars.d.ts +1 -1
  216. package/dist/fn/repeat.d.ts +1 -1
  217. package/dist/fn/repeat.js +1 -6
  218. package/dist/fn/replaceAll.d.ts +1 -1
  219. package/dist/fn/replaceAll.js +1 -4
  220. package/dist/fn/replaceSelection.js +1 -1
  221. package/dist/fn/resize.js +9 -7
  222. package/dist/fn/rgb2hex.js +6 -4
  223. package/dist/fn/riterate.d.ts +1 -1
  224. package/dist/fn/roundDecimal.d.ts +1 -1
  225. package/dist/fn/roundDecimal.js +1 -1
  226. package/dist/fn/sanitize.js +3 -1
  227. package/dist/fn/search.d.ts +2 -1
  228. package/dist/fn/search.js +24 -21
  229. package/dist/fn/selectElementText.d.ts +1 -1
  230. package/dist/fn/selectElementText.js +1 -1
  231. package/dist/fn/selector.d.ts +1 -1
  232. package/dist/fn/selector.js +1 -1
  233. package/dist/fn/setCookie.js +4 -4
  234. package/dist/fn/setCssVar.js +2 -1
  235. package/dist/fn/setNavigationVars.d.ts +1 -1
  236. package/dist/fn/setNavigationVars.js +6 -5
  237. package/dist/fn/setProp.d.ts +1 -1
  238. package/dist/fn/setProp.js +1 -3
  239. package/dist/fn/setProperty.d.ts +1 -1
  240. package/dist/fn/setProperty.js +2 -2
  241. package/dist/fn/shorten.d.ts +1 -1
  242. package/dist/fn/shorten.js +3 -3
  243. package/dist/fn/shortenObj.d.ts +1 -2
  244. package/dist/fn/shortenObj.js +2 -2
  245. package/dist/fn/shuffle.d.ts +1 -1
  246. package/dist/fn/shuffle.js +1 -3
  247. package/dist/fn/simpleHash.d.ts +1 -1
  248. package/dist/fn/simpleHash1.d.ts +1 -1
  249. package/dist/fn/simpleHash1.js +1 -1
  250. package/dist/fn/simpleHash2.d.ts +1 -1
  251. package/dist/fn/stat.d.ts +1 -1
  252. package/dist/fn/stat.js +8 -8
  253. package/dist/fn/string2ArrayBuffer.d.ts +1 -1
  254. package/dist/fn/submit.d.ts +1 -1
  255. package/dist/fn/submit.js +6 -21
  256. package/dist/fn/substr.d.ts +1 -1
  257. package/dist/fn/substr.js +1 -1
  258. package/dist/fn/sum.d.ts +1 -1
  259. package/dist/fn/sum.js +2 -3
  260. package/dist/fn/timestamp.d.ts +1 -1
  261. package/dist/fn/timestamp.js +1 -1
  262. package/dist/fn/toCSV.d.ts +1 -1
  263. package/dist/fn/toCSV.js +1 -1
  264. package/dist/fn/toggleFullScreen.js +13 -13
  265. package/dist/fn/translate.d.ts +1 -1
  266. package/dist/fn/treatAjaxArguments.d.ts +1 -1
  267. package/dist/fn/treatAjaxArguments.js +16 -14
  268. package/dist/fn/uniqString.js +3 -3
  269. package/dist/fn/unique.d.ts +1 -1
  270. package/dist/fn/upload.d.ts +1 -1
  271. package/dist/fn/upload.js +6 -6
  272. package/dist/fn/warning.d.ts +1 -1
  273. package/dist/fn/warning.js +6 -6
  274. package/dist/index.d.ts +106 -108
  275. package/dist/index.js +5 -6
  276. package/package.json +3 -1
package/dist/bundle.js CHANGED
@@ -65,8 +65,8 @@ var bbn = (() => {
65
65
  if (window.console !== undefined) {
66
66
  let cfg;
67
67
  let level = 5;
68
- let fn = "log";
69
- if (args[0] && (typeof args[0] === 'object') && args[0]._bbn_console_style) {
68
+ let fn = 'log';
69
+ if (args[0] && typeof args[0] === 'object' && args[0]._bbn_console_style) {
70
70
  if (args[0]._bbn_console_mode && (0, isFunction_1.isFunction)(console[args[0]._bbn_console_mode])) {
71
71
  fn = args[0]._bbn_console_mode;
72
72
  }
@@ -80,8 +80,8 @@ var bbn = (() => {
80
80
  let i = 0;
81
81
  while (i < args.length) {
82
82
  let t = typeof args[i];
83
- if ((t === 'string') || (t === 'number')) {
84
- window.console[fn]("%c %s ", cfg, args[i]);
83
+ if (t === 'string' || t === 'number') {
84
+ window.console[fn]('%c %s ', cfg, args[i]);
85
85
  }
86
86
  else {
87
87
  window.console[fn](args[i]);
@@ -101,7 +101,7 @@ var bbn = (() => {
101
101
  const substr = function (str, from, length) {
102
102
  if (!(0, isString_1.isString)(str) || !(0, isInt_1.isInt)(from)) {
103
103
  (0, log_1.log)(arguments);
104
- throw new Error(bbn._("The substr function should be applied to a string and at least a `from` argument should be given"));
104
+ throw new Error(bbn._('The substr function should be applied to a string and at least a `from` argument should be given'));
105
105
  }
106
106
  if (from < 0) {
107
107
  from = str.length + from;
@@ -146,7 +146,7 @@ var bbn = (() => {
146
146
  while (idx && (bbn.env.loadersHistory.length > bbn.env.maxLoadersHistory)) {
147
147
  idx--;
148
148
  // Not removing the ones still loading
149
- if (!bbn.env.loadersHistory.loading) {
149
+ if (!bbn.env.loading) {
150
150
  bbn.env.loadersHistory.splice(idx, 1);
151
151
  }
152
152
  }
@@ -159,7 +159,7 @@ var bbn = (() => {
159
159
  Object.defineProperty(exports, "__esModule", { value: true });
160
160
  exports.getProperty = void 0;
161
161
  const getProperty = function (obj, prop) {
162
- if ((typeof obj === 'object') && (typeof prop === 'string')) {
162
+ if (typeof obj === 'object' && typeof prop === 'string') {
163
163
  return prop.split('.').reduce((o, i) => {
164
164
  if (o) {
165
165
  return o[i];
@@ -181,7 +181,7 @@ var bbn = (() => {
181
181
  }
182
182
  else {
183
183
  (0, log_2.log)(st);
184
- throw new Error(bbn._("removeAccent expects a string"));
184
+ throw new Error(bbn._('removeAccent expects a string'));
185
185
  }
186
186
  }
187
187
  return st.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
@@ -250,7 +250,7 @@ var bbn = (() => {
250
250
  Object.defineProperty(exports, "__esModule", { value: true });
251
251
  exports.isIterable = void 0;
252
252
  const isIterable = function (v) {
253
- return v && (typeof v === 'object') && (Symbol.iterator in Object(v));
253
+ return v && typeof v === 'object' && Symbol.iterator in Object(v);
254
254
  };
255
255
  exports.isIterable = isIterable;
256
256
  });
@@ -278,7 +278,7 @@ var bbn = (() => {
278
278
  if (!args.length)
279
279
  return false;
280
280
  for (let a of args) {
281
- if (['boolean', 'object', 'symbol'].includes(typeof a) || (a === '') || isNaN(a)) {
281
+ if (['boolean', 'object', 'symbol'].includes(typeof a) || a === '' || isNaN(a)) {
282
282
  return false;
283
283
  }
284
284
  }
@@ -290,13 +290,13 @@ var bbn = (() => {
290
290
  "use strict";
291
291
  Object.defineProperty(exports, "__esModule", { value: true });
292
292
  exports.removePrivateProp = void 0;
293
- const removePrivateProp = function (obj, deep) {
294
- var r = false;
295
- if (typeof (obj) === "object") {
293
+ const removePrivateProp = function (obj, deep = false) {
294
+ let r = null;
295
+ if (typeof obj === 'object') {
296
296
  r = {};
297
297
  for (var n in obj) {
298
- if ((0, substr_2.substr)(n, 0, 1).match(/^[A-z0-9]$/) && Object.hasOwn(obj, n)) {
299
- if (deep && (typeof (obj[n]) === "object")) {
298
+ if ((0, substr_2.substr)(n, 0, 1).match(/^[A-z0-9]$/) && (n in obj)) {
299
+ if (deep && typeof obj[n] === 'object') {
300
300
  r[n] = removePrivateProp(obj[n], true);
301
301
  }
302
302
  else {
@@ -305,7 +305,7 @@ var bbn = (() => {
305
305
  }
306
306
  }
307
307
  }
308
- return r;
308
+ return r || false;
309
309
  };
310
310
  exports.removePrivateProp = removePrivateProp;
311
311
  });
@@ -313,13 +313,13 @@ var bbn = (() => {
313
313
  "use strict";
314
314
  Object.defineProperty(exports, "__esModule", { value: true });
315
315
  exports.iterate = void 0;
316
- const iterate = function (obj, fn, noPrivate, reverse) {
317
- if ((obj !== null) && (typeof obj === 'object')) {
316
+ const iterate = function (obj, fn, noPrivate = false, reverse = false) {
317
+ if (obj !== null && typeof obj === 'object') {
318
318
  let iter = Object.keys(noPrivate ? (0, removePrivateProp_1.removePrivateProp)(obj) : obj);
319
319
  if (reverse) {
320
320
  iter.reverse();
321
321
  }
322
- (0, each_1.each)(iter, prop => {
322
+ (0, each_1.each)(iter, (prop) => {
323
323
  if (fn(obj[prop], prop) === false) {
324
324
  return false;
325
325
  }
@@ -334,7 +334,7 @@ var bbn = (() => {
334
334
  Object.defineProperty(exports, "__esModule", { value: true });
335
335
  exports.each = void 0;
336
336
  const each = function (arr, fn) {
337
- if ((0, isNumber_1.isNumber)(arr) && (arr > 0)) {
337
+ if ((0, isNumber_1.isNumber)(arr) && arr > 0) {
338
338
  for (let i = 0; i < arr; i++) {
339
339
  if (fn(i, i) === false) {
340
340
  return;
@@ -359,7 +359,7 @@ var bbn = (() => {
359
359
  Object.defineProperty(exports, "__esModule", { value: true });
360
360
  exports.numProperties = void 0;
361
361
  const numProperties = function (obj) {
362
- if (!obj || (typeof obj !== 'object')) {
362
+ if (!obj || typeof obj !== 'object') {
363
363
  return 0;
364
364
  }
365
365
  return Object.keys(obj).length;
@@ -377,7 +377,7 @@ var bbn = (() => {
377
377
  if ((0, isArray_1.isArray)(obj)) {
378
378
  return obj.length ? false : true;
379
379
  }
380
- if (typeof (obj) === 'object') {
380
+ if (typeof obj === 'object') {
381
381
  if ((0, numProperties_1.numProperties)(obj)) {
382
382
  return false;
383
383
  }
@@ -443,14 +443,14 @@ var bbn = (() => {
443
443
  if (!args.length) {
444
444
  return false;
445
445
  }
446
- if (!Object.hasOwn(bbn, 'cp')) {
447
- return false;
448
- }
449
- for (let a of args) {
450
- let res = bbn.cp.isComponent(a);
451
- if (!res || (0, isDom_1.isDom)(res) || !res.$el) {
452
- return false;
446
+ if ('cp' in bbn && 'isComponent' in bbn['cp'] && (typeof bbn['cp'].isComponent === 'function')) {
447
+ for (let a of args) {
448
+ let res = bbn.cp.isComponent(a);
449
+ if (!res || (0, isDom_1.isDom)(res) || !res.$el) {
450
+ return false;
451
+ }
453
452
  }
453
+ return false;
454
454
  }
455
455
  return true;
456
456
  };
@@ -463,7 +463,7 @@ var bbn = (() => {
463
463
  const circularReplacer = function () {
464
464
  const visited = new WeakSet();
465
465
  return (key, value) => {
466
- if ((typeof value === "object") && (value !== null)) {
466
+ if (typeof value === 'object' && value !== null) {
467
467
  if (visited.has(value)) {
468
468
  return;
469
469
  }
@@ -478,7 +478,7 @@ var bbn = (() => {
478
478
  }
479
479
  }
480
480
  else if ((0, isCp_1.isCp)(value)) {
481
- (0, log_3.log)("IS CP");
481
+ (0, log_3.log)('IS CP');
482
482
  value = '__BBN_CP__' + value.$options.name + '/' + value.$cid;
483
483
  }
484
484
  else {
@@ -499,7 +499,7 @@ var bbn = (() => {
499
499
  let hash = 0;
500
500
  for (let i = 0; i < str.length; i++) {
501
501
  const char = str.charCodeAt(i);
502
- hash = ((hash << 5) - hash) + char;
502
+ hash = (hash << 5) - hash + char;
503
503
  hash |= 0; // Convert to 32-bit integer
504
504
  }
505
505
  return hash;
@@ -551,7 +551,7 @@ var bbn = (() => {
551
551
  }
552
552
  }
553
553
  else if ((0, isCp_2.isCp)(value)) {
554
- (0, log_4.log)("IS CP");
554
+ (0, log_4.log)('IS CP');
555
555
  st += '__BBN_CP__' + value.$options.name + '/' + value.$cid;
556
556
  }
557
557
  else {
@@ -579,20 +579,20 @@ var bbn = (() => {
579
579
  if (obj1 === obj2) {
580
580
  return true;
581
581
  }
582
- if (obj1 && obj2 && (typeof (obj1) === 'object') && (typeof (obj2) === 'object')) {
582
+ if (obj1 && obj2 && typeof obj1 === 'object' && typeof obj2 === 'object') {
583
583
  let tmp1 = Object.keys(obj1).sort(), tmp2 = Object.keys(obj2).sort();
584
584
  // Case where the keys are different
585
585
  if ((0, hash_1.hash)(tmp1) !== (0, hash_1.hash)(tmp2)) {
586
586
  return false;
587
587
  }
588
588
  let ok = true;
589
- if (obj1 && (typeof obj1 === 'object')) {
589
+ if (obj1 && typeof obj1 === 'object') {
590
590
  if (done.includes(obj1)) {
591
591
  return ok;
592
592
  }
593
593
  done.push(obj1);
594
594
  }
595
- (0, each_2.each)(tmp1, a => {
595
+ (0, each_2.each)(tmp1, (a) => {
596
596
  if (!isSame(obj1[a], obj2[a])) {
597
597
  ok = false;
598
598
  return false;
@@ -610,88 +610,88 @@ var bbn = (() => {
610
610
  exports.compare = void 0;
611
611
  const compare = function (v1, v2, operator) {
612
612
  switch (operator) {
613
- case "===":
614
- case "=":
615
- case "equal":
616
- case "eq":
617
- case "is":
613
+ case '===':
614
+ case '=':
615
+ case 'equal':
616
+ case 'eq':
617
+ case 'is':
618
618
  return v1 === v2;
619
- case "!==":
620
- case "notequal":
621
- case "neq":
622
- case "isnot":
619
+ case '!==':
620
+ case 'notequal':
621
+ case 'neq':
622
+ case 'isnot':
623
623
  return v1 !== v2;
624
- case "!=":
625
- case "different":
624
+ case '!=':
625
+ case 'different':
626
626
  return v1 != v2;
627
- case "contains":
628
- case "contain":
629
- case "icontains":
630
- case "icontain":
627
+ case 'contains':
628
+ case 'contain':
629
+ case 'icontains':
630
+ case 'icontain':
631
631
  if ((0, isEmpty_1.isEmpty)(v1) || (0, isEmpty_1.isEmpty)(v2)) {
632
632
  return false;
633
633
  }
634
634
  return (0, removeAccents_2.removeAccents)(v1).toLowerCase().indexOf((0, removeAccents_2.removeAccents)(v2).toLowerCase()) !== -1;
635
- case "doesnotcontain":
636
- case "donotcontain":
635
+ case 'doesnotcontain':
636
+ case 'donotcontain':
637
637
  if ((0, isNull_1.isNull)(v1) || (0, isNull_1.isNull)(v2)) {
638
638
  return true;
639
639
  }
640
640
  return (0, removeAccents_2.removeAccents)(v1.toLowerCase()).indexOf((0, removeAccents_2.removeAccents)(v2.toLowerCase())) === -1;
641
- case "starts":
642
- case "start":
641
+ case 'starts':
642
+ case 'start':
643
643
  if ((0, isNull_1.isNull)(v1) || (0, isNull_1.isNull)(v2)) {
644
644
  return false;
645
645
  }
646
- if ((typeof (v1) !== 'string')) {
646
+ if (typeof v1 !== 'string') {
647
647
  v1 = v1.toString() || '';
648
648
  }
649
- if ((typeof (v2) !== 'string')) {
649
+ if (typeof v2 !== 'string') {
650
650
  v2 = v2.toString() || '';
651
651
  }
652
652
  return v1.indexOf(v2) === 0;
653
- case "startswith":
654
- case "startsi":
655
- case "starti":
656
- case "istarts":
657
- case "istart":
653
+ case 'startswith':
654
+ case 'startsi':
655
+ case 'starti':
656
+ case 'istarts':
657
+ case 'istart':
658
658
  if ((0, isNull_1.isNull)(v1) || (0, isNull_1.isNull)(v2)) {
659
659
  return false;
660
660
  }
661
661
  return (0, removeAccents_2.removeAccents)(v1).toLowerCase().indexOf((0, removeAccents_2.removeAccents)(v2).toLowerCase()) === 0;
662
- case "endswith":
663
- case "endsi":
664
- case "endi":
665
- case "iends":
666
- case "iend":
662
+ case 'endswith':
663
+ case 'endsi':
664
+ case 'endi':
665
+ case 'iends':
666
+ case 'iend':
667
667
  if ((0, isNull_1.isNull)(v1) || (0, isNull_1.isNull)(v2)) {
668
668
  return false;
669
669
  }
670
670
  return v1.lastIndexOf(v2) === v1.length - v2.length;
671
- case "like":
671
+ case 'like':
672
672
  if ((0, isNull_1.isNull)(v1) || (0, isNull_1.isNull)(v2)) {
673
673
  return false;
674
674
  }
675
675
  return (0, removeAccents_2.removeAccents)(v1).toLowerCase() === (0, removeAccents_2.removeAccents)(v2).toLowerCase();
676
- case "gt":
677
- case ">":
676
+ case 'gt':
677
+ case '>':
678
678
  return v1 > v2;
679
- case "gte":
680
- case ">=":
679
+ case 'gte':
680
+ case '>=':
681
681
  return v1 >= v2;
682
- case "lt":
683
- case "<":
682
+ case 'lt':
683
+ case '<':
684
684
  return v1 < v2;
685
- case "lte":
686
- case "<=":
685
+ case 'lte':
686
+ case '<=':
687
687
  return v1 <= v2;
688
- case "isnull":
688
+ case 'isnull':
689
689
  return v1 === null;
690
- case "isnotnull":
690
+ case 'isnotnull':
691
691
  return v1 !== null;
692
- case "isempty":
692
+ case 'isempty':
693
693
  return v1 === '';
694
- case "isnotempty":
694
+ case 'isnotempty':
695
695
  return v1 !== '';
696
696
  case '==':
697
697
  if ((0, isObject_1.isObject)(v1, v2)) {
@@ -709,7 +709,7 @@ var bbn = (() => {
709
709
  exports.compareConditions = void 0;
710
710
  const compareConditions = function (data, filter) {
711
711
  if (!filter.conditions || !filter.logic || !(0, isArray_2.isArray)(filter.conditions)) {
712
- throw new Error("Error in compareConditions: the filter should an abject with conditions and logic properties and conditions should be an array of objects");
712
+ throw new Error('Error in compareConditions: the filter should an abject with conditions and logic properties and conditions should be an array of objects');
713
713
  }
714
714
  let ok = filter.logic === 'AND' ? true : false;
715
715
  (0, each_3.each)(filter.conditions, (a) => {
@@ -723,10 +723,10 @@ var bbn = (() => {
723
723
  let bits = a.field.split('.');
724
724
  let prop = bits.pop();
725
725
  if (bits.length) {
726
- (0, each_3.each)(bits, b => data = data[b]);
726
+ (0, each_3.each)(bits, (b) => (data = data[b]));
727
727
  }
728
728
  // Case where both are undefined: value and prop which doesn't exist; they are not the same!
729
- if (((0, getProperty_2.getProperty)(data, prop) === undefined) && (a.value !== undefined)) {
729
+ if ((0, getProperty_2.getProperty)(data, prop) === undefined && a.value !== undefined) {
730
730
  compare = false;
731
731
  }
732
732
  }
@@ -750,26 +750,26 @@ var bbn = (() => {
750
750
  "use strict";
751
751
  Object.defineProperty(exports, "__esModule", { value: true });
752
752
  exports.filterToConditions = void 0;
753
- const filterToConditions = function (filter, operator) {
753
+ const filterToConditions = function (filter, operator = '=') {
754
754
  if (!(0, isObject_2.isObject)(filter)) {
755
- throw new Error("Error in filterToCondition: filter must be an object");
755
+ throw new Error('Error in filterToCondition: filter must be an object');
756
756
  }
757
757
  if (!filter.conditions || !(0, isArray_3.isArray)(filter.conditions)) {
758
758
  let tmp = [];
759
759
  (0, iterate_2.iterate)(filter, (a, n) => {
760
- if ((0, isObject_2.isObject)(a) && (typeof a.conditions === 'object')) {
760
+ if ((0, isObject_2.isObject)(a) && typeof a.conditions === 'object') {
761
761
  tmp.push(filterToConditions(a));
762
762
  }
763
763
  else {
764
764
  tmp.push({
765
765
  field: n,
766
- operator: operator || '=',
767
- value: a
766
+ operator: operator,
767
+ value: a,
768
768
  });
769
769
  }
770
770
  });
771
771
  filter = {
772
- conditions: tmp
772
+ conditions: tmp,
773
773
  };
774
774
  }
775
775
  if (!filter.logic) {
@@ -779,28 +779,32 @@ var bbn = (() => {
779
779
  };
780
780
  exports.filterToConditions = filterToConditions;
781
781
  });
782
- define("fn/search", ["require", "exports", "fn/isIterable", "fn/isString", "fn/compareConditions", "fn/filterToConditions", "fn/isObject", "fn/numProperties", "fn/isNumber"], function (require, exports, isIterable_2, isString_4, compareConditions_1, filterToConditions_1, isObject_3, numProperties_2, isNumber_2) {
782
+ define("fn/search", ["require", "exports", "fn/isIterable", "fn/compareConditions", "fn/filterToConditions", "fn/isObject", "fn/numProperties", "fn/isNumber"], function (require, exports, isIterable_2, compareConditions_1, filterToConditions_1, isObject_3, numProperties_2, isNumber_2) {
783
783
  "use strict";
784
784
  Object.defineProperty(exports, "__esModule", { value: true });
785
785
  exports.search = void 0;
786
- const search = function (arr, prop, val, operator, startFrom) {
786
+ const search = function (arr, prop, val = null, operator = '=', startFrom = 0) {
787
787
  if (!(0, isIterable_2.isIterable)(arr)) {
788
- throw new Error(bbn._("The first argument for a search should be iterable") + " " + (typeof arr) + " " + bbn._("given"));
788
+ throw new Error(bbn._('The first argument for a search should be iterable') + ' ' + typeof arr + ' ' + bbn._('given'));
789
789
  }
790
790
  if (!arr.length) {
791
791
  return -1;
792
792
  }
793
- let filter = {};
794
- let isFunction = false;
795
- if ((0, isString_4.isString)(prop)) {
796
- filter.conditions = [{
797
- field: prop,
798
- value: val,
799
- operator: operator || '='
800
- }];
793
+ let filter;
794
+ let isFn = false;
795
+ if (typeof prop === 'string') {
796
+ filter = {
797
+ conditions: [
798
+ {
799
+ field: prop,
800
+ value: val,
801
+ operator: operator || '=',
802
+ },
803
+ ]
804
+ };
801
805
  }
802
806
  else if (!prop) {
803
- isFunction = true;
807
+ isFn = true;
804
808
  filter = a => {
805
809
  return (0, compareConditions_1.compareConditions)({ value: a }, (0, filterToConditions_1.filterToConditions)({
806
810
  logic: 'AND',
@@ -808,32 +812,32 @@ var bbn = (() => {
808
812
  {
809
813
  field: 'value',
810
814
  operator: operator || '=',
811
- value: val
812
- }
813
- ]
815
+ value: val,
816
+ },
817
+ ],
814
818
  }));
815
819
  };
816
820
  }
817
821
  else {
818
- startFrom = operator;
822
+ startFrom = typeof (operator) === 'number' ? operator : 0;
819
823
  operator = val;
820
824
  if ((0, isObject_3.isObject)(prop)) {
821
825
  filter = prop;
822
826
  }
823
- else if (isFunction(prop)) {
824
- isFunction = true;
827
+ else if (typeof (prop) === 'function') {
828
+ isFn = true;
825
829
  filter = prop;
826
830
  }
827
831
  }
828
- if (isFunction || ((0, isObject_3.isObject)(filter) && (0, numProperties_2.numProperties)(filter))) {
832
+ if (isFn || ((0, isObject_3.isObject)(filter) && (0, numProperties_2.numProperties)(filter))) {
829
833
  if ((0, isNumber_2.isNumber)(operator)) {
830
- startFrom = operator;
834
+ startFrom = typeof (operator) === 'number' ? operator : 0;
831
835
  operator = undefined;
832
836
  }
833
837
  if (!(0, isNumber_2.isNumber)(startFrom)) {
834
838
  startFrom = 0;
835
839
  }
836
- if (isFunction) {
840
+ if (typeof filter === 'function') {
837
841
  for (let i = startFrom; i < arr.length; i++) {
838
842
  if (filter(arr[i])) {
839
843
  return i;
@@ -857,7 +861,7 @@ var bbn = (() => {
857
861
  "use strict";
858
862
  Object.defineProperty(exports, "__esModule", { value: true });
859
863
  exports.getRow = void 0;
860
- const getRow = function (arr, prop, val, operator) {
864
+ const getRow = function (arr, prop, val = null, operator = '=') {
861
865
  var idx = (0, search_1.search)(arr, prop, val, operator);
862
866
  if (idx > -1) {
863
867
  return arr[idx];
@@ -870,14 +874,14 @@ var bbn = (() => {
870
874
  "use strict";
871
875
  Object.defineProperty(exports, "__esModule", { value: true });
872
876
  exports._deleteLoader = void 0;
873
- const _deleteLoader = function (requestId, res, isAbort) {
877
+ const _deleteLoader = function (requestId, res = null, isAbort = false) {
874
878
  let idx = (0, search_2.search)(bbn.env.loaders, { key: requestId });
875
879
  if (idx > -1) {
876
880
  let loader = bbn.env.loaders.splice(idx, 1)[0];
877
881
  let history = (0, getRow_1.getRow)(bbn.env.loadersHistory, { key: requestId, start: loader.start });
878
882
  if (history) {
879
883
  history.loading = false;
880
- history.duration = (new Date()).getTime() - loader.start;
884
+ history.duration = new Date().getTime() - loader.start;
881
885
  if (typeof res === 'string') {
882
886
  history.errorMessage = res;
883
887
  history.error = !isAbort;
@@ -917,46 +921,48 @@ var bbn = (() => {
917
921
  loader.source.cancel('Operation canceled by the user.');
918
922
  }
919
923
  /*
920
- else {
921
- throw new Error("Impossible to find the loader " + requestId);
922
- }
923
- */
924
+ else {
925
+ throw new Error("Impossible to find the loader " + requestId);
926
+ }
927
+ */
924
928
  };
925
929
  exports.abort = abort;
926
930
  });
927
- define("fn/filter", ["require", "exports", "fn/isArray", "fn/isFunction", "fn/isObject", "fn/each", "fn/filterToConditions", "fn/compareConditions"], function (require, exports, isArray_4, isFunction_2, isObject_5, each_4, filterToConditions_2, compareConditions_2) {
931
+ define("fn/filter", ["require", "exports", "fn/isArray", "fn/isFunction", "fn/each", "fn/filterToConditions", "fn/compareConditions"], function (require, exports, isArray_4, isFunction_2, each_4, filterToConditions_2, compareConditions_2) {
928
932
  "use strict";
929
933
  Object.defineProperty(exports, "__esModule", { value: true });
930
934
  exports.filter = void 0;
931
- const filter = function (arr, prop, val, operator) {
935
+ const filter = function (arr, prop, val = null, operator = '=') {
932
936
  if (!(0, isArray_4.isArray)(arr)) {
933
- throw new Error("Error in filter: The first argument must be an array");
937
+ throw new Error('Error in filter: The first argument must be an array');
934
938
  }
935
- var filter = {}, res = [], isFn = (0, isFunction_2.isFunction)(prop), isObj = (0, isObject_5.isObject)(prop);
939
+ let cfg = {};
940
+ const res = [];
941
+ const isFn = (0, isFunction_2.isFunction)(prop);
936
942
  if (!prop || !arr.length) {
937
943
  return arr;
938
944
  }
939
945
  if (arr.length) {
940
- if (isObj || isFn) {
946
+ if (typeof (prop) === 'object') {
941
947
  operator = val;
942
- filter = prop;
948
+ cfg = prop;
943
949
  }
944
- else if (typeof (prop) === 'string') {
945
- filter[prop] = val;
950
+ else if (typeof prop === 'string') {
951
+ cfg[prop] = val;
946
952
  }
947
953
  else {
948
- throw new Error("Search function error: The prop argument should be a string or an object");
954
+ throw new Error('Search function error: The prop argument should be a string or an object');
949
955
  }
950
956
  if (isFn) {
951
957
  (0, each_4.each)(arr, (a, i) => {
952
- if (filter(a, i)) {
958
+ if (filter(a, prop)) {
953
959
  res.push(a);
954
960
  }
955
961
  });
956
962
  }
957
963
  else {
958
- filter = (0, filterToConditions_2.filterToConditions)(filter, operator);
959
- if (filter.conditions && filter.logic) {
964
+ cfg = (0, filterToConditions_2.filterToConditions)(cfg, operator);
965
+ if (cfg.conditions && cfg.logic) {
960
966
  (0, each_4.each)(arr, (a) => {
961
967
  if ((0, compareConditions_2.compareConditions)(a, filter)) {
962
968
  res.push(a);
@@ -974,12 +980,12 @@ var bbn = (() => {
974
980
  Object.defineProperty(exports, "__esModule", { value: true });
975
981
  exports.abortURL = void 0;
976
982
  const abortURL = function (url) {
977
- (0, each_5.each)((0, filter_1.filter)(bbn.env.loaders, { url: url }), a => {
983
+ (0, each_5.each)((0, filter_1.filter)(bbn.env.loaders, { url: url }), (a) => {
978
984
  if (a && a.source) {
979
985
  a.source.cancel('Operation canceled by the user.');
980
986
  }
981
987
  else {
982
- throw new Error("Impossible to find the loader with URL " + url);
988
+ throw new Error('Impossible to find the loader with URL ' + url);
983
989
  }
984
990
  });
985
991
  };
@@ -990,10 +996,9 @@ var bbn = (() => {
990
996
  Object.defineProperty(exports, "__esModule", { value: true });
991
997
  exports.addColors = void 0;
992
998
  const addColors = function (colors) {
993
- let st = '';
994
999
  if ((0, numProperties_3.numProperties)(colors)) {
995
- if (!bbn.var.colors) {
996
- bbn.var.colors = {};
1000
+ if (!bbn.vars.colors) {
1001
+ bbn.vars.colors = {};
997
1002
  }
998
1003
  let element = document.createElement('style');
999
1004
  document.head.appendChild(element);
@@ -1001,10 +1006,28 @@ var bbn = (() => {
1001
1006
  // Append style element to head
1002
1007
  let i = 0;
1003
1008
  (0, iterate_3.iterate)(colors, (v, n) => {
1004
- bbn.var.colors[n] = v;
1009
+ bbn.vars.colors[n] = v;
1005
1010
  sheet.insertRule('.bbn-' + n + ', .bbn-color-text-' + n + ' {color: ' + v + ' !important;}', i);
1006
- sheet.insertRule('svg.bbn-' + n + ', .bbn-' + n + ' svg, svg.bbn-color-text-' + n + ', .bbn-color-text-' + n + ' svg {fill: ' + v + ';}', i);
1007
- sheet.insertRule('.bbn-bg-' + n + ', .bbn-color-bg-' + n + ', .bbn-color-background-' + n + ' {background-color: ' + v + ' !important;}', i);
1011
+ sheet.insertRule('svg.bbn-' +
1012
+ n +
1013
+ ', .bbn-' +
1014
+ n +
1015
+ ' svg, svg.bbn-color-text-' +
1016
+ n +
1017
+ ', .bbn-color-text-' +
1018
+ n +
1019
+ ' svg {fill: ' +
1020
+ v +
1021
+ ';}', i);
1022
+ sheet.insertRule('.bbn-bg-' +
1023
+ n +
1024
+ ', .bbn-color-bg-' +
1025
+ n +
1026
+ ', .bbn-color-background-' +
1027
+ n +
1028
+ ' {background-color: ' +
1029
+ v +
1030
+ ' !important;}', i);
1008
1031
  sheet.insertRule('.bbn-border-' + n + ', .bbn-color-border-' + n + ' {border-color: ' + v + ' !important;}', i);
1009
1032
  sheet.insertRule('.bbn-color-' + n + ' {border-color: ' + v + '; background-color: ' + v + '; color: ' + v + ';}', i);
1010
1033
  });
@@ -1016,8 +1039,8 @@ var bbn = (() => {
1016
1039
  "use strict";
1017
1040
  Object.defineProperty(exports, "__esModule", { value: true });
1018
1041
  exports.addInputs = void 0;
1019
- const addInputs = function (form, params, prefix) {
1020
- if (form && (form.tagName === 'FORM')) {
1042
+ const addInputs = function (form, params = null, prefix = '') {
1043
+ if (form && form.tagName === 'FORM') {
1021
1044
  let appendToForm = (name, val) => {
1022
1045
  let input = document.createElement('input');
1023
1046
  input.setAttribute('type', 'hidden');
@@ -1031,7 +1054,7 @@ var bbn = (() => {
1031
1054
  (0, iterate_4.iterate)(params, (param, key) => {
1032
1055
  let name = prefix ? `${prefix}[${key}]` : key;
1033
1056
  if (param instanceof Date) {
1034
- appendToForm(form, name, param.toISOString());
1057
+ appendToForm(name, param.toISOString());
1035
1058
  }
1036
1059
  else if (param instanceof Array) {
1037
1060
  param.forEach((e, i) => {
@@ -1044,8 +1067,7 @@ var bbn = (() => {
1044
1067
  }
1045
1068
  });
1046
1069
  }
1047
- else if ((typeof param === 'object') &&
1048
- !(param instanceof File)) {
1070
+ else if (typeof param === 'object' && !(param instanceof File)) {
1049
1071
  addInputs(form, param, name);
1050
1072
  }
1051
1073
  else {
@@ -1057,12 +1079,12 @@ var bbn = (() => {
1057
1079
  };
1058
1080
  exports.addInputs = addInputs;
1059
1081
  });
1060
- define("fn/addStyle", ["require", "exports", "fn/isObject", "fn/iterate"], function (require, exports, isObject_6, iterate_5) {
1082
+ define("fn/addStyle", ["require", "exports", "fn/isObject", "fn/iterate"], function (require, exports, isObject_5, iterate_5) {
1061
1083
  "use strict";
1062
1084
  Object.defineProperty(exports, "__esModule", { value: true });
1063
1085
  exports.addStyle = void 0;
1064
1086
  const addStyle = function (ele, o) {
1065
- if ((0, isObject_6.isObject)(o)) {
1087
+ if ((0, isObject_5.isObject)(o)) {
1066
1088
  (0, iterate_5.iterate)(o, (v, k) => {
1067
1089
  ele.style[k] = v;
1068
1090
  });
@@ -1080,7 +1102,7 @@ var bbn = (() => {
1080
1102
  el.style[type] = 'auto';
1081
1103
  });
1082
1104
  (0, each_6.each)(eles, (el, i) => {
1083
- let rect = el.getBoundingClientRect(), s = rect[type] % 1 ? (rect[type] - (rect[type] % 1) + 1) : rect[type];
1105
+ let rect = el.getBoundingClientRect(), s = rect[type] % 1 ? rect[type] - (rect[type] % 1) + 1 : rect[type];
1084
1106
  //s = rect[type];
1085
1107
  if (s > max) {
1086
1108
  max = s;
@@ -1101,7 +1123,7 @@ var bbn = (() => {
1101
1123
  exports.adjustHeight = void 0;
1102
1124
  const adjustHeight = function () {
1103
1125
  let args = arguments;
1104
- if ((args.length === 1) && (0, isIterable_3.isIterable)(args[0])) {
1126
+ if (args.length === 1 && (0, isIterable_3.isIterable)(args[0])) {
1105
1127
  args = args[0];
1106
1128
  }
1107
1129
  return (0, adjustSize_1.adjustSize)('height', args);
@@ -1114,7 +1136,7 @@ var bbn = (() => {
1114
1136
  exports.adjustWidth = void 0;
1115
1137
  const adjustWidth = function () {
1116
1138
  let args = arguments;
1117
- if ((args.length === 1) && (0, isIterable_4.isIterable)(args[0])) {
1139
+ if (args.length === 1 && (0, isIterable_4.isIterable)(args[0])) {
1118
1140
  args = args[0];
1119
1141
  }
1120
1142
  return (0, adjustSize_2.adjustSize)('width', args);
@@ -1126,19 +1148,16 @@ var bbn = (() => {
1126
1148
  Object.defineProperty(exports, "__esModule", { value: true });
1127
1149
  exports.escapeRegExp = void 0;
1128
1150
  const escapeRegExp = function (str) {
1129
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
1151
+ return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
1130
1152
  };
1131
1153
  exports.escapeRegExp = escapeRegExp;
1132
1154
  });
1133
- define("fn/replaceAll", ["require", "exports", "fn/isObject", "fn/escapeRegExp"], function (require, exports, isObject_7, escapeRegExp_1) {
1155
+ define("fn/replaceAll", ["require", "exports", "fn/isObject", "fn/escapeRegExp"], function (require, exports, isObject_6, escapeRegExp_1) {
1134
1156
  "use strict";
1135
1157
  Object.defineProperty(exports, "__esModule", { value: true });
1136
1158
  exports.replaceAll = void 0;
1137
1159
  const replaceAll = function (find, replace, str, flags = '') {
1138
- if (str !== undefined) {
1139
- return str.toString().replace((0, isObject_7.isObject)(find) ? find : new RegExp((0, escapeRegExp_1.escapeRegExp)(find), 'g' + flags), replace);
1140
- }
1141
- return false;
1160
+ return str.toString().replace((0, isObject_6.isObject)(find) ? find : new RegExp((0, escapeRegExp_1.escapeRegExp)(find), 'g' + flags), replace);
1142
1161
  };
1143
1162
  exports.replaceAll = replaceAll;
1144
1163
  });
@@ -1147,16 +1166,36 @@ var bbn = (() => {
1147
1166
  Object.defineProperty(exports, "__esModule", { value: true });
1148
1167
  exports.md5 = void 0;
1149
1168
  const md5 = function (st) {
1150
- var hc = "0123456789abcdef";
1151
- function rh(n) { var j, s = ""; for (j = 0; j <= 3; j++)
1152
- s += hc.charAt((n >> (j * 8 + 4)) & 0x0F) + hc.charAt((n >> (j * 8)) & 0x0F); return s; }
1153
- function ad(x, y) { var l = (x & 0xFFFF) + (y & 0xFFFF); var m = (x >> 16) + (y >> 16) + (l >> 16); return (m << 16) | (l & 0xFFFF); }
1154
- function rl(n, c) { return (n << c) | (n >>> (32 - c)); }
1155
- function cm(q, a, b, x, s, t) { return ad(rl(ad(ad(a, q), ad(x, t)), s), b); }
1156
- function ff(a, b, c, d, x, s, t) { return cm((b & c) | ((~b) & d), a, b, x, s, t); }
1157
- function gg(a, b, c, d, x, s, t) { return cm((b & d) | (c & (~d)), a, b, x, s, t); }
1158
- function hh(a, b, c, d, x, s, t) { return cm(b ^ c ^ d, a, b, x, s, t); }
1159
- function ii(a, b, c, d, x, s, t) { return cm(c ^ (b | (~d)), a, b, x, s, t); }
1169
+ var hc = '0123456789abcdef';
1170
+ function rh(n) {
1171
+ var j, s = '';
1172
+ for (j = 0; j <= 3; j++)
1173
+ s += hc.charAt((n >> (j * 8 + 4)) & 0x0f) + hc.charAt((n >> (j * 8)) & 0x0f);
1174
+ return s;
1175
+ }
1176
+ function ad(x, y) {
1177
+ var l = (x & 0xffff) + (y & 0xffff);
1178
+ var m = (x >> 16) + (y >> 16) + (l >> 16);
1179
+ return (m << 16) | (l & 0xffff);
1180
+ }
1181
+ function rl(n, c) {
1182
+ return (n << c) | (n >>> (32 - c));
1183
+ }
1184
+ function cm(q, a, b, x, s, t) {
1185
+ return ad(rl(ad(ad(a, q), ad(x, t)), s), b);
1186
+ }
1187
+ function ff(a, b, c, d, x, s, t) {
1188
+ return cm((b & c) | (~b & d), a, b, x, s, t);
1189
+ }
1190
+ function gg(a, b, c, d, x, s, t) {
1191
+ return cm((b & d) | (c & ~d), a, b, x, s, t);
1192
+ }
1193
+ function hh(a, b, c, d, x, s, t) {
1194
+ return cm(b ^ c ^ d, a, b, x, s, t);
1195
+ }
1196
+ function ii(a, b, c, d, x, s, t) {
1197
+ return cm(c ^ (b | ~d), a, b, x, s, t);
1198
+ }
1160
1199
  function sb(x) {
1161
1200
  var i;
1162
1201
  var nblk = ((x.length + 8) >> 6) + 1;
@@ -1265,29 +1304,29 @@ var bbn = (() => {
1265
1304
  };
1266
1305
  exports.getRequestId = getRequestId;
1267
1306
  });
1268
- define("fn/extend", ["require", "exports", "fn/iterate", "fn/isArray", "fn/each", "fn/isObject"], function (require, exports, iterate_7, isArray_5, each_7, isObject_8) {
1307
+ define("fn/extend", ["require", "exports", "fn/iterate", "fn/isArray", "fn/each", "fn/isObject"], function (require, exports, iterate_7, isArray_5, each_7, isObject_7) {
1269
1308
  "use strict";
1270
1309
  Object.defineProperty(exports, "__esModule", { value: true });
1271
1310
  exports.extend = void 0;
1272
- const extend = function () {
1311
+ const extend = function (...originalArgs) {
1273
1312
  let deep = false;
1274
1313
  let args = [];
1275
- for (let i = 0; i < arguments.length; i++) {
1276
- if (arguments[i] === true) {
1314
+ for (let i = 0; i < originalArgs.length; i++) {
1315
+ if (originalArgs[i] === true) {
1277
1316
  deep = true;
1278
1317
  }
1279
- else if (!arguments[i]) {
1318
+ else if (!originalArgs[i]) {
1280
1319
  continue;
1281
1320
  }
1282
- else if (typeof arguments[i] !== 'object') {
1283
- throw new Error(bbn._("Error in extend: all arguments should be object, you have given ") + typeof (arguments[i]));
1321
+ else if (typeof originalArgs[i] !== 'object') {
1322
+ throw new Error(bbn._('Error in extend: all arguments should be object, you have given ') + typeof originalArgs[i]);
1284
1323
  }
1285
1324
  else {
1286
- args.push(arguments[i]);
1325
+ args.push(originalArgs[i]);
1287
1326
  }
1288
1327
  }
1289
1328
  if (!args.length) {
1290
- throw new Error("No argument given");
1329
+ throw new Error('No argument given');
1291
1330
  }
1292
1331
  let out = args[0];
1293
1332
  for (let i = 1; i < args.length; i++) {
@@ -1296,14 +1335,14 @@ var bbn = (() => {
1296
1335
  if ((0, isArray_5.isArray)(a)) {
1297
1336
  out[key] = (0, isArray_5.isArray)(out[key]) ? out[key] : [];
1298
1337
  (0, each_7.each)(a, (b, i) => {
1299
- if (b && (typeof b === 'object')) {
1338
+ if (b && typeof b === 'object') {
1300
1339
  let tmp = out[key][i];
1301
1340
  if ((0, isArray_5.isArray)(b)) {
1302
1341
  if (!(0, isArray_5.isArray)(tmp)) {
1303
1342
  tmp = [];
1304
1343
  }
1305
1344
  }
1306
- else if (!(0, isObject_8.isObject)(tmp)) {
1345
+ else if (!(0, isObject_7.isObject)(tmp)) {
1307
1346
  tmp = {};
1308
1347
  }
1309
1348
  out[key][i] = extend(true, tmp, b);
@@ -1313,8 +1352,8 @@ var bbn = (() => {
1313
1352
  }
1314
1353
  });
1315
1354
  }
1316
- else if ((0, isObject_8.isObject)(a)) {
1317
- out[key] = extend(true, out[key] && (typeof out[key] === 'object') ? out[key] : Object.create(Object.getPrototypeOf(a)), a);
1355
+ else if ((0, isObject_7.isObject)(a)) {
1356
+ out[key] = extend(true, out[key] && typeof out[key] === 'object' ? out[key] : Object.create(Object.getPrototypeOf(a)), a);
1318
1357
  }
1319
1358
  else {
1320
1359
  out[key] = a;
@@ -1329,7 +1368,7 @@ var bbn = (() => {
1329
1368
  value: true,
1330
1369
  enumerable: false,
1331
1370
  configurable: false,
1332
- writable: false
1371
+ writable: false,
1333
1372
  });
1334
1373
  }
1335
1374
  }
@@ -1337,81 +1376,48 @@ var bbn = (() => {
1337
1376
  };
1338
1377
  exports.extend = extend;
1339
1378
  });
1340
- define("fn/defaultEndLoadingFunction", ["require", "exports", "fn/numProperties", "fn/log", "fn/isCp"], function (require, exports, numProperties_4, log_5, isCp_3) {
1379
+ define("fn/defaultEndLoadingFunction", ["require", "exports"], function (require, exports) {
1341
1380
  "use strict";
1342
1381
  Object.defineProperty(exports, "__esModule", { value: true });
1343
1382
  exports.defaultEndLoadingFunction = void 0;
1344
1383
  const defaultEndLoadingFunction = function (url, timestamp, data, res) {
1345
- var _a;
1346
- if (res && res.data && ((0, numProperties_4.numProperties)(res.data) === 1) && res.data.disconnected) {
1347
- window.location.reload();
1348
- return;
1349
- }
1350
- if ((_a = window.appui) === null || _a === void 0 ? void 0 : _a.status) {
1351
- this.$nextTick(() => {
1352
- (0, log_5.log)("UPDATE LOADBAR");
1353
- const loadBar = this.getRef('loading');
1354
- if ((0, isCp_3.isCp)(loadBar)) {
1355
- loadBar.$updateAllComputed();
1356
- }
1357
- });
1358
- }
1384
+ return true;
1359
1385
  };
1360
1386
  exports.defaultEndLoadingFunction = defaultEndLoadingFunction;
1361
1387
  });
1362
- define("fn/defaultAjaxErrorFunction", ["require", "exports", "fn/isCp"], function (require, exports, isCp_4) {
1388
+ define("fn/defaultAjaxErrorFunction", ["require", "exports"], function (require, exports) {
1363
1389
  "use strict";
1364
1390
  Object.defineProperty(exports, "__esModule", { value: true });
1365
1391
  exports.defaultAjaxErrorFunction = void 0;
1366
1392
  const defaultAjaxErrorFunction = function (jqXHR, textStatus, errorThrown) {
1367
- var _a;
1368
- /** @todo */
1369
- if ((_a = window.appui) === null || _a === void 0 ? void 0 : _a.status) {
1370
- this.$nextTick(() => {
1371
- const loadBar = this.getRef('loading');
1372
- if ((0, isCp_4.isCp)(loadBar)) {
1373
- loadBar.$forceUpdate();
1374
- }
1375
- });
1376
- }
1377
- appui.error({ title: textStatus, content: errorThrown }, 4);
1378
1393
  return false;
1379
1394
  };
1380
1395
  exports.defaultAjaxErrorFunction = defaultAjaxErrorFunction;
1381
1396
  });
1382
- define("fn/defaultAjaxAbortFunction", ["require", "exports", "fn/log"], function (require, exports, log_6) {
1397
+ define("fn/defaultAjaxAbortFunction", ["require", "exports", "fn/log"], function (require, exports, log_5) {
1383
1398
  "use strict";
1384
1399
  Object.defineProperty(exports, "__esModule", { value: true });
1385
1400
  exports.defaultAjaxAbortFunction = void 0;
1386
- const defaultAjaxAbortFunction = function (message, url) {
1387
- (0, log_6.log)(message);
1401
+ const defaultAjaxAbortFunction = function (message, url = '') {
1402
+ (0, log_5.log)(message);
1388
1403
  };
1389
1404
  exports.defaultAjaxAbortFunction = defaultAjaxAbortFunction;
1390
1405
  });
1391
- define("fn/defaultStartLoadingFunction", ["require", "exports", "fn/log", "fn/isCp"], function (require, exports, log_7, isCp_5) {
1406
+ define("fn/defaultStartLoadingFunction", ["require", "exports"], function (require, exports) {
1392
1407
  "use strict";
1393
1408
  Object.defineProperty(exports, "__esModule", { value: true });
1394
1409
  exports.defaultStartLoadingFunction = void 0;
1395
- const defaultStartLoadingFunction = function () {
1396
- var _a;
1397
- if ((_a = window.appui) === null || _a === void 0 ? void 0 : _a.status) {
1398
- this.$nextTick(() => {
1399
- (0, log_7.log)("UPDATE LOADBAR");
1400
- const loadBar = this.getRef('loading');
1401
- if ((0, isCp_5.isCp)(loadBar)) {
1402
- loadBar.$updateAllComputed();
1403
- }
1404
- });
1405
- }
1410
+ const defaultStartLoadingFunction = function (url, tst, data, requestId = null) {
1411
+ return true;
1406
1412
  };
1407
1413
  exports.defaultStartLoadingFunction = defaultStartLoadingFunction;
1408
1414
  });
1409
- define("fn/ajax", ["require", "exports", "fn/isObject", "fn/replaceAll", "fn/getRequestId", "fn/getLoader", "fn/extend", "fn/numProperties", "fn/_deleteLoader", "fn/defaultEndLoadingFunction", "fn/isFunction", "fn/defaultAjaxErrorFunction", "fn/defaultAjaxAbortFunction", "fn/_addLoader", "fn/defaultStartLoadingFunction"], function (require, exports, isObject_9, replaceAll_1, getRequestId_1, getLoader_2, extend_1, numProperties_5, _deleteLoader_1, defaultEndLoadingFunction_1, isFunction_3, defaultAjaxErrorFunction_1, defaultAjaxAbortFunction_1, _addLoader_1, defaultStartLoadingFunction_1) {
1415
+ define("fn/ajax", ["require", "exports", "fn/isObject", "fn/replaceAll", "fn/getRequestId", "fn/getLoader", "fn/extend", "fn/numProperties", "fn/_deleteLoader", "fn/defaultEndLoadingFunction", "fn/isFunction", "fn/defaultAjaxErrorFunction", "fn/defaultAjaxAbortFunction", "fn/_addLoader", "fn/defaultStartLoadingFunction"], function (require, exports, isObject_8, replaceAll_1, getRequestId_1, getLoader_2, extend_1, numProperties_4, _deleteLoader_1, defaultEndLoadingFunction_1, isFunction_3, defaultAjaxErrorFunction_1, defaultAjaxAbortFunction_1, _addLoader_1, defaultStartLoadingFunction_1) {
1410
1416
  "use strict";
1411
1417
  Object.defineProperty(exports, "__esModule", { value: true });
1412
1418
  exports.ajax = void 0;
1413
1419
  const ajax = function (url, datatype, data, success, failure, abort) {
1414
- if ((arguments.length === 1) && (0, isObject_9.isObject)(url) && url.url) {
1420
+ if (arguments.length === 1 && url && typeof url === 'object' && url.url) {
1415
1421
  if (url.abort) {
1416
1422
  abort = url.abort;
1417
1423
  }
@@ -1432,10 +1438,10 @@ var bbn = (() => {
1432
1438
  if (!url) {
1433
1439
  return;
1434
1440
  }
1435
- if (url) {
1441
+ if (url && typeof url === 'string') {
1436
1442
  if (url.indexOf('://') === -1) {
1437
1443
  // Prevent protocol mismatch by Axios
1438
- url = (0, replaceAll_1.replaceAll)("//", "/", url);
1444
+ url = (0, replaceAll_1.replaceAll)('//', '/', url);
1439
1445
  }
1440
1446
  if (!datatype) {
1441
1447
  datatype = 'json';
@@ -1453,20 +1459,21 @@ var bbn = (() => {
1453
1459
  let source = cancelToken.source();
1454
1460
  let options = {
1455
1461
  responseType: datatype,
1456
- cancelToken: source.token
1462
+ cancelToken: source.token,
1457
1463
  };
1458
1464
  if (datatype === 'text') {
1459
1465
  options.headers = {
1460
1466
  accept: 'text/javascript',
1461
- 'Content-Type': 'text/javascript'
1467
+ 'Content-Type': 'text/javascript',
1462
1468
  };
1463
1469
  }
1464
1470
  let args = [url];
1465
- if ((0, isObject_9.isObject)(data) && ((0, numProperties_5.numProperties)(data) > 0)) {
1471
+ if ((0, isObject_8.isObject)(data) && (0, numProperties_4.numProperties)(data) > 0) {
1466
1472
  args.push(data);
1467
1473
  }
1468
1474
  args.push(options);
1469
- let loader = axios[args.length === 2 ? 'get' : 'post'].apply(axios, args)
1475
+ let loader = axios[args.length === 2 ? 'get' : 'post']
1476
+ .apply(axios, args)
1470
1477
  .then((res) => {
1471
1478
  (0, _deleteLoader_1._deleteLoader)(requestId, res);
1472
1479
  (0, defaultEndLoadingFunction_1.defaultEndLoadingFunction)(url, tst, data, res);
@@ -1533,7 +1540,7 @@ var bbn = (() => {
1533
1540
  let isEscaped = false;
1534
1541
  let settingDefault = false;
1535
1542
  for (let i = 0; i < all.length; i++) {
1536
- if ((all[i] === currentQuote) && !isEscaped && currentQuote) {
1543
+ if (all[i] === currentQuote && !isEscaped && currentQuote) {
1537
1544
  currentQuote = '';
1538
1545
  exp += all[i];
1539
1546
  }
@@ -1575,7 +1582,7 @@ var bbn = (() => {
1575
1582
  }
1576
1583
  else if (all[i] === '=') {
1577
1584
  if (functionString.substr(i, 2) === '=>') {
1578
- if (exp.trim() !== "" && parOpened === parClosed) {
1585
+ if (exp.trim() !== '' && parOpened === parClosed) {
1579
1586
  currentArg.name = exp.trim();
1580
1587
  args.push(currentArg);
1581
1588
  currentArg = {};
@@ -1638,10 +1645,10 @@ var bbn = (() => {
1638
1645
  body = exp;
1639
1646
  }
1640
1647
  else {
1641
- throw Error("Unexpected end of function while parsing function");
1648
+ throw Error('Unexpected end of function while parsing function');
1642
1649
  }
1643
1650
  }
1644
- const argString = args.map(arg => arg.name + (arg.default ? ' = ' + arg.default : '')).join(', ');
1651
+ const argString = args.map((arg) => arg.name + (arg.default ? ' = ' + arg.default : '')).join(', ');
1645
1652
  const hash = (0, md5_2.md5)(body + (name ? '-' + name : '') + (argString ? '-' + argString : ''));
1646
1653
  return {
1647
1654
  body,
@@ -1651,7 +1658,7 @@ var bbn = (() => {
1651
1658
  hasFunction,
1652
1659
  name,
1653
1660
  isAsync,
1654
- hash
1661
+ hash,
1655
1662
  };
1656
1663
  };
1657
1664
  exports.analyzeFunction = analyzeFunction;
@@ -1663,19 +1670,20 @@ var bbn = (() => {
1663
1670
  const animateCss = function (ele, animationName, callback) {
1664
1671
  let animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
1665
1672
  /*$(ele).addClass('animated ' + animationName).one(animationEnd, function(){
1666
- if ( typeof callback == 'function' ){ // make sure the callback is a function
1667
- callback.call(this); // brings the scope to the callback
1668
- }
1669
- $(this).removeClass('animated ' + animationName);
1670
- })*/
1673
+ if ( typeof callback == 'function' ){ // make sure the callback is a function
1674
+ callback.call(this); // brings the scope to the callback
1675
+ }
1676
+ $(this).removeClass('animated ' + animationName);
1677
+ })*/
1671
1678
  ele.classList.add('animated');
1672
1679
  ele.classList.add(animationName);
1673
1680
  ele.addEventListener(animationEnd, (e) => {
1674
1681
  e.target.removeEventListener(e.type, arguments.callee);
1675
- if (typeof callback == 'function') { // make sure the callback is a function
1682
+ if (typeof callback == 'function') {
1683
+ // make sure the callback is a function
1676
1684
  callback.call(this); // brings the scope to the callback
1677
1685
  }
1678
- this.classList.remove(animation);
1686
+ this.classList.remove(animationName);
1679
1687
  });
1680
1688
  };
1681
1689
  exports.animateCss = animateCss;
@@ -1719,13 +1727,13 @@ var bbn = (() => {
1719
1727
  };
1720
1728
  exports.autoExtend = autoExtend;
1721
1729
  });
1722
- define("fn/baseName", ["require", "exports", "fn/isString", "fn/substr"], function (require, exports, isString_5, substr_3) {
1730
+ define("fn/baseName", ["require", "exports", "fn/isString", "fn/substr"], function (require, exports, isString_4, substr_3) {
1723
1731
  "use strict";
1724
1732
  Object.defineProperty(exports, "__esModule", { value: true });
1725
1733
  exports.baseName = void 0;
1726
1734
  const baseName = function (path, suffix) {
1727
- if (path && (0, isString_5.isString)(path)) {
1728
- let bits = path.split("/");
1735
+ if (path && (0, isString_4.isString)(path)) {
1736
+ let bits = path.split('/');
1729
1737
  let res = bits.pop();
1730
1738
  if (!suffix) {
1731
1739
  return res;
@@ -1744,7 +1752,7 @@ var bbn = (() => {
1744
1752
  Object.defineProperty(exports, "__esModule", { value: true });
1745
1753
  exports.br2nl = void 0;
1746
1754
  const br2nl = function (st) {
1747
- return (0, replaceAll_2.replaceAll)("<br />", "\n", (0, replaceAll_2.replaceAll)("<br/>", "\n", (0, replaceAll_2.replaceAll)("<br>", "\n", st)));
1755
+ return (0, replaceAll_2.replaceAll)('<br />', '\n', (0, replaceAll_2.replaceAll)('<br/>', '\n', (0, replaceAll_2.replaceAll)('<br>', '\n', st)));
1748
1756
  };
1749
1757
  exports.br2nl = br2nl;
1750
1758
  });
@@ -1753,22 +1761,22 @@ var bbn = (() => {
1753
1761
  Object.defineProperty(exports, "__esModule", { value: true });
1754
1762
  exports.date = void 0;
1755
1763
  const date = function (v) {
1756
- let d = false, t = typeof (v);
1764
+ let d = false, t = typeof v;
1757
1765
  if (v === undefined) {
1758
1766
  return new Date();
1759
1767
  }
1760
- if ((t === 'number') || ((0, isNumber_3.isNumber)(v) && (v !== ''))) {
1768
+ if (t === 'number' || ((0, isNumber_3.isNumber)(v) && v !== '')) {
1761
1769
  if (v < 10000000000) {
1762
1770
  v = v * 1000;
1763
1771
  }
1764
- return (new Date(v));
1772
+ return new Date(v);
1765
1773
  }
1766
1774
  if (t === 'string') {
1767
1775
  if (v.length === 10) {
1768
- return (new Date(parseInt((0, substr_4.substr)(v, 0, 4)), parseInt((0, substr_4.substr)(v, 5, 2)) - 1, parseInt((0, substr_4.substr)(v, 8, 2)), 12));
1776
+ return new Date(parseInt((0, substr_4.substr)(v, 0, 4)), parseInt((0, substr_4.substr)(v, 5, 2)) - 1, parseInt((0, substr_4.substr)(v, 8, 2)), 12);
1769
1777
  }
1770
1778
  else if (v.length === 19) {
1771
- return (new Date(parseInt((0, substr_4.substr)(v, 0, 4)), parseInt((0, substr_4.substr)(v, 5, 2)) - 1, parseInt((0, substr_4.substr)(v, 8, 2)), parseInt((0, substr_4.substr)(v, 11, 2)), parseInt((0, substr_4.substr)(v, 14, 2)), parseInt((0, substr_4.substr)(v, 17, 2))));
1779
+ return new Date(parseInt((0, substr_4.substr)(v, 0, 4)), parseInt((0, substr_4.substr)(v, 5, 2)) - 1, parseInt((0, substr_4.substr)(v, 8, 2)), parseInt((0, substr_4.substr)(v, 11, 2)), parseInt((0, substr_4.substr)(v, 14, 2)), parseInt((0, substr_4.substr)(v, 17, 2)));
1772
1780
  }
1773
1781
  }
1774
1782
  else if ((0, isDate_2.isDate)(v)) {
@@ -1778,14 +1786,14 @@ var bbn = (() => {
1778
1786
  };
1779
1787
  exports.date = date;
1780
1788
  });
1781
- define("fn/fdatetime", ["require", "exports", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, date_1, isDate_3, isString_6) {
1789
+ define("fn/fdatetime", ["require", "exports", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, date_1, isDate_3, isString_5) {
1782
1790
  "use strict";
1783
1791
  Object.defineProperty(exports, "__esModule", { value: true });
1784
1792
  exports.fdatetime = void 0;
1785
1793
  const fdatetime = function (d, wrong_result) {
1786
1794
  let r = (0, date_1.date)(d);
1787
1795
  if (!(0, isDate_3.isDate)(r)) {
1788
- return wrong_result && (0, isString_6.isString)(wrong_result) ? wrong_result : '';
1796
+ return wrong_result && (0, isString_5.isString)(wrong_result) ? wrong_result : '';
1789
1797
  }
1790
1798
  if (undefined !== dayjs) {
1791
1799
  //return dayjs(r).format('lll');
@@ -1795,7 +1803,7 @@ var bbn = (() => {
1795
1803
  nextWeek: 'ddd D HH:mm',
1796
1804
  lastDay: '[' + bbn._('Yesterday') + '] HH:mm',
1797
1805
  lastWeek: 'ddd D HH:mm',
1798
- sameElse: 'DD/MM/YYYY HH:mm'
1806
+ sameElse: 'DD/MM/YYYY HH:mm',
1799
1807
  });
1800
1808
  //return dayjs(r).format("DD/MM/YYYY HH:mm")
1801
1809
  }
@@ -1803,7 +1811,7 @@ var bbn = (() => {
1803
1811
  };
1804
1812
  exports.fdatetime = fdatetime;
1805
1813
  });
1806
- define("fn/fdate", ["require", "exports", "fn/fdatetime", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, fdatetime_1, date_2, isDate_4, isString_7) {
1814
+ define("fn/fdate", ["require", "exports", "fn/fdatetime", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, fdatetime_1, date_2, isDate_4, isString_6) {
1807
1815
  "use strict";
1808
1816
  Object.defineProperty(exports, "__esModule", { value: true });
1809
1817
  exports.fdate = void 0;
@@ -1814,7 +1822,7 @@ var bbn = (() => {
1814
1822
  }
1815
1823
  let r = (0, date_2.date)(d);
1816
1824
  if (!(0, isDate_4.isDate)(r)) {
1817
- return wrong_result && (0, isString_7.isString)(wrong_result) ? wrong_result : '';
1825
+ return wrong_result && (0, isString_6.isString)(wrong_result) ? wrong_result : '';
1818
1826
  }
1819
1827
  if (undefined !== dayjs) {
1820
1828
  return dayjs(r).format('L');
@@ -1823,7 +1831,7 @@ var bbn = (() => {
1823
1831
  };
1824
1832
  exports.fdate = fdate;
1825
1833
  });
1826
- define("fn/calendar", ["require", "exports", "fn/fdate", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, fdate_1, date_3, isDate_5, isString_8) {
1834
+ define("fn/calendar", ["require", "exports", "fn/fdate", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, fdate_1, date_3, isDate_5, isString_7) {
1827
1835
  "use strict";
1828
1836
  Object.defineProperty(exports, "__esModule", { value: true });
1829
1837
  exports.calendar = void 0;
@@ -1833,7 +1841,7 @@ var bbn = (() => {
1833
1841
  }
1834
1842
  let r = (0, date_3.date)(d);
1835
1843
  if (!(0, isDate_5.isDate)(r)) {
1836
- return wrong_result && (0, isString_8.isString)(wrong_result) ? wrong_result : '';
1844
+ return wrong_result && (0, isString_7.isString)(wrong_result) ? wrong_result : '';
1837
1845
  }
1838
1846
  return dayjs(r).calendar(null, {
1839
1847
  sameDay: '[' + bbn._('Today') + ']',
@@ -1841,12 +1849,12 @@ var bbn = (() => {
1841
1849
  nextWeek: 'ddd D',
1842
1850
  lastDay: '[' + bbn._('Yesterday') + ']',
1843
1851
  lastWeek: 'ddd D',
1844
- sameElse: 'L'
1852
+ sameElse: 'L',
1845
1853
  });
1846
1854
  };
1847
1855
  exports.calendar = calendar;
1848
1856
  });
1849
- define("fn/error", ["require", "exports", "fn/log"], function (require, exports, log_8) {
1857
+ define("fn/error", ["require", "exports", "fn/log"], function (require, exports, log_6) {
1850
1858
  "use strict";
1851
1859
  Object.defineProperty(exports, "__esModule", { value: true });
1852
1860
  exports.error = void 0;
@@ -1857,11 +1865,11 @@ var bbn = (() => {
1857
1865
  args.push(arguments[i]);
1858
1866
  }
1859
1867
  args.unshift({
1860
- _bbn_console_mode: "error",
1868
+ _bbn_console_mode: 'error',
1861
1869
  _bbn_console_level: 1,
1862
- _bbn_console_style: "color: #E64141; background: #F7E195; font-size: 14px"
1870
+ _bbn_console_style: 'color: #E64141; background: #F7E195; font-size: 14px',
1863
1871
  });
1864
- log_8.log.apply(this, args);
1872
+ log_6.log.apply(this, args);
1865
1873
  }
1866
1874
  throw new Error(errorMsg);
1867
1875
  };
@@ -1880,7 +1888,7 @@ var bbn = (() => {
1880
1888
  "use strict";
1881
1889
  Object.defineProperty(exports, "__esModule", { value: true });
1882
1890
  exports.defaultPostLinkFunction = void 0;
1883
- const defaultPostLinkFunction = function (r) {
1891
+ const defaultPostLinkFunction = function (r, ele) {
1884
1892
  return true;
1885
1893
  };
1886
1894
  exports.defaultPostLinkFunction = defaultPostLinkFunction;
@@ -1889,18 +1897,17 @@ var bbn = (() => {
1889
1897
  "use strict";
1890
1898
  Object.defineProperty(exports, "__esModule", { value: true });
1891
1899
  exports.defaultAlertFunction = void 0;
1892
- const defaultAlertFunction = function (ele) {
1900
+ const defaultAlertFunction = function (msg, title) {
1893
1901
  /** @todo */
1894
- let c = appui.getCurrentContainer();
1895
- c.alert.apply(c, arguments);
1902
+ alert(msg);
1896
1903
  };
1897
1904
  exports.defaultAlertFunction = defaultAlertFunction;
1898
1905
  });
1899
- define("fn/callback", ["require", "exports", "fn/error", "fn/defaultLinkFunction", "fn/isFunction", "fn/log", "fn/defaultPostLinkFunction", "fn/defaultAlertFunction"], function (require, exports, error_1, defaultLinkFunction_1, isFunction_4, log_9, defaultPostLinkFunction_1, defaultAlertFunction_1) {
1906
+ define("fn/callback", ["require", "exports", "fn/error", "fn/defaultLinkFunction", "fn/isFunction", "fn/log", "fn/defaultPostLinkFunction", "fn/defaultAlertFunction"], function (require, exports, error_1, defaultLinkFunction_1, isFunction_4, log_7, defaultPostLinkFunction_1, defaultAlertFunction_1) {
1900
1907
  "use strict";
1901
1908
  Object.defineProperty(exports, "__esModule", { value: true });
1902
1909
  exports.callback = void 0;
1903
- const callback = function (url, res, fn, fn2, ele) {
1910
+ const callback = function (url, res = null, fn = null, fn2 = null, ele = null) {
1904
1911
  let tmp = false;
1905
1912
  if (res) {
1906
1913
  tmp = true;
@@ -1927,16 +1934,16 @@ var bbn = (() => {
1927
1934
  tmp = (0, defaultLinkFunction_1.defaultLinkFunction)(res, ele);
1928
1935
  }
1929
1936
  if (ele && isObj && (res.content !== undefined)) {
1930
- if (ele.is("input,textarea")) {
1931
- ele.val(res.content);
1937
+ if ('value' in ele) {
1938
+ ele.value = res.content;
1932
1939
  }
1933
1940
  else {
1934
1941
  ele.innerHTML = res.content;
1935
1942
  }
1936
1943
  }
1937
1944
  if (tmp && isObj && res.script) {
1938
- if ((0, isFunction_4.isFunction)(res.script)) {
1939
- tmp = res.script(res.data ? res.data : {}, ele ? ele : false);
1945
+ if (typeof (res.script) === 'function') {
1946
+ tmp = res.script(res.data ? res.data : {}, ele || null);
1940
1947
  }
1941
1948
  else {
1942
1949
  tmp = ((data, ele) => {
@@ -1948,7 +1955,7 @@ var bbn = (() => {
1948
1955
  }
1949
1956
  }
1950
1957
  catch (e) {
1951
- (0, log_9.log)(e, res);
1958
+ (0, log_7.log)(e, res);
1952
1959
  (0, error_1.error)((0, isFunction_4.isFunction)(e.getMessage) ? e.getMessage() : null);
1953
1960
  }
1954
1961
  return r;
@@ -1996,9 +2003,11 @@ var bbn = (() => {
1996
2003
  Object.defineProperty(exports, "__esModule", { value: true });
1997
2004
  exports.camelToCss = void 0;
1998
2005
  const camelToCss = function (str) {
1999
- return str.replace(/([A-Z])/g, function (st) {
2006
+ return str
2007
+ .replace(/([A-Z])/g, function (st) {
2000
2008
  return '-' + st.toLowerCase();
2001
- }).replace('/^./', function (st) {
2009
+ })
2010
+ .replace('/^./', function (st) {
2002
2011
  return st.toLowerCase();
2003
2012
  });
2004
2013
  };
@@ -2010,12 +2019,12 @@ var bbn = (() => {
2010
2019
  exports.canvasToImage = void 0;
2011
2020
  const canvasToImage = function (canvas) {
2012
2021
  let img = new Image();
2013
- img.src = canvas.toDataURL("image/png");
2022
+ img.src = canvas.toDataURL('image/png');
2014
2023
  return img;
2015
2024
  };
2016
2025
  exports.canvasToImage = canvasToImage;
2017
2026
  });
2018
- define("fn/center", ["require", "exports", "fn/log"], function (require, exports, log_10) {
2027
+ define("fn/center", ["require", "exports"], function (require, exports) {
2019
2028
  "use strict";
2020
2029
  Object.defineProperty(exports, "__esModule", { value: true });
2021
2030
  exports.center = void 0;
@@ -2034,55 +2043,54 @@ var bbn = (() => {
2034
2043
  w = parent.clientWidth;
2035
2044
  h = parent.clientHeight;
2036
2045
  }
2037
- (0, log_10.log)("BBN_CENTER", w, h);
2038
2046
  //ele.css("position","absolute");
2039
- ele.style.position = "absolute";
2047
+ ele.style.position = 'absolute';
2040
2048
  //ele.css("top", Math.max(0, ((h - ele.outerHeight()) / 2) + parent.scrollTop()) + "px");
2041
- ele.style.top = Math.max(0, ((h - ele.offsetHeight) / 2) + parent.scrollTop) + "px";
2049
+ ele.style.top = Math.max(0, (h - ele.offsetHeight) / 2 + parent.scrollTop) + 'px';
2042
2050
  //ele.css("left", Math.max(0, ((w - ele.outerWidth()) / 2) + parent.scrollLeft()) + "px");
2043
- ele.style.left = Math.max(0, ((h - ele.offsetWidth) / 2) + parent.scrollLeft) + "px";
2051
+ ele.style.left = Math.max(0, (h - ele.offsetWidth) / 2 + parent.scrollLeft) + 'px';
2044
2052
  return ele;
2045
2053
  };
2046
2054
  exports.center = center;
2047
2055
  });
2048
- define("fn/checkPropsDetails", ["require", "exports", "fn/isString", "fn/isArray", "fn/isObject", "fn/each", "fn/substr"], function (require, exports, isString_9, isArray_6, isObject_10, each_9, substr_5) {
2056
+ define("fn/checkPropsDetails", ["require", "exports", "fn/isArray", "fn/isObject", "fn/each", "fn/substr"], function (require, exports, isArray_6, isObject_9, each_9, substr_5) {
2049
2057
  "use strict";
2050
2058
  Object.defineProperty(exports, "__esModule", { value: true });
2051
2059
  exports.checkPropsDetails = void 0;
2052
- const checkPropsDetails = function (obj, props, checkEmpty) {
2060
+ const checkPropsDetails = function (obj, props, checkEmpty = false) {
2053
2061
  let res = {
2054
2062
  error: false,
2055
- result: true
2063
+ result: true,
2056
2064
  };
2057
- if ((0, isString_9.isString)(props)) {
2065
+ if (typeof (props) === 'string') {
2058
2066
  props = [props];
2059
2067
  }
2060
2068
  if (!(0, isArray_6.isArray)(props)) {
2061
- res.error = bbn._("checkProps must receive a string or an array as props argument");
2069
+ res.error = bbn._('checkProps must receive a string or an array as props argument');
2062
2070
  }
2063
- if (!(0, isObject_10.isObject)(obj)) {
2064
- res.error = bbn._("checkProps must receive an object as obj argument");
2071
+ if (!(0, isObject_9.isObject)(obj)) {
2072
+ res.error = bbn._('checkProps must receive an object as obj argument');
2065
2073
  }
2066
2074
  if (!res.error) {
2067
2075
  let check;
2068
- (0, each_9.each)(props, varName => {
2076
+ (0, each_9.each)(props, (varName) => {
2069
2077
  varName = varName.trim().split(':');
2070
2078
  let type = varName[1] || false;
2071
2079
  varName = varName[0];
2072
2080
  if (obj[varName] === undefined) {
2073
- res.error = varName + ' ' + bbn._("is not defined");
2081
+ res.error = varName + ' ' + bbn._('is not defined');
2074
2082
  }
2075
2083
  else if (type) {
2076
2084
  check = 'is' + (0, substr_5.substr)(type, 0, 1).toUpperCase() + (0, substr_5.substr)(type, 1).toLowerCase();
2077
2085
  if (bbn.fn[check] === undefined) {
2078
- res.error = type + ' ' + bbn._("is not a valid type");
2086
+ res.error = type + ' ' + bbn._('is not a valid type');
2079
2087
  }
2080
2088
  else if (!bbn.fn[check](obj[varName])) {
2081
- res.error = varName + ' ' + bbn._("is not a") + ' ' + type;
2089
+ res.error = varName + ' ' + bbn._('is not a') + ' ' + type;
2082
2090
  }
2083
2091
  }
2084
2092
  else if (checkEmpty && !obj[varName]) {
2085
- res.error = varName + ' ' + bbn._("is empty");
2093
+ res.error = varName + ' ' + bbn._('is empty');
2086
2094
  }
2087
2095
  if (res.error) {
2088
2096
  return false;
@@ -2100,7 +2108,7 @@ var bbn = (() => {
2100
2108
  "use strict";
2101
2109
  Object.defineProperty(exports, "__esModule", { value: true });
2102
2110
  exports.checkProps = void 0;
2103
- const checkProps = function (obj, props, checkEmpty) {
2111
+ const checkProps = function (obj, props, checkEmpty = false) {
2104
2112
  return (0, checkPropsDetails_1.checkPropsDetails)(obj, props, checkEmpty).result;
2105
2113
  };
2106
2114
  exports.checkProps = checkProps;
@@ -2109,7 +2117,7 @@ var bbn = (() => {
2109
2117
  "use strict";
2110
2118
  Object.defineProperty(exports, "__esModule", { value: true });
2111
2119
  exports.checkPropsOrDie = void 0;
2112
- const checkPropsOrDie = function (obj, props, checkEmpty) {
2120
+ const checkPropsOrDie = function (obj, props, checkEmpty = false) {
2113
2121
  let res = (0, checkPropsDetails_2.checkPropsDetails)(obj, props, checkEmpty);
2114
2122
  if (res.error) {
2115
2123
  throw new Error(res.error);
@@ -2123,11 +2131,11 @@ var bbn = (() => {
2123
2131
  Object.defineProperty(exports, "__esModule", { value: true });
2124
2132
  exports.correctCase = void 0;
2125
2133
  const correctCase = function (str) {
2126
- return str.replace(/[A-z]{1}/, c => c.toUpperCase());
2134
+ return str.replace(/[A-z]{1}/, (c) => c.toUpperCase());
2127
2135
  };
2128
2136
  exports.correctCase = correctCase;
2129
2137
  });
2130
- define("fn/checkType", ["require", "exports", "fn/isArray", "fn/each", "fn/isFunction", "fn/isString", "fn/correctCase", "fn/error", "fn/log"], function (require, exports, isArray_7, each_10, isFunction_5, isString_10, correctCase_1, error_2, log_11) {
2138
+ define("fn/checkType", ["require", "exports", "fn/isArray", "fn/each", "fn/isFunction", "fn/isString", "fn/correctCase", "fn/error", "fn/log"], function (require, exports, isArray_7, each_10, isFunction_5, isString_8, correctCase_1, error_2, log_8) {
2131
2139
  "use strict";
2132
2140
  Object.defineProperty(exports, "__esModule", { value: true });
2133
2141
  exports.checkType = void 0;
@@ -2137,7 +2145,7 @@ var bbn = (() => {
2137
2145
  type = [type];
2138
2146
  }
2139
2147
  const typesList = [];
2140
- (0, each_10.each)(type, t => {
2148
+ (0, each_10.each)(type, (t) => {
2141
2149
  var _a;
2142
2150
  if (t === String) {
2143
2151
  t = 'string';
@@ -2164,7 +2172,7 @@ var bbn = (() => {
2164
2172
  return false;
2165
2173
  }
2166
2174
  }
2167
- else if (!(0, isString_10.isString)(t) || !(0, isFunction_5.isFunction)(bbn.fn['is' + (0, correctCase_1.correctCase)(t)])) {
2175
+ else if (!(0, isString_8.isString)(t) || !(0, isFunction_5.isFunction)(bbn.fn['is' + (0, correctCase_1.correctCase)(t)])) {
2168
2176
  (0, error_2.error)(`The type ${t} is not recognized`);
2169
2177
  }
2170
2178
  else if (bbn.fn['is' + (0, correctCase_1.correctCase)(t)](value)) {
@@ -2176,26 +2184,26 @@ var bbn = (() => {
2176
2184
  }
2177
2185
  });
2178
2186
  if (!ok) {
2179
- (0, log_11.log)(["Value given", value, "type", typeof value, "expected", typesList.join(' or ')]);
2187
+ (0, log_8.log)(['Value given', value, 'type', typeof value, 'expected', typesList.join(' or ')]);
2180
2188
  if (logs.length) {
2181
- (0, log_11.log)(logs);
2189
+ (0, log_8.log)(logs);
2182
2190
  }
2183
- throw new Error((msg ? msg + ' - ' : '') + bbn._("The value should be a %s", typesList.join(' ' + bbn._("or a") + ' ')));
2191
+ throw new Error((msg ? msg + ' - ' : '') + bbn._('The value should be a %s', typesList.join(' ' + bbn._('or a') + ' ')));
2184
2192
  }
2185
2193
  };
2186
2194
  exports.checkType = checkType;
2187
2195
  });
2188
- define("fn/clone", ["require", "exports", "fn/isArray", "fn/isObject", "fn/extend"], function (require, exports, isArray_8, isObject_11, extend_3) {
2196
+ define("fn/clone", ["require", "exports", "fn/isArray", "fn/isObject", "fn/extend"], function (require, exports, isArray_8, isObject_10, extend_3) {
2189
2197
  "use strict";
2190
2198
  Object.defineProperty(exports, "__esModule", { value: true });
2191
2199
  exports.clone = void 0;
2192
2200
  const clone = function (obj) {
2193
2201
  if ((0, isArray_8.isArray)(obj)) {
2194
2202
  return obj.slice().map((a) => {
2195
- return typeof (a) === 'object' ? clone(a) : a;
2203
+ return typeof a === 'object' ? clone(a) : a;
2196
2204
  });
2197
2205
  }
2198
- if ((0, isObject_11.isObject)(obj)) {
2206
+ if ((0, isObject_10.isObject)(obj)) {
2199
2207
  const o = Object.create(Object.getPrototypeOf(obj));
2200
2208
  return (0, extend_3.extend)(true, o, obj);
2201
2209
  }
@@ -2208,48 +2216,48 @@ var bbn = (() => {
2208
2216
  Object.defineProperty(exports, "__esModule", { value: true });
2209
2217
  exports.colorToHex = void 0;
2210
2218
  const colorToHex = function (color) {
2211
- let canvas = document.createElement("canvas").getContext("2d");
2219
+ let canvas = document.createElement('canvas').getContext('2d');
2212
2220
  canvas.fillStyle = color;
2213
2221
  return canvas.fillStyle;
2214
2222
  };
2215
2223
  exports.colorToHex = colorToHex;
2216
2224
  });
2217
- define("fn/copy", ["require", "exports", "fn/isObject", "fn/isFunction"], function (require, exports, isObject_12, isFunction_6) {
2225
+ define("fn/copy", ["require", "exports", "fn/isObject", "fn/isFunction"], function (require, exports, isObject_11, isFunction_6) {
2218
2226
  "use strict";
2219
2227
  Object.defineProperty(exports, "__esModule", { value: true });
2220
2228
  exports.copy = void 0;
2221
2229
  const copy = function (st) {
2222
- return new Promise(resolve => {
2230
+ return new Promise((resolve) => {
2223
2231
  if (st) {
2224
2232
  if (navigator && navigator.clipboard) {
2225
2233
  if (st instanceof Blob) {
2226
2234
  navigator.clipboard.write([new ClipboardItem({ [st.type.toString()]: st })]).then(() => {
2227
- resolve();
2235
+ resolve(true);
2228
2236
  });
2229
2237
  }
2230
- else if ((0, isObject_12.isObject)(st) && (0, isFunction_6.isFunction)(st.toBlob)) {
2231
- st.toBlob(blob => {
2238
+ else if ((0, isObject_11.isObject)(st) && (0, isFunction_6.isFunction)(st.toBlob)) {
2239
+ st.toBlob((blob) => {
2232
2240
  navigator.clipboard.write([new ClipboardItem({ [blob.type.toString()]: blob })]).then(() => {
2233
- resolve();
2241
+ resolve(true);
2234
2242
  });
2235
2243
  });
2236
2244
  }
2237
2245
  else {
2238
2246
  navigator.clipboard.writeText(st);
2239
- resolve();
2247
+ resolve(true);
2240
2248
  }
2241
2249
  return;
2242
2250
  }
2243
- let input = document.createElement("textarea");
2244
- input.style.opacity = 0;
2251
+ let input = document.createElement('textarea');
2252
+ input.style.opacity = '0';
2245
2253
  input.value = st;
2246
2254
  document.body.appendChild(input);
2247
2255
  input.select();
2248
2256
  document.execCommand('copy');
2249
2257
  document.body.removeChild(input);
2250
- resolve();
2258
+ resolve(true);
2251
2259
  }
2252
- resolve();
2260
+ resolve(false);
2253
2261
  });
2254
2262
  };
2255
2263
  exports.copy = copy;
@@ -2258,8 +2266,8 @@ var bbn = (() => {
2258
2266
  "use strict";
2259
2267
  Object.defineProperty(exports, "__esModule", { value: true });
2260
2268
  exports.count = void 0;
2261
- const count = function (arr, prop, val, operator) {
2262
- return (0, filter_2.filter)(arr, prop, val, operator, false).length || 0;
2269
+ const count = function (arr, prop, val = null, operator = '=') {
2270
+ return (0, filter_2.filter)(arr, prop, val, operator).length || 0;
2263
2271
  };
2264
2272
  exports.count = count;
2265
2273
  });
@@ -2268,13 +2276,21 @@ var bbn = (() => {
2268
2276
  Object.defineProperty(exports, "__esModule", { value: true });
2269
2277
  exports.crc32 = void 0;
2270
2278
  // this is a test
2279
+ const crc32Table = [];
2280
+ for (let i = 0; i < 256; i++) {
2281
+ let c = i;
2282
+ for (let j = 0; j < 8; j++) {
2283
+ c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
2284
+ }
2285
+ crc32Table.push(c);
2286
+ }
2271
2287
  const crc32 = function (str) {
2272
- let crc = 0 ^ (-1);
2288
+ let crc = 0 ^ -1;
2273
2289
  for (let i = 0; i < str.length; i++) {
2274
2290
  const charCode = str.charCodeAt(i);
2275
- crc = (crc >>> 8) ^ crc32Table[(crc ^ charCode) & 0xFF];
2291
+ crc = (crc >>> 8) ^ crc32Table[(crc ^ charCode) & 0xff];
2276
2292
  }
2277
- return (crc ^ (-1)) >>> 0; // Make sure the result is a 32-bit positive integer
2293
+ return (crc ^ -1) >>> 0; // Make sure the result is a 32-bit positive integer
2278
2294
  };
2279
2295
  exports.crc32 = crc32;
2280
2296
  });
@@ -2282,10 +2298,10 @@ var bbn = (() => {
2282
2298
  "use strict";
2283
2299
  Object.defineProperty(exports, "__esModule", { value: true });
2284
2300
  exports.createObject = void 0;
2285
- const createObject = function () {
2301
+ const createObject = function (...args) {
2286
2302
  const obj = Object.create(null);
2287
- if (arguments.length) {
2288
- (0, extend_4.extend)(obj, ...arguments);
2303
+ if (args.length) {
2304
+ (0, extend_4.extend)(obj, ...args);
2289
2305
  }
2290
2306
  return obj;
2291
2307
  };
@@ -2296,8 +2312,10 @@ var bbn = (() => {
2296
2312
  Object.defineProperty(exports, "__esModule", { value: true });
2297
2313
  exports.cssExists = void 0;
2298
2314
  const cssExists = function (f) {
2299
- var ok, rules, css = document.styleSheets;
2300
- for (var sx = 0; sx < css.length; sx++) {
2315
+ let ok;
2316
+ let rules;
2317
+ let css = document.styleSheets;
2318
+ for (let sx = 0; sx < css.length; sx++) {
2301
2319
  ok = 1;
2302
2320
  try {
2303
2321
  rules = css[sx].rules || css[sx].cssRules;
@@ -2310,9 +2328,9 @@ var bbn = (() => {
2310
2328
  }
2311
2329
  if (ok) {
2312
2330
  //log(rules);
2313
- for (var cx = 0; cx < rules.length; cx++) {
2331
+ for (let cx = 0; cx < rules.length; cx++) {
2314
2332
  //log(rules[cx].selectorText);
2315
- if (new RegExp("(^|\\s)" + (0, escapeRegExp_2.escapeRegExp)(f) + "(\\{|\\s)", "g").test(rules[cx].selectorText)) {
2333
+ if (new RegExp('(^|\\s)' + (0, escapeRegExp_2.escapeRegExp)(f) + '(\\{|\\s)', 'g').test(rules[cx].selectorText)) {
2316
2334
  return true;
2317
2335
  }
2318
2336
  }
@@ -2322,24 +2340,24 @@ var bbn = (() => {
2322
2340
  };
2323
2341
  exports.cssExists = cssExists;
2324
2342
  });
2325
- define("fn/dateSQL", ["require", "exports"], function (require, exports) {
2343
+ define("fn/dateSQL", ["require", "exports", "fn/date"], function (require, exports, date_4) {
2326
2344
  "use strict";
2327
2345
  Object.defineProperty(exports, "__esModule", { value: true });
2328
2346
  exports.dateSQL = void 0;
2329
2347
  const dateSQL = function (v, dayOnly) {
2330
- let date = date(v);
2331
- if (date) {
2332
- return dayjs(date).format("YYYY-MM-DD" + (dayOnly ? '' : ' HH:mm:ss'));
2348
+ let value = (0, date_4.date)(v);
2349
+ if (value) {
2350
+ return dayjs(value).format('YYYY-MM-DD' + (dayOnly ? '' : ' HH:mm:ss'));
2333
2351
  }
2334
2352
  };
2335
2353
  exports.dateSQL = dateSQL;
2336
2354
  });
2337
- define("fn/daysInMonth", ["require", "exports", "fn/date"], function (require, exports, date_4) {
2355
+ define("fn/daysInMonth", ["require", "exports", "fn/date"], function (require, exports, date_5) {
2338
2356
  "use strict";
2339
2357
  Object.defineProperty(exports, "__esModule", { value: true });
2340
2358
  exports.daysInMonth = void 0;
2341
2359
  const daysInMonth = function (v) {
2342
- let d = (0, date_4.date)(v);
2360
+ let d = (0, date_5.date)(v);
2343
2361
  if (d) {
2344
2362
  return dayjs(d).daysInMonth();
2345
2363
  }
@@ -2390,12 +2408,12 @@ var bbn = (() => {
2390
2408
  };
2391
2409
  exports.defaultConfirmFunction = defaultConfirmFunction;
2392
2410
  });
2393
- define("fn/defaultErrorFunction", ["require", "exports", "fn/log"], function (require, exports, log_12) {
2411
+ define("fn/defaultErrorFunction", ["require", "exports", "fn/log"], function (require, exports, log_9) {
2394
2412
  "use strict";
2395
2413
  Object.defineProperty(exports, "__esModule", { value: true });
2396
2414
  exports.defaultErrorFunction = void 0;
2397
2415
  const defaultErrorFunction = function (message) {
2398
- (0, log_12.log)(message);
2416
+ (0, log_9.log)(message);
2399
2417
  };
2400
2418
  exports.defaultErrorFunction = defaultErrorFunction;
2401
2419
  });
@@ -2408,19 +2426,12 @@ var bbn = (() => {
2408
2426
  };
2409
2427
  exports.defaultHistoryFunction = defaultHistoryFunction;
2410
2428
  });
2411
- define("fn/defaultPreLinkFunction", ["require", "exports", "fn/isFunction"], function (require, exports, isFunction_8) {
2429
+ define("fn/defaultPreLinkFunction", ["require", "exports"], function (require, exports) {
2412
2430
  "use strict";
2413
2431
  Object.defineProperty(exports, "__esModule", { value: true });
2414
2432
  exports.defaultPreLinkFunction = void 0;
2415
- const defaultPreLinkFunction = function (url) {
2416
- let router = appui.getRef('router');
2417
- if (router) {
2418
- if ((0, isFunction_8.isFunction)(router.route) && !router.disabled) {
2419
- router.route(url);
2420
- }
2421
- return false;
2422
- }
2423
- return true;
2433
+ const defaultPreLinkFunction = function (url, force, ele) {
2434
+ return url;
2424
2435
  };
2425
2436
  exports.defaultPreLinkFunction = defaultPreLinkFunction;
2426
2437
  });
@@ -2433,13 +2444,13 @@ var bbn = (() => {
2433
2444
  };
2434
2445
  exports.defaultResizeFunction = defaultResizeFunction;
2435
2446
  });
2436
- define("fn/deleteProp", ["require", "exports"], function (require, exports) {
2447
+ define("fn/deleteProp", ["require", "exports", "fn/checkType"], function (require, exports, checkType_1) {
2437
2448
  "use strict";
2438
2449
  Object.defineProperty(exports, "__esModule", { value: true });
2439
2450
  exports.deleteProp = void 0;
2440
2451
  const deleteProp = function (obj, prop) {
2441
- checkType(obj, "object", bbn._("The obj must be an object in setProp"));
2442
- checkType(prop, "string", bbn._("The prop must be a string in setProp"));
2452
+ (0, checkType_1.checkType)(obj, 'object', bbn._('The obj must be an object in setProp'));
2453
+ (0, checkType_1.checkType)(prop, 'string', bbn._('The prop must be a string in setProp'));
2443
2454
  delete obj[prop];
2444
2455
  };
2445
2456
  exports.deleteProp = deleteProp;
@@ -2452,7 +2463,7 @@ var bbn = (() => {
2452
2463
  if (!args.length)
2453
2464
  return false;
2454
2465
  for (let a of args) {
2455
- if ((typeof a === 'object') && !(0, isNull_2.isNull)(a)) {
2466
+ if (typeof a === 'object' && !(0, isNull_2.isNull)(a)) {
2456
2467
  return false;
2457
2468
  }
2458
2469
  }
@@ -2460,11 +2471,12 @@ var bbn = (() => {
2460
2471
  };
2461
2472
  exports.isValue = isValue;
2462
2473
  });
2463
- define("fn/diffObj", ["require", "exports", "fn/isDate", "fn/createObject", "fn/isFunction", "fn/isValue", "fn/isDom", "fn/numProperties"], function (require, exports, isDate_6, createObject_1, isFunction_9, isValue_1, isDom_4, numProperties_6) {
2474
+ define("fn/diffObj", ["require", "exports", "fn/isDate", "fn/createObject", "fn/isFunction", "fn/isValue", "fn/isDom", "fn/numProperties"], function (require, exports, isDate_6, createObject_1, isFunction_8, isValue_1, isDom_4, numProperties_5) {
2464
2475
  "use strict";
2465
2476
  Object.defineProperty(exports, "__esModule", { value: true });
2466
2477
  exports.diffObj = void 0;
2467
- const diffObj = function (obj1, obj2, unchanged, notRoot) {
2478
+ let diffObjProcessed = [];
2479
+ const diffObj = function (obj1, obj2, unchanged = false, notRoot = false) {
2468
2480
  if (!notRoot) {
2469
2481
  diffObjProcessed = [];
2470
2482
  }
@@ -2472,15 +2484,13 @@ var bbn = (() => {
2472
2484
  if (value1 === value2) {
2473
2485
  return VALUE_UNCHANGED;
2474
2486
  }
2475
- if ((0, isDate_6.isDate)(value1) &&
2476
- (0, isDate_6.isDate)(value2) &&
2477
- (value1.getTime() === value2.getTime())) {
2487
+ if ((0, isDate_6.isDate)(value1) && (0, isDate_6.isDate)(value2) && value1.getTime() === value2.getTime()) {
2478
2488
  return VALUE_UNCHANGED;
2479
2489
  }
2480
- if ('undefined' == typeof (value1)) {
2490
+ if ('undefined' == typeof value1) {
2481
2491
  return VALUE_CREATED;
2482
2492
  }
2483
- if ('undefined' == typeof (value2)) {
2493
+ if ('undefined' == typeof value2) {
2484
2494
  return VALUE_DELETED;
2485
2495
  }
2486
2496
  return VALUE_UPDATED;
@@ -2489,27 +2499,27 @@ var bbn = (() => {
2489
2499
  notRoot = false;
2490
2500
  }
2491
2501
  let diff = (0, createObject_1.createObject)();
2492
- if (!(0, isFunction_9.isFunction)(obj1) && !(0, isFunction_9.isFunction)(obj2)) {
2502
+ if (!(0, isFunction_8.isFunction)(obj1) && !(0, isFunction_8.isFunction)(obj2)) {
2493
2503
  if ((0, isValue_1.isValue)(obj1) || (0, isValue_1.isValue)(obj2)) {
2494
2504
  let res = _compareValues(obj1, obj2);
2495
- if (unchanged || (res !== VALUE_UNCHANGED)) {
2505
+ if (unchanged || res !== VALUE_UNCHANGED) {
2496
2506
  let ret = (0, createObject_1.createObject)();
2497
2507
  Object.defineProperty(ret, 'type', {
2498
2508
  value: res,
2499
- enumerable: false
2509
+ enumerable: false,
2500
2510
  });
2501
2511
  Object.defineProperty(ret, 'data', {
2502
- value: (obj1 === undefined) ? obj2 : obj1,
2503
- enumerable: false
2512
+ value: obj1 === undefined ? obj2 : obj1,
2513
+ enumerable: false,
2504
2514
  });
2505
2515
  Object.defineProperty(ret, '_bbnDiffObjProof', {
2506
2516
  value: true,
2507
- enumerable: false
2517
+ enumerable: false,
2508
2518
  });
2509
2519
  if (obj1 !== undefined) {
2510
2520
  Object.defineProperty(ret, 'newData', {
2511
2521
  value: obj2,
2512
- enumerable: false
2522
+ enumerable: false,
2513
2523
  });
2514
2524
  }
2515
2525
  return ret;
@@ -2525,11 +2535,11 @@ var bbn = (() => {
2525
2535
  }
2526
2536
  diffObjProcessed.push(obj1, obj2);
2527
2537
  for (let key in obj1) {
2528
- if ((0, isFunction_9.isFunction)(obj1[key])) {
2538
+ if ((0, isFunction_8.isFunction)(obj1[key])) {
2529
2539
  continue;
2530
2540
  }
2531
2541
  let value2 = undefined;
2532
- if ('undefined' != typeof (obj2[key])) {
2542
+ if ('undefined' != typeof obj2[key]) {
2533
2543
  value2 = obj2[key];
2534
2544
  }
2535
2545
  let res = diffObj(obj1[key], value2, unchanged, true);
@@ -2538,7 +2548,7 @@ var bbn = (() => {
2538
2548
  }
2539
2549
  }
2540
2550
  for (let key in obj2) {
2541
- if ((0, isFunction_9.isFunction)(obj2[key]) || ('undefined' != typeof (obj1[key]))) {
2551
+ if ((0, isFunction_8.isFunction)(obj2[key]) || 'undefined' != typeof obj1[key]) {
2542
2552
  continue;
2543
2553
  }
2544
2554
  let res = diffObj(undefined, obj2[key], unchanged, true);
@@ -2547,16 +2557,16 @@ var bbn = (() => {
2547
2557
  }
2548
2558
  }
2549
2559
  }
2550
- return !notRoot || unchanged || (0, numProperties_6.numProperties)(diff) ? diff : false;
2560
+ return !notRoot || unchanged || (0, numProperties_5.numProperties)(diff) ? diff : false;
2551
2561
  };
2552
2562
  exports.diffObj = diffObj;
2553
2563
  });
2554
- define("fn/dirName", ["require", "exports", "fn/isString", "fn/substr"], function (require, exports, isString_11, substr_6) {
2564
+ define("fn/dirName", ["require", "exports", "fn/isString", "fn/substr"], function (require, exports, isString_9, substr_6) {
2555
2565
  "use strict";
2556
2566
  Object.defineProperty(exports, "__esModule", { value: true });
2557
2567
  exports.dirName = void 0;
2558
2568
  const dirName = function (path) {
2559
- if ((0, isString_11.isString)(path) && path) {
2569
+ if ((0, isString_9.isString)(path) && path) {
2560
2570
  while ((0, substr_6.substr)(path, path.length - 1) === '/') {
2561
2571
  path = (0, substr_6.substr)(path, 0, path.length - 1);
2562
2572
  }
@@ -2588,14 +2598,14 @@ var bbn = (() => {
2588
2598
  };
2589
2599
  exports.isBlob = isBlob;
2590
2600
  });
2591
- define("fn/fileExt", ["require", "exports", "fn/isString"], function (require, exports, isString_12) {
2601
+ define("fn/fileExt", ["require", "exports", "fn/isString"], function (require, exports, isString_10) {
2592
2602
  "use strict";
2593
2603
  Object.defineProperty(exports, "__esModule", { value: true });
2594
2604
  exports.fileExt = void 0;
2595
2605
  const fileExt = function (filename) {
2596
- if (filename && (0, isString_12.isString)(filename)) {
2606
+ if (filename && (0, isString_10.isString)(filename)) {
2597
2607
  let bits = filename.split('.');
2598
- if (bits[0] && (bits.length > 1)) {
2608
+ if (bits[0] && bits.length > 1) {
2599
2609
  return bits[bits.length - 1].toLowerCase();
2600
2610
  }
2601
2611
  }
@@ -2619,7 +2629,7 @@ var bbn = (() => {
2619
2629
  };
2620
2630
  exports.isCanvas = isCanvas;
2621
2631
  });
2622
- define("fn/downloadContent", ["require", "exports", "fn/isCanvas", "fn/isObject", "fn/isString", "fn/log"], function (require, exports, isCanvas_1, isObject_13, isString_13, log_13) {
2632
+ define("fn/downloadContent", ["require", "exports", "fn/isCanvas", "fn/isObject", "fn/isString", "fn/log"], function (require, exports, isCanvas_1, isObject_12, isString_11, log_10) {
2623
2633
  "use strict";
2624
2634
  Object.defineProperty(exports, "__esModule", { value: true });
2625
2635
  exports.downloadContent = void 0;
@@ -2638,7 +2648,7 @@ var bbn = (() => {
2638
2648
  return;
2639
2649
  }
2640
2650
  if (!type) {
2641
- type = (0, isObject_13.isObject)(content) && content.type ? content.type : 'octet/stream';
2651
+ type = (0, isObject_12.isObject)(content) && content.type ? content.type : 'octet/stream';
2642
2652
  }
2643
2653
  else if (type.indexOf('/') === -1) {
2644
2654
  type = 'text/' + type;
@@ -2646,7 +2656,7 @@ var bbn = (() => {
2646
2656
  let a = window.document.createElement('a');
2647
2657
  a.className = 'bbn-no';
2648
2658
  let src = null;
2649
- if ((0, isString_13.isString)(content)) {
2659
+ if ((0, isString_11.isString)(content)) {
2650
2660
  src = new Blob([content], { type: type });
2651
2661
  }
2652
2662
  else {
@@ -2654,7 +2664,7 @@ var bbn = (() => {
2654
2664
  src = content;
2655
2665
  }
2656
2666
  catch (e) {
2657
- (0, log_13.log)(e);
2667
+ (0, log_10.log)(e);
2658
2668
  }
2659
2669
  }
2660
2670
  a.href = window.URL.createObjectURL(src);
@@ -2668,20 +2678,20 @@ var bbn = (() => {
2668
2678
  };
2669
2679
  exports.downloadContent = downloadContent;
2670
2680
  });
2671
- define("fn/download", ["require", "exports", "fn/isObject", "fn/ajax", "fn/substr", "fn/baseName", "fn/isBlob", "fn/fileExt", "fn/downloadContent", "fn/defaultAjaxErrorFunction"], function (require, exports, isObject_14, ajax_1, substr_7, baseName_1, isBlob_1, fileExt_1, downloadContent_1, defaultAjaxErrorFunction_2) {
2681
+ define("fn/download", ["require", "exports", "fn/ajax", "fn/substr", "fn/baseName", "fn/isBlob", "fn/fileExt", "fn/downloadContent", "fn/defaultAjaxErrorFunction"], function (require, exports, ajax_1, substr_7, baseName_1, isBlob_1, fileExt_1, downloadContent_1, defaultAjaxErrorFunction_2) {
2672
2682
  "use strict";
2673
2683
  Object.defineProperty(exports, "__esModule", { value: true });
2674
2684
  exports.download = void 0;
2675
2685
  const download = function (url, filename, params) {
2676
2686
  // We can intervert the arguments
2677
- if ((0, isObject_14.isObject)(filename)) {
2687
+ if (filename && (typeof (filename) === 'object')) {
2678
2688
  params = filename;
2679
2689
  filename = null;
2680
2690
  }
2681
2691
  return (0, ajax_1.ajax)(url, 'blob', params || { _bbn_download: 1 }, (d, headers) => {
2682
2692
  if (!filename) {
2683
2693
  let cd = 'attachment; filename=';
2684
- if (headers && headers['content-disposition'] && (headers['content-disposition'].indexOf(cd) === 0)) {
2694
+ if (headers && headers['content-disposition'] && headers['content-disposition'].indexOf(cd) === 0) {
2685
2695
  filename = (0, substr_7.substr)(headers['content-disposition'], cd.length + 1, headers['content-disposition'].length - cd.length - 2);
2686
2696
  }
2687
2697
  else {
@@ -2691,12 +2701,11 @@ var bbn = (() => {
2691
2701
  if ((0, isBlob_1.isBlob)(d)) {
2692
2702
  let extension = (0, fileExt_1.fileExt)(filename);
2693
2703
  let htmlExtensions = ['php', 'html'];
2694
- if ((d.type !== 'text/html') || htmlExtensions.includes(extension)) {
2704
+ if ((typeof filename === 'string') && ((('type' in d) && (d.type !== 'text/html')) || htmlExtensions.includes(extension))) {
2695
2705
  (0, downloadContent_1.downloadContent)(filename, d);
2696
2706
  return;
2697
2707
  }
2698
2708
  }
2699
- (0, defaultAjaxErrorFunction_2.defaultAjaxErrorFunction)(e);
2700
2709
  }, e => {
2701
2710
  (0, defaultAjaxErrorFunction_2.defaultAjaxErrorFunction)(e);
2702
2711
  });
@@ -2712,43 +2721,43 @@ var bbn = (() => {
2712
2721
  };
2713
2722
  exports.eraseCookie = eraseCookie;
2714
2723
  });
2715
- define("fn/escapeDquotes", ["require", "exports", "fn/isString"], function (require, exports, isString_14) {
2724
+ define("fn/escapeDquotes", ["require", "exports", "fn/isString"], function (require, exports, isString_12) {
2716
2725
  "use strict";
2717
2726
  Object.defineProperty(exports, "__esModule", { value: true });
2718
2727
  exports.escapeDquotes = void 0;
2719
2728
  const escapeDquotes = function (str) {
2720
- if (!(0, isString_14.isString)(str)) {
2729
+ if (!(0, isString_12.isString)(str)) {
2721
2730
  return str;
2722
2731
  }
2723
2732
  return str.replace(/"/g, '\\"');
2724
2733
  };
2725
2734
  exports.escapeDquotes = escapeDquotes;
2726
2735
  });
2727
- define("fn/escapeSquotes", ["require", "exports", "fn/isString"], function (require, exports, isString_15) {
2736
+ define("fn/escapeSquotes", ["require", "exports", "fn/isString"], function (require, exports, isString_13) {
2728
2737
  "use strict";
2729
2738
  Object.defineProperty(exports, "__esModule", { value: true });
2730
2739
  exports.escapeSquotes = void 0;
2731
2740
  const escapeSquotes = function (str) {
2732
- if (!(0, isString_15.isString)(str)) {
2741
+ if (!(0, isString_13.isString)(str)) {
2733
2742
  return str;
2734
2743
  }
2735
2744
  return str.replace(/'/g, "\\'");
2736
2745
  };
2737
2746
  exports.escapeSquotes = escapeSquotes;
2738
2747
  });
2739
- define("fn/escapeTicks", ["require", "exports", "fn/isString"], function (require, exports, isString_16) {
2748
+ define("fn/escapeTicks", ["require", "exports", "fn/isString"], function (require, exports, isString_14) {
2740
2749
  "use strict";
2741
2750
  Object.defineProperty(exports, "__esModule", { value: true });
2742
2751
  exports.escapeTicks = void 0;
2743
2752
  const escapeTicks = function (str) {
2744
- if (!(0, isString_16.isString)(str)) {
2753
+ if (!(0, isString_14.isString)(str)) {
2745
2754
  return str;
2746
2755
  }
2747
- return str.replace(/`/g, "\\`");
2756
+ return str.replace(/`/g, '\\`');
2748
2757
  };
2749
2758
  exports.escapeTicks = escapeTicks;
2750
2759
  });
2751
- define("fn/escapeUrl", ["require", "exports", "fn/each", "fn/dirName", "fn/baseName", "fn/isString"], function (require, exports, each_12, dirName_1, baseName_2, isString_17) {
2760
+ define("fn/escapeUrl", ["require", "exports", "fn/each", "fn/dirName", "fn/baseName", "fn/isString"], function (require, exports, each_12, dirName_1, baseName_2, isString_15) {
2752
2761
  "use strict";
2753
2762
  Object.defineProperty(exports, "__esModule", { value: true });
2754
2763
  exports.escapeUrl = void 0;
@@ -2764,7 +2773,7 @@ var bbn = (() => {
2764
2773
  st += '://';
2765
2774
  url = url.substring(3);
2766
2775
  }
2767
- (0, each_12.each)((0, dirName_1.dirName)(url).split('/'), a => {
2776
+ (0, each_12.each)((0, dirName_1.dirName)(url).split('/'), (a) => {
2768
2777
  st += encodeURIComponent(a) + '/';
2769
2778
  });
2770
2779
  let base = (0, baseName_2.baseName)(url);
@@ -2776,7 +2785,7 @@ var bbn = (() => {
2776
2785
  existingParams = '?' + tmp[1];
2777
2786
  base = tmp[0];
2778
2787
  }
2779
- if (params && (0, isString_17.isString)(params)) {
2788
+ if (params && (0, isString_15.isString)(params)) {
2780
2789
  if (params.match('^(\\&|\\?)')) {
2781
2790
  params = params.substring(1);
2782
2791
  }
@@ -2789,22 +2798,22 @@ var bbn = (() => {
2789
2798
  };
2790
2799
  exports.escapeUrl = escapeUrl;
2791
2800
  });
2792
- define("fn/extendOut", ["require", "exports", "fn/isObject"], function (require, exports, isObject_15) {
2801
+ define("fn/extendOut", ["require", "exports", "fn/isObject"], function (require, exports, isObject_13) {
2793
2802
  "use strict";
2794
2803
  Object.defineProperty(exports, "__esModule", { value: true });
2795
2804
  exports.extendOut = void 0;
2796
- const extendOut = function () {
2805
+ const extendOut = function (...args) {
2797
2806
  let r = null;
2798
- for (let a of arguments) {
2799
- if (!(0, isObject_15.isObject)(a)) {
2800
- throw new Error("Each argument for extendOut must be an object, " + typeof (arguments[i]) + " given");
2807
+ for (let a of args) {
2808
+ if (!(0, isObject_13.isObject)(a)) {
2809
+ throw new Error('Each argument for extendOut must be an object, ' + typeof a + ' given');
2801
2810
  }
2802
2811
  if (r === null) {
2803
2812
  r = a;
2804
2813
  }
2805
2814
  else {
2806
2815
  for (let n in a) {
2807
- if ((0, isObject_15.isObject)(r[n], a[n])) {
2816
+ if ((0, isObject_13.isObject)(r[n], a[n])) {
2808
2817
  extendOut(r[n], a[n]);
2809
2818
  }
2810
2819
  else if (r[n] === undefined) {
@@ -2823,7 +2832,7 @@ var bbn = (() => {
2823
2832
  exports.fieldValue = void 0;
2824
2833
  const fieldValue = function (field) {
2825
2834
  let v;
2826
- if (field.type === "checkbox") {
2835
+ if (field.type === 'checkbox') {
2827
2836
  if (field.checked) {
2828
2837
  v = field.value;
2829
2838
  if (!v) {
@@ -2834,7 +2843,7 @@ var bbn = (() => {
2834
2843
  v = 0;
2835
2844
  }
2836
2845
  }
2837
- else if (field.type === "radio") {
2846
+ else if (field.type === 'radio') {
2838
2847
  if (field.checked) {
2839
2848
  v = field.value;
2840
2849
  }
@@ -2857,7 +2866,7 @@ var bbn = (() => {
2857
2866
  res.push(arr[idx]);
2858
2867
  start = idx + 1;
2859
2868
  }
2860
- (0, each_13.each)(arr, it => {
2869
+ (0, each_13.each)(arr, (it) => {
2861
2870
  if ((0, isArray_10.isArray)(it[deepProperty])) {
2862
2871
  findAll(it[deepProperty], filter, deepProperty, res);
2863
2872
  }
@@ -2873,10 +2882,10 @@ var bbn = (() => {
2873
2882
  const fori = function (arr, fn, max = arr.length - 1, min = 0) {
2874
2883
  if ((0, isArray_11.isArray)(arr)) {
2875
2884
  let realMax = arr.length - 1;
2876
- if (!(0, isNumber_4.isNumber)(max) || !(0 < max <= realMax)) {
2885
+ if (!(0, isNumber_4.isNumber)(max) || !((0 < max) && (max <= realMax))) {
2877
2886
  max = realMax;
2878
2887
  }
2879
- if (!(0, isNumber_4.isNumber)(min) || !(0 <= min < realMax) || (min > max)) {
2888
+ if (!(0, isNumber_4.isNumber)(min) || !((0 <= min) && (min < realMax)) || (min > max)) {
2880
2889
  min = 0;
2881
2890
  }
2882
2891
  for (let i = min; i <= max; i++) {
@@ -2895,10 +2904,10 @@ var bbn = (() => {
2895
2904
  const forir = function (arr, fn, max = arr.length - 1, min = 0) {
2896
2905
  if ((0, isArray_12.isArray)(arr)) {
2897
2906
  let realMax = arr.length - 1;
2898
- if (!(0, isNumber_5.isNumber)(max) || !(0 < max <= realMax)) {
2907
+ if (!(0, isNumber_5.isNumber)(max) || !((0 < max) && (max <= realMax))) {
2899
2908
  max = realMax;
2900
2909
  }
2901
- if (!(0, isNumber_5.isNumber)(min) || !(0 <= min < realMax) || (min > max)) {
2910
+ if (!(0, isNumber_5.isNumber)(min) || !((0 <= min) && (min < realMax)) || (min > max)) {
2902
2911
  min = 0;
2903
2912
  }
2904
2913
  for (let i = max; i >= min; i--) {
@@ -2910,7 +2919,7 @@ var bbn = (() => {
2910
2919
  };
2911
2920
  exports.forir = forir;
2912
2921
  });
2913
- define("fn/format", ["require", "exports", "fn/checkType"], function (require, exports, checkType_1) {
2922
+ define("fn/format", ["require", "exports", "fn/checkType"], function (require, exports, checkType_2) {
2914
2923
  "use strict";
2915
2924
  Object.defineProperty(exports, "__esModule", { value: true });
2916
2925
  exports.format = void 0;
@@ -2920,7 +2929,7 @@ var bbn = (() => {
2920
2929
  let i = 0;
2921
2930
  return str.replace(/\%([d|s])/g, (match, type) => {
2922
2931
  let tmp = args[i++];
2923
- (0, checkType_1.checkType)(tmp, type === 'd' ? 'number' : 'string', bbn._("The value doesn't correspond to the format"));
2932
+ (0, checkType_2.checkType)(tmp, type === 'd' ? 'number' : 'string', bbn._("The value doesn't correspond to the format"));
2924
2933
  return tmp;
2925
2934
  });
2926
2935
  }
@@ -2950,7 +2959,7 @@ var bbn = (() => {
2950
2959
  };
2951
2960
  exports.formatDate = formatDate;
2952
2961
  });
2953
- define("fn/formatSize", ["require", "exports", "fn/isNumber", "fn/isString"], function (require, exports, isNumber_6, isString_18) {
2962
+ define("fn/formatSize", ["require", "exports", "fn/isNumber", "fn/isString"], function (require, exports, isNumber_6, isString_16) {
2954
2963
  "use strict";
2955
2964
  Object.defineProperty(exports, "__esModule", { value: true });
2956
2965
  exports.formatSize = void 0;
@@ -2958,7 +2967,7 @@ var bbn = (() => {
2958
2967
  if ((0, isNumber_6.isNumber)(st)) {
2959
2968
  return st + 'px';
2960
2969
  }
2961
- if ((0, isString_18.isString)(st)) {
2970
+ if ((0, isString_16.isString)(st)) {
2962
2971
  return st;
2963
2972
  }
2964
2973
  return noValid ? false : 'auto';
@@ -2976,30 +2985,29 @@ var bbn = (() => {
2976
2985
  let v;
2977
2986
  (0, each_14.each)($inputs, (input, i) => {
2978
2987
  v = (0, fieldValue_1.fieldValue)(input);
2979
- if ((v !== undefined) && !input.disabled) {
2988
+ if (v !== undefined && !input.disabled) {
2980
2989
  let name = input.name;
2981
- if ((name.indexOf("[]") === -1) &&
2982
- (name.indexOf("[") > -1) &&
2983
- (name.indexOf("]") > -1) &&
2984
- (name.lastIndexOf("]") === name.length - 1)) {
2985
- name = (0, replaceAll_3.replaceAll)("][", ".", name);
2986
- name = (0, replaceAll_3.replaceAll)("[", ".", name);
2987
- name = (0, replaceAll_3.replaceAll)("]", "", name);
2988
- }
2989
- if ((name.length > 2) &&
2990
- (name.indexOf("[]") === (name.length - 2))) {
2990
+ if (name.indexOf('[]') === -1 &&
2991
+ name.indexOf('[') > -1 &&
2992
+ name.indexOf(']') > -1 &&
2993
+ name.lastIndexOf(']') === name.length - 1) {
2994
+ name = (0, replaceAll_3.replaceAll)('][', '.', name);
2995
+ name = (0, replaceAll_3.replaceAll)('[', '.', name);
2996
+ name = (0, replaceAll_3.replaceAll)(']', '', name);
2997
+ }
2998
+ if (name.length > 2 && name.indexOf('[]') === name.length - 2) {
2991
2999
  n = (0, substr_8.substr)(name, 0, name.length - 2);
2992
3000
  if (res[n] === undefined) {
2993
3001
  res[n] = [];
2994
3002
  }
2995
3003
  res[n].push(v);
2996
3004
  }
2997
- else if (name.indexOf(".") > -1) {
2998
- let tmp, parts = name.split(".");
3005
+ else if (name.indexOf('.') > -1) {
3006
+ let tmp, parts = name.split('.');
2999
3007
  tmp = res;
3000
3008
  for (let i = 0; i < parts.length; i++) {
3001
3009
  if (res[parts[i]] === undefined) {
3002
- if (i < (parts.length - 1)) {
3010
+ if (i < parts.length - 1) {
3003
3011
  tmp[parts[i]] = {};
3004
3012
  }
3005
3013
  else {
@@ -3026,17 +3034,17 @@ var bbn = (() => {
3026
3034
  const fromXml = function (xml, arrayTags) {
3027
3035
  let dom = null;
3028
3036
  if (window.DOMParser)
3029
- dom = (new DOMParser()).parseFromString(xml, "text/xml");
3030
- else if (window.ActiveXObject) {
3031
- dom = new ActiveXObject('Microsoft.XMLDOM');
3037
+ dom = new DOMParser().parseFromString(xml, 'text/xml');
3038
+ else if (window['ActiveXObject']) {
3039
+ dom = new window['ActiveXObject']('Microsoft.XMLDOM');
3032
3040
  dom.async = false;
3033
3041
  if (!dom.loadXML(xml))
3034
- throw dom.parseError.reason + " " + dom.parseError.srcText;
3042
+ throw dom.parseError.reason + ' ' + dom.parseError.srcText;
3035
3043
  }
3036
3044
  else
3037
- throw new Error("cannot parse xml string!");
3045
+ throw new Error('cannot parse xml string!');
3038
3046
  function parseNode(xmlNode, result) {
3039
- if (xmlNode.nodeName == "#text") {
3047
+ if (xmlNode.nodeName == '#text') {
3040
3048
  let v = xmlNode.nodeValue;
3041
3049
  if (v.trim())
3042
3050
  result['#text'] = v;
@@ -3068,18 +3076,18 @@ var bbn = (() => {
3068
3076
  };
3069
3077
  exports.fromXml = fromXml;
3070
3078
  });
3071
- define("fn/ftime", ["require", "exports", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, date_5, isDate_7, isString_19) {
3079
+ define("fn/ftime", ["require", "exports", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, date_6, isDate_7, isString_17) {
3072
3080
  "use strict";
3073
3081
  Object.defineProperty(exports, "__esModule", { value: true });
3074
3082
  exports.ftime = void 0;
3075
3083
  const ftime = function (d, wrong_result) {
3076
- let r = (0, date_5.date)(d);
3084
+ let r = (0, date_6.date)(d);
3077
3085
  if (!(0, isDate_7.isDate)(r)) {
3078
- return wrong_result && (0, isString_19.isString)(wrong_result) ? wrong_result : '';
3086
+ return wrong_result && (0, isString_17.isString)(wrong_result) ? wrong_result : '';
3079
3087
  }
3080
3088
  if (undefined !== dayjs) {
3081
3089
  return dayjs(r).calendar({
3082
- sameElse: 'D/M/YY HH:mm'
3090
+ sameElse: 'D/M/YY HH:mm',
3083
3091
  });
3084
3092
  }
3085
3093
  return r.toLocaleDateString();
@@ -3102,31 +3110,31 @@ var bbn = (() => {
3102
3110
  Object.defineProperty(exports, "__esModule", { value: true });
3103
3111
  exports.getAllTags = void 0;
3104
3112
  const getAllTags = function () {
3105
- return (0, unique_1.unique)(Array.prototype.map.apply(document.all, [a => a.tagName.toLowerCase()]));
3113
+ return (0, unique_1.unique)(Array.prototype.map.apply(document.all, [(a) => a.tagName.toLowerCase()]));
3106
3114
  };
3107
3115
  exports.getAllTags = getAllTags;
3108
3116
  });
3109
- define("fn/getAncestors", ["require", "exports", "fn/isString"], function (require, exports, isString_20) {
3117
+ define("fn/getAncestors", ["require", "exports"], function (require, exports) {
3110
3118
  "use strict";
3111
3119
  Object.defineProperty(exports, "__esModule", { value: true });
3112
3120
  exports.getAncestors = void 0;
3113
- const getAncestors = function (ele, sel) {
3121
+ const getAncestors = function (ele, selector) {
3114
3122
  let r = [];
3115
- if ((0, isString_20.isString)(ele)) {
3123
+ if (typeof ele === 'string') {
3116
3124
  ele = document.querySelector(ele);
3117
3125
  }
3118
3126
  if (ele instanceof HTMLElement) {
3119
- if (ele.parentNode) {
3120
- if (typeof (sel) === 'string') {
3121
- while (ele = ele.parentNode.closest(sel)) {
3127
+ if (ele.parentElement) {
3128
+ if (typeof selector === 'string') {
3129
+ while ((ele = ele.parentElement.closest(selector))) {
3122
3130
  r.push(ele);
3123
3131
  }
3124
3132
  }
3125
3133
  else {
3126
- if (sel === true) {
3134
+ if (selector === true) {
3127
3135
  r.push(ele);
3128
3136
  }
3129
- while (ele = ele.parentNode) {
3137
+ while ((ele = ele.parentElement)) {
3130
3138
  r.push(ele);
3131
3139
  }
3132
3140
  }
@@ -3142,10 +3150,10 @@ var bbn = (() => {
3142
3150
  exports.getAttributes = void 0;
3143
3151
  const getAttributes = function (ele) {
3144
3152
  if (!ele.getAttributeNames) {
3145
- (0, error_3.error)("The element is not a proper HTML Element");
3153
+ (0, error_3.error)('The element is not a proper HTML Element');
3146
3154
  }
3147
3155
  let res = Object.create(null);
3148
- ele.getAttributeNames().forEach(name => {
3156
+ ele.getAttributeNames().forEach((name) => {
3149
3157
  res[name] = ele.getAttribute(name);
3150
3158
  });
3151
3159
  return res;
@@ -3161,19 +3169,19 @@ var bbn = (() => {
3161
3169
  switch (true) {
3162
3170
  case userAgent.includes('edge'):
3163
3171
  case userAgent.includes('edg/'):
3164
- return "Edge";
3165
- case userAgent.includes('opr') && !!window.opr:
3166
- return "Opera";
3167
- case userAgent.includes('chrome') && !!window.chrome:
3168
- return "Chrome";
3172
+ return 'Edge';
3173
+ case userAgent.includes('opr') && !!window['opr']:
3174
+ return 'Opera';
3175
+ case userAgent.includes('chrome') && !!window['chrome']:
3176
+ return 'Chrome';
3169
3177
  case userAgent.includes('trident'):
3170
- return "Internet Explorer";
3178
+ return 'Internet Explorer';
3171
3179
  case userAgent.includes('firefox'):
3172
- return "Firefox";
3180
+ return 'Firefox';
3173
3181
  case userAgent.includes('safari'):
3174
- return "Safari";
3182
+ return 'Safari';
3175
3183
  default:
3176
- return "Other";
3184
+ return 'Other';
3177
3185
  }
3178
3186
  };
3179
3187
  exports.getBrowserName = getBrowserName;
@@ -3189,9 +3197,9 @@ var bbn = (() => {
3189
3197
  return userAgent.split('edge/')[1].split(' ')[0];
3190
3198
  case userAgent.includes('edg/'):
3191
3199
  return userAgent.split('edg/')[1].split(' ')[0];
3192
- case userAgent.includes('opr/') && !!window.opr:
3200
+ case userAgent.includes('opr/') && !!window['opr']:
3193
3201
  return userAgent.split('opr/')[1].split(' ')[0];
3194
- case userAgent.includes('chrome/') && !!window.chrome:
3202
+ case userAgent.includes('chrome/') && !!window['chrome']:
3195
3203
  return userAgent.split('chrome/')[1].split(' ')[0];
3196
3204
  case userAgent.includes('trident/'):
3197
3205
  return userAgent.split('trident/')[1].split(' ')[0];
@@ -3210,7 +3218,7 @@ var bbn = (() => {
3210
3218
  Object.defineProperty(exports, "__esModule", { value: true });
3211
3219
  exports.getCookie = void 0;
3212
3220
  const getCookie = function (name) {
3213
- let nameEqual = name + "=";
3221
+ let nameEqual = name + '=';
3214
3222
  let ca = document.cookie.split(';');
3215
3223
  for (let i = 0; i < ca.length; i++) {
3216
3224
  let c = ca[i];
@@ -3240,13 +3248,13 @@ var bbn = (() => {
3240
3248
  };
3241
3249
  exports.getCssVar = getCssVar;
3242
3250
  });
3243
- define("fn/getDay", ["require", "exports", "fn/date"], function (require, exports, date_6) {
3251
+ define("fn/getDay", ["require", "exports", "fn/date"], function (require, exports, date_7) {
3244
3252
  "use strict";
3245
3253
  Object.defineProperty(exports, "__esModule", { value: true });
3246
3254
  exports.getDay = void 0;
3247
3255
  const getDay = function (v) {
3248
3256
  const biss = 1972;
3249
- let d = (0, date_6.date)(v);
3257
+ let d = (0, date_7.date)(v);
3250
3258
  if (d) {
3251
3259
  let t = d.getTime(), y = d.getYear(), m = d.getMonth(), days = (y - 1970) * 365;
3252
3260
  if (m < 2) {
@@ -3268,40 +3276,30 @@ var bbn = (() => {
3268
3276
  const getDeviceType = function () {
3269
3277
  const userAgent = navigator.userAgent.toLowerCase();
3270
3278
  if (/iPhone|Android/i.test(navigator.userAgent)) {
3271
- return "mobile";
3279
+ return 'mobile';
3272
3280
  }
3273
3281
  if (/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(userAgent)) {
3274
- return "tablet";
3282
+ return 'tablet';
3275
3283
  }
3276
- return "desktop";
3284
+ return 'desktop';
3277
3285
  };
3278
3286
  exports.getDeviceType = getDeviceType;
3279
3287
  });
3280
- define("fn/getHTMLOfSelection", ["require", "exports", "fn/log"], function (require, exports, log_14) {
3288
+ define("fn/getHTMLOfSelection", ["require", "exports", "fn/log"], function (require, exports, log_11) {
3281
3289
  "use strict";
3282
3290
  Object.defineProperty(exports, "__esModule", { value: true });
3283
3291
  exports.getHTMLOfSelection = void 0;
3284
3292
  const getHTMLOfSelection = function () {
3285
3293
  let range;
3286
- if (document.selection && document.selection.createRange) {
3287
- (0, log_14.log)("METHOD 1");
3288
- range = document.selection.createRange();
3289
- return range.htmlText;
3290
- }
3291
- else if (window.getSelection) {
3292
- let selection = window.getSelection();
3293
- if (selection.rangeCount > 0) {
3294
- range = selection.getRangeAt(0);
3295
- (0, log_14.log)("RANGE", range);
3296
- let clonedSelection = range.cloneContents();
3297
- (0, log_14.log)("clonedSelection", clonedSelection);
3298
- let div = document.createElement('div');
3299
- div.appendChild(clonedSelection);
3300
- return div.innerHTML;
3301
- }
3302
- else {
3303
- return '';
3304
- }
3294
+ let selection = window.getSelection();
3295
+ if (selection.rangeCount > 0) {
3296
+ range = selection.getRangeAt(0);
3297
+ (0, log_11.log)('RANGE', range);
3298
+ let clonedSelection = range.cloneContents();
3299
+ (0, log_11.log)('clonedSelection', clonedSelection);
3300
+ let div = document.createElement('div');
3301
+ div.appendChild(clonedSelection);
3302
+ return div.innerHTML;
3305
3303
  }
3306
3304
  else {
3307
3305
  return '';
@@ -3309,7 +3307,7 @@ var bbn = (() => {
3309
3307
  };
3310
3308
  exports.getHTMLOfSelection = getHTMLOfSelection;
3311
3309
  });
3312
- define("fn/getEventData", ["require", "exports", "fn/getHTMLOfSelection", "fn/each"], function (require, exports, getHTMLOfSelection_1, each_15) {
3310
+ define("fn/getEventData", ["require", "exports", "fn/getHTMLOfSelection", "fn/each", "fn/defaultErrorFunction"], function (require, exports, getHTMLOfSelection_1, each_15, defaultErrorFunction_1) {
3313
3311
  "use strict";
3314
3312
  Object.defineProperty(exports, "__esModule", { value: true });
3315
3313
  exports.getEventData = void 0;
@@ -3325,18 +3323,20 @@ var bbn = (() => {
3325
3323
  let html = (0, getHTMLOfSelection_1.getHTMLOfSelection)();
3326
3324
  res.str.push({
3327
3325
  type: 'text/plain',
3328
- data: res.raw
3326
+ data: res.raw,
3329
3327
  });
3330
3328
  if (html !== res.raw) {
3331
3329
  res.str.push({
3332
3330
  type: 'text/html',
3333
- data: html
3331
+ data: html,
3334
3332
  });
3335
3333
  }
3336
3334
  else if (res.raw.trim().indexOf('<') === 0) {
3337
3335
  res.str.push({
3338
3336
  type: 'text/html',
3339
- data: "<meta charset='utf-8'><code style=\"white-space: pre; font-family: 'Courier New', sans-serif\">\n" + res.raw + "\n</code>"
3337
+ data: "<meta charset='utf-8'><code style=\"white-space: pre; font-family: 'Courier New', sans-serif\">\n" +
3338
+ res.raw +
3339
+ '\n</code>',
3340
3340
  });
3341
3341
  }
3342
3342
  done = true;
@@ -3366,18 +3366,18 @@ var bbn = (() => {
3366
3366
  data: blob,
3367
3367
  name: name,
3368
3368
  size: size,
3369
- mdate: lastModified
3369
+ mdate: lastModified,
3370
3370
  });
3371
3371
  strings.push(name);
3372
3372
  if (!num) {
3373
3373
  if (!res.raw) {
3374
- res.raw = strings.join(", ");
3374
+ res.raw = strings.join(', ');
3375
3375
  }
3376
3376
  ok(res);
3377
3377
  }
3378
3378
  }
3379
3379
  else {
3380
- appui.error(bbn._("Impossible to read the file") + ' ' + name);
3380
+ (0, defaultErrorFunction_1.defaultErrorFunction)(bbn._('Impossible to read the file') + ' ' + name);
3381
3381
  }
3382
3382
  }
3383
3383
  else {
@@ -3386,14 +3386,14 @@ var bbn = (() => {
3386
3386
  num--;
3387
3387
  res.str.push({
3388
3388
  type: type,
3389
- data: data
3389
+ data: data,
3390
3390
  });
3391
3391
  if (type === 'text/plain') {
3392
3392
  strings.push(name);
3393
3393
  }
3394
3394
  if (!num) {
3395
3395
  if (!res.raw) {
3396
- res.raw = strings.join(", ");
3396
+ res.raw = strings.join(', ');
3397
3397
  }
3398
3398
  ok(res);
3399
3399
  }
@@ -3411,40 +3411,40 @@ var bbn = (() => {
3411
3411
  };
3412
3412
  exports.getEventData = getEventData;
3413
3413
  });
3414
- define("fn/getField", ["require", "exports"], function (require, exports) {
3414
+ define("fn/getField", ["require", "exports", "fn/getRow"], function (require, exports, getRow_2) {
3415
3415
  "use strict";
3416
3416
  Object.defineProperty(exports, "__esModule", { value: true });
3417
3417
  exports.getField = void 0;
3418
- const getField = function (arr, field, prop, val, operator) {
3419
- var r;
3420
- if (field && (r = bbn.fn.getRow(arr, prop, val, operator))) {
3418
+ const getField = function (arr, field, prop = '', val = null, operator = '=') {
3419
+ let r;
3420
+ if (field && (r = (0, getRow_2.getRow)(arr, prop, val, operator))) {
3421
3421
  return r[field];
3422
3422
  }
3423
3423
  return undefined;
3424
3424
  };
3425
3425
  exports.getField = getField;
3426
3426
  });
3427
- define("fn/getFieldValues", ["require", "exports", "fn/checkType", "fn/filter", "fn/each"], function (require, exports, checkType_2, filter_3, each_16) {
3427
+ define("fn/getFieldValues", ["require", "exports", "fn/checkType", "fn/filter", "fn/each"], function (require, exports, checkType_3, filter_3, each_16) {
3428
3428
  "use strict";
3429
3429
  Object.defineProperty(exports, "__esModule", { value: true });
3430
3430
  exports.getFieldValues = void 0;
3431
3431
  const getFieldValues = function (arr, field, prop, val, operator) {
3432
- (0, checkType_2.checkType)(field, 'string');
3432
+ (0, checkType_3.checkType)(field, 'string');
3433
3433
  if (prop) {
3434
- arr = (0, filter_3.filter)(arr, prop, val, operator, false);
3434
+ arr = (0, filter_3.filter)(arr, prop, val, operator);
3435
3435
  }
3436
3436
  let res = [];
3437
- (0, each_16.each)(arr, a => res.indexOf(a[field]) === -1 ? res.push(a[field]) : null);
3437
+ (0, each_16.each)(arr, (a) => (res.indexOf(a[field]) === -1 ? res.push(a[field]) : null));
3438
3438
  return res;
3439
3439
  };
3440
3440
  exports.getFieldValues = getFieldValues;
3441
3441
  });
3442
- define("fn/removeHtmlComments", ["require", "exports", "fn/isString"], function (require, exports, isString_21) {
3442
+ define("fn/removeHtmlComments", ["require", "exports", "fn/isString"], function (require, exports, isString_18) {
3443
3443
  "use strict";
3444
3444
  Object.defineProperty(exports, "__esModule", { value: true });
3445
3445
  exports.removeHtmlComments = void 0;
3446
3446
  const removeHtmlComments = function (str) {
3447
- if (!(0, isString_21.isString)(str)) {
3447
+ if (!(0, isString_18.isString)(str)) {
3448
3448
  return str;
3449
3449
  }
3450
3450
  return str.replace(/<!--[\s\S]*?-->/g, '');
@@ -3471,7 +3471,7 @@ var bbn = (() => {
3471
3471
  const getPath = function (element) {
3472
3472
  let path,
3473
3473
  //node = $(element),
3474
- node = element, done = false;
3474
+ node = element, done = 0;
3475
3475
  while (node.length) {
3476
3476
  //let realNode = node[0],
3477
3477
  let realNode = node, name = realNode.localName;
@@ -3483,15 +3483,15 @@ var bbn = (() => {
3483
3483
  return '#' + realNode.id;
3484
3484
  }
3485
3485
  if (!done) {
3486
- if (realNode.className && (realNode.className !== ' ')) {
3487
- name += ('.' + (0, replaceAll_4.replaceAll)(" ", ".", (0, replaceAll_4.replaceAll)(" ", " ", realNode.className)));
3486
+ if (realNode.className && realNode.className !== ' ') {
3487
+ name += '.' + (0, replaceAll_4.replaceAll)(' ', '.', (0, replaceAll_4.replaceAll)(' ', ' ', realNode.className));
3488
3488
  }
3489
3489
  done = 1;
3490
3490
  }
3491
3491
  //var parent = node.parent(),
3492
3492
  let parent = node.parentNode,
3493
3493
  //sameTagSiblings = parent.children(name);
3494
- sameTagSiblings = parent.children.filter(val => {
3494
+ sameTagSiblings = parent.children.filter((val) => {
3495
3495
  return val.tagName === name;
3496
3496
  });
3497
3497
  if (sameTagSiblings.length > 1) {
@@ -3510,13 +3510,13 @@ var bbn = (() => {
3510
3510
  };
3511
3511
  exports.getPath = getPath;
3512
3512
  });
3513
- define("fn/getProp", ["require", "exports"], function (require, exports) {
3513
+ define("fn/getProp", ["require", "exports", "fn/checkType"], function (require, exports, checkType_4) {
3514
3514
  "use strict";
3515
3515
  Object.defineProperty(exports, "__esModule", { value: true });
3516
3516
  exports.getProp = void 0;
3517
3517
  const getProp = function (obj, prop) {
3518
- checkType(obj, "object", bbn._("The obj must be an object in setProp"));
3519
- checkType(prop, "string", bbn._("The prop must be a string in setProp"));
3518
+ (0, checkType_4.checkType)(obj, 'object', bbn._('The obj must be an object in setProp'));
3519
+ (0, checkType_4.checkType)(prop, 'string', bbn._('The prop must be a string in setProp'));
3520
3520
  return obj[prop];
3521
3521
  };
3522
3522
  exports.getProp = getProp;
@@ -3527,17 +3527,19 @@ var bbn = (() => {
3527
3527
  exports.getScrollBarSize = void 0;
3528
3528
  const getScrollBarSize = function () {
3529
3529
  if (bbn.env.scrollBarSize === undefined) {
3530
- let outer = document.createElement("div");
3531
- outer.style.visibility = "hidden";
3532
- outer.style.width = "100px";
3533
- outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps
3530
+ let outer = document.createElement('div');
3531
+ outer.style.visibility = 'hidden';
3532
+ outer.style.width = '100px';
3533
+ if ('msOverflowStyle' in outer.style) {
3534
+ outer.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps
3535
+ }
3534
3536
  document.body.appendChild(outer);
3535
3537
  let widthNoScroll = outer.offsetWidth;
3536
3538
  // force scrollbars
3537
- outer.style.overflow = "scroll";
3539
+ outer.style.overflow = 'scroll';
3538
3540
  // add innerdiv
3539
- let inner = document.createElement("div");
3540
- inner.style.width = "100%";
3541
+ let inner = document.createElement('div');
3542
+ inner.style.width = '100%';
3541
3543
  outer.appendChild(inner);
3542
3544
  let widthWithScroll = inner.offsetWidth;
3543
3545
  // remove divs
@@ -3564,22 +3566,22 @@ var bbn = (() => {
3564
3566
  exports.getTimeoff = void 0;
3565
3567
  const getTimeoff = function () {
3566
3568
  if (!bbn.env.isFocused) {
3567
- return Math.round((new Date()).getTime() / 1000 - bbn.env.timeoff);
3569
+ return Math.round(new Date().getTime() / 1000 - bbn.env.timeoff);
3568
3570
  }
3569
3571
  return 0;
3570
3572
  };
3571
3573
  exports.getTimeoff = getTimeoff;
3572
3574
  });
3573
- define("fn/happy", ["require", "exports", "fn/log"], function (require, exports, log_15) {
3575
+ define("fn/happy", ["require", "exports", "fn/log"], function (require, exports, log_12) {
3574
3576
  "use strict";
3575
3577
  Object.defineProperty(exports, "__esModule", { value: true });
3576
3578
  exports.happy = void 0;
3577
3579
  const happy = function (...args) {
3578
3580
  args.unshift({
3579
3581
  _bbn_console_level: 3,
3580
- _bbn_console_style: "color: white; background: green; font-size: 18px;"
3582
+ _bbn_console_style: 'color: white; background: green; font-size: 18px;',
3581
3583
  });
3582
- log_15.log.apply(this, args);
3584
+ log_12.log.apply(this, args);
3583
3585
  return this;
3584
3586
  };
3585
3587
  exports.happy = happy;
@@ -3590,11 +3592,13 @@ var bbn = (() => {
3590
3592
  exports.hex2rgb = void 0;
3591
3593
  const hex2rgb = function (hex) {
3592
3594
  var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
3593
- return result ? {
3594
- r: parseInt(result[1], 16),
3595
- g: parseInt(result[2], 16),
3596
- b: parseInt(result[3], 16)
3597
- } : null;
3595
+ return result
3596
+ ? {
3597
+ r: parseInt(result[1], 16),
3598
+ g: parseInt(result[2], 16),
3599
+ b: parseInt(result[3], 16),
3600
+ }
3601
+ : null;
3598
3602
  };
3599
3603
  exports.hex2rgb = hex2rgb;
3600
3604
  });
@@ -3624,25 +3628,26 @@ var bbn = (() => {
3624
3628
  Object.defineProperty(exports, "__esModule", { value: true });
3625
3629
  exports.imageToCanvas = void 0;
3626
3630
  const imageToCanvas = function (img) {
3627
- let canvas = document.createElement("canvas");
3631
+ let canvas = document.createElement('canvas');
3628
3632
  canvas.width = img.width;
3629
3633
  canvas.height = img.height;
3630
- canvas.getContext("2d").drawImage(img, 0, 0);
3634
+ canvas.getContext('2d').drawImage(img, 0, 0);
3631
3635
  return canvas;
3632
3636
  };
3633
3637
  exports.imageToCanvas = imageToCanvas;
3634
3638
  });
3635
- define("fn/imgToBase64", ["require", "exports", "fn/imageToCanvas", "fn/canvasToImage"], function (require, exports, imageToCanvas_1, canvasToImage_1) {
3639
+ define("fn/imgToBase64", ["require", "exports", "fn/imageToCanvas"], function (require, exports, imageToCanvas_1) {
3636
3640
  "use strict";
3637
3641
  Object.defineProperty(exports, "__esModule", { value: true });
3638
3642
  exports.imgToBase64 = void 0;
3639
- const imgToBase64 = function (img) {
3643
+ const imgToBase64 = function (img, type = 'image/png') {
3640
3644
  let canvas = (0, imageToCanvas_1.imageToCanvas)(img);
3641
- return (0, canvasToImage_1.canvasToImage)(canvas);
3645
+ //return canvasToImage(canvas);
3646
+ return canvas.toDataURL(type);
3642
3647
  };
3643
3648
  exports.imgToBase64 = imgToBase64;
3644
3649
  });
3645
- define("fn/info", ["require", "exports", "fn/log"], function (require, exports, log_16) {
3650
+ define("fn/info", ["require", "exports", "fn/log"], function (require, exports, log_13) {
3646
3651
  "use strict";
3647
3652
  Object.defineProperty(exports, "__esModule", { value: true });
3648
3653
  exports.info = void 0;
@@ -3650,27 +3655,29 @@ var bbn = (() => {
3650
3655
  args.unshift({
3651
3656
  //_bbn_console_mode: "info",
3652
3657
  _bbn_console_level: 4,
3653
- _bbn_console_style: "color: #EEE; background: blue; font-size: 12px;"
3658
+ _bbn_console_style: 'color: #EEE; background: blue; font-size: 12px;',
3654
3659
  });
3655
- log_16.log.apply(this, args);
3660
+ log_13.log.apply(this, args);
3656
3661
  return this;
3657
3662
  };
3658
3663
  exports.info = info;
3659
3664
  });
3660
- define("fn/treatAjaxArguments", ["require", "exports", "fn/isObject", "fn/isFunction", "fn/substr", "fn/numProperties"], function (require, exports, isObject_16, isFunction_10, substr_9, numProperties_7) {
3665
+ define("fn/treatAjaxArguments", ["require", "exports", "fn/isObject", "fn/isFunction", "fn/substr", "fn/numProperties"], function (require, exports, isObject_14, isFunction_9, substr_9, numProperties_6) {
3661
3666
  "use strict";
3662
3667
  Object.defineProperty(exports, "__esModule", { value: true });
3663
3668
  exports.treatAjaxArguments = void 0;
3664
3669
  const treatAjaxArguments = function (args) {
3665
- let cfg = {}, t, i;
3666
- if ((0, isObject_16.isObject)(args[0]) && (args.length === 1)) {
3670
+ let cfg = {};
3671
+ let t;
3672
+ let i;
3673
+ if ((0, isObject_14.isObject)(args[0]) && args.length === 1) {
3667
3674
  return args[0];
3668
3675
  }
3669
3676
  for (i = 0; i < args.length; i++) {
3670
- t = typeof (args[i]);
3677
+ t = typeof args[i];
3671
3678
  t = t.toLowerCase();
3672
3679
  /* Callbacks */
3673
- if ((0, isFunction_10.isFunction)(args[i])) {
3680
+ if ((0, isFunction_9.isFunction)(args[i])) {
3674
3681
  if (cfg.errorFn && !cfg.abortFn) {
3675
3682
  cfg.abortFn = args[i];
3676
3683
  }
@@ -3681,8 +3688,8 @@ var bbn = (() => {
3681
3688
  cfg.successFn = args[i];
3682
3689
  }
3683
3690
  }
3684
- /* Force */
3685
- else if ((args[i] === 1) || (args[i] === true)) {
3691
+ else if (args[i] === 1 || args[i] === true) {
3692
+ /* Force */
3686
3693
  cfg.force = true;
3687
3694
  }
3688
3695
  else if (t === 'string') {
@@ -3691,42 +3698,42 @@ var bbn = (() => {
3691
3698
  if (args[i].indexOf('#') === 0 || args[i].indexOf(bbn.env.root + '#') === 0) {
3692
3699
  cfg.url = (0, substr_9.substr)(args[i], bbn.env.root.length);
3693
3700
  }
3694
- /* Link */
3695
3701
  else {
3702
+ /* Link */
3696
3703
  cfg.url = args[i];
3697
3704
  if (cfg.url.indexOf(bbn.env.root) === 0) {
3698
3705
  cfg.url = (0, substr_9.substr)(cfg.url, bbn.env.root.length);
3699
3706
  }
3700
3707
  }
3701
3708
  }
3702
- /* Ajax datatype */
3703
3709
  else {
3710
+ /* Ajax datatype */
3704
3711
  cfg.datatype = args[i];
3705
3712
  }
3706
3713
  }
3707
- /* Event */
3708
- else if (args[i] && (t === 'object')) {
3714
+ else if (args[i] && t === 'object') {
3715
+ /* Event */
3709
3716
  if (args[i] instanceof Event) {
3710
3717
  cfg.e = args[i];
3711
3718
  }
3712
- /* HTML Element */
3713
- else if (!cfg.ele && (args[i].nodeType === 1)) {
3719
+ else if (!cfg.ele && args[i].nodeType === 1) {
3720
+ /* HTML Element */
3714
3721
  cfg.ele = args[i];
3715
3722
  }
3716
- /* An object to post */
3717
3723
  else if (t.toLowerCase() === 'object') {
3724
+ /* An object to post */
3718
3725
  cfg.obj = args[i];
3719
3726
  }
3720
3727
  }
3721
3728
  }
3722
- if (!cfg.url && (0, numProperties_7.numProperties)(cfg)) {
3729
+ if (!cfg.url && (0, numProperties_6.numProperties)(cfg)) {
3723
3730
  cfg.url = bbn.env.path;
3724
3731
  }
3725
3732
  if (cfg.obj === undefined) {
3726
- cfg.obj = { _bbn: "public" };
3733
+ cfg.obj = { _bbn: 'public' };
3727
3734
  }
3728
3735
  if (!cfg.datatype) {
3729
- cfg.datatype = "json";
3736
+ cfg.datatype = 'json';
3730
3737
  }
3731
3738
  return cfg;
3732
3739
  };
@@ -3744,7 +3751,7 @@ var bbn = (() => {
3744
3751
  // Path does not
3745
3752
  bbn.env.path = (0, substr_10.substr)(bbn.env.url, bbn.env.root.length);
3746
3753
  // Params will include each part of the URL
3747
- bbn.env.params = (0, filter_4.filter)(bbn.env.path.split("/"), (v) => {
3754
+ bbn.env.params = (0, filter_4.filter)(bbn.env.path.split('/'), (v) => {
3748
3755
  return v !== '';
3749
3756
  });
3750
3757
  // Managing history
@@ -3756,17 +3763,18 @@ var bbn = (() => {
3756
3763
  let obj = {
3757
3764
  url: bbn.env.path,
3758
3765
  old_path: bbn.env.old_path || null,
3759
- data: data || {}
3766
+ data: data || {},
3767
+ reload: false
3760
3768
  };
3761
3769
  // If same URL we replace
3762
- if (state && (state.url === bbn.env.path)) {
3770
+ if (state && state.url === bbn.env.path) {
3763
3771
  if (state.data) {
3764
3772
  (0, extend_5.extend)(obj.data, state.data);
3765
3773
  }
3766
3774
  if (state.title && !title) {
3767
3775
  title = state.title;
3768
3776
  }
3769
- repl = 1;
3777
+ repl = true;
3770
3778
  }
3771
3779
  // If no title the global title
3772
3780
  if (!title) {
@@ -3778,7 +3786,7 @@ var bbn = (() => {
3778
3786
  }
3779
3787
  // Replacing state
3780
3788
  if (repl) {
3781
- obj.reload = 1;
3789
+ obj.reload = true;
3782
3790
  h.replaceState(obj, title, bbn.env.url);
3783
3791
  }
3784
3792
  // Adding state
@@ -3789,15 +3797,13 @@ var bbn = (() => {
3789
3797
  };
3790
3798
  exports.setNavigationVars = setNavigationVars;
3791
3799
  });
3792
- define("fn/link", ["require", "exports", "fn/treatAjaxArguments", "fn/getLoader", "fn/defaultPreLinkFunction", "fn/extend", "fn/ajax", "fn/log", "fn/isObject", "fn/callback", "fn/setNavigationVars"], function (require, exports, treatAjaxArguments_1, getLoader_3, defaultPreLinkFunction_1, extend_6, ajax_2, log_17, isObject_17, callback_1, setNavigationVars_1) {
3800
+ define("fn/link", ["require", "exports", "fn/treatAjaxArguments", "fn/getLoader", "fn/defaultPreLinkFunction", "fn/ajax", "fn/log", "fn/isObject", "fn/callback", "fn/setNavigationVars"], function (require, exports, treatAjaxArguments_1, getLoader_3, defaultPreLinkFunction_1, ajax_2, log_14, isObject_15, callback_1, setNavigationVars_1) {
3793
3801
  "use strict";
3794
3802
  Object.defineProperty(exports, "__esModule", { value: true });
3795
3803
  exports.link = void 0;
3796
- const link = function () {
3797
- let cfg = (0, treatAjaxArguments_1.treatAjaxArguments)(arguments), ok = 1;
3798
- if (cfg === true) {
3799
- return true;
3800
- }
3804
+ const link = function (...args) {
3805
+ let cfg = (0, treatAjaxArguments_1.treatAjaxArguments)(args);
3806
+ let ok = true;
3801
3807
  /* If we can't find a correct link we load the current URL */
3802
3808
  if (!cfg) {
3803
3809
  return link(window.location.href);
@@ -3821,8 +3827,8 @@ var bbn = (() => {
3821
3827
  */
3822
3828
  return true;
3823
3829
  }
3824
- /* Mail link */
3825
3830
  else if (cfg.url.indexOf('mailto:') === 0) {
3831
+ /* Mail link */
3826
3832
  bbn.env.ignoreUnload = true;
3827
3833
  window.location.href = cfg.url;
3828
3834
  setTimeout(() => {
@@ -3834,52 +3840,53 @@ var bbn = (() => {
3834
3840
  return false;
3835
3841
  }
3836
3842
  /* Opens an external page in a new window */
3837
- if (((cfg.url.indexOf("http://") === 0) || (cfg.url.indexOf("https://") === 0)) &&
3838
- (cfg.url.indexOf(bbn.env.host) !== 0)) {
3843
+ if ((cfg.url.indexOf('http://') === 0 || cfg.url.indexOf('https://') === 0) &&
3844
+ cfg.url.indexOf(bbn.env.host) !== 0) {
3839
3845
  if (cfg.e) {
3840
3846
  cfg.e.preventDefault();
3841
3847
  }
3842
3848
  window.open(cfg.url);
3843
3849
  return false;
3844
3850
  }
3845
- /* The URL is fine so go ahead if something is not already loading */
3846
- else if ((cfg.url !== bbn.env.params.join("/")) || (cfg.force === 1)) {
3851
+ else if (cfg.url !== bbn.env.params.join('/') || cfg.force) {
3852
+ /* The URL is fine so go ahead if something is not already loading */
3847
3853
  /* If a second callback is defined, it is triggered instead of defaultPreLinkFunction */
3848
3854
  if (cfg.successFn) {
3849
3855
  ok = cfg.successFn(cfg.url);
3850
3856
  }
3851
3857
  else if (defaultPreLinkFunction_1.defaultPreLinkFunction) {
3852
3858
  ok = (0, defaultPreLinkFunction_1.defaultPreLinkFunction)(cfg.url, cfg.force, cfg.ele);
3859
+ /*
3853
3860
  if (ok.data !== undefined) {
3854
- (0, extend_6.extend)(cfg.obj, ok.data);
3861
+ extend(cfg.obj, ok.data);
3855
3862
  ok = 1;
3856
3863
  }
3864
+ */
3857
3865
  }
3858
3866
  if (ok) {
3859
- if (ok !== 1 && (typeof ok === 'string')) {
3867
+ if (ok !== 1 && typeof ok === 'string') {
3860
3868
  cfg.url = ok;
3861
3869
  }
3862
3870
  /** todo Do we keep obj in the unique string or do we make that only one concurrent connection to the same address can occur at the same time? */
3863
- let errSt = bbn._("The Ajax call to") + ' ' + cfg.url + ' ';
3871
+ let errSt = bbn._('The Ajax call to') + ' ' + cfg.url + ' ';
3864
3872
  return (0, ajax_2.ajax)(cfg.url, cfg.datatype, cfg.obj, function (res) {
3865
3873
  if (!res) {
3866
- (0, log_17.log)(errSt + bbn._("returned no answer"));
3874
+ (0, log_14.log)(errSt + bbn._('returned no answer'));
3867
3875
  }
3868
- if ((0, isObject_17.isObject)(res)) {
3876
+ if ((0, isObject_15.isObject)(res)) {
3869
3877
  // If there's nothing in the result, just an empty object, the callback stops here and the URL is not changed
3870
- if ((Object.keys(res).length === 0)) {
3871
- (0, log_17.log)(errSt + bbn._("returned an empty object"));
3878
+ if (Object.keys(res).length === 0) {
3879
+ (0, log_14.log)(errSt + bbn._('returned an empty object'));
3872
3880
  }
3873
3881
  if (res.new_url) {
3874
3882
  res.old_path = cfg.url;
3875
3883
  cfg.url = res.new_url;
3876
3884
  }
3877
- else if (res.url && (cfg.url !== res.url)) {
3885
+ else if (res.url && cfg.url !== res.url) {
3878
3886
  res.old_path = cfg.url;
3879
3887
  }
3880
3888
  }
3881
- if ((0, callback_1.callback)(cfg.url, res, cfg.successFn, null, cfg.ele) &&
3882
- res.noNav === undefined) {
3889
+ if ((0, callback_1.callback)(cfg.url, res, cfg.successFn, null, cfg.ele) && res.noNav === undefined) {
3883
3890
  // This solution is not very clean (we can't shorten a URL)
3884
3891
  if (bbn.env.path.indexOf(cfg.url) !== 0) {
3885
3892
  (0, setNavigationVars_1.setNavigationVars)(cfg.url, (res.title ? res.title + ' - ' : '') + bbn.env.siteTitle);
@@ -3896,27 +3903,30 @@ var bbn = (() => {
3896
3903
  "use strict";
3897
3904
  Object.defineProperty(exports, "__esModule", { value: true });
3898
3905
  exports.post = void 0;
3899
- const post = function () {
3900
- let cfg = (0, treatAjaxArguments_2.treatAjaxArguments)(arguments);
3906
+ const post = function (...args) {
3907
+ let cfg = (0, treatAjaxArguments_2.treatAjaxArguments)(args);
3901
3908
  if (cfg.url) {
3902
3909
  return (0, ajax_3.ajax)(cfg.url, cfg.datatype, cfg.obj, (res) => {
3903
- (0, callback_2.callback)(cfg.url, res, cfg.successFn, false, cfg.ele);
3910
+ (0, callback_2.callback)(cfg.url, res, cfg.successFn, null, cfg.ele);
3904
3911
  }, cfg.errorFn, cfg.abortFn);
3905
3912
  }
3906
3913
  };
3907
3914
  exports.post = post;
3908
3915
  });
3909
- define("fn/submit", ["require", "exports", "fn/formdata", "fn/isFunction", "fn/isString", "fn/post"], function (require, exports, formdata_1, isFunction_11, isString_22, post_1) {
3916
+ define("fn/submit", ["require", "exports", "fn/formdata", "fn/post"], function (require, exports, formdata_1, post_1) {
3910
3917
  "use strict";
3911
3918
  Object.defineProperty(exports, "__esModule", { value: true });
3912
3919
  exports.submit = void 0;
3913
3920
  const submit = function (form, e, fn) {
3914
- let url = form.getAttribute("action") || bbn.env.path, data;
3921
+ let url = form.getAttribute('action') || bbn.env.path;
3922
+ let data;
3915
3923
  if (url === '') {
3916
3924
  url = '.';
3917
3925
  }
3918
3926
  //if ( (typeof(url) === 'string') && (url.indexOf("http") !== 0 || url.indexOf(window.document.location.hostname) !== -1) && !form.is("[target]") ){
3919
- if ((typeof (url) === 'string') && (url.indexOf("http") !== 0 || url.indexOf(window.document.location.hostname) !== -1) && !form.getAttribute("target")) {
3927
+ if (typeof url === 'string' &&
3928
+ (url.indexOf('http') !== 0 || url.indexOf(window.document.location.hostname) !== -1) &&
3929
+ !form.getAttribute('target')) {
3920
3930
  if (e) {
3921
3931
  e.preventDefault();
3922
3932
  }
@@ -3925,26 +3935,10 @@ var bbn = (() => {
3925
3935
  //$form.attr("action", null);
3926
3936
  form.setAttribute('action', null);
3927
3937
  //$form.data("bbnSubmit", 1);
3928
- form.dataset.bbnSubmit = 1;
3929
- //var script = $form.data("script");
3930
- let script = form.dataset.script;
3931
- if ((0, isFunction_11.isFunction)(script)) {
3932
- /*$form.data("script", function(d){
3933
- $form.attr("action", url);
3934
- script(d);
3935
- })*/
3936
- form.dataset.script = d => {
3937
- form.setAttribute("action", url);
3938
- script(d);
3939
- };
3940
- }
3941
3938
  if (!fn) {
3942
- fn = form.getAttribute("data-script");
3939
+ fn = form.getAttribute('data-script') ? eval(form.getAttribute('data-script')) : null;
3943
3940
  }
3944
3941
  if (fn) {
3945
- if ((0, isString_22.isString)(fn)) {
3946
- fn = eval(fn);
3947
- }
3948
3942
  (0, post_1.post)(url, data, fn);
3949
3943
  }
3950
3944
  else {
@@ -3964,20 +3958,22 @@ var bbn = (() => {
3964
3958
  let diffH = bbn.env.height !== window.innerHeight;
3965
3959
  if (diffW || diffH) {
3966
3960
  if (diffW) {
3967
- bbn.env.width = window.innerWidth || window.document.documentElement.clientWidth || window.document.body.clientWidth;
3968
- document.documentElement.style.setProperty('--vw', (bbn.env.width * 0.01) + 'px');
3961
+ bbn.env.width =
3962
+ window.innerWidth || window.document.documentElement.clientWidth || window.document.body.clientWidth;
3963
+ document.documentElement.style.setProperty('--vw', bbn.env.width * 0.01 + 'px');
3969
3964
  }
3970
3965
  if (diffH) {
3971
- bbn.env.height = window.innerHeight || window.document.documentElement.clientHeight || window.document.body.clientHeight;
3972
- document.documentElement.style.setProperty('--vh', (bbn.env.height * 0.01) + 'px');
3966
+ bbn.env.height =
3967
+ window.innerHeight || window.document.documentElement.clientHeight || window.document.body.clientHeight;
3968
+ document.documentElement.style.setProperty('--vh', bbn.env.height * 0.01 + 'px');
3973
3969
  }
3974
- let smallWidth = (0, getCssVar_1.getCssVar)('mobile-limit') || 650;
3975
- let newCls = 'bbn-screen-' + (bbn.env.width < parseInt(smallWidth) ? 'small' : 'regular');
3970
+ let smallWidth = parseInt((0, getCssVar_1.getCssVar)('mobile-limit')) || 650;
3971
+ let newCls = 'bbn-screen-' + (bbn.env.width < smallWidth ? 'small' : 'regular');
3976
3972
  let classes = (document.body.className || '').split(' ');
3977
3973
  let done = false;
3978
3974
  (0, each_17.each)(classes, (cls, idx) => {
3979
3975
  let bits = cls.split('-');
3980
- if ((bits.length === 3) && (cls.indexOf('bbn-screen-') === 0)) {
3976
+ if (bits.length === 3 && cls.indexOf('bbn-screen-') === 0) {
3981
3977
  done = true;
3982
3978
  if (cls !== newCls) {
3983
3979
  classes.splice(idx, 1, newCls);
@@ -4021,7 +4017,7 @@ var bbn = (() => {
4021
4017
  };
4022
4018
  exports.isMobile = isMobile;
4023
4019
  });
4024
- define("fn/init", ["require", "exports", "fn/substr", "fn/each", "fn/extend", "fn/addColors", "fn/link", "fn/submit", "fn/resize", "fn/isMobile", "fn/isTabletDevice", "fn/defaultHistoryFunction", "fn/isFunction", "fn/log"], function (require, exports, substr_11, each_18, extend_7, addColors_1, link_1, submit_1, resize_1, isMobile_1, isTabletDevice_2, defaultHistoryFunction_1, isFunction_12, log_18) {
4020
+ define("fn/init", ["require", "exports", "fn/substr", "fn/each", "fn/extend", "fn/addColors", "fn/link", "fn/submit", "fn/resize", "fn/isMobile", "fn/isTabletDevice", "fn/defaultHistoryFunction", "fn/isFunction", "fn/log"], function (require, exports, substr_11, each_18, extend_6, addColors_1, link_1, submit_1, resize_1, isMobile_1, isTabletDevice_2, defaultHistoryFunction_1, isFunction_10, log_15) {
4025
4021
  "use strict";
4026
4022
  Object.defineProperty(exports, "__esModule", { value: true });
4027
4023
  exports.init = void 0;
@@ -4029,10 +4025,10 @@ var bbn = (() => {
4029
4025
  let parts;
4030
4026
  if (!bbn.env.isInit || force) {
4031
4027
  bbn.env.root = document.baseURI.length > 0 ? document.baseURI : bbn.env.host;
4032
- if (bbn.env.root.length && ((0, substr_11.substr)(bbn.env.root, -1) !== '/')) {
4028
+ if (bbn.env.root.length && (0, substr_11.substr)(bbn.env.root, -1) !== '/') {
4033
4029
  bbn.env.root += '/';
4034
4030
  }
4035
- if (!bbn.env.isInit && (typeof dayjs !== 'undefined')) {
4031
+ if (!bbn.env.isInit && typeof dayjs !== 'undefined') {
4036
4032
  (0, each_18.each)([
4037
4033
  'advancedFormat',
4038
4034
  'arraySupport',
@@ -4066,30 +4062,30 @@ var bbn = (() => {
4066
4062
  'utc',
4067
4063
  'weekOfYear',
4068
4064
  'weekYear',
4069
- 'weekday'
4070
- ], plugin => {
4065
+ 'weekday',
4066
+ ], (plugin) => {
4071
4067
  if (window['dayjs_plugin_' + plugin]) {
4072
4068
  dayjs.extend(window['dayjs_plugin_' + plugin]);
4073
4069
  }
4074
4070
  });
4075
4071
  }
4076
4072
  /* The server's path (difference between the host and the current dir */
4077
- if (typeof (cfg) === 'object') {
4078
- (0, extend_7.extend)(true, window.bbn, cfg);
4073
+ if (typeof cfg === 'object') {
4074
+ (0, extend_6.extend)(true, bbn, cfg);
4079
4075
  }
4080
4076
  bbn.env.path = (0, substr_11.substr)(bbn.env.url, bbn.env.root.length);
4081
- parts = bbn.env.path.split("/");
4077
+ parts = bbn.env.path.split('/');
4082
4078
  //$.each(parts, function(i, v){
4083
4079
  (0, each_18.each)(parts, (v, i) => {
4084
4080
  v = decodeURI(v.trim());
4085
- if (v !== "") {
4081
+ if (v !== '') {
4086
4082
  bbn.env.params.push(v);
4087
4083
  }
4088
4084
  });
4089
- if (bbn.var.colors) {
4090
- (0, addColors_1.addColors)(bbn.var.colors);
4085
+ if (bbn.vars.colors) {
4086
+ (0, addColors_1.addColors)(bbn.vars.colors);
4091
4087
  }
4092
- if (bbn.env.lang && (undefined !== dayjs)) {
4088
+ if (bbn.env.lang && undefined !== dayjs) {
4093
4089
  dayjs.locale(bbn.env.lang);
4094
4090
  }
4095
4091
  window.onfocus = () => {
@@ -4097,54 +4093,54 @@ var bbn = (() => {
4097
4093
  };
4098
4094
  window.onblur = () => {
4099
4095
  bbn.env.isFocused = false;
4100
- bbn.env.timeoff = Math.round((new Date()).getTime() / 1000);
4096
+ bbn.env.timeoff = Math.round(new Date().getTime() / 1000);
4101
4097
  };
4102
- document.addEventListener("focusin", e => {
4103
- if (!e.target.classList.contains('bbn-no')) {
4098
+ document.addEventListener('focusin', (e) => {
4099
+ if (e.target instanceof HTMLElement && !e.target.classList.contains('bbn-no')) {
4104
4100
  bbn.env.focused = e.target;
4105
4101
  }
4106
- bbn.env.last_focus = (new Date()).getTime();
4102
+ bbn.env.last_focus = new Date().getTime();
4107
4103
  });
4108
4104
  document.addEventListener('click', (e) => {
4109
- bbn.env.last_focus = (new Date()).getTime();
4105
+ bbn.env.last_focus = new Date().getTime();
4110
4106
  if (bbn.env.nav !== 'ajax') {
4111
4107
  return;
4112
4108
  }
4113
4109
  let target = e.target;
4114
- if (target.tagName !== 'A') {
4110
+ if (target instanceof HTMLElement && (target.tagName !== 'A')) {
4115
4111
  let p = target;
4116
- while (p && (p.tagName !== 'A')) {
4112
+ while (p && p.tagName !== 'A') {
4117
4113
  if (p.tagName === 'BODY') {
4118
4114
  break;
4119
4115
  }
4120
- p = p.parentNode;
4116
+ p = p.parentElement;
4121
4117
  }
4122
- if (p && (p.tagName === 'A')) {
4118
+ if (p && p.tagName === 'A') {
4123
4119
  target = p;
4124
4120
  }
4125
4121
  else {
4126
- target = false;
4122
+ target = null;
4127
4123
  }
4128
4124
  }
4129
- if (target && target.href && !target.target && !target.classList.contains('bbn-no')) {
4125
+ if (target instanceof HTMLElement && target.hasAttribute('href') && !target.hasAttribute('target') && !target.classList.contains('bbn-no')) {
4130
4126
  e.preventDefault();
4131
4127
  e.stopPropagation();
4132
- (0, link_1.link)(target.href);
4128
+ (0, link_1.link)(target.getAttribute('href'));
4133
4129
  return false;
4134
4130
  }
4135
4131
  });
4136
- (0, each_18.each)(document.querySelectorAll("form:not(.bbn-no), form:not(.bbn-form)"), (ele, i) => {
4137
- ele.addEventListener("submit", e => {
4132
+ (0, each_18.each)(document.querySelectorAll('form:not(.bbn-no), form:not(.bbn-form)'), (ele) => {
4133
+ ele.addEventListener('submit', (e) => {
4138
4134
  (0, submit_1.submit)(ele, e);
4139
4135
  });
4140
4136
  });
4141
4137
  window.addEventListener('hashchange', () => {
4142
- bbn.env.hashChanged = (new Date()).getTime();
4138
+ bbn.env.hashChanged = new Date().getTime();
4143
4139
  }, false);
4144
- window.addEventListener("resize", () => {
4140
+ window.addEventListener('resize', () => {
4145
4141
  (0, resize_1.resize)();
4146
4142
  });
4147
- window.addEventListener("orientationchange", () => {
4143
+ window.addEventListener('orientationchange', () => {
4148
4144
  (0, resize_1.resize)();
4149
4145
  });
4150
4146
  (0, resize_1.resize)();
@@ -4163,9 +4159,9 @@ var bbn = (() => {
4163
4159
  if (state) {
4164
4160
  if ((0, defaultHistoryFunction_1.defaultHistoryFunction)(state)) {
4165
4161
  //link(substr(state.url, bbn.env.root.length), $.extend({title: state.title}, state.data));
4166
- (0, link_1.link)(state.url, (0, extend_7.extend)({ title: state.title || bbn.env.siteTitle }, state.data || {}));
4162
+ (0, link_1.link)(state.url, (0, extend_6.extend)({ title: state.title || bbn.env.siteTitle }, state.data || {}));
4167
4163
  }
4168
- else if (state && state.data && (0, isFunction_12.isFunction)(state.data.script)) {
4164
+ else if (state && state.data && (0, isFunction_10.isFunction)(state.data.script)) {
4169
4165
  state.data.script();
4170
4166
  }
4171
4167
  }
@@ -4175,7 +4171,7 @@ var bbn = (() => {
4175
4171
  bbn.env.isInit = true;
4176
4172
  document.dispatchEvent(new Event('bbninit'));
4177
4173
  if (bbn.env.logging) {
4178
- (0, log_18.log)("Logging in bbn is enabled");
4174
+ (0, log_15.log)('Logging in bbn is enabled');
4179
4175
  }
4180
4176
  }
4181
4177
  };
@@ -4189,8 +4185,8 @@ var bbn = (() => {
4189
4185
  if (!bbn.env.last_focus) {
4190
4186
  return false;
4191
4187
  }
4192
- let t = (new Date()).getTime();
4193
- return (t - bbn.env.last_focus) < (secs * 1000);
4188
+ let t = new Date().getTime();
4189
+ return t - bbn.env.last_focus < secs * 1000;
4194
4190
  };
4195
4191
  exports.isActiveInterface = isActiveInterface;
4196
4192
  });
@@ -4210,16 +4206,23 @@ var bbn = (() => {
4210
4206
  };
4211
4207
  exports.isBoolean = isBoolean;
4212
4208
  });
4213
- define("fn/isColor", ["require", "exports", "fn/isString"], function (require, exports, isString_23) {
4209
+ define("fn/isColor", ["require", "exports", "fn/isString"], function (require, exports, isString_19) {
4214
4210
  "use strict";
4215
4211
  Object.defineProperty(exports, "__esModule", { value: true });
4216
4212
  exports.isColor = void 0;
4217
- const isColor = function (st) {
4218
- if (!(0, isString_23.isString)(st)) {
4213
+ const isColor = function (...args) {
4214
+ if (!args.length)
4219
4215
  return false;
4216
+ var reg = new RegExp('^(#[a-f0-9]{6}|#[a-f0-9]{3}|rgb *( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *)|rgba *( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *)|black|green|silver|gray|olive|white|yellow|maroon|navy|red|blue|purple|teal|fuchsia|aqua)$', 'i');
4217
+ for (let st of args) {
4218
+ if (!(0, isString_19.isString)(st)) {
4219
+ return false;
4220
+ }
4221
+ if (!reg.test(st)) {
4222
+ return false;
4223
+ }
4220
4224
  }
4221
- var reg = new RegExp('^(#[a-f0-9]{6}|#[a-f0-9]{3}|rgb *\( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *\)|rgba *\( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *\)|black|green|silver|gray|olive|white|yellow|maroon|navy|red|blue|purple|teal|fuchsia|aqua)$', 'i');
4222
- return reg.test(st);
4225
+ return true;
4223
4226
  };
4224
4227
  exports.isColor = isColor;
4225
4228
  });
@@ -4248,14 +4251,12 @@ var bbn = (() => {
4248
4251
  };
4249
4252
  exports.isDesktopDevice = isDesktopDevice;
4250
4253
  });
4251
- define("fn/isValidDimension", ["require", "exports", "fn/substr"], function (require, exports, substr_12) {
4254
+ define("fn/isValidDimension", ["require", "exports", "fn/isNumber", "fn/substr"], function (require, exports, isNumber_7, substr_12) {
4252
4255
  "use strict";
4253
4256
  Object.defineProperty(exports, "__esModule", { value: true });
4254
4257
  exports.isValidDimension = void 0;
4255
4258
  const isValidDimension = function (st) {
4256
- if ((typeof (st) === 'string') &&
4257
- (st.length > 0) && ((st.indexOf('calc') === 0) ||
4258
- (!isNaN((0, substr_12.substr)(st, 0, 1))))) {
4259
+ if (typeof st === 'string' && (st.length > 0) && ((st.indexOf('calc') === 0) || (0, isNumber_7.isNumber)((0, substr_12.substr)(st, 0, 1)))) {
4259
4260
  let el = document.createElement('div');
4260
4261
  el.style.width = st;
4261
4262
  let res = !!el.style.width.length;
@@ -4270,24 +4271,38 @@ var bbn = (() => {
4270
4271
  "use strict";
4271
4272
  Object.defineProperty(exports, "__esModule", { value: true });
4272
4273
  exports.isDimension = void 0;
4273
- const isDimension = function (st) {
4274
- if ((typeof (st) === 'number') && (st >= 0)) {
4275
- return true;
4274
+ const isDimension = function (...args) {
4275
+ if (!args.length)
4276
+ return false;
4277
+ for (let st of args) {
4278
+ if ((typeof st !== 'number') || (st < 0)) {
4279
+ return false;
4280
+ }
4281
+ if (!(0, isValidDimension_1.isValidDimension)(st)) {
4282
+ return false;
4283
+ }
4276
4284
  }
4277
- return (0, isValidDimension_1.isValidDimension)(st);
4285
+ return true;
4278
4286
  };
4279
4287
  exports.isDimension = isDimension;
4280
4288
  });
4281
- define("fn/isEmail", ["require", "exports", "fn/isString"], function (require, exports, isString_24) {
4289
+ define("fn/isEmail", ["require", "exports", "fn/isString"], function (require, exports, isString_20) {
4282
4290
  "use strict";
4283
4291
  Object.defineProperty(exports, "__esModule", { value: true });
4284
4292
  exports.isEmail = void 0;
4285
- const isEmail = function (st) {
4286
- if (!(0, isString_24.isString)(st)) {
4293
+ const isEmail = function (...args) {
4294
+ if (!args.length)
4287
4295
  return false;
4288
- }
4289
4296
  let regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
4290
- return regex.test(st);
4297
+ for (let st of args) {
4298
+ if (!(0, isString_20.isString)(st)) {
4299
+ return false;
4300
+ }
4301
+ if (!regex.test(st)) {
4302
+ return false;
4303
+ }
4304
+ }
4305
+ return true;
4291
4306
  };
4292
4307
  exports.isEmail = isEmail;
4293
4308
  });
@@ -4312,11 +4327,11 @@ var bbn = (() => {
4312
4327
  Object.defineProperty(exports, "__esModule", { value: true });
4313
4328
  exports.isFocused = void 0;
4314
4329
  const isFocused = function (ele, contain) {
4315
- return (ele === document.activeElement) || (contain && ele.contains && (ele.contains(document.activeElement)));
4330
+ return ele === document.activeElement || (contain && ele.contains && ele.contains(document.activeElement));
4316
4331
  };
4317
4332
  exports.isFocused = isFocused;
4318
4333
  });
4319
- define("fn/isIP", ["require", "exports", "fn/isString"], function (require, exports, isString_25) {
4334
+ define("fn/isIP", ["require", "exports", "fn/isString"], function (require, exports, isString_21) {
4320
4335
  "use strict";
4321
4336
  Object.defineProperty(exports, "__esModule", { value: true });
4322
4337
  exports.isIP = void 0;
@@ -4324,7 +4339,7 @@ var bbn = (() => {
4324
4339
  if (!args.length)
4325
4340
  return false;
4326
4341
  for (let st of args) {
4327
- if (!(0, isString_25.isString)(st) || !bbn.var.regexp.ip.test(st)) {
4342
+ if (!(0, isString_21.isString)(st) || !bbn.vars.regexp.ip.test(st)) {
4328
4343
  return false;
4329
4344
  }
4330
4345
  }
@@ -4332,7 +4347,7 @@ var bbn = (() => {
4332
4347
  };
4333
4348
  exports.isIP = isIP;
4334
4349
  });
4335
- define("fn/isHostname", ["require", "exports", "fn/isString", "fn/isIP"], function (require, exports, isString_26, isIP_1) {
4350
+ define("fn/isHostname", ["require", "exports", "fn/isString", "fn/isIP"], function (require, exports, isString_22, isIP_1) {
4336
4351
  "use strict";
4337
4352
  Object.defineProperty(exports, "__esModule", { value: true });
4338
4353
  exports.isHostname = void 0;
@@ -4340,10 +4355,10 @@ var bbn = (() => {
4340
4355
  if (!args.length)
4341
4356
  return false;
4342
4357
  for (let st of args) {
4343
- if (!(0, isString_26.isString)(st)) {
4358
+ if (!(0, isString_22.isString)(st)) {
4344
4359
  return false;
4345
4360
  }
4346
- if (!(0, isIP_1.isIP)(st) && !bbn.var.regexp.hostname.test(st)) {
4361
+ if (!(0, isIP_1.isIP)(st) && !bbn.vars.regexp.hostname.test(st)) {
4347
4362
  return false;
4348
4363
  }
4349
4364
  }
@@ -4351,16 +4366,16 @@ var bbn = (() => {
4351
4366
  };
4352
4367
  exports.isHostname = isHostname;
4353
4368
  });
4354
- define("fn/isInside", ["require", "exports", "fn/getAncestors", "fn/isString", "fn/each"], function (require, exports, getAncestors_1, isString_27, each_19) {
4369
+ define("fn/isInside", ["require", "exports", "fn/getAncestors", "fn/isString", "fn/each"], function (require, exports, getAncestors_1, isString_23, each_19) {
4355
4370
  "use strict";
4356
4371
  Object.defineProperty(exports, "__esModule", { value: true });
4357
4372
  exports.isInside = void 0;
4358
4373
  const isInside = function (ele, ancestor) {
4359
4374
  let ancestors = (0, getAncestors_1.getAncestors)(ele);
4360
4375
  if (ancestors.length) {
4361
- if ((0, isString_27.isString)(ancestor)) {
4376
+ if ((0, isString_23.isString)(ancestor)) {
4362
4377
  let ok = false;
4363
- (0, each_19.each)(ancestors, a => {
4378
+ (0, each_19.each)(ancestors, (a) => {
4364
4379
  if (a.matches && a.matches(ancestor)) {
4365
4380
  ok = true;
4366
4381
  return false;
@@ -4384,7 +4399,7 @@ var bbn = (() => {
4384
4399
  if (!args.length)
4385
4400
  return false;
4386
4401
  for (let a of args) {
4387
- if ((typeof a !== 'string') || !a.match(/^\d+(?:\.\d+)?%$/)) {
4402
+ if (typeof a !== 'string' || !a.match(/^\d+(?:\.\d+)?%$/)) {
4388
4403
  return false;
4389
4404
  }
4390
4405
  }
@@ -4400,7 +4415,7 @@ var bbn = (() => {
4400
4415
  if (!args.length)
4401
4416
  return false;
4402
4417
  for (let a of args) {
4403
- if ((a !== null) && ((typeof a == "object") || (typeof a == "function"))) {
4418
+ if (a !== null && (typeof a == 'object' || typeof a == 'function')) {
4404
4419
  return false;
4405
4420
  }
4406
4421
  }
@@ -4430,7 +4445,7 @@ var bbn = (() => {
4430
4445
  exports.isPropSize = void 0;
4431
4446
  const isPropSize = function (name) {
4432
4447
  let isTrue = false;
4433
- (0, each_20.each)(['width', 'height', 'gap', 'margin', 'padding', 'top', 'left', 'right', 'bottom'], a => {
4448
+ (0, each_20.each)(['width', 'height', 'gap', 'margin', 'padding', 'top', 'left', 'right', 'bottom'], (a) => {
4434
4449
  if (name.indexOf(a) !== -1) {
4435
4450
  isTrue = true;
4436
4451
  return false;
@@ -4448,7 +4463,7 @@ var bbn = (() => {
4448
4463
  if (!args.length)
4449
4464
  return false;
4450
4465
  for (let a of args) {
4451
- if ((typeof a !== 'string') ||
4466
+ if (typeof a !== 'string' ||
4452
4467
  !a.match(/^([1-2]\d{3})-((0[0-9])|(1[12]))-(([0-2][0-9])|(3[01]))(?:( [0-2][0-9]):([0-5][0-9]):([0-5][0-9]))?$/)) {
4453
4468
  return false;
4454
4469
  }
@@ -4481,7 +4496,7 @@ var bbn = (() => {
4481
4496
  if (!args.length)
4482
4497
  return false;
4483
4498
  for (let str of args) {
4484
- if (!bbn.var.regexp.url.test(str)) {
4499
+ if (!bbn.vars.regexp.url.test(str)) {
4485
4500
  return false;
4486
4501
  }
4487
4502
  }
@@ -4489,7 +4504,7 @@ var bbn = (() => {
4489
4504
  };
4490
4505
  exports.isURL = isURL;
4491
4506
  });
4492
- define("fn/isValidName", ["require", "exports", "fn/isString"], function (require, exports, isString_28) {
4507
+ define("fn/isValidName", ["require", "exports", "fn/isString"], function (require, exports, isString_24) {
4493
4508
  "use strict";
4494
4509
  Object.defineProperty(exports, "__esModule", { value: true });
4495
4510
  exports.isValidName = void 0;
@@ -4498,7 +4513,7 @@ var bbn = (() => {
4498
4513
  return false;
4499
4514
  }
4500
4515
  for (let arg of args) {
4501
- if (!(0, isString_28.isString)(arg) || !/^[$A-Z_][0-9A-Z_$]*$/i.test(arg)) {
4516
+ if (!(0, isString_24.isString)(arg) || !/^[$A-Z_][0-9A-Z_$]*$/i.test(arg)) {
4502
4517
  return false;
4503
4518
  }
4504
4519
  }
@@ -4514,23 +4529,23 @@ var bbn = (() => {
4514
4529
  if (!args.length) {
4515
4530
  return false;
4516
4531
  }
4517
- if (Object.hasOwn(bbn, 'vue')) {
4518
- if (bbn.vue.app) {
4532
+ if ('vue' in bbn && window['Vue']) {
4533
+ if ('app' in bbn.vue) {
4519
4534
  for (let a of args) {
4520
- if (!a || (typeof a.render !== 'function')) {
4535
+ if (!a || typeof a.render !== 'function') {
4521
4536
  return false;
4522
4537
  }
4523
4538
  }
4524
4539
  }
4525
4540
  else {
4526
4541
  for (let a of args) {
4527
- if (!(a instanceof Vue)) {
4542
+ if (!(a instanceof window['Vue'])) {
4528
4543
  return false;
4529
4544
  }
4530
4545
  }
4531
4546
  }
4532
4547
  }
4533
- if (Object.hasOwn(bbn, 'cp')) {
4548
+ if ('cp' in bbn && 'isComponent' in bbn['cp'] && (typeof bbn['cp'].isComponent === 'function')) {
4534
4549
  return bbn.cp.isComponent(...args);
4535
4550
  }
4536
4551
  return true;
@@ -4543,9 +4558,9 @@ var bbn = (() => {
4543
4558
  exports.lightenDarkenHex = void 0;
4544
4559
  const lightenDarkenHex = function (hex, amt) {
4545
4560
  if (hex && amt) {
4546
- let ht = hex[0] === "#";
4561
+ let ht = hex[0] === '#';
4547
4562
  hex = ht ? hex.slice(1) : hex;
4548
- let num = parseInt(hex, 16), r = (num >> 16) + amt, b = ((num >> 8) & 0x00FF) + amt, g = (num & 0x0000FF) + amt;
4563
+ let num = parseInt(hex, 16), r = (num >> 16) + amt, b = ((num >> 8) & 0x00ff) + amt, g = (num & 0x0000ff) + amt;
4549
4564
  if (r > 255) {
4550
4565
  r = 255;
4551
4566
  }
@@ -4569,42 +4584,42 @@ var bbn = (() => {
4569
4584
  };
4570
4585
  exports.lightenDarkenHex = lightenDarkenHex;
4571
4586
  });
4572
- define("fn/warning", ["require", "exports", "fn/log"], function (require, exports, log_19) {
4587
+ define("fn/warning", ["require", "exports", "fn/log"], function (require, exports, log_16) {
4573
4588
  "use strict";
4574
4589
  Object.defineProperty(exports, "__esModule", { value: true });
4575
4590
  exports.warning = void 0;
4576
4591
  const warning = function (message) {
4577
- const args = ["BBN: " + message];
4578
- args.unshift({
4579
- _bbn_console_mode: "warn",
4592
+ const args = ['BBN: ' + message];
4593
+ const obj = {
4594
+ _bbn_console_mode: 'warn',
4580
4595
  _bbn_console_level: 2,
4581
- _bbn_console_style: "color: #E64141; background: #F7E195; font-size: 14px"
4582
- });
4583
- log_19.log.apply(this, args);
4584
- return this;
4596
+ _bbn_console_style: 'color: #E64141; background: #F7E195; font-size: 14px',
4597
+ };
4598
+ args.unshift(obj);
4599
+ log_16.log.apply(this, args);
4585
4600
  };
4586
4601
  exports.warning = warning;
4587
4602
  });
4588
- define("fn/makeReactive", ["require", "exports", "fn/log", "fn/createObject", "fn/isSymbol", "fn/isNumber", "fn/isArray", "fn/warning", "fn/isFunction", "fn/isSame"], function (require, exports, log_20, createObject_2, isSymbol_1, isNumber_7, isArray_13, warning_1, isFunction_13, isSame_2) {
4603
+ define("fn/makeReactive", ["require", "exports", "fn/log", "fn/createObject", "fn/isSymbol", "fn/isNumber", "fn/isArray", "fn/warning", "fn/isFunction", "fn/isSame"], function (require, exports, log_17, createObject_2, isSymbol_1, isNumber_8, isArray_13, warning_1, isFunction_11, isSame_2) {
4589
4604
  "use strict";
4590
4605
  Object.defineProperty(exports, "__esModule", { value: true });
4591
4606
  exports.makeReactive = void 0;
4592
4607
  const makeReactive = function (obj, onSet, parent, parentProp) {
4593
4608
  const parentString = (parent === null || parent === void 0 ? void 0 : parent.$cid) || '';
4594
4609
  const prefix = '__bbn_' + (parentString ? parentString + '_' : '');
4595
- if (obj && (typeof obj === 'object') && [undefined, Object, Array].includes(obj.constructor)) {
4596
- if (obj.__bbnIsProxy && (obj.__bbnParent === parent)) {
4610
+ if (obj && typeof obj === 'object' && [undefined, Object, Array].includes(obj.constructor)) {
4611
+ if (obj.__bbnIsProxy && obj.__bbnParent === parent) {
4597
4612
  return obj;
4598
4613
  }
4599
- if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
4600
- (0, log_20.log)(["MAKING bbn-loadbar", obj]);
4614
+ if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
4615
+ (0, log_17.log)(['MAKING bbn-loadbar', obj]);
4601
4616
  }
4602
4617
  if (!obj.__bbnWatchers) {
4603
4618
  Reflect.defineProperty(obj, '__bbnWatchers', {
4604
4619
  value: (0, createObject_2.createObject)(),
4605
4620
  writable: true,
4606
4621
  configurable: true,
4607
- enumerable: false
4622
+ enumerable: false,
4608
4623
  });
4609
4624
  }
4610
4625
  const handler = {
@@ -4615,17 +4630,18 @@ var bbn = (() => {
4615
4630
  return Reflect.get(realTarget, key);
4616
4631
  }
4617
4632
  const propName = parentProp ? parentProp + '.' + key : key;
4618
- const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
4619
- if (['fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'].includes(key) && (0, isArray_13.isArray)(target)) {
4633
+ const hiddenKey = prefix + ((0, isNumber_8.isNumber)(key) ? key.toString() : key);
4634
+ if (['fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'].includes(key) &&
4635
+ (0, isArray_13.isArray)(target)) {
4620
4636
  return function (...args) {
4621
4637
  let res = realTarget[key](...args);
4622
- (0, warning_1.warning)("DOING ARRAY STUFF");
4623
- (0, log_20.log)(target.__bbnParent);
4638
+ (0, warning_1.warning)('DOING ARRAY STUFF');
4639
+ (0, log_17.log)(target.__bbnParent);
4624
4640
  onSet(target, 'length', parent);
4625
4641
  return res;
4626
4642
  };
4627
4643
  }
4628
- if ((0, isFunction_13.isFunction)(realValue)) {
4644
+ if ((0, isFunction_11.isFunction)(realValue)) {
4629
4645
  return realValue;
4630
4646
  }
4631
4647
  if (key === '__bbnRoot') {
@@ -4650,22 +4666,24 @@ var bbn = (() => {
4650
4666
  if (key.indexOf('__bbn_') === 0) {
4651
4667
  return Reflect.get(target, key);
4652
4668
  }
4653
- if ((key === 'length') && (0, isArray_13.isArray)(target.__bbnRoot || target)) {
4669
+ if (key === 'length' && (0, isArray_13.isArray)(target.__bbnRoot || target)) {
4654
4670
  return realTarget.length;
4655
4671
  }
4656
- if (!Object.hasOwn(target, key)) {
4672
+ if (!(key in target)) {
4657
4673
  return realValue;
4658
4674
  }
4659
- if (realValue && (typeof realValue === 'object') && [undefined, Object, Array].includes(realValue.constructor)) {
4660
- if (realValue.__bbnIsProxy && (realValue.__bbnParent === parent)) {
4675
+ if (realValue &&
4676
+ typeof realValue === 'object' &&
4677
+ [undefined, Object, Array].includes(realValue.constructor)) {
4678
+ if (realValue.__bbnIsProxy && realValue.__bbnParent === parent) {
4661
4679
  return realTarget[hiddenKey];
4662
4680
  }
4663
- if (!Object.hasOwn(realTarget, hiddenKey)) {
4681
+ if (!(hiddenKey in realTarget)) {
4664
4682
  Reflect.defineProperty(realTarget, hiddenKey, {
4665
4683
  value: makeReactive(realValue, onSet, parent, propName),
4666
4684
  writable: true,
4667
4685
  configurable: true,
4668
- enumerable: false
4686
+ enumerable: false,
4669
4687
  });
4670
4688
  }
4671
4689
  if (realTarget[hiddenKey].__bbnIsProxy && !realTarget.__bbnWatchers[parentString]) {
@@ -4684,8 +4702,8 @@ var bbn = (() => {
4684
4702
  if ((0, isSymbol_1.isSymbol)(key)) {
4685
4703
  return Reflect.get(target, key);
4686
4704
  }
4687
- if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
4688
- (0, log_20.log)(['Setting proxy prop in ' + parent.$options.name, target, key, value]);
4705
+ if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
4706
+ (0, log_17.log)(['Setting proxy prop in ' + parent.$options.name, target, key, value]);
4689
4707
  }
4690
4708
  if (!(0, isSame_2.isSame)(realTarget[key], value)) {
4691
4709
  if (key.indexOf('__bbn_') === 0) {
@@ -4693,25 +4711,34 @@ var bbn = (() => {
4693
4711
  value: makeReactive(value, onSet, parent, propName),
4694
4712
  writable: true,
4695
4713
  configurable: true,
4696
- enumerable: false
4714
+ enumerable: false,
4697
4715
  });
4698
4716
  }
4699
4717
  else {
4700
- if (value && (typeof value === 'object') && [undefined, Object, Array].includes(value.constructor)) {
4701
- const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
4718
+ if (value &&
4719
+ typeof value === 'object' &&
4720
+ [undefined, Object, Array].includes(value.constructor)) {
4721
+ const hiddenKey = prefix + ((0, isNumber_8.isNumber)(key) ? key.toString() : key);
4702
4722
  Reflect.defineProperty(realTarget, hiddenKey, {
4703
4723
  value: makeReactive(value, onSet, parent, propName),
4704
4724
  writable: true,
4705
4725
  configurable: true,
4706
- enumerable: false
4726
+ enumerable: false,
4707
4727
  });
4708
4728
  if (realTarget[hiddenKey].__bbnIsProxy && !realTarget.__bbnWatchers[parentString]) {
4709
4729
  realTarget.__bbnWatchers[parentString] = propName;
4710
4730
  }
4711
4731
  }
4712
4732
  }
4713
- if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
4714
- (0, log_20.log)(['Setting proxy prop in ' + parent.$options.name + ' ' + ((0, isNumber_7.isNumber)(key) ? key.toString() : key), value, target]);
4733
+ if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
4734
+ (0, log_17.log)([
4735
+ 'Setting proxy prop in ' +
4736
+ parent.$options.name +
4737
+ ' ' +
4738
+ ((0, isNumber_8.isNumber)(key) ? key.toString() : key),
4739
+ value,
4740
+ target,
4741
+ ]);
4715
4742
  }
4716
4743
  Reflect.set(realTarget, key, value);
4717
4744
  onSet(target, key, parent);
@@ -4721,16 +4748,16 @@ var bbn = (() => {
4721
4748
  defineProperty(target, key, description) {
4722
4749
  const realTarget = target;
4723
4750
  const propName = parentProp ? parentProp + '.' + key : key;
4724
- if ((key === '__bbnWatchers') || (0, isSymbol_1.isSymbol)(key) || (key.indexOf('__bbn_') === 0)) {
4751
+ if (key === '__bbnWatchers' || (0, isSymbol_1.isSymbol)(key) || key.indexOf('__bbn_') === 0) {
4725
4752
  Reflect.defineProperty(realTarget, key, description);
4726
4753
  }
4727
4754
  else {
4728
- const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
4755
+ const hiddenKey = prefix + ((0, isNumber_8.isNumber)(key) ? key.toString() : key);
4729
4756
  Reflect.defineProperty(realTarget, hiddenKey, {
4730
4757
  value: makeReactive(description.value, onSet, parent, propName),
4731
4758
  writable: true,
4732
4759
  configurable: true,
4733
- enumerable: false
4760
+ enumerable: false,
4734
4761
  });
4735
4762
  }
4736
4763
  onSet(target, key, parent);
@@ -4742,14 +4769,14 @@ var bbn = (() => {
4742
4769
  Reflect.deleteProperty(realTarget, key);
4743
4770
  }
4744
4771
  else {
4745
- const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
4772
+ const hiddenKey = prefix + ((0, isNumber_8.isNumber)(key) ? key.toString() : key);
4746
4773
  Reflect.deleteProperty(realTarget, hiddenKey);
4747
4774
  Reflect.deleteProperty(target, key);
4748
4775
  }
4749
4776
  return true;
4750
- }
4777
+ },
4751
4778
  };
4752
- return (new Proxy(obj, handler));
4779
+ return new Proxy(obj, handler);
4753
4780
  }
4754
4781
  return obj;
4755
4782
  };
@@ -4770,59 +4797,72 @@ var bbn = (() => {
4770
4797
  };
4771
4798
  exports.map = map;
4772
4799
  });
4773
- define("fn/money", ["require", "exports", "fn/isNumber"], function (require, exports, isNumber_8) {
4800
+ define("fn/money", ["require", "exports", "fn/isNumber"], function (require, exports, isNumber_9) {
4774
4801
  "use strict";
4775
4802
  Object.defineProperty(exports, "__esModule", { value: true });
4776
4803
  exports.money = void 0;
4777
4804
  const money = function (val, kilo, currency, novalue, decimal, thousands, precision) {
4778
4805
  /*
4779
- money(val, kilo){
4780
- let decimal = ',',
4781
- currency = '€',
4782
- thousands = ' ';
4783
- if ( (isNaN(val) || !val) ){
4784
- return '-';
4785
- }
4786
- if ( isNaN(val) || !val ){
4787
- return 0;
4788
- }
4789
- if ( kilo && val ){
4790
- val = val / 1000;
4791
- if ( currency ){
4792
- currency = 'K' + currency;
4806
+ money(val, kilo){
4807
+ let decimal = ',',
4808
+ currency = '€',
4809
+ thousands = ' ';
4810
+ if ( (isNaN(val) || !val) ){
4811
+ return '-';
4793
4812
  }
4794
- }
4795
- return parseFloat(val).toFixed(0).replace(/./g, function(c, i, a) {
4796
- if ( c === '.' ){
4797
- return decimal;
4813
+ if ( isNaN(val) || !val ){
4814
+ return 0;
4798
4815
  }
4799
- return i && ((a.length - i) % 3 === 0) ? thousands + c : c;
4800
- }) + ( currency ? ' ' + currency : '');
4801
- },
4802
-
4803
- */
4816
+ if ( kilo && val ){
4817
+ val = val / 1000;
4818
+ if ( currency ){
4819
+ currency = 'K' + currency;
4820
+ }
4821
+ }
4822
+ return parseFloat(val).toFixed(0).replace(/./g, function(c, i, a) {
4823
+ if ( c === '.' ){
4824
+ return decimal;
4825
+ }
4826
+ return i && ((a.length - i) % 3 === 0) ? thousands + c : c;
4827
+ }) + ( currency ? ' ' + currency : '');
4828
+ },
4829
+
4830
+ */
4804
4831
  if (!decimal) {
4805
- decimal = (decimal === undefined) && bbn.env.money && (bbn.env.money.decimal !== undefined) ? bbn.env.money.decimal : '.';
4832
+ decimal =
4833
+ decimal === undefined && bbn.env.money && bbn.env.money.decimal !== undefined ? bbn.env.money.decimal : '.';
4806
4834
  }
4807
4835
  if (!currency) {
4808
- currency = (currency === undefined) && bbn.env.money && (bbn.env.money.currency !== undefined) ? bbn.env.money.currency : '';
4836
+ currency =
4837
+ currency === undefined && bbn.env.money && bbn.env.money.currency !== undefined
4838
+ ? bbn.env.money.currency
4839
+ : '';
4809
4840
  }
4810
4841
  if (!thousands) {
4811
- thousands = (thousands === undefined) && bbn.env.money && (bbn.env.money.thousands !== undefined) ? bbn.env.money.thousands : ' ';
4842
+ thousands =
4843
+ thousands === undefined && bbn.env.money && bbn.env.money.thousands !== undefined
4844
+ ? bbn.env.money.thousands
4845
+ : ' ';
4812
4846
  }
4813
4847
  if (!precision) {
4814
- precision = (precision === undefined) && bbn.env.money && (bbn.env.money.precision !== undefined) ? bbn.env.money.precision : false;
4848
+ precision =
4849
+ precision === undefined && bbn.env.money && bbn.env.money.precision !== undefined
4850
+ ? bbn.env.money.precision
4851
+ : 0;
4815
4852
  }
4816
4853
  if (!kilo) {
4817
- kilo = (kilo === undefined) && bbn.env.money && (bbn.env.money.kilo !== undefined) ? bbn.env.money.kilo : false;
4854
+ kilo = kilo === undefined && bbn.env.money && bbn.env.money.kilo !== undefined ? bbn.env.money.kilo : false;
4818
4855
  }
4819
4856
  if (!novalue) {
4820
- novalue = (novalue === undefined) && bbn.env.money && (bbn.env.money.novalue !== undefined) ? bbn.env.money.novalue : false;
4857
+ novalue =
4858
+ novalue === undefined && bbn.env.money && bbn.env.money.novalue !== undefined
4859
+ ? bbn.env.money.novalue
4860
+ : false;
4821
4861
  }
4822
- if (!(0, isNumber_8.isNumber)(precision)) {
4862
+ if (!(0, isNumber_9.isNumber)(precision)) {
4823
4863
  precision = kilo ? 3 : 0;
4824
4864
  }
4825
- if (val === 0) {
4865
+ if ((val === 0) && (typeof precision === 'number') && (precision > 0)) {
4826
4866
  let res = val.toFixed(precision).replace('.', decimal);
4827
4867
  if (currency) {
4828
4868
  res += ' ' + (kilo ? 'K' + currency : currency);
@@ -4833,7 +4873,7 @@ var bbn = (() => {
4833
4873
  return novalue;
4834
4874
  }
4835
4875
  if (isNaN(val) || !val) {
4836
- return 0 + (currency ? (' ' + currency) : '');
4876
+ return 0 + (currency ? ' ' + currency : '');
4837
4877
  }
4838
4878
  if (kilo && val) {
4839
4879
  val = val / 1000;
@@ -4841,7 +4881,7 @@ var bbn = (() => {
4841
4881
  currency = 'K' + currency;
4842
4882
  }
4843
4883
  }
4844
- let v = parseFloat(val).toFixed(precision);
4884
+ let v = val.toFixed(precision);
4845
4885
  let decimalPosition = 0;
4846
4886
  let decimalIdx = 10000;
4847
4887
  if (v) {
@@ -4853,12 +4893,12 @@ var bbn = (() => {
4853
4893
  decimalPosition = v.length - decimalIdx;
4854
4894
  }
4855
4895
  }
4856
- return v.replace(/./g, function (c, i, a) {
4896
+ return (v.replace(/./g, function (c, i, a) {
4857
4897
  if (c === '.') {
4858
4898
  return decimal;
4859
4899
  }
4860
- return i && ((a.length - i - decimalPosition) % 3 === 0) && (i < decimalIdx) ? thousands + c : c;
4861
- }) + (currency ? ' ' + currency : '');
4900
+ return i && (a.length - i - decimalPosition) % 3 === 0 && i < decimalIdx ? thousands + c : c;
4901
+ }) + (currency ? ' ' + currency : ''));
4862
4902
  };
4863
4903
  exports.money = money;
4864
4904
  });
@@ -4869,7 +4909,7 @@ var bbn = (() => {
4869
4909
  const move = function (arr, fromIndex, toIndex) {
4870
4910
  if (toIndex >= arr.length) {
4871
4911
  let k = toIndex - arr.length;
4872
- while ((k--) + 1) {
4912
+ while (k-- + 1) {
4873
4913
  arr.push(undefined);
4874
4914
  }
4875
4915
  }
@@ -4883,17 +4923,17 @@ var bbn = (() => {
4883
4923
  Object.defineProperty(exports, "__esModule", { value: true });
4884
4924
  exports.multiorder = void 0;
4885
4925
  const multiorder = function (arr, orders) {
4886
- if (!Array.isArray(orders) && (typeof orders === 'object')) {
4887
- let tmp = [];
4926
+ let currentOrders;
4927
+ if (!Array.isArray(orders) && typeof orders === 'object') {
4928
+ currentOrders = [];
4888
4929
  for (var n in orders) {
4889
- tmp.push({ field: n, dir: orders[n] });
4930
+ currentOrders.push({ field: n, dir: orders[n] });
4890
4931
  }
4891
- orders = tmp;
4892
4932
  }
4893
4933
  let r = arr.slice();
4894
4934
  return r.sort((a, b) => {
4895
4935
  let res;
4896
- for (let order of orders) {
4936
+ for (let order of currentOrders) {
4897
4937
  res = (0, _compareValues_1._compareValues)(a, b, order.field, order.dir);
4898
4938
  if (res !== 0) {
4899
4939
  return res;
@@ -4909,15 +4949,15 @@ var bbn = (() => {
4909
4949
  Object.defineProperty(exports, "__esModule", { value: true });
4910
4950
  exports.nl2br = void 0;
4911
4951
  const nl2br = function (st, keepNl) {
4912
- return (0, replaceAll_5.replaceAll)("\n", "<br>" + (keepNl ? "\n" : ""), st);
4952
+ return (0, replaceAll_5.replaceAll)('\n', '<br>' + (keepNl ? '\n' : ''), st);
4913
4953
  };
4914
4954
  exports.nl2br = nl2br;
4915
4955
  });
4916
- define("fn/objectToFormData", ["require", "exports", "fn/isArray", "fn/each", "fn/isObject", "fn/iterate", "fn/isNull"], function (require, exports, isArray_15, each_21, isObject_18, iterate_8, isNull_3) {
4956
+ define("fn/objectToFormData", ["require", "exports", "fn/isArray", "fn/each", "fn/isObject", "fn/iterate", "fn/isNull"], function (require, exports, isArray_15, each_21, isObject_16, iterate_8, isNull_3) {
4917
4957
  "use strict";
4918
4958
  Object.defineProperty(exports, "__esModule", { value: true });
4919
4959
  exports.objectToFormData = void 0;
4920
- const objectToFormData = function (obj, key, ignoreList) {
4960
+ const objectToFormData = function (obj, key = '', ignoreList) {
4921
4961
  let formData = new FormData();
4922
4962
  let appendFormData = (data, key = '') => {
4923
4963
  if (!ignoreList || ((0, isArray_15.isArray)(ignoreList) && !ignoreList.includes(key))) {
@@ -4929,15 +4969,15 @@ var bbn = (() => {
4929
4969
  appendFormData(v, key + '[' + i + ']');
4930
4970
  });
4931
4971
  }
4932
- else if ((0, isObject_18.isObject)(data) && Object.keys(data).length) {
4972
+ else if ((0, isObject_16.isObject)(data) && Object.keys(data).length) {
4933
4973
  (0, iterate_8.iterate)(data, (v, i) => {
4934
- if (Object.hasOwn(data, i)) {
4974
+ if (i in data) {
4935
4975
  appendFormData(v, !key ? i : key + '[' + i + ']');
4936
4976
  }
4937
4977
  });
4938
4978
  }
4939
4979
  else {
4940
- if (!(0, isNull_3.isNull)(data) && (data !== undefined)) {
4980
+ if (!(0, isNull_3.isNull)(data) && data !== undefined) {
4941
4981
  formData.append(key, data);
4942
4982
  }
4943
4983
  }
@@ -4967,7 +5007,7 @@ var bbn = (() => {
4967
5007
  Object.defineProperty(exports, "__esModule", { value: true });
4968
5008
  exports.selector = void 0;
4969
5009
  const selector = function (ele) {
4970
- return (typeof el === 'string') ? document.querySelector(ele) : ele;
5010
+ return typeof ele === 'string' ? document.querySelector(ele) : ele;
4971
5011
  };
4972
5012
  exports.selector = selector;
4973
5013
  });
@@ -4977,10 +5017,11 @@ var bbn = (() => {
4977
5017
  exports.outerHeight = void 0;
4978
5018
  const outerHeight = function (ele) {
4979
5019
  ele = (0, selector_1.selector)(ele);
4980
- let styles = window.getComputedStyle(ele);
4981
- let margin = parseFloat(styles['marginTop']) +
4982
- parseFloat(styles['marginBottom']);
4983
- return Math.ceil(ele.offsetHeight + margin);
5020
+ if (ele && ('offsetHeight' in ele)) {
5021
+ let styles = window.getComputedStyle(ele);
5022
+ let margin = parseFloat(styles['marginTop']) + parseFloat(styles['marginBottom']);
5023
+ return Math.ceil(ele.offsetHeight + margin);
5024
+ }
4984
5025
  };
4985
5026
  exports.outerHeight = outerHeight;
4986
5027
  });
@@ -4991,8 +5032,7 @@ var bbn = (() => {
4991
5032
  const outerWidth = function (ele) {
4992
5033
  ele = (0, selector_2.selector)(ele);
4993
5034
  let styles = window.getComputedStyle(ele);
4994
- let margin = parseFloat(styles['marginLeft']) +
4995
- parseFloat(styles['marginRight']);
5035
+ let margin = parseFloat(styles['marginLeft']) + parseFloat(styles['marginRight']);
4996
5036
  return Math.ceil(ele.offsetWidth + margin);
4997
5037
  };
4998
5038
  exports.outerWidth = outerWidth;
@@ -5022,7 +5062,7 @@ var bbn = (() => {
5022
5062
  Object.defineProperty(exports, "__esModule", { value: true });
5023
5063
  exports.postOut = void 0;
5024
5064
  const postOut = function (url, data, success, target) {
5025
- let form = document.getElementById("bbn-form_out");
5065
+ let form = document.body.querySelector('form#bbn-form_out');
5026
5066
  if (!form) {
5027
5067
  form = document.createElement('form');
5028
5068
  form.classList.add('bbn-no');
@@ -5034,7 +5074,7 @@ var bbn = (() => {
5034
5074
  }
5035
5075
  form.innerHTML = '';
5036
5076
  form.setAttribute('action', url);
5037
- form.setAttribute('target', target || "_blank");
5077
+ form.setAttribute('target', target || '_blank');
5038
5078
  if (!data) {
5039
5079
  data = {};
5040
5080
  }
@@ -5057,9 +5097,7 @@ var bbn = (() => {
5057
5097
  const printf = function (format) {
5058
5098
  var args = Array.prototype.slice.call(arguments, 1);
5059
5099
  return format.replace(/{(\d+)}/g, function (match, number) {
5060
- return typeof args[number] != 'undefined'
5061
- ? args[number]
5062
- : match;
5100
+ return typeof args[number] != 'undefined' ? args[number] : match;
5063
5101
  });
5064
5102
  };
5065
5103
  exports.printf = printf;
@@ -5069,10 +5107,10 @@ var bbn = (() => {
5069
5107
  Object.defineProperty(exports, "__esModule", { value: true });
5070
5108
  exports.quotes2html = void 0;
5071
5109
  const quotes2html = function (st, type) {
5072
- if (!type || (type.toLowerCase().indexOf('s') === 0)) {
5073
- st = (0, replaceAll_6.replaceAll)("'", "&#39;", st);
5110
+ if (!type || type.toLowerCase().indexOf('s') === 0) {
5111
+ st = (0, replaceAll_6.replaceAll)("'", '&#39;', st);
5074
5112
  }
5075
- if (!type || (type.toLowerCase().indexOf('d') === 0)) {
5113
+ if (!type || type.toLowerCase().indexOf('d') === 0) {
5076
5114
  st = (0, replaceAll_6.replaceAll)('"', '&quot;', st);
5077
5115
  }
5078
5116
  return st;
@@ -5088,15 +5126,17 @@ var bbn = (() => {
5088
5126
  };
5089
5127
  exports.randomInt = randomInt;
5090
5128
  });
5091
- define("fn/randomString", ["require", "exports", "fn/randomInt", "fn/isString"], function (require, exports, randomInt_1, isString_29) {
5129
+ define("fn/randomString", ["require", "exports", "fn/randomInt"], function (require, exports, randomInt_1) {
5092
5130
  "use strict";
5093
5131
  Object.defineProperty(exports, "__esModule", { value: true });
5094
5132
  exports.randomString = void 0;
5095
5133
  const randomString = function (min, max, types) {
5096
- let length, type, chars = {
5134
+ let length;
5135
+ let type;
5136
+ let chars = {
5097
5137
  n: '0123456789',
5098
5138
  l: 'abcdefghijklmnopqrstuvwxyz',
5099
- u: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
5139
+ u: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
5100
5140
  };
5101
5141
  if (!types) {
5102
5142
  types = 'nlu';
@@ -5104,16 +5144,16 @@ var bbn = (() => {
5104
5144
  if (!min) {
5105
5145
  length = (0, randomInt_1.randomInt)(8, 14);
5106
5146
  }
5107
- if ((0, isString_29.isString)(max)) {
5147
+ if (typeof max === 'string') {
5108
5148
  types = 'n';
5109
- chars = {
5110
- n: max
5111
- };
5149
+ delete chars.l;
5150
+ delete chars.u;
5151
+ chars.n = max;
5112
5152
  if (!length) {
5113
5153
  length = min;
5114
5154
  }
5115
5155
  }
5116
- else if ((typeof (max) === 'number') && (min < max)) {
5156
+ else if (typeof max === 'number' && min < max) {
5117
5157
  length = (0, randomInt_1.randomInt)(min, max);
5118
5158
  }
5119
5159
  else if (min) {
@@ -5136,7 +5176,7 @@ var bbn = (() => {
5136
5176
  };
5137
5177
  exports.randomString = randomString;
5138
5178
  });
5139
- define("fn/removeEmpty", ["require", "exports", "fn/isArray", "fn/isObject", "fn/numProperties"], function (require, exports, isArray_16, isObject_19, numProperties_8) {
5179
+ define("fn/removeEmpty", ["require", "exports", "fn/isArray", "fn/isObject", "fn/numProperties"], function (require, exports, isArray_16, isObject_17, numProperties_7) {
5140
5180
  "use strict";
5141
5181
  Object.defineProperty(exports, "__esModule", { value: true });
5142
5182
  exports.removeEmpty = void 0;
@@ -5151,8 +5191,8 @@ var bbn = (() => {
5151
5191
  ok = true;
5152
5192
  }
5153
5193
  }
5154
- else if ((0, isObject_19.isObject)(arr[i])) {
5155
- if ((0, numProperties_8.numProperties)(arr[i])) {
5194
+ else if ((0, isObject_17.isObject)(arr[i])) {
5195
+ if ((0, numProperties_7.numProperties)(arr[i])) {
5156
5196
  ok = true;
5157
5197
  }
5158
5198
  }
@@ -5198,16 +5238,12 @@ var bbn = (() => {
5198
5238
  };
5199
5239
  exports.removeTrailingChars = removeTrailingChars;
5200
5240
  });
5201
- define("fn/repeat", ["require", "exports", "fn/iterate"], function (require, exports, iterate_9) {
5241
+ define("fn/repeat", ["require", "exports"], function (require, exports) {
5202
5242
  "use strict";
5203
5243
  Object.defineProperty(exports, "__esModule", { value: true });
5204
5244
  exports.repeat = void 0;
5205
5245
  const repeat = function (st, num) {
5206
- let res = '';
5207
- (0, iterate_9.iterate)(num, () => {
5208
- res += st;
5209
- });
5210
- return res;
5246
+ return st.repeat(num);
5211
5247
  };
5212
5248
  exports.repeat = repeat;
5213
5249
  });
@@ -5231,7 +5267,7 @@ var bbn = (() => {
5231
5267
  }
5232
5268
  else {
5233
5269
  // In IE 9 we need to use innerHTML of a temporary element
5234
- const div = document.createElement("div");
5270
+ const div = document.createElement('div');
5235
5271
  let child;
5236
5272
  div.innerHTML = html;
5237
5273
  fragment = document.createDocumentFragment();
@@ -5264,19 +5300,21 @@ var bbn = (() => {
5264
5300
  exports.rgb2hex = void 0;
5265
5301
  const rgb2hex = function (rgb) {
5266
5302
  rgb = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
5267
- return (rgb && rgb.length === 4) ? "#" +
5268
- ("0" + parseInt(rgb[1], 10).toString(16)).slice(-2) +
5269
- ("0" + parseInt(rgb[2], 10).toString(16)).slice(-2) +
5270
- ("0" + parseInt(rgb[3], 10).toString(16)).slice(-2) : '';
5303
+ return rgb && rgb.length === 4
5304
+ ? '#' +
5305
+ ('0' + parseInt(rgb[1], 10).toString(16)).slice(-2) +
5306
+ ('0' + parseInt(rgb[2], 10).toString(16)).slice(-2) +
5307
+ ('0' + parseInt(rgb[3], 10).toString(16)).slice(-2)
5308
+ : '';
5271
5309
  };
5272
5310
  exports.rgb2hex = rgb2hex;
5273
5311
  });
5274
- define("fn/riterate", ["require", "exports", "fn/iterate"], function (require, exports, iterate_10) {
5312
+ define("fn/riterate", ["require", "exports", "fn/iterate"], function (require, exports, iterate_9) {
5275
5313
  "use strict";
5276
5314
  Object.defineProperty(exports, "__esModule", { value: true });
5277
5315
  exports.riterate = void 0;
5278
5316
  const riterate = function (obj, fn, noPrivate) {
5279
- return (0, iterate_10.iterate)(obj, fn, noPrivate, true);
5317
+ return (0, iterate_9.iterate)(obj, fn, noPrivate, true);
5280
5318
  };
5281
5319
  exports.riterate = riterate;
5282
5320
  });
@@ -5285,7 +5323,7 @@ var bbn = (() => {
5285
5323
  Object.defineProperty(exports, "__esModule", { value: true });
5286
5324
  exports.roundDecimal = void 0;
5287
5325
  const roundDecimal = function (value, decimals) {
5288
- return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals);
5326
+ return Math.round(Math.pow(Math.pow(value, decimals), -decimals));
5289
5327
  };
5290
5328
  exports.roundDecimal = roundDecimal;
5291
5329
  });
@@ -5328,7 +5366,9 @@ var bbn = (() => {
5328
5366
  }
5329
5367
  exp += ']+';
5330
5368
  let re = new RegExp(exp, 'g');
5331
- let res = (0, removeAccents_3.removeAccents)(str).replace(/[^a-z0-9]/gi, separator).replace(re, separator);
5369
+ let res = (0, removeAccents_3.removeAccents)(str)
5370
+ .replace(/[^a-z0-9]/gi, separator)
5371
+ .replace(re, separator);
5332
5372
  return (0, trim_1.trim)(res, separator);
5333
5373
  };
5334
5374
  exports.sanitize = sanitize;
@@ -5353,7 +5393,7 @@ var bbn = (() => {
5353
5393
  sel.removeAllRanges();
5354
5394
  sel.addRange(range);
5355
5395
  }
5356
- else if (doc.body.createTextRange) {
5396
+ else if (('createTextRange' in doc.body) && (typeof doc.body.createTextRange === 'function')) {
5357
5397
  range = doc.body.createTextRange();
5358
5398
  range.moveToElementText(ele);
5359
5399
  range.select();
@@ -5366,14 +5406,14 @@ var bbn = (() => {
5366
5406
  Object.defineProperty(exports, "__esModule", { value: true });
5367
5407
  exports.setCookie = void 0;
5368
5408
  const setCookie = function (name, value, days) {
5369
- let expires = "";
5409
+ let expires = '';
5370
5410
  if (days) {
5371
5411
  let date = new Date();
5372
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
5373
- expires = "; expires=" + date.toUTCString();
5412
+ date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
5413
+ expires = '; expires=' + date.toUTCString();
5374
5414
  }
5375
5415
  let st = escape(JSON.stringify({ value: value }));
5376
- document.cookie = name + "=" + st + expires + "; path=/";
5416
+ document.cookie = name + '=' + st + expires + '; path=/';
5377
5417
  };
5378
5418
  exports.setCookie = setCookie;
5379
5419
  });
@@ -5385,7 +5425,8 @@ var bbn = (() => {
5385
5425
  if (varname.indexOf('--') !== 0) {
5386
5426
  varname = '--' + varname;
5387
5427
  }
5388
- document.documentElement.setProperty(varname, value);
5428
+ /** @todo To Fix */
5429
+ //document.documentElement.setProperty(varname, value);
5389
5430
  };
5390
5431
  exports.setCssVar = setCssVar;
5391
5432
  });
@@ -5394,12 +5435,10 @@ var bbn = (() => {
5394
5435
  Object.defineProperty(exports, "__esModule", { value: true });
5395
5436
  exports.setProp = void 0;
5396
5437
  const setProp = function (obj, prop, value, writable = true, configurable = true) {
5397
- checkType(prop, "string", bbn._("The prop must be a string in setProp"));
5398
- checkType(obj, "object", bbn._("The obj must be an object in setProp"));
5399
5438
  Object.defineProperty(obj, prop, {
5400
5439
  value: value,
5401
5440
  writable: writable,
5402
- configurable: configurable
5441
+ configurable: configurable,
5403
5442
  });
5404
5443
  };
5405
5444
  exports.setProp = setProp;
@@ -5409,13 +5448,13 @@ var bbn = (() => {
5409
5448
  Object.defineProperty(exports, "__esModule", { value: true });
5410
5449
  exports.setProperty = void 0;
5411
5450
  const setProperty = function (obj, prop, value, force) {
5412
- if ((typeof obj === 'object') && (typeof prop === 'string')) {
5451
+ if (typeof obj === 'object' && typeof prop === 'string') {
5413
5452
  let o = obj;
5414
5453
  const bits = prop.split('.');
5415
5454
  (0, each_22.each)(bits, (v, i) => {
5416
5455
  if (!o) {
5417
5456
  if (!force) {
5418
- throw new Error(bbn._("The object is invalid"));
5457
+ throw new Error(bbn._('The object is invalid'));
5419
5458
  }
5420
5459
  o = {};
5421
5460
  }
@@ -5430,16 +5469,16 @@ var bbn = (() => {
5430
5469
  };
5431
5470
  exports.setProperty = setProperty;
5432
5471
  });
5433
- define("fn/shorten", ["require", "exports", "fn/isString", "fn/substr"], function (require, exports, isString_30, substr_15) {
5472
+ define("fn/shorten", ["require", "exports", "fn/isString", "fn/substr"], function (require, exports, isString_25, substr_15) {
5434
5473
  "use strict";
5435
5474
  Object.defineProperty(exports, "__esModule", { value: true });
5436
5475
  exports.shorten = void 0;
5437
5476
  const shorten = function (st, len, adj) {
5438
- if (typeof (st).toLowerCase() === 'string') {
5477
+ if (typeof st.toLowerCase() === 'string') {
5439
5478
  if (!len) {
5440
- len = bbn.var.shortenLen;
5479
+ len = bbn.vars.shortenLen;
5441
5480
  }
5442
- if ((adj === undefined) || !(0, isString_30.isString)(adj)) {
5481
+ if (adj === undefined || !(0, isString_25.isString)(adj)) {
5443
5482
  adj = '...';
5444
5483
  }
5445
5484
  if (st.length > len) {
@@ -5450,17 +5489,17 @@ var bbn = (() => {
5450
5489
  };
5451
5490
  exports.shorten = shorten;
5452
5491
  });
5453
- define("fn/shortenObj", ["require", "exports", "fn/clone", "fn/each", "fn/isString", "fn/shorten"], function (require, exports, clone_1, each_23, isString_31, shorten_1) {
5492
+ define("fn/shortenObj", ["require", "exports", "fn/clone", "fn/each", "fn/isString", "fn/shorten"], function (require, exports, clone_1, each_23, isString_26, shorten_1) {
5454
5493
  "use strict";
5455
5494
  Object.defineProperty(exports, "__esModule", { value: true });
5456
5495
  exports.shortenObj = void 0;
5457
5496
  const shortenObj = function (obj, max = 100) {
5458
5497
  let o = (0, clone_1.clone)(obj);
5459
5498
  (0, each_23.each)(o, (a, n) => {
5460
- if ((0, isString_31.isString)(a) && (a.length > max)) {
5499
+ if ((0, isString_26.isString)(a) && a.length > max) {
5461
5500
  o[n] = (0, shorten_1.shorten)(a, max);
5462
5501
  }
5463
- else if (a && (typeof a === 'object')) {
5502
+ else if (a && typeof a === 'object') {
5464
5503
  o[n] = shortenObj(a);
5465
5504
  }
5466
5505
  });
@@ -5480,20 +5519,19 @@ var bbn = (() => {
5480
5519
  randomIndex = Math.floor(Math.random() * currentIndex);
5481
5520
  currentIndex--;
5482
5521
  // And swap it with the current element.
5483
- [array[currentIndex], array[randomIndex]] = [
5484
- array[randomIndex], array[currentIndex]
5485
- ];
5522
+ [array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]];
5486
5523
  }
5487
5524
  return array;
5488
5525
  };
5489
5526
  exports.shuffle = shuffle;
5490
5527
  });
5491
- define("fn/startChrono", ["require", "exports", "fn/each"], function (require, exports, each_24) {
5528
+ define("fn/chrono", ["require", "exports", "fn/each"], function (require, exports, each_24) {
5492
5529
  "use strict";
5493
5530
  Object.defineProperty(exports, "__esModule", { value: true });
5494
- exports.startChrono = void 0;
5531
+ exports.stopChrono = exports.startChrono = void 0;
5532
+ const _private = [];
5495
5533
  const startChrono = function (name) {
5496
- let now = (new Date()).getTime();
5534
+ let now = new Date().getTime();
5497
5535
  let h1 = 3600 * 1000;
5498
5536
  if (_private.length) {
5499
5537
  (0, each_24.each)(_private, (t, n) => {
@@ -5501,30 +5539,38 @@ var bbn = (() => {
5501
5539
  delete _private[n];
5502
5540
  }
5503
5541
  });
5504
- now = (new Date()).getTime();
5542
+ now = new Date().getTime();
5505
5543
  }
5506
5544
  _private[name] = now;
5507
5545
  };
5508
5546
  exports.startChrono = startChrono;
5547
+ const stopChrono = function (name) {
5548
+ if (_private[name]) {
5549
+ let now = new Date().getTime();
5550
+ let diff = now - _private[name];
5551
+ return diff;
5552
+ }
5553
+ };
5554
+ exports.stopChrono = stopChrono;
5509
5555
  });
5510
- define("fn/stat", ["require", "exports", "fn/getPath"], function (require, exports, getPath_1) {
5556
+ define("fn/stat", ["require", "exports"], function (require, exports) {
5511
5557
  "use strict";
5512
5558
  Object.defineProperty(exports, "__esModule", { value: true });
5513
5559
  exports.stat = void 0;
5514
5560
  const stat = function (returnStat) {
5515
5561
  return;
5562
+ /*
5516
5563
  if (bbn.env.logging) {
5517
- var logs = bbn.var.loggers;
5564
+ var logs = bbn.vars.loggers;
5518
5565
  for (var i = 0; i < arguments.length; i++) {
5519
- var a = arguments[i], type = typeof (a);
5520
- if ((type === 'boolean') || (type === 'undefined')) {
5566
+ var a = arguments[i],
5567
+ type = typeof a;
5568
+ if (type === 'boolean' || type === 'undefined') {
5521
5569
  break;
5522
- }
5523
- else {
5570
+ } else {
5524
5571
  if (type === 'object') {
5525
- a = (0, getPath_1.getPath)(a);
5526
- }
5527
- else {
5572
+ a = getPath(a);
5573
+ } else {
5528
5574
  a = a.toString();
5529
5575
  }
5530
5576
  if (!logs[a]) {
@@ -5557,22 +5603,10 @@ var bbn = (() => {
5557
5603
  }
5558
5604
  return returnStat;
5559
5605
  }
5606
+ */
5560
5607
  };
5561
5608
  exports.stat = stat;
5562
5609
  });
5563
- define("fn/stopChrono", ["require", "exports"], function (require, exports) {
5564
- "use strict";
5565
- Object.defineProperty(exports, "__esModule", { value: true });
5566
- exports.stopChrono = void 0;
5567
- const stopChrono = function (name) {
5568
- if (_private[name]) {
5569
- let now = (new Date()).getTime();
5570
- let diff = now - _private[name];
5571
- return diff;
5572
- }
5573
- };
5574
- exports.stopChrono = stopChrono;
5575
- });
5576
5610
  define("fn/string2ArrayBuffer", ["require", "exports"], function (require, exports) {
5577
5611
  "use strict";
5578
5612
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -5593,11 +5627,10 @@ var bbn = (() => {
5593
5627
  exports.sum = void 0;
5594
5628
  const sum = function (arr, numberProp, prop, val, operator) {
5595
5629
  let r = 0;
5596
- let isFunction = isFunction(numberProp);
5597
5630
  (0, each_25.each)((0, filter_5.filter)(arr, prop, val, operator), (a) => {
5598
- let tmp = isFunction ? numberProp(a) : a[numberProp];
5631
+ let tmp = typeof numberProp === 'function' ? numberProp(a) : a[numberProp];
5599
5632
  if (tmp) {
5600
- r += (parseFloat(tmp) || 0);
5633
+ r += parseFloat(tmp) || 0;
5601
5634
  }
5602
5635
  });
5603
5636
  return r;
@@ -5609,7 +5642,7 @@ var bbn = (() => {
5609
5642
  Object.defineProperty(exports, "__esModule", { value: true });
5610
5643
  exports.timestamp = void 0;
5611
5644
  const timestamp = function (seconds) {
5612
- var r = (new Date()).getTime();
5645
+ var r = new Date().getTime();
5613
5646
  return seconds ? Math.round(r / 1000) : r;
5614
5647
  };
5615
5648
  exports.timestamp = timestamp;
@@ -5649,7 +5682,7 @@ var bbn = (() => {
5649
5682
  }
5650
5683
  });
5651
5684
  if (i < total - 1) {
5652
- csvContent += rowSep + "\n";
5685
+ csvContent += rowSep + '\n';
5653
5686
  }
5654
5687
  });
5655
5688
  return csvContent;
@@ -5661,31 +5694,31 @@ var bbn = (() => {
5661
5694
  Object.defineProperty(exports, "__esModule", { value: true });
5662
5695
  exports.toggleFullScreen = void 0;
5663
5696
  const toggleFullScreen = function () {
5664
- if (window.document.documentElement.mozRequestFullScreen) {
5665
- if (window.document.mozFullScreen) {
5666
- window.document.mozCancelFullScreen();
5697
+ if ('mozRequestFullScreen' in window.document.documentElement) {
5698
+ if (window.document['mozFullScreen']) {
5699
+ window.document['mozCancelFullScreen']();
5667
5700
  }
5668
- else {
5701
+ else if (typeof window.document.documentElement.mozRequestFullScreen === 'function') {
5669
5702
  window.document.documentElement.mozRequestFullScreen();
5670
5703
  }
5671
5704
  }
5672
- else if (window.document.documentElement.webkitRequestFullScreen) {
5673
- if (window.document.webkitIsFullScreen) {
5674
- window.document.webkitCancelFullScreen();
5705
+ else if ('webkitRequestFullScreen' in window.document.documentElement) {
5706
+ if (window.document['webkitIsFullScreen']) {
5707
+ window.document['webkitCancelFullScreen']();
5675
5708
  }
5676
- else {
5709
+ else if (typeof window.document.documentElement.webkitRequestFullScreen === 'function') {
5677
5710
  window.document.documentElement.webkitRequestFullScreen();
5678
5711
  }
5679
5712
  }
5680
- else if (window.document.msRequestFullScreen) {
5681
- if (window.document.msFullscreenEnabled) {
5682
- window.document.msExitFullscreen();
5713
+ else if ('msRequestFullScreen' in window.document.documentElement) {
5714
+ if (window.document['msFullscreenEnabled']) {
5715
+ window.document['msExitFullscreen']();
5683
5716
  }
5684
- else {
5717
+ else if (typeof window.document.documentElement.msRequestFullScreen === 'function') {
5685
5718
  window.document.documentElement.msRequestFullScreen();
5686
5719
  }
5687
5720
  }
5688
- else if (window.document.requestFullscreen) {
5721
+ else if ('requestFullscreen' in window.document) {
5689
5722
  if (window.document.fullscreenEnabled) {
5690
5723
  window.document.exitFullscreen();
5691
5724
  }
@@ -5699,13 +5732,13 @@ var bbn = (() => {
5699
5732
  };
5700
5733
  exports.toggleFullScreen = toggleFullScreen;
5701
5734
  });
5702
- define("fn/translate", ["require", "exports", "fn/iterate"], function (require, exports, iterate_11) {
5735
+ define("fn/translate", ["require", "exports", "fn/iterate"], function (require, exports, iterate_10) {
5703
5736
  "use strict";
5704
5737
  Object.defineProperty(exports, "__esModule", { value: true });
5705
5738
  exports.translate = void 0;
5706
5739
  const translate = function (o, namespace) {
5707
5740
  let lng = namespace ? bbn.lng[namespace.indexOf('_') === 0 ? namespace : '_' + namespace] : bbn.lng;
5708
- (0, iterate_11.iterate)(o, (v, k) => {
5741
+ (0, iterate_10.iterate)(o, (v, k) => {
5709
5742
  lng[k] = v;
5710
5743
  });
5711
5744
  };
@@ -5721,7 +5754,7 @@ var bbn = (() => {
5721
5754
  if (!args[i]) {
5722
5755
  st += '__bbn_empty__';
5723
5756
  }
5724
- else if (typeof (args[i]) === 'object') {
5757
+ else if (typeof args[i] === 'object') {
5725
5758
  if ((0, isArray_18.isArray)(args[i])) {
5726
5759
  st += JSON.stringify(args[i]);
5727
5760
  }
@@ -5729,13 +5762,13 @@ var bbn = (() => {
5729
5762
  // An object with the same properties, even in different order, should produce the same answer
5730
5763
  let tmp = {};
5731
5764
  let ks = Object.keys(args[i]).sort();
5732
- (0, each_27.each)(ks, k => {
5765
+ (0, each_27.each)(ks, (k) => {
5733
5766
  tmp[k] = args[i][k];
5734
5767
  });
5735
5768
  st += JSON.stringify(tmp);
5736
5769
  }
5737
5770
  }
5738
- else if (typeof (args[i]) !== 'string') {
5771
+ else if (typeof args[i] !== 'string') {
5739
5772
  st += args[i].toString();
5740
5773
  }
5741
5774
  else {
@@ -5746,7 +5779,7 @@ var bbn = (() => {
5746
5779
  };
5747
5780
  exports.uniqString = uniqString;
5748
5781
  });
5749
- define("fn/upload", ["require", "exports", "fn/objectToFormData", "fn/log"], function (require, exports, objectToFormData_1, log_21) {
5782
+ define("fn/upload", ["require", "exports", "fn/objectToFormData", "fn/log"], function (require, exports, objectToFormData_1, log_18) {
5750
5783
  "use strict";
5751
5784
  Object.defineProperty(exports, "__esModule", { value: true });
5752
5785
  exports.upload = void 0;
@@ -5754,14 +5787,14 @@ var bbn = (() => {
5754
5787
  let fn = () => {
5755
5788
  return axios.post(url || bbn.env.path, (0, objectToFormData_1.objectToFormData)(file), {
5756
5789
  headers: {
5757
- 'Content-Type': 'multipart/form-data'
5790
+ 'Content-Type': 'multipart/form-data',
5758
5791
  },
5759
5792
  onUploadProgress(progressEvent) {
5760
5793
  if (progress) {
5761
5794
  let percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total);
5762
5795
  progress(percentCompleted, progressEvent.loaded, progressEvent.total);
5763
5796
  }
5764
- }
5797
+ },
5765
5798
  });
5766
5799
  };
5767
5800
  if (!success && !failure) {
@@ -5769,15 +5802,15 @@ var bbn = (() => {
5769
5802
  }
5770
5803
  else {
5771
5804
  return fn()
5772
- .then(res => {
5805
+ .then((res) => {
5773
5806
  if (success) {
5774
- (0, log_21.log)("SUCCESS", res);
5807
+ (0, log_18.log)('SUCCESS', res);
5775
5808
  success(res);
5776
5809
  }
5777
5810
  })
5778
- .catch(err => {
5811
+ .catch((err) => {
5779
5812
  if (failure) {
5780
- (0, log_21.log)("ERROR", err);
5813
+ (0, log_18.log)('ERROR', err);
5781
5814
  failure(err);
5782
5815
  }
5783
5816
  });
@@ -5785,7 +5818,7 @@ var bbn = (() => {
5785
5818
  };
5786
5819
  exports.upload = upload;
5787
5820
  });
5788
- define("index", ["require", "exports", "fn/_addLoader", "fn/_compareValues", "fn/_deleteLoader", "fn/abort", "fn/abortURL", "fn/addColors", "fn/addInputs", "fn/addStyle", "fn/adjustHeight", "fn/adjustSize", "fn/adjustWidth", "fn/ajax", "fn/analyzeFunction", "fn/animateCss", "fn/arrayBuffer2String", "fn/arrayFromProp", "fn/autoExtend", "fn/baseName", "fn/br2nl", "fn/calendar", "fn/callback", "fn/camelize", "fn/camelToCss", "fn/canvasToImage", "fn/center", "fn/checkProps", "fn/checkPropsDetails", "fn/checkPropsOrDie", "fn/checkType", "fn/circularReplacer", "fn/clone", "fn/colorToHex", "fn/compare", "fn/compareConditions", "fn/copy", "fn/correctCase", "fn/count", "fn/crc32", "fn/createObject", "fn/cssExists", "fn/date", "fn/dateSQL", "fn/daysInMonth", "fn/deepPath", "fn/defaultAjaxAbortFunction", "fn/defaultAjaxErrorFunction", "fn/defaultAlertFunction", "fn/defaultConfirmFunction", "fn/defaultEndLoadingFunction", "fn/defaultErrorFunction", "fn/defaultHistoryFunction", "fn/defaultLinkFunction", "fn/defaultPostLinkFunction", "fn/defaultPreLinkFunction", "fn/defaultResizeFunction", "fn/defaultStartLoadingFunction", "fn/deleteProp", "fn/diffObj", "fn/dirName", "fn/download", "fn/downloadContent", "fn/each", "fn/eraseCookie", "fn/error", "fn/escapeDquotes", "fn/escapeRegExp", "fn/escapeSquotes", "fn/escapeTicks", "fn/escapeUrl", "fn/extend", "fn/extendOut", "fn/fdate", "fn/fdatetime", "fn/fieldValue", "fn/fileExt", "fn/filter", "fn/filterToConditions", "fn/findAll", "fn/fori", "fn/forir", "fn/format", "fn/formatBytes", "fn/formatDate", "fn/formatSize", "fn/formdata", "fn/fromXml", "fn/ftime", "fn/getAllTags", "fn/getAncestors", "fn/getAttributes", "fn/getBrowserName", "fn/getBrowserVersion", "fn/getCookie", "fn/getCssVar", "fn/getDay", "fn/getDeviceType", "fn/getEventData", "fn/getField", "fn/getFieldValues", "fn/getHtml", "fn/getHTMLOfSelection", "fn/getLoader", "fn/getPath", "fn/getProp", "fn/getProperty", "fn/getRequestId", "fn/getRow", "fn/getScrollBarSize", "fn/getText", "fn/getTimeoff", "fn/happy", "fn/hash", "fn/hex2rgb", "fn/history", "fn/html2text", "fn/imageToCanvas", "fn/imgToBase64", "fn/info", "fn/init", "fn/isActiveInterface", "fn/isArray", "fn/isBlob", "fn/isBoolean", "fn/isCanvas", "fn/isColor", "fn/isComment", "fn/isCp", "fn/isDate", "fn/isDesktopDevice", "fn/isDimension", "fn/isDom", "fn/isEmail", "fn/isEmpty", "fn/isEvent", "fn/isFocused", "fn/isFunction", "fn/isHostname", "fn/isInside", "fn/isInt", "fn/isIP", "fn/isIterable", "fn/isMobile", "fn/isMobileDevice", "fn/isNull", "fn/isNumber", "fn/isObject", "fn/isPercent", "fn/isPrimitive", "fn/isPromise", "fn/isPropSize", "fn/isSame", "fn/isSQLDate", "fn/isString", "fn/isSymbol", "fn/isTabletDevice", "fn/isURL", "fn/isValidDimension", "fn/isValidName", "fn/isValue", "fn/isVue", "fn/iterate", "fn/lightenDarkenHex", "fn/link", "fn/log", "fn/makeReactive", "fn/map", "fn/md5", "fn/money", "fn/move", "fn/multiorder", "fn/nl2br", "fn/numProperties", "fn/objectToFormData", "fn/order", "fn/outerHeight", "fn/outerWidth", "fn/percent", "fn/pickValue", "fn/post", "fn/postOut", "fn/printf", "fn/quotes2html", "fn/randomInt", "fn/randomString", "fn/removeAccents", "fn/removeEmpty", "fn/removeExtraSpaces", "fn/removeHtmlComments", "fn/removePrivateProp", "fn/removeTrailingChars", "fn/repeat", "fn/replaceAll", "fn/replaceSelection", "fn/resize", "fn/rgb2hex", "fn/riterate", "fn/roundDecimal", "fn/sanitize", "fn/search", "fn/selectElementText", "fn/selector", "fn/setCookie", "fn/setCssVar", "fn/setNavigationVars", "fn/setProp", "fn/setProperty", "fn/shorten", "fn/shortenObj", "fn/shuffle", "fn/simpleHash", "fn/simpleHash1", "fn/simpleHash2", "fn/startChrono", "fn/stat", "fn/stopChrono", "fn/string2ArrayBuffer", "fn/submit", "fn/substr", "fn/sum", "fn/timestamp", "fn/toCSV", "fn/toggleFullScreen", "fn/translate", "fn/treatAjaxArguments", "fn/trim", "fn/uniqString", "fn/unique", "fn/upload", "fn/warning"], function (require, exports, _addLoader_2, _compareValues_3, _deleteLoader_2, abort_1, abortURL_1, addColors_2, addInputs_2, addStyle_1, adjustHeight_1, adjustSize_3, adjustWidth_1, ajax_4, analyzeFunction_1, animateCss_1, arrayBuffer2String_1, arrayFromProp_1, autoExtend_1, baseName_3, br2nl_1, calendar_1, callback_3, camelize_1, camelToCss_1, canvasToImage_2, center_1, checkProps_1, checkPropsDetails_3, checkPropsOrDie_1, checkType_3, circularReplacer_2, clone_2, colorToHex_1, compare_1, compareConditions_3, copy_1, correctCase_2, count_1, crc32_1, createObject_4, cssExists_1, date_7, dateSQL_1, daysInMonth_1, deepPath_1, defaultAjaxAbortFunction_2, defaultAjaxErrorFunction_3, defaultAlertFunction_2, defaultConfirmFunction_1, defaultEndLoadingFunction_2, defaultErrorFunction_1, defaultHistoryFunction_2, defaultLinkFunction_2, defaultPostLinkFunction_2, defaultPreLinkFunction_2, defaultResizeFunction_2, defaultStartLoadingFunction_2, deleteProp_1, diffObj_1, dirName_2, download_1, downloadContent_2, each_28, eraseCookie_1, error_4, escapeDquotes_1, escapeRegExp_3, escapeSquotes_1, escapeTicks_1, escapeUrl_1, extend_8, extendOut_1, fdate_2, fdatetime_2, fieldValue_2, fileExt_2, filter_6, filterToConditions_3, findAll_1, fori_1, forir_1, format_1, formatBytes_1, formatDate_1, formatSize_1, formdata_2, fromXml_1, ftime_1, getAllTags_1, getAncestors_2, getAttributes_1, getBrowserName_1, getBrowserVersion_1, getCookie_1, getCssVar_2, getDay_1, getDeviceType_1, getEventData_1, getField_1, getFieldValues_1, getHtml_1, getHTMLOfSelection_2, getLoader_4, getPath_2, getProp_1, getProperty_4, getRequestId_2, getRow_2, getScrollBarSize_1, getText_1, getTimeoff_1, happy_1, hash_2, hex2rgb_1, history_1, html2text_2, imageToCanvas_2, imgToBase64_1, info_1, init_1, isActiveInterface_1, isArray_19, isBlob_2, isBoolean_1, isCanvas_2, isColor_1, isComment_1, isCp_6, isDate_8, isDesktopDevice_1, isDimension_1, isDom_5, isEmail_1, isEmpty_2, isEvent_1, isFocused_1, isFunction_14, isHostname_1, isInside_1, isInt_2, isIP_2, isIterable_5, isMobile_2, isMobileDevice_2, isNull_4, isNumber_9, isObject_20, isPercent_1, isPrimitive_1, isPromise_1, isPropSize_1, isSame_3, isSQLDate_1, isString_32, isSymbol_2, isTabletDevice_3, isURL_1, isValidDimension_2, isValidName_1, isValue_2, isVue_1, iterate_12, lightenDarkenHex_1, link_2, log_22, makeReactive_1, map_1, md5_4, money_1, move_1, multiorder_1, nl2br_1, numProperties_9, objectToFormData_2, order_1, outerHeight_1, outerWidth_1, percent_1, pickValue_1, post_2, postOut_1, printf_1, quotes2html_1, randomInt_2, randomString_1, removeAccents_4, removeEmpty_1, removeExtraSpaces_1, removeHtmlComments_2, removePrivateProp_2, removeTrailingChars_1, repeat_1, replaceAll_8, replaceSelection_1, resize_3, rgb2hex_1, riterate_1, roundDecimal_1, sanitize_1, search_6, selectElementText_1, selector_3, setCookie_1, setCssVar_1, setNavigationVars_2, setProp_1, setProperty_1, shorten_2, shortenObj_1, shuffle_1, simpleHash_2, simpleHash1_2, simpleHash2_2, startChrono_1, stat_1, stopChrono_1, string2ArrayBuffer_1, submit_2, substr_16, sum_1, timestamp_1, toCSV_1, toggleFullScreen_1, translate_1, treatAjaxArguments_3, trim_2, uniqString_1, unique_2, upload_1, warning_2) {
5821
+ define("index", ["require", "exports", "fn/_addLoader", "fn/_compareValues", "fn/_deleteLoader", "fn/abort", "fn/abortURL", "fn/addColors", "fn/addInputs", "fn/addStyle", "fn/adjustHeight", "fn/adjustSize", "fn/adjustWidth", "fn/ajax", "fn/analyzeFunction", "fn/animateCss", "fn/arrayBuffer2String", "fn/arrayFromProp", "fn/autoExtend", "fn/baseName", "fn/br2nl", "fn/calendar", "fn/callback", "fn/camelize", "fn/camelToCss", "fn/canvasToImage", "fn/center", "fn/checkProps", "fn/checkPropsDetails", "fn/checkPropsOrDie", "fn/checkType", "fn/circularReplacer", "fn/clone", "fn/colorToHex", "fn/compare", "fn/compareConditions", "fn/copy", "fn/correctCase", "fn/count", "fn/crc32", "fn/createObject", "fn/cssExists", "fn/date", "fn/dateSQL", "fn/daysInMonth", "fn/deepPath", "fn/defaultAjaxAbortFunction", "fn/defaultAjaxErrorFunction", "fn/defaultAlertFunction", "fn/defaultConfirmFunction", "fn/defaultEndLoadingFunction", "fn/defaultErrorFunction", "fn/defaultHistoryFunction", "fn/defaultLinkFunction", "fn/defaultPostLinkFunction", "fn/defaultPreLinkFunction", "fn/defaultResizeFunction", "fn/defaultStartLoadingFunction", "fn/deleteProp", "fn/diffObj", "fn/dirName", "fn/download", "fn/downloadContent", "fn/each", "fn/eraseCookie", "fn/error", "fn/escapeDquotes", "fn/escapeRegExp", "fn/escapeSquotes", "fn/escapeTicks", "fn/escapeUrl", "fn/extend", "fn/extendOut", "fn/fdate", "fn/fdatetime", "fn/fieldValue", "fn/fileExt", "fn/filter", "fn/filterToConditions", "fn/findAll", "fn/fori", "fn/forir", "fn/format", "fn/formatBytes", "fn/formatDate", "fn/formatSize", "fn/formdata", "fn/fromXml", "fn/ftime", "fn/getAllTags", "fn/getAncestors", "fn/getAttributes", "fn/getBrowserName", "fn/getBrowserVersion", "fn/getCookie", "fn/getCssVar", "fn/getDay", "fn/getDeviceType", "fn/getEventData", "fn/getField", "fn/getFieldValues", "fn/getHtml", "fn/getHTMLOfSelection", "fn/getLoader", "fn/getPath", "fn/getProp", "fn/getProperty", "fn/getRequestId", "fn/getRow", "fn/getScrollBarSize", "fn/getText", "fn/getTimeoff", "fn/happy", "fn/hash", "fn/hex2rgb", "fn/history", "fn/html2text", "fn/imageToCanvas", "fn/imgToBase64", "fn/info", "fn/init", "fn/isActiveInterface", "fn/isArray", "fn/isBlob", "fn/isBoolean", "fn/isCanvas", "fn/isColor", "fn/isComment", "fn/isCp", "fn/isDate", "fn/isDesktopDevice", "fn/isDimension", "fn/isDom", "fn/isEmail", "fn/isEmpty", "fn/isEvent", "fn/isFocused", "fn/isFunction", "fn/isHostname", "fn/isInside", "fn/isInt", "fn/isIP", "fn/isIterable", "fn/isMobile", "fn/isMobileDevice", "fn/isNull", "fn/isNumber", "fn/isObject", "fn/isPercent", "fn/isPrimitive", "fn/isPromise", "fn/isPropSize", "fn/isSame", "fn/isSQLDate", "fn/isString", "fn/isSymbol", "fn/isTabletDevice", "fn/isURL", "fn/isValidDimension", "fn/isValidName", "fn/isValue", "fn/isVue", "fn/iterate", "fn/lightenDarkenHex", "fn/link", "fn/log", "fn/makeReactive", "fn/map", "fn/md5", "fn/money", "fn/move", "fn/multiorder", "fn/nl2br", "fn/numProperties", "fn/objectToFormData", "fn/order", "fn/outerHeight", "fn/outerWidth", "fn/percent", "fn/pickValue", "fn/post", "fn/postOut", "fn/printf", "fn/quotes2html", "fn/randomInt", "fn/randomString", "fn/removeAccents", "fn/removeEmpty", "fn/removeExtraSpaces", "fn/removeHtmlComments", "fn/removePrivateProp", "fn/removeTrailingChars", "fn/repeat", "fn/replaceAll", "fn/replaceSelection", "fn/resize", "fn/rgb2hex", "fn/riterate", "fn/roundDecimal", "fn/sanitize", "fn/search", "fn/selectElementText", "fn/selector", "fn/setCookie", "fn/setCssVar", "fn/setNavigationVars", "fn/setProp", "fn/setProperty", "fn/shorten", "fn/shortenObj", "fn/shuffle", "fn/simpleHash", "fn/simpleHash1", "fn/simpleHash2", "fn/chrono", "fn/stat", "fn/string2ArrayBuffer", "fn/submit", "fn/substr", "fn/sum", "fn/timestamp", "fn/toCSV", "fn/toggleFullScreen", "fn/translate", "fn/treatAjaxArguments", "fn/trim", "fn/uniqString", "fn/unique", "fn/upload", "fn/warning"], function (require, exports, _addLoader_2, _compareValues_3, _deleteLoader_2, abort_1, abortURL_1, addColors_2, addInputs_2, addStyle_1, adjustHeight_1, adjustSize_3, adjustWidth_1, ajax_4, analyzeFunction_1, animateCss_1, arrayBuffer2String_1, arrayFromProp_1, autoExtend_1, baseName_3, br2nl_1, calendar_1, callback_3, camelize_1, camelToCss_1, canvasToImage_1, center_1, checkProps_1, checkPropsDetails_3, checkPropsOrDie_1, checkType_5, circularReplacer_2, clone_2, colorToHex_1, compare_1, compareConditions_3, copy_1, correctCase_2, count_1, crc32_1, createObject_4, cssExists_1, date_8, dateSQL_1, daysInMonth_1, deepPath_1, defaultAjaxAbortFunction_2, defaultAjaxErrorFunction_3, defaultAlertFunction_2, defaultConfirmFunction_1, defaultEndLoadingFunction_2, defaultErrorFunction_2, defaultHistoryFunction_2, defaultLinkFunction_2, defaultPostLinkFunction_2, defaultPreLinkFunction_2, defaultResizeFunction_2, defaultStartLoadingFunction_2, deleteProp_1, diffObj_1, dirName_2, download_1, downloadContent_2, each_28, eraseCookie_1, error_4, escapeDquotes_1, escapeRegExp_3, escapeSquotes_1, escapeTicks_1, escapeUrl_1, extend_7, extendOut_1, fdate_2, fdatetime_2, fieldValue_2, fileExt_2, filter_6, filterToConditions_3, findAll_1, fori_1, forir_1, format_1, formatBytes_1, formatDate_1, formatSize_1, formdata_2, fromXml_1, ftime_1, getAllTags_1, getAncestors_2, getAttributes_1, getBrowserName_1, getBrowserVersion_1, getCookie_1, getCssVar_2, getDay_1, getDeviceType_1, getEventData_1, getField_1, getFieldValues_1, getHtml_1, getHTMLOfSelection_2, getLoader_4, getPath_1, getProp_1, getProperty_4, getRequestId_2, getRow_3, getScrollBarSize_1, getText_1, getTimeoff_1, happy_1, hash_2, hex2rgb_1, history_1, html2text_2, imageToCanvas_2, imgToBase64_1, info_1, init_1, isActiveInterface_1, isArray_19, isBlob_2, isBoolean_1, isCanvas_2, isColor_1, isComment_1, isCp_3, isDate_8, isDesktopDevice_1, isDimension_1, isDom_5, isEmail_1, isEmpty_2, isEvent_1, isFocused_1, isFunction_12, isHostname_1, isInside_1, isInt_2, isIP_2, isIterable_5, isMobile_2, isMobileDevice_2, isNull_4, isNumber_10, isObject_18, isPercent_1, isPrimitive_1, isPromise_1, isPropSize_1, isSame_3, isSQLDate_1, isString_27, isSymbol_2, isTabletDevice_3, isURL_1, isValidDimension_2, isValidName_1, isValue_2, isVue_1, iterate_11, lightenDarkenHex_1, link_2, log_19, makeReactive_1, map_1, md5_4, money_1, move_1, multiorder_1, nl2br_1, numProperties_8, objectToFormData_2, order_1, outerHeight_1, outerWidth_1, percent_1, pickValue_1, post_2, postOut_1, printf_1, quotes2html_1, randomInt_2, randomString_1, removeAccents_4, removeEmpty_1, removeExtraSpaces_1, removeHtmlComments_2, removePrivateProp_2, removeTrailingChars_1, repeat_1, replaceAll_8, replaceSelection_1, resize_3, rgb2hex_1, riterate_1, roundDecimal_1, sanitize_1, search_6, selectElementText_1, selector_3, setCookie_1, setCssVar_1, setNavigationVars_2, setProp_1, setProperty_1, shorten_2, shortenObj_1, shuffle_1, simpleHash_2, simpleHash1_2, simpleHash2_2, chrono_1, stat_1, string2ArrayBuffer_1, submit_2, substr_16, sum_1, timestamp_1, toCSV_1, toggleFullScreen_1, translate_1, treatAjaxArguments_3, trim_2, uniqString_1, unique_2, upload_1, warning_2) {
5789
5822
  "use strict";
5790
5823
  Object.defineProperty(exports, "__esModule", { value: true });
5791
5824
  exports.fn = exports.env = exports.vars = exports.app = exports.lng = exports._popups = exports.$ = exports._ = exports.opt = exports.version = void 0;
@@ -5801,10 +5834,9 @@ var bbn = (() => {
5801
5834
  * @param {String} st
5802
5835
  * @returns {String}
5803
5836
  */
5804
- const _ = (st) => {
5805
- bbn.fn.checkType(st, 'string', "Undeerscore function takes strings as arguments");
5837
+ const _ = (...args) => {
5838
+ let st = args.shift();
5806
5839
  let res = bbn.lng[st] || st;
5807
- let args = Array.prototype.slice.call(arguments, 1);
5808
5840
  if (args.length) {
5809
5841
  let i = 0;
5810
5842
  return res.replace(/\%([d|s])/g, (match, type) => {
@@ -5812,7 +5844,7 @@ var bbn = (() => {
5812
5844
  if (!tmp) {
5813
5845
  tmp = type === 'd' ? 0 : '';
5814
5846
  }
5815
- bbn.fn.checkType(tmp, type === 'd' ? 'number' : 'string', bbn._("The value you gave did not correspond, check the loggg"));
5847
+ (0, checkType_5.checkType)(tmp, type === 'd' ? 'number' : 'string', bbn._("The value you gave did not correspond, check the loggg"));
5816
5848
  return tmp;
5817
5849
  });
5818
5850
  }
@@ -5908,6 +5940,7 @@ var bbn = (() => {
5908
5940
  red: '#db3340',
5909
5941
  brown: '#8c6954'
5910
5942
  },
5943
+ reserved: ['abstract', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'continue', 'const', 'debugger', 'default', 'delete', 'do', 'double', 'else', 'enum', 'export', 'extends', 'false', 'final', 'finally', 'float', 'for', 'function', 'goto', 'if', 'implements', 'import', 'in', 'instanceof', 'int', 'interface', 'long', 'native', 'new', 'null', 'package', 'private', 'protected', 'public', 'return', 'short', 'static', 'super', 'switch', 'synchronized', 'this', 'throw', 'throws', 'transient', 'true', 'try', 'typeof', 'var', 'void', 'while', 'with'],
5911
5944
  mockText: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
5912
5945
  regexp: {
5913
5946
  url: new RegExp('^(https?:\\/\\/)?' + // protocol
@@ -5988,12 +6021,12 @@ var bbn = (() => {
5988
6021
  callback: callback_3.callback,
5989
6022
  camelize: camelize_1.camelize,
5990
6023
  camelToCss: camelToCss_1.camelToCss,
5991
- canvasToImage: canvasToImage_2.canvasToImage,
6024
+ canvasToImage: canvasToImage_1.canvasToImage,
5992
6025
  center: center_1.center,
5993
6026
  checkProps: checkProps_1.checkProps,
5994
6027
  checkPropsDetails: checkPropsDetails_3.checkPropsDetails,
5995
6028
  checkPropsOrDie: checkPropsOrDie_1.checkPropsOrDie,
5996
- checkType: checkType_3.checkType,
6029
+ checkType: checkType_5.checkType,
5997
6030
  circularReplacer: circularReplacer_2.circularReplacer,
5998
6031
  clone: clone_2.clone,
5999
6032
  colorToHex: colorToHex_1.colorToHex,
@@ -6005,7 +6038,7 @@ var bbn = (() => {
6005
6038
  crc32: crc32_1.crc32,
6006
6039
  createObject: createObject_4.createObject,
6007
6040
  cssExists: cssExists_1.cssExists,
6008
- date: date_7.date,
6041
+ date: date_8.date,
6009
6042
  dateSQL: dateSQL_1.dateSQL,
6010
6043
  daysInMonth: daysInMonth_1.daysInMonth,
6011
6044
  deepPath: deepPath_1.deepPath,
@@ -6014,7 +6047,7 @@ var bbn = (() => {
6014
6047
  defaultAlertFunction: defaultAlertFunction_2.defaultAlertFunction,
6015
6048
  defaultConfirmFunction: defaultConfirmFunction_1.defaultConfirmFunction,
6016
6049
  defaultEndLoadingFunction: defaultEndLoadingFunction_2.defaultEndLoadingFunction,
6017
- defaultErrorFunction: defaultErrorFunction_1.defaultErrorFunction,
6050
+ defaultErrorFunction: defaultErrorFunction_2.defaultErrorFunction,
6018
6051
  defaultHistoryFunction: defaultHistoryFunction_2.defaultHistoryFunction,
6019
6052
  defaultLinkFunction: defaultLinkFunction_2.defaultLinkFunction,
6020
6053
  defaultPostLinkFunction: defaultPostLinkFunction_2.defaultPostLinkFunction,
@@ -6034,7 +6067,7 @@ var bbn = (() => {
6034
6067
  escapeSquotes: escapeSquotes_1.escapeSquotes,
6035
6068
  escapeTicks: escapeTicks_1.escapeTicks,
6036
6069
  escapeUrl: escapeUrl_1.escapeUrl,
6037
- extend: extend_8.extend,
6070
+ extend: extend_7.extend,
6038
6071
  extendOut: extendOut_1.extendOut,
6039
6072
  fdate: fdate_2.fdate,
6040
6073
  fdatetime: fdatetime_2.fdatetime,
@@ -6067,11 +6100,11 @@ var bbn = (() => {
6067
6100
  getHtml: getHtml_1.getHtml,
6068
6101
  getHTMLOfSelection: getHTMLOfSelection_2.getHTMLOfSelection,
6069
6102
  getLoader: getLoader_4.getLoader,
6070
- getPath: getPath_2.getPath,
6103
+ getPath: getPath_1.getPath,
6071
6104
  getProp: getProp_1.getProp,
6072
6105
  getProperty: getProperty_4.getProperty,
6073
6106
  getRequestId: getRequestId_2.getRequestId,
6074
- getRow: getRow_2.getRow,
6107
+ getRow: getRow_3.getRow,
6075
6108
  getScrollBarSize: getScrollBarSize_1.getScrollBarSize,
6076
6109
  getText: getText_1.getText,
6077
6110
  getTimeoff: getTimeoff_1.getTimeoff,
@@ -6091,7 +6124,7 @@ var bbn = (() => {
6091
6124
  isCanvas: isCanvas_2.isCanvas,
6092
6125
  isColor: isColor_1.isColor,
6093
6126
  isComment: isComment_1.isComment,
6094
- isCp: isCp_6.isCp,
6127
+ isCp: isCp_3.isCp,
6095
6128
  isDate: isDate_8.isDate,
6096
6129
  isDesktopDevice: isDesktopDevice_1.isDesktopDevice,
6097
6130
  isDimension: isDimension_1.isDimension,
@@ -6100,7 +6133,7 @@ var bbn = (() => {
6100
6133
  isEmpty: isEmpty_2.isEmpty,
6101
6134
  isEvent: isEvent_1.isEvent,
6102
6135
  isFocused: isFocused_1.isFocused,
6103
- isFunction: isFunction_14.isFunction,
6136
+ isFunction: isFunction_12.isFunction,
6104
6137
  isHostname: isHostname_1.isHostname,
6105
6138
  isInside: isInside_1.isInside,
6106
6139
  isInt: isInt_2.isInt,
@@ -6109,15 +6142,15 @@ var bbn = (() => {
6109
6142
  isMobile: isMobile_2.isMobile,
6110
6143
  isMobileDevice: isMobileDevice_2.isMobileDevice,
6111
6144
  isNull: isNull_4.isNull,
6112
- isNumber: isNumber_9.isNumber,
6113
- isObject: isObject_20.isObject,
6145
+ isNumber: isNumber_10.isNumber,
6146
+ isObject: isObject_18.isObject,
6114
6147
  isPercent: isPercent_1.isPercent,
6115
6148
  isPrimitive: isPrimitive_1.isPrimitive,
6116
6149
  isPromise: isPromise_1.isPromise,
6117
6150
  isPropSize: isPropSize_1.isPropSize,
6118
6151
  isSame: isSame_3.isSame,
6119
6152
  isSQLDate: isSQLDate_1.isSQLDate,
6120
- isString: isString_32.isString,
6153
+ isString: isString_27.isString,
6121
6154
  isSymbol: isSymbol_2.isSymbol,
6122
6155
  isTabletDevice: isTabletDevice_3.isTabletDevice,
6123
6156
  isURL: isURL_1.isURL,
@@ -6125,10 +6158,10 @@ var bbn = (() => {
6125
6158
  isValidName: isValidName_1.isValidName,
6126
6159
  isValue: isValue_2.isValue,
6127
6160
  isVue: isVue_1.isVue,
6128
- iterate: iterate_12.iterate,
6161
+ iterate: iterate_11.iterate,
6129
6162
  lightenDarkenHex: lightenDarkenHex_1.lightenDarkenHex,
6130
6163
  link: link_2.link,
6131
- log: log_22.log,
6164
+ log: log_19.log,
6132
6165
  makeReactive: makeReactive_1.makeReactive,
6133
6166
  map: map_1.map,
6134
6167
  md5: md5_4.md5,
@@ -6136,7 +6169,7 @@ var bbn = (() => {
6136
6169
  move: move_1.move,
6137
6170
  multiorder: multiorder_1.multiorder,
6138
6171
  nl2br: nl2br_1.nl2br,
6139
- numProperties: numProperties_9.numProperties,
6172
+ numProperties: numProperties_8.numProperties,
6140
6173
  objectToFormData: objectToFormData_2.objectToFormData,
6141
6174
  order: order_1.order,
6142
6175
  outerHeight: outerHeight_1.outerHeight,
@@ -6177,9 +6210,9 @@ var bbn = (() => {
6177
6210
  simpleHash: simpleHash_2.simpleHash,
6178
6211
  simpleHash1: simpleHash1_2.simpleHash1,
6179
6212
  simpleHash2: simpleHash2_2.simpleHash2,
6180
- startChrono: startChrono_1.startChrono,
6213
+ startChrono: chrono_1.startChrono,
6181
6214
  stat: stat_1.stat,
6182
- stopChrono: stopChrono_1.stopChrono,
6215
+ stopChrono: chrono_1.stopChrono,
6183
6216
  string2ArrayBuffer: string2ArrayBuffer_1.string2ArrayBuffer,
6184
6217
  submit: submit_2.submit,
6185
6218
  substr: substr_16.substr,