@bbn/bbn 1.0.14 → 1.0.16
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.
- package/dist/bundle.d.ts +33 -33
- package/dist/bundle.js +1341 -555
- package/dist/fn/_addLoader.js +12 -4
- package/dist/fn/_compareValues.js +2 -2
- package/dist/fn/_deleteLoader.js +0 -1
- package/dist/fn/abort.js +12 -3
- package/dist/fn/abortURL.js +0 -1
- package/dist/fn/addColors.js +9 -2
- package/dist/fn/addInputs.js +9 -2
- package/dist/fn/addStyle.js +7 -3
- package/dist/fn/adjustSize.js +19 -6
- package/dist/fn/ajax.js +16 -6
- package/dist/fn/analyzeFunction.js +10 -1
- package/dist/fn/animateCss.js +8 -2
- package/dist/fn/arrayBuffer2String.js +3 -1
- package/dist/fn/arrayFromProp.js +7 -1
- package/dist/fn/autoExtend.js +2 -1
- package/dist/fn/br2nl.js +3 -1
- package/dist/fn/calendar.js +8 -2
- package/dist/fn/callback.js +4 -3
- package/dist/fn/camelToCss.js +7 -1
- package/dist/fn/canvasToImage.js +5 -1
- package/dist/fn/center.js +12 -1
- package/dist/fn/checkProps.js +3 -1
- package/dist/fn/checkPropsDetails.js +4 -2
- package/dist/fn/checkType.js +0 -1
- package/dist/fn/clone.js +3 -1
- package/dist/fn/colorToHex.js +5 -1
- package/dist/fn/compare.js +28 -15
- package/dist/fn/compareConditions.js +1 -0
- package/dist/fn/copy.js +8 -2
- package/dist/fn/correctCase.js +3 -1
- package/dist/fn/count.js +3 -1
- package/dist/fn/crc32.js +1 -1
- package/dist/fn/cssExists.js +2 -0
- package/dist/fn/dateSQL.js +6 -3
- package/dist/fn/deepPath.js +9 -7
- package/dist/fn/defaultAjaxAbortFunction.js +3 -1
- package/dist/fn/defaultAjaxErrorFunction.d.ts +1 -1
- package/dist/fn/defaultAjaxErrorFunction.js +15 -2
- package/dist/fn/defaultAlertFunction.d.ts +1 -1
- package/dist/fn/defaultAlertFunction.js +5 -1
- package/dist/fn/defaultEndLoadingFunction.d.ts +1 -1
- package/dist/fn/defaultEndLoadingFunction.js +19 -1
- package/dist/fn/defaultErrorFunction.js +3 -1
- package/dist/fn/defaultHistoryFunction.js +3 -1
- package/dist/fn/defaultLinkFunction.js +3 -1
- package/dist/fn/defaultPostLinkFunction.js +3 -1
- package/dist/fn/defaultPreLinkFunction.d.ts +1 -1
- package/dist/fn/defaultPreLinkFunction.js +11 -1
- package/dist/fn/defaultResizeFunction.js +3 -1
- package/dist/fn/defaultStartLoadingFunction.d.ts +1 -1
- package/dist/fn/defaultStartLoadingFunction.js +14 -1
- package/dist/fn/deleteProp.js +5 -2
- package/dist/fn/diffObj.js +20 -5
- package/dist/fn/download.js +4 -1
- package/dist/fn/downloadContent.js +12 -1
- package/dist/fn/eraseCookie.js +3 -1
- package/dist/fn/error.js +5 -1
- package/dist/fn/escapeRegExp.js +3 -1
- package/dist/fn/escapeUrl.js +3 -1
- package/dist/fn/extend.js +6 -2
- package/dist/fn/fdate.js +1 -0
- package/dist/fn/fdatetime.js +10 -2
- package/dist/fn/filter.js +10 -6
- package/dist/fn/filterToConditions.js +8 -2
- package/dist/fn/findAll.js +5 -3
- package/dist/fn/format.js +5 -2
- package/dist/fn/formatDate.js +3 -1
- package/dist/fn/formdata.js +7 -2
- package/dist/fn/ftime.js +3 -1
- package/dist/fn/getAllTags.js +3 -1
- package/dist/fn/getAttributes.js +3 -1
- package/dist/fn/getBrowserName.js +20 -10
- package/dist/fn/getBrowserVersion.js +21 -10
- package/dist/fn/getEventData.js +26 -7
- package/dist/fn/getField.js +1 -2
- package/dist/fn/getLoader.d.ts +1 -1
- package/dist/fn/getLoader.js +0 -1
- package/dist/fn/getPath.js +14 -3
- package/dist/fn/getProp.js +5 -2
- package/dist/fn/getRequestId.js +5 -3
- package/dist/fn/getScrollBarSize.d.ts +1 -1
- package/dist/fn/getScrollBarSize.js +4 -2
- package/dist/fn/getText.js +3 -1
- package/dist/fn/getTimeoff.js +0 -1
- package/dist/fn/happy.js +8 -1
- package/dist/fn/hash.js +2 -1
- package/dist/fn/hex2rgb.js +8 -1
- package/dist/fn/history.js +3 -1
- package/dist/fn/html2text.js +6 -1
- package/dist/fn/imageToCanvas.js +7 -1
- package/dist/fn/imgToBase64.js +4 -1
- package/dist/fn/info.js +9 -1
- package/dist/fn/init.js +70 -13
- package/dist/fn/isActiveInterface.js +0 -1
- package/dist/fn/isArray.d.ts +1 -1
- package/dist/fn/isArray.js +3 -3
- package/dist/fn/isBlob.d.ts +1 -1
- package/dist/fn/isBlob.js +3 -3
- package/dist/fn/isBoolean.d.ts +1 -1
- package/dist/fn/isBoolean.js +3 -3
- package/dist/fn/isCanvas.d.ts +1 -1
- package/dist/fn/isCanvas.js +3 -3
- package/dist/fn/isComment.d.ts +1 -1
- package/dist/fn/isComment.js +3 -3
- package/dist/fn/isCp.d.ts +1 -1
- package/dist/fn/isCp.js +3 -4
- package/dist/fn/isDate.d.ts +1 -1
- package/dist/fn/isDate.js +3 -3
- package/dist/fn/isDesktopDevice.js +3 -1
- package/dist/fn/isDom.d.ts +1 -1
- package/dist/fn/isDom.js +3 -3
- package/dist/fn/isEvent.d.ts +1 -1
- package/dist/fn/isEvent.js +3 -3
- package/dist/fn/isFocused.js +3 -1
- package/dist/fn/isFunction.d.ts +1 -1
- package/dist/fn/isFunction.js +3 -3
- package/dist/fn/isHostname.d.ts +1 -1
- package/dist/fn/isHostname.js +10 -6
- package/dist/fn/isIP.d.ts +1 -1
- package/dist/fn/isIP.js +10 -4
- package/dist/fn/isInside.js +6 -4
- package/dist/fn/isInt.d.ts +1 -1
- package/dist/fn/isInt.js +3 -3
- package/dist/fn/isIterable.js +3 -1
- package/dist/fn/isMobile.js +3 -1
- package/dist/fn/isMobileDevice.js +3 -1
- package/dist/fn/isNull.d.ts +1 -1
- package/dist/fn/isNull.js +3 -3
- package/dist/fn/isNumber.d.ts +1 -1
- package/dist/fn/isNumber.js +3 -3
- package/dist/fn/isObject.d.ts +1 -1
- package/dist/fn/isObject.js +3 -3
- package/dist/fn/isPercent.d.ts +1 -1
- package/dist/fn/isPercent.js +3 -3
- package/dist/fn/isPrimitive.d.ts +1 -1
- package/dist/fn/isPrimitive.js +3 -3
- package/dist/fn/isPromise.d.ts +1 -1
- package/dist/fn/isPromise.js +3 -3
- package/dist/fn/isPropSize.js +10 -4
- package/dist/fn/isSQLDate.d.ts +1 -1
- package/dist/fn/isSQLDate.js +5 -4
- package/dist/fn/isSame.js +7 -4
- package/dist/fn/isSymbol.d.ts +1 -1
- package/dist/fn/isSymbol.js +3 -3
- package/dist/fn/isTabletDevice.js +3 -1
- package/dist/fn/isURL.d.ts +1 -1
- package/dist/fn/isURL.js +10 -2
- package/dist/fn/isValidDimension.js +3 -1
- package/dist/fn/isValidName.d.ts +1 -1
- package/dist/fn/isValidName.js +3 -3
- package/dist/fn/isValue.d.ts +1 -1
- package/dist/fn/isValue.js +3 -3
- package/dist/fn/isVue.d.ts +1 -1
- package/dist/fn/isVue.js +5 -6
- package/dist/fn/iterate.js +5 -3
- package/dist/fn/link.js +24 -4
- package/dist/fn/log.js +0 -1
- package/dist/fn/makeReactive.js +47 -11
- package/dist/fn/md5.js +12 -3
- package/dist/fn/money.js +26 -1
- package/dist/fn/nl2br.js +3 -1
- package/dist/fn/objectToFormData.js +8 -4
- package/dist/fn/order.js +3 -1
- package/dist/fn/percent.js +3 -1
- package/dist/fn/pickValue.js +5 -3
- package/dist/fn/post.js +8 -3
- package/dist/fn/printf.js +8 -1
- package/dist/fn/randomInt.js +3 -1
- package/dist/fn/randomString.js +9 -2
- package/dist/fn/removeAccents.js +0 -1
- package/dist/fn/removeExtraSpaces.js +3 -1
- package/dist/fn/repeat.js +7 -1
- package/dist/fn/replaceSelection.js +6 -0
- package/dist/fn/resize.js +0 -1
- package/dist/fn/riterate.js +3 -1
- package/dist/fn/roundDecimal.js +3 -1
- package/dist/fn/search.js +17 -3
- package/dist/fn/selector.js +3 -1
- package/dist/fn/setNavigationVars.js +20 -3
- package/dist/fn/setProp.js +9 -2
- package/dist/fn/setProperty.js +0 -1
- package/dist/fn/shorten.js +0 -1
- package/dist/fn/shuffle.js +6 -1
- package/dist/fn/simpleHash.js +5 -1
- package/dist/fn/simpleHash1.js +1 -1
- package/dist/fn/simpleHash2.js +1 -1
- package/dist/fn/startChrono.js +5 -3
- package/dist/fn/stat.js +3 -2
- package/dist/fn/stopChrono.js +7 -5
- package/dist/fn/string2ArrayBuffer.js +1 -1
- package/dist/fn/submit.js +12 -2
- package/dist/fn/substr.js +0 -1
- package/dist/fn/sum.js +11 -3
- package/dist/fn/timestamp.js +4 -1
- package/dist/fn/toggleFullScreen.js +3 -1
- package/dist/fn/translate.js +6 -2
- package/dist/fn/treatAjaxArguments.js +8 -1
- package/dist/fn/uniqString.d.ts +1 -1
- package/dist/fn/uniqString.js +14 -11
- package/dist/fn/unique.js +5 -1
- package/dist/fn/upload.js +20 -10
- package/dist/fn/warning.js +10 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"use strict";
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
31
|
exports.isInt = void 0;
|
|
32
|
-
const isInt = function () {
|
|
33
|
-
if (!
|
|
32
|
+
const isInt = function (...args) {
|
|
33
|
+
if (!args.length)
|
|
34
34
|
return false;
|
|
35
|
-
for (let a of
|
|
35
|
+
for (let a of args) {
|
|
36
36
|
if (!Number.isInteger(a)) {
|
|
37
37
|
return false;
|
|
38
38
|
}
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"use strict";
|
|
46
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
47
|
exports.isFunction = void 0;
|
|
48
|
-
const isFunction = function () {
|
|
49
|
-
if (!
|
|
48
|
+
const isFunction = function (...args) {
|
|
49
|
+
if (!args.length)
|
|
50
50
|
return false;
|
|
51
|
-
for (let obj of
|
|
51
|
+
for (let obj of args) {
|
|
52
52
|
if (!(obj && obj.constructor && obj.call && obj.apply)) {
|
|
53
53
|
return false;
|
|
54
54
|
}
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
};
|
|
58
58
|
exports.isFunction = isFunction;
|
|
59
59
|
});
|
|
60
|
-
define("fn/log", ["require", "exports", "
|
|
60
|
+
define("fn/log", ["require", "exports", "fn/isFunction"], function (require, exports, isFunction_1) {
|
|
61
61
|
"use strict";
|
|
62
62
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
63
63
|
exports.log = void 0;
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
}
|
|
77
77
|
args.shift();
|
|
78
78
|
}
|
|
79
|
-
if (
|
|
79
|
+
if (bbn.env.loggingLevel >= level) {
|
|
80
80
|
let i = 0;
|
|
81
81
|
while (i < args.length) {
|
|
82
82
|
let t = typeof args[i];
|
|
@@ -94,14 +94,14 @@
|
|
|
94
94
|
};
|
|
95
95
|
exports.log = log;
|
|
96
96
|
});
|
|
97
|
-
define("fn/substr", ["require", "exports", "
|
|
97
|
+
define("fn/substr", ["require", "exports", "fn/isString", "fn/isInt", "fn/log"], function (require, exports, isString_1, isInt_1, log_1) {
|
|
98
98
|
"use strict";
|
|
99
99
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
100
100
|
exports.substr = void 0;
|
|
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(
|
|
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;
|
|
@@ -113,13 +113,16 @@
|
|
|
113
113
|
};
|
|
114
114
|
exports.substr = substr;
|
|
115
115
|
});
|
|
116
|
-
define("fn/_addLoader", ["require", "exports", "
|
|
116
|
+
define("fn/_addLoader", ["require", "exports", "fn/substr"], function (require, exports, substr_1) {
|
|
117
117
|
"use strict";
|
|
118
118
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
119
119
|
exports._addLoader = void 0;
|
|
120
120
|
const _addLoader = function (requestId, prom, source) {
|
|
121
|
-
|
|
121
|
+
/** @var {Number} tst Current timestamp */
|
|
122
|
+
let tst = (new Date()).getTime();
|
|
123
|
+
/** @var {String} url The original URL (part of requestId before : and md5) */
|
|
122
124
|
let url = (0, substr_1.substr)(requestId, 0, requestId.length - 33);
|
|
125
|
+
/** @var {Object} loader The loader object */
|
|
123
126
|
let loader = {
|
|
124
127
|
key: requestId,
|
|
125
128
|
url: url,
|
|
@@ -130,15 +133,21 @@
|
|
|
130
133
|
abort: false,
|
|
131
134
|
errorMessage: false,
|
|
132
135
|
success: false,
|
|
133
|
-
start: tst
|
|
136
|
+
start: tst
|
|
134
137
|
};
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
// Adding the loader in bbn.env.loaders
|
|
139
|
+
bbn.env.loaders.push(loader);
|
|
140
|
+
// Adding an object with this loader info in bbn.env.loadersHistory
|
|
141
|
+
bbn.env.loadersHistory.unshift(loader);
|
|
142
|
+
/** @var {Number} idx A pointer starting at the end of array loadersHistory */
|
|
143
|
+
let idx = bbn.env.loadersHistory.length;
|
|
144
|
+
// Removing elements from the loadersHistory object if their number is higher
|
|
145
|
+
// than bbn.env.maxLoadersHistory
|
|
146
|
+
while (idx && (bbn.env.loadersHistory.length > bbn.env.maxLoadersHistory)) {
|
|
139
147
|
idx--;
|
|
140
|
-
|
|
141
|
-
|
|
148
|
+
// Not removing the ones still loading
|
|
149
|
+
if (!bbn.env.loadersHistory.loading) {
|
|
150
|
+
bbn.env.loadersHistory.splice(idx, 1);
|
|
142
151
|
}
|
|
143
152
|
}
|
|
144
153
|
return tst;
|
|
@@ -161,7 +170,7 @@
|
|
|
161
170
|
};
|
|
162
171
|
exports.getProperty = getProperty;
|
|
163
172
|
});
|
|
164
|
-
define("fn/removeAccents", ["require", "exports", "
|
|
173
|
+
define("fn/removeAccents", ["require", "exports", "fn/isString", "fn/log"], function (require, exports, isString_2, log_2) {
|
|
165
174
|
"use strict";
|
|
166
175
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
167
176
|
exports.removeAccents = void 0;
|
|
@@ -172,7 +181,7 @@
|
|
|
172
181
|
}
|
|
173
182
|
else {
|
|
174
183
|
(0, log_2.log)(st);
|
|
175
|
-
throw new Error(
|
|
184
|
+
throw new Error(bbn._("removeAccent expects a string"));
|
|
176
185
|
}
|
|
177
186
|
}
|
|
178
187
|
return st.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
|
@@ -183,10 +192,10 @@
|
|
|
183
192
|
"use strict";
|
|
184
193
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
185
194
|
exports.isDate = void 0;
|
|
186
|
-
const isDate = function () {
|
|
187
|
-
if (!
|
|
195
|
+
const isDate = function (...args) {
|
|
196
|
+
if (!args.length)
|
|
188
197
|
return false;
|
|
189
|
-
for (let a of
|
|
198
|
+
for (let a of args) {
|
|
190
199
|
if ({}.toString.apply(a) !== '[object Date]') {
|
|
191
200
|
return false;
|
|
192
201
|
}
|
|
@@ -200,8 +209,8 @@
|
|
|
200
209
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
201
210
|
exports._compareValues = void 0;
|
|
202
211
|
const _compareValues = function (a, b, prop, dir = 'asc') {
|
|
203
|
-
let va = (0, getProperty_1.getProperty)(a, prop), vb = (0, getProperty_1.getProperty)(b, prop), ta = (typeof va).toLowerCase(), tb = (typeof vb).toLowerCase();
|
|
204
|
-
if (dir !== 'asc' && (0, isString_3.isString)(dir) && dir.toLowerCase() === 'desc') {
|
|
212
|
+
let va = (0, getProperty_1.getProperty)(a, prop), vb = (0, getProperty_1.getProperty)(b, prop), ta = (typeof (va)).toLowerCase(), tb = (typeof (vb)).toLowerCase();
|
|
213
|
+
if ((dir !== 'asc') && (0, isString_3.isString)(dir) && (dir.toLowerCase() === 'desc')) {
|
|
205
214
|
dir = 'desc';
|
|
206
215
|
}
|
|
207
216
|
if (ta !== tb) {
|
|
@@ -240,17 +249,19 @@
|
|
|
240
249
|
"use strict";
|
|
241
250
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
242
251
|
exports.isIterable = void 0;
|
|
243
|
-
const isIterable = function (v) {
|
|
252
|
+
const isIterable = function (v) {
|
|
253
|
+
return v && (typeof v === 'object') && (Symbol.iterator in Object(v));
|
|
254
|
+
};
|
|
244
255
|
exports.isIterable = isIterable;
|
|
245
256
|
});
|
|
246
257
|
define("fn/isArray", ["require", "exports"], function (require, exports) {
|
|
247
258
|
"use strict";
|
|
248
259
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
249
260
|
exports.isArray = void 0;
|
|
250
|
-
const isArray = function () {
|
|
251
|
-
if (!
|
|
261
|
+
const isArray = function (...args) {
|
|
262
|
+
if (!args.length)
|
|
252
263
|
return false;
|
|
253
|
-
for (let a of
|
|
264
|
+
for (let a of args) {
|
|
254
265
|
if (!Array.isArray(a)) {
|
|
255
266
|
return false;
|
|
256
267
|
}
|
|
@@ -263,10 +274,10 @@
|
|
|
263
274
|
"use strict";
|
|
264
275
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
265
276
|
exports.isNumber = void 0;
|
|
266
|
-
const isNumber = function () {
|
|
267
|
-
if (!
|
|
277
|
+
const isNumber = function (...args) {
|
|
278
|
+
if (!args.length)
|
|
268
279
|
return false;
|
|
269
|
-
for (let a of
|
|
280
|
+
for (let a of args) {
|
|
270
281
|
if (['boolean', 'object', 'symbol'].includes(typeof a) || (a === '') || isNaN(a)) {
|
|
271
282
|
return false;
|
|
272
283
|
}
|
|
@@ -308,9 +319,11 @@
|
|
|
308
319
|
if (reverse) {
|
|
309
320
|
iter.reverse();
|
|
310
321
|
}
|
|
311
|
-
(0, each_1.each)(iter, prop => {
|
|
312
|
-
|
|
313
|
-
|
|
322
|
+
(0, each_1.each)(iter, prop => {
|
|
323
|
+
if (fn(obj[prop], prop) === false) {
|
|
324
|
+
return false;
|
|
325
|
+
}
|
|
326
|
+
});
|
|
314
327
|
}
|
|
315
328
|
return obj;
|
|
316
329
|
};
|
|
@@ -378,10 +391,10 @@
|
|
|
378
391
|
"use strict";
|
|
379
392
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
380
393
|
exports.isNull = void 0;
|
|
381
|
-
const isNull = function () {
|
|
382
|
-
if (!
|
|
394
|
+
const isNull = function (...args) {
|
|
395
|
+
if (!args.length)
|
|
383
396
|
return false;
|
|
384
|
-
for (let a of
|
|
397
|
+
for (let a of args) {
|
|
385
398
|
if ({}.toString.apply(a) !== '[object Null]') {
|
|
386
399
|
return false;
|
|
387
400
|
}
|
|
@@ -394,10 +407,10 @@
|
|
|
394
407
|
"use strict";
|
|
395
408
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
396
409
|
exports.isObject = void 0;
|
|
397
|
-
const isObject = function () {
|
|
398
|
-
if (!
|
|
410
|
+
const isObject = function (...args) {
|
|
411
|
+
if (!args.length)
|
|
399
412
|
return false;
|
|
400
|
-
for (let a of
|
|
413
|
+
for (let a of args) {
|
|
401
414
|
if ({}.toString.apply(a) !== '[object Object]') {
|
|
402
415
|
return false;
|
|
403
416
|
}
|
|
@@ -410,10 +423,10 @@
|
|
|
410
423
|
"use strict";
|
|
411
424
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
412
425
|
exports.isDom = void 0;
|
|
413
|
-
const isDom = function () {
|
|
414
|
-
if (!
|
|
426
|
+
const isDom = function (...args) {
|
|
427
|
+
if (!args.length)
|
|
415
428
|
return false;
|
|
416
|
-
for (let a of
|
|
429
|
+
for (let a of args) {
|
|
417
430
|
if (!(a instanceof HTMLElement)) {
|
|
418
431
|
return false;
|
|
419
432
|
}
|
|
@@ -422,19 +435,19 @@
|
|
|
422
435
|
};
|
|
423
436
|
exports.isDom = isDom;
|
|
424
437
|
});
|
|
425
|
-
define("fn/isCp", ["require", "exports", "
|
|
438
|
+
define("fn/isCp", ["require", "exports", "fn/isDom"], function (require, exports, isDom_1) {
|
|
426
439
|
"use strict";
|
|
427
440
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
428
441
|
exports.isCp = void 0;
|
|
429
|
-
const isCp = function () {
|
|
430
|
-
if (!
|
|
442
|
+
const isCp = function (...args) {
|
|
443
|
+
if (!args.length) {
|
|
431
444
|
return false;
|
|
432
445
|
}
|
|
433
|
-
if (!Object.hasOwn(
|
|
446
|
+
if (!Object.hasOwn(bbn, 'cp')) {
|
|
434
447
|
return false;
|
|
435
448
|
}
|
|
436
|
-
for (let a of
|
|
437
|
-
let res =
|
|
449
|
+
for (let a of args) {
|
|
450
|
+
let res = bbn.cp.isComponent(a);
|
|
438
451
|
if (!res || (0, isDom_1.isDom)(res) || !res.$el) {
|
|
439
452
|
return false;
|
|
440
453
|
}
|
|
@@ -487,7 +500,7 @@
|
|
|
487
500
|
for (let i = 0; i < str.length; i++) {
|
|
488
501
|
const char = str.charCodeAt(i);
|
|
489
502
|
hash = ((hash << 5) - hash) + char;
|
|
490
|
-
hash |= 0;
|
|
503
|
+
hash |= 0; // Convert to 32-bit integer
|
|
491
504
|
}
|
|
492
505
|
return hash;
|
|
493
506
|
};
|
|
@@ -502,7 +515,7 @@
|
|
|
502
515
|
for (let i = 0; i < str.length; i++) {
|
|
503
516
|
const char = str.charCodeAt(i);
|
|
504
517
|
hash = char + (hash << 6) + (hash << 16) - hash;
|
|
505
|
-
hash |= 0;
|
|
518
|
+
hash |= 0; // Convert to 32-bit integer
|
|
506
519
|
}
|
|
507
520
|
return hash;
|
|
508
521
|
};
|
|
@@ -512,14 +525,19 @@
|
|
|
512
525
|
"use strict";
|
|
513
526
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
514
527
|
exports.simpleHash = void 0;
|
|
515
|
-
const simpleHash = function (str) {
|
|
528
|
+
const simpleHash = function (str) {
|
|
529
|
+
const part1 = (0, simpleHash1_1.simpleHash1)(str).toString(16).padStart(8, '0');
|
|
530
|
+
const part2 = (0, simpleHash2_1.simpleHash2)(str).toString(16).padStart(8, '0');
|
|
531
|
+
return part1 + part2;
|
|
532
|
+
};
|
|
516
533
|
exports.simpleHash = simpleHash;
|
|
517
534
|
});
|
|
518
|
-
define("fn/hash", ["require", "exports", "fn/
|
|
535
|
+
define("fn/hash", ["require", "exports", "fn/log", "fn/isDom", "fn/isCp", "fn/circularReplacer", "fn/simpleHash"], function (require, exports, log_4, isDom_3, isCp_2, circularReplacer_1, simpleHash_1) {
|
|
519
536
|
"use strict";
|
|
520
537
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
521
538
|
exports.hash = void 0;
|
|
522
539
|
const hash = function (obj) {
|
|
540
|
+
//log(obj);
|
|
523
541
|
let st = '__bbn__';
|
|
524
542
|
for (let i in arguments) {
|
|
525
543
|
if (arguments[i]) {
|
|
@@ -563,6 +581,7 @@
|
|
|
563
581
|
}
|
|
564
582
|
if (obj1 && obj2 && (typeof (obj1) === 'object') && (typeof (obj2) === 'object')) {
|
|
565
583
|
let tmp1 = Object.keys(obj1).sort(), tmp2 = Object.keys(obj2).sort();
|
|
584
|
+
// Case where the keys are different
|
|
566
585
|
if ((0, hash_1.hash)(tmp1) !== (0, hash_1.hash)(tmp2)) {
|
|
567
586
|
return false;
|
|
568
587
|
}
|
|
@@ -573,10 +592,12 @@
|
|
|
573
592
|
}
|
|
574
593
|
done.push(obj1);
|
|
575
594
|
}
|
|
576
|
-
(0, each_2.each)(tmp1, a => {
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
595
|
+
(0, each_2.each)(tmp1, a => {
|
|
596
|
+
if (!isSame(obj1[a], obj2[a])) {
|
|
597
|
+
ok = false;
|
|
598
|
+
return false;
|
|
599
|
+
}
|
|
600
|
+
});
|
|
580
601
|
return ok;
|
|
581
602
|
}
|
|
582
603
|
return false;
|
|
@@ -593,13 +614,16 @@
|
|
|
593
614
|
case "=":
|
|
594
615
|
case "equal":
|
|
595
616
|
case "eq":
|
|
596
|
-
case "is":
|
|
617
|
+
case "is":
|
|
618
|
+
return v1 === v2;
|
|
597
619
|
case "!==":
|
|
598
620
|
case "notequal":
|
|
599
621
|
case "neq":
|
|
600
|
-
case "isnot":
|
|
622
|
+
case "isnot":
|
|
623
|
+
return v1 !== v2;
|
|
601
624
|
case "!=":
|
|
602
|
-
case "different":
|
|
625
|
+
case "different":
|
|
626
|
+
return v1 != v2;
|
|
603
627
|
case "contains":
|
|
604
628
|
case "contain":
|
|
605
629
|
case "icontains":
|
|
@@ -650,21 +674,31 @@
|
|
|
650
674
|
}
|
|
651
675
|
return (0, removeAccents_2.removeAccents)(v1).toLowerCase() === (0, removeAccents_2.removeAccents)(v2).toLowerCase();
|
|
652
676
|
case "gt":
|
|
653
|
-
case ">":
|
|
677
|
+
case ">":
|
|
678
|
+
return v1 > v2;
|
|
654
679
|
case "gte":
|
|
655
|
-
case ">=":
|
|
680
|
+
case ">=":
|
|
681
|
+
return v1 >= v2;
|
|
656
682
|
case "lt":
|
|
657
|
-
case "<":
|
|
683
|
+
case "<":
|
|
684
|
+
return v1 < v2;
|
|
658
685
|
case "lte":
|
|
659
|
-
case "<=":
|
|
660
|
-
|
|
661
|
-
case "
|
|
662
|
-
|
|
663
|
-
case "
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
686
|
+
case "<=":
|
|
687
|
+
return v1 <= v2;
|
|
688
|
+
case "isnull":
|
|
689
|
+
return v1 === null;
|
|
690
|
+
case "isnotnull":
|
|
691
|
+
return v1 !== null;
|
|
692
|
+
case "isempty":
|
|
693
|
+
return v1 === '';
|
|
694
|
+
case "isnotempty":
|
|
695
|
+
return v1 !== '';
|
|
696
|
+
case '==':
|
|
697
|
+
if ((0, isObject_1.isObject)(v1, v2)) {
|
|
698
|
+
return (0, isSame_1.isSame)(v1, v2);
|
|
699
|
+
}
|
|
700
|
+
default:
|
|
701
|
+
return v1 == v2;
|
|
668
702
|
}
|
|
669
703
|
};
|
|
670
704
|
exports.compare = compare;
|
|
@@ -691,6 +725,7 @@
|
|
|
691
725
|
if (bits.length) {
|
|
692
726
|
(0, each_3.each)(bits, b => data = data[b]);
|
|
693
727
|
}
|
|
728
|
+
// Case where both are undefined: value and prop which doesn't exist; they are not the same!
|
|
694
729
|
if (((0, getProperty_2.getProperty)(data, prop) === undefined) && (a.value !== undefined)) {
|
|
695
730
|
compare = false;
|
|
696
731
|
}
|
|
@@ -726,10 +761,16 @@
|
|
|
726
761
|
tmp.push(filterToConditions(a));
|
|
727
762
|
}
|
|
728
763
|
else {
|
|
729
|
-
tmp.push({
|
|
764
|
+
tmp.push({
|
|
765
|
+
field: n,
|
|
766
|
+
operator: operator || '=',
|
|
767
|
+
value: a
|
|
768
|
+
});
|
|
730
769
|
}
|
|
731
770
|
});
|
|
732
|
-
filter = {
|
|
771
|
+
filter = {
|
|
772
|
+
conditions: tmp
|
|
773
|
+
};
|
|
733
774
|
}
|
|
734
775
|
if (!filter.logic) {
|
|
735
776
|
filter.logic = 'AND';
|
|
@@ -738,13 +779,13 @@
|
|
|
738
779
|
};
|
|
739
780
|
exports.filterToConditions = filterToConditions;
|
|
740
781
|
});
|
|
741
|
-
define("fn/search", ["require", "exports", "
|
|
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) {
|
|
742
783
|
"use strict";
|
|
743
784
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
744
785
|
exports.search = void 0;
|
|
745
786
|
const search = function (arr, prop, val, operator, startFrom) {
|
|
746
787
|
if (!(0, isIterable_2.isIterable)(arr)) {
|
|
747
|
-
throw new Error(
|
|
788
|
+
throw new Error(bbn._("The first argument for a search should be iterable") + " " + (typeof arr) + " " + bbn._("given"));
|
|
748
789
|
}
|
|
749
790
|
if (!arr.length) {
|
|
750
791
|
return -1;
|
|
@@ -752,11 +793,26 @@
|
|
|
752
793
|
let filter = {};
|
|
753
794
|
let isFunction = false;
|
|
754
795
|
if ((0, isString_4.isString)(prop)) {
|
|
755
|
-
filter.conditions = [{
|
|
796
|
+
filter.conditions = [{
|
|
797
|
+
field: prop,
|
|
798
|
+
value: val,
|
|
799
|
+
operator: operator || '='
|
|
800
|
+
}];
|
|
756
801
|
}
|
|
757
802
|
else if (!prop) {
|
|
758
803
|
isFunction = true;
|
|
759
|
-
filter = a => {
|
|
804
|
+
filter = a => {
|
|
805
|
+
return (0, compareConditions_1.compareConditions)({ value: a }, (0, filterToConditions_1.filterToConditions)({
|
|
806
|
+
logic: 'AND',
|
|
807
|
+
conditions: [
|
|
808
|
+
{
|
|
809
|
+
field: 'value',
|
|
810
|
+
operator: operator || '=',
|
|
811
|
+
value: val
|
|
812
|
+
}
|
|
813
|
+
]
|
|
814
|
+
}));
|
|
815
|
+
};
|
|
760
816
|
}
|
|
761
817
|
else {
|
|
762
818
|
startFrom = operator;
|
|
@@ -810,15 +866,15 @@
|
|
|
810
866
|
};
|
|
811
867
|
exports.getRow = getRow;
|
|
812
868
|
});
|
|
813
|
-
define("fn/_deleteLoader", ["require", "exports", "
|
|
869
|
+
define("fn/_deleteLoader", ["require", "exports", "fn/search", "fn/getRow", "fn/isObject"], function (require, exports, search_2, getRow_1, isObject_4) {
|
|
814
870
|
"use strict";
|
|
815
871
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
816
872
|
exports._deleteLoader = void 0;
|
|
817
873
|
const _deleteLoader = function (requestId, res, isAbort) {
|
|
818
|
-
let idx = (0, search_2.search)(
|
|
874
|
+
let idx = (0, search_2.search)(bbn.env.loaders, { key: requestId });
|
|
819
875
|
if (idx > -1) {
|
|
820
|
-
let loader =
|
|
821
|
-
let history = (0, getRow_1.getRow)(
|
|
876
|
+
let loader = bbn.env.loaders.splice(idx, 1)[0];
|
|
877
|
+
let history = (0, getRow_1.getRow)(bbn.env.loadersHistory, { key: requestId, start: loader.start });
|
|
822
878
|
if (history) {
|
|
823
879
|
history.loading = false;
|
|
824
880
|
history.duration = (new Date()).getTime() - loader.start;
|
|
@@ -837,14 +893,14 @@
|
|
|
837
893
|
};
|
|
838
894
|
exports._deleteLoader = _deleteLoader;
|
|
839
895
|
});
|
|
840
|
-
define("fn/getLoader", ["require", "exports", "
|
|
896
|
+
define("fn/getLoader", ["require", "exports", "fn/search"], function (require, exports, search_3) {
|
|
841
897
|
"use strict";
|
|
842
898
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
843
899
|
exports.getLoader = void 0;
|
|
844
900
|
const getLoader = function (requestId) {
|
|
845
|
-
let idx = (0, search_3.search)(
|
|
901
|
+
let idx = (0, search_3.search)(bbn.env.loaders, { key: requestId });
|
|
846
902
|
if (idx > -1) {
|
|
847
|
-
return
|
|
903
|
+
return bbn.env.loaders[idx];
|
|
848
904
|
}
|
|
849
905
|
return false;
|
|
850
906
|
};
|
|
@@ -854,9 +910,18 @@
|
|
|
854
910
|
"use strict";
|
|
855
911
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
856
912
|
exports.abort = void 0;
|
|
857
|
-
const abort = function (requestId) {
|
|
858
|
-
loader
|
|
859
|
-
|
|
913
|
+
const abort = function (requestId) {
|
|
914
|
+
let loader = (0, getLoader_1.getLoader)(requestId);
|
|
915
|
+
if (loader && loader.source) {
|
|
916
|
+
//this._deleteLoader(requestId);
|
|
917
|
+
loader.source.cancel('Operation canceled by the user.');
|
|
918
|
+
}
|
|
919
|
+
/*
|
|
920
|
+
else {
|
|
921
|
+
throw new Error("Impossible to find the loader " + requestId);
|
|
922
|
+
}
|
|
923
|
+
*/
|
|
924
|
+
};
|
|
860
925
|
exports.abort = abort;
|
|
861
926
|
});
|
|
862
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) {
|
|
@@ -883,16 +948,20 @@
|
|
|
883
948
|
throw new Error("Search function error: The prop argument should be a string or an object");
|
|
884
949
|
}
|
|
885
950
|
if (isFn) {
|
|
886
|
-
(0, each_4.each)(arr, (a, i) => {
|
|
887
|
-
|
|
888
|
-
|
|
951
|
+
(0, each_4.each)(arr, (a, i) => {
|
|
952
|
+
if (filter(a, i)) {
|
|
953
|
+
res.push(a);
|
|
954
|
+
}
|
|
955
|
+
});
|
|
889
956
|
}
|
|
890
957
|
else {
|
|
891
958
|
filter = (0, filterToConditions_2.filterToConditions)(filter, operator);
|
|
892
959
|
if (filter.conditions && filter.logic) {
|
|
893
|
-
(0, each_4.each)(arr, (a) => {
|
|
894
|
-
|
|
895
|
-
|
|
960
|
+
(0, each_4.each)(arr, (a) => {
|
|
961
|
+
if ((0, compareConditions_2.compareConditions)(a, filter)) {
|
|
962
|
+
res.push(a);
|
|
963
|
+
}
|
|
964
|
+
});
|
|
896
965
|
}
|
|
897
966
|
}
|
|
898
967
|
return res;
|
|
@@ -900,12 +969,12 @@
|
|
|
900
969
|
};
|
|
901
970
|
exports.filter = filter;
|
|
902
971
|
});
|
|
903
|
-
define("fn/abortURL", ["require", "exports", "
|
|
972
|
+
define("fn/abortURL", ["require", "exports", "fn/each", "fn/filter"], function (require, exports, each_5, filter_1) {
|
|
904
973
|
"use strict";
|
|
905
974
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
906
975
|
exports.abortURL = void 0;
|
|
907
976
|
const abortURL = function (url) {
|
|
908
|
-
(0, each_5.each)((0, filter_1.filter)(
|
|
977
|
+
(0, each_5.each)((0, filter_1.filter)(bbn.env.loaders, { url: url }), a => {
|
|
909
978
|
if (a && a.source) {
|
|
910
979
|
a.source.cancel('Operation canceled by the user.');
|
|
911
980
|
}
|
|
@@ -916,21 +985,29 @@
|
|
|
916
985
|
};
|
|
917
986
|
exports.abortURL = abortURL;
|
|
918
987
|
});
|
|
919
|
-
define("fn/addColors", ["require", "exports", "
|
|
988
|
+
define("fn/addColors", ["require", "exports", "fn/numProperties", "fn/iterate"], function (require, exports, numProperties_3, iterate_3) {
|
|
920
989
|
"use strict";
|
|
921
990
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
922
991
|
exports.addColors = void 0;
|
|
923
992
|
const addColors = function (colors) {
|
|
924
993
|
let st = '';
|
|
925
994
|
if ((0, numProperties_3.numProperties)(colors)) {
|
|
926
|
-
if (!
|
|
927
|
-
|
|
995
|
+
if (!bbn.var.colors) {
|
|
996
|
+
bbn.var.colors = {};
|
|
928
997
|
}
|
|
929
998
|
let element = document.createElement('style');
|
|
930
999
|
document.head.appendChild(element);
|
|
931
1000
|
let sheet = element.sheet;
|
|
1001
|
+
// Append style element to head
|
|
932
1002
|
let i = 0;
|
|
933
|
-
(0, iterate_3.iterate)(colors, (v, n) => {
|
|
1003
|
+
(0, iterate_3.iterate)(colors, (v, n) => {
|
|
1004
|
+
bbn.var.colors[n] = v;
|
|
1005
|
+
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);
|
|
1008
|
+
sheet.insertRule('.bbn-border-' + n + ', .bbn-color-border-' + n + ' {border-color: ' + v + ' !important;}', i);
|
|
1009
|
+
sheet.insertRule('.bbn-color-' + n + ' {border-color: ' + v + '; background-color: ' + v + '; color: ' + v + ';}', i);
|
|
1010
|
+
});
|
|
934
1011
|
}
|
|
935
1012
|
};
|
|
936
1013
|
exports.addColors = addColors;
|
|
@@ -941,7 +1018,13 @@
|
|
|
941
1018
|
exports.addInputs = void 0;
|
|
942
1019
|
const addInputs = function (form, params, prefix) {
|
|
943
1020
|
if (form && (form.tagName === 'FORM')) {
|
|
944
|
-
let appendToForm = (name, val) => {
|
|
1021
|
+
let appendToForm = (name, val) => {
|
|
1022
|
+
let input = document.createElement('input');
|
|
1023
|
+
input.setAttribute('type', 'hidden');
|
|
1024
|
+
input.setAttribute('name', name);
|
|
1025
|
+
input.setAttribute('value', val);
|
|
1026
|
+
form.appendChild(input);
|
|
1027
|
+
};
|
|
945
1028
|
params = JSON.parse(JSON.stringify(params || {}));
|
|
946
1029
|
prefix = prefix || '';
|
|
947
1030
|
if (params) {
|
|
@@ -961,7 +1044,8 @@
|
|
|
961
1044
|
}
|
|
962
1045
|
});
|
|
963
1046
|
}
|
|
964
|
-
else if ((typeof param === 'object') &&
|
|
1047
|
+
else if ((typeof param === 'object') &&
|
|
1048
|
+
!(param instanceof File)) {
|
|
965
1049
|
addInputs(form, param, name);
|
|
966
1050
|
}
|
|
967
1051
|
else {
|
|
@@ -977,21 +1061,38 @@
|
|
|
977
1061
|
"use strict";
|
|
978
1062
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
979
1063
|
exports.addStyle = void 0;
|
|
980
|
-
const addStyle = function (ele, o) {
|
|
981
|
-
(0,
|
|
982
|
-
|
|
1064
|
+
const addStyle = function (ele, o) {
|
|
1065
|
+
if ((0, isObject_6.isObject)(o)) {
|
|
1066
|
+
(0, iterate_5.iterate)(o, (v, k) => {
|
|
1067
|
+
ele.style[k] = v;
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
};
|
|
983
1071
|
exports.addStyle = addStyle;
|
|
984
1072
|
});
|
|
985
1073
|
define("fn/adjustSize", ["require", "exports", "fn/each"], function (require, exports, each_6) {
|
|
986
1074
|
"use strict";
|
|
987
1075
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
988
1076
|
exports.adjustSize = void 0;
|
|
989
|
-
const adjustSize = function (type, eles) {
|
|
990
|
-
max =
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1077
|
+
const adjustSize = function (type, eles) {
|
|
1078
|
+
let max = 0, idx;
|
|
1079
|
+
(0, each_6.each)(eles, (el) => {
|
|
1080
|
+
el.style[type] = 'auto';
|
|
1081
|
+
});
|
|
1082
|
+
(0, each_6.each)(eles, (el, i) => {
|
|
1083
|
+
let rect = el.getBoundingClientRect(), s = rect[type] % 1 ? (rect[type] - (rect[type] % 1) + 1) : rect[type];
|
|
1084
|
+
//s = rect[type];
|
|
1085
|
+
if (s > max) {
|
|
1086
|
+
max = s;
|
|
1087
|
+
idx = i;
|
|
1088
|
+
}
|
|
1089
|
+
});
|
|
1090
|
+
(0, each_6.each)(eles, (el, i) => {
|
|
1091
|
+
if (max) {
|
|
1092
|
+
el.style[type] = max + 'px';
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1095
|
+
};
|
|
995
1096
|
exports.adjustSize = adjustSize;
|
|
996
1097
|
});
|
|
997
1098
|
define("fn/adjustHeight", ["require", "exports", "fn/isIterable", "fn/adjustSize"], function (require, exports, isIterable_3, adjustSize_1) {
|
|
@@ -1024,7 +1125,9 @@
|
|
|
1024
1125
|
"use strict";
|
|
1025
1126
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1026
1127
|
exports.escapeRegExp = void 0;
|
|
1027
|
-
const escapeRegExp = function (str) {
|
|
1128
|
+
const escapeRegExp = function (str) {
|
|
1129
|
+
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
1130
|
+
};
|
|
1028
1131
|
exports.escapeRegExp = escapeRegExp;
|
|
1029
1132
|
});
|
|
1030
1133
|
define("fn/replaceAll", ["require", "exports", "fn/isObject", "fn/escapeRegExp"], function (require, exports, isObject_7, escapeRegExp_1) {
|
|
@@ -1054,9 +1157,18 @@
|
|
|
1054
1157
|
function gg(a, b, c, d, x, s, t) { return cm((b & d) | (c & (~d)), a, b, x, s, t); }
|
|
1055
1158
|
function hh(a, b, c, d, x, s, t) { return cm(b ^ c ^ d, a, b, x, s, t); }
|
|
1056
1159
|
function ii(a, b, c, d, x, s, t) { return cm(c ^ (b | (~d)), a, b, x, s, t); }
|
|
1057
|
-
function sb(x) {
|
|
1058
|
-
|
|
1059
|
-
|
|
1160
|
+
function sb(x) {
|
|
1161
|
+
var i;
|
|
1162
|
+
var nblk = ((x.length + 8) >> 6) + 1;
|
|
1163
|
+
var blks = new Array(nblk * 16);
|
|
1164
|
+
for (i = 0; i < nblk * 16; i++)
|
|
1165
|
+
blks[i] = 0;
|
|
1166
|
+
for (i = 0; i < x.length; i++)
|
|
1167
|
+
blks[i >> 2] |= x.charCodeAt(i) << ((i % 4) * 8);
|
|
1168
|
+
blks[i >> 2] |= 0x80 << ((i % 4) * 8);
|
|
1169
|
+
blks[nblk * 16 - 2] = x.length * 8;
|
|
1170
|
+
return blks;
|
|
1171
|
+
}
|
|
1060
1172
|
var i, x = sb(st), a = 1732584193, b = -271733879, c = -1732584194, d = 271733878, olda, oldb, oldc, oldd;
|
|
1061
1173
|
for (i = 0; i < x.length; i += 16) {
|
|
1062
1174
|
olda = a;
|
|
@@ -1143,15 +1255,17 @@
|
|
|
1143
1255
|
const getRequestId = function (url, data, datatype) {
|
|
1144
1256
|
let d = {};
|
|
1145
1257
|
if (data) {
|
|
1146
|
-
(0, iterate_6.iterate)(data, (a, n) => {
|
|
1147
|
-
|
|
1148
|
-
|
|
1258
|
+
(0, iterate_6.iterate)(data, (a, n) => {
|
|
1259
|
+
if (n.indexOf('_bbn') === -1) {
|
|
1260
|
+
d[n] = a;
|
|
1261
|
+
}
|
|
1262
|
+
});
|
|
1149
1263
|
}
|
|
1150
1264
|
return url + ':' + (0, md5_1.md5)((datatype || 'json') + JSON.stringify(d));
|
|
1151
1265
|
};
|
|
1152
1266
|
exports.getRequestId = getRequestId;
|
|
1153
1267
|
});
|
|
1154
|
-
define("fn/extend", ["require", "exports", "
|
|
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) {
|
|
1155
1269
|
"use strict";
|
|
1156
1270
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1157
1271
|
exports.extend = void 0;
|
|
@@ -1166,7 +1280,7 @@
|
|
|
1166
1280
|
continue;
|
|
1167
1281
|
}
|
|
1168
1282
|
else if (typeof arguments[i] !== 'object') {
|
|
1169
|
-
throw new Error(
|
|
1283
|
+
throw new Error(bbn._("Error in extend: all arguments should be object, you have given ") + typeof (arguments[i]));
|
|
1170
1284
|
}
|
|
1171
1285
|
else {
|
|
1172
1286
|
args.push(arguments[i]);
|
|
@@ -1211,42 +1325,88 @@
|
|
|
1211
1325
|
}
|
|
1212
1326
|
});
|
|
1213
1327
|
if (args[i].__bbnNoData) {
|
|
1214
|
-
Object.defineProperty(out, '__bbnNoData', {
|
|
1328
|
+
Object.defineProperty(out, '__bbnNoData', {
|
|
1329
|
+
value: true,
|
|
1330
|
+
enumerable: false,
|
|
1331
|
+
configurable: false,
|
|
1332
|
+
writable: false
|
|
1333
|
+
});
|
|
1215
1334
|
}
|
|
1216
1335
|
}
|
|
1217
1336
|
return out;
|
|
1218
1337
|
};
|
|
1219
1338
|
exports.extend = extend;
|
|
1220
1339
|
});
|
|
1221
|
-
define("fn/defaultEndLoadingFunction", ["require", "exports"], function (require, exports) {
|
|
1340
|
+
define("fn/defaultEndLoadingFunction", ["require", "exports", "fn/numProperties", "fn/log", "fn/isCp"], function (require, exports, numProperties_4, log_5, isCp_3) {
|
|
1222
1341
|
"use strict";
|
|
1223
1342
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1224
1343
|
exports.defaultEndLoadingFunction = void 0;
|
|
1225
|
-
const defaultEndLoadingFunction = function (url, data, res) {
|
|
1344
|
+
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
|
+
}
|
|
1359
|
+
};
|
|
1226
1360
|
exports.defaultEndLoadingFunction = defaultEndLoadingFunction;
|
|
1227
1361
|
});
|
|
1228
|
-
define("fn/defaultAjaxErrorFunction", ["require", "exports", "fn/
|
|
1362
|
+
define("fn/defaultAjaxErrorFunction", ["require", "exports", "fn/isCp"], function (require, exports, isCp_4) {
|
|
1229
1363
|
"use strict";
|
|
1230
1364
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1231
1365
|
exports.defaultAjaxErrorFunction = void 0;
|
|
1232
|
-
const defaultAjaxErrorFunction = function (jqXHR, textStatus, errorThrown) {
|
|
1366
|
+
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
|
+
return false;
|
|
1379
|
+
};
|
|
1233
1380
|
exports.defaultAjaxErrorFunction = defaultAjaxErrorFunction;
|
|
1234
1381
|
});
|
|
1235
1382
|
define("fn/defaultAjaxAbortFunction", ["require", "exports", "fn/log"], function (require, exports, log_6) {
|
|
1236
1383
|
"use strict";
|
|
1237
1384
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1238
1385
|
exports.defaultAjaxAbortFunction = void 0;
|
|
1239
|
-
const defaultAjaxAbortFunction = function (message, url) {
|
|
1386
|
+
const defaultAjaxAbortFunction = function (message, url) {
|
|
1387
|
+
(0, log_6.log)(message);
|
|
1388
|
+
};
|
|
1240
1389
|
exports.defaultAjaxAbortFunction = defaultAjaxAbortFunction;
|
|
1241
1390
|
});
|
|
1242
|
-
define("fn/defaultStartLoadingFunction", ["require", "exports"], function (require, exports) {
|
|
1391
|
+
define("fn/defaultStartLoadingFunction", ["require", "exports", "fn/log", "fn/isCp"], function (require, exports, log_7, isCp_5) {
|
|
1243
1392
|
"use strict";
|
|
1244
1393
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1245
1394
|
exports.defaultStartLoadingFunction = void 0;
|
|
1246
|
-
const defaultStartLoadingFunction = function (
|
|
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
|
+
}
|
|
1406
|
+
};
|
|
1247
1407
|
exports.defaultStartLoadingFunction = defaultStartLoadingFunction;
|
|
1248
1408
|
});
|
|
1249
|
-
define("fn/ajax", ["require", "exports", "
|
|
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) {
|
|
1250
1410
|
"use strict";
|
|
1251
1411
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1252
1412
|
exports.ajax = void 0;
|
|
@@ -1274,6 +1434,7 @@
|
|
|
1274
1434
|
}
|
|
1275
1435
|
if (url) {
|
|
1276
1436
|
if (url.indexOf('://') === -1) {
|
|
1437
|
+
// Prevent protocol mismatch by Axios
|
|
1277
1438
|
url = (0, replaceAll_1.replaceAll)("//", "/", url);
|
|
1278
1439
|
}
|
|
1279
1440
|
if (!datatype) {
|
|
@@ -1281,24 +1442,32 @@
|
|
|
1281
1442
|
}
|
|
1282
1443
|
let requestId = (0, getRequestId_1.getRequestId)(url, data, datatype);
|
|
1283
1444
|
let loaderObj = (0, getLoader_2.getLoader)(requestId);
|
|
1445
|
+
//log("IN AJAX", loaderObj? loaderObj.loader : "NO LOADER")
|
|
1284
1446
|
if (loaderObj && loaderObj.loader) {
|
|
1285
1447
|
return loaderObj.loader;
|
|
1286
1448
|
}
|
|
1287
|
-
if (
|
|
1288
|
-
(0, extend_1.extend)(data || {}, { _bbn_token:
|
|
1449
|
+
if (bbn.env.token) {
|
|
1450
|
+
(0, extend_1.extend)(data || {}, { _bbn_token: bbn.env.token });
|
|
1289
1451
|
}
|
|
1290
1452
|
let cancelToken = axios.CancelToken;
|
|
1291
1453
|
let source = cancelToken.source();
|
|
1292
|
-
let options = {
|
|
1454
|
+
let options = {
|
|
1455
|
+
responseType: datatype,
|
|
1456
|
+
cancelToken: source.token
|
|
1457
|
+
};
|
|
1293
1458
|
if (datatype === 'text') {
|
|
1294
|
-
options.headers = {
|
|
1459
|
+
options.headers = {
|
|
1460
|
+
accept: 'text/javascript',
|
|
1461
|
+
'Content-Type': 'text/javascript'
|
|
1462
|
+
};
|
|
1295
1463
|
}
|
|
1296
1464
|
let args = [url];
|
|
1297
|
-
if ((0, isObject_9.isObject)(data) && ((0,
|
|
1465
|
+
if ((0, isObject_9.isObject)(data) && ((0, numProperties_5.numProperties)(data) > 0)) {
|
|
1298
1466
|
args.push(data);
|
|
1299
1467
|
}
|
|
1300
1468
|
args.push(options);
|
|
1301
|
-
let loader = axios[args.length === 2 ? 'get' : 'post'].apply(axios, args)
|
|
1469
|
+
let loader = axios[args.length === 2 ? 'get' : 'post'].apply(axios, args)
|
|
1470
|
+
.then((res) => {
|
|
1302
1471
|
(0, _deleteLoader_1._deleteLoader)(requestId, res);
|
|
1303
1472
|
(0, defaultEndLoadingFunction_1.defaultEndLoadingFunction)(url, tst, data, res);
|
|
1304
1473
|
switch (res.status) {
|
|
@@ -1307,10 +1476,12 @@
|
|
|
1307
1476
|
success(res.data, res.headers);
|
|
1308
1477
|
}
|
|
1309
1478
|
break;
|
|
1310
|
-
default:
|
|
1479
|
+
default:
|
|
1480
|
+
(0, defaultAjaxErrorFunction_1.defaultAjaxErrorFunction)(loader, res);
|
|
1311
1481
|
}
|
|
1312
1482
|
return res;
|
|
1313
|
-
})
|
|
1483
|
+
})
|
|
1484
|
+
.catch((err) => {
|
|
1314
1485
|
let isAbort = axios.isCancel(err);
|
|
1315
1486
|
(0, _deleteLoader_1._deleteLoader)(requestId, err.message || err.response.data, isAbort);
|
|
1316
1487
|
(0, defaultEndLoadingFunction_1.defaultEndLoadingFunction)(url, tst, data, err);
|
|
@@ -1472,7 +1643,16 @@
|
|
|
1472
1643
|
}
|
|
1473
1644
|
const argString = args.map(arg => arg.name + (arg.default ? ' = ' + arg.default : '')).join(', ');
|
|
1474
1645
|
const hash = (0, md5_2.md5)(body + (name ? '-' + name : '') + (argString ? '-' + argString : ''));
|
|
1475
|
-
return {
|
|
1646
|
+
return {
|
|
1647
|
+
body,
|
|
1648
|
+
args,
|
|
1649
|
+
argString,
|
|
1650
|
+
isArrow,
|
|
1651
|
+
hasFunction,
|
|
1652
|
+
name,
|
|
1653
|
+
isAsync,
|
|
1654
|
+
hash
|
|
1655
|
+
};
|
|
1476
1656
|
};
|
|
1477
1657
|
exports.analyzeFunction = analyzeFunction;
|
|
1478
1658
|
});
|
|
@@ -1482,12 +1662,18 @@
|
|
|
1482
1662
|
exports.animateCss = void 0;
|
|
1483
1663
|
const animateCss = function (ele, animationName, callback) {
|
|
1484
1664
|
let animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
|
|
1665
|
+
/*$(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
|
+
})*/
|
|
1485
1671
|
ele.classList.add('animated');
|
|
1486
1672
|
ele.classList.add(animationName);
|
|
1487
1673
|
ele.addEventListener(animationEnd, (e) => {
|
|
1488
1674
|
e.target.removeEventListener(e.type, arguments.callee);
|
|
1489
|
-
if (typeof callback == 'function') {
|
|
1490
|
-
callback.call(this);
|
|
1675
|
+
if (typeof callback == 'function') { // make sure the callback is a function
|
|
1676
|
+
callback.call(this); // brings the scope to the callback
|
|
1491
1677
|
}
|
|
1492
1678
|
this.classList.remove(animation);
|
|
1493
1679
|
});
|
|
@@ -1498,27 +1684,37 @@
|
|
|
1498
1684
|
"use strict";
|
|
1499
1685
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1500
1686
|
exports.arrayBuffer2String = void 0;
|
|
1501
|
-
const arrayBuffer2String = function (buf) {
|
|
1687
|
+
const arrayBuffer2String = function (buf) {
|
|
1688
|
+
return String.fromCharCode.apply(null, new Uint16Array(buf));
|
|
1689
|
+
};
|
|
1502
1690
|
exports.arrayBuffer2String = arrayBuffer2String;
|
|
1503
1691
|
});
|
|
1504
1692
|
define("fn/arrayFromProp", ["require", "exports", "fn/each", "fn/getProperty"], function (require, exports, each_8, getProperty_3) {
|
|
1505
1693
|
"use strict";
|
|
1506
1694
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1507
1695
|
exports.arrayFromProp = void 0;
|
|
1508
|
-
const arrayFromProp = function (arr, prop) {
|
|
1696
|
+
const arrayFromProp = function (arr, prop) {
|
|
1697
|
+
let r = [];
|
|
1698
|
+
(0, each_8.each)(arr, (a, i) => {
|
|
1699
|
+
r.push((0, getProperty_3.getProperty)(a, prop));
|
|
1700
|
+
});
|
|
1701
|
+
return r;
|
|
1702
|
+
};
|
|
1509
1703
|
exports.arrayFromProp = arrayFromProp;
|
|
1510
1704
|
});
|
|
1511
|
-
define("fn/autoExtend", ["require", "exports", "
|
|
1705
|
+
define("fn/autoExtend", ["require", "exports", "fn/extend"], function (require, exports, extend_2) {
|
|
1512
1706
|
"use strict";
|
|
1513
1707
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1514
1708
|
exports.autoExtend = void 0;
|
|
1515
1709
|
const autoExtend = function (namespace, obj) {
|
|
1516
|
-
if (!
|
|
1517
|
-
|
|
1518
|
-
(
|
|
1710
|
+
if (!bbn[namespace]) {
|
|
1711
|
+
bbn[namespace] = {};
|
|
1712
|
+
//$.extend(true, bbn[namespace], obj);
|
|
1713
|
+
(0, extend_2.extend)(bbn[namespace], obj);
|
|
1519
1714
|
}
|
|
1520
1715
|
else {
|
|
1521
|
-
(
|
|
1716
|
+
// $.extend(true, bbn[namespace], obj);
|
|
1717
|
+
(0, extend_2.extend)(bbn[namespace], obj);
|
|
1522
1718
|
}
|
|
1523
1719
|
};
|
|
1524
1720
|
exports.autoExtend = autoExtend;
|
|
@@ -1547,7 +1743,9 @@
|
|
|
1547
1743
|
"use strict";
|
|
1548
1744
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1549
1745
|
exports.br2nl = void 0;
|
|
1550
|
-
const br2nl = function (st) {
|
|
1746
|
+
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)));
|
|
1748
|
+
};
|
|
1551
1749
|
exports.br2nl = br2nl;
|
|
1552
1750
|
});
|
|
1553
1751
|
define("fn/date", ["require", "exports", "fn/isNumber", "fn/substr", "fn/isDate"], function (require, exports, isNumber_3, substr_4, isDate_2) {
|
|
@@ -1580,7 +1778,7 @@
|
|
|
1580
1778
|
};
|
|
1581
1779
|
exports.date = date;
|
|
1582
1780
|
});
|
|
1583
|
-
define("fn/fdatetime", ["require", "exports", "
|
|
1781
|
+
define("fn/fdatetime", ["require", "exports", "fn/date", "fn/isDate", "fn/isString"], function (require, exports, date_1, isDate_3, isString_6) {
|
|
1584
1782
|
"use strict";
|
|
1585
1783
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1586
1784
|
exports.fdatetime = void 0;
|
|
@@ -1590,7 +1788,16 @@
|
|
|
1590
1788
|
return wrong_result && (0, isString_6.isString)(wrong_result) ? wrong_result : '';
|
|
1591
1789
|
}
|
|
1592
1790
|
if (undefined !== dayjs) {
|
|
1593
|
-
return dayjs(r).
|
|
1791
|
+
//return dayjs(r).format('lll');
|
|
1792
|
+
return dayjs(r).calendar(null, {
|
|
1793
|
+
sameDay: '[' + bbn._('Today') + '] HH:mm',
|
|
1794
|
+
nextDay: '[' + bbn._('Tomorrow') + '] HH:mm',
|
|
1795
|
+
nextWeek: 'ddd D HH:mm',
|
|
1796
|
+
lastDay: '[' + bbn._('Yesterday') + '] HH:mm',
|
|
1797
|
+
lastWeek: 'ddd D HH:mm',
|
|
1798
|
+
sameElse: 'DD/MM/YYYY HH:mm'
|
|
1799
|
+
});
|
|
1800
|
+
//return dayjs(r).format("DD/MM/YYYY HH:mm")
|
|
1594
1801
|
}
|
|
1595
1802
|
return r.toLocaleDateString();
|
|
1596
1803
|
};
|
|
@@ -1601,6 +1808,7 @@
|
|
|
1601
1808
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1602
1809
|
exports.fdate = void 0;
|
|
1603
1810
|
const fdate = function (d, wrong_result) {
|
|
1811
|
+
// Retro compatibility
|
|
1604
1812
|
if (wrong_result === true) {
|
|
1605
1813
|
return (0, fdatetime_1.fdatetime)(d);
|
|
1606
1814
|
}
|
|
@@ -1615,7 +1823,7 @@
|
|
|
1615
1823
|
};
|
|
1616
1824
|
exports.fdate = fdate;
|
|
1617
1825
|
});
|
|
1618
|
-
define("fn/calendar", ["require", "exports", "
|
|
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) {
|
|
1619
1827
|
"use strict";
|
|
1620
1828
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1621
1829
|
exports.calendar = void 0;
|
|
@@ -1627,11 +1835,18 @@
|
|
|
1627
1835
|
if (!(0, isDate_5.isDate)(r)) {
|
|
1628
1836
|
return wrong_result && (0, isString_8.isString)(wrong_result) ? wrong_result : '';
|
|
1629
1837
|
}
|
|
1630
|
-
return dayjs(r).calendar(null, {
|
|
1838
|
+
return dayjs(r).calendar(null, {
|
|
1839
|
+
sameDay: '[' + bbn._('Today') + ']',
|
|
1840
|
+
nextDay: '[' + bbn._('Tomorrow') + ']',
|
|
1841
|
+
nextWeek: 'ddd D',
|
|
1842
|
+
lastDay: '[' + bbn._('Yesterday') + ']',
|
|
1843
|
+
lastWeek: 'ddd D',
|
|
1844
|
+
sameElse: 'L'
|
|
1845
|
+
});
|
|
1631
1846
|
};
|
|
1632
1847
|
exports.calendar = calendar;
|
|
1633
1848
|
});
|
|
1634
|
-
define("fn/error", ["require", "exports", "fn/log"], function (require, exports,
|
|
1849
|
+
define("fn/error", ["require", "exports", "fn/log"], function (require, exports, log_8) {
|
|
1635
1850
|
"use strict";
|
|
1636
1851
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1637
1852
|
exports.error = void 0;
|
|
@@ -1641,8 +1856,12 @@
|
|
|
1641
1856
|
for (let i = 1; i < arguments.length; i++) {
|
|
1642
1857
|
args.push(arguments[i]);
|
|
1643
1858
|
}
|
|
1644
|
-
args.unshift({
|
|
1645
|
-
|
|
1859
|
+
args.unshift({
|
|
1860
|
+
_bbn_console_mode: "error",
|
|
1861
|
+
_bbn_console_level: 1,
|
|
1862
|
+
_bbn_console_style: "color: #E64141; background: #F7E195; font-size: 14px"
|
|
1863
|
+
});
|
|
1864
|
+
log_8.log.apply(this, args);
|
|
1646
1865
|
}
|
|
1647
1866
|
throw new Error(errorMsg);
|
|
1648
1867
|
};
|
|
@@ -1652,24 +1871,32 @@
|
|
|
1652
1871
|
"use strict";
|
|
1653
1872
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1654
1873
|
exports.defaultLinkFunction = void 0;
|
|
1655
|
-
const defaultLinkFunction = function (responseObj, ele) {
|
|
1874
|
+
const defaultLinkFunction = function (responseObj, ele) {
|
|
1875
|
+
return true;
|
|
1876
|
+
};
|
|
1656
1877
|
exports.defaultLinkFunction = defaultLinkFunction;
|
|
1657
1878
|
});
|
|
1658
1879
|
define("fn/defaultPostLinkFunction", ["require", "exports"], function (require, exports) {
|
|
1659
1880
|
"use strict";
|
|
1660
1881
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1661
1882
|
exports.defaultPostLinkFunction = void 0;
|
|
1662
|
-
const defaultPostLinkFunction = function (r) {
|
|
1883
|
+
const defaultPostLinkFunction = function (r) {
|
|
1884
|
+
return true;
|
|
1885
|
+
};
|
|
1663
1886
|
exports.defaultPostLinkFunction = defaultPostLinkFunction;
|
|
1664
1887
|
});
|
|
1665
1888
|
define("fn/defaultAlertFunction", ["require", "exports"], function (require, exports) {
|
|
1666
1889
|
"use strict";
|
|
1667
1890
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1668
1891
|
exports.defaultAlertFunction = void 0;
|
|
1669
|
-
const defaultAlertFunction = function (
|
|
1892
|
+
const defaultAlertFunction = function (ele) {
|
|
1893
|
+
/** @todo */
|
|
1894
|
+
let c = appui.getCurrentContainer();
|
|
1895
|
+
c.alert.apply(c, arguments);
|
|
1896
|
+
};
|
|
1670
1897
|
exports.defaultAlertFunction = defaultAlertFunction;
|
|
1671
1898
|
});
|
|
1672
|
-
define("fn/callback", ["require", "exports", "
|
|
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) {
|
|
1673
1900
|
"use strict";
|
|
1674
1901
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1675
1902
|
exports.callback = void 0;
|
|
@@ -1681,6 +1908,7 @@
|
|
|
1681
1908
|
let isObj = t.toLowerCase() === 'object';
|
|
1682
1909
|
let errTitle;
|
|
1683
1910
|
if (isObj && res.prescript) {
|
|
1911
|
+
/* var ok can be changed to false in prescript execution */
|
|
1684
1912
|
try {
|
|
1685
1913
|
eval(res.prescript);
|
|
1686
1914
|
}
|
|
@@ -1691,6 +1919,7 @@
|
|
|
1691
1919
|
if (isObj && res.url === undefined) {
|
|
1692
1920
|
res.url = url;
|
|
1693
1921
|
}
|
|
1922
|
+
/* Case where a callback is defined */
|
|
1694
1923
|
if (fn) {
|
|
1695
1924
|
tmp = fn(res, ele);
|
|
1696
1925
|
}
|
|
@@ -1702,7 +1931,7 @@
|
|
|
1702
1931
|
ele.val(res.content);
|
|
1703
1932
|
}
|
|
1704
1933
|
else {
|
|
1705
|
-
|
|
1934
|
+
ele.innerHTML = res.content;
|
|
1706
1935
|
}
|
|
1707
1936
|
}
|
|
1708
1937
|
if (tmp && isObj && res.script) {
|
|
@@ -1719,13 +1948,14 @@
|
|
|
1719
1948
|
}
|
|
1720
1949
|
}
|
|
1721
1950
|
catch (e) {
|
|
1722
|
-
(0,
|
|
1951
|
+
(0, log_9.log)(e, res);
|
|
1723
1952
|
(0, error_1.error)((0, isFunction_4.isFunction)(e.getMessage) ? e.getMessage() : null);
|
|
1724
1953
|
}
|
|
1725
1954
|
return r;
|
|
1726
1955
|
})(res.data ? res.data : {}, ele ? ele : false);
|
|
1727
1956
|
}
|
|
1728
1957
|
}
|
|
1958
|
+
/* Case where a callback is defined */
|
|
1729
1959
|
if (tmp && fn2) {
|
|
1730
1960
|
fn2(res);
|
|
1731
1961
|
}
|
|
@@ -1736,12 +1966,12 @@
|
|
|
1736
1966
|
eval(res.postscript);
|
|
1737
1967
|
}
|
|
1738
1968
|
if (isObj && res.error) {
|
|
1739
|
-
errTitle = res.errorTitle ||
|
|
1969
|
+
errTitle = res.errorTitle || bbn.lng.server_response;
|
|
1740
1970
|
(0, defaultAlertFunction_1.defaultAlertFunction)(res.error, errTitle);
|
|
1741
1971
|
}
|
|
1742
1972
|
}
|
|
1743
1973
|
else {
|
|
1744
|
-
(0, defaultAlertFunction_1.defaultAlertFunction)(
|
|
1974
|
+
(0, defaultAlertFunction_1.defaultAlertFunction)(bbn.lng.errorText, bbn.lng.error);
|
|
1745
1975
|
}
|
|
1746
1976
|
return tmp;
|
|
1747
1977
|
};
|
|
@@ -1765,49 +1995,73 @@
|
|
|
1765
1995
|
"use strict";
|
|
1766
1996
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1767
1997
|
exports.camelToCss = void 0;
|
|
1768
|
-
const camelToCss = function (str) {
|
|
1998
|
+
const camelToCss = function (str) {
|
|
1999
|
+
return str.replace(/([A-Z])/g, function (st) {
|
|
2000
|
+
return '-' + st.toLowerCase();
|
|
2001
|
+
}).replace('/^./', function (st) {
|
|
2002
|
+
return st.toLowerCase();
|
|
2003
|
+
});
|
|
2004
|
+
};
|
|
1769
2005
|
exports.camelToCss = camelToCss;
|
|
1770
2006
|
});
|
|
1771
2007
|
define("fn/canvasToImage", ["require", "exports"], function (require, exports) {
|
|
1772
2008
|
"use strict";
|
|
1773
2009
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1774
2010
|
exports.canvasToImage = void 0;
|
|
1775
|
-
const canvasToImage = function (canvas) {
|
|
2011
|
+
const canvasToImage = function (canvas) {
|
|
2012
|
+
let img = new Image();
|
|
2013
|
+
img.src = canvas.toDataURL("image/png");
|
|
2014
|
+
return img;
|
|
2015
|
+
};
|
|
1776
2016
|
exports.canvasToImage = canvasToImage;
|
|
1777
2017
|
});
|
|
1778
|
-
define("fn/center", ["require", "exports", "fn/log"], function (require, exports,
|
|
2018
|
+
define("fn/center", ["require", "exports", "fn/log"], function (require, exports, log_10) {
|
|
1779
2019
|
"use strict";
|
|
1780
2020
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1781
2021
|
exports.center = void 0;
|
|
1782
2022
|
const center = function (ele) {
|
|
1783
|
-
|
|
2023
|
+
//ele = $(ele);
|
|
2024
|
+
let parent = ele.parentNode,
|
|
2025
|
+
//w = parent.width(),
|
|
2026
|
+
w = parent.clientWidth,
|
|
2027
|
+
//h = parent.height();
|
|
2028
|
+
h = parent.clientHeight;
|
|
1784
2029
|
while (parent && (!w || !h)) {
|
|
2030
|
+
/*parent = parent.parent(),
|
|
2031
|
+
w = parent.width(),
|
|
2032
|
+
h = parent.height();*/
|
|
1785
2033
|
parent = ele.parentNode;
|
|
1786
2034
|
w = parent.clientWidth;
|
|
1787
2035
|
h = parent.clientHeight;
|
|
1788
2036
|
}
|
|
1789
|
-
(0,
|
|
2037
|
+
(0, log_10.log)("BBN_CENTER", w, h);
|
|
2038
|
+
//ele.css("position","absolute");
|
|
1790
2039
|
ele.style.position = "absolute";
|
|
2040
|
+
//ele.css("top", Math.max(0, ((h - ele.outerHeight()) / 2) + parent.scrollTop()) + "px");
|
|
1791
2041
|
ele.style.top = Math.max(0, ((h - ele.offsetHeight) / 2) + parent.scrollTop) + "px";
|
|
2042
|
+
//ele.css("left", Math.max(0, ((w - ele.outerWidth()) / 2) + parent.scrollLeft()) + "px");
|
|
1792
2043
|
ele.style.left = Math.max(0, ((h - ele.offsetWidth) / 2) + parent.scrollLeft) + "px";
|
|
1793
2044
|
return ele;
|
|
1794
2045
|
};
|
|
1795
2046
|
exports.center = center;
|
|
1796
2047
|
});
|
|
1797
|
-
define("fn/checkPropsDetails", ["require", "exports", "
|
|
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) {
|
|
1798
2049
|
"use strict";
|
|
1799
2050
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1800
2051
|
exports.checkPropsDetails = void 0;
|
|
1801
2052
|
const checkPropsDetails = function (obj, props, checkEmpty) {
|
|
1802
|
-
let res = {
|
|
2053
|
+
let res = {
|
|
2054
|
+
error: false,
|
|
2055
|
+
result: true
|
|
2056
|
+
};
|
|
1803
2057
|
if ((0, isString_9.isString)(props)) {
|
|
1804
2058
|
props = [props];
|
|
1805
2059
|
}
|
|
1806
2060
|
if (!(0, isArray_6.isArray)(props)) {
|
|
1807
|
-
res.error =
|
|
2061
|
+
res.error = bbn._("checkProps must receive a string or an array as props argument");
|
|
1808
2062
|
}
|
|
1809
2063
|
if (!(0, isObject_10.isObject)(obj)) {
|
|
1810
|
-
res.error =
|
|
2064
|
+
res.error = bbn._("checkProps must receive an object as obj argument");
|
|
1811
2065
|
}
|
|
1812
2066
|
if (!res.error) {
|
|
1813
2067
|
let check;
|
|
@@ -1816,19 +2070,19 @@
|
|
|
1816
2070
|
let type = varName[1] || false;
|
|
1817
2071
|
varName = varName[0];
|
|
1818
2072
|
if (obj[varName] === undefined) {
|
|
1819
|
-
res.error = varName + ' ' +
|
|
2073
|
+
res.error = varName + ' ' + bbn._("is not defined");
|
|
1820
2074
|
}
|
|
1821
2075
|
else if (type) {
|
|
1822
2076
|
check = 'is' + (0, substr_5.substr)(type, 0, 1).toUpperCase() + (0, substr_5.substr)(type, 1).toLowerCase();
|
|
1823
|
-
if (
|
|
1824
|
-
res.error = type + ' ' +
|
|
2077
|
+
if (bbn.fn[check] === undefined) {
|
|
2078
|
+
res.error = type + ' ' + bbn._("is not a valid type");
|
|
1825
2079
|
}
|
|
1826
|
-
else if (!
|
|
1827
|
-
res.error = varName + ' ' +
|
|
2080
|
+
else if (!bbn.fn[check](obj[varName])) {
|
|
2081
|
+
res.error = varName + ' ' + bbn._("is not a") + ' ' + type;
|
|
1828
2082
|
}
|
|
1829
2083
|
}
|
|
1830
2084
|
else if (checkEmpty && !obj[varName]) {
|
|
1831
|
-
res.error = varName + ' ' +
|
|
2085
|
+
res.error = varName + ' ' + bbn._("is empty");
|
|
1832
2086
|
}
|
|
1833
2087
|
if (res.error) {
|
|
1834
2088
|
return false;
|
|
@@ -1846,7 +2100,9 @@
|
|
|
1846
2100
|
"use strict";
|
|
1847
2101
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1848
2102
|
exports.checkProps = void 0;
|
|
1849
|
-
const checkProps = function (obj, props, checkEmpty) {
|
|
2103
|
+
const checkProps = function (obj, props, checkEmpty) {
|
|
2104
|
+
return (0, checkPropsDetails_1.checkPropsDetails)(obj, props, checkEmpty).result;
|
|
2105
|
+
};
|
|
1850
2106
|
exports.checkProps = checkProps;
|
|
1851
2107
|
});
|
|
1852
2108
|
define("fn/checkPropsOrDie", ["require", "exports", "fn/checkPropsDetails"], function (require, exports, checkPropsDetails_2) {
|
|
@@ -1866,10 +2122,12 @@
|
|
|
1866
2122
|
"use strict";
|
|
1867
2123
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1868
2124
|
exports.correctCase = void 0;
|
|
1869
|
-
const correctCase = function (str) {
|
|
2125
|
+
const correctCase = function (str) {
|
|
2126
|
+
return str.replace(/[A-z]{1}/, c => c.toUpperCase());
|
|
2127
|
+
};
|
|
1870
2128
|
exports.correctCase = correctCase;
|
|
1871
2129
|
});
|
|
1872
|
-
define("fn/checkType", ["require", "exports", "
|
|
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) {
|
|
1873
2131
|
"use strict";
|
|
1874
2132
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1875
2133
|
exports.checkType = void 0;
|
|
@@ -1906,10 +2164,10 @@
|
|
|
1906
2164
|
return false;
|
|
1907
2165
|
}
|
|
1908
2166
|
}
|
|
1909
|
-
else if (!(0, isString_10.isString)(t) || !(0, isFunction_5.isFunction)(
|
|
2167
|
+
else if (!(0, isString_10.isString)(t) || !(0, isFunction_5.isFunction)(bbn.fn['is' + (0, correctCase_1.correctCase)(t)])) {
|
|
1910
2168
|
(0, error_2.error)(`The type ${t} is not recognized`);
|
|
1911
2169
|
}
|
|
1912
|
-
else if (
|
|
2170
|
+
else if (bbn.fn['is' + (0, correctCase_1.correctCase)(t)](value)) {
|
|
1913
2171
|
ok = true;
|
|
1914
2172
|
return false;
|
|
1915
2173
|
}
|
|
@@ -1918,11 +2176,11 @@
|
|
|
1918
2176
|
}
|
|
1919
2177
|
});
|
|
1920
2178
|
if (!ok) {
|
|
1921
|
-
(0,
|
|
2179
|
+
(0, log_11.log)(["Value given", value, "type", typeof value, "expected", typesList.join(' or ')]);
|
|
1922
2180
|
if (logs.length) {
|
|
1923
|
-
(0,
|
|
2181
|
+
(0, log_11.log)(logs);
|
|
1924
2182
|
}
|
|
1925
|
-
throw new Error((msg ? msg + ' - ' : '') +
|
|
2183
|
+
throw new Error((msg ? msg + ' - ' : '') + bbn._("The value should be a %s", typesList.join(' ' + bbn._("or a") + ' ')));
|
|
1926
2184
|
}
|
|
1927
2185
|
};
|
|
1928
2186
|
exports.checkType = checkType;
|
|
@@ -1933,7 +2191,9 @@
|
|
|
1933
2191
|
exports.clone = void 0;
|
|
1934
2192
|
const clone = function (obj) {
|
|
1935
2193
|
if ((0, isArray_8.isArray)(obj)) {
|
|
1936
|
-
return obj.slice().map((a) => {
|
|
2194
|
+
return obj.slice().map((a) => {
|
|
2195
|
+
return typeof (a) === 'object' ? clone(a) : a;
|
|
2196
|
+
});
|
|
1937
2197
|
}
|
|
1938
2198
|
if ((0, isObject_11.isObject)(obj)) {
|
|
1939
2199
|
const o = Object.create(Object.getPrototypeOf(obj));
|
|
@@ -1947,7 +2207,11 @@
|
|
|
1947
2207
|
"use strict";
|
|
1948
2208
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1949
2209
|
exports.colorToHex = void 0;
|
|
1950
|
-
const colorToHex = function (color) {
|
|
2210
|
+
const colorToHex = function (color) {
|
|
2211
|
+
let canvas = document.createElement("canvas").getContext("2d");
|
|
2212
|
+
canvas.fillStyle = color;
|
|
2213
|
+
return canvas.fillStyle;
|
|
2214
|
+
};
|
|
1951
2215
|
exports.colorToHex = colorToHex;
|
|
1952
2216
|
});
|
|
1953
2217
|
define("fn/copy", ["require", "exports", "fn/isObject", "fn/isFunction"], function (require, exports, isObject_12, isFunction_6) {
|
|
@@ -1959,10 +2223,16 @@
|
|
|
1959
2223
|
if (st) {
|
|
1960
2224
|
if (navigator && navigator.clipboard) {
|
|
1961
2225
|
if (st instanceof Blob) {
|
|
1962
|
-
navigator.clipboard.write([new ClipboardItem({ [st.type.toString()]: st })]).then(() => {
|
|
2226
|
+
navigator.clipboard.write([new ClipboardItem({ [st.type.toString()]: st })]).then(() => {
|
|
2227
|
+
resolve();
|
|
2228
|
+
});
|
|
1963
2229
|
}
|
|
1964
2230
|
else if ((0, isObject_12.isObject)(st) && (0, isFunction_6.isFunction)(st.toBlob)) {
|
|
1965
|
-
st.toBlob(blob => {
|
|
2231
|
+
st.toBlob(blob => {
|
|
2232
|
+
navigator.clipboard.write([new ClipboardItem({ [blob.type.toString()]: blob })]).then(() => {
|
|
2233
|
+
resolve();
|
|
2234
|
+
});
|
|
2235
|
+
});
|
|
1966
2236
|
}
|
|
1967
2237
|
else {
|
|
1968
2238
|
navigator.clipboard.writeText(st);
|
|
@@ -1988,7 +2258,9 @@
|
|
|
1988
2258
|
"use strict";
|
|
1989
2259
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1990
2260
|
exports.count = void 0;
|
|
1991
|
-
const count = function (arr, prop, val, operator) {
|
|
2261
|
+
const count = function (arr, prop, val, operator) {
|
|
2262
|
+
return (0, filter_2.filter)(arr, prop, val, operator, false).length || 0;
|
|
2263
|
+
};
|
|
1992
2264
|
exports.count = count;
|
|
1993
2265
|
});
|
|
1994
2266
|
define("fn/crc32", ["require", "exports"], function (require, exports) {
|
|
@@ -2001,7 +2273,7 @@
|
|
|
2001
2273
|
const charCode = str.charCodeAt(i);
|
|
2002
2274
|
crc = (crc >>> 8) ^ crc32Table[(crc ^ charCode) & 0xFF];
|
|
2003
2275
|
}
|
|
2004
|
-
return (crc ^ (-1)) >>> 0;
|
|
2276
|
+
return (crc ^ (-1)) >>> 0; // Make sure the result is a 32-bit positive integer
|
|
2005
2277
|
};
|
|
2006
2278
|
exports.crc32 = crc32;
|
|
2007
2279
|
});
|
|
@@ -2036,7 +2308,9 @@
|
|
|
2036
2308
|
}
|
|
2037
2309
|
}
|
|
2038
2310
|
if (ok) {
|
|
2311
|
+
//log(rules);
|
|
2039
2312
|
for (var cx = 0; cx < rules.length; cx++) {
|
|
2313
|
+
//log(rules[cx].selectorText);
|
|
2040
2314
|
if (new RegExp("(^|\\s)" + (0, escapeRegExp_2.escapeRegExp)(f) + "(\\{|\\s)", "g").test(rules[cx].selectorText)) {
|
|
2041
2315
|
return true;
|
|
2042
2316
|
}
|
|
@@ -2051,9 +2325,12 @@
|
|
|
2051
2325
|
"use strict";
|
|
2052
2326
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2053
2327
|
exports.dateSQL = void 0;
|
|
2054
|
-
const dateSQL = function (v, dayOnly) {
|
|
2055
|
-
|
|
2056
|
-
|
|
2328
|
+
const dateSQL = function (v, dayOnly) {
|
|
2329
|
+
let date = date(v);
|
|
2330
|
+
if (date) {
|
|
2331
|
+
return dayjs(date).format("YYYY-MM-DD" + (dayOnly ? '' : ' HH:mm:ss'));
|
|
2332
|
+
}
|
|
2333
|
+
};
|
|
2057
2334
|
exports.dateSQL = dateSQL;
|
|
2058
2335
|
});
|
|
2059
2336
|
define("fn/daysInMonth", ["require", "exports", "fn/date"], function (require, exports, date_4) {
|
|
@@ -2080,14 +2357,16 @@
|
|
|
2080
2357
|
res.push(idx);
|
|
2081
2358
|
return res;
|
|
2082
2359
|
}
|
|
2083
|
-
(0, each_11.each)(arr, (it, i) => {
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2360
|
+
(0, each_11.each)(arr, (it, i) => {
|
|
2361
|
+
if ((0, isArray_9.isArray)(it[deepProperty])) {
|
|
2362
|
+
let r = res.slice();
|
|
2363
|
+
r.push(i);
|
|
2364
|
+
let tmp = deepPath(it[deepProperty], filter, deepProperty, r);
|
|
2365
|
+
if (tmp !== false) {
|
|
2366
|
+
return tmp;
|
|
2367
|
+
}
|
|
2089
2368
|
}
|
|
2090
|
-
}
|
|
2369
|
+
});
|
|
2091
2370
|
return false;
|
|
2092
2371
|
};
|
|
2093
2372
|
exports.deepPath = deepPath;
|
|
@@ -2110,49 +2389,68 @@
|
|
|
2110
2389
|
};
|
|
2111
2390
|
exports.defaultConfirmFunction = defaultConfirmFunction;
|
|
2112
2391
|
});
|
|
2113
|
-
define("fn/defaultErrorFunction", ["require", "exports", "fn/log"], function (require, exports,
|
|
2392
|
+
define("fn/defaultErrorFunction", ["require", "exports", "fn/log"], function (require, exports, log_12) {
|
|
2114
2393
|
"use strict";
|
|
2115
2394
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2116
2395
|
exports.defaultErrorFunction = void 0;
|
|
2117
|
-
const defaultErrorFunction = function (message) {
|
|
2396
|
+
const defaultErrorFunction = function (message) {
|
|
2397
|
+
(0, log_12.log)(message);
|
|
2398
|
+
};
|
|
2118
2399
|
exports.defaultErrorFunction = defaultErrorFunction;
|
|
2119
2400
|
});
|
|
2120
2401
|
define("fn/defaultHistoryFunction", ["require", "exports"], function (require, exports) {
|
|
2121
2402
|
"use strict";
|
|
2122
2403
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2123
2404
|
exports.defaultHistoryFunction = void 0;
|
|
2124
|
-
const defaultHistoryFunction = function (obj) {
|
|
2405
|
+
const defaultHistoryFunction = function (obj) {
|
|
2406
|
+
return true;
|
|
2407
|
+
};
|
|
2125
2408
|
exports.defaultHistoryFunction = defaultHistoryFunction;
|
|
2126
2409
|
});
|
|
2127
|
-
define("fn/defaultPreLinkFunction", ["require", "exports"], function (require, exports) {
|
|
2410
|
+
define("fn/defaultPreLinkFunction", ["require", "exports", "fn/isFunction"], function (require, exports, isFunction_8) {
|
|
2128
2411
|
"use strict";
|
|
2129
2412
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2130
2413
|
exports.defaultPreLinkFunction = void 0;
|
|
2131
|
-
const defaultPreLinkFunction = function (url
|
|
2414
|
+
const defaultPreLinkFunction = function (url) {
|
|
2415
|
+
let router = appui.getRef('router');
|
|
2416
|
+
if (router) {
|
|
2417
|
+
if ((0, isFunction_8.isFunction)(router.route) && !router.disabled) {
|
|
2418
|
+
router.route(url);
|
|
2419
|
+
}
|
|
2420
|
+
return false;
|
|
2421
|
+
}
|
|
2422
|
+
return true;
|
|
2423
|
+
};
|
|
2132
2424
|
exports.defaultPreLinkFunction = defaultPreLinkFunction;
|
|
2133
2425
|
});
|
|
2134
2426
|
define("fn/defaultResizeFunction", ["require", "exports"], function (require, exports) {
|
|
2135
2427
|
"use strict";
|
|
2136
2428
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2137
2429
|
exports.defaultResizeFunction = void 0;
|
|
2138
|
-
const defaultResizeFunction = function () {
|
|
2430
|
+
const defaultResizeFunction = function () {
|
|
2431
|
+
return true;
|
|
2432
|
+
};
|
|
2139
2433
|
exports.defaultResizeFunction = defaultResizeFunction;
|
|
2140
2434
|
});
|
|
2141
|
-
define("fn/deleteProp", ["require", "exports"
|
|
2435
|
+
define("fn/deleteProp", ["require", "exports"], function (require, exports) {
|
|
2142
2436
|
"use strict";
|
|
2143
2437
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2144
2438
|
exports.deleteProp = void 0;
|
|
2145
|
-
const deleteProp = function (obj, prop) {
|
|
2439
|
+
const deleteProp = function (obj, prop) {
|
|
2440
|
+
checkType(obj, "object", bbn._("The obj must be an object in setProp"));
|
|
2441
|
+
checkType(prop, "string", bbn._("The prop must be a string in setProp"));
|
|
2442
|
+
delete obj[prop];
|
|
2443
|
+
};
|
|
2146
2444
|
exports.deleteProp = deleteProp;
|
|
2147
2445
|
});
|
|
2148
2446
|
define("fn/isValue", ["require", "exports", "fn/isNull"], function (require, exports, isNull_2) {
|
|
2149
2447
|
"use strict";
|
|
2150
2448
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2151
2449
|
exports.isValue = void 0;
|
|
2152
|
-
const isValue = function () {
|
|
2153
|
-
if (!
|
|
2450
|
+
const isValue = function (...args) {
|
|
2451
|
+
if (!args.length)
|
|
2154
2452
|
return false;
|
|
2155
|
-
for (let a of
|
|
2453
|
+
for (let a of args) {
|
|
2156
2454
|
if ((typeof a === 'object') && !(0, isNull_2.isNull)(a)) {
|
|
2157
2455
|
return false;
|
|
2158
2456
|
}
|
|
@@ -2161,7 +2459,7 @@
|
|
|
2161
2459
|
};
|
|
2162
2460
|
exports.isValue = isValue;
|
|
2163
2461
|
});
|
|
2164
|
-
define("fn/diffObj", ["require", "exports", "fn/isDate", "fn/createObject", "fn/isFunction", "fn/isValue", "fn/isDom", "fn/numProperties"], function (require, exports, isDate_6, createObject_1,
|
|
2462
|
+
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) {
|
|
2165
2463
|
"use strict";
|
|
2166
2464
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2167
2465
|
exports.diffObj = void 0;
|
|
@@ -2173,7 +2471,9 @@
|
|
|
2173
2471
|
if (value1 === value2) {
|
|
2174
2472
|
return VALUE_UNCHANGED;
|
|
2175
2473
|
}
|
|
2176
|
-
if ((0, isDate_6.isDate)(value1) &&
|
|
2474
|
+
if ((0, isDate_6.isDate)(value1) &&
|
|
2475
|
+
(0, isDate_6.isDate)(value2) &&
|
|
2476
|
+
(value1.getTime() === value2.getTime())) {
|
|
2177
2477
|
return VALUE_UNCHANGED;
|
|
2178
2478
|
}
|
|
2179
2479
|
if ('undefined' == typeof (value1)) {
|
|
@@ -2188,16 +2488,28 @@
|
|
|
2188
2488
|
notRoot = false;
|
|
2189
2489
|
}
|
|
2190
2490
|
let diff = (0, createObject_1.createObject)();
|
|
2191
|
-
if (!(0,
|
|
2491
|
+
if (!(0, isFunction_9.isFunction)(obj1) && !(0, isFunction_9.isFunction)(obj2)) {
|
|
2192
2492
|
if ((0, isValue_1.isValue)(obj1) || (0, isValue_1.isValue)(obj2)) {
|
|
2193
2493
|
let res = _compareValues(obj1, obj2);
|
|
2194
2494
|
if (unchanged || (res !== VALUE_UNCHANGED)) {
|
|
2195
2495
|
let ret = (0, createObject_1.createObject)();
|
|
2196
|
-
Object.defineProperty(ret, 'type', {
|
|
2197
|
-
|
|
2198
|
-
|
|
2496
|
+
Object.defineProperty(ret, 'type', {
|
|
2497
|
+
value: res,
|
|
2498
|
+
enumerable: false
|
|
2499
|
+
});
|
|
2500
|
+
Object.defineProperty(ret, 'data', {
|
|
2501
|
+
value: (obj1 === undefined) ? obj2 : obj1,
|
|
2502
|
+
enumerable: false
|
|
2503
|
+
});
|
|
2504
|
+
Object.defineProperty(ret, '_bbnDiffObjProof', {
|
|
2505
|
+
value: true,
|
|
2506
|
+
enumerable: false
|
|
2507
|
+
});
|
|
2199
2508
|
if (obj1 !== undefined) {
|
|
2200
|
-
Object.defineProperty(ret, 'newData', {
|
|
2509
|
+
Object.defineProperty(ret, 'newData', {
|
|
2510
|
+
value: obj2,
|
|
2511
|
+
enumerable: false
|
|
2512
|
+
});
|
|
2201
2513
|
}
|
|
2202
2514
|
return ret;
|
|
2203
2515
|
}
|
|
@@ -2207,11 +2519,12 @@
|
|
|
2207
2519
|
return false;
|
|
2208
2520
|
}
|
|
2209
2521
|
if (diffObjProcessed.includes(obj1) || diffObjProcessed.includes(obj2)) {
|
|
2522
|
+
//error(bbn._("Can't compare objects because they contain circular references"));
|
|
2210
2523
|
return false;
|
|
2211
2524
|
}
|
|
2212
2525
|
diffObjProcessed.push(obj1, obj2);
|
|
2213
2526
|
for (let key in obj1) {
|
|
2214
|
-
if ((0,
|
|
2527
|
+
if ((0, isFunction_9.isFunction)(obj1[key])) {
|
|
2215
2528
|
continue;
|
|
2216
2529
|
}
|
|
2217
2530
|
let value2 = undefined;
|
|
@@ -2224,7 +2537,7 @@
|
|
|
2224
2537
|
}
|
|
2225
2538
|
}
|
|
2226
2539
|
for (let key in obj2) {
|
|
2227
|
-
if ((0,
|
|
2540
|
+
if ((0, isFunction_9.isFunction)(obj2[key]) || ('undefined' != typeof (obj1[key]))) {
|
|
2228
2541
|
continue;
|
|
2229
2542
|
}
|
|
2230
2543
|
let res = diffObj(undefined, obj2[key], unchanged, true);
|
|
@@ -2233,7 +2546,7 @@
|
|
|
2233
2546
|
}
|
|
2234
2547
|
}
|
|
2235
2548
|
}
|
|
2236
|
-
return !notRoot || unchanged || (0,
|
|
2549
|
+
return !notRoot || unchanged || (0, numProperties_6.numProperties)(diff) ? diff : false;
|
|
2237
2550
|
};
|
|
2238
2551
|
exports.diffObj = diffObj;
|
|
2239
2552
|
});
|
|
@@ -2262,10 +2575,10 @@
|
|
|
2262
2575
|
"use strict";
|
|
2263
2576
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2264
2577
|
exports.isBlob = void 0;
|
|
2265
|
-
const isBlob = function () {
|
|
2266
|
-
if (!
|
|
2578
|
+
const isBlob = function (...args) {
|
|
2579
|
+
if (!args.length)
|
|
2267
2580
|
return false;
|
|
2268
|
-
for (let a of
|
|
2581
|
+
for (let a of args) {
|
|
2269
2582
|
if ({}.toString.apply(a) !== '[object Blob]') {
|
|
2270
2583
|
return false;
|
|
2271
2584
|
}
|
|
@@ -2293,10 +2606,10 @@
|
|
|
2293
2606
|
"use strict";
|
|
2294
2607
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2295
2608
|
exports.isCanvas = void 0;
|
|
2296
|
-
const isCanvas = function () {
|
|
2297
|
-
if (!
|
|
2609
|
+
const isCanvas = function (...args) {
|
|
2610
|
+
if (!args.length)
|
|
2298
2611
|
return false;
|
|
2299
|
-
for (let a of
|
|
2612
|
+
for (let a of args) {
|
|
2300
2613
|
if (!(a instanceof HTMLCanvasElement)) {
|
|
2301
2614
|
return false;
|
|
2302
2615
|
}
|
|
@@ -2305,13 +2618,22 @@
|
|
|
2305
2618
|
};
|
|
2306
2619
|
exports.isCanvas = isCanvas;
|
|
2307
2620
|
});
|
|
2308
|
-
define("fn/downloadContent", ["require", "exports", "fn/isCanvas", "fn/isObject", "fn/isString", "fn/log"], function (require, exports, isCanvas_1, isObject_13, isString_13,
|
|
2621
|
+
define("fn/downloadContent", ["require", "exports", "fn/isCanvas", "fn/isObject", "fn/isString", "fn/log"], function (require, exports, isCanvas_1, isObject_13, isString_13, log_13) {
|
|
2309
2622
|
"use strict";
|
|
2310
2623
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2311
2624
|
exports.downloadContent = void 0;
|
|
2312
2625
|
const downloadContent = function (filename, content, type) {
|
|
2313
2626
|
if ((0, isCanvas_1.isCanvas)(content)) {
|
|
2314
|
-
content.toBlob((blob) => {
|
|
2627
|
+
content.toBlob((blob) => {
|
|
2628
|
+
// blob ready, download it
|
|
2629
|
+
let a = document.createElement('a');
|
|
2630
|
+
a.download = filename;
|
|
2631
|
+
a.href = window.URL.createObjectURL(blob);
|
|
2632
|
+
a.className = 'bbn-no';
|
|
2633
|
+
a.click();
|
|
2634
|
+
// delete the internal blob reference, to let the browser clear memory from it
|
|
2635
|
+
window.URL.revokeObjectURL(a.href);
|
|
2636
|
+
}, type || 'image/png');
|
|
2315
2637
|
return;
|
|
2316
2638
|
}
|
|
2317
2639
|
if (!type) {
|
|
@@ -2331,14 +2653,16 @@
|
|
|
2331
2653
|
src = content;
|
|
2332
2654
|
}
|
|
2333
2655
|
catch (e) {
|
|
2334
|
-
(0,
|
|
2656
|
+
(0, log_13.log)(e);
|
|
2335
2657
|
}
|
|
2336
2658
|
}
|
|
2337
2659
|
a.href = window.URL.createObjectURL(src);
|
|
2338
2660
|
a.download = filename;
|
|
2661
|
+
// Append anchor to body.
|
|
2339
2662
|
document.body.appendChild(a);
|
|
2340
2663
|
a.click();
|
|
2341
2664
|
window.URL.revokeObjectURL(a.href);
|
|
2665
|
+
// Remove anchor from body
|
|
2342
2666
|
document.body.removeChild(a);
|
|
2343
2667
|
};
|
|
2344
2668
|
exports.downloadContent = downloadContent;
|
|
@@ -2348,6 +2672,7 @@
|
|
|
2348
2672
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2349
2673
|
exports.download = void 0;
|
|
2350
2674
|
const download = function (url, filename, params) {
|
|
2675
|
+
// We can intervert the arguments
|
|
2351
2676
|
if ((0, isObject_14.isObject)(filename)) {
|
|
2352
2677
|
params = filename;
|
|
2353
2678
|
filename = null;
|
|
@@ -2371,7 +2696,9 @@
|
|
|
2371
2696
|
}
|
|
2372
2697
|
}
|
|
2373
2698
|
(0, defaultAjaxErrorFunction_2.defaultAjaxErrorFunction)(e);
|
|
2374
|
-
}, e => {
|
|
2699
|
+
}, e => {
|
|
2700
|
+
(0, defaultAjaxErrorFunction_2.defaultAjaxErrorFunction)(e);
|
|
2701
|
+
});
|
|
2375
2702
|
};
|
|
2376
2703
|
exports.download = download;
|
|
2377
2704
|
});
|
|
@@ -2379,7 +2706,9 @@
|
|
|
2379
2706
|
"use strict";
|
|
2380
2707
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2381
2708
|
exports.eraseCookie = void 0;
|
|
2382
|
-
const eraseCookie = function (name) {
|
|
2709
|
+
const eraseCookie = function (name) {
|
|
2710
|
+
document.cookie = name + '=; Max-Age=-99999999;';
|
|
2711
|
+
};
|
|
2383
2712
|
exports.eraseCookie = eraseCookie;
|
|
2384
2713
|
});
|
|
2385
2714
|
define("fn/escapeDquotes", ["require", "exports", "fn/isString"], function (require, exports, isString_14) {
|
|
@@ -2434,7 +2763,9 @@
|
|
|
2434
2763
|
st += '://';
|
|
2435
2764
|
url = url.substring(3);
|
|
2436
2765
|
}
|
|
2437
|
-
(0, each_12.each)((0, dirName_1.dirName)(url).split('/'), a => {
|
|
2766
|
+
(0, each_12.each)((0, dirName_1.dirName)(url).split('/'), a => {
|
|
2767
|
+
st += encodeURIComponent(a) + '/';
|
|
2768
|
+
});
|
|
2438
2769
|
let base = (0, baseName_2.baseName)(url);
|
|
2439
2770
|
let sep = '?';
|
|
2440
2771
|
let existingParams = '';
|
|
@@ -2525,9 +2856,11 @@
|
|
|
2525
2856
|
res.push(arr[idx]);
|
|
2526
2857
|
start = idx + 1;
|
|
2527
2858
|
}
|
|
2528
|
-
(0, each_13.each)(arr, it => {
|
|
2529
|
-
|
|
2530
|
-
|
|
2859
|
+
(0, each_13.each)(arr, it => {
|
|
2860
|
+
if ((0, isArray_10.isArray)(it[deepProperty])) {
|
|
2861
|
+
findAll(it[deepProperty], filter, deepProperty, res);
|
|
2862
|
+
}
|
|
2863
|
+
});
|
|
2531
2864
|
return res;
|
|
2532
2865
|
};
|
|
2533
2866
|
exports.findAll = findAll;
|
|
@@ -2576,7 +2909,7 @@
|
|
|
2576
2909
|
};
|
|
2577
2910
|
exports.forir = forir;
|
|
2578
2911
|
});
|
|
2579
|
-
define("fn/format", ["require", "exports", "
|
|
2912
|
+
define("fn/format", ["require", "exports", "fn/checkType"], function (require, exports, checkType_1) {
|
|
2580
2913
|
"use strict";
|
|
2581
2914
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2582
2915
|
exports.format = void 0;
|
|
@@ -2584,7 +2917,11 @@
|
|
|
2584
2917
|
let args = Array.prototype.slice.call(arguments, 1);
|
|
2585
2918
|
if (args.length) {
|
|
2586
2919
|
let i = 0;
|
|
2587
|
-
return str.replace(/\%([d|s])/g, (match, type) => {
|
|
2920
|
+
return str.replace(/\%([d|s])/g, (match, type) => {
|
|
2921
|
+
let tmp = args[i++];
|
|
2922
|
+
(0, checkType_1.checkType)(tmp, type === 'd' ? 'number' : 'string', bbn._("The value doesn't correspond to the format"));
|
|
2923
|
+
return tmp;
|
|
2924
|
+
});
|
|
2588
2925
|
}
|
|
2589
2926
|
return str;
|
|
2590
2927
|
};
|
|
@@ -2607,7 +2944,9 @@
|
|
|
2607
2944
|
"use strict";
|
|
2608
2945
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2609
2946
|
exports.formatDate = void 0;
|
|
2610
|
-
const formatDate = function (date, format) {
|
|
2947
|
+
const formatDate = function (date, format) {
|
|
2948
|
+
return dayjs(date).format(format);
|
|
2949
|
+
};
|
|
2611
2950
|
exports.formatDate = formatDate;
|
|
2612
2951
|
});
|
|
2613
2952
|
define("fn/formatSize", ["require", "exports", "fn/isNumber", "fn/isString"], function (require, exports, isNumber_6, isString_18) {
|
|
@@ -2638,12 +2977,16 @@
|
|
|
2638
2977
|
v = (0, fieldValue_1.fieldValue)(input);
|
|
2639
2978
|
if ((v !== undefined) && !input.disabled) {
|
|
2640
2979
|
let name = input.name;
|
|
2641
|
-
if ((name.indexOf("[]") === -1) &&
|
|
2980
|
+
if ((name.indexOf("[]") === -1) &&
|
|
2981
|
+
(name.indexOf("[") > -1) &&
|
|
2982
|
+
(name.indexOf("]") > -1) &&
|
|
2983
|
+
(name.lastIndexOf("]") === name.length - 1)) {
|
|
2642
2984
|
name = (0, replaceAll_3.replaceAll)("][", ".", name);
|
|
2643
2985
|
name = (0, replaceAll_3.replaceAll)("[", ".", name);
|
|
2644
2986
|
name = (0, replaceAll_3.replaceAll)("]", "", name);
|
|
2645
2987
|
}
|
|
2646
|
-
if ((name.length > 2) &&
|
|
2988
|
+
if ((name.length > 2) &&
|
|
2989
|
+
(name.indexOf("[]") === (name.length - 2))) {
|
|
2647
2990
|
n = (0, substr_8.substr)(name, 0, name.length - 2);
|
|
2648
2991
|
if (res[n] === undefined) {
|
|
2649
2992
|
res[n] = [];
|
|
@@ -2670,6 +3013,7 @@
|
|
|
2670
3013
|
}
|
|
2671
3014
|
}
|
|
2672
3015
|
});
|
|
3016
|
+
// return num_changes ? res : false;
|
|
2673
3017
|
return res;
|
|
2674
3018
|
};
|
|
2675
3019
|
exports.formdata = formdata;
|
|
@@ -2733,7 +3077,9 @@
|
|
|
2733
3077
|
return wrong_result && (0, isString_19.isString)(wrong_result) ? wrong_result : '';
|
|
2734
3078
|
}
|
|
2735
3079
|
if (undefined !== dayjs) {
|
|
2736
|
-
return dayjs(r).calendar({
|
|
3080
|
+
return dayjs(r).calendar({
|
|
3081
|
+
sameElse: 'D/M/YY HH:mm'
|
|
3082
|
+
});
|
|
2737
3083
|
}
|
|
2738
3084
|
return r.toLocaleDateString();
|
|
2739
3085
|
};
|
|
@@ -2743,14 +3089,20 @@
|
|
|
2743
3089
|
"use strict";
|
|
2744
3090
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2745
3091
|
exports.unique = void 0;
|
|
2746
|
-
const unique = function (arr) {
|
|
3092
|
+
const unique = function (arr) {
|
|
3093
|
+
return arr.filter(function (el, index, ar) {
|
|
3094
|
+
return index === ar.indexOf(el);
|
|
3095
|
+
});
|
|
3096
|
+
};
|
|
2747
3097
|
exports.unique = unique;
|
|
2748
3098
|
});
|
|
2749
3099
|
define("fn/getAllTags", ["require", "exports", "fn/unique"], function (require, exports, unique_1) {
|
|
2750
3100
|
"use strict";
|
|
2751
3101
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2752
3102
|
exports.getAllTags = void 0;
|
|
2753
|
-
const getAllTags = function () {
|
|
3103
|
+
const getAllTags = function () {
|
|
3104
|
+
return (0, unique_1.unique)(Array.prototype.map.apply(document.all, [a => a.tagName.toLowerCase()]));
|
|
3105
|
+
};
|
|
2754
3106
|
exports.getAllTags = getAllTags;
|
|
2755
3107
|
});
|
|
2756
3108
|
define("fn/getAncestors", ["require", "exports", "fn/isString"], function (require, exports, isString_20) {
|
|
@@ -2792,7 +3144,9 @@
|
|
|
2792
3144
|
(0, error_3.error)("The element is not a proper HTML Element");
|
|
2793
3145
|
}
|
|
2794
3146
|
let res = Object.create(null);
|
|
2795
|
-
ele.getAttributeNames().forEach(name => {
|
|
3147
|
+
ele.getAttributeNames().forEach(name => {
|
|
3148
|
+
res[name] = ele.getAttribute(name);
|
|
3149
|
+
});
|
|
2796
3150
|
return res;
|
|
2797
3151
|
};
|
|
2798
3152
|
exports.getAttributes = getAttributes;
|
|
@@ -2801,32 +3155,53 @@
|
|
|
2801
3155
|
"use strict";
|
|
2802
3156
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2803
3157
|
exports.getBrowserName = void 0;
|
|
2804
|
-
const getBrowserName = function () {
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
3158
|
+
const getBrowserName = function () {
|
|
3159
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
3160
|
+
switch (true) {
|
|
3161
|
+
case userAgent.includes('edge'):
|
|
3162
|
+
case userAgent.includes('edg/'):
|
|
3163
|
+
return "Edge";
|
|
3164
|
+
case userAgent.includes('opr') && !!window.opr:
|
|
3165
|
+
return "Opera";
|
|
3166
|
+
case userAgent.includes('chrome') && !!window.chrome:
|
|
3167
|
+
return "Chrome";
|
|
3168
|
+
case userAgent.includes('trident'):
|
|
3169
|
+
return "Internet Explorer";
|
|
3170
|
+
case userAgent.includes('firefox'):
|
|
3171
|
+
return "Firefox";
|
|
3172
|
+
case userAgent.includes('safari'):
|
|
3173
|
+
return "Safari";
|
|
3174
|
+
default:
|
|
3175
|
+
return "Other";
|
|
3176
|
+
}
|
|
3177
|
+
};
|
|
2814
3178
|
exports.getBrowserName = getBrowserName;
|
|
2815
3179
|
});
|
|
2816
3180
|
define("fn/getBrowserVersion", ["require", "exports"], function (require, exports) {
|
|
2817
3181
|
"use strict";
|
|
2818
3182
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2819
3183
|
exports.getBrowserVersion = void 0;
|
|
2820
|
-
const getBrowserVersion = function () {
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
3184
|
+
const getBrowserVersion = function () {
|
|
3185
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
3186
|
+
switch (true) {
|
|
3187
|
+
case userAgent.includes('edge/'):
|
|
3188
|
+
return userAgent.split('edge/')[1].split(' ')[0];
|
|
3189
|
+
case userAgent.includes('edg/'):
|
|
3190
|
+
return userAgent.split('edg/')[1].split(' ')[0];
|
|
3191
|
+
case userAgent.includes('opr/') && !!window.opr:
|
|
3192
|
+
return userAgent.split('opr/')[1].split(' ')[0];
|
|
3193
|
+
case userAgent.includes('chrome/') && !!window.chrome:
|
|
3194
|
+
return userAgent.split('chrome/')[1].split(' ')[0];
|
|
3195
|
+
case userAgent.includes('trident/'):
|
|
3196
|
+
return userAgent.split('trident/')[1].split(' ')[0];
|
|
3197
|
+
case userAgent.includes('firefox/'):
|
|
3198
|
+
return userAgent.split('firefox/')[1].split(' ')[0];
|
|
3199
|
+
case userAgent.includes('safari/'):
|
|
3200
|
+
return userAgent.split('version/')[1].split(' ')[0];
|
|
3201
|
+
default:
|
|
3202
|
+
return '';
|
|
3203
|
+
}
|
|
3204
|
+
};
|
|
2830
3205
|
exports.getBrowserVersion = getBrowserVersion;
|
|
2831
3206
|
});
|
|
2832
3207
|
define("fn/getCookie", ["require", "exports"], function (require, exports) {
|
|
@@ -2901,14 +3276,14 @@
|
|
|
2901
3276
|
};
|
|
2902
3277
|
exports.getDeviceType = getDeviceType;
|
|
2903
3278
|
});
|
|
2904
|
-
define("fn/getHTMLOfSelection", ["require", "exports", "fn/log"], function (require, exports,
|
|
3279
|
+
define("fn/getHTMLOfSelection", ["require", "exports", "fn/log"], function (require, exports, log_14) {
|
|
2905
3280
|
"use strict";
|
|
2906
3281
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2907
3282
|
exports.getHTMLOfSelection = void 0;
|
|
2908
3283
|
const getHTMLOfSelection = function () {
|
|
2909
3284
|
let range;
|
|
2910
3285
|
if (document.selection && document.selection.createRange) {
|
|
2911
|
-
(0,
|
|
3286
|
+
(0, log_14.log)("METHOD 1");
|
|
2912
3287
|
range = document.selection.createRange();
|
|
2913
3288
|
return range.htmlText;
|
|
2914
3289
|
}
|
|
@@ -2916,9 +3291,9 @@
|
|
|
2916
3291
|
let selection = window.getSelection();
|
|
2917
3292
|
if (selection.rangeCount > 0) {
|
|
2918
3293
|
range = selection.getRangeAt(0);
|
|
2919
|
-
(0,
|
|
3294
|
+
(0, log_14.log)("RANGE", range);
|
|
2920
3295
|
let clonedSelection = range.cloneContents();
|
|
2921
|
-
(0,
|
|
3296
|
+
(0, log_14.log)("clonedSelection", clonedSelection);
|
|
2922
3297
|
let div = document.createElement('div');
|
|
2923
3298
|
div.appendChild(clonedSelection);
|
|
2924
3299
|
return div.innerHTML;
|
|
@@ -2933,7 +3308,7 @@
|
|
|
2933
3308
|
};
|
|
2934
3309
|
exports.getHTMLOfSelection = getHTMLOfSelection;
|
|
2935
3310
|
});
|
|
2936
|
-
define("fn/getEventData", ["require", "exports", "
|
|
3311
|
+
define("fn/getEventData", ["require", "exports", "fn/getHTMLOfSelection", "fn/each"], function (require, exports, getHTMLOfSelection_1, each_15) {
|
|
2937
3312
|
"use strict";
|
|
2938
3313
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2939
3314
|
exports.getEventData = void 0;
|
|
@@ -2947,12 +3322,21 @@
|
|
|
2947
3322
|
let sel = window.getSelection();
|
|
2948
3323
|
res.raw = sel.toString();
|
|
2949
3324
|
let html = (0, getHTMLOfSelection_1.getHTMLOfSelection)();
|
|
2950
|
-
res.str.push({
|
|
3325
|
+
res.str.push({
|
|
3326
|
+
type: 'text/plain',
|
|
3327
|
+
data: res.raw
|
|
3328
|
+
});
|
|
2951
3329
|
if (html !== res.raw) {
|
|
2952
|
-
res.str.push({
|
|
3330
|
+
res.str.push({
|
|
3331
|
+
type: 'text/html',
|
|
3332
|
+
data: html
|
|
3333
|
+
});
|
|
2953
3334
|
}
|
|
2954
3335
|
else if (res.raw.trim().indexOf('<') === 0) {
|
|
2955
|
-
res.str.push({
|
|
3336
|
+
res.str.push({
|
|
3337
|
+
type: 'text/html',
|
|
3338
|
+
data: "<meta charset='utf-8'><code style=\"white-space: pre; font-family: 'Courier New', sans-serif\">\n" + res.raw + "\n</code>"
|
|
3339
|
+
});
|
|
2956
3340
|
}
|
|
2957
3341
|
done = true;
|
|
2958
3342
|
ok(res);
|
|
@@ -2969,14 +3353,20 @@
|
|
|
2969
3353
|
let bits = cp.name.split('.');
|
|
2970
3354
|
type = bits[bits.length - 1];
|
|
2971
3355
|
}
|
|
2972
|
-
let name = cp ? cp.name :
|
|
3356
|
+
let name = cp ? cp.name : bbn._('untitled');
|
|
2973
3357
|
let size = cp ? cp.size : null;
|
|
2974
3358
|
let lastModified = cp ? cp.lastModified : null;
|
|
2975
3359
|
let blob = item.getAsFile();
|
|
2976
3360
|
if (blob) {
|
|
2977
3361
|
done = true;
|
|
2978
3362
|
num--;
|
|
2979
|
-
res.files.push({
|
|
3363
|
+
res.files.push({
|
|
3364
|
+
type: type,
|
|
3365
|
+
data: blob,
|
|
3366
|
+
name: name,
|
|
3367
|
+
size: size,
|
|
3368
|
+
mdate: lastModified
|
|
3369
|
+
});
|
|
2980
3370
|
strings.push(name);
|
|
2981
3371
|
if (!num) {
|
|
2982
3372
|
if (!res.raw) {
|
|
@@ -2986,14 +3376,17 @@
|
|
|
2986
3376
|
}
|
|
2987
3377
|
}
|
|
2988
3378
|
else {
|
|
2989
|
-
appui.error(
|
|
3379
|
+
appui.error(bbn._("Impossible to read the file") + ' ' + name);
|
|
2990
3380
|
}
|
|
2991
3381
|
}
|
|
2992
3382
|
else {
|
|
2993
3383
|
done = true;
|
|
2994
3384
|
item.getAsString((data) => {
|
|
2995
3385
|
num--;
|
|
2996
|
-
res.str.push({
|
|
3386
|
+
res.str.push({
|
|
3387
|
+
type: type,
|
|
3388
|
+
data: data
|
|
3389
|
+
});
|
|
2997
3390
|
if (type === 'text/plain') {
|
|
2998
3391
|
strings.push(name);
|
|
2999
3392
|
}
|
|
@@ -3008,20 +3401,22 @@
|
|
|
3008
3401
|
});
|
|
3009
3402
|
}
|
|
3010
3403
|
if (!done) {
|
|
3011
|
-
setTimeout(() => {
|
|
3404
|
+
setTimeout(() => {
|
|
3405
|
+
ok(res);
|
|
3406
|
+
});
|
|
3012
3407
|
}
|
|
3013
3408
|
});
|
|
3014
3409
|
return p;
|
|
3015
3410
|
};
|
|
3016
3411
|
exports.getEventData = getEventData;
|
|
3017
3412
|
});
|
|
3018
|
-
define("fn/getField", ["require", "exports"
|
|
3413
|
+
define("fn/getField", ["require", "exports"], function (require, exports) {
|
|
3019
3414
|
"use strict";
|
|
3020
3415
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3021
3416
|
exports.getField = void 0;
|
|
3022
3417
|
const getField = function (arr, field, prop, val, operator) {
|
|
3023
3418
|
var r;
|
|
3024
|
-
if (field && (r =
|
|
3419
|
+
if (field && (r = bbn.fn.getRow(arr, prop, val, operator))) {
|
|
3025
3420
|
return r[field];
|
|
3026
3421
|
}
|
|
3027
3422
|
return undefined;
|
|
@@ -3073,8 +3468,11 @@
|
|
|
3073
3468
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3074
3469
|
exports.getPath = void 0;
|
|
3075
3470
|
const getPath = function (element) {
|
|
3076
|
-
let path,
|
|
3471
|
+
let path,
|
|
3472
|
+
//node = $(element),
|
|
3473
|
+
node = element, done = false;
|
|
3077
3474
|
while (node.length) {
|
|
3475
|
+
//let realNode = node[0],
|
|
3078
3476
|
let realNode = node, name = realNode.localName;
|
|
3079
3477
|
if (!name)
|
|
3080
3478
|
break;
|
|
@@ -3089,9 +3487,17 @@
|
|
|
3089
3487
|
}
|
|
3090
3488
|
done = 1;
|
|
3091
3489
|
}
|
|
3092
|
-
|
|
3490
|
+
//var parent = node.parent(),
|
|
3491
|
+
let parent = node.parentNode,
|
|
3492
|
+
//sameTagSiblings = parent.children(name);
|
|
3493
|
+
sameTagSiblings = parent.children.filter(val => {
|
|
3494
|
+
return val.tagName === name;
|
|
3495
|
+
});
|
|
3093
3496
|
if (sameTagSiblings.length > 1) {
|
|
3094
|
-
|
|
3497
|
+
//var allSiblings = parent.children(),
|
|
3498
|
+
let allSiblings = parent.children,
|
|
3499
|
+
//index = allSiblings.index(realNode) + 1;
|
|
3500
|
+
index = allSiblings.indexOf(realNode) + 1;
|
|
3095
3501
|
if (index > 1) {
|
|
3096
3502
|
name += ':nth-child(' + index + ')';
|
|
3097
3503
|
}
|
|
@@ -3103,35 +3509,42 @@
|
|
|
3103
3509
|
};
|
|
3104
3510
|
exports.getPath = getPath;
|
|
3105
3511
|
});
|
|
3106
|
-
define("fn/getProp", ["require", "exports"
|
|
3512
|
+
define("fn/getProp", ["require", "exports"], function (require, exports) {
|
|
3107
3513
|
"use strict";
|
|
3108
3514
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3109
3515
|
exports.getProp = void 0;
|
|
3110
|
-
const getProp = function (obj, prop) {
|
|
3516
|
+
const getProp = function (obj, prop) {
|
|
3517
|
+
checkType(obj, "object", bbn._("The obj must be an object in setProp"));
|
|
3518
|
+
checkType(prop, "string", bbn._("The prop must be a string in setProp"));
|
|
3519
|
+
return obj[prop];
|
|
3520
|
+
};
|
|
3111
3521
|
exports.getProp = getProp;
|
|
3112
3522
|
});
|
|
3113
|
-
define("fn/getScrollBarSize", ["require", "exports"
|
|
3523
|
+
define("fn/getScrollBarSize", ["require", "exports"], function (require, exports) {
|
|
3114
3524
|
"use strict";
|
|
3115
3525
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3116
3526
|
exports.getScrollBarSize = void 0;
|
|
3117
3527
|
const getScrollBarSize = function () {
|
|
3118
|
-
if (
|
|
3528
|
+
if (bbn.env.scrollBarSize === undefined) {
|
|
3119
3529
|
let outer = document.createElement("div");
|
|
3120
3530
|
outer.style.visibility = "hidden";
|
|
3121
3531
|
outer.style.width = "100px";
|
|
3122
|
-
outer.style.msOverflowStyle = "scrollbar";
|
|
3532
|
+
outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps
|
|
3123
3533
|
document.body.appendChild(outer);
|
|
3124
3534
|
let widthNoScroll = outer.offsetWidth;
|
|
3535
|
+
// force scrollbars
|
|
3125
3536
|
outer.style.overflow = "scroll";
|
|
3537
|
+
// add innerdiv
|
|
3126
3538
|
let inner = document.createElement("div");
|
|
3127
3539
|
inner.style.width = "100%";
|
|
3128
3540
|
outer.appendChild(inner);
|
|
3129
3541
|
let widthWithScroll = inner.offsetWidth;
|
|
3542
|
+
// remove divs
|
|
3130
3543
|
outer.parentNode.removeChild(outer);
|
|
3131
3544
|
let sz = widthNoScroll - widthWithScroll;
|
|
3132
|
-
|
|
3545
|
+
bbn.env.scrollBarSize = sz ? sz + 1 : 0;
|
|
3133
3546
|
}
|
|
3134
|
-
return
|
|
3547
|
+
return bbn.env.scrollBarSize;
|
|
3135
3548
|
};
|
|
3136
3549
|
exports.getScrollBarSize = getScrollBarSize;
|
|
3137
3550
|
});
|
|
@@ -3139,71 +3552,111 @@
|
|
|
3139
3552
|
"use strict";
|
|
3140
3553
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3141
3554
|
exports.getText = void 0;
|
|
3142
|
-
const getText = function (ele) {
|
|
3555
|
+
const getText = function (ele) {
|
|
3556
|
+
return ele.innerText().trim();
|
|
3557
|
+
};
|
|
3143
3558
|
exports.getText = getText;
|
|
3144
3559
|
});
|
|
3145
|
-
define("fn/getTimeoff", ["require", "exports"
|
|
3560
|
+
define("fn/getTimeoff", ["require", "exports"], function (require, exports) {
|
|
3146
3561
|
"use strict";
|
|
3147
3562
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3148
3563
|
exports.getTimeoff = void 0;
|
|
3149
3564
|
const getTimeoff = function () {
|
|
3150
|
-
if (!
|
|
3151
|
-
return Math.round((new Date()).getTime() / 1000 -
|
|
3565
|
+
if (!bbn.env.isFocused) {
|
|
3566
|
+
return Math.round((new Date()).getTime() / 1000 - bbn.env.timeoff);
|
|
3152
3567
|
}
|
|
3153
3568
|
return 0;
|
|
3154
3569
|
};
|
|
3155
3570
|
exports.getTimeoff = getTimeoff;
|
|
3156
3571
|
});
|
|
3157
|
-
define("fn/happy", ["require", "exports", "fn/log"], function (require, exports,
|
|
3572
|
+
define("fn/happy", ["require", "exports", "fn/log"], function (require, exports, log_15) {
|
|
3158
3573
|
"use strict";
|
|
3159
3574
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3160
3575
|
exports.happy = void 0;
|
|
3161
|
-
const happy = function (...args) {
|
|
3576
|
+
const happy = function (...args) {
|
|
3577
|
+
args.unshift({
|
|
3578
|
+
_bbn_console_level: 3,
|
|
3579
|
+
_bbn_console_style: "color: white; background: green; font-size: 18px;"
|
|
3580
|
+
});
|
|
3581
|
+
log_15.log.apply(this, args);
|
|
3582
|
+
return this;
|
|
3583
|
+
};
|
|
3162
3584
|
exports.happy = happy;
|
|
3163
3585
|
});
|
|
3164
3586
|
define("fn/hex2rgb", ["require", "exports"], function (require, exports) {
|
|
3165
3587
|
"use strict";
|
|
3166
3588
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3167
3589
|
exports.hex2rgb = void 0;
|
|
3168
|
-
const hex2rgb = function (hex) {
|
|
3590
|
+
const hex2rgb = function (hex) {
|
|
3591
|
+
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
3592
|
+
return result ? {
|
|
3593
|
+
r: parseInt(result[1], 16),
|
|
3594
|
+
g: parseInt(result[2], 16),
|
|
3595
|
+
b: parseInt(result[3], 16)
|
|
3596
|
+
} : null;
|
|
3597
|
+
};
|
|
3169
3598
|
exports.hex2rgb = hex2rgb;
|
|
3170
3599
|
});
|
|
3171
3600
|
define("fn/history", ["require", "exports"], function (require, exports) {
|
|
3172
3601
|
"use strict";
|
|
3173
3602
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3174
3603
|
exports.history = void 0;
|
|
3175
|
-
const history = function () {
|
|
3604
|
+
const history = function () {
|
|
3605
|
+
return window.history || false;
|
|
3606
|
+
};
|
|
3176
3607
|
exports.history = history;
|
|
3177
3608
|
});
|
|
3178
3609
|
define("fn/html2text", ["require", "exports"], function (require, exports) {
|
|
3179
3610
|
"use strict";
|
|
3180
3611
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3181
3612
|
exports.html2text = void 0;
|
|
3182
|
-
const html2text = function (st) {
|
|
3613
|
+
const html2text = function (st) {
|
|
3614
|
+
let $test = document.createElement('div');
|
|
3615
|
+
$test.innerHTML = st;
|
|
3616
|
+
st = $test.innerText;
|
|
3617
|
+
return st;
|
|
3618
|
+
};
|
|
3183
3619
|
exports.html2text = html2text;
|
|
3184
3620
|
});
|
|
3185
3621
|
define("fn/imageToCanvas", ["require", "exports"], function (require, exports) {
|
|
3186
3622
|
"use strict";
|
|
3187
3623
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3188
3624
|
exports.imageToCanvas = void 0;
|
|
3189
|
-
const imageToCanvas = function (img) {
|
|
3625
|
+
const imageToCanvas = function (img) {
|
|
3626
|
+
let canvas = document.createElement("canvas");
|
|
3627
|
+
canvas.width = img.width;
|
|
3628
|
+
canvas.height = img.height;
|
|
3629
|
+
canvas.getContext("2d").drawImage(img, 0, 0);
|
|
3630
|
+
return canvas;
|
|
3631
|
+
};
|
|
3190
3632
|
exports.imageToCanvas = imageToCanvas;
|
|
3191
3633
|
});
|
|
3192
3634
|
define("fn/imgToBase64", ["require", "exports", "fn/imageToCanvas", "fn/canvasToImage"], function (require, exports, imageToCanvas_1, canvasToImage_1) {
|
|
3193
3635
|
"use strict";
|
|
3194
3636
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3195
3637
|
exports.imgToBase64 = void 0;
|
|
3196
|
-
const imgToBase64 = function (img) {
|
|
3638
|
+
const imgToBase64 = function (img) {
|
|
3639
|
+
let canvas = (0, imageToCanvas_1.imageToCanvas)(img);
|
|
3640
|
+
return (0, canvasToImage_1.canvasToImage)(canvas);
|
|
3641
|
+
};
|
|
3197
3642
|
exports.imgToBase64 = imgToBase64;
|
|
3198
3643
|
});
|
|
3199
|
-
define("fn/info", ["require", "exports", "fn/log"], function (require, exports,
|
|
3644
|
+
define("fn/info", ["require", "exports", "fn/log"], function (require, exports, log_16) {
|
|
3200
3645
|
"use strict";
|
|
3201
3646
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3202
3647
|
exports.info = void 0;
|
|
3203
|
-
const info = function (...args) {
|
|
3648
|
+
const info = function (...args) {
|
|
3649
|
+
args.unshift({
|
|
3650
|
+
//_bbn_console_mode: "info",
|
|
3651
|
+
_bbn_console_level: 4,
|
|
3652
|
+
_bbn_console_style: "color: #EEE; background: blue; font-size: 12px;"
|
|
3653
|
+
});
|
|
3654
|
+
log_16.log.apply(this, args);
|
|
3655
|
+
return this;
|
|
3656
|
+
};
|
|
3204
3657
|
exports.info = info;
|
|
3205
3658
|
});
|
|
3206
|
-
define("fn/treatAjaxArguments", ["require", "exports", "
|
|
3659
|
+
define("fn/treatAjaxArguments", ["require", "exports", "fn/isObject", "fn/isFunction", "fn/substr", "fn/numProperties"], function (require, exports, isObject_16, isFunction_10, substr_9, numProperties_7) {
|
|
3207
3660
|
"use strict";
|
|
3208
3661
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3209
3662
|
exports.treatAjaxArguments = void 0;
|
|
@@ -3215,7 +3668,8 @@
|
|
|
3215
3668
|
for (i = 0; i < args.length; i++) {
|
|
3216
3669
|
t = typeof (args[i]);
|
|
3217
3670
|
t = t.toLowerCase();
|
|
3218
|
-
|
|
3671
|
+
/* Callbacks */
|
|
3672
|
+
if ((0, isFunction_10.isFunction)(args[i])) {
|
|
3219
3673
|
if (cfg.errorFn && !cfg.abortFn) {
|
|
3220
3674
|
cfg.abortFn = args[i];
|
|
3221
3675
|
}
|
|
@@ -3226,39 +3680,46 @@
|
|
|
3226
3680
|
cfg.successFn = args[i];
|
|
3227
3681
|
}
|
|
3228
3682
|
}
|
|
3683
|
+
/* Force */
|
|
3229
3684
|
else if ((args[i] === 1) || (args[i] === true)) {
|
|
3230
3685
|
cfg.force = true;
|
|
3231
3686
|
}
|
|
3232
3687
|
else if (t === 'string') {
|
|
3233
3688
|
if (!cfg.url) {
|
|
3234
|
-
|
|
3235
|
-
|
|
3689
|
+
/* Hash */
|
|
3690
|
+
if (args[i].indexOf('#') === 0 || args[i].indexOf(bbn.env.root + '#') === 0) {
|
|
3691
|
+
cfg.url = (0, substr_9.substr)(args[i], bbn.env.root.length);
|
|
3236
3692
|
}
|
|
3693
|
+
/* Link */
|
|
3237
3694
|
else {
|
|
3238
3695
|
cfg.url = args[i];
|
|
3239
|
-
if (cfg.url.indexOf(
|
|
3240
|
-
cfg.url = (0, substr_9.substr)(cfg.url,
|
|
3696
|
+
if (cfg.url.indexOf(bbn.env.root) === 0) {
|
|
3697
|
+
cfg.url = (0, substr_9.substr)(cfg.url, bbn.env.root.length);
|
|
3241
3698
|
}
|
|
3242
3699
|
}
|
|
3243
3700
|
}
|
|
3701
|
+
/* Ajax datatype */
|
|
3244
3702
|
else {
|
|
3245
3703
|
cfg.datatype = args[i];
|
|
3246
3704
|
}
|
|
3247
3705
|
}
|
|
3706
|
+
/* Event */
|
|
3248
3707
|
else if (args[i] && (t === 'object')) {
|
|
3249
3708
|
if (args[i] instanceof Event) {
|
|
3250
3709
|
cfg.e = args[i];
|
|
3251
3710
|
}
|
|
3711
|
+
/* HTML Element */
|
|
3252
3712
|
else if (!cfg.ele && (args[i].nodeType === 1)) {
|
|
3253
3713
|
cfg.ele = args[i];
|
|
3254
3714
|
}
|
|
3715
|
+
/* An object to post */
|
|
3255
3716
|
else if (t.toLowerCase() === 'object') {
|
|
3256
3717
|
cfg.obj = args[i];
|
|
3257
3718
|
}
|
|
3258
3719
|
}
|
|
3259
3720
|
}
|
|
3260
|
-
if (!cfg.url && (0,
|
|
3261
|
-
cfg.url =
|
|
3721
|
+
if (!cfg.url && (0, numProperties_7.numProperties)(cfg)) {
|
|
3722
|
+
cfg.url = bbn.env.path;
|
|
3262
3723
|
}
|
|
3263
3724
|
if (cfg.obj === undefined) {
|
|
3264
3725
|
cfg.obj = { _bbn: "public" };
|
|
@@ -3270,20 +3731,34 @@
|
|
|
3270
3731
|
};
|
|
3271
3732
|
exports.treatAjaxArguments = treatAjaxArguments;
|
|
3272
3733
|
});
|
|
3273
|
-
define("fn/setNavigationVars", ["require", "exports", "
|
|
3734
|
+
define("fn/setNavigationVars", ["require", "exports", "fn/substr", "fn/filter", "fn/extend", "fn/html2text"], function (require, exports, substr_10, filter_4, extend_5, html2text_1) {
|
|
3274
3735
|
"use strict";
|
|
3275
3736
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3276
3737
|
exports.setNavigationVars = void 0;
|
|
3277
3738
|
const setNavigationVars = function (url, title, data, repl) {
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3739
|
+
// Current path becomes old path
|
|
3740
|
+
bbn.env.old_path = bbn.env.path;
|
|
3741
|
+
// URL includes the domain
|
|
3742
|
+
bbn.env.url = ['https:/', 'http://'].includes((0, substr_10.substr)(url, 0, 7)) ? url : bbn.env.root + url;
|
|
3743
|
+
// Path does not
|
|
3744
|
+
bbn.env.path = (0, substr_10.substr)(bbn.env.url, bbn.env.root.length);
|
|
3745
|
+
// Params will include each part of the URL
|
|
3746
|
+
bbn.env.params = (0, filter_4.filter)(bbn.env.path.split("/"), (v) => {
|
|
3747
|
+
return v !== '';
|
|
3748
|
+
});
|
|
3749
|
+
// Managing history
|
|
3282
3750
|
let h = window.history;
|
|
3283
3751
|
if (h) {
|
|
3752
|
+
// Current state
|
|
3284
3753
|
let state = h.state;
|
|
3285
|
-
|
|
3286
|
-
|
|
3754
|
+
// Future state
|
|
3755
|
+
let obj = {
|
|
3756
|
+
url: bbn.env.path,
|
|
3757
|
+
old_path: bbn.env.old_path || null,
|
|
3758
|
+
data: data || {}
|
|
3759
|
+
};
|
|
3760
|
+
// If same URL we replace
|
|
3761
|
+
if (state && (state.url === bbn.env.path)) {
|
|
3287
3762
|
if (state.data) {
|
|
3288
3763
|
(0, extend_5.extend)(obj.data, state.data);
|
|
3289
3764
|
}
|
|
@@ -3292,24 +3767,28 @@
|
|
|
3292
3767
|
}
|
|
3293
3768
|
repl = 1;
|
|
3294
3769
|
}
|
|
3770
|
+
// If no title the global title
|
|
3295
3771
|
if (!title) {
|
|
3296
|
-
title =
|
|
3772
|
+
title = bbn.env.siteTitle;
|
|
3297
3773
|
}
|
|
3774
|
+
// Otherwise we add the global title at the end
|
|
3298
3775
|
else {
|
|
3299
3776
|
title = (0, html2text_1.html2text)(title);
|
|
3300
3777
|
}
|
|
3778
|
+
// Replacing state
|
|
3301
3779
|
if (repl) {
|
|
3302
3780
|
obj.reload = 1;
|
|
3303
|
-
h.replaceState(obj, title,
|
|
3781
|
+
h.replaceState(obj, title, bbn.env.url);
|
|
3304
3782
|
}
|
|
3783
|
+
// Adding state
|
|
3305
3784
|
else {
|
|
3306
|
-
h.pushState(obj, title,
|
|
3785
|
+
h.pushState(obj, title, bbn.env.url);
|
|
3307
3786
|
}
|
|
3308
3787
|
}
|
|
3309
3788
|
};
|
|
3310
3789
|
exports.setNavigationVars = setNavigationVars;
|
|
3311
3790
|
});
|
|
3312
|
-
define("fn/link", ["require", "exports", "
|
|
3791
|
+
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) {
|
|
3313
3792
|
"use strict";
|
|
3314
3793
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3315
3794
|
exports.link = void 0;
|
|
@@ -3318,9 +3797,11 @@
|
|
|
3318
3797
|
if (cfg === true) {
|
|
3319
3798
|
return true;
|
|
3320
3799
|
}
|
|
3800
|
+
/* If we can't find a correct link we load the current URL */
|
|
3321
3801
|
if (!cfg) {
|
|
3322
3802
|
return link(window.location.href);
|
|
3323
3803
|
}
|
|
3804
|
+
/* Just executing the javascript if there is */
|
|
3324
3805
|
if (cfg.url.indexOf('javascript:') === 0) {
|
|
3325
3806
|
return true;
|
|
3326
3807
|
}
|
|
@@ -3328,26 +3809,41 @@
|
|
|
3328
3809
|
return true;
|
|
3329
3810
|
}
|
|
3330
3811
|
if (cfg.url.indexOf('#') === 0) {
|
|
3331
|
-
location.href =
|
|
3812
|
+
location.href = bbn.env.url + cfg.url;
|
|
3813
|
+
/*
|
|
3814
|
+
if ( window.history ){
|
|
3815
|
+
bbn.env.historyDisabled = true;
|
|
3816
|
+
let state = h.state;
|
|
3817
|
+
window.history.replaceState(null, state.title, bbn.env.url);
|
|
3818
|
+
}
|
|
3819
|
+
bbn.env.historyDisabled = false;
|
|
3820
|
+
*/
|
|
3332
3821
|
return true;
|
|
3333
3822
|
}
|
|
3823
|
+
/* Mail link */
|
|
3334
3824
|
else if (cfg.url.indexOf('mailto:') === 0) {
|
|
3335
|
-
|
|
3825
|
+
bbn.env.ignoreUnload = true;
|
|
3336
3826
|
window.location.href = cfg.url;
|
|
3337
|
-
setTimeout(() => {
|
|
3827
|
+
setTimeout(() => {
|
|
3828
|
+
bbn.env.ignoreUnload = false;
|
|
3829
|
+
}, 0);
|
|
3338
3830
|
return false;
|
|
3339
3831
|
}
|
|
3340
3832
|
if ((0, getLoader_3.getLoader)(cfg.url)) {
|
|
3341
3833
|
return false;
|
|
3342
3834
|
}
|
|
3343
|
-
|
|
3835
|
+
/* Opens an external page in a new window */
|
|
3836
|
+
if (((cfg.url.indexOf("http://") === 0) || (cfg.url.indexOf("https://") === 0)) &&
|
|
3837
|
+
(cfg.url.indexOf(bbn.env.host) !== 0)) {
|
|
3344
3838
|
if (cfg.e) {
|
|
3345
3839
|
cfg.e.preventDefault();
|
|
3346
3840
|
}
|
|
3347
3841
|
window.open(cfg.url);
|
|
3348
3842
|
return false;
|
|
3349
3843
|
}
|
|
3350
|
-
|
|
3844
|
+
/* The URL is fine so go ahead if something is not already loading */
|
|
3845
|
+
else if ((cfg.url !== bbn.env.params.join("/")) || (cfg.force === 1)) {
|
|
3846
|
+
/* If a second callback is defined, it is triggered instead of defaultPreLinkFunction */
|
|
3351
3847
|
if (cfg.successFn) {
|
|
3352
3848
|
ok = cfg.successFn(cfg.url);
|
|
3353
3849
|
}
|
|
@@ -3362,14 +3858,16 @@
|
|
|
3362
3858
|
if (ok !== 1 && (typeof ok === 'string')) {
|
|
3363
3859
|
cfg.url = ok;
|
|
3364
3860
|
}
|
|
3365
|
-
|
|
3861
|
+
/** 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? */
|
|
3862
|
+
let errSt = bbn._("The Ajax call to") + ' ' + cfg.url + ' ';
|
|
3366
3863
|
return (0, ajax_2.ajax)(cfg.url, cfg.datatype, cfg.obj, function (res) {
|
|
3367
3864
|
if (!res) {
|
|
3368
|
-
(0,
|
|
3865
|
+
(0, log_17.log)(errSt + bbn._("returned no answer"));
|
|
3369
3866
|
}
|
|
3370
3867
|
if ((0, isObject_17.isObject)(res)) {
|
|
3868
|
+
// If there's nothing in the result, just an empty object, the callback stops here and the URL is not changed
|
|
3371
3869
|
if ((Object.keys(res).length === 0)) {
|
|
3372
|
-
(0,
|
|
3870
|
+
(0, log_17.log)(errSt + bbn._("returned an empty object"));
|
|
3373
3871
|
}
|
|
3374
3872
|
if (res.new_url) {
|
|
3375
3873
|
res.old_path = cfg.url;
|
|
@@ -3379,9 +3877,11 @@
|
|
|
3379
3877
|
res.old_path = cfg.url;
|
|
3380
3878
|
}
|
|
3381
3879
|
}
|
|
3382
|
-
if ((0, callback_1.callback)(cfg.url, res, cfg.successFn, null, cfg.ele) &&
|
|
3383
|
-
|
|
3384
|
-
|
|
3880
|
+
if ((0, callback_1.callback)(cfg.url, res, cfg.successFn, null, cfg.ele) &&
|
|
3881
|
+
res.noNav === undefined) {
|
|
3882
|
+
// This solution is not very clean (we can't shorten a URL)
|
|
3883
|
+
if (bbn.env.path.indexOf(cfg.url) !== 0) {
|
|
3884
|
+
(0, setNavigationVars_1.setNavigationVars)(cfg.url, (res.title ? res.title + ' - ' : '') + bbn.env.siteTitle);
|
|
3385
3885
|
}
|
|
3386
3886
|
}
|
|
3387
3887
|
}, cfg.errorFn || null);
|
|
@@ -3395,31 +3895,47 @@
|
|
|
3395
3895
|
"use strict";
|
|
3396
3896
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3397
3897
|
exports.post = void 0;
|
|
3398
|
-
const post = function () {
|
|
3399
|
-
|
|
3400
|
-
|
|
3898
|
+
const post = function () {
|
|
3899
|
+
let cfg = (0, treatAjaxArguments_2.treatAjaxArguments)(arguments);
|
|
3900
|
+
if (cfg.url) {
|
|
3901
|
+
return (0, ajax_3.ajax)(cfg.url, cfg.datatype, cfg.obj, (res) => {
|
|
3902
|
+
(0, callback_2.callback)(cfg.url, res, cfg.successFn, false, cfg.ele);
|
|
3903
|
+
}, cfg.errorFn, cfg.abortFn);
|
|
3904
|
+
}
|
|
3905
|
+
};
|
|
3401
3906
|
exports.post = post;
|
|
3402
3907
|
});
|
|
3403
|
-
define("fn/submit", ["require", "exports", "
|
|
3908
|
+
define("fn/submit", ["require", "exports", "fn/formdata", "fn/isFunction", "fn/isString", "fn/post"], function (require, exports, formdata_1, isFunction_11, isString_22, post_1) {
|
|
3404
3909
|
"use strict";
|
|
3405
3910
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3406
3911
|
exports.submit = void 0;
|
|
3407
3912
|
const submit = function (form, e, fn) {
|
|
3408
|
-
let url = form.getAttribute("action") ||
|
|
3913
|
+
let url = form.getAttribute("action") || bbn.env.path, data;
|
|
3409
3914
|
if (url === '') {
|
|
3410
3915
|
url = '.';
|
|
3411
3916
|
}
|
|
3917
|
+
//if ( (typeof(url) === 'string') && (url.indexOf("http") !== 0 || url.indexOf(window.document.location.hostname) !== -1) && !form.is("[target]") ){
|
|
3412
3918
|
if ((typeof (url) === 'string') && (url.indexOf("http") !== 0 || url.indexOf(window.document.location.hostname) !== -1) && !form.getAttribute("target")) {
|
|
3413
3919
|
if (e) {
|
|
3414
3920
|
e.preventDefault();
|
|
3415
3921
|
}
|
|
3416
3922
|
data = (0, formdata_1.formdata)(form);
|
|
3417
3923
|
if (data) {
|
|
3924
|
+
//$form.attr("action", null);
|
|
3418
3925
|
form.setAttribute('action', null);
|
|
3926
|
+
//$form.data("bbnSubmit", 1);
|
|
3419
3927
|
form.dataset.bbnSubmit = 1;
|
|
3928
|
+
//var script = $form.data("script");
|
|
3420
3929
|
let script = form.dataset.script;
|
|
3421
|
-
if ((0,
|
|
3422
|
-
form.
|
|
3930
|
+
if ((0, isFunction_11.isFunction)(script)) {
|
|
3931
|
+
/*$form.data("script", function(d){
|
|
3932
|
+
$form.attr("action", url);
|
|
3933
|
+
script(d);
|
|
3934
|
+
})*/
|
|
3935
|
+
form.dataset.script = d => {
|
|
3936
|
+
form.setAttribute("action", url);
|
|
3937
|
+
script(d);
|
|
3938
|
+
};
|
|
3423
3939
|
}
|
|
3424
3940
|
if (!fn) {
|
|
3425
3941
|
fn = form.getAttribute("data-script");
|
|
@@ -3438,24 +3954,24 @@
|
|
|
3438
3954
|
};
|
|
3439
3955
|
exports.submit = submit;
|
|
3440
3956
|
});
|
|
3441
|
-
define("fn/resize", ["require", "exports", "
|
|
3957
|
+
define("fn/resize", ["require", "exports", "fn/getCssVar", "fn/each", "fn/defaultResizeFunction"], function (require, exports, getCssVar_1, each_17, defaultResizeFunction_1) {
|
|
3442
3958
|
"use strict";
|
|
3443
3959
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3444
3960
|
exports.resize = void 0;
|
|
3445
3961
|
const resize = function () {
|
|
3446
|
-
let diffW =
|
|
3447
|
-
let diffH =
|
|
3962
|
+
let diffW = bbn.env.width !== window.innerWidth;
|
|
3963
|
+
let diffH = bbn.env.height !== window.innerHeight;
|
|
3448
3964
|
if (diffW || diffH) {
|
|
3449
3965
|
if (diffW) {
|
|
3450
|
-
|
|
3451
|
-
document.documentElement.style.setProperty('--vw', (
|
|
3966
|
+
bbn.env.width = window.innerWidth || window.document.documentElement.clientWidth || window.document.body.clientWidth;
|
|
3967
|
+
document.documentElement.style.setProperty('--vw', (bbn.env.width * 0.01) + 'px');
|
|
3452
3968
|
}
|
|
3453
3969
|
if (diffH) {
|
|
3454
|
-
|
|
3455
|
-
document.documentElement.style.setProperty('--vh', (
|
|
3970
|
+
bbn.env.height = window.innerHeight || window.document.documentElement.clientHeight || window.document.body.clientHeight;
|
|
3971
|
+
document.documentElement.style.setProperty('--vh', (bbn.env.height * 0.01) + 'px');
|
|
3456
3972
|
}
|
|
3457
3973
|
let smallWidth = (0, getCssVar_1.getCssVar)('mobile-limit') || 650;
|
|
3458
|
-
let newCls = 'bbn-screen-' + (
|
|
3974
|
+
let newCls = 'bbn-screen-' + (bbn.env.width < parseInt(smallWidth) ? 'small' : 'regular');
|
|
3459
3975
|
let classes = (document.body.className || '').split(' ');
|
|
3460
3976
|
let done = false;
|
|
3461
3977
|
(0, each_17.each)(classes, (cls, idx) => {
|
|
@@ -3481,64 +3997,116 @@
|
|
|
3481
3997
|
"use strict";
|
|
3482
3998
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3483
3999
|
exports.isMobileDevice = void 0;
|
|
3484
|
-
const isMobileDevice = function () {
|
|
4000
|
+
const isMobileDevice = function () {
|
|
4001
|
+
return this.getDeviceType() === 'mobile';
|
|
4002
|
+
};
|
|
3485
4003
|
exports.isMobileDevice = isMobileDevice;
|
|
3486
4004
|
});
|
|
3487
4005
|
define("fn/isTabletDevice", ["require", "exports"], function (require, exports) {
|
|
3488
4006
|
"use strict";
|
|
3489
4007
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3490
4008
|
exports.isTabletDevice = void 0;
|
|
3491
|
-
const isTabletDevice = function () {
|
|
4009
|
+
const isTabletDevice = function () {
|
|
4010
|
+
return this.getDeviceType() === 'tablet';
|
|
4011
|
+
};
|
|
3492
4012
|
exports.isTabletDevice = isTabletDevice;
|
|
3493
4013
|
});
|
|
3494
4014
|
define("fn/isMobile", ["require", "exports", "fn/isMobileDevice", "fn/isTabletDevice"], function (require, exports, isMobileDevice_1, isTabletDevice_1) {
|
|
3495
4015
|
"use strict";
|
|
3496
4016
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3497
4017
|
exports.isMobile = void 0;
|
|
3498
|
-
const isMobile = function () {
|
|
4018
|
+
const isMobile = function () {
|
|
4019
|
+
return (0, isMobileDevice_1.isMobileDevice)() || (0, isTabletDevice_1.isTabletDevice)();
|
|
4020
|
+
};
|
|
3499
4021
|
exports.isMobile = isMobile;
|
|
3500
4022
|
});
|
|
3501
|
-
define("fn/init", ["require", "exports", "
|
|
4023
|
+
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) {
|
|
3502
4024
|
"use strict";
|
|
3503
4025
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3504
4026
|
exports.init = void 0;
|
|
3505
4027
|
const init = function (cfg, force) {
|
|
3506
4028
|
let parts;
|
|
3507
|
-
if (!
|
|
3508
|
-
|
|
3509
|
-
if (
|
|
3510
|
-
|
|
3511
|
-
}
|
|
3512
|
-
if (!
|
|
3513
|
-
(0, each_18.each)([
|
|
3514
|
-
|
|
3515
|
-
|
|
4029
|
+
if (!bbn.env.isInit || force) {
|
|
4030
|
+
bbn.env.root = document.baseURI.length > 0 ? document.baseURI : bbn.env.host;
|
|
4031
|
+
if (bbn.env.root.length && ((0, substr_11.substr)(bbn.env.root, -1) !== '/')) {
|
|
4032
|
+
bbn.env.root += '/';
|
|
4033
|
+
}
|
|
4034
|
+
if (!bbn.env.isInit && (typeof dayjs !== 'undefined')) {
|
|
4035
|
+
(0, each_18.each)([
|
|
4036
|
+
'advancedFormat',
|
|
4037
|
+
'arraySupport',
|
|
4038
|
+
'badMutable',
|
|
4039
|
+
'buddhistEra',
|
|
4040
|
+
'calendar',
|
|
4041
|
+
'customParseFormat',
|
|
4042
|
+
'dayOfYear',
|
|
4043
|
+
'devHelper',
|
|
4044
|
+
'duration',
|
|
4045
|
+
'isBetween',
|
|
4046
|
+
'isLeapYear',
|
|
4047
|
+
'isSameOrAfter',
|
|
4048
|
+
'isSameOrBefore',
|
|
4049
|
+
'isToday',
|
|
4050
|
+
'isTomorrow',
|
|
4051
|
+
'isYesterday',
|
|
4052
|
+
'isoWeek',
|
|
4053
|
+
'isoWeeksInYear',
|
|
4054
|
+
'localeData',
|
|
4055
|
+
'localizedFormat',
|
|
4056
|
+
'minMax',
|
|
4057
|
+
'objectSupport',
|
|
4058
|
+
'pluralGetSet',
|
|
4059
|
+
'quarterOfYear',
|
|
4060
|
+
'relativeTime',
|
|
4061
|
+
'timezone',
|
|
4062
|
+
'toArray',
|
|
4063
|
+
'toObject',
|
|
4064
|
+
'updateLocale',
|
|
4065
|
+
'utc',
|
|
4066
|
+
'weekOfYear',
|
|
4067
|
+
'weekYear',
|
|
4068
|
+
'weekday'
|
|
4069
|
+
], plugin => {
|
|
4070
|
+
if (window['dayjs_plugin_' + plugin]) {
|
|
4071
|
+
dayjs.extend(window['dayjs_plugin_' + plugin]);
|
|
4072
|
+
}
|
|
4073
|
+
});
|
|
3516
4074
|
}
|
|
4075
|
+
/* The server's path (difference between the host and the current dir */
|
|
3517
4076
|
if (typeof (cfg) === 'object') {
|
|
3518
4077
|
(0, extend_7.extend)(true, window.bbn, cfg);
|
|
3519
4078
|
}
|
|
3520
|
-
|
|
3521
|
-
parts =
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
4079
|
+
bbn.env.path = (0, substr_11.substr)(bbn.env.url, bbn.env.root.length);
|
|
4080
|
+
parts = bbn.env.path.split("/");
|
|
4081
|
+
//$.each(parts, function(i, v){
|
|
4082
|
+
(0, each_18.each)(parts, (v, i) => {
|
|
4083
|
+
v = decodeURI(v.trim());
|
|
4084
|
+
if (v !== "") {
|
|
4085
|
+
bbn.env.params.push(v);
|
|
4086
|
+
}
|
|
4087
|
+
});
|
|
4088
|
+
if (bbn.var.colors) {
|
|
4089
|
+
(0, addColors_1.addColors)(bbn.var.colors);
|
|
4090
|
+
}
|
|
4091
|
+
if (bbn.env.lang && (undefined !== dayjs)) {
|
|
4092
|
+
dayjs.locale(bbn.env.lang);
|
|
4093
|
+
}
|
|
4094
|
+
window.onfocus = () => {
|
|
4095
|
+
bbn.env.isFocused = true;
|
|
4096
|
+
};
|
|
4097
|
+
window.onblur = () => {
|
|
4098
|
+
bbn.env.isFocused = false;
|
|
4099
|
+
bbn.env.timeoff = Math.round((new Date()).getTime() / 1000);
|
|
4100
|
+
};
|
|
3533
4101
|
document.addEventListener("focusin", e => {
|
|
3534
4102
|
if (!e.target.classList.contains('bbn-no')) {
|
|
3535
|
-
|
|
4103
|
+
bbn.env.focused = e.target;
|
|
3536
4104
|
}
|
|
3537
|
-
|
|
4105
|
+
bbn.env.last_focus = (new Date()).getTime();
|
|
3538
4106
|
});
|
|
3539
4107
|
document.addEventListener('click', (e) => {
|
|
3540
|
-
|
|
3541
|
-
if (
|
|
4108
|
+
bbn.env.last_focus = (new Date()).getTime();
|
|
4109
|
+
if (bbn.env.nav !== 'ajax') {
|
|
3542
4110
|
return;
|
|
3543
4111
|
}
|
|
3544
4112
|
let target = e.target;
|
|
@@ -3564,10 +4132,20 @@
|
|
|
3564
4132
|
return false;
|
|
3565
4133
|
}
|
|
3566
4134
|
});
|
|
3567
|
-
(0, each_18.each)(document.querySelectorAll("form:not(.bbn-no), form:not(.bbn-form)"), (ele, i) => {
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
4135
|
+
(0, each_18.each)(document.querySelectorAll("form:not(.bbn-no), form:not(.bbn-form)"), (ele, i) => {
|
|
4136
|
+
ele.addEventListener("submit", e => {
|
|
4137
|
+
(0, submit_1.submit)(ele, e);
|
|
4138
|
+
});
|
|
4139
|
+
});
|
|
4140
|
+
window.addEventListener('hashchange', () => {
|
|
4141
|
+
bbn.env.hashChanged = (new Date()).getTime();
|
|
4142
|
+
}, false);
|
|
4143
|
+
window.addEventListener("resize", () => {
|
|
4144
|
+
(0, resize_1.resize)();
|
|
4145
|
+
});
|
|
4146
|
+
window.addEventListener("orientationchange", () => {
|
|
4147
|
+
(0, resize_1.resize)();
|
|
4148
|
+
});
|
|
3571
4149
|
(0, resize_1.resize)();
|
|
3572
4150
|
if ((0, isMobile_1.isMobile)()) {
|
|
3573
4151
|
document.body.classList.add('bbn-mobile');
|
|
@@ -3578,38 +4156,40 @@
|
|
|
3578
4156
|
if (window.history) {
|
|
3579
4157
|
window.onpopstate = function (e) {
|
|
3580
4158
|
let h = window.history;
|
|
3581
|
-
if (!
|
|
4159
|
+
if (!bbn.env.historyDisabled && h) {
|
|
4160
|
+
//e.preventDefault();
|
|
3582
4161
|
let state = h.state;
|
|
3583
4162
|
if (state) {
|
|
3584
4163
|
if ((0, defaultHistoryFunction_1.defaultHistoryFunction)(state)) {
|
|
3585
|
-
|
|
4164
|
+
//link(substr(state.url, bbn.env.root.length), $.extend({title: state.title}, state.data));
|
|
4165
|
+
(0, link_1.link)(state.url, (0, extend_7.extend)({ title: state.title || bbn.env.siteTitle }, state.data || {}));
|
|
3586
4166
|
}
|
|
3587
|
-
else if (state && state.data && (0,
|
|
4167
|
+
else if (state && state.data && (0, isFunction_12.isFunction)(state.data.script)) {
|
|
3588
4168
|
state.data.script();
|
|
3589
4169
|
}
|
|
3590
4170
|
}
|
|
3591
4171
|
}
|
|
3592
4172
|
};
|
|
3593
4173
|
}
|
|
3594
|
-
|
|
4174
|
+
bbn.env.isInit = true;
|
|
3595
4175
|
document.dispatchEvent(new Event('bbninit'));
|
|
3596
|
-
if (
|
|
3597
|
-
(0,
|
|
4176
|
+
if (bbn.env.logging) {
|
|
4177
|
+
(0, log_18.log)("Logging in bbn is enabled");
|
|
3598
4178
|
}
|
|
3599
4179
|
}
|
|
3600
4180
|
};
|
|
3601
4181
|
exports.init = init;
|
|
3602
4182
|
});
|
|
3603
|
-
define("fn/isActiveInterface", ["require", "exports"
|
|
4183
|
+
define("fn/isActiveInterface", ["require", "exports"], function (require, exports) {
|
|
3604
4184
|
"use strict";
|
|
3605
4185
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3606
4186
|
exports.isActiveInterface = void 0;
|
|
3607
4187
|
const isActiveInterface = function (secs = 600) {
|
|
3608
|
-
if (!
|
|
4188
|
+
if (!bbn.env.last_focus) {
|
|
3609
4189
|
return false;
|
|
3610
4190
|
}
|
|
3611
4191
|
let t = (new Date()).getTime();
|
|
3612
|
-
return (t -
|
|
4192
|
+
return (t - bbn.env.last_focus) < (secs * 1000);
|
|
3613
4193
|
};
|
|
3614
4194
|
exports.isActiveInterface = isActiveInterface;
|
|
3615
4195
|
});
|
|
@@ -3617,10 +4197,10 @@
|
|
|
3617
4197
|
"use strict";
|
|
3618
4198
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3619
4199
|
exports.isBoolean = void 0;
|
|
3620
|
-
const isBoolean = function () {
|
|
3621
|
-
if (!
|
|
4200
|
+
const isBoolean = function (...args) {
|
|
4201
|
+
if (!args.length)
|
|
3622
4202
|
return false;
|
|
3623
|
-
for (let a of
|
|
4203
|
+
for (let a of args) {
|
|
3624
4204
|
if (![true, false].includes(a)) {
|
|
3625
4205
|
return false;
|
|
3626
4206
|
}
|
|
@@ -3646,10 +4226,10 @@
|
|
|
3646
4226
|
"use strict";
|
|
3647
4227
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3648
4228
|
exports.isComment = void 0;
|
|
3649
|
-
const isComment = function () {
|
|
3650
|
-
if (!
|
|
4229
|
+
const isComment = function (...args) {
|
|
4230
|
+
if (!args.length)
|
|
3651
4231
|
return false;
|
|
3652
|
-
for (let a of
|
|
4232
|
+
for (let a of args) {
|
|
3653
4233
|
if (!(a instanceof Comment)) {
|
|
3654
4234
|
return false;
|
|
3655
4235
|
}
|
|
@@ -3662,7 +4242,9 @@
|
|
|
3662
4242
|
"use strict";
|
|
3663
4243
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3664
4244
|
exports.isDesktopDevice = void 0;
|
|
3665
|
-
const isDesktopDevice = function () {
|
|
4245
|
+
const isDesktopDevice = function () {
|
|
4246
|
+
return this.getDeviceType() === 'desktop';
|
|
4247
|
+
};
|
|
3666
4248
|
exports.isDesktopDevice = isDesktopDevice;
|
|
3667
4249
|
});
|
|
3668
4250
|
define("fn/isValidDimension", ["require", "exports", "fn/substr"], function (require, exports, substr_12) {
|
|
@@ -3670,7 +4252,9 @@
|
|
|
3670
4252
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3671
4253
|
exports.isValidDimension = void 0;
|
|
3672
4254
|
const isValidDimension = function (st) {
|
|
3673
|
-
if ((typeof (st) === 'string') &&
|
|
4255
|
+
if ((typeof (st) === 'string') &&
|
|
4256
|
+
(st.length > 0) && ((st.indexOf('calc') === 0) ||
|
|
4257
|
+
(!isNaN((0, substr_12.substr)(st, 0, 1))))) {
|
|
3674
4258
|
let el = document.createElement('div');
|
|
3675
4259
|
el.style.width = st;
|
|
3676
4260
|
let res = !!el.style.width.length;
|
|
@@ -3710,10 +4294,10 @@
|
|
|
3710
4294
|
"use strict";
|
|
3711
4295
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3712
4296
|
exports.isEvent = void 0;
|
|
3713
|
-
const isEvent = function () {
|
|
3714
|
-
if (!
|
|
4297
|
+
const isEvent = function (...args) {
|
|
4298
|
+
if (!args.length)
|
|
3715
4299
|
return false;
|
|
3716
|
-
for (let a of
|
|
4300
|
+
for (let a of args) {
|
|
3717
4301
|
if (!(a instanceof Event)) {
|
|
3718
4302
|
return false;
|
|
3719
4303
|
}
|
|
@@ -3726,29 +4310,43 @@
|
|
|
3726
4310
|
"use strict";
|
|
3727
4311
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3728
4312
|
exports.isFocused = void 0;
|
|
3729
|
-
const isFocused = function (ele, contain) {
|
|
4313
|
+
const isFocused = function (ele, contain) {
|
|
4314
|
+
return (ele === document.activeElement) || (contain && ele.contains && (ele.contains(document.activeElement)));
|
|
4315
|
+
};
|
|
3730
4316
|
exports.isFocused = isFocused;
|
|
3731
4317
|
});
|
|
3732
|
-
define("fn/isIP", ["require", "exports", "
|
|
4318
|
+
define("fn/isIP", ["require", "exports", "fn/isString"], function (require, exports, isString_25) {
|
|
3733
4319
|
"use strict";
|
|
3734
4320
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3735
4321
|
exports.isIP = void 0;
|
|
3736
|
-
const isIP = function (
|
|
3737
|
-
|
|
3738
|
-
|
|
4322
|
+
const isIP = function (...args) {
|
|
4323
|
+
if (!args.length)
|
|
4324
|
+
return false;
|
|
4325
|
+
for (let st of args) {
|
|
4326
|
+
if (!(0, isString_25.isString)(st) || !bbn.var.regexp.ip.test(st)) {
|
|
4327
|
+
return false;
|
|
4328
|
+
}
|
|
4329
|
+
}
|
|
4330
|
+
return true;
|
|
4331
|
+
};
|
|
3739
4332
|
exports.isIP = isIP;
|
|
3740
4333
|
});
|
|
3741
|
-
define("fn/isHostname", ["require", "exports", "
|
|
4334
|
+
define("fn/isHostname", ["require", "exports", "fn/isString", "fn/isIP"], function (require, exports, isString_26, isIP_1) {
|
|
3742
4335
|
"use strict";
|
|
3743
4336
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3744
4337
|
exports.isHostname = void 0;
|
|
3745
|
-
const isHostname = function (
|
|
3746
|
-
if (
|
|
3747
|
-
|
|
3748
|
-
|
|
4338
|
+
const isHostname = function (...args) {
|
|
4339
|
+
if (!args.length)
|
|
4340
|
+
return false;
|
|
4341
|
+
for (let st of args) {
|
|
4342
|
+
if (!(0, isString_26.isString)(st)) {
|
|
4343
|
+
return false;
|
|
4344
|
+
}
|
|
4345
|
+
if (!(0, isIP_1.isIP)(st) && !bbn.var.regexp.hostname.test(st)) {
|
|
4346
|
+
return false;
|
|
3749
4347
|
}
|
|
3750
|
-
return definitions_33.bbn.var.regexp.hostname.test(st);
|
|
3751
4348
|
}
|
|
4349
|
+
return true;
|
|
3752
4350
|
};
|
|
3753
4351
|
exports.isHostname = isHostname;
|
|
3754
4352
|
});
|
|
@@ -3761,10 +4359,12 @@
|
|
|
3761
4359
|
if (ancestors.length) {
|
|
3762
4360
|
if ((0, isString_27.isString)(ancestor)) {
|
|
3763
4361
|
let ok = false;
|
|
3764
|
-
(0, each_19.each)(ancestors, a => {
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
4362
|
+
(0, each_19.each)(ancestors, a => {
|
|
4363
|
+
if (a.matches && a.matches(ancestor)) {
|
|
4364
|
+
ok = true;
|
|
4365
|
+
return false;
|
|
4366
|
+
}
|
|
4367
|
+
});
|
|
3768
4368
|
return ok;
|
|
3769
4369
|
}
|
|
3770
4370
|
if (ancestor instanceof HTMLElement) {
|
|
@@ -3779,10 +4379,10 @@
|
|
|
3779
4379
|
"use strict";
|
|
3780
4380
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3781
4381
|
exports.isPercent = void 0;
|
|
3782
|
-
const isPercent = function () {
|
|
3783
|
-
if (!
|
|
4382
|
+
const isPercent = function (...args) {
|
|
4383
|
+
if (!args.length)
|
|
3784
4384
|
return false;
|
|
3785
|
-
for (let a of
|
|
4385
|
+
for (let a of args) {
|
|
3786
4386
|
if ((typeof a !== 'string') || !a.match(/^\d+(?:\.\d+)?%$/)) {
|
|
3787
4387
|
return false;
|
|
3788
4388
|
}
|
|
@@ -3795,10 +4395,10 @@
|
|
|
3795
4395
|
"use strict";
|
|
3796
4396
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3797
4397
|
exports.isPrimitive = void 0;
|
|
3798
|
-
const isPrimitive = function () {
|
|
3799
|
-
if (!
|
|
4398
|
+
const isPrimitive = function (...args) {
|
|
4399
|
+
if (!args.length)
|
|
3800
4400
|
return false;
|
|
3801
|
-
for (let a of
|
|
4401
|
+
for (let a of args) {
|
|
3802
4402
|
if ((a !== null) && ((typeof a == "object") || (typeof a == "function"))) {
|
|
3803
4403
|
return false;
|
|
3804
4404
|
}
|
|
@@ -3811,10 +4411,10 @@
|
|
|
3811
4411
|
"use strict";
|
|
3812
4412
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3813
4413
|
exports.isPromise = void 0;
|
|
3814
|
-
const isPromise = function () {
|
|
3815
|
-
if (!
|
|
4414
|
+
const isPromise = function (...args) {
|
|
4415
|
+
if (!args.length)
|
|
3816
4416
|
return false;
|
|
3817
|
-
for (let a of
|
|
4417
|
+
for (let a of args) {
|
|
3818
4418
|
if ({}.toString.apply(a) !== '[object Promise]') {
|
|
3819
4419
|
return false;
|
|
3820
4420
|
}
|
|
@@ -3827,21 +4427,28 @@
|
|
|
3827
4427
|
"use strict";
|
|
3828
4428
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3829
4429
|
exports.isPropSize = void 0;
|
|
3830
|
-
const isPropSize = function (name) {
|
|
3831
|
-
isTrue =
|
|
3832
|
-
|
|
3833
|
-
|
|
4430
|
+
const isPropSize = function (name) {
|
|
4431
|
+
let isTrue = false;
|
|
4432
|
+
(0, each_20.each)(['width', 'height', 'gap', 'margin', 'padding', 'top', 'left', 'right', 'bottom'], a => {
|
|
4433
|
+
if (name.indexOf(a) !== -1) {
|
|
4434
|
+
isTrue = true;
|
|
4435
|
+
return false;
|
|
4436
|
+
}
|
|
4437
|
+
});
|
|
4438
|
+
return isTrue;
|
|
4439
|
+
};
|
|
3834
4440
|
exports.isPropSize = isPropSize;
|
|
3835
4441
|
});
|
|
3836
4442
|
define("fn/isSQLDate", ["require", "exports"], function (require, exports) {
|
|
3837
4443
|
"use strict";
|
|
3838
4444
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3839
4445
|
exports.isSQLDate = void 0;
|
|
3840
|
-
const isSQLDate = function () {
|
|
3841
|
-
if (!
|
|
4446
|
+
const isSQLDate = function (...args) {
|
|
4447
|
+
if (!args.length)
|
|
3842
4448
|
return false;
|
|
3843
|
-
for (let a of
|
|
3844
|
-
if ((typeof a !== 'string') ||
|
|
4449
|
+
for (let a of args) {
|
|
4450
|
+
if ((typeof a !== 'string') ||
|
|
4451
|
+
!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]))?$/)) {
|
|
3845
4452
|
return false;
|
|
3846
4453
|
}
|
|
3847
4454
|
}
|
|
@@ -3853,10 +4460,10 @@
|
|
|
3853
4460
|
"use strict";
|
|
3854
4461
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3855
4462
|
exports.isSymbol = void 0;
|
|
3856
|
-
const isSymbol = function () {
|
|
3857
|
-
if (!
|
|
4463
|
+
const isSymbol = function (...args) {
|
|
4464
|
+
if (!args.length)
|
|
3858
4465
|
return false;
|
|
3859
|
-
for (let a of
|
|
4466
|
+
for (let a of args) {
|
|
3860
4467
|
if ({}.toString.apply(a) !== '[object Symbol]') {
|
|
3861
4468
|
return false;
|
|
3862
4469
|
}
|
|
@@ -3865,22 +4472,31 @@
|
|
|
3865
4472
|
};
|
|
3866
4473
|
exports.isSymbol = isSymbol;
|
|
3867
4474
|
});
|
|
3868
|
-
define("fn/isURL", ["require", "exports"
|
|
4475
|
+
define("fn/isURL", ["require", "exports"], function (require, exports) {
|
|
3869
4476
|
"use strict";
|
|
3870
4477
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3871
4478
|
exports.isURL = void 0;
|
|
3872
|
-
const isURL = function (
|
|
4479
|
+
const isURL = function (...args) {
|
|
4480
|
+
if (!args.length)
|
|
4481
|
+
return false;
|
|
4482
|
+
for (let str of args) {
|
|
4483
|
+
if (!bbn.var.regexp.url.test(str)) {
|
|
4484
|
+
return false;
|
|
4485
|
+
}
|
|
4486
|
+
}
|
|
4487
|
+
return true;
|
|
4488
|
+
};
|
|
3873
4489
|
exports.isURL = isURL;
|
|
3874
4490
|
});
|
|
3875
4491
|
define("fn/isValidName", ["require", "exports", "fn/isString"], function (require, exports, isString_28) {
|
|
3876
4492
|
"use strict";
|
|
3877
4493
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3878
4494
|
exports.isValidName = void 0;
|
|
3879
|
-
const isValidName = function (
|
|
3880
|
-
if (!
|
|
4495
|
+
const isValidName = function (...args) {
|
|
4496
|
+
if (!args.length) {
|
|
3881
4497
|
return false;
|
|
3882
4498
|
}
|
|
3883
|
-
for (let arg of
|
|
4499
|
+
for (let arg of args) {
|
|
3884
4500
|
if (!(0, isString_28.isString)(arg) || !/^[$A-Z_][0-9A-Z_$]*$/i.test(arg)) {
|
|
3885
4501
|
return false;
|
|
3886
4502
|
}
|
|
@@ -3889,32 +4505,32 @@
|
|
|
3889
4505
|
};
|
|
3890
4506
|
exports.isValidName = isValidName;
|
|
3891
4507
|
});
|
|
3892
|
-
define("fn/isVue", ["require", "exports"
|
|
4508
|
+
define("fn/isVue", ["require", "exports"], function (require, exports) {
|
|
3893
4509
|
"use strict";
|
|
3894
4510
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3895
4511
|
exports.isVue = void 0;
|
|
3896
|
-
const isVue = function () {
|
|
3897
|
-
if (!
|
|
4512
|
+
const isVue = function (...args) {
|
|
4513
|
+
if (!args.length) {
|
|
3898
4514
|
return false;
|
|
3899
4515
|
}
|
|
3900
|
-
if (Object.hasOwn(
|
|
3901
|
-
if (
|
|
3902
|
-
for (let a of
|
|
4516
|
+
if (Object.hasOwn(bbn, 'vue')) {
|
|
4517
|
+
if (bbn.vue.app) {
|
|
4518
|
+
for (let a of args) {
|
|
3903
4519
|
if (!a || (typeof a.render !== 'function')) {
|
|
3904
4520
|
return false;
|
|
3905
4521
|
}
|
|
3906
4522
|
}
|
|
3907
4523
|
}
|
|
3908
4524
|
else {
|
|
3909
|
-
for (let a of
|
|
4525
|
+
for (let a of args) {
|
|
3910
4526
|
if (!(a instanceof Vue)) {
|
|
3911
4527
|
return false;
|
|
3912
4528
|
}
|
|
3913
4529
|
}
|
|
3914
4530
|
}
|
|
3915
4531
|
}
|
|
3916
|
-
if (Object.hasOwn(
|
|
3917
|
-
return
|
|
4532
|
+
if (Object.hasOwn(bbn, 'cp')) {
|
|
4533
|
+
return bbn.cp.isComponent(...args);
|
|
3918
4534
|
}
|
|
3919
4535
|
return true;
|
|
3920
4536
|
};
|
|
@@ -3952,14 +4568,23 @@
|
|
|
3952
4568
|
};
|
|
3953
4569
|
exports.lightenDarkenHex = lightenDarkenHex;
|
|
3954
4570
|
});
|
|
3955
|
-
define("fn/warning", ["require", "exports", "fn/log"], function (require, exports,
|
|
4571
|
+
define("fn/warning", ["require", "exports", "fn/log"], function (require, exports, log_19) {
|
|
3956
4572
|
"use strict";
|
|
3957
4573
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3958
4574
|
exports.warning = void 0;
|
|
3959
|
-
const warning = function (message) {
|
|
4575
|
+
const warning = function (message) {
|
|
4576
|
+
const args = ["BBN: " + message];
|
|
4577
|
+
args.unshift({
|
|
4578
|
+
_bbn_console_mode: "warn",
|
|
4579
|
+
_bbn_console_level: 2,
|
|
4580
|
+
_bbn_console_style: "color: #E64141; background: #F7E195; font-size: 14px"
|
|
4581
|
+
});
|
|
4582
|
+
log_19.log.apply(this, args);
|
|
4583
|
+
return this;
|
|
4584
|
+
};
|
|
3960
4585
|
exports.warning = warning;
|
|
3961
4586
|
});
|
|
3962
|
-
define("fn/makeReactive", ["require", "exports", "fn/log", "fn/createObject", "fn/isSymbol", "fn/isNumber", "fn/isArray", "fn/warning", "fn/isFunction", "fn/isSame"], function (require, exports,
|
|
4587
|
+
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) {
|
|
3963
4588
|
"use strict";
|
|
3964
4589
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3965
4590
|
exports.makeReactive = void 0;
|
|
@@ -3971,12 +4596,18 @@
|
|
|
3971
4596
|
return obj;
|
|
3972
4597
|
}
|
|
3973
4598
|
if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
|
|
3974
|
-
(0,
|
|
4599
|
+
(0, log_20.log)(["MAKING bbn-loadbar", obj]);
|
|
3975
4600
|
}
|
|
3976
4601
|
if (!obj.__bbnWatchers) {
|
|
3977
|
-
Reflect.defineProperty(obj, '__bbnWatchers', {
|
|
4602
|
+
Reflect.defineProperty(obj, '__bbnWatchers', {
|
|
4603
|
+
value: (0, createObject_2.createObject)(),
|
|
4604
|
+
writable: true,
|
|
4605
|
+
configurable: true,
|
|
4606
|
+
enumerable: false
|
|
4607
|
+
});
|
|
3978
4608
|
}
|
|
3979
|
-
const handler = {
|
|
4609
|
+
const handler = {
|
|
4610
|
+
get(target, key) {
|
|
3980
4611
|
const realValue = Reflect.get(target, key);
|
|
3981
4612
|
const realTarget = target.__bbnRoot || target;
|
|
3982
4613
|
if ((0, isSymbol_1.isSymbol)(key)) {
|
|
@@ -3985,9 +4616,15 @@
|
|
|
3985
4616
|
const propName = parentProp ? parentProp + '.' + key : key;
|
|
3986
4617
|
const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
|
|
3987
4618
|
if (['fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'].includes(key) && (0, isArray_13.isArray)(target)) {
|
|
3988
|
-
return function (...args) {
|
|
4619
|
+
return function (...args) {
|
|
4620
|
+
let res = realTarget[key](...args);
|
|
4621
|
+
(0, warning_1.warning)("DOING ARRAY STUFF");
|
|
4622
|
+
(0, log_20.log)(target.__bbnParent);
|
|
4623
|
+
onSet(target, 'length', parent);
|
|
4624
|
+
return res;
|
|
4625
|
+
};
|
|
3989
4626
|
}
|
|
3990
|
-
if ((0,
|
|
4627
|
+
if ((0, isFunction_13.isFunction)(realValue)) {
|
|
3991
4628
|
return realValue;
|
|
3992
4629
|
}
|
|
3993
4630
|
if (key === '__bbnRoot') {
|
|
@@ -4023,7 +4660,12 @@
|
|
|
4023
4660
|
return realTarget[hiddenKey];
|
|
4024
4661
|
}
|
|
4025
4662
|
if (!Object.hasOwn(realTarget, hiddenKey)) {
|
|
4026
|
-
Reflect.defineProperty(realTarget, hiddenKey, {
|
|
4663
|
+
Reflect.defineProperty(realTarget, hiddenKey, {
|
|
4664
|
+
value: makeReactive(realValue, onSet, parent, propName),
|
|
4665
|
+
writable: true,
|
|
4666
|
+
configurable: true,
|
|
4667
|
+
enumerable: false
|
|
4668
|
+
});
|
|
4027
4669
|
}
|
|
4028
4670
|
if (realTarget[hiddenKey].__bbnIsProxy && !realTarget.__bbnWatchers[parentString]) {
|
|
4029
4671
|
realTarget.__bbnWatchers[parentString] = propName;
|
|
@@ -4031,7 +4673,8 @@
|
|
|
4031
4673
|
return realTarget[hiddenKey];
|
|
4032
4674
|
}
|
|
4033
4675
|
return realValue;
|
|
4034
|
-
},
|
|
4676
|
+
},
|
|
4677
|
+
set(target, key, value) {
|
|
4035
4678
|
if ((0, isSymbol_1.isSymbol)(key)) {
|
|
4036
4679
|
return Reflect.get(target, key, value);
|
|
4037
4680
|
}
|
|
@@ -4041,29 +4684,40 @@
|
|
|
4041
4684
|
return Reflect.get(target, key);
|
|
4042
4685
|
}
|
|
4043
4686
|
if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
|
|
4044
|
-
(0,
|
|
4687
|
+
(0, log_20.log)(['Setting proxy prop in ' + parent.$options.name, target, key, value]);
|
|
4045
4688
|
}
|
|
4046
4689
|
if (!(0, isSame_2.isSame)(realTarget[key], value)) {
|
|
4047
4690
|
if (key.indexOf('__bbn_') === 0) {
|
|
4048
|
-
Reflect.defineProperty(realTarget, key, {
|
|
4691
|
+
Reflect.defineProperty(realTarget, key, {
|
|
4692
|
+
value: makeReactive(value, onSet, parent, propName),
|
|
4693
|
+
writable: true,
|
|
4694
|
+
configurable: true,
|
|
4695
|
+
enumerable: false
|
|
4696
|
+
});
|
|
4049
4697
|
}
|
|
4050
4698
|
else {
|
|
4051
4699
|
if (value && (typeof value === 'object') && [undefined, Object, Array].includes(value.constructor)) {
|
|
4052
4700
|
const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
|
|
4053
|
-
Reflect.defineProperty(realTarget, hiddenKey, {
|
|
4701
|
+
Reflect.defineProperty(realTarget, hiddenKey, {
|
|
4702
|
+
value: makeReactive(value, onSet, parent, propName),
|
|
4703
|
+
writable: true,
|
|
4704
|
+
configurable: true,
|
|
4705
|
+
enumerable: false
|
|
4706
|
+
});
|
|
4054
4707
|
if (realTarget[hiddenKey].__bbnIsProxy && !realTarget.__bbnWatchers[parentString]) {
|
|
4055
4708
|
realTarget.__bbnWatchers[parentString] = propName;
|
|
4056
4709
|
}
|
|
4057
4710
|
}
|
|
4058
4711
|
}
|
|
4059
4712
|
if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
|
|
4060
|
-
(0,
|
|
4713
|
+
(0, log_20.log)(['Setting proxy prop in ' + parent.$options.name + ' ' + ((0, isNumber_7.isNumber)(key) ? key.toString() : key), value, target]);
|
|
4061
4714
|
}
|
|
4062
4715
|
Reflect.set(realTarget, key, value);
|
|
4063
4716
|
onSet(target, key, parent);
|
|
4064
4717
|
}
|
|
4065
4718
|
return true;
|
|
4066
|
-
},
|
|
4719
|
+
},
|
|
4720
|
+
defineProperty(target, key, description) {
|
|
4067
4721
|
const realTarget = target;
|
|
4068
4722
|
const propName = parentProp ? parentProp + '.' + key : key;
|
|
4069
4723
|
if ((key === '__bbnWatchers') || (0, isSymbol_1.isSymbol)(key) || (key.indexOf('__bbn_') === 0)) {
|
|
@@ -4071,11 +4725,17 @@
|
|
|
4071
4725
|
}
|
|
4072
4726
|
else {
|
|
4073
4727
|
const hiddenKey = prefix + ((0, isNumber_7.isNumber)(key) ? key.toString() : key);
|
|
4074
|
-
Reflect.defineProperty(realTarget, hiddenKey, {
|
|
4728
|
+
Reflect.defineProperty(realTarget, hiddenKey, {
|
|
4729
|
+
value: makeReactive(description.value, onSet, parent, propName),
|
|
4730
|
+
writable: true,
|
|
4731
|
+
configurable: true,
|
|
4732
|
+
enumerable: false
|
|
4733
|
+
});
|
|
4075
4734
|
}
|
|
4076
4735
|
onSet(target, key, parent);
|
|
4077
4736
|
return true;
|
|
4078
|
-
},
|
|
4737
|
+
},
|
|
4738
|
+
deleteProperty(target, key) {
|
|
4079
4739
|
const realTarget = target;
|
|
4080
4740
|
if (key.indexOf('__bbn_') === 0) {
|
|
4081
4741
|
Reflect.deleteProperty(realTarget, key);
|
|
@@ -4086,7 +4746,8 @@
|
|
|
4086
4746
|
Reflect.deleteProperty(target, key);
|
|
4087
4747
|
}
|
|
4088
4748
|
return true;
|
|
4089
|
-
}
|
|
4749
|
+
}
|
|
4750
|
+
};
|
|
4090
4751
|
return (new Proxy(obj, handler));
|
|
4091
4752
|
}
|
|
4092
4753
|
return obj;
|
|
@@ -4108,28 +4769,54 @@
|
|
|
4108
4769
|
};
|
|
4109
4770
|
exports.map = map;
|
|
4110
4771
|
});
|
|
4111
|
-
define("fn/money", ["require", "exports", "
|
|
4772
|
+
define("fn/money", ["require", "exports", "fn/isNumber"], function (require, exports, isNumber_8) {
|
|
4112
4773
|
"use strict";
|
|
4113
4774
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4114
4775
|
exports.money = void 0;
|
|
4115
4776
|
const money = function (val, kilo, currency, novalue, decimal, thousands, precision) {
|
|
4777
|
+
/*
|
|
4778
|
+
money(val, kilo){
|
|
4779
|
+
let decimal = ',',
|
|
4780
|
+
currency = '€',
|
|
4781
|
+
thousands = ' ';
|
|
4782
|
+
if ( (isNaN(val) || !val) ){
|
|
4783
|
+
return '-';
|
|
4784
|
+
}
|
|
4785
|
+
if ( isNaN(val) || !val ){
|
|
4786
|
+
return 0;
|
|
4787
|
+
}
|
|
4788
|
+
if ( kilo && val ){
|
|
4789
|
+
val = val / 1000;
|
|
4790
|
+
if ( currency ){
|
|
4791
|
+
currency = 'K' + currency;
|
|
4792
|
+
}
|
|
4793
|
+
}
|
|
4794
|
+
return parseFloat(val).toFixed(0).replace(/./g, function(c, i, a) {
|
|
4795
|
+
if ( c === '.' ){
|
|
4796
|
+
return decimal;
|
|
4797
|
+
}
|
|
4798
|
+
return i && ((a.length - i) % 3 === 0) ? thousands + c : c;
|
|
4799
|
+
}) + ( currency ? ' ' + currency : '');
|
|
4800
|
+
},
|
|
4801
|
+
|
|
4802
|
+
*/
|
|
4116
4803
|
if (!decimal) {
|
|
4117
|
-
decimal = (decimal === undefined) &&
|
|
4804
|
+
decimal = (decimal === undefined) && bbn.env.money && (bbn.env.money.decimal !== undefined) ? bbn.env.money.decimal : '.';
|
|
4118
4805
|
}
|
|
4119
4806
|
if (!currency) {
|
|
4120
|
-
currency = (currency === undefined) &&
|
|
4807
|
+
currency = (currency === undefined) && bbn.env.money && (bbn.env.money.currency !== undefined) ? bbn.env.money.currency : '';
|
|
4121
4808
|
}
|
|
4122
4809
|
if (!thousands) {
|
|
4123
|
-
thousands = (thousands === undefined) &&
|
|
4810
|
+
thousands = (thousands === undefined) && bbn.env.money && (bbn.env.money.thousands !== undefined) ? bbn.env.money.thousands : ' ';
|
|
4124
4811
|
}
|
|
4125
4812
|
if (!precision) {
|
|
4126
|
-
precision = (precision === undefined) &&
|
|
4813
|
+
precision = (precision === undefined) && bbn.env.money && (bbn.env.money.precision !== undefined) ? bbn.env.money.precision : false;
|
|
4127
4814
|
}
|
|
4128
4815
|
if (!kilo) {
|
|
4129
|
-
kilo = (kilo === undefined) &&
|
|
4816
|
+
kilo = (kilo === undefined) && bbn.env.money && (bbn.env.money.kilo !== undefined) ? bbn.env.money.kilo : false;
|
|
4130
4817
|
}
|
|
4131
4818
|
if (!novalue) {
|
|
4132
|
-
novalue = (novalue === undefined) &&
|
|
4819
|
+
novalue = (novalue === undefined) && bbn.env.money && (bbn.env.money.novalue !== undefined) ? bbn.env.money.novalue : false;
|
|
4133
4820
|
}
|
|
4134
4821
|
if (!(0, isNumber_8.isNumber)(precision)) {
|
|
4135
4822
|
precision = kilo ? 3 : 0;
|
|
@@ -4220,7 +4907,9 @@
|
|
|
4220
4907
|
"use strict";
|
|
4221
4908
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4222
4909
|
exports.nl2br = void 0;
|
|
4223
|
-
const nl2br = function (st, keepNl) {
|
|
4910
|
+
const nl2br = function (st, keepNl) {
|
|
4911
|
+
return (0, replaceAll_5.replaceAll)("\n", "<br>" + (keepNl ? "\n" : ""), st);
|
|
4912
|
+
};
|
|
4224
4913
|
exports.nl2br = nl2br;
|
|
4225
4914
|
});
|
|
4226
4915
|
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) {
|
|
@@ -4235,12 +4924,16 @@
|
|
|
4235
4924
|
formData.append(key, data);
|
|
4236
4925
|
}
|
|
4237
4926
|
else if ((0, isArray_15.isArray)(data)) {
|
|
4238
|
-
(0, each_21.each)(data, (v, i) => {
|
|
4927
|
+
(0, each_21.each)(data, (v, i) => {
|
|
4928
|
+
appendFormData(v, key + '[' + i + ']');
|
|
4929
|
+
});
|
|
4239
4930
|
}
|
|
4240
4931
|
else if ((0, isObject_18.isObject)(data) && Object.keys(data).length) {
|
|
4241
|
-
(0, iterate_8.iterate)(data, (v, i) => {
|
|
4242
|
-
|
|
4243
|
-
|
|
4932
|
+
(0, iterate_8.iterate)(data, (v, i) => {
|
|
4933
|
+
if (Object.hasOwn(data, i)) {
|
|
4934
|
+
appendFormData(v, !key ? i : key + '[' + i + ']');
|
|
4935
|
+
}
|
|
4936
|
+
});
|
|
4244
4937
|
}
|
|
4245
4938
|
else {
|
|
4246
4939
|
if (!(0, isNull_3.isNull)(data) && (data !== undefined)) {
|
|
@@ -4260,7 +4953,9 @@
|
|
|
4260
4953
|
exports.order = void 0;
|
|
4261
4954
|
const order = function (arr, prop, dir = 'asc') {
|
|
4262
4955
|
if (arr) {
|
|
4263
|
-
return arr.sort(function (a, b) {
|
|
4956
|
+
return arr.sort(function (a, b) {
|
|
4957
|
+
return (0, _compareValues_2._compareValues)(a, b, prop, dir);
|
|
4958
|
+
});
|
|
4264
4959
|
}
|
|
4265
4960
|
return arr;
|
|
4266
4961
|
};
|
|
@@ -4270,7 +4965,9 @@
|
|
|
4270
4965
|
"use strict";
|
|
4271
4966
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4272
4967
|
exports.selector = void 0;
|
|
4273
|
-
const selector = function (ele) {
|
|
4968
|
+
const selector = function (ele) {
|
|
4969
|
+
return (typeof el === 'string') ? document.querySelector(ele) : ele;
|
|
4970
|
+
};
|
|
4274
4971
|
exports.selector = selector;
|
|
4275
4972
|
});
|
|
4276
4973
|
define("fn/outerHeight", ["require", "exports", "fn/selector"], function (require, exports, selector_1) {
|
|
@@ -4303,16 +5000,20 @@
|
|
|
4303
5000
|
"use strict";
|
|
4304
5001
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4305
5002
|
exports.percent = void 0;
|
|
4306
|
-
const percent = function (percent, cent) {
|
|
5003
|
+
const percent = function (percent, cent) {
|
|
5004
|
+
return (cent / 100) * percent;
|
|
5005
|
+
};
|
|
4307
5006
|
exports.percent = percent;
|
|
4308
5007
|
});
|
|
4309
5008
|
define("fn/pickValue", ["require", "exports"], function (require, exports) {
|
|
4310
5009
|
"use strict";
|
|
4311
5010
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4312
5011
|
exports.pickValue = void 0;
|
|
4313
|
-
const pickValue = function (arr) {
|
|
4314
|
-
|
|
4315
|
-
|
|
5012
|
+
const pickValue = function (arr) {
|
|
5013
|
+
if (Array.isArray(arr) && arr.length) {
|
|
5014
|
+
return arr[Math.floor(Math.random() * arr.length)];
|
|
5015
|
+
}
|
|
5016
|
+
};
|
|
4316
5017
|
exports.pickValue = pickValue;
|
|
4317
5018
|
});
|
|
4318
5019
|
define("fn/postOut", ["require", "exports", "fn/createObject", "fn/addInputs"], function (require, exports, createObject_3, addInputs_1) {
|
|
@@ -4352,7 +5053,14 @@
|
|
|
4352
5053
|
"use strict";
|
|
4353
5054
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4354
5055
|
exports.printf = void 0;
|
|
4355
|
-
const printf = function (format) {
|
|
5056
|
+
const printf = function (format) {
|
|
5057
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
5058
|
+
return format.replace(/{(\d+)}/g, function (match, number) {
|
|
5059
|
+
return typeof args[number] != 'undefined'
|
|
5060
|
+
? args[number]
|
|
5061
|
+
: match;
|
|
5062
|
+
});
|
|
5063
|
+
};
|
|
4356
5064
|
exports.printf = printf;
|
|
4357
5065
|
});
|
|
4358
5066
|
define("fn/quotes2html", ["require", "exports", "fn/replaceAll"], function (require, exports, replaceAll_6) {
|
|
@@ -4374,7 +5082,9 @@
|
|
|
4374
5082
|
"use strict";
|
|
4375
5083
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4376
5084
|
exports.randomInt = void 0;
|
|
4377
|
-
const randomInt = function (min, max) {
|
|
5085
|
+
const randomInt = function (min, max) {
|
|
5086
|
+
return Math.floor(Math.random() * (max - min + 1) + min);
|
|
5087
|
+
};
|
|
4378
5088
|
exports.randomInt = randomInt;
|
|
4379
5089
|
});
|
|
4380
5090
|
define("fn/randomString", ["require", "exports", "fn/randomInt", "fn/isString"], function (require, exports, randomInt_1, isString_29) {
|
|
@@ -4382,7 +5092,11 @@
|
|
|
4382
5092
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4383
5093
|
exports.randomString = void 0;
|
|
4384
5094
|
const randomString = function (min, max, types) {
|
|
4385
|
-
let length, type, chars = {
|
|
5095
|
+
let length, type, chars = {
|
|
5096
|
+
n: '0123456789',
|
|
5097
|
+
l: 'abcdefghijklmnopqrstuvwxyz',
|
|
5098
|
+
u: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
|
5099
|
+
};
|
|
4386
5100
|
if (!types) {
|
|
4387
5101
|
types = 'nlu';
|
|
4388
5102
|
}
|
|
@@ -4391,7 +5105,9 @@
|
|
|
4391
5105
|
}
|
|
4392
5106
|
if ((0, isString_29.isString)(max)) {
|
|
4393
5107
|
types = 'n';
|
|
4394
|
-
chars = {
|
|
5108
|
+
chars = {
|
|
5109
|
+
n: max
|
|
5110
|
+
};
|
|
4395
5111
|
if (!length) {
|
|
4396
5112
|
length = min;
|
|
4397
5113
|
}
|
|
@@ -4404,6 +5120,7 @@
|
|
|
4404
5120
|
}
|
|
4405
5121
|
let result = '';
|
|
4406
5122
|
for (let i = 0; i < length; i++) {
|
|
5123
|
+
// Not a number for the first char
|
|
4407
5124
|
if (i === 0) {
|
|
4408
5125
|
if (types !== 'n') {
|
|
4409
5126
|
type = types.indexOf('u') === -1 ? 'l' : 'u';
|
|
@@ -4418,7 +5135,7 @@
|
|
|
4418
5135
|
};
|
|
4419
5136
|
exports.randomString = randomString;
|
|
4420
5137
|
});
|
|
4421
|
-
define("fn/removeEmpty", ["require", "exports", "fn/isArray", "fn/isObject", "fn/numProperties"], function (require, exports, isArray_16, isObject_19,
|
|
5138
|
+
define("fn/removeEmpty", ["require", "exports", "fn/isArray", "fn/isObject", "fn/numProperties"], function (require, exports, isArray_16, isObject_19, numProperties_8) {
|
|
4422
5139
|
"use strict";
|
|
4423
5140
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4424
5141
|
exports.removeEmpty = void 0;
|
|
@@ -4434,7 +5151,7 @@
|
|
|
4434
5151
|
}
|
|
4435
5152
|
}
|
|
4436
5153
|
else if ((0, isObject_19.isObject)(arr[i])) {
|
|
4437
|
-
if ((0,
|
|
5154
|
+
if ((0, numProperties_8.numProperties)(arr[i])) {
|
|
4438
5155
|
ok = true;
|
|
4439
5156
|
}
|
|
4440
5157
|
}
|
|
@@ -4455,7 +5172,9 @@
|
|
|
4455
5172
|
"use strict";
|
|
4456
5173
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4457
5174
|
exports.removeExtraSpaces = void 0;
|
|
4458
|
-
const removeExtraSpaces = function (str) {
|
|
5175
|
+
const removeExtraSpaces = function (str) {
|
|
5176
|
+
return str.replace(/\s+/g, ' ').trim();
|
|
5177
|
+
};
|
|
4459
5178
|
exports.removeExtraSpaces = removeExtraSpaces;
|
|
4460
5179
|
});
|
|
4461
5180
|
define("fn/removeTrailingChars", ["require", "exports", "fn/substr"], function (require, exports, substr_13) {
|
|
@@ -4482,7 +5201,13 @@
|
|
|
4482
5201
|
"use strict";
|
|
4483
5202
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4484
5203
|
exports.repeat = void 0;
|
|
4485
|
-
const repeat = function (st, num) {
|
|
5204
|
+
const repeat = function (st, num) {
|
|
5205
|
+
let res = '';
|
|
5206
|
+
(0, iterate_9.iterate)(num, () => {
|
|
5207
|
+
res += st;
|
|
5208
|
+
});
|
|
5209
|
+
return res;
|
|
5210
|
+
};
|
|
4486
5211
|
exports.repeat = repeat;
|
|
4487
5212
|
});
|
|
4488
5213
|
define("fn/replaceSelection", ["require", "exports"], function (require, exports) {
|
|
@@ -4492,13 +5217,19 @@
|
|
|
4492
5217
|
const replaceSelection = function (html, selectInserted) {
|
|
4493
5218
|
let sel, range, fragment;
|
|
4494
5219
|
sel = window.getSelection();
|
|
5220
|
+
// Test that the Selection object contains at least one Range
|
|
4495
5221
|
if (sel.getRangeAt && sel.rangeCount) {
|
|
5222
|
+
// Get the first Range (only Firefox supports more than one)
|
|
4496
5223
|
range = window.getSelection().getRangeAt(0);
|
|
4497
5224
|
range.deleteContents();
|
|
5225
|
+
// Create a DocumentFragment to insert and populate it with HTML
|
|
5226
|
+
// Need to test for the existence of range.createContextualFragment
|
|
5227
|
+
// because it's non-standard and IE 9 does not support it
|
|
4498
5228
|
if (range.createContextualFragment) {
|
|
4499
5229
|
fragment = range.createContextualFragment(html);
|
|
4500
5230
|
}
|
|
4501
5231
|
else {
|
|
5232
|
+
// In IE 9 we need to use innerHTML of a temporary element
|
|
4502
5233
|
const div = document.createElement("div");
|
|
4503
5234
|
let child;
|
|
4504
5235
|
div.innerHTML = html;
|
|
@@ -4543,14 +5274,18 @@
|
|
|
4543
5274
|
"use strict";
|
|
4544
5275
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4545
5276
|
exports.riterate = void 0;
|
|
4546
|
-
const riterate = function (obj, fn, noPrivate) {
|
|
5277
|
+
const riterate = function (obj, fn, noPrivate) {
|
|
5278
|
+
return (0, iterate_10.iterate)(obj, fn, noPrivate, true);
|
|
5279
|
+
};
|
|
4547
5280
|
exports.riterate = riterate;
|
|
4548
5281
|
});
|
|
4549
5282
|
define("fn/roundDecimal", ["require", "exports"], function (require, exports) {
|
|
4550
5283
|
"use strict";
|
|
4551
5284
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4552
5285
|
exports.roundDecimal = void 0;
|
|
4553
|
-
const roundDecimal = function (value, decimals) {
|
|
5286
|
+
const roundDecimal = function (value, decimals) {
|
|
5287
|
+
return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals);
|
|
5288
|
+
};
|
|
4554
5289
|
exports.roundDecimal = roundDecimal;
|
|
4555
5290
|
});
|
|
4556
5291
|
define("fn/trim", ["require", "exports", "fn/substr"], function (require, exports, substr_14) {
|
|
@@ -4653,14 +5388,22 @@
|
|
|
4653
5388
|
};
|
|
4654
5389
|
exports.setCssVar = setCssVar;
|
|
4655
5390
|
});
|
|
4656
|
-
define("fn/setProp", ["require", "exports"
|
|
5391
|
+
define("fn/setProp", ["require", "exports"], function (require, exports) {
|
|
4657
5392
|
"use strict";
|
|
4658
5393
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4659
5394
|
exports.setProp = void 0;
|
|
4660
|
-
const setProp = function (obj, prop, value, writable = true, configurable = true) {
|
|
5395
|
+
const setProp = function (obj, prop, value, writable = true, configurable = true) {
|
|
5396
|
+
checkType(prop, "string", bbn._("The prop must be a string in setProp"));
|
|
5397
|
+
checkType(obj, "object", bbn._("The obj must be an object in setProp"));
|
|
5398
|
+
Object.defineProperty(obj, prop, {
|
|
5399
|
+
value: value,
|
|
5400
|
+
writable: writable,
|
|
5401
|
+
configurable: configurable
|
|
5402
|
+
});
|
|
5403
|
+
};
|
|
4661
5404
|
exports.setProp = setProp;
|
|
4662
5405
|
});
|
|
4663
|
-
define("fn/setProperty", ["require", "exports", "
|
|
5406
|
+
define("fn/setProperty", ["require", "exports", "fn/each"], function (require, exports, each_22) {
|
|
4664
5407
|
"use strict";
|
|
4665
5408
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4666
5409
|
exports.setProperty = void 0;
|
|
@@ -4671,7 +5414,7 @@
|
|
|
4671
5414
|
(0, each_22.each)(bits, (v, i) => {
|
|
4672
5415
|
if (!o) {
|
|
4673
5416
|
if (!force) {
|
|
4674
|
-
throw new Error(
|
|
5417
|
+
throw new Error(bbn._("The object is invalid"));
|
|
4675
5418
|
}
|
|
4676
5419
|
o = {};
|
|
4677
5420
|
}
|
|
@@ -4686,14 +5429,14 @@
|
|
|
4686
5429
|
};
|
|
4687
5430
|
exports.setProperty = setProperty;
|
|
4688
5431
|
});
|
|
4689
|
-
define("fn/shorten", ["require", "exports", "
|
|
5432
|
+
define("fn/shorten", ["require", "exports", "fn/isString", "fn/substr"], function (require, exports, isString_30, substr_15) {
|
|
4690
5433
|
"use strict";
|
|
4691
5434
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4692
5435
|
exports.shorten = void 0;
|
|
4693
5436
|
const shorten = function (st, len, adj) {
|
|
4694
5437
|
if (typeof (st).toLowerCase() === 'string') {
|
|
4695
5438
|
if (!len) {
|
|
4696
|
-
len =
|
|
5439
|
+
len = bbn.var.shortenLen;
|
|
4697
5440
|
}
|
|
4698
5441
|
if ((adj === undefined) || !(0, isString_30.isString)(adj)) {
|
|
4699
5442
|
adj = '...';
|
|
@@ -4730,10 +5473,15 @@
|
|
|
4730
5473
|
exports.shuffle = void 0;
|
|
4731
5474
|
const shuffle = function (array) {
|
|
4732
5475
|
let currentIndex = array.length, randomIndex;
|
|
5476
|
+
// While there remain elements to shuffle.
|
|
4733
5477
|
while (currentIndex != 0) {
|
|
5478
|
+
// Pick a remaining element.
|
|
4734
5479
|
randomIndex = Math.floor(Math.random() * currentIndex);
|
|
4735
5480
|
currentIndex--;
|
|
4736
|
-
|
|
5481
|
+
// And swap it with the current element.
|
|
5482
|
+
[array[currentIndex], array[randomIndex]] = [
|
|
5483
|
+
array[randomIndex], array[currentIndex]
|
|
5484
|
+
];
|
|
4737
5485
|
}
|
|
4738
5486
|
return array;
|
|
4739
5487
|
};
|
|
@@ -4747,23 +5495,25 @@
|
|
|
4747
5495
|
let now = (new Date()).getTime();
|
|
4748
5496
|
let h1 = 3600 * 1000;
|
|
4749
5497
|
if (_private.length) {
|
|
4750
|
-
(0, each_24.each)(_private, (t, n) => {
|
|
4751
|
-
|
|
4752
|
-
|
|
5498
|
+
(0, each_24.each)(_private, (t, n) => {
|
|
5499
|
+
if (now - t > h1) {
|
|
5500
|
+
delete _private[n];
|
|
5501
|
+
}
|
|
5502
|
+
});
|
|
4753
5503
|
now = (new Date()).getTime();
|
|
4754
5504
|
}
|
|
4755
5505
|
_private[name] = now;
|
|
4756
5506
|
};
|
|
4757
5507
|
exports.startChrono = startChrono;
|
|
4758
5508
|
});
|
|
4759
|
-
define("fn/stat", ["require", "exports", "
|
|
5509
|
+
define("fn/stat", ["require", "exports", "fn/getPath"], function (require, exports, getPath_1) {
|
|
4760
5510
|
"use strict";
|
|
4761
5511
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4762
5512
|
exports.stat = void 0;
|
|
4763
5513
|
const stat = function (returnStat) {
|
|
4764
5514
|
return;
|
|
4765
|
-
if (
|
|
4766
|
-
var logs =
|
|
5515
|
+
if (bbn.env.logging) {
|
|
5516
|
+
var logs = bbn.var.loggers;
|
|
4767
5517
|
for (var i = 0; i < arguments.length; i++) {
|
|
4768
5518
|
var a = arguments[i], type = typeof (a);
|
|
4769
5519
|
if ((type === 'boolean') || (type === 'undefined')) {
|
|
@@ -4777,7 +5527,9 @@
|
|
|
4777
5527
|
a = a.toString();
|
|
4778
5528
|
}
|
|
4779
5529
|
if (!logs[a]) {
|
|
4780
|
-
logs[a] = {
|
|
5530
|
+
logs[a] = {
|
|
5531
|
+
_num: 0,
|
|
5532
|
+
};
|
|
4781
5533
|
}
|
|
4782
5534
|
logs[a]._num++;
|
|
4783
5535
|
logs = logs[a];
|
|
@@ -4811,11 +5563,13 @@
|
|
|
4811
5563
|
"use strict";
|
|
4812
5564
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4813
5565
|
exports.stopChrono = void 0;
|
|
4814
|
-
const stopChrono = function (name) {
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
5566
|
+
const stopChrono = function (name) {
|
|
5567
|
+
if (_private[name]) {
|
|
5568
|
+
let now = (new Date()).getTime();
|
|
5569
|
+
let diff = now - _private[name];
|
|
5570
|
+
return diff;
|
|
5571
|
+
}
|
|
5572
|
+
};
|
|
4819
5573
|
exports.stopChrono = stopChrono;
|
|
4820
5574
|
});
|
|
4821
5575
|
define("fn/string2ArrayBuffer", ["require", "exports"], function (require, exports) {
|
|
@@ -4823,7 +5577,7 @@
|
|
|
4823
5577
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4824
5578
|
exports.string2ArrayBuffer = void 0;
|
|
4825
5579
|
const string2ArrayBuffer = function (str) {
|
|
4826
|
-
var buf = new ArrayBuffer(str.length * 2);
|
|
5580
|
+
var buf = new ArrayBuffer(str.length * 2); // 2 bytes for each char
|
|
4827
5581
|
var bufView = new Uint16Array(buf);
|
|
4828
5582
|
for (var i = 0, strLen = str.length; i < strLen; i++) {
|
|
4829
5583
|
bufView[i] = str.charCodeAt(i);
|
|
@@ -4836,16 +5590,27 @@
|
|
|
4836
5590
|
"use strict";
|
|
4837
5591
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4838
5592
|
exports.sum = void 0;
|
|
4839
|
-
const sum = function (arr, numberProp, prop, val, operator) {
|
|
4840
|
-
r
|
|
4841
|
-
|
|
5593
|
+
const sum = function (arr, numberProp, prop, val, operator) {
|
|
5594
|
+
let r = 0;
|
|
5595
|
+
let isFunction = isFunction(numberProp);
|
|
5596
|
+
(0, each_25.each)((0, filter_5.filter)(arr, prop, val, operator), (a) => {
|
|
5597
|
+
let tmp = isFunction ? numberProp(a) : a[numberProp];
|
|
5598
|
+
if (tmp) {
|
|
5599
|
+
r += (parseFloat(tmp) || 0);
|
|
5600
|
+
}
|
|
5601
|
+
});
|
|
5602
|
+
return r;
|
|
5603
|
+
};
|
|
4842
5604
|
exports.sum = sum;
|
|
4843
5605
|
});
|
|
4844
5606
|
define("fn/timestamp", ["require", "exports"], function (require, exports) {
|
|
4845
5607
|
"use strict";
|
|
4846
5608
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4847
5609
|
exports.timestamp = void 0;
|
|
4848
|
-
const timestamp = function (seconds) {
|
|
5610
|
+
const timestamp = function (seconds) {
|
|
5611
|
+
var r = (new Date()).getTime();
|
|
5612
|
+
return seconds ? Math.round(r / 1000) : r;
|
|
5613
|
+
};
|
|
4849
5614
|
exports.timestamp = timestamp;
|
|
4850
5615
|
});
|
|
4851
5616
|
define("fn/toCSV", ["require", "exports", "fn/each", "fn/isArray", "fn/replaceAll"], function (require, exports, each_26, isArray_17, replaceAll_7) {
|
|
@@ -4927,78 +5692,99 @@
|
|
|
4927
5692
|
window.document.documentElement.requestFullscreen();
|
|
4928
5693
|
}
|
|
4929
5694
|
}
|
|
4930
|
-
setTimeout(function () {
|
|
5695
|
+
setTimeout(function () {
|
|
5696
|
+
(0, resize_2.resize)();
|
|
5697
|
+
}, 0);
|
|
4931
5698
|
};
|
|
4932
5699
|
exports.toggleFullScreen = toggleFullScreen;
|
|
4933
5700
|
});
|
|
4934
|
-
define("fn/translate", ["require", "exports", "
|
|
5701
|
+
define("fn/translate", ["require", "exports", "fn/iterate"], function (require, exports, iterate_11) {
|
|
4935
5702
|
"use strict";
|
|
4936
5703
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4937
5704
|
exports.translate = void 0;
|
|
4938
|
-
const translate = function (o, namespace) {
|
|
5705
|
+
const translate = function (o, namespace) {
|
|
5706
|
+
let lng = namespace ? bbn.lng[namespace.indexOf('_') === 0 ? namespace : '_' + namespace] : bbn.lng;
|
|
5707
|
+
(0, iterate_11.iterate)(o, (v, k) => {
|
|
5708
|
+
lng[k] = v;
|
|
5709
|
+
});
|
|
5710
|
+
};
|
|
4939
5711
|
exports.translate = translate;
|
|
4940
5712
|
});
|
|
4941
5713
|
define("fn/uniqString", ["require", "exports", "fn/isArray", "fn/each", "fn/md5"], function (require, exports, isArray_18, each_27, md5_3) {
|
|
4942
5714
|
"use strict";
|
|
4943
5715
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4944
5716
|
exports.uniqString = void 0;
|
|
4945
|
-
const uniqString = function () {
|
|
5717
|
+
const uniqString = function (...args) {
|
|
4946
5718
|
var st = '';
|
|
4947
|
-
for (var i = 0; i <
|
|
4948
|
-
if (!
|
|
5719
|
+
for (var i = 0; i < args.length; i++) {
|
|
5720
|
+
if (!args[i]) {
|
|
4949
5721
|
st += '__bbn_empty__';
|
|
4950
5722
|
}
|
|
4951
|
-
else if (typeof (
|
|
4952
|
-
if ((0, isArray_18.isArray)(
|
|
4953
|
-
st += JSON.stringify(
|
|
5723
|
+
else if (typeof (args[i]) === 'object') {
|
|
5724
|
+
if ((0, isArray_18.isArray)(args[i])) {
|
|
5725
|
+
st += JSON.stringify(args[i]);
|
|
4954
5726
|
}
|
|
4955
5727
|
else {
|
|
5728
|
+
// An object with the same properties, even in different order, should produce the same answer
|
|
4956
5729
|
let tmp = {};
|
|
4957
|
-
let ks = Object.keys(
|
|
4958
|
-
(0, each_27.each)(ks, k => {
|
|
5730
|
+
let ks = Object.keys(args[i]).sort();
|
|
5731
|
+
(0, each_27.each)(ks, k => {
|
|
5732
|
+
tmp[k] = args[i][k];
|
|
5733
|
+
});
|
|
4959
5734
|
st += JSON.stringify(tmp);
|
|
4960
5735
|
}
|
|
4961
5736
|
}
|
|
4962
|
-
else if (typeof (
|
|
4963
|
-
st +=
|
|
5737
|
+
else if (typeof (args[i]) !== 'string') {
|
|
5738
|
+
st += args[i].toString();
|
|
4964
5739
|
}
|
|
4965
5740
|
else {
|
|
4966
|
-
st +=
|
|
5741
|
+
st += args[i];
|
|
4967
5742
|
}
|
|
4968
5743
|
}
|
|
4969
5744
|
return (0, md5_3.md5)(st);
|
|
4970
5745
|
};
|
|
4971
5746
|
exports.uniqString = uniqString;
|
|
4972
5747
|
});
|
|
4973
|
-
define("fn/upload", ["require", "exports", "
|
|
5748
|
+
define("fn/upload", ["require", "exports", "fn/objectToFormData", "fn/log"], function (require, exports, objectToFormData_1, log_21) {
|
|
4974
5749
|
"use strict";
|
|
4975
5750
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4976
5751
|
exports.upload = void 0;
|
|
4977
5752
|
const upload = function (url, file, success, failure, progress) {
|
|
4978
5753
|
let fn = () => {
|
|
4979
|
-
return axios.post(url ||
|
|
5754
|
+
return axios.post(url || bbn.env.path, (0, objectToFormData_1.objectToFormData)(file), {
|
|
5755
|
+
headers: {
|
|
5756
|
+
'Content-Type': 'multipart/form-data'
|
|
5757
|
+
},
|
|
5758
|
+
onUploadProgress(progressEvent) {
|
|
4980
5759
|
if (progress) {
|
|
4981
5760
|
let percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total);
|
|
4982
5761
|
progress(percentCompleted, progressEvent.loaded, progressEvent.total);
|
|
4983
5762
|
}
|
|
4984
|
-
}
|
|
5763
|
+
}
|
|
5764
|
+
});
|
|
4985
5765
|
};
|
|
4986
5766
|
if (!success && !failure) {
|
|
4987
5767
|
return fn();
|
|
4988
5768
|
}
|
|
4989
5769
|
else {
|
|
4990
|
-
return fn()
|
|
4991
|
-
|
|
4992
|
-
success
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
}
|
|
5770
|
+
return fn()
|
|
5771
|
+
.then(res => {
|
|
5772
|
+
if (success) {
|
|
5773
|
+
(0, log_21.log)("SUCCESS", res);
|
|
5774
|
+
success(res);
|
|
5775
|
+
}
|
|
5776
|
+
})
|
|
5777
|
+
.catch(err => {
|
|
5778
|
+
if (failure) {
|
|
5779
|
+
(0, log_21.log)("ERROR", err);
|
|
5780
|
+
failure(err);
|
|
5781
|
+
}
|
|
5782
|
+
});
|
|
4997
5783
|
}
|
|
4998
5784
|
};
|
|
4999
5785
|
exports.upload = upload;
|
|
5000
5786
|
});
|
|
5001
|
-
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,
|
|
5787
|
+
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) {
|
|
5002
5788
|
"use strict";
|
|
5003
5789
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5004
5790
|
const fn = {
|
|
@@ -5108,7 +5894,7 @@
|
|
|
5108
5894
|
getProp: getProp_1.getProp,
|
|
5109
5895
|
getProperty: getProperty_4.getProperty,
|
|
5110
5896
|
getRequestId: getRequestId_2.getRequestId,
|
|
5111
|
-
getRow:
|
|
5897
|
+
getRow: getRow_2.getRow,
|
|
5112
5898
|
getScrollBarSize: getScrollBarSize_1.getScrollBarSize,
|
|
5113
5899
|
getText: getText_1.getText,
|
|
5114
5900
|
getTimeoff: getTimeoff_1.getTimeoff,
|
|
@@ -5128,7 +5914,7 @@
|
|
|
5128
5914
|
isCanvas: isCanvas_2.isCanvas,
|
|
5129
5915
|
isColor: isColor_1.isColor,
|
|
5130
5916
|
isComment: isComment_1.isComment,
|
|
5131
|
-
isCp:
|
|
5917
|
+
isCp: isCp_6.isCp,
|
|
5132
5918
|
isDate: isDate_8.isDate,
|
|
5133
5919
|
isDesktopDevice: isDesktopDevice_1.isDesktopDevice,
|
|
5134
5920
|
isDimension: isDimension_1.isDimension,
|
|
@@ -5137,7 +5923,7 @@
|
|
|
5137
5923
|
isEmpty: isEmpty_2.isEmpty,
|
|
5138
5924
|
isEvent: isEvent_1.isEvent,
|
|
5139
5925
|
isFocused: isFocused_1.isFocused,
|
|
5140
|
-
isFunction:
|
|
5926
|
+
isFunction: isFunction_14.isFunction,
|
|
5141
5927
|
isHostname: isHostname_1.isHostname,
|
|
5142
5928
|
isInside: isInside_1.isInside,
|
|
5143
5929
|
isInt: isInt_2.isInt,
|
|
@@ -5165,7 +5951,7 @@
|
|
|
5165
5951
|
iterate: iterate_12.iterate,
|
|
5166
5952
|
lightenDarkenHex: lightenDarkenHex_1.lightenDarkenHex,
|
|
5167
5953
|
link: link_2.link,
|
|
5168
|
-
log:
|
|
5954
|
+
log: log_22.log,
|
|
5169
5955
|
makeReactive: makeReactive_1.makeReactive,
|
|
5170
5956
|
map: map_1.map,
|
|
5171
5957
|
md5: md5_4.md5,
|
|
@@ -5173,7 +5959,7 @@
|
|
|
5173
5959
|
move: move_1.move,
|
|
5174
5960
|
multiorder: multiorder_1.multiorder,
|
|
5175
5961
|
nl2br: nl2br_1.nl2br,
|
|
5176
|
-
numProperties:
|
|
5962
|
+
numProperties: numProperties_9.numProperties,
|
|
5177
5963
|
objectToFormData: objectToFormData_2.objectToFormData,
|
|
5178
5964
|
order: order_1.order,
|
|
5179
5965
|
outerHeight: outerHeight_1.outerHeight,
|