@neutron.co.id/operasional-interfaces 1.3.3-beta.1 → 1.3.4-beta.1
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/build/index.cjs +2897 -822
- package/build/index.mjs +2832 -757
- package/build/style.css +15 -11
- package/build/types/components/checkIn/checkIn.types.d.ts +1 -1
- package/build/types/components/checkIn/sheets/CheckInScanner.vue.d.ts +1 -1
- package/build/types/components/common/OperasionalIdentitas/OperasionalIdentitas.vue.d.ts +106 -0
- package/build/types/components/common/OperasionalIdentitas/index.d.ts +1 -0
- package/build/types/components/common/index.d.ts +1 -0
- package/build/types/components/situation/situation.types.d.ts +1 -1
- package/build/types/components/staff/sheets/StaffIdentity.vue.d.ts +2 -0
- package/build/types/components/staff/sheets/index.d.ts +1 -0
- package/build/types/components/staff/staff.types.d.ts +1 -1
- package/build/types/components/task/task.types.d.ts +1 -1
- package/build/types/gql/graphql.d.ts +34 -0
- package/package.json +4 -4
package/build/index.cjs
CHANGED
|
@@ -3,20 +3,26 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const client = require("@neon.id/utils/client");
|
|
4
4
|
const vue = require("vue");
|
|
5
5
|
const interfaces = require("@neon.id/interfaces");
|
|
6
|
-
const tempatModels = require("@neutron.co.id/tempat-models");
|
|
7
6
|
const context = require("@neon.id/context");
|
|
7
|
+
const display = require("@neon.id/display");
|
|
8
|
+
const form = require("@neon.id/form");
|
|
9
|
+
const identitasInterfaces = require("@neon.id/identitas-interfaces");
|
|
10
|
+
const identitasModels = require("@neon.id/identitas-models");
|
|
11
|
+
const model = require("@neon.id/model");
|
|
12
|
+
const query = require("@neon.id/query");
|
|
13
|
+
const relation = require("@neon.id/relation");
|
|
14
|
+
const code = require("@neon.id/utils/code");
|
|
15
|
+
const tempatModels = require("@neutron.co.id/tempat-models");
|
|
8
16
|
const core = require("@vueuse/core");
|
|
9
17
|
const office = require("@neon.id/office");
|
|
10
|
-
const query = require("@neon.id/query");
|
|
11
18
|
const pinia = require("pinia");
|
|
19
|
+
const vueRouter = require("vue-router");
|
|
12
20
|
const component = require("@neon.id/utils/component");
|
|
13
|
-
const form = require("@neon.id/form");
|
|
14
21
|
const personaliaModels = require("@neutron.co.id/personalia-models");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
...__default__$8,
|
|
22
|
+
const _hoisted_1$9 = { class: "xxx-button" };
|
|
23
|
+
const __default__$9 = vue.defineComponent({ name: "XxxButton" });
|
|
24
|
+
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
25
|
+
...__default__$9,
|
|
20
26
|
props: {
|
|
21
27
|
color: {
|
|
22
28
|
type: String,
|
|
@@ -25,13 +31,12 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
31
|
},
|
|
26
32
|
setup(__props) {
|
|
27
33
|
return (_ctx, _cache) => {
|
|
28
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
34
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
|
|
29
35
|
vue.createVNode(vue.unref(interfaces.NeonButton), { label: "XXX" })
|
|
30
36
|
]);
|
|
31
37
|
};
|
|
32
38
|
}
|
|
33
39
|
});
|
|
34
|
-
const CheckInModel = tempatModels.models.CheckInModel;
|
|
35
40
|
function devAssert(condition, message) {
|
|
36
41
|
const booleanCondition = Boolean(condition);
|
|
37
42
|
if (!booleanCondition) {
|
|
@@ -53,12 +58,12 @@ const LineRegExp = /\r\n|[\n\r]/g;
|
|
|
53
58
|
function getLocation(source, position) {
|
|
54
59
|
let lastLineStart = 0;
|
|
55
60
|
let line = 1;
|
|
56
|
-
for (const
|
|
57
|
-
typeof
|
|
58
|
-
if (
|
|
61
|
+
for (const match2 of source.body.matchAll(LineRegExp)) {
|
|
62
|
+
typeof match2.index === "number" || invariant(false);
|
|
63
|
+
if (match2.index >= position) {
|
|
59
64
|
break;
|
|
60
65
|
}
|
|
61
|
-
lastLineStart =
|
|
66
|
+
lastLineStart = match2.index + match2[0].length;
|
|
62
67
|
line += 1;
|
|
63
68
|
}
|
|
64
69
|
return {
|
|
@@ -88,8 +93,8 @@ function printSourceLocation(source, sourceLocation) {
|
|
|
88
93
|
const subLineIndex = Math.floor(columnNum / 80);
|
|
89
94
|
const subLineColumnNum = columnNum % 80;
|
|
90
95
|
const subLines = [];
|
|
91
|
-
for (let
|
|
92
|
-
subLines.push(locationLine.slice(
|
|
96
|
+
for (let i3 = 0; i3 < locationLine.length; i3 += 80) {
|
|
97
|
+
subLines.push(locationLine.slice(i3, i3 + 80));
|
|
93
98
|
}
|
|
94
99
|
return locationStr + printPrefixedLines([
|
|
95
100
|
[`${lineNum} |`, subLines[0]],
|
|
@@ -500,51 +505,51 @@ var Kind;
|
|
|
500
505
|
Kind2["ENUM_TYPE_EXTENSION"] = "EnumTypeExtension";
|
|
501
506
|
Kind2["INPUT_OBJECT_TYPE_EXTENSION"] = "InputObjectTypeExtension";
|
|
502
507
|
})(Kind || (Kind = {}));
|
|
503
|
-
function isWhiteSpace(
|
|
504
|
-
return
|
|
508
|
+
function isWhiteSpace(code2) {
|
|
509
|
+
return code2 === 9 || code2 === 32;
|
|
505
510
|
}
|
|
506
|
-
function isDigit(
|
|
507
|
-
return
|
|
511
|
+
function isDigit(code2) {
|
|
512
|
+
return code2 >= 48 && code2 <= 57;
|
|
508
513
|
}
|
|
509
|
-
function isLetter(
|
|
510
|
-
return
|
|
511
|
-
|
|
514
|
+
function isLetter(code2) {
|
|
515
|
+
return code2 >= 97 && code2 <= 122 || // A-Z
|
|
516
|
+
code2 >= 65 && code2 <= 90;
|
|
512
517
|
}
|
|
513
|
-
function isNameStart(
|
|
514
|
-
return isLetter(
|
|
518
|
+
function isNameStart(code2) {
|
|
519
|
+
return isLetter(code2) || code2 === 95;
|
|
515
520
|
}
|
|
516
|
-
function isNameContinue(
|
|
517
|
-
return isLetter(
|
|
521
|
+
function isNameContinue(code2) {
|
|
522
|
+
return isLetter(code2) || isDigit(code2) || code2 === 95;
|
|
518
523
|
}
|
|
519
524
|
function dedentBlockStringLines(lines) {
|
|
520
525
|
var _firstNonEmptyLine2;
|
|
521
526
|
let commonIndent = Number.MAX_SAFE_INTEGER;
|
|
522
527
|
let firstNonEmptyLine = null;
|
|
523
528
|
let lastNonEmptyLine = -1;
|
|
524
|
-
for (let
|
|
529
|
+
for (let i3 = 0; i3 < lines.length; ++i3) {
|
|
525
530
|
var _firstNonEmptyLine;
|
|
526
|
-
const line = lines[
|
|
531
|
+
const line = lines[i3];
|
|
527
532
|
const indent2 = leadingWhitespace(line);
|
|
528
533
|
if (indent2 === line.length) {
|
|
529
534
|
continue;
|
|
530
535
|
}
|
|
531
|
-
firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine :
|
|
532
|
-
lastNonEmptyLine =
|
|
533
|
-
if (
|
|
536
|
+
firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine : i3;
|
|
537
|
+
lastNonEmptyLine = i3;
|
|
538
|
+
if (i3 !== 0 && indent2 < commonIndent) {
|
|
534
539
|
commonIndent = indent2;
|
|
535
540
|
}
|
|
536
541
|
}
|
|
537
|
-
return lines.map((line,
|
|
542
|
+
return lines.map((line, i3) => i3 === 0 ? line : line.slice(commonIndent)).slice(
|
|
538
543
|
(_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== void 0 ? _firstNonEmptyLine2 : 0,
|
|
539
544
|
lastNonEmptyLine + 1
|
|
540
545
|
);
|
|
541
546
|
}
|
|
542
547
|
function leadingWhitespace(str) {
|
|
543
|
-
let
|
|
544
|
-
while (
|
|
545
|
-
++
|
|
548
|
+
let i3 = 0;
|
|
549
|
+
while (i3 < str.length && isWhiteSpace(str.charCodeAt(i3))) {
|
|
550
|
+
++i3;
|
|
546
551
|
}
|
|
547
|
-
return
|
|
552
|
+
return i3;
|
|
548
553
|
}
|
|
549
554
|
function printBlockString(value, options) {
|
|
550
555
|
const escapedValue = value.replace(/"""/g, '\\"""');
|
|
@@ -649,27 +654,27 @@ class Lexer {
|
|
|
649
654
|
function isPunctuatorTokenKind(kind) {
|
|
650
655
|
return kind === TokenKind.BANG || kind === TokenKind.DOLLAR || kind === TokenKind.AMP || kind === TokenKind.PAREN_L || kind === TokenKind.PAREN_R || kind === TokenKind.SPREAD || kind === TokenKind.COLON || kind === TokenKind.EQUALS || kind === TokenKind.AT || kind === TokenKind.BRACKET_L || kind === TokenKind.BRACKET_R || kind === TokenKind.BRACE_L || kind === TokenKind.PIPE || kind === TokenKind.BRACE_R;
|
|
651
656
|
}
|
|
652
|
-
function isUnicodeScalarValue(
|
|
653
|
-
return
|
|
657
|
+
function isUnicodeScalarValue(code2) {
|
|
658
|
+
return code2 >= 0 && code2 <= 55295 || code2 >= 57344 && code2 <= 1114111;
|
|
654
659
|
}
|
|
655
660
|
function isSupplementaryCodePoint(body, location) {
|
|
656
661
|
return isLeadingSurrogate(body.charCodeAt(location)) && isTrailingSurrogate(body.charCodeAt(location + 1));
|
|
657
662
|
}
|
|
658
|
-
function isLeadingSurrogate(
|
|
659
|
-
return
|
|
663
|
+
function isLeadingSurrogate(code2) {
|
|
664
|
+
return code2 >= 55296 && code2 <= 56319;
|
|
660
665
|
}
|
|
661
|
-
function isTrailingSurrogate(
|
|
662
|
-
return
|
|
666
|
+
function isTrailingSurrogate(code2) {
|
|
667
|
+
return code2 >= 56320 && code2 <= 57343;
|
|
663
668
|
}
|
|
664
669
|
function printCodePointAt(lexer, location) {
|
|
665
|
-
const
|
|
666
|
-
if (
|
|
670
|
+
const code2 = lexer.source.body.codePointAt(location);
|
|
671
|
+
if (code2 === void 0) {
|
|
667
672
|
return TokenKind.EOF;
|
|
668
|
-
} else if (
|
|
669
|
-
const char = String.fromCodePoint(
|
|
673
|
+
} else if (code2 >= 32 && code2 <= 126) {
|
|
674
|
+
const char = String.fromCodePoint(code2);
|
|
670
675
|
return char === '"' ? `'"'` : `"${char}"`;
|
|
671
676
|
}
|
|
672
|
-
return "U+" +
|
|
677
|
+
return "U+" + code2.toString(16).toUpperCase().padStart(4, "0");
|
|
673
678
|
}
|
|
674
679
|
function createToken(lexer, kind, start2, end, value) {
|
|
675
680
|
const line = lexer.line;
|
|
@@ -681,8 +686,8 @@ function readNextToken(lexer, start2) {
|
|
|
681
686
|
const bodyLength = body.length;
|
|
682
687
|
let position = start2;
|
|
683
688
|
while (position < bodyLength) {
|
|
684
|
-
const
|
|
685
|
-
switch (
|
|
689
|
+
const code2 = body.charCodeAt(position);
|
|
690
|
+
switch (code2) {
|
|
686
691
|
case 65279:
|
|
687
692
|
case 9:
|
|
688
693
|
case 32:
|
|
@@ -742,16 +747,16 @@ function readNextToken(lexer, start2) {
|
|
|
742
747
|
}
|
|
743
748
|
return readString(lexer, position);
|
|
744
749
|
}
|
|
745
|
-
if (isDigit(
|
|
746
|
-
return readNumber(lexer, position,
|
|
750
|
+
if (isDigit(code2) || code2 === 45) {
|
|
751
|
+
return readNumber(lexer, position, code2);
|
|
747
752
|
}
|
|
748
|
-
if (isNameStart(
|
|
753
|
+
if (isNameStart(code2)) {
|
|
749
754
|
return readName(lexer, position);
|
|
750
755
|
}
|
|
751
756
|
throw syntaxError(
|
|
752
757
|
lexer.source,
|
|
753
758
|
position,
|
|
754
|
-
|
|
759
|
+
code2 === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : isUnicodeScalarValue(code2) || isSupplementaryCodePoint(body, position) ? `Unexpected character: ${printCodePointAt(lexer, position)}.` : `Invalid character: ${printCodePointAt(lexer, position)}.`
|
|
755
760
|
);
|
|
756
761
|
}
|
|
757
762
|
return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);
|
|
@@ -761,11 +766,11 @@ function readComment(lexer, start2) {
|
|
|
761
766
|
const bodyLength = body.length;
|
|
762
767
|
let position = start2 + 1;
|
|
763
768
|
while (position < bodyLength) {
|
|
764
|
-
const
|
|
765
|
-
if (
|
|
769
|
+
const code2 = body.charCodeAt(position);
|
|
770
|
+
if (code2 === 10 || code2 === 13) {
|
|
766
771
|
break;
|
|
767
772
|
}
|
|
768
|
-
if (isUnicodeScalarValue(
|
|
773
|
+
if (isUnicodeScalarValue(code2)) {
|
|
769
774
|
++position;
|
|
770
775
|
} else if (isSupplementaryCodePoint(body, position)) {
|
|
771
776
|
position += 2;
|
|
@@ -784,14 +789,14 @@ function readComment(lexer, start2) {
|
|
|
784
789
|
function readNumber(lexer, start2, firstCode) {
|
|
785
790
|
const body = lexer.source.body;
|
|
786
791
|
let position = start2;
|
|
787
|
-
let
|
|
792
|
+
let code2 = firstCode;
|
|
788
793
|
let isFloat = false;
|
|
789
|
-
if (
|
|
790
|
-
|
|
794
|
+
if (code2 === 45) {
|
|
795
|
+
code2 = body.charCodeAt(++position);
|
|
791
796
|
}
|
|
792
|
-
if (
|
|
793
|
-
|
|
794
|
-
if (isDigit(
|
|
797
|
+
if (code2 === 48) {
|
|
798
|
+
code2 = body.charCodeAt(++position);
|
|
799
|
+
if (isDigit(code2)) {
|
|
795
800
|
throw syntaxError(
|
|
796
801
|
lexer.source,
|
|
797
802
|
position,
|
|
@@ -802,25 +807,25 @@ function readNumber(lexer, start2, firstCode) {
|
|
|
802
807
|
);
|
|
803
808
|
}
|
|
804
809
|
} else {
|
|
805
|
-
position = readDigits(lexer, position,
|
|
806
|
-
|
|
810
|
+
position = readDigits(lexer, position, code2);
|
|
811
|
+
code2 = body.charCodeAt(position);
|
|
807
812
|
}
|
|
808
|
-
if (
|
|
813
|
+
if (code2 === 46) {
|
|
809
814
|
isFloat = true;
|
|
810
|
-
|
|
811
|
-
position = readDigits(lexer, position,
|
|
812
|
-
|
|
815
|
+
code2 = body.charCodeAt(++position);
|
|
816
|
+
position = readDigits(lexer, position, code2);
|
|
817
|
+
code2 = body.charCodeAt(position);
|
|
813
818
|
}
|
|
814
|
-
if (
|
|
819
|
+
if (code2 === 69 || code2 === 101) {
|
|
815
820
|
isFloat = true;
|
|
816
|
-
|
|
817
|
-
if (
|
|
818
|
-
|
|
821
|
+
code2 = body.charCodeAt(++position);
|
|
822
|
+
if (code2 === 43 || code2 === 45) {
|
|
823
|
+
code2 = body.charCodeAt(++position);
|
|
819
824
|
}
|
|
820
|
-
position = readDigits(lexer, position,
|
|
821
|
-
|
|
825
|
+
position = readDigits(lexer, position, code2);
|
|
826
|
+
code2 = body.charCodeAt(position);
|
|
822
827
|
}
|
|
823
|
-
if (
|
|
828
|
+
if (code2 === 46 || isNameStart(code2)) {
|
|
824
829
|
throw syntaxError(
|
|
825
830
|
lexer.source,
|
|
826
831
|
position,
|
|
@@ -863,12 +868,12 @@ function readString(lexer, start2) {
|
|
|
863
868
|
let chunkStart = position;
|
|
864
869
|
let value = "";
|
|
865
870
|
while (position < bodyLength) {
|
|
866
|
-
const
|
|
867
|
-
if (
|
|
871
|
+
const code2 = body.charCodeAt(position);
|
|
872
|
+
if (code2 === 34) {
|
|
868
873
|
value += body.slice(chunkStart, position);
|
|
869
874
|
return createToken(lexer, TokenKind.STRING, start2, position + 1, value);
|
|
870
875
|
}
|
|
871
|
-
if (
|
|
876
|
+
if (code2 === 92) {
|
|
872
877
|
value += body.slice(chunkStart, position);
|
|
873
878
|
const escape = body.charCodeAt(position + 1) === 117 ? body.charCodeAt(position + 2) === 123 ? readEscapedUnicodeVariableWidth(lexer, position) : readEscapedUnicodeFixedWidth(lexer, position) : readEscapedCharacter(lexer, position);
|
|
874
879
|
value += escape.value;
|
|
@@ -876,10 +881,10 @@ function readString(lexer, start2) {
|
|
|
876
881
|
chunkStart = position;
|
|
877
882
|
continue;
|
|
878
883
|
}
|
|
879
|
-
if (
|
|
884
|
+
if (code2 === 10 || code2 === 13) {
|
|
880
885
|
break;
|
|
881
886
|
}
|
|
882
|
-
if (isUnicodeScalarValue(
|
|
887
|
+
if (isUnicodeScalarValue(code2)) {
|
|
883
888
|
++position;
|
|
884
889
|
} else if (isSupplementaryCodePoint(body, position)) {
|
|
885
890
|
position += 2;
|
|
@@ -901,8 +906,8 @@ function readEscapedUnicodeVariableWidth(lexer, position) {
|
|
|
901
906
|
let point = 0;
|
|
902
907
|
let size = 3;
|
|
903
908
|
while (size < 12) {
|
|
904
|
-
const
|
|
905
|
-
if (
|
|
909
|
+
const code2 = body.charCodeAt(position + size++);
|
|
910
|
+
if (code2 === 125) {
|
|
906
911
|
if (size < 5 || !isUnicodeScalarValue(point)) {
|
|
907
912
|
break;
|
|
908
913
|
}
|
|
@@ -911,7 +916,7 @@ function readEscapedUnicodeVariableWidth(lexer, position) {
|
|
|
911
916
|
size
|
|
912
917
|
};
|
|
913
918
|
}
|
|
914
|
-
point = point << 4 | readHexDigit(
|
|
919
|
+
point = point << 4 | readHexDigit(code2);
|
|
915
920
|
if (point < 0) {
|
|
916
921
|
break;
|
|
917
922
|
}
|
|
@@ -927,19 +932,19 @@ function readEscapedUnicodeVariableWidth(lexer, position) {
|
|
|
927
932
|
}
|
|
928
933
|
function readEscapedUnicodeFixedWidth(lexer, position) {
|
|
929
934
|
const body = lexer.source.body;
|
|
930
|
-
const
|
|
931
|
-
if (isUnicodeScalarValue(
|
|
935
|
+
const code2 = read16BitHexCode(body, position + 2);
|
|
936
|
+
if (isUnicodeScalarValue(code2)) {
|
|
932
937
|
return {
|
|
933
|
-
value: String.fromCodePoint(
|
|
938
|
+
value: String.fromCodePoint(code2),
|
|
934
939
|
size: 6
|
|
935
940
|
};
|
|
936
941
|
}
|
|
937
|
-
if (isLeadingSurrogate(
|
|
942
|
+
if (isLeadingSurrogate(code2)) {
|
|
938
943
|
if (body.charCodeAt(position + 6) === 92 && body.charCodeAt(position + 7) === 117) {
|
|
939
944
|
const trailingCode = read16BitHexCode(body, position + 8);
|
|
940
945
|
if (isTrailingSurrogate(trailingCode)) {
|
|
941
946
|
return {
|
|
942
|
-
value: String.fromCodePoint(
|
|
947
|
+
value: String.fromCodePoint(code2, trailingCode),
|
|
943
948
|
size: 12
|
|
944
949
|
};
|
|
945
950
|
}
|
|
@@ -954,13 +959,13 @@ function readEscapedUnicodeFixedWidth(lexer, position) {
|
|
|
954
959
|
function read16BitHexCode(body, position) {
|
|
955
960
|
return readHexDigit(body.charCodeAt(position)) << 12 | readHexDigit(body.charCodeAt(position + 1)) << 8 | readHexDigit(body.charCodeAt(position + 2)) << 4 | readHexDigit(body.charCodeAt(position + 3));
|
|
956
961
|
}
|
|
957
|
-
function readHexDigit(
|
|
958
|
-
return
|
|
962
|
+
function readHexDigit(code2) {
|
|
963
|
+
return code2 >= 48 && code2 <= 57 ? code2 - 48 : code2 >= 65 && code2 <= 70 ? code2 - 55 : code2 >= 97 && code2 <= 102 ? code2 - 87 : -1;
|
|
959
964
|
}
|
|
960
965
|
function readEscapedCharacter(lexer, position) {
|
|
961
966
|
const body = lexer.source.body;
|
|
962
|
-
const
|
|
963
|
-
switch (
|
|
967
|
+
const code2 = body.charCodeAt(position + 1);
|
|
968
|
+
switch (code2) {
|
|
964
969
|
case 34:
|
|
965
970
|
return {
|
|
966
971
|
value: '"',
|
|
@@ -1020,8 +1025,8 @@ function readBlockString(lexer, start2) {
|
|
|
1020
1025
|
let currentLine = "";
|
|
1021
1026
|
const blockLines = [];
|
|
1022
1027
|
while (position < bodyLength) {
|
|
1023
|
-
const
|
|
1024
|
-
if (
|
|
1028
|
+
const code2 = body.charCodeAt(position);
|
|
1029
|
+
if (code2 === 34 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34) {
|
|
1025
1030
|
currentLine += body.slice(chunkStart, position);
|
|
1026
1031
|
blockLines.push(currentLine);
|
|
1027
1032
|
const token = createToken(
|
|
@@ -1036,16 +1041,16 @@ function readBlockString(lexer, start2) {
|
|
|
1036
1041
|
lexer.lineStart = lineStart;
|
|
1037
1042
|
return token;
|
|
1038
1043
|
}
|
|
1039
|
-
if (
|
|
1044
|
+
if (code2 === 92 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34 && body.charCodeAt(position + 3) === 34) {
|
|
1040
1045
|
currentLine += body.slice(chunkStart, position);
|
|
1041
1046
|
chunkStart = position + 1;
|
|
1042
1047
|
position += 4;
|
|
1043
1048
|
continue;
|
|
1044
1049
|
}
|
|
1045
|
-
if (
|
|
1050
|
+
if (code2 === 10 || code2 === 13) {
|
|
1046
1051
|
currentLine += body.slice(chunkStart, position);
|
|
1047
1052
|
blockLines.push(currentLine);
|
|
1048
|
-
if (
|
|
1053
|
+
if (code2 === 13 && body.charCodeAt(position + 1) === 10) {
|
|
1049
1054
|
position += 2;
|
|
1050
1055
|
} else {
|
|
1051
1056
|
++position;
|
|
@@ -1055,7 +1060,7 @@ function readBlockString(lexer, start2) {
|
|
|
1055
1060
|
lineStart = position;
|
|
1056
1061
|
continue;
|
|
1057
1062
|
}
|
|
1058
|
-
if (isUnicodeScalarValue(
|
|
1063
|
+
if (isUnicodeScalarValue(code2)) {
|
|
1059
1064
|
++position;
|
|
1060
1065
|
} else if (isSupplementaryCodePoint(body, position)) {
|
|
1061
1066
|
position += 2;
|
|
@@ -1077,8 +1082,8 @@ function readName(lexer, start2) {
|
|
|
1077
1082
|
const bodyLength = body.length;
|
|
1078
1083
|
let position = start2 + 1;
|
|
1079
1084
|
while (position < bodyLength) {
|
|
1080
|
-
const
|
|
1081
|
-
if (isNameContinue(
|
|
1085
|
+
const code2 = body.charCodeAt(position);
|
|
1086
|
+
if (isNameContinue(code2)) {
|
|
1082
1087
|
++position;
|
|
1083
1088
|
} else {
|
|
1084
1089
|
break;
|
|
@@ -1153,8 +1158,8 @@ function formatArray(array, seenValues) {
|
|
|
1153
1158
|
const len = Math.min(MAX_ARRAY_LENGTH, array.length);
|
|
1154
1159
|
const remaining = array.length - len;
|
|
1155
1160
|
const items = [];
|
|
1156
|
-
for (let
|
|
1157
|
-
items.push(formatValue(array[
|
|
1161
|
+
for (let i3 = 0; i3 < len; ++i3) {
|
|
1162
|
+
items.push(formatValue(array[i3], seenValues));
|
|
1158
1163
|
}
|
|
1159
1164
|
if (remaining === 1) {
|
|
1160
1165
|
items.push("... 1 more item");
|
|
@@ -3010,7 +3015,7 @@ const printDocASTReducer = {
|
|
|
3010
3015
|
};
|
|
3011
3016
|
function join(maybeArray, separator = "") {
|
|
3012
3017
|
var _maybeArray$filter$jo;
|
|
3013
|
-
return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((
|
|
3018
|
+
return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x2) => x2).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : "";
|
|
3014
3019
|
}
|
|
3015
3020
|
function block(array) {
|
|
3016
3021
|
return wrap("{\n", indent(join(array, "\n")), "\n}");
|
|
@@ -3026,43 +3031,43 @@ function hasMultilineItems(maybeArray) {
|
|
|
3026
3031
|
return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
|
|
3027
3032
|
}
|
|
3028
3033
|
var e$1;
|
|
3029
|
-
!function(
|
|
3030
|
-
|
|
3031
|
-
|
|
3034
|
+
!function(e3) {
|
|
3035
|
+
e3[e3.Pull = 0] = "Pull";
|
|
3036
|
+
e3[e3.Close = 1] = "Close";
|
|
3032
3037
|
}(e$1 || (e$1 = {}));
|
|
3033
3038
|
var r;
|
|
3034
|
-
!function(
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3039
|
+
!function(e3) {
|
|
3040
|
+
e3[e3.Start = 0] = "Start";
|
|
3041
|
+
e3[e3.Push = 1] = "Push";
|
|
3042
|
+
e3[e3.End = 0] = "End";
|
|
3038
3043
|
}(r || (r = {}));
|
|
3039
3044
|
var teardownPlaceholder = () => {
|
|
3040
3045
|
};
|
|
3041
3046
|
var t = teardownPlaceholder;
|
|
3042
|
-
function start(
|
|
3043
|
-
var
|
|
3044
|
-
|
|
3045
|
-
return
|
|
3047
|
+
function start(e3) {
|
|
3048
|
+
var t3 = [e3];
|
|
3049
|
+
t3.tag = r.Start;
|
|
3050
|
+
return t3;
|
|
3046
3051
|
}
|
|
3047
|
-
function onEnd(
|
|
3052
|
+
function onEnd(t3) {
|
|
3048
3053
|
return (l2) => (n) => {
|
|
3049
|
-
var
|
|
3054
|
+
var a3 = false;
|
|
3050
3055
|
l2((l3) => {
|
|
3051
|
-
if (
|
|
3056
|
+
if (a3)
|
|
3052
3057
|
;
|
|
3053
3058
|
else if (l3 === r.End) {
|
|
3054
|
-
|
|
3059
|
+
a3 = true;
|
|
3055
3060
|
n(r.End);
|
|
3056
|
-
|
|
3061
|
+
t3();
|
|
3057
3062
|
} else if (l3.tag === r.Start) {
|
|
3058
|
-
var
|
|
3063
|
+
var i3 = l3[0];
|
|
3059
3064
|
n(start((r2) => {
|
|
3060
3065
|
if (r2 === e$1.Close) {
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3066
|
+
a3 = true;
|
|
3067
|
+
i3(e$1.Close);
|
|
3068
|
+
t3();
|
|
3064
3069
|
} else {
|
|
3065
|
-
|
|
3070
|
+
i3(r2);
|
|
3066
3071
|
}
|
|
3067
3072
|
}));
|
|
3068
3073
|
} else {
|
|
@@ -3072,64 +3077,64 @@ function onEnd(t2) {
|
|
|
3072
3077
|
};
|
|
3073
3078
|
}
|
|
3074
3079
|
function take(l2) {
|
|
3075
|
-
return (n) => (
|
|
3076
|
-
var
|
|
3077
|
-
var
|
|
3080
|
+
return (n) => (a3) => {
|
|
3081
|
+
var i3 = t;
|
|
3082
|
+
var s4 = false;
|
|
3078
3083
|
var f2 = 0;
|
|
3079
|
-
n((
|
|
3080
|
-
if (
|
|
3084
|
+
n((t3) => {
|
|
3085
|
+
if (s4)
|
|
3081
3086
|
;
|
|
3082
|
-
else if (
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
} else if (
|
|
3087
|
+
else if (t3 === r.End) {
|
|
3088
|
+
s4 = true;
|
|
3089
|
+
a3(r.End);
|
|
3090
|
+
} else if (t3.tag === r.Start) {
|
|
3086
3091
|
if (l2 <= 0) {
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3092
|
+
s4 = true;
|
|
3093
|
+
a3(r.End);
|
|
3094
|
+
t3[0](e$1.Close);
|
|
3090
3095
|
} else {
|
|
3091
|
-
|
|
3096
|
+
i3 = t3[0];
|
|
3092
3097
|
}
|
|
3093
3098
|
} else if (f2++ < l2) {
|
|
3094
|
-
|
|
3095
|
-
if (!
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
+
a3(t3);
|
|
3100
|
+
if (!s4 && f2 >= l2) {
|
|
3101
|
+
s4 = true;
|
|
3102
|
+
a3(r.End);
|
|
3103
|
+
i3(e$1.Close);
|
|
3099
3104
|
}
|
|
3100
3105
|
} else {
|
|
3101
|
-
|
|
3106
|
+
a3(t3);
|
|
3102
3107
|
}
|
|
3103
3108
|
});
|
|
3104
|
-
|
|
3105
|
-
if (r2 === e$1.Close && !
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
} else if (r2 === e$1.Pull && !
|
|
3109
|
-
|
|
3109
|
+
a3(start((r2) => {
|
|
3110
|
+
if (r2 === e$1.Close && !s4) {
|
|
3111
|
+
s4 = true;
|
|
3112
|
+
i3(e$1.Close);
|
|
3113
|
+
} else if (r2 === e$1.Pull && !s4 && f2 < l2) {
|
|
3114
|
+
i3(e$1.Pull);
|
|
3110
3115
|
}
|
|
3111
3116
|
}));
|
|
3112
3117
|
};
|
|
3113
3118
|
}
|
|
3114
3119
|
function subscribe(l2) {
|
|
3115
3120
|
return (n) => {
|
|
3116
|
-
var
|
|
3117
|
-
var
|
|
3118
|
-
n((
|
|
3119
|
-
if (
|
|
3120
|
-
|
|
3121
|
-
} else if (
|
|
3122
|
-
(
|
|
3123
|
-
} else if (!
|
|
3124
|
-
l2(
|
|
3125
|
-
|
|
3121
|
+
var a3 = t;
|
|
3122
|
+
var i3 = false;
|
|
3123
|
+
n((t3) => {
|
|
3124
|
+
if (t3 === r.End) {
|
|
3125
|
+
i3 = true;
|
|
3126
|
+
} else if (t3.tag === r.Start) {
|
|
3127
|
+
(a3 = t3[0])(e$1.Pull);
|
|
3128
|
+
} else if (!i3) {
|
|
3129
|
+
l2(t3[0]);
|
|
3130
|
+
a3(e$1.Pull);
|
|
3126
3131
|
}
|
|
3127
3132
|
});
|
|
3128
3133
|
return {
|
|
3129
3134
|
unsubscribe() {
|
|
3130
|
-
if (!
|
|
3131
|
-
|
|
3132
|
-
|
|
3135
|
+
if (!i3) {
|
|
3136
|
+
i3 = true;
|
|
3137
|
+
a3(e$1.Close);
|
|
3133
3138
|
}
|
|
3134
3139
|
}
|
|
3135
3140
|
};
|
|
@@ -3137,26 +3142,26 @@ function subscribe(l2) {
|
|
|
3137
3142
|
}
|
|
3138
3143
|
function toPromise(l2) {
|
|
3139
3144
|
return new Promise((n) => {
|
|
3140
|
-
var
|
|
3141
|
-
var
|
|
3142
|
-
l2((
|
|
3143
|
-
if (
|
|
3144
|
-
Promise.resolve(
|
|
3145
|
-
} else if (
|
|
3146
|
-
(
|
|
3145
|
+
var a3 = t;
|
|
3146
|
+
var i3;
|
|
3147
|
+
l2((t3) => {
|
|
3148
|
+
if (t3 === r.End) {
|
|
3149
|
+
Promise.resolve(i3).then(n);
|
|
3150
|
+
} else if (t3.tag === r.Start) {
|
|
3151
|
+
(a3 = t3[0])(e$1.Pull);
|
|
3147
3152
|
} else {
|
|
3148
|
-
|
|
3149
|
-
|
|
3153
|
+
i3 = t3[0];
|
|
3154
|
+
a3(e$1.Pull);
|
|
3150
3155
|
}
|
|
3151
3156
|
});
|
|
3152
3157
|
});
|
|
3153
3158
|
}
|
|
3154
|
-
var phash = (r2,
|
|
3155
|
-
var
|
|
3156
|
-
for (var
|
|
3157
|
-
|
|
3159
|
+
var phash = (r2, e3) => {
|
|
3160
|
+
var t3 = "number" == typeof e3 ? 0 | e3 : 5381;
|
|
3161
|
+
for (var a3 = 0, n = 0 | r2.length; a3 < n; a3++) {
|
|
3162
|
+
t3 = (t3 << 5) + t3 + r2.charCodeAt(a3);
|
|
3158
3163
|
}
|
|
3159
|
-
return
|
|
3164
|
+
return t3;
|
|
3160
3165
|
};
|
|
3161
3166
|
var o = /* @__PURE__ */ new Set();
|
|
3162
3167
|
var i = /* @__PURE__ */ new WeakMap();
|
|
@@ -3168,34 +3173,34 @@ var stringify = (r2) => {
|
|
|
3168
3173
|
} else if (r2.toJSON) {
|
|
3169
3174
|
return stringify(r2.toJSON());
|
|
3170
3175
|
} else if (Array.isArray(r2)) {
|
|
3171
|
-
var
|
|
3172
|
-
for (var
|
|
3173
|
-
if ("[" !==
|
|
3174
|
-
|
|
3176
|
+
var e3 = "[";
|
|
3177
|
+
for (var t3 of r2) {
|
|
3178
|
+
if ("[" !== e3) {
|
|
3179
|
+
e3 += ",";
|
|
3175
3180
|
}
|
|
3176
|
-
|
|
3181
|
+
e3 += (t3 = stringify(t3)).length > 0 ? t3 : "null";
|
|
3177
3182
|
}
|
|
3178
|
-
return
|
|
3183
|
+
return e3 += "]";
|
|
3179
3184
|
}
|
|
3180
|
-
var
|
|
3181
|
-
if (!
|
|
3185
|
+
var a3 = Object.keys(r2).sort();
|
|
3186
|
+
if (!a3.length && r2.constructor && r2.constructor !== Object) {
|
|
3182
3187
|
var n = i.get(r2) || Math.random().toString(36).slice(2);
|
|
3183
3188
|
i.set(r2, n);
|
|
3184
3189
|
return `{"__key":"${n}"}`;
|
|
3185
3190
|
}
|
|
3186
3191
|
o.add(r2);
|
|
3187
|
-
var
|
|
3188
|
-
for (var v2 of
|
|
3192
|
+
var s4 = "{";
|
|
3193
|
+
for (var v2 of a3) {
|
|
3189
3194
|
var f2 = stringify(r2[v2]);
|
|
3190
3195
|
if (f2) {
|
|
3191
|
-
if (
|
|
3192
|
-
|
|
3196
|
+
if (s4.length > 1) {
|
|
3197
|
+
s4 += ",";
|
|
3193
3198
|
}
|
|
3194
|
-
|
|
3199
|
+
s4 += stringify(v2) + ":" + f2;
|
|
3195
3200
|
}
|
|
3196
3201
|
}
|
|
3197
3202
|
o.delete(r2);
|
|
3198
|
-
return
|
|
3203
|
+
return s4 += "}";
|
|
3199
3204
|
};
|
|
3200
3205
|
var stringifyVariables = (r2) => {
|
|
3201
3206
|
o.clear();
|
|
@@ -3203,26 +3208,26 @@ var stringifyVariables = (r2) => {
|
|
|
3203
3208
|
};
|
|
3204
3209
|
var s = /("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g;
|
|
3205
3210
|
var v = /(#[^\n\r]+)?(?:\n|\r\n?|$)+/g;
|
|
3206
|
-
var replaceOutsideStrings = (r2,
|
|
3211
|
+
var replaceOutsideStrings = (r2, e3) => e3 % 2 == 0 ? r2.replace(v, "\n") : r2;
|
|
3207
3212
|
var sanitizeDocument = (r2) => r2.split(s).map(replaceOutsideStrings).join("").trim();
|
|
3208
3213
|
var f = /* @__PURE__ */ new Map();
|
|
3209
3214
|
var l = /* @__PURE__ */ new Map();
|
|
3210
3215
|
var stringifyDocument = (r2) => {
|
|
3211
|
-
var
|
|
3216
|
+
var e3;
|
|
3212
3217
|
if ("string" == typeof r2) {
|
|
3213
|
-
|
|
3218
|
+
e3 = sanitizeDocument(r2);
|
|
3214
3219
|
} else if (r2.loc && l.get(r2.__key) === r2) {
|
|
3215
|
-
|
|
3220
|
+
e3 = r2.loc.source.body;
|
|
3216
3221
|
} else {
|
|
3217
|
-
|
|
3218
|
-
f.set(r2,
|
|
3222
|
+
e3 = f.get(r2) || sanitizeDocument(print(r2));
|
|
3223
|
+
f.set(r2, e3);
|
|
3219
3224
|
}
|
|
3220
3225
|
if ("string" != typeof r2 && !r2.loc) {
|
|
3221
3226
|
r2.loc = {
|
|
3222
3227
|
start: 0,
|
|
3223
|
-
end:
|
|
3228
|
+
end: e3.length,
|
|
3224
3229
|
source: {
|
|
3225
|
-
body:
|
|
3230
|
+
body: e3,
|
|
3226
3231
|
name: "gql",
|
|
3227
3232
|
locationOffset: {
|
|
3228
3233
|
line: 1,
|
|
@@ -3231,58 +3236,58 @@ var stringifyDocument = (r2) => {
|
|
|
3231
3236
|
}
|
|
3232
3237
|
};
|
|
3233
3238
|
}
|
|
3234
|
-
return
|
|
3239
|
+
return e3;
|
|
3235
3240
|
};
|
|
3236
3241
|
var hashDocument = (r2) => {
|
|
3237
|
-
var
|
|
3242
|
+
var e3 = phash(stringifyDocument(r2));
|
|
3238
3243
|
if ("object" == typeof r2 && "definitions" in r2) {
|
|
3239
|
-
var
|
|
3240
|
-
if (
|
|
3241
|
-
|
|
3242
|
-
# ${
|
|
3244
|
+
var t3 = getOperationName(r2);
|
|
3245
|
+
if (t3) {
|
|
3246
|
+
e3 = phash(`
|
|
3247
|
+
# ${t3}`, e3);
|
|
3243
3248
|
}
|
|
3244
3249
|
}
|
|
3245
|
-
return
|
|
3250
|
+
return e3;
|
|
3246
3251
|
};
|
|
3247
3252
|
var keyDocument = (r2) => {
|
|
3248
|
-
var
|
|
3249
|
-
var
|
|
3253
|
+
var e3;
|
|
3254
|
+
var t3;
|
|
3250
3255
|
if ("string" == typeof r2) {
|
|
3251
|
-
|
|
3252
|
-
|
|
3256
|
+
e3 = hashDocument(r2);
|
|
3257
|
+
t3 = l.get(e3) || parse(r2, {
|
|
3253
3258
|
noLocation: true
|
|
3254
3259
|
});
|
|
3255
3260
|
} else {
|
|
3256
|
-
|
|
3257
|
-
|
|
3261
|
+
e3 = r2.__key || hashDocument(r2);
|
|
3262
|
+
t3 = l.get(e3) || r2;
|
|
3258
3263
|
}
|
|
3259
|
-
if (!
|
|
3260
|
-
stringifyDocument(
|
|
3264
|
+
if (!t3.loc) {
|
|
3265
|
+
stringifyDocument(t3);
|
|
3261
3266
|
}
|
|
3262
|
-
|
|
3263
|
-
l.set(
|
|
3264
|
-
return
|
|
3267
|
+
t3.__key = e3;
|
|
3268
|
+
l.set(e3, t3);
|
|
3269
|
+
return t3;
|
|
3265
3270
|
};
|
|
3266
|
-
var createRequest = (r2,
|
|
3267
|
-
if (!
|
|
3268
|
-
|
|
3271
|
+
var createRequest = (r2, e3) => {
|
|
3272
|
+
if (!e3) {
|
|
3273
|
+
e3 = {};
|
|
3269
3274
|
}
|
|
3270
|
-
var
|
|
3271
|
-
var
|
|
3272
|
-
var n =
|
|
3273
|
-
if ("{}" !==
|
|
3274
|
-
n = phash(
|
|
3275
|
+
var t3 = keyDocument(r2);
|
|
3276
|
+
var a3 = stringifyVariables(e3);
|
|
3277
|
+
var n = t3.__key;
|
|
3278
|
+
if ("{}" !== a3) {
|
|
3279
|
+
n = phash(a3, n);
|
|
3275
3280
|
}
|
|
3276
3281
|
return {
|
|
3277
3282
|
key: n,
|
|
3278
|
-
query:
|
|
3279
|
-
variables:
|
|
3283
|
+
query: t3,
|
|
3284
|
+
variables: e3
|
|
3280
3285
|
};
|
|
3281
3286
|
};
|
|
3282
3287
|
var getOperationName = (r2) => {
|
|
3283
|
-
for (var
|
|
3284
|
-
if (
|
|
3285
|
-
return
|
|
3288
|
+
for (var t3 of r2.definitions) {
|
|
3289
|
+
if (t3.kind === Kind.OPERATION_DEFINITION && t3.name) {
|
|
3290
|
+
return t3.name.value;
|
|
3286
3291
|
}
|
|
3287
3292
|
}
|
|
3288
3293
|
};
|
|
@@ -3291,95 +3296,95 @@ function useClient() {
|
|
|
3291
3296
|
if ("production" !== process.env.NODE_ENV && !vue.getCurrentInstance()) {
|
|
3292
3297
|
throw new Error("use* functions may only be called during the `setup()` or other lifecycle hooks.");
|
|
3293
3298
|
}
|
|
3294
|
-
var
|
|
3295
|
-
if ("production" !== process.env.NODE_ENV && !
|
|
3299
|
+
var e3 = vue.inject("$urql");
|
|
3300
|
+
if ("production" !== process.env.NODE_ENV && !e3) {
|
|
3296
3301
|
throw new Error("No urql Client was provided. Did you forget to install the plugin or call `provideClient` in a parent?");
|
|
3297
3302
|
}
|
|
3298
|
-
return
|
|
3303
|
+
return e3;
|
|
3299
3304
|
}
|
|
3300
|
-
function unwrapPossibleProxy(
|
|
3301
|
-
return
|
|
3305
|
+
function unwrapPossibleProxy(e3) {
|
|
3306
|
+
return e3 && vue.isRef(e3) ? e3.value : e3;
|
|
3302
3307
|
}
|
|
3303
3308
|
var b = {
|
|
3304
3309
|
flush: "pre"
|
|
3305
3310
|
};
|
|
3306
|
-
function callUseQuery(
|
|
3307
|
-
var n = vue.reactive(
|
|
3311
|
+
function callUseQuery(e3, l2 = useClient(), t3 = []) {
|
|
3312
|
+
var n = vue.reactive(e3);
|
|
3308
3313
|
var o2 = vue.ref();
|
|
3309
3314
|
var v2 = vue.ref(false);
|
|
3310
3315
|
var f2 = vue.ref(false);
|
|
3311
|
-
var
|
|
3312
|
-
var
|
|
3313
|
-
var
|
|
3314
|
-
var
|
|
3315
|
-
var
|
|
3316
|
+
var y3 = vue.ref();
|
|
3317
|
+
var d4 = vue.ref();
|
|
3318
|
+
var h3 = vue.ref();
|
|
3319
|
+
var x2 = vue.isRef(e3.pause) ? e3.pause : vue.ref(!!e3.pause);
|
|
3320
|
+
var w2 = vue.ref(createRequest(n.query, unwrapPossibleProxy(n.variables)));
|
|
3316
3321
|
var P = vue.ref();
|
|
3317
|
-
|
|
3318
|
-
var
|
|
3319
|
-
if (
|
|
3320
|
-
|
|
3322
|
+
t3.push(vue.watchEffect(() => {
|
|
3323
|
+
var e4 = createRequest(n.query, unwrapPossibleProxy(n.variables));
|
|
3324
|
+
if (w2.value.key !== e4.key) {
|
|
3325
|
+
w2.value = e4;
|
|
3321
3326
|
}
|
|
3322
3327
|
}, b));
|
|
3323
|
-
|
|
3324
|
-
P.value = !
|
|
3328
|
+
t3.push(vue.watchEffect(() => {
|
|
3329
|
+
P.value = !x2.value ? l2.value.executeQuery(w2.value, {
|
|
3325
3330
|
requestPolicy: n.requestPolicy,
|
|
3326
3331
|
...n.context
|
|
3327
3332
|
}) : void 0;
|
|
3328
3333
|
}, b));
|
|
3329
|
-
var
|
|
3334
|
+
var q2 = {
|
|
3330
3335
|
data: o2,
|
|
3331
3336
|
stale: v2,
|
|
3332
|
-
error:
|
|
3333
|
-
operation:
|
|
3334
|
-
extensions:
|
|
3337
|
+
error: y3,
|
|
3338
|
+
operation: d4,
|
|
3339
|
+
extensions: h3,
|
|
3335
3340
|
fetching: f2,
|
|
3336
|
-
isPaused:
|
|
3337
|
-
executeQuery(
|
|
3338
|
-
var
|
|
3341
|
+
isPaused: x2,
|
|
3342
|
+
executeQuery(e4) {
|
|
3343
|
+
var u2 = P.value = l2.value.executeQuery(w2.value, {
|
|
3339
3344
|
requestPolicy: n.requestPolicy,
|
|
3340
3345
|
...n.context,
|
|
3341
|
-
...
|
|
3346
|
+
...e4
|
|
3342
3347
|
});
|
|
3343
3348
|
return {
|
|
3344
|
-
...
|
|
3345
|
-
then(
|
|
3346
|
-
var
|
|
3347
|
-
return new Promise((
|
|
3349
|
+
...E2,
|
|
3350
|
+
then(e5, r2) {
|
|
3351
|
+
var a3;
|
|
3352
|
+
return new Promise((e6) => {
|
|
3348
3353
|
var r3 = false;
|
|
3349
|
-
|
|
3350
|
-
if (!
|
|
3351
|
-
if (
|
|
3352
|
-
|
|
3354
|
+
a3 = subscribe(() => {
|
|
3355
|
+
if (!q2.fetching.value && !q2.stale.value) {
|
|
3356
|
+
if (a3) {
|
|
3357
|
+
a3.unsubscribe();
|
|
3353
3358
|
}
|
|
3354
3359
|
r3 = true;
|
|
3355
|
-
|
|
3360
|
+
e6(q2);
|
|
3356
3361
|
}
|
|
3357
|
-
})(
|
|
3362
|
+
})(u2);
|
|
3358
3363
|
if (r3) {
|
|
3359
|
-
|
|
3364
|
+
a3.unsubscribe();
|
|
3360
3365
|
}
|
|
3361
|
-
}).then(
|
|
3366
|
+
}).then(e5, r2);
|
|
3362
3367
|
}
|
|
3363
3368
|
};
|
|
3364
3369
|
},
|
|
3365
3370
|
pause() {
|
|
3366
|
-
|
|
3371
|
+
x2.value = true;
|
|
3367
3372
|
},
|
|
3368
3373
|
resume() {
|
|
3369
|
-
|
|
3374
|
+
x2.value = false;
|
|
3370
3375
|
}
|
|
3371
3376
|
};
|
|
3372
|
-
|
|
3377
|
+
t3.push(vue.watchEffect((e4) => {
|
|
3373
3378
|
if (P.value) {
|
|
3374
3379
|
f2.value = true;
|
|
3375
3380
|
v2.value = false;
|
|
3376
|
-
|
|
3377
|
-
o2.value =
|
|
3378
|
-
v2.value = !!
|
|
3381
|
+
e4(subscribe((e5) => {
|
|
3382
|
+
o2.value = e5.data;
|
|
3383
|
+
v2.value = !!e5.stale;
|
|
3379
3384
|
f2.value = false;
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3385
|
+
y3.value = e5.error;
|
|
3386
|
+
d4.value = e5.operation;
|
|
3387
|
+
h3.value = e5.extensions;
|
|
3383
3388
|
})(onEnd(() => {
|
|
3384
3389
|
f2.value = false;
|
|
3385
3390
|
v2.value = false;
|
|
@@ -3391,56 +3396,56 @@ function callUseQuery(e2, l2 = useClient(), t2 = []) {
|
|
|
3391
3396
|
}, {
|
|
3392
3397
|
flush: "sync"
|
|
3393
3398
|
}));
|
|
3394
|
-
var
|
|
3395
|
-
...
|
|
3396
|
-
then(
|
|
3399
|
+
var E2 = {
|
|
3400
|
+
...q2,
|
|
3401
|
+
then(e4, u2) {
|
|
3397
3402
|
var r2;
|
|
3398
|
-
return new Promise((
|
|
3403
|
+
return new Promise((e5) => {
|
|
3399
3404
|
if (!P.value) {
|
|
3400
|
-
return
|
|
3405
|
+
return e5(q2);
|
|
3401
3406
|
}
|
|
3402
|
-
var
|
|
3407
|
+
var u3 = false;
|
|
3403
3408
|
r2 = subscribe(() => {
|
|
3404
|
-
if (!
|
|
3409
|
+
if (!q2.fetching.value && !q2.stale.value) {
|
|
3405
3410
|
if (r2) {
|
|
3406
3411
|
r2.unsubscribe();
|
|
3407
3412
|
}
|
|
3408
|
-
|
|
3409
|
-
|
|
3413
|
+
u3 = true;
|
|
3414
|
+
e5(q2);
|
|
3410
3415
|
}
|
|
3411
3416
|
})(P.value);
|
|
3412
|
-
if (
|
|
3417
|
+
if (u3) {
|
|
3413
3418
|
r2.unsubscribe();
|
|
3414
3419
|
}
|
|
3415
|
-
}).then(
|
|
3420
|
+
}).then(e4, u2);
|
|
3416
3421
|
}
|
|
3417
3422
|
};
|
|
3418
|
-
return
|
|
3423
|
+
return E2;
|
|
3419
3424
|
}
|
|
3420
|
-
function callUseMutation(
|
|
3425
|
+
function callUseMutation(e3, r2 = useClient()) {
|
|
3421
3426
|
var l2 = vue.ref();
|
|
3422
|
-
var
|
|
3427
|
+
var t3 = vue.ref(false);
|
|
3423
3428
|
var n = vue.ref(false);
|
|
3424
|
-
var
|
|
3425
|
-
var
|
|
3429
|
+
var s4 = vue.ref();
|
|
3430
|
+
var i3 = vue.ref();
|
|
3426
3431
|
var o2 = vue.ref();
|
|
3427
3432
|
return {
|
|
3428
3433
|
data: l2,
|
|
3429
|
-
stale:
|
|
3434
|
+
stale: t3,
|
|
3430
3435
|
fetching: n,
|
|
3431
|
-
error:
|
|
3432
|
-
operation:
|
|
3436
|
+
error: s4,
|
|
3437
|
+
operation: i3,
|
|
3433
3438
|
extensions: o2,
|
|
3434
|
-
executeMutation(
|
|
3439
|
+
executeMutation(a3, v2) {
|
|
3435
3440
|
n.value = true;
|
|
3436
|
-
return toPromise(take(1)(r2.value.executeMutation(createRequest(
|
|
3437
|
-
l2.value =
|
|
3438
|
-
|
|
3441
|
+
return toPromise(take(1)(r2.value.executeMutation(createRequest(e3, unwrapPossibleProxy(a3)), v2 || {}))).then((e4) => {
|
|
3442
|
+
l2.value = e4.data;
|
|
3443
|
+
t3.value = !!e4.stale;
|
|
3439
3444
|
n.value = false;
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
o2.value =
|
|
3443
|
-
return
|
|
3445
|
+
s4.value = e4.error;
|
|
3446
|
+
i3.value = e4.operation;
|
|
3447
|
+
o2.value = e4.extensions;
|
|
3448
|
+
return e4;
|
|
3444
3449
|
});
|
|
3445
3450
|
}
|
|
3446
3451
|
};
|
|
@@ -3448,59 +3453,59 @@ function callUseMutation(e2, r2 = useClient()) {
|
|
|
3448
3453
|
var d = {
|
|
3449
3454
|
flush: "pre"
|
|
3450
3455
|
};
|
|
3451
|
-
function callUseSubscription(
|
|
3452
|
-
var o2 = vue.reactive(
|
|
3456
|
+
function callUseSubscription(e3, l2, t3 = useClient(), n = []) {
|
|
3457
|
+
var o2 = vue.reactive(e3);
|
|
3453
3458
|
var v2 = vue.ref();
|
|
3454
3459
|
var f2 = vue.ref(false);
|
|
3455
|
-
var
|
|
3456
|
-
var
|
|
3457
|
-
var
|
|
3458
|
-
var
|
|
3459
|
-
var
|
|
3460
|
-
var P = vue.isRef(
|
|
3461
|
-
var
|
|
3462
|
-
var
|
|
3460
|
+
var y3 = vue.ref(false);
|
|
3461
|
+
var b3 = vue.ref();
|
|
3462
|
+
var h3 = vue.ref();
|
|
3463
|
+
var x2 = vue.ref();
|
|
3464
|
+
var w2 = vue.ref(l2);
|
|
3465
|
+
var P = vue.isRef(e3.pause) ? e3.pause : vue.ref(!!e3.pause);
|
|
3466
|
+
var q2 = vue.ref(createRequest(o2.query, unwrapPossibleProxy(o2.variables)));
|
|
3467
|
+
var E2 = vue.ref();
|
|
3463
3468
|
n.push(vue.watchEffect(() => {
|
|
3464
|
-
var
|
|
3465
|
-
if (
|
|
3466
|
-
|
|
3469
|
+
var e4 = createRequest(o2.query, unwrapPossibleProxy(o2.variables));
|
|
3470
|
+
if (q2.value.key !== e4.key) {
|
|
3471
|
+
q2.value = e4;
|
|
3467
3472
|
}
|
|
3468
3473
|
}, d));
|
|
3469
3474
|
n.push(vue.watchEffect(() => {
|
|
3470
|
-
|
|
3475
|
+
E2.value = !P.value ? t3.value.executeSubscription(q2.value, {
|
|
3471
3476
|
...o2.context
|
|
3472
3477
|
}) : void 0;
|
|
3473
3478
|
}, d));
|
|
3474
|
-
n.push(vue.watchEffect((
|
|
3475
|
-
if (
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
v2.value = void 0 !==
|
|
3480
|
-
|
|
3481
|
-
f2.value = !!
|
|
3482
|
-
|
|
3479
|
+
n.push(vue.watchEffect((e4) => {
|
|
3480
|
+
if (E2.value) {
|
|
3481
|
+
y3.value = true;
|
|
3482
|
+
e4(subscribe((e5) => {
|
|
3483
|
+
y3.value = true;
|
|
3484
|
+
v2.value = void 0 !== e5.data ? "function" == typeof w2.value ? w2.value(v2.value, e5.data) : e5.data : e5.data, b3.value = e5.error;
|
|
3485
|
+
x2.value = e5.extensions;
|
|
3486
|
+
f2.value = !!e5.stale;
|
|
3487
|
+
h3.value = e5.operation;
|
|
3483
3488
|
})(onEnd(() => {
|
|
3484
|
-
|
|
3485
|
-
})(
|
|
3489
|
+
y3.value = false;
|
|
3490
|
+
})(E2.value)).unsubscribe);
|
|
3486
3491
|
} else {
|
|
3487
|
-
|
|
3492
|
+
y3.value = false;
|
|
3488
3493
|
}
|
|
3489
3494
|
}, d));
|
|
3490
|
-
var
|
|
3495
|
+
var m3 = {
|
|
3491
3496
|
data: v2,
|
|
3492
3497
|
stale: f2,
|
|
3493
|
-
error:
|
|
3494
|
-
operation:
|
|
3495
|
-
extensions:
|
|
3496
|
-
fetching:
|
|
3498
|
+
error: b3,
|
|
3499
|
+
operation: h3,
|
|
3500
|
+
extensions: x2,
|
|
3501
|
+
fetching: y3,
|
|
3497
3502
|
isPaused: P,
|
|
3498
|
-
executeSubscription(
|
|
3499
|
-
|
|
3503
|
+
executeSubscription(e4) {
|
|
3504
|
+
E2.value = t3.value.executeSubscription(q2.value, {
|
|
3500
3505
|
...o2.context,
|
|
3501
|
-
...
|
|
3506
|
+
...e4
|
|
3502
3507
|
});
|
|
3503
|
-
return
|
|
3508
|
+
return m3;
|
|
3504
3509
|
},
|
|
3505
3510
|
pause() {
|
|
3506
3511
|
P.value = true;
|
|
@@ -3509,22 +3514,22 @@ function callUseSubscription(e2, l2, t2 = useClient(), n = []) {
|
|
|
3509
3514
|
P.value = false;
|
|
3510
3515
|
}
|
|
3511
3516
|
};
|
|
3512
|
-
return
|
|
3517
|
+
return m3;
|
|
3513
3518
|
}
|
|
3514
3519
|
function useClientHandle() {
|
|
3515
|
-
var
|
|
3516
|
-
var
|
|
3520
|
+
var e3 = useClient();
|
|
3521
|
+
var u2 = [];
|
|
3517
3522
|
vue.onBeforeUnmount(() => {
|
|
3518
|
-
var
|
|
3519
|
-
while (
|
|
3520
|
-
|
|
3523
|
+
var e4;
|
|
3524
|
+
while (e4 = u2.shift()) {
|
|
3525
|
+
e4();
|
|
3521
3526
|
}
|
|
3522
3527
|
});
|
|
3523
3528
|
var r2 = {
|
|
3524
|
-
client:
|
|
3525
|
-
useQuery: (r3) => callUseQuery(r3,
|
|
3526
|
-
useSubscription: (r3,
|
|
3527
|
-
useMutation: (
|
|
3529
|
+
client: e3.value,
|
|
3530
|
+
useQuery: (r3) => callUseQuery(r3, e3, u2),
|
|
3531
|
+
useSubscription: (r3, a3) => callUseSubscription(r3, a3, e3, u2),
|
|
3532
|
+
useMutation: (u3) => callUseMutation(u3, e3)
|
|
3528
3533
|
};
|
|
3529
3534
|
if ("production" !== process.env.NODE_ENV) {
|
|
3530
3535
|
vue.onMounted(() => {
|
|
@@ -3533,13 +3538,13 @@ function useClientHandle() {
|
|
|
3533
3538
|
if ("production" !== process.env.NODE_ENV && !vue.getCurrentInstance()) {
|
|
3534
3539
|
throw new Error("`handle.useQuery()` should only be called in the `setup()` or a lifecycle hook.");
|
|
3535
3540
|
}
|
|
3536
|
-
return callUseQuery(r3,
|
|
3541
|
+
return callUseQuery(r3, e3, u2);
|
|
3537
3542
|
},
|
|
3538
|
-
useSubscription(r3,
|
|
3543
|
+
useSubscription(r3, a3) {
|
|
3539
3544
|
if ("production" !== process.env.NODE_ENV && !vue.getCurrentInstance()) {
|
|
3540
3545
|
throw new Error("`handle.useSubscription()` should only be called in the `setup()` or a lifecycle hook.");
|
|
3541
3546
|
}
|
|
3542
|
-
return callUseSubscription(r3,
|
|
3547
|
+
return callUseSubscription(r3, a3, e3, u2);
|
|
3543
3548
|
}
|
|
3544
3549
|
});
|
|
3545
3550
|
});
|
|
@@ -3561,23 +3566,23 @@ function requiredArgs(required, args) {
|
|
|
3561
3566
|
throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
|
|
3562
3567
|
}
|
|
3563
3568
|
}
|
|
3564
|
-
function _typeof(obj) {
|
|
3569
|
+
function _typeof$1(obj) {
|
|
3565
3570
|
"@babel/helpers - typeof";
|
|
3566
3571
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
3567
|
-
_typeof = function _typeof2(obj2) {
|
|
3572
|
+
_typeof$1 = function _typeof2(obj2) {
|
|
3568
3573
|
return typeof obj2;
|
|
3569
3574
|
};
|
|
3570
3575
|
} else {
|
|
3571
|
-
_typeof = function _typeof2(obj2) {
|
|
3576
|
+
_typeof$1 = function _typeof2(obj2) {
|
|
3572
3577
|
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
3573
3578
|
};
|
|
3574
3579
|
}
|
|
3575
|
-
return _typeof(obj);
|
|
3580
|
+
return _typeof$1(obj);
|
|
3576
3581
|
}
|
|
3577
3582
|
function toDate(argument) {
|
|
3578
3583
|
requiredArgs(1, arguments);
|
|
3579
3584
|
var argStr = Object.prototype.toString.call(argument);
|
|
3580
|
-
if (argument instanceof Date || _typeof(argument) === "object" && argStr === "[object Date]") {
|
|
3585
|
+
if (argument instanceof Date || _typeof$1(argument) === "object" && argStr === "[object Date]") {
|
|
3581
3586
|
return new Date(argument.getTime());
|
|
3582
3587
|
} else if (typeof argument === "number" || argStr === "[object Number]") {
|
|
3583
3588
|
return new Date(argument);
|
|
@@ -3602,12 +3607,52 @@ function addDays(dirtyDate, dirtyAmount) {
|
|
|
3602
3607
|
date.setDate(date.getDate() + amount);
|
|
3603
3608
|
return date;
|
|
3604
3609
|
}
|
|
3610
|
+
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
3611
|
+
requiredArgs(2, arguments);
|
|
3612
|
+
var timestamp = toDate(dirtyDate).getTime();
|
|
3613
|
+
var amount = toInteger(dirtyAmount);
|
|
3614
|
+
return new Date(timestamp + amount);
|
|
3615
|
+
}
|
|
3616
|
+
var defaultOptions = {};
|
|
3617
|
+
function getDefaultOptions() {
|
|
3618
|
+
return defaultOptions;
|
|
3619
|
+
}
|
|
3620
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
3621
|
+
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
3622
|
+
utcDate.setUTCFullYear(date.getFullYear());
|
|
3623
|
+
return date.getTime() - utcDate.getTime();
|
|
3624
|
+
}
|
|
3605
3625
|
function startOfDay(dirtyDate) {
|
|
3606
3626
|
requiredArgs(1, arguments);
|
|
3607
3627
|
var date = toDate(dirtyDate);
|
|
3608
3628
|
date.setHours(0, 0, 0, 0);
|
|
3609
3629
|
return date;
|
|
3610
3630
|
}
|
|
3631
|
+
function _typeof(obj) {
|
|
3632
|
+
"@babel/helpers - typeof";
|
|
3633
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
3634
|
+
_typeof = function _typeof2(obj2) {
|
|
3635
|
+
return typeof obj2;
|
|
3636
|
+
};
|
|
3637
|
+
} else {
|
|
3638
|
+
_typeof = function _typeof2(obj2) {
|
|
3639
|
+
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
3640
|
+
};
|
|
3641
|
+
}
|
|
3642
|
+
return _typeof(obj);
|
|
3643
|
+
}
|
|
3644
|
+
function isDate(value) {
|
|
3645
|
+
requiredArgs(1, arguments);
|
|
3646
|
+
return value instanceof Date || _typeof(value) === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
3647
|
+
}
|
|
3648
|
+
function isValid(dirtyDate) {
|
|
3649
|
+
requiredArgs(1, arguments);
|
|
3650
|
+
if (!isDate(dirtyDate) && typeof dirtyDate !== "number") {
|
|
3651
|
+
return false;
|
|
3652
|
+
}
|
|
3653
|
+
var date = toDate(dirtyDate);
|
|
3654
|
+
return !isNaN(Number(date));
|
|
3655
|
+
}
|
|
3611
3656
|
function endOfDay(dirtyDate) {
|
|
3612
3657
|
requiredArgs(1, arguments);
|
|
3613
3658
|
var date = toDate(dirtyDate);
|
|
@@ -3617,226 +3662,2071 @@ function endOfDay(dirtyDate) {
|
|
|
3617
3662
|
function endOfToday() {
|
|
3618
3663
|
return endOfDay(Date.now());
|
|
3619
3664
|
}
|
|
3620
|
-
function
|
|
3621
|
-
|
|
3665
|
+
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
3666
|
+
requiredArgs(2, arguments);
|
|
3667
|
+
var amount = toInteger(dirtyAmount);
|
|
3668
|
+
return addMilliseconds(dirtyDate, -amount);
|
|
3622
3669
|
}
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
this.qrKey = qrKey;
|
|
3663
|
-
this.type = type;
|
|
3664
|
-
const resp = await client2.mutation(context.GraphUtil.executeOne(tempatModels.models.CheckInModel, {}), {
|
|
3665
|
-
action: "presence",
|
|
3666
|
-
input: {
|
|
3667
|
-
staffId,
|
|
3668
|
-
qrKey: this.qrKey || null,
|
|
3669
|
-
type: this.type
|
|
3670
|
-
}
|
|
3671
|
-
}).toPromise();
|
|
3672
|
-
const data = resp.data.executeCheckIn.output;
|
|
3673
|
-
if (data) {
|
|
3674
|
-
this.checkInId = data || "";
|
|
3675
|
-
this.isScanning = false;
|
|
3676
|
-
this.isScanned = true;
|
|
3677
|
-
} else
|
|
3678
|
-
throw new Error("Terjadi kesalahan.");
|
|
3679
|
-
} catch (error) {
|
|
3680
|
-
console.log(error);
|
|
3681
|
-
this.isScanError = true;
|
|
3682
|
-
}
|
|
3683
|
-
}
|
|
3670
|
+
var MILLISECONDS_IN_DAY = 864e5;
|
|
3671
|
+
function getUTCDayOfYear(dirtyDate) {
|
|
3672
|
+
requiredArgs(1, arguments);
|
|
3673
|
+
var date = toDate(dirtyDate);
|
|
3674
|
+
var timestamp = date.getTime();
|
|
3675
|
+
date.setUTCMonth(0, 1);
|
|
3676
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
3677
|
+
var startOfYearTimestamp = date.getTime();
|
|
3678
|
+
var difference = timestamp - startOfYearTimestamp;
|
|
3679
|
+
return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
|
|
3680
|
+
}
|
|
3681
|
+
function startOfUTCISOWeek(dirtyDate) {
|
|
3682
|
+
requiredArgs(1, arguments);
|
|
3683
|
+
var weekStartsOn = 1;
|
|
3684
|
+
var date = toDate(dirtyDate);
|
|
3685
|
+
var day = date.getUTCDay();
|
|
3686
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
3687
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
3688
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
3689
|
+
return date;
|
|
3690
|
+
}
|
|
3691
|
+
function getUTCISOWeekYear(dirtyDate) {
|
|
3692
|
+
requiredArgs(1, arguments);
|
|
3693
|
+
var date = toDate(dirtyDate);
|
|
3694
|
+
var year = date.getUTCFullYear();
|
|
3695
|
+
var fourthOfJanuaryOfNextYear = new Date(0);
|
|
3696
|
+
fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
|
|
3697
|
+
fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
3698
|
+
var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
|
|
3699
|
+
var fourthOfJanuaryOfThisYear = new Date(0);
|
|
3700
|
+
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
|
3701
|
+
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
3702
|
+
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
|
3703
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
3704
|
+
return year + 1;
|
|
3705
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
3706
|
+
return year;
|
|
3707
|
+
} else {
|
|
3708
|
+
return year - 1;
|
|
3684
3709
|
}
|
|
3685
|
-
});
|
|
3686
|
-
const operasional_types = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3687
|
-
__proto__: null
|
|
3688
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
3689
|
-
function useOperasional() {
|
|
3690
|
-
const context2 = component.ComponentUtil.injectStrict(
|
|
3691
|
-
"neu:operasional:operasional"
|
|
3692
|
-
);
|
|
3693
|
-
return { ...context2 };
|
|
3694
3710
|
}
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3711
|
+
function startOfUTCISOWeekYear(dirtyDate) {
|
|
3712
|
+
requiredArgs(1, arguments);
|
|
3713
|
+
var year = getUTCISOWeekYear(dirtyDate);
|
|
3714
|
+
var fourthOfJanuary = new Date(0);
|
|
3715
|
+
fourthOfJanuary.setUTCFullYear(year, 0, 4);
|
|
3716
|
+
fourthOfJanuary.setUTCHours(0, 0, 0, 0);
|
|
3717
|
+
var date = startOfUTCISOWeek(fourthOfJanuary);
|
|
3718
|
+
return date;
|
|
3719
|
+
}
|
|
3720
|
+
var MILLISECONDS_IN_WEEK$1 = 6048e5;
|
|
3721
|
+
function getUTCISOWeek(dirtyDate) {
|
|
3722
|
+
requiredArgs(1, arguments);
|
|
3723
|
+
var date = toDate(dirtyDate);
|
|
3724
|
+
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
|
3725
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
|
|
3726
|
+
}
|
|
3727
|
+
function startOfUTCWeek(dirtyDate, options) {
|
|
3728
|
+
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
3729
|
+
requiredArgs(1, arguments);
|
|
3730
|
+
var defaultOptions2 = getDefaultOptions();
|
|
3731
|
+
var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
|
|
3732
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
3733
|
+
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
3713
3734
|
}
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3735
|
+
var date = toDate(dirtyDate);
|
|
3736
|
+
var day = date.getUTCDay();
|
|
3737
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
3738
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
3739
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
3740
|
+
return date;
|
|
3741
|
+
}
|
|
3742
|
+
function getUTCWeekYear(dirtyDate, options) {
|
|
3743
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
3744
|
+
requiredArgs(1, arguments);
|
|
3745
|
+
var date = toDate(dirtyDate);
|
|
3746
|
+
var year = date.getUTCFullYear();
|
|
3747
|
+
var defaultOptions2 = getDefaultOptions();
|
|
3748
|
+
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
3749
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
3750
|
+
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
3751
|
+
}
|
|
3752
|
+
var firstWeekOfNextYear = new Date(0);
|
|
3753
|
+
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
|
3754
|
+
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
3755
|
+
var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
|
|
3756
|
+
var firstWeekOfThisYear = new Date(0);
|
|
3757
|
+
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
3758
|
+
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
3759
|
+
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
|
|
3760
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
3761
|
+
return year + 1;
|
|
3762
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
3763
|
+
return year;
|
|
3764
|
+
} else {
|
|
3765
|
+
return year - 1;
|
|
3742
3766
|
}
|
|
3743
3767
|
}
|
|
3744
|
-
function
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
}), (i2 = n.get("*")) && i2.slice().map(function(n2) {
|
|
3756
|
-
n2(t2, e2);
|
|
3757
|
-
});
|
|
3758
|
-
} };
|
|
3768
|
+
function startOfUTCWeekYear(dirtyDate, options) {
|
|
3769
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
3770
|
+
requiredArgs(1, arguments);
|
|
3771
|
+
var defaultOptions2 = getDefaultOptions();
|
|
3772
|
+
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
3773
|
+
var year = getUTCWeekYear(dirtyDate, options);
|
|
3774
|
+
var firstWeek = new Date(0);
|
|
3775
|
+
firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
3776
|
+
firstWeek.setUTCHours(0, 0, 0, 0);
|
|
3777
|
+
var date = startOfUTCWeek(firstWeek, options);
|
|
3778
|
+
return date;
|
|
3759
3779
|
}
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3780
|
+
var MILLISECONDS_IN_WEEK = 6048e5;
|
|
3781
|
+
function getUTCWeek(dirtyDate, options) {
|
|
3782
|
+
requiredArgs(1, arguments);
|
|
3783
|
+
var date = toDate(dirtyDate);
|
|
3784
|
+
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
3785
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
|
3786
|
+
}
|
|
3787
|
+
function addLeadingZeros(number, targetLength) {
|
|
3788
|
+
var sign = number < 0 ? "-" : "";
|
|
3789
|
+
var output = Math.abs(number).toString();
|
|
3790
|
+
while (output.length < targetLength) {
|
|
3791
|
+
output = "0" + output;
|
|
3792
|
+
}
|
|
3793
|
+
return sign + output;
|
|
3794
|
+
}
|
|
3795
|
+
var formatters$2 = {
|
|
3796
|
+
// Year
|
|
3797
|
+
y: function y(date, token) {
|
|
3798
|
+
var signedYear = date.getUTCFullYear();
|
|
3799
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
3800
|
+
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
|
3801
|
+
},
|
|
3802
|
+
// Month
|
|
3803
|
+
M: function M(date, token) {
|
|
3804
|
+
var month = date.getUTCMonth();
|
|
3805
|
+
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
3806
|
+
},
|
|
3807
|
+
// Day of the month
|
|
3808
|
+
d: function d2(date, token) {
|
|
3809
|
+
return addLeadingZeros(date.getUTCDate(), token.length);
|
|
3810
|
+
},
|
|
3811
|
+
// AM or PM
|
|
3812
|
+
a: function a(date, token) {
|
|
3813
|
+
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
|
|
3814
|
+
switch (token) {
|
|
3815
|
+
case "a":
|
|
3816
|
+
case "aa":
|
|
3817
|
+
return dayPeriodEnumValue.toUpperCase();
|
|
3818
|
+
case "aaa":
|
|
3819
|
+
return dayPeriodEnumValue;
|
|
3820
|
+
case "aaaaa":
|
|
3821
|
+
return dayPeriodEnumValue[0];
|
|
3822
|
+
case "aaaa":
|
|
3823
|
+
default:
|
|
3824
|
+
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
|
3825
|
+
}
|
|
3826
|
+
},
|
|
3827
|
+
// Hour [1-12]
|
|
3828
|
+
h: function h(date, token) {
|
|
3829
|
+
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
|
3830
|
+
},
|
|
3831
|
+
// Hour [0-23]
|
|
3832
|
+
H: function H(date, token) {
|
|
3833
|
+
return addLeadingZeros(date.getUTCHours(), token.length);
|
|
3834
|
+
},
|
|
3835
|
+
// Minute
|
|
3836
|
+
m: function m(date, token) {
|
|
3837
|
+
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
|
3838
|
+
},
|
|
3839
|
+
// Second
|
|
3840
|
+
s: function s2(date, token) {
|
|
3841
|
+
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
|
3842
|
+
},
|
|
3843
|
+
// Fraction of second
|
|
3844
|
+
S: function S(date, token) {
|
|
3845
|
+
var numberOfDigits = token.length;
|
|
3846
|
+
var milliseconds = date.getUTCMilliseconds();
|
|
3847
|
+
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
3848
|
+
return addLeadingZeros(fractionalSeconds, token.length);
|
|
3849
|
+
}
|
|
3850
|
+
};
|
|
3851
|
+
const formatters$3 = formatters$2;
|
|
3852
|
+
var dayPeriodEnum = {
|
|
3853
|
+
am: "am",
|
|
3854
|
+
pm: "pm",
|
|
3855
|
+
midnight: "midnight",
|
|
3856
|
+
noon: "noon",
|
|
3857
|
+
morning: "morning",
|
|
3858
|
+
afternoon: "afternoon",
|
|
3859
|
+
evening: "evening",
|
|
3860
|
+
night: "night"
|
|
3861
|
+
};
|
|
3862
|
+
var formatters = {
|
|
3863
|
+
// Era
|
|
3864
|
+
G: function G(date, token, localize2) {
|
|
3865
|
+
var era = date.getUTCFullYear() > 0 ? 1 : 0;
|
|
3866
|
+
switch (token) {
|
|
3867
|
+
case "G":
|
|
3868
|
+
case "GG":
|
|
3869
|
+
case "GGG":
|
|
3870
|
+
return localize2.era(era, {
|
|
3871
|
+
width: "abbreviated"
|
|
3872
|
+
});
|
|
3873
|
+
case "GGGGG":
|
|
3874
|
+
return localize2.era(era, {
|
|
3875
|
+
width: "narrow"
|
|
3876
|
+
});
|
|
3877
|
+
case "GGGG":
|
|
3878
|
+
default:
|
|
3879
|
+
return localize2.era(era, {
|
|
3880
|
+
width: "wide"
|
|
3881
|
+
});
|
|
3882
|
+
}
|
|
3883
|
+
},
|
|
3884
|
+
// Year
|
|
3885
|
+
y: function y2(date, token, localize2) {
|
|
3886
|
+
if (token === "yo") {
|
|
3887
|
+
var signedYear = date.getUTCFullYear();
|
|
3888
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
3889
|
+
return localize2.ordinalNumber(year, {
|
|
3890
|
+
unit: "year"
|
|
3891
|
+
});
|
|
3892
|
+
}
|
|
3893
|
+
return formatters$3.y(date, token);
|
|
3894
|
+
},
|
|
3895
|
+
// Local week-numbering year
|
|
3896
|
+
Y: function Y(date, token, localize2, options) {
|
|
3897
|
+
var signedWeekYear = getUTCWeekYear(date, options);
|
|
3898
|
+
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
3899
|
+
if (token === "YY") {
|
|
3900
|
+
var twoDigitYear = weekYear % 100;
|
|
3901
|
+
return addLeadingZeros(twoDigitYear, 2);
|
|
3902
|
+
}
|
|
3903
|
+
if (token === "Yo") {
|
|
3904
|
+
return localize2.ordinalNumber(weekYear, {
|
|
3905
|
+
unit: "year"
|
|
3906
|
+
});
|
|
3907
|
+
}
|
|
3908
|
+
return addLeadingZeros(weekYear, token.length);
|
|
3909
|
+
},
|
|
3910
|
+
// ISO week-numbering year
|
|
3911
|
+
R: function R(date, token) {
|
|
3912
|
+
var isoWeekYear = getUTCISOWeekYear(date);
|
|
3913
|
+
return addLeadingZeros(isoWeekYear, token.length);
|
|
3914
|
+
},
|
|
3915
|
+
// Extended year. This is a single number designating the year of this calendar system.
|
|
3916
|
+
// The main difference between `y` and `u` localizers are B.C. years:
|
|
3917
|
+
// | Year | `y` | `u` |
|
|
3918
|
+
// |------|-----|-----|
|
|
3919
|
+
// | AC 1 | 1 | 1 |
|
|
3920
|
+
// | BC 1 | 1 | 0 |
|
|
3921
|
+
// | BC 2 | 2 | -1 |
|
|
3922
|
+
// Also `yy` always returns the last two digits of a year,
|
|
3923
|
+
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
3924
|
+
u: function u(date, token) {
|
|
3925
|
+
var year = date.getUTCFullYear();
|
|
3926
|
+
return addLeadingZeros(year, token.length);
|
|
3927
|
+
},
|
|
3928
|
+
// Quarter
|
|
3929
|
+
Q: function Q(date, token, localize2) {
|
|
3930
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
3931
|
+
switch (token) {
|
|
3932
|
+
case "Q":
|
|
3933
|
+
return String(quarter);
|
|
3934
|
+
case "QQ":
|
|
3935
|
+
return addLeadingZeros(quarter, 2);
|
|
3936
|
+
case "Qo":
|
|
3937
|
+
return localize2.ordinalNumber(quarter, {
|
|
3938
|
+
unit: "quarter"
|
|
3939
|
+
});
|
|
3940
|
+
case "QQQ":
|
|
3941
|
+
return localize2.quarter(quarter, {
|
|
3942
|
+
width: "abbreviated",
|
|
3943
|
+
context: "formatting"
|
|
3944
|
+
});
|
|
3945
|
+
case "QQQQQ":
|
|
3946
|
+
return localize2.quarter(quarter, {
|
|
3947
|
+
width: "narrow",
|
|
3948
|
+
context: "formatting"
|
|
3949
|
+
});
|
|
3950
|
+
case "QQQQ":
|
|
3951
|
+
default:
|
|
3952
|
+
return localize2.quarter(quarter, {
|
|
3953
|
+
width: "wide",
|
|
3954
|
+
context: "formatting"
|
|
3955
|
+
});
|
|
3956
|
+
}
|
|
3957
|
+
},
|
|
3958
|
+
// Stand-alone quarter
|
|
3959
|
+
q: function q(date, token, localize2) {
|
|
3960
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
3961
|
+
switch (token) {
|
|
3962
|
+
case "q":
|
|
3963
|
+
return String(quarter);
|
|
3964
|
+
case "qq":
|
|
3965
|
+
return addLeadingZeros(quarter, 2);
|
|
3966
|
+
case "qo":
|
|
3967
|
+
return localize2.ordinalNumber(quarter, {
|
|
3968
|
+
unit: "quarter"
|
|
3969
|
+
});
|
|
3970
|
+
case "qqq":
|
|
3971
|
+
return localize2.quarter(quarter, {
|
|
3972
|
+
width: "abbreviated",
|
|
3973
|
+
context: "standalone"
|
|
3974
|
+
});
|
|
3975
|
+
case "qqqqq":
|
|
3976
|
+
return localize2.quarter(quarter, {
|
|
3977
|
+
width: "narrow",
|
|
3978
|
+
context: "standalone"
|
|
3979
|
+
});
|
|
3980
|
+
case "qqqq":
|
|
3981
|
+
default:
|
|
3982
|
+
return localize2.quarter(quarter, {
|
|
3983
|
+
width: "wide",
|
|
3984
|
+
context: "standalone"
|
|
3985
|
+
});
|
|
3986
|
+
}
|
|
3987
|
+
},
|
|
3988
|
+
// Month
|
|
3989
|
+
M: function M2(date, token, localize2) {
|
|
3990
|
+
var month = date.getUTCMonth();
|
|
3991
|
+
switch (token) {
|
|
3992
|
+
case "M":
|
|
3993
|
+
case "MM":
|
|
3994
|
+
return formatters$3.M(date, token);
|
|
3995
|
+
case "Mo":
|
|
3996
|
+
return localize2.ordinalNumber(month + 1, {
|
|
3997
|
+
unit: "month"
|
|
3998
|
+
});
|
|
3999
|
+
case "MMM":
|
|
4000
|
+
return localize2.month(month, {
|
|
4001
|
+
width: "abbreviated",
|
|
4002
|
+
context: "formatting"
|
|
4003
|
+
});
|
|
4004
|
+
case "MMMMM":
|
|
4005
|
+
return localize2.month(month, {
|
|
4006
|
+
width: "narrow",
|
|
4007
|
+
context: "formatting"
|
|
4008
|
+
});
|
|
4009
|
+
case "MMMM":
|
|
4010
|
+
default:
|
|
4011
|
+
return localize2.month(month, {
|
|
4012
|
+
width: "wide",
|
|
4013
|
+
context: "formatting"
|
|
4014
|
+
});
|
|
4015
|
+
}
|
|
4016
|
+
},
|
|
4017
|
+
// Stand-alone month
|
|
4018
|
+
L: function L(date, token, localize2) {
|
|
4019
|
+
var month = date.getUTCMonth();
|
|
4020
|
+
switch (token) {
|
|
4021
|
+
case "L":
|
|
4022
|
+
return String(month + 1);
|
|
4023
|
+
case "LL":
|
|
4024
|
+
return addLeadingZeros(month + 1, 2);
|
|
4025
|
+
case "Lo":
|
|
4026
|
+
return localize2.ordinalNumber(month + 1, {
|
|
4027
|
+
unit: "month"
|
|
4028
|
+
});
|
|
4029
|
+
case "LLL":
|
|
4030
|
+
return localize2.month(month, {
|
|
4031
|
+
width: "abbreviated",
|
|
4032
|
+
context: "standalone"
|
|
4033
|
+
});
|
|
4034
|
+
case "LLLLL":
|
|
4035
|
+
return localize2.month(month, {
|
|
4036
|
+
width: "narrow",
|
|
4037
|
+
context: "standalone"
|
|
4038
|
+
});
|
|
4039
|
+
case "LLLL":
|
|
4040
|
+
default:
|
|
4041
|
+
return localize2.month(month, {
|
|
4042
|
+
width: "wide",
|
|
4043
|
+
context: "standalone"
|
|
4044
|
+
});
|
|
4045
|
+
}
|
|
4046
|
+
},
|
|
4047
|
+
// Local week of year
|
|
4048
|
+
w: function w(date, token, localize2, options) {
|
|
4049
|
+
var week = getUTCWeek(date, options);
|
|
4050
|
+
if (token === "wo") {
|
|
4051
|
+
return localize2.ordinalNumber(week, {
|
|
4052
|
+
unit: "week"
|
|
4053
|
+
});
|
|
4054
|
+
}
|
|
4055
|
+
return addLeadingZeros(week, token.length);
|
|
4056
|
+
},
|
|
4057
|
+
// ISO week of year
|
|
4058
|
+
I: function I(date, token, localize2) {
|
|
4059
|
+
var isoWeek = getUTCISOWeek(date);
|
|
4060
|
+
if (token === "Io") {
|
|
4061
|
+
return localize2.ordinalNumber(isoWeek, {
|
|
4062
|
+
unit: "week"
|
|
4063
|
+
});
|
|
4064
|
+
}
|
|
4065
|
+
return addLeadingZeros(isoWeek, token.length);
|
|
4066
|
+
},
|
|
4067
|
+
// Day of the month
|
|
4068
|
+
d: function d3(date, token, localize2) {
|
|
4069
|
+
if (token === "do") {
|
|
4070
|
+
return localize2.ordinalNumber(date.getUTCDate(), {
|
|
4071
|
+
unit: "date"
|
|
4072
|
+
});
|
|
4073
|
+
}
|
|
4074
|
+
return formatters$3.d(date, token);
|
|
4075
|
+
},
|
|
4076
|
+
// Day of year
|
|
4077
|
+
D: function D(date, token, localize2) {
|
|
4078
|
+
var dayOfYear = getUTCDayOfYear(date);
|
|
4079
|
+
if (token === "Do") {
|
|
4080
|
+
return localize2.ordinalNumber(dayOfYear, {
|
|
4081
|
+
unit: "dayOfYear"
|
|
4082
|
+
});
|
|
4083
|
+
}
|
|
4084
|
+
return addLeadingZeros(dayOfYear, token.length);
|
|
4085
|
+
},
|
|
4086
|
+
// Day of week
|
|
4087
|
+
E: function E(date, token, localize2) {
|
|
4088
|
+
var dayOfWeek = date.getUTCDay();
|
|
4089
|
+
switch (token) {
|
|
4090
|
+
case "E":
|
|
4091
|
+
case "EE":
|
|
4092
|
+
case "EEE":
|
|
4093
|
+
return localize2.day(dayOfWeek, {
|
|
4094
|
+
width: "abbreviated",
|
|
4095
|
+
context: "formatting"
|
|
4096
|
+
});
|
|
4097
|
+
case "EEEEE":
|
|
4098
|
+
return localize2.day(dayOfWeek, {
|
|
4099
|
+
width: "narrow",
|
|
4100
|
+
context: "formatting"
|
|
4101
|
+
});
|
|
4102
|
+
case "EEEEEE":
|
|
4103
|
+
return localize2.day(dayOfWeek, {
|
|
4104
|
+
width: "short",
|
|
4105
|
+
context: "formatting"
|
|
4106
|
+
});
|
|
4107
|
+
case "EEEE":
|
|
4108
|
+
default:
|
|
4109
|
+
return localize2.day(dayOfWeek, {
|
|
4110
|
+
width: "wide",
|
|
4111
|
+
context: "formatting"
|
|
4112
|
+
});
|
|
4113
|
+
}
|
|
4114
|
+
},
|
|
4115
|
+
// Local day of week
|
|
4116
|
+
e: function e(date, token, localize2, options) {
|
|
4117
|
+
var dayOfWeek = date.getUTCDay();
|
|
4118
|
+
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
4119
|
+
switch (token) {
|
|
4120
|
+
case "e":
|
|
4121
|
+
return String(localDayOfWeek);
|
|
4122
|
+
case "ee":
|
|
4123
|
+
return addLeadingZeros(localDayOfWeek, 2);
|
|
4124
|
+
case "eo":
|
|
4125
|
+
return localize2.ordinalNumber(localDayOfWeek, {
|
|
4126
|
+
unit: "day"
|
|
4127
|
+
});
|
|
4128
|
+
case "eee":
|
|
4129
|
+
return localize2.day(dayOfWeek, {
|
|
4130
|
+
width: "abbreviated",
|
|
4131
|
+
context: "formatting"
|
|
4132
|
+
});
|
|
4133
|
+
case "eeeee":
|
|
4134
|
+
return localize2.day(dayOfWeek, {
|
|
4135
|
+
width: "narrow",
|
|
4136
|
+
context: "formatting"
|
|
4137
|
+
});
|
|
4138
|
+
case "eeeeee":
|
|
4139
|
+
return localize2.day(dayOfWeek, {
|
|
4140
|
+
width: "short",
|
|
4141
|
+
context: "formatting"
|
|
4142
|
+
});
|
|
4143
|
+
case "eeee":
|
|
4144
|
+
default:
|
|
4145
|
+
return localize2.day(dayOfWeek, {
|
|
4146
|
+
width: "wide",
|
|
4147
|
+
context: "formatting"
|
|
4148
|
+
});
|
|
4149
|
+
}
|
|
4150
|
+
},
|
|
4151
|
+
// Stand-alone local day of week
|
|
4152
|
+
c: function c(date, token, localize2, options) {
|
|
4153
|
+
var dayOfWeek = date.getUTCDay();
|
|
4154
|
+
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
4155
|
+
switch (token) {
|
|
4156
|
+
case "c":
|
|
4157
|
+
return String(localDayOfWeek);
|
|
4158
|
+
case "cc":
|
|
4159
|
+
return addLeadingZeros(localDayOfWeek, token.length);
|
|
4160
|
+
case "co":
|
|
4161
|
+
return localize2.ordinalNumber(localDayOfWeek, {
|
|
4162
|
+
unit: "day"
|
|
4163
|
+
});
|
|
4164
|
+
case "ccc":
|
|
4165
|
+
return localize2.day(dayOfWeek, {
|
|
4166
|
+
width: "abbreviated",
|
|
4167
|
+
context: "standalone"
|
|
4168
|
+
});
|
|
4169
|
+
case "ccccc":
|
|
4170
|
+
return localize2.day(dayOfWeek, {
|
|
4171
|
+
width: "narrow",
|
|
4172
|
+
context: "standalone"
|
|
4173
|
+
});
|
|
4174
|
+
case "cccccc":
|
|
4175
|
+
return localize2.day(dayOfWeek, {
|
|
4176
|
+
width: "short",
|
|
4177
|
+
context: "standalone"
|
|
4178
|
+
});
|
|
4179
|
+
case "cccc":
|
|
4180
|
+
default:
|
|
4181
|
+
return localize2.day(dayOfWeek, {
|
|
4182
|
+
width: "wide",
|
|
4183
|
+
context: "standalone"
|
|
4184
|
+
});
|
|
4185
|
+
}
|
|
4186
|
+
},
|
|
4187
|
+
// ISO day of week
|
|
4188
|
+
i: function i2(date, token, localize2) {
|
|
4189
|
+
var dayOfWeek = date.getUTCDay();
|
|
4190
|
+
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
4191
|
+
switch (token) {
|
|
4192
|
+
case "i":
|
|
4193
|
+
return String(isoDayOfWeek);
|
|
4194
|
+
case "ii":
|
|
4195
|
+
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
4196
|
+
case "io":
|
|
4197
|
+
return localize2.ordinalNumber(isoDayOfWeek, {
|
|
4198
|
+
unit: "day"
|
|
4199
|
+
});
|
|
4200
|
+
case "iii":
|
|
4201
|
+
return localize2.day(dayOfWeek, {
|
|
4202
|
+
width: "abbreviated",
|
|
4203
|
+
context: "formatting"
|
|
4204
|
+
});
|
|
4205
|
+
case "iiiii":
|
|
4206
|
+
return localize2.day(dayOfWeek, {
|
|
4207
|
+
width: "narrow",
|
|
4208
|
+
context: "formatting"
|
|
4209
|
+
});
|
|
4210
|
+
case "iiiiii":
|
|
4211
|
+
return localize2.day(dayOfWeek, {
|
|
4212
|
+
width: "short",
|
|
4213
|
+
context: "formatting"
|
|
4214
|
+
});
|
|
4215
|
+
case "iiii":
|
|
4216
|
+
default:
|
|
4217
|
+
return localize2.day(dayOfWeek, {
|
|
4218
|
+
width: "wide",
|
|
4219
|
+
context: "formatting"
|
|
4220
|
+
});
|
|
4221
|
+
}
|
|
4222
|
+
},
|
|
4223
|
+
// AM or PM
|
|
4224
|
+
a: function a2(date, token, localize2) {
|
|
4225
|
+
var hours = date.getUTCHours();
|
|
4226
|
+
var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
4227
|
+
switch (token) {
|
|
4228
|
+
case "a":
|
|
4229
|
+
case "aa":
|
|
4230
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4231
|
+
width: "abbreviated",
|
|
4232
|
+
context: "formatting"
|
|
4233
|
+
});
|
|
4234
|
+
case "aaa":
|
|
4235
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4236
|
+
width: "abbreviated",
|
|
4237
|
+
context: "formatting"
|
|
4238
|
+
}).toLowerCase();
|
|
4239
|
+
case "aaaaa":
|
|
4240
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4241
|
+
width: "narrow",
|
|
4242
|
+
context: "formatting"
|
|
4243
|
+
});
|
|
4244
|
+
case "aaaa":
|
|
4245
|
+
default:
|
|
4246
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4247
|
+
width: "wide",
|
|
4248
|
+
context: "formatting"
|
|
4249
|
+
});
|
|
4250
|
+
}
|
|
4251
|
+
},
|
|
4252
|
+
// AM, PM, midnight, noon
|
|
4253
|
+
b: function b2(date, token, localize2) {
|
|
4254
|
+
var hours = date.getUTCHours();
|
|
4255
|
+
var dayPeriodEnumValue;
|
|
4256
|
+
if (hours === 12) {
|
|
4257
|
+
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
4258
|
+
} else if (hours === 0) {
|
|
4259
|
+
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
4260
|
+
} else {
|
|
4261
|
+
dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
4262
|
+
}
|
|
4263
|
+
switch (token) {
|
|
4264
|
+
case "b":
|
|
4265
|
+
case "bb":
|
|
4266
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4267
|
+
width: "abbreviated",
|
|
4268
|
+
context: "formatting"
|
|
4269
|
+
});
|
|
4270
|
+
case "bbb":
|
|
4271
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4272
|
+
width: "abbreviated",
|
|
4273
|
+
context: "formatting"
|
|
4274
|
+
}).toLowerCase();
|
|
4275
|
+
case "bbbbb":
|
|
4276
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4277
|
+
width: "narrow",
|
|
4278
|
+
context: "formatting"
|
|
4279
|
+
});
|
|
4280
|
+
case "bbbb":
|
|
4281
|
+
default:
|
|
4282
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4283
|
+
width: "wide",
|
|
4284
|
+
context: "formatting"
|
|
4285
|
+
});
|
|
4286
|
+
}
|
|
4287
|
+
},
|
|
4288
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
4289
|
+
B: function B(date, token, localize2) {
|
|
4290
|
+
var hours = date.getUTCHours();
|
|
4291
|
+
var dayPeriodEnumValue;
|
|
4292
|
+
if (hours >= 17) {
|
|
4293
|
+
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
4294
|
+
} else if (hours >= 12) {
|
|
4295
|
+
dayPeriodEnumValue = dayPeriodEnum.afternoon;
|
|
4296
|
+
} else if (hours >= 4) {
|
|
4297
|
+
dayPeriodEnumValue = dayPeriodEnum.morning;
|
|
4298
|
+
} else {
|
|
4299
|
+
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
4300
|
+
}
|
|
4301
|
+
switch (token) {
|
|
4302
|
+
case "B":
|
|
4303
|
+
case "BB":
|
|
4304
|
+
case "BBB":
|
|
4305
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4306
|
+
width: "abbreviated",
|
|
4307
|
+
context: "formatting"
|
|
4308
|
+
});
|
|
4309
|
+
case "BBBBB":
|
|
4310
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4311
|
+
width: "narrow",
|
|
4312
|
+
context: "formatting"
|
|
4313
|
+
});
|
|
4314
|
+
case "BBBB":
|
|
4315
|
+
default:
|
|
4316
|
+
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
4317
|
+
width: "wide",
|
|
4318
|
+
context: "formatting"
|
|
4319
|
+
});
|
|
4320
|
+
}
|
|
4321
|
+
},
|
|
4322
|
+
// Hour [1-12]
|
|
4323
|
+
h: function h2(date, token, localize2) {
|
|
4324
|
+
if (token === "ho") {
|
|
4325
|
+
var hours = date.getUTCHours() % 12;
|
|
4326
|
+
if (hours === 0)
|
|
4327
|
+
hours = 12;
|
|
4328
|
+
return localize2.ordinalNumber(hours, {
|
|
4329
|
+
unit: "hour"
|
|
4330
|
+
});
|
|
4331
|
+
}
|
|
4332
|
+
return formatters$3.h(date, token);
|
|
4333
|
+
},
|
|
4334
|
+
// Hour [0-23]
|
|
4335
|
+
H: function H2(date, token, localize2) {
|
|
4336
|
+
if (token === "Ho") {
|
|
4337
|
+
return localize2.ordinalNumber(date.getUTCHours(), {
|
|
4338
|
+
unit: "hour"
|
|
4339
|
+
});
|
|
4340
|
+
}
|
|
4341
|
+
return formatters$3.H(date, token);
|
|
4342
|
+
},
|
|
4343
|
+
// Hour [0-11]
|
|
4344
|
+
K: function K(date, token, localize2) {
|
|
4345
|
+
var hours = date.getUTCHours() % 12;
|
|
4346
|
+
if (token === "Ko") {
|
|
4347
|
+
return localize2.ordinalNumber(hours, {
|
|
4348
|
+
unit: "hour"
|
|
4349
|
+
});
|
|
4350
|
+
}
|
|
4351
|
+
return addLeadingZeros(hours, token.length);
|
|
4352
|
+
},
|
|
4353
|
+
// Hour [1-24]
|
|
4354
|
+
k: function k(date, token, localize2) {
|
|
4355
|
+
var hours = date.getUTCHours();
|
|
4356
|
+
if (hours === 0)
|
|
4357
|
+
hours = 24;
|
|
4358
|
+
if (token === "ko") {
|
|
4359
|
+
return localize2.ordinalNumber(hours, {
|
|
4360
|
+
unit: "hour"
|
|
4361
|
+
});
|
|
4362
|
+
}
|
|
4363
|
+
return addLeadingZeros(hours, token.length);
|
|
4364
|
+
},
|
|
4365
|
+
// Minute
|
|
4366
|
+
m: function m2(date, token, localize2) {
|
|
4367
|
+
if (token === "mo") {
|
|
4368
|
+
return localize2.ordinalNumber(date.getUTCMinutes(), {
|
|
4369
|
+
unit: "minute"
|
|
4370
|
+
});
|
|
4371
|
+
}
|
|
4372
|
+
return formatters$3.m(date, token);
|
|
4373
|
+
},
|
|
4374
|
+
// Second
|
|
4375
|
+
s: function s3(date, token, localize2) {
|
|
4376
|
+
if (token === "so") {
|
|
4377
|
+
return localize2.ordinalNumber(date.getUTCSeconds(), {
|
|
4378
|
+
unit: "second"
|
|
4379
|
+
});
|
|
4380
|
+
}
|
|
4381
|
+
return formatters$3.s(date, token);
|
|
4382
|
+
},
|
|
4383
|
+
// Fraction of second
|
|
4384
|
+
S: function S2(date, token) {
|
|
4385
|
+
return formatters$3.S(date, token);
|
|
4386
|
+
},
|
|
4387
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
4388
|
+
X: function X(date, token, _localize, options) {
|
|
4389
|
+
var originalDate = options._originalDate || date;
|
|
4390
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
4391
|
+
if (timezoneOffset === 0) {
|
|
4392
|
+
return "Z";
|
|
4393
|
+
}
|
|
4394
|
+
switch (token) {
|
|
4395
|
+
case "X":
|
|
4396
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
4397
|
+
case "XXXX":
|
|
4398
|
+
case "XX":
|
|
4399
|
+
return formatTimezone(timezoneOffset);
|
|
4400
|
+
case "XXXXX":
|
|
4401
|
+
case "XXX":
|
|
4402
|
+
default:
|
|
4403
|
+
return formatTimezone(timezoneOffset, ":");
|
|
4404
|
+
}
|
|
4405
|
+
},
|
|
4406
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
4407
|
+
x: function x(date, token, _localize, options) {
|
|
4408
|
+
var originalDate = options._originalDate || date;
|
|
4409
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
4410
|
+
switch (token) {
|
|
4411
|
+
case "x":
|
|
4412
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
4413
|
+
case "xxxx":
|
|
4414
|
+
case "xx":
|
|
4415
|
+
return formatTimezone(timezoneOffset);
|
|
4416
|
+
case "xxxxx":
|
|
4417
|
+
case "xxx":
|
|
4418
|
+
default:
|
|
4419
|
+
return formatTimezone(timezoneOffset, ":");
|
|
4420
|
+
}
|
|
4421
|
+
},
|
|
4422
|
+
// Timezone (GMT)
|
|
4423
|
+
O: function O(date, token, _localize, options) {
|
|
4424
|
+
var originalDate = options._originalDate || date;
|
|
4425
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
4426
|
+
switch (token) {
|
|
4427
|
+
case "O":
|
|
4428
|
+
case "OO":
|
|
4429
|
+
case "OOO":
|
|
4430
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
4431
|
+
case "OOOO":
|
|
4432
|
+
default:
|
|
4433
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
4434
|
+
}
|
|
4435
|
+
},
|
|
4436
|
+
// Timezone (specific non-location)
|
|
4437
|
+
z: function z(date, token, _localize, options) {
|
|
4438
|
+
var originalDate = options._originalDate || date;
|
|
4439
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
4440
|
+
switch (token) {
|
|
4441
|
+
case "z":
|
|
4442
|
+
case "zz":
|
|
4443
|
+
case "zzz":
|
|
4444
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
4445
|
+
case "zzzz":
|
|
4446
|
+
default:
|
|
4447
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
4448
|
+
}
|
|
4449
|
+
},
|
|
4450
|
+
// Seconds timestamp
|
|
4451
|
+
t: function t2(date, token, _localize, options) {
|
|
4452
|
+
var originalDate = options._originalDate || date;
|
|
4453
|
+
var timestamp = Math.floor(originalDate.getTime() / 1e3);
|
|
4454
|
+
return addLeadingZeros(timestamp, token.length);
|
|
4455
|
+
},
|
|
4456
|
+
// Milliseconds timestamp
|
|
4457
|
+
T: function T(date, token, _localize, options) {
|
|
4458
|
+
var originalDate = options._originalDate || date;
|
|
4459
|
+
var timestamp = originalDate.getTime();
|
|
4460
|
+
return addLeadingZeros(timestamp, token.length);
|
|
4461
|
+
}
|
|
4462
|
+
};
|
|
4463
|
+
function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
4464
|
+
var sign = offset > 0 ? "-" : "+";
|
|
4465
|
+
var absOffset = Math.abs(offset);
|
|
4466
|
+
var hours = Math.floor(absOffset / 60);
|
|
4467
|
+
var minutes = absOffset % 60;
|
|
4468
|
+
if (minutes === 0) {
|
|
4469
|
+
return sign + String(hours);
|
|
4470
|
+
}
|
|
4471
|
+
var delimiter = dirtyDelimiter || "";
|
|
4472
|
+
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
4473
|
+
}
|
|
4474
|
+
function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
|
|
4475
|
+
if (offset % 60 === 0) {
|
|
4476
|
+
var sign = offset > 0 ? "-" : "+";
|
|
4477
|
+
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
4478
|
+
}
|
|
4479
|
+
return formatTimezone(offset, dirtyDelimiter);
|
|
4480
|
+
}
|
|
4481
|
+
function formatTimezone(offset, dirtyDelimiter) {
|
|
4482
|
+
var delimiter = dirtyDelimiter || "";
|
|
4483
|
+
var sign = offset > 0 ? "-" : "+";
|
|
4484
|
+
var absOffset = Math.abs(offset);
|
|
4485
|
+
var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
|
|
4486
|
+
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
4487
|
+
return sign + hours + delimiter + minutes;
|
|
4488
|
+
}
|
|
4489
|
+
const formatters$1 = formatters;
|
|
4490
|
+
var dateLongFormatter = function dateLongFormatter2(pattern, formatLong2) {
|
|
4491
|
+
switch (pattern) {
|
|
4492
|
+
case "P":
|
|
4493
|
+
return formatLong2.date({
|
|
4494
|
+
width: "short"
|
|
4495
|
+
});
|
|
4496
|
+
case "PP":
|
|
4497
|
+
return formatLong2.date({
|
|
4498
|
+
width: "medium"
|
|
4499
|
+
});
|
|
4500
|
+
case "PPP":
|
|
4501
|
+
return formatLong2.date({
|
|
4502
|
+
width: "long"
|
|
4503
|
+
});
|
|
4504
|
+
case "PPPP":
|
|
4505
|
+
default:
|
|
4506
|
+
return formatLong2.date({
|
|
4507
|
+
width: "full"
|
|
4508
|
+
});
|
|
4509
|
+
}
|
|
4510
|
+
};
|
|
4511
|
+
var timeLongFormatter = function timeLongFormatter2(pattern, formatLong2) {
|
|
4512
|
+
switch (pattern) {
|
|
4513
|
+
case "p":
|
|
4514
|
+
return formatLong2.time({
|
|
4515
|
+
width: "short"
|
|
4516
|
+
});
|
|
4517
|
+
case "pp":
|
|
4518
|
+
return formatLong2.time({
|
|
4519
|
+
width: "medium"
|
|
4520
|
+
});
|
|
4521
|
+
case "ppp":
|
|
4522
|
+
return formatLong2.time({
|
|
4523
|
+
width: "long"
|
|
4524
|
+
});
|
|
4525
|
+
case "pppp":
|
|
4526
|
+
default:
|
|
4527
|
+
return formatLong2.time({
|
|
4528
|
+
width: "full"
|
|
4529
|
+
});
|
|
4530
|
+
}
|
|
4531
|
+
};
|
|
4532
|
+
var dateTimeLongFormatter = function dateTimeLongFormatter2(pattern, formatLong2) {
|
|
4533
|
+
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
4534
|
+
var datePattern = matchResult[1];
|
|
4535
|
+
var timePattern = matchResult[2];
|
|
4536
|
+
if (!timePattern) {
|
|
4537
|
+
return dateLongFormatter(pattern, formatLong2);
|
|
4538
|
+
}
|
|
4539
|
+
var dateTimeFormat;
|
|
4540
|
+
switch (datePattern) {
|
|
4541
|
+
case "P":
|
|
4542
|
+
dateTimeFormat = formatLong2.dateTime({
|
|
4543
|
+
width: "short"
|
|
4544
|
+
});
|
|
4545
|
+
break;
|
|
4546
|
+
case "PP":
|
|
4547
|
+
dateTimeFormat = formatLong2.dateTime({
|
|
4548
|
+
width: "medium"
|
|
4549
|
+
});
|
|
4550
|
+
break;
|
|
4551
|
+
case "PPP":
|
|
4552
|
+
dateTimeFormat = formatLong2.dateTime({
|
|
4553
|
+
width: "long"
|
|
4554
|
+
});
|
|
4555
|
+
break;
|
|
4556
|
+
case "PPPP":
|
|
4557
|
+
default:
|
|
4558
|
+
dateTimeFormat = formatLong2.dateTime({
|
|
4559
|
+
width: "full"
|
|
4560
|
+
});
|
|
4561
|
+
break;
|
|
4562
|
+
}
|
|
4563
|
+
return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
|
|
4564
|
+
};
|
|
4565
|
+
var longFormatters = {
|
|
4566
|
+
p: timeLongFormatter,
|
|
4567
|
+
P: dateTimeLongFormatter
|
|
4568
|
+
};
|
|
4569
|
+
const longFormatters$1 = longFormatters;
|
|
4570
|
+
var protectedDayOfYearTokens = ["D", "DD"];
|
|
4571
|
+
var protectedWeekYearTokens = ["YY", "YYYY"];
|
|
4572
|
+
function isProtectedDayOfYearToken(token) {
|
|
4573
|
+
return protectedDayOfYearTokens.indexOf(token) !== -1;
|
|
4574
|
+
}
|
|
4575
|
+
function isProtectedWeekYearToken(token) {
|
|
4576
|
+
return protectedWeekYearTokens.indexOf(token) !== -1;
|
|
4577
|
+
}
|
|
4578
|
+
function throwProtectedError(token, format2, input) {
|
|
4579
|
+
if (token === "YYYY") {
|
|
4580
|
+
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
4581
|
+
} else if (token === "YY") {
|
|
4582
|
+
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
4583
|
+
} else if (token === "D") {
|
|
4584
|
+
throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
4585
|
+
} else if (token === "DD") {
|
|
4586
|
+
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
4587
|
+
}
|
|
4588
|
+
}
|
|
4589
|
+
var formatDistanceLocale = {
|
|
4590
|
+
lessThanXSeconds: {
|
|
4591
|
+
one: "less than a second",
|
|
4592
|
+
other: "less than {{count}} seconds"
|
|
4593
|
+
},
|
|
4594
|
+
xSeconds: {
|
|
4595
|
+
one: "1 second",
|
|
4596
|
+
other: "{{count}} seconds"
|
|
4597
|
+
},
|
|
4598
|
+
halfAMinute: "half a minute",
|
|
4599
|
+
lessThanXMinutes: {
|
|
4600
|
+
one: "less than a minute",
|
|
4601
|
+
other: "less than {{count}} minutes"
|
|
4602
|
+
},
|
|
4603
|
+
xMinutes: {
|
|
4604
|
+
one: "1 minute",
|
|
4605
|
+
other: "{{count}} minutes"
|
|
4606
|
+
},
|
|
4607
|
+
aboutXHours: {
|
|
4608
|
+
one: "about 1 hour",
|
|
4609
|
+
other: "about {{count}} hours"
|
|
4610
|
+
},
|
|
4611
|
+
xHours: {
|
|
4612
|
+
one: "1 hour",
|
|
4613
|
+
other: "{{count}} hours"
|
|
4614
|
+
},
|
|
4615
|
+
xDays: {
|
|
4616
|
+
one: "1 day",
|
|
4617
|
+
other: "{{count}} days"
|
|
4618
|
+
},
|
|
4619
|
+
aboutXWeeks: {
|
|
4620
|
+
one: "about 1 week",
|
|
4621
|
+
other: "about {{count}} weeks"
|
|
4622
|
+
},
|
|
4623
|
+
xWeeks: {
|
|
4624
|
+
one: "1 week",
|
|
4625
|
+
other: "{{count}} weeks"
|
|
4626
|
+
},
|
|
4627
|
+
aboutXMonths: {
|
|
4628
|
+
one: "about 1 month",
|
|
4629
|
+
other: "about {{count}} months"
|
|
4630
|
+
},
|
|
4631
|
+
xMonths: {
|
|
4632
|
+
one: "1 month",
|
|
4633
|
+
other: "{{count}} months"
|
|
4634
|
+
},
|
|
4635
|
+
aboutXYears: {
|
|
4636
|
+
one: "about 1 year",
|
|
4637
|
+
other: "about {{count}} years"
|
|
4638
|
+
},
|
|
4639
|
+
xYears: {
|
|
4640
|
+
one: "1 year",
|
|
4641
|
+
other: "{{count}} years"
|
|
4642
|
+
},
|
|
4643
|
+
overXYears: {
|
|
4644
|
+
one: "over 1 year",
|
|
4645
|
+
other: "over {{count}} years"
|
|
4646
|
+
},
|
|
4647
|
+
almostXYears: {
|
|
4648
|
+
one: "almost 1 year",
|
|
4649
|
+
other: "almost {{count}} years"
|
|
4650
|
+
}
|
|
4651
|
+
};
|
|
4652
|
+
var formatDistance = function formatDistance2(token, count, options) {
|
|
4653
|
+
var result;
|
|
4654
|
+
var tokenValue = formatDistanceLocale[token];
|
|
4655
|
+
if (typeof tokenValue === "string") {
|
|
4656
|
+
result = tokenValue;
|
|
4657
|
+
} else if (count === 1) {
|
|
4658
|
+
result = tokenValue.one;
|
|
4659
|
+
} else {
|
|
4660
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
4661
|
+
}
|
|
4662
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
4663
|
+
if (options.comparison && options.comparison > 0) {
|
|
4664
|
+
return "in " + result;
|
|
4665
|
+
} else {
|
|
4666
|
+
return result + " ago";
|
|
4667
|
+
}
|
|
4668
|
+
}
|
|
4669
|
+
return result;
|
|
4670
|
+
};
|
|
4671
|
+
const formatDistance$1 = formatDistance;
|
|
4672
|
+
function buildFormatLongFn(args) {
|
|
4673
|
+
return function() {
|
|
4674
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4675
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
4676
|
+
var format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
4677
|
+
return format2;
|
|
4678
|
+
};
|
|
4679
|
+
}
|
|
4680
|
+
var dateFormats = {
|
|
4681
|
+
full: "EEEE, MMMM do, y",
|
|
4682
|
+
long: "MMMM do, y",
|
|
4683
|
+
medium: "MMM d, y",
|
|
4684
|
+
short: "MM/dd/yyyy"
|
|
4685
|
+
};
|
|
4686
|
+
var timeFormats = {
|
|
4687
|
+
full: "h:mm:ss a zzzz",
|
|
4688
|
+
long: "h:mm:ss a z",
|
|
4689
|
+
medium: "h:mm:ss a",
|
|
4690
|
+
short: "h:mm a"
|
|
4691
|
+
};
|
|
4692
|
+
var dateTimeFormats = {
|
|
4693
|
+
full: "{{date}} 'at' {{time}}",
|
|
4694
|
+
long: "{{date}} 'at' {{time}}",
|
|
4695
|
+
medium: "{{date}}, {{time}}",
|
|
4696
|
+
short: "{{date}}, {{time}}"
|
|
4697
|
+
};
|
|
4698
|
+
var formatLong = {
|
|
4699
|
+
date: buildFormatLongFn({
|
|
4700
|
+
formats: dateFormats,
|
|
4701
|
+
defaultWidth: "full"
|
|
4702
|
+
}),
|
|
4703
|
+
time: buildFormatLongFn({
|
|
4704
|
+
formats: timeFormats,
|
|
4705
|
+
defaultWidth: "full"
|
|
4706
|
+
}),
|
|
4707
|
+
dateTime: buildFormatLongFn({
|
|
4708
|
+
formats: dateTimeFormats,
|
|
4709
|
+
defaultWidth: "full"
|
|
4710
|
+
})
|
|
4711
|
+
};
|
|
4712
|
+
const formatLong$1 = formatLong;
|
|
4713
|
+
var formatRelativeLocale = {
|
|
4714
|
+
lastWeek: "'last' eeee 'at' p",
|
|
4715
|
+
yesterday: "'yesterday at' p",
|
|
4716
|
+
today: "'today at' p",
|
|
4717
|
+
tomorrow: "'tomorrow at' p",
|
|
4718
|
+
nextWeek: "eeee 'at' p",
|
|
4719
|
+
other: "P"
|
|
4720
|
+
};
|
|
4721
|
+
var formatRelative = function formatRelative2(token, _date, _baseDate, _options) {
|
|
4722
|
+
return formatRelativeLocale[token];
|
|
4723
|
+
};
|
|
4724
|
+
const formatRelative$1 = formatRelative;
|
|
4725
|
+
function buildLocalizeFn(args) {
|
|
4726
|
+
return function(dirtyIndex, options) {
|
|
4727
|
+
var context2 = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
|
|
4728
|
+
var valuesArray;
|
|
4729
|
+
if (context2 === "formatting" && args.formattingValues) {
|
|
4730
|
+
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
4731
|
+
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
|
|
4732
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
4733
|
+
} else {
|
|
4734
|
+
var _defaultWidth = args.defaultWidth;
|
|
4735
|
+
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
|
|
4736
|
+
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
4737
|
+
}
|
|
4738
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
4739
|
+
return valuesArray[index];
|
|
4740
|
+
};
|
|
4741
|
+
}
|
|
4742
|
+
var eraValues = {
|
|
4743
|
+
narrow: ["B", "A"],
|
|
4744
|
+
abbreviated: ["BC", "AD"],
|
|
4745
|
+
wide: ["Before Christ", "Anno Domini"]
|
|
4746
|
+
};
|
|
4747
|
+
var quarterValues = {
|
|
4748
|
+
narrow: ["1", "2", "3", "4"],
|
|
4749
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
4750
|
+
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
4751
|
+
};
|
|
4752
|
+
var monthValues = {
|
|
4753
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
4754
|
+
abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
|
4755
|
+
wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
|
|
4756
|
+
};
|
|
4757
|
+
var dayValues = {
|
|
4758
|
+
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
4759
|
+
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
4760
|
+
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
4761
|
+
wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
|
|
4762
|
+
};
|
|
4763
|
+
var dayPeriodValues = {
|
|
4764
|
+
narrow: {
|
|
4765
|
+
am: "a",
|
|
4766
|
+
pm: "p",
|
|
4767
|
+
midnight: "mi",
|
|
4768
|
+
noon: "n",
|
|
4769
|
+
morning: "morning",
|
|
4770
|
+
afternoon: "afternoon",
|
|
4771
|
+
evening: "evening",
|
|
4772
|
+
night: "night"
|
|
4773
|
+
},
|
|
4774
|
+
abbreviated: {
|
|
4775
|
+
am: "AM",
|
|
4776
|
+
pm: "PM",
|
|
4777
|
+
midnight: "midnight",
|
|
4778
|
+
noon: "noon",
|
|
4779
|
+
morning: "morning",
|
|
4780
|
+
afternoon: "afternoon",
|
|
4781
|
+
evening: "evening",
|
|
4782
|
+
night: "night"
|
|
4783
|
+
},
|
|
4784
|
+
wide: {
|
|
4785
|
+
am: "a.m.",
|
|
4786
|
+
pm: "p.m.",
|
|
4787
|
+
midnight: "midnight",
|
|
4788
|
+
noon: "noon",
|
|
4789
|
+
morning: "morning",
|
|
4790
|
+
afternoon: "afternoon",
|
|
4791
|
+
evening: "evening",
|
|
4792
|
+
night: "night"
|
|
4793
|
+
}
|
|
4794
|
+
};
|
|
4795
|
+
var formattingDayPeriodValues = {
|
|
4796
|
+
narrow: {
|
|
4797
|
+
am: "a",
|
|
4798
|
+
pm: "p",
|
|
4799
|
+
midnight: "mi",
|
|
4800
|
+
noon: "n",
|
|
4801
|
+
morning: "in the morning",
|
|
4802
|
+
afternoon: "in the afternoon",
|
|
4803
|
+
evening: "in the evening",
|
|
4804
|
+
night: "at night"
|
|
4805
|
+
},
|
|
4806
|
+
abbreviated: {
|
|
4807
|
+
am: "AM",
|
|
4808
|
+
pm: "PM",
|
|
4809
|
+
midnight: "midnight",
|
|
4810
|
+
noon: "noon",
|
|
4811
|
+
morning: "in the morning",
|
|
4812
|
+
afternoon: "in the afternoon",
|
|
4813
|
+
evening: "in the evening",
|
|
4814
|
+
night: "at night"
|
|
4815
|
+
},
|
|
4816
|
+
wide: {
|
|
4817
|
+
am: "a.m.",
|
|
4818
|
+
pm: "p.m.",
|
|
4819
|
+
midnight: "midnight",
|
|
4820
|
+
noon: "noon",
|
|
4821
|
+
morning: "in the morning",
|
|
4822
|
+
afternoon: "in the afternoon",
|
|
4823
|
+
evening: "in the evening",
|
|
4824
|
+
night: "at night"
|
|
4825
|
+
}
|
|
4826
|
+
};
|
|
4827
|
+
var ordinalNumber = function ordinalNumber2(dirtyNumber, _options) {
|
|
4828
|
+
var number = Number(dirtyNumber);
|
|
4829
|
+
var rem100 = number % 100;
|
|
4830
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
4831
|
+
switch (rem100 % 10) {
|
|
4832
|
+
case 1:
|
|
4833
|
+
return number + "st";
|
|
4834
|
+
case 2:
|
|
4835
|
+
return number + "nd";
|
|
4836
|
+
case 3:
|
|
4837
|
+
return number + "rd";
|
|
4838
|
+
}
|
|
4839
|
+
}
|
|
4840
|
+
return number + "th";
|
|
4841
|
+
};
|
|
4842
|
+
var localize = {
|
|
4843
|
+
ordinalNumber,
|
|
4844
|
+
era: buildLocalizeFn({
|
|
4845
|
+
values: eraValues,
|
|
4846
|
+
defaultWidth: "wide"
|
|
4847
|
+
}),
|
|
4848
|
+
quarter: buildLocalizeFn({
|
|
4849
|
+
values: quarterValues,
|
|
4850
|
+
defaultWidth: "wide",
|
|
4851
|
+
argumentCallback: function argumentCallback(quarter) {
|
|
4852
|
+
return quarter - 1;
|
|
4853
|
+
}
|
|
4854
|
+
}),
|
|
4855
|
+
month: buildLocalizeFn({
|
|
4856
|
+
values: monthValues,
|
|
4857
|
+
defaultWidth: "wide"
|
|
4858
|
+
}),
|
|
4859
|
+
day: buildLocalizeFn({
|
|
4860
|
+
values: dayValues,
|
|
4861
|
+
defaultWidth: "wide"
|
|
4862
|
+
}),
|
|
4863
|
+
dayPeriod: buildLocalizeFn({
|
|
4864
|
+
values: dayPeriodValues,
|
|
4865
|
+
defaultWidth: "wide",
|
|
4866
|
+
formattingValues: formattingDayPeriodValues,
|
|
4867
|
+
defaultFormattingWidth: "wide"
|
|
4868
|
+
})
|
|
4869
|
+
};
|
|
4870
|
+
const localize$1 = localize;
|
|
4871
|
+
function buildMatchFn(args) {
|
|
4872
|
+
return function(string) {
|
|
4873
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4874
|
+
var width = options.width;
|
|
4875
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
4876
|
+
var matchResult = string.match(matchPattern);
|
|
4877
|
+
if (!matchResult) {
|
|
4878
|
+
return null;
|
|
4879
|
+
}
|
|
4880
|
+
var matchedString = matchResult[0];
|
|
4881
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
4882
|
+
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
|
|
4883
|
+
return pattern.test(matchedString);
|
|
4884
|
+
}) : findKey(parsePatterns, function(pattern) {
|
|
4885
|
+
return pattern.test(matchedString);
|
|
4886
|
+
});
|
|
4887
|
+
var value;
|
|
4888
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
4889
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
4890
|
+
var rest = string.slice(matchedString.length);
|
|
4891
|
+
return {
|
|
4892
|
+
value,
|
|
4893
|
+
rest
|
|
4894
|
+
};
|
|
4895
|
+
};
|
|
4896
|
+
}
|
|
4897
|
+
function findKey(object, predicate) {
|
|
4898
|
+
for (var key in object) {
|
|
4899
|
+
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
4900
|
+
return key;
|
|
4901
|
+
}
|
|
4902
|
+
}
|
|
4903
|
+
return void 0;
|
|
4904
|
+
}
|
|
4905
|
+
function findIndex(array, predicate) {
|
|
4906
|
+
for (var key = 0; key < array.length; key++) {
|
|
4907
|
+
if (predicate(array[key])) {
|
|
4908
|
+
return key;
|
|
4909
|
+
}
|
|
4910
|
+
}
|
|
4911
|
+
return void 0;
|
|
4912
|
+
}
|
|
4913
|
+
function buildMatchPatternFn(args) {
|
|
4914
|
+
return function(string) {
|
|
4915
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4916
|
+
var matchResult = string.match(args.matchPattern);
|
|
4917
|
+
if (!matchResult)
|
|
4918
|
+
return null;
|
|
4919
|
+
var matchedString = matchResult[0];
|
|
4920
|
+
var parseResult = string.match(args.parsePattern);
|
|
4921
|
+
if (!parseResult)
|
|
4922
|
+
return null;
|
|
4923
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
4924
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
4925
|
+
var rest = string.slice(matchedString.length);
|
|
4926
|
+
return {
|
|
4927
|
+
value,
|
|
4928
|
+
rest
|
|
4929
|
+
};
|
|
4930
|
+
};
|
|
4931
|
+
}
|
|
4932
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
4933
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
4934
|
+
var matchEraPatterns = {
|
|
4935
|
+
narrow: /^(b|a)/i,
|
|
4936
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
4937
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
4938
|
+
};
|
|
4939
|
+
var parseEraPatterns = {
|
|
4940
|
+
any: [/^b/i, /^(a|c)/i]
|
|
4941
|
+
};
|
|
4942
|
+
var matchQuarterPatterns = {
|
|
4943
|
+
narrow: /^[1234]/i,
|
|
4944
|
+
abbreviated: /^q[1234]/i,
|
|
4945
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
4946
|
+
};
|
|
4947
|
+
var parseQuarterPatterns = {
|
|
4948
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
4949
|
+
};
|
|
4950
|
+
var matchMonthPatterns = {
|
|
4951
|
+
narrow: /^[jfmasond]/i,
|
|
4952
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
4953
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
4954
|
+
};
|
|
4955
|
+
var parseMonthPatterns = {
|
|
4956
|
+
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
4957
|
+
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
4958
|
+
};
|
|
4959
|
+
var matchDayPatterns = {
|
|
4960
|
+
narrow: /^[smtwf]/i,
|
|
4961
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
4962
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
4963
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
4964
|
+
};
|
|
4965
|
+
var parseDayPatterns = {
|
|
4966
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
4967
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
4968
|
+
};
|
|
4969
|
+
var matchDayPeriodPatterns = {
|
|
4970
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
4971
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
4972
|
+
};
|
|
4973
|
+
var parseDayPeriodPatterns = {
|
|
4974
|
+
any: {
|
|
4975
|
+
am: /^a/i,
|
|
4976
|
+
pm: /^p/i,
|
|
4977
|
+
midnight: /^mi/i,
|
|
4978
|
+
noon: /^no/i,
|
|
4979
|
+
morning: /morning/i,
|
|
4980
|
+
afternoon: /afternoon/i,
|
|
4981
|
+
evening: /evening/i,
|
|
4982
|
+
night: /night/i
|
|
4983
|
+
}
|
|
4984
|
+
};
|
|
4985
|
+
var match = {
|
|
4986
|
+
ordinalNumber: buildMatchPatternFn({
|
|
4987
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
4988
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
4989
|
+
valueCallback: function valueCallback(value) {
|
|
4990
|
+
return parseInt(value, 10);
|
|
4991
|
+
}
|
|
4992
|
+
}),
|
|
4993
|
+
era: buildMatchFn({
|
|
4994
|
+
matchPatterns: matchEraPatterns,
|
|
4995
|
+
defaultMatchWidth: "wide",
|
|
4996
|
+
parsePatterns: parseEraPatterns,
|
|
4997
|
+
defaultParseWidth: "any"
|
|
4998
|
+
}),
|
|
4999
|
+
quarter: buildMatchFn({
|
|
5000
|
+
matchPatterns: matchQuarterPatterns,
|
|
5001
|
+
defaultMatchWidth: "wide",
|
|
5002
|
+
parsePatterns: parseQuarterPatterns,
|
|
5003
|
+
defaultParseWidth: "any",
|
|
5004
|
+
valueCallback: function valueCallback2(index) {
|
|
5005
|
+
return index + 1;
|
|
5006
|
+
}
|
|
5007
|
+
}),
|
|
5008
|
+
month: buildMatchFn({
|
|
5009
|
+
matchPatterns: matchMonthPatterns,
|
|
5010
|
+
defaultMatchWidth: "wide",
|
|
5011
|
+
parsePatterns: parseMonthPatterns,
|
|
5012
|
+
defaultParseWidth: "any"
|
|
5013
|
+
}),
|
|
5014
|
+
day: buildMatchFn({
|
|
5015
|
+
matchPatterns: matchDayPatterns,
|
|
5016
|
+
defaultMatchWidth: "wide",
|
|
5017
|
+
parsePatterns: parseDayPatterns,
|
|
5018
|
+
defaultParseWidth: "any"
|
|
5019
|
+
}),
|
|
5020
|
+
dayPeriod: buildMatchFn({
|
|
5021
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
5022
|
+
defaultMatchWidth: "any",
|
|
5023
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
5024
|
+
defaultParseWidth: "any"
|
|
5025
|
+
})
|
|
5026
|
+
};
|
|
5027
|
+
const match$1 = match;
|
|
5028
|
+
var locale = {
|
|
5029
|
+
code: "en-US",
|
|
5030
|
+
formatDistance: formatDistance$1,
|
|
5031
|
+
formatLong: formatLong$1,
|
|
5032
|
+
formatRelative: formatRelative$1,
|
|
5033
|
+
localize: localize$1,
|
|
5034
|
+
match: match$1,
|
|
5035
|
+
options: {
|
|
5036
|
+
weekStartsOn: 0,
|
|
5037
|
+
firstWeekContainsDate: 1
|
|
5038
|
+
}
|
|
5039
|
+
};
|
|
5040
|
+
const defaultLocale = locale;
|
|
5041
|
+
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
5042
|
+
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
5043
|
+
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
5044
|
+
var doubleQuoteRegExp = /''/g;
|
|
5045
|
+
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
5046
|
+
function format(dirtyDate, dirtyFormatStr, options) {
|
|
5047
|
+
var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
|
|
5048
|
+
requiredArgs(2, arguments);
|
|
5049
|
+
var formatStr = String(dirtyFormatStr);
|
|
5050
|
+
var defaultOptions2 = getDefaultOptions();
|
|
5051
|
+
var locale2 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions2.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;
|
|
5052
|
+
var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions2.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
|
|
5053
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
5054
|
+
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
5055
|
+
}
|
|
5056
|
+
var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions2.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions2.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
|
|
5057
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
5058
|
+
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
5059
|
+
}
|
|
5060
|
+
if (!locale2.localize) {
|
|
5061
|
+
throw new RangeError("locale must contain localize property");
|
|
5062
|
+
}
|
|
5063
|
+
if (!locale2.formatLong) {
|
|
5064
|
+
throw new RangeError("locale must contain formatLong property");
|
|
5065
|
+
}
|
|
5066
|
+
var originalDate = toDate(dirtyDate);
|
|
5067
|
+
if (!isValid(originalDate)) {
|
|
5068
|
+
throw new RangeError("Invalid time value");
|
|
5069
|
+
}
|
|
5070
|
+
var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
|
|
5071
|
+
var utcDate = subMilliseconds(originalDate, timezoneOffset);
|
|
5072
|
+
var formatterOptions = {
|
|
5073
|
+
firstWeekContainsDate,
|
|
5074
|
+
weekStartsOn,
|
|
5075
|
+
locale: locale2,
|
|
5076
|
+
_originalDate: originalDate
|
|
5077
|
+
};
|
|
5078
|
+
var result = formatStr.match(longFormattingTokensRegExp).map(function(substring) {
|
|
5079
|
+
var firstCharacter = substring[0];
|
|
5080
|
+
if (firstCharacter === "p" || firstCharacter === "P") {
|
|
5081
|
+
var longFormatter = longFormatters$1[firstCharacter];
|
|
5082
|
+
return longFormatter(substring, locale2.formatLong);
|
|
5083
|
+
}
|
|
5084
|
+
return substring;
|
|
5085
|
+
}).join("").match(formattingTokensRegExp).map(function(substring) {
|
|
5086
|
+
if (substring === "''") {
|
|
5087
|
+
return "'";
|
|
5088
|
+
}
|
|
5089
|
+
var firstCharacter = substring[0];
|
|
5090
|
+
if (firstCharacter === "'") {
|
|
5091
|
+
return cleanEscapedString(substring);
|
|
5092
|
+
}
|
|
5093
|
+
var formatter = formatters$1[firstCharacter];
|
|
5094
|
+
if (formatter) {
|
|
5095
|
+
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
|
|
5096
|
+
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
5097
|
+
}
|
|
5098
|
+
if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
|
|
5099
|
+
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
5100
|
+
}
|
|
5101
|
+
return formatter(utcDate, substring, locale2.localize, formatterOptions);
|
|
5102
|
+
}
|
|
5103
|
+
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
5104
|
+
throw new RangeError("Format string contains an unescaped latin alphabet character `" + firstCharacter + "`");
|
|
5105
|
+
}
|
|
5106
|
+
return substring;
|
|
5107
|
+
}).join("");
|
|
5108
|
+
return result;
|
|
5109
|
+
}
|
|
5110
|
+
function cleanEscapedString(input) {
|
|
5111
|
+
var matched = input.match(escapedStringRegExp);
|
|
5112
|
+
if (!matched) {
|
|
5113
|
+
return input;
|
|
5114
|
+
}
|
|
5115
|
+
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
5116
|
+
}
|
|
5117
|
+
function startOfToday() {
|
|
5118
|
+
return startOfDay(Date.now());
|
|
5119
|
+
}
|
|
5120
|
+
const _hoisted_1$8 = { class: "operasional-identitas" };
|
|
5121
|
+
const _hoisted_2$5 = {
|
|
5122
|
+
key: 2,
|
|
5123
|
+
class: "section"
|
|
5124
|
+
};
|
|
5125
|
+
const __default__$8 = vue.defineComponent({ name: "OperasionalIdentitas" });
|
|
5126
|
+
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
5127
|
+
...__default__$8,
|
|
5128
|
+
props: {
|
|
5129
|
+
profile: {
|
|
5130
|
+
type: Object,
|
|
5131
|
+
default: null
|
|
5132
|
+
},
|
|
5133
|
+
user: {
|
|
5134
|
+
type: Object,
|
|
5135
|
+
default: null
|
|
5136
|
+
},
|
|
5137
|
+
conflict: {
|
|
5138
|
+
type: Object,
|
|
5139
|
+
default: null
|
|
5140
|
+
},
|
|
5141
|
+
roles: {
|
|
5142
|
+
type: Array,
|
|
5143
|
+
default: () => []
|
|
5144
|
+
},
|
|
5145
|
+
errors: {
|
|
5146
|
+
type: Object,
|
|
5147
|
+
default: () => ({})
|
|
5148
|
+
},
|
|
5149
|
+
onChoose: {
|
|
5150
|
+
type: Function,
|
|
5151
|
+
default: null
|
|
5152
|
+
},
|
|
5153
|
+
onRegister: {
|
|
5154
|
+
type: Function,
|
|
5155
|
+
default: null
|
|
5156
|
+
},
|
|
5157
|
+
onConnect: {
|
|
5158
|
+
type: Function,
|
|
5159
|
+
default: null
|
|
5160
|
+
},
|
|
5161
|
+
onDisconnect: {
|
|
5162
|
+
type: Function,
|
|
5163
|
+
default: null
|
|
5164
|
+
},
|
|
5165
|
+
onDelegate: {
|
|
5166
|
+
type: Function,
|
|
5167
|
+
default: null
|
|
5168
|
+
}
|
|
5169
|
+
},
|
|
5170
|
+
emits: ["no-conflict"],
|
|
5171
|
+
setup(__props, { emit }) {
|
|
5172
|
+
const props = __props;
|
|
5173
|
+
const fullNameField = {
|
|
5174
|
+
handle: "name",
|
|
5175
|
+
name: "Nama Lengkap",
|
|
5176
|
+
type: "string",
|
|
5177
|
+
input: "short-text",
|
|
5178
|
+
options: {
|
|
5179
|
+
note: "Nama lengkap pengguna, sesuai dengan nama pada data profil."
|
|
5180
|
+
}
|
|
5181
|
+
};
|
|
5182
|
+
const passwordField = {
|
|
5183
|
+
handle: "defaultPassword",
|
|
5184
|
+
name: "Password Awal",
|
|
5185
|
+
type: "string",
|
|
5186
|
+
input: "short-text",
|
|
5187
|
+
options: {
|
|
5188
|
+
note: `<em>Password</em> awal pengguna, dapat menggunakan tanggal lahir dari data profil.`,
|
|
5189
|
+
iconLeft: "key"
|
|
5190
|
+
}
|
|
5191
|
+
};
|
|
5192
|
+
const state = vue.ref("connect");
|
|
5193
|
+
const candidateId = vue.ref(null);
|
|
5194
|
+
const candidate = vue.ref(null);
|
|
5195
|
+
const isChoosing = vue.ref(false);
|
|
5196
|
+
const isLoading = vue.ref(false);
|
|
5197
|
+
const user = vue.computed(() => props.user);
|
|
5198
|
+
const userForDelegating = vue.computed(() => {
|
|
5199
|
+
var _a, _b;
|
|
5200
|
+
if (!user.value)
|
|
5201
|
+
return null;
|
|
5202
|
+
const availableRoleIds = props.roles.map((role) => role.id);
|
|
5203
|
+
const roleIds = (_b = (_a = user.value) == null ? void 0 : _a.roleIds) == null ? void 0 : _b.filter(
|
|
5204
|
+
(id) => availableRoleIds.includes(id)
|
|
5205
|
+
);
|
|
5206
|
+
return { ...user.value, roleIds };
|
|
5207
|
+
});
|
|
5208
|
+
const profile = vue.computed(() => props.profile);
|
|
5209
|
+
const initialRegistration = vue.ref({
|
|
5210
|
+
defaultPassword: getDefaultPassword()
|
|
5211
|
+
});
|
|
5212
|
+
const { client: client2 } = useClientHandle();
|
|
5213
|
+
const UserModel = identitasModels.models.UserModel;
|
|
5214
|
+
relation.withRelation({
|
|
5215
|
+
field: model.Field.define({
|
|
5216
|
+
handle: "user",
|
|
5217
|
+
name: "Pengguna",
|
|
5218
|
+
type: "relation",
|
|
5219
|
+
input: "relation",
|
|
5220
|
+
options: {}
|
|
5221
|
+
}),
|
|
5222
|
+
fields: UserModel.fields,
|
|
5223
|
+
title: "Choose Item",
|
|
5224
|
+
icon: "",
|
|
5225
|
+
singular: "",
|
|
5226
|
+
plural: "",
|
|
5227
|
+
scope: code.CodeUtil.getCode({ prefix: "relation", chars: 6 }),
|
|
5228
|
+
isMultiple: false,
|
|
5229
|
+
query: query.Query.define({}),
|
|
5230
|
+
filters: [],
|
|
5231
|
+
sorts: [],
|
|
5232
|
+
columns: ["flag", "username", "email", "phone", "status", "lastLoggedInAt"],
|
|
5233
|
+
renders: {
|
|
5234
|
+
flag: (item) => {
|
|
5235
|
+
const Avatar = vue.h(interfaces.NeonAvatar, {
|
|
5236
|
+
image: item.image,
|
|
5237
|
+
name: item.id,
|
|
5238
|
+
style: { "--neon-avatar-size": "32px" }
|
|
5239
|
+
});
|
|
5240
|
+
const Display = display.RowUtil.renderDisplay(item, UserModel.fields.flag);
|
|
5241
|
+
return vue.h("div", { class: "flex items-center space-x-2" }, [
|
|
5242
|
+
Avatar,
|
|
5243
|
+
Display
|
|
5244
|
+
]);
|
|
5245
|
+
},
|
|
5246
|
+
username: (item) => display.RowUtil.renderCode(item, UserModel.fields.username),
|
|
5247
|
+
email: (item) => display.RowUtil.renderCode(item, UserModel.fields.email),
|
|
5248
|
+
phone: (item) => display.RowUtil.renderCode(item, UserModel.fields.phone)
|
|
5249
|
+
},
|
|
5250
|
+
ids: [],
|
|
5251
|
+
initialIds: [],
|
|
5252
|
+
initialItems: [],
|
|
5253
|
+
logs: [],
|
|
5254
|
+
getItems: getManyUsers,
|
|
5255
|
+
updateValue: (id) => {
|
|
5256
|
+
candidateId.value = id;
|
|
5257
|
+
}
|
|
5258
|
+
});
|
|
5259
|
+
vue.watch(candidateId, async (id) => {
|
|
5260
|
+
if (!id) {
|
|
5261
|
+
candidate.value = null;
|
|
5262
|
+
} else {
|
|
5263
|
+
isLoading.value = true;
|
|
5264
|
+
const query$1 = query.Query.define({ ids: [id] });
|
|
5265
|
+
const resp = await getManyUsers(query$1);
|
|
5266
|
+
candidate.value = resp.items[0] || null;
|
|
5267
|
+
await props.onChoose(id);
|
|
5268
|
+
isLoading.value = false;
|
|
5269
|
+
}
|
|
5270
|
+
});
|
|
5271
|
+
function getDefaultPassword() {
|
|
5272
|
+
if (!profile.value.birthDate)
|
|
5273
|
+
return code.CodeUtil.getCode({ chars: 6 });
|
|
5274
|
+
const birthDate = new Date(profile.value.birthDate);
|
|
5275
|
+
return format(birthDate, "yyyy-MM-dd");
|
|
5276
|
+
}
|
|
5277
|
+
function onWillChoose() {
|
|
5278
|
+
isChoosing.value = true;
|
|
5279
|
+
}
|
|
5280
|
+
function onWillRegister() {
|
|
5281
|
+
clear();
|
|
5282
|
+
state.value = "register";
|
|
5283
|
+
}
|
|
5284
|
+
async function onRegister(payload) {
|
|
5285
|
+
if (!props.onRegister)
|
|
5286
|
+
return;
|
|
5287
|
+
try {
|
|
5288
|
+
isLoading.value = true;
|
|
5289
|
+
const userId = await props.onRegister({
|
|
5290
|
+
...payload,
|
|
5291
|
+
name: profile.value.name,
|
|
5292
|
+
organizationIds: [
|
|
5293
|
+
"5f8c6b0cc94b750008d4a156",
|
|
5294
|
+
// Neon,
|
|
5295
|
+
"5f8fe9a61e42a200082e3fef"
|
|
5296
|
+
// Neutron
|
|
5297
|
+
]
|
|
5298
|
+
});
|
|
5299
|
+
if (userId) {
|
|
5300
|
+
candidateId.value = userId;
|
|
5301
|
+
state.value = "connect";
|
|
5302
|
+
}
|
|
5303
|
+
} catch (error) {
|
|
5304
|
+
console.log(error);
|
|
5305
|
+
} finally {
|
|
5306
|
+
isLoading.value = false;
|
|
5307
|
+
}
|
|
5308
|
+
}
|
|
5309
|
+
async function onConnect() {
|
|
5310
|
+
if (!props.onConnect || !candidateId.value)
|
|
5311
|
+
return;
|
|
5312
|
+
isLoading.value = true;
|
|
5313
|
+
await props.onConnect(candidateId.value);
|
|
5314
|
+
isLoading.value = false;
|
|
5315
|
+
}
|
|
5316
|
+
async function onDisconnect() {
|
|
5317
|
+
var _a, _b, _c;
|
|
5318
|
+
if (!props.onDisconnect || !((_a = user.value) == null ? void 0 : _a.id))
|
|
5319
|
+
return;
|
|
5320
|
+
const availableRoleIds = props.roles.map((role) => role.id);
|
|
5321
|
+
const roleIds = ((_c = (_b = user.value) == null ? void 0 : _b.roleIds) == null ? void 0 : _c.filter((id) => !availableRoleIds.includes(id))) || [];
|
|
5322
|
+
isLoading.value = true;
|
|
5323
|
+
await props.onDisconnect({ userId: user.value.id, roleIds });
|
|
5324
|
+
isLoading.value = false;
|
|
5325
|
+
}
|
|
5326
|
+
function onBack() {
|
|
5327
|
+
clear();
|
|
5328
|
+
}
|
|
5329
|
+
async function onDelegate(delegation) {
|
|
5330
|
+
var _a, _b, _c;
|
|
5331
|
+
if (!props.onDelegate || !((_a = user.value) == null ? void 0 : _a.id) || !delegation)
|
|
5332
|
+
return;
|
|
5333
|
+
const availableRoleIds = props.roles.map((role) => role.id);
|
|
5334
|
+
const existingRoleIds = ((_c = (_b = user.value) == null ? void 0 : _b.roleIds) == null ? void 0 : _c.filter((id) => !availableRoleIds.includes(id))) || [];
|
|
5335
|
+
const roleIds = [
|
|
5336
|
+
...(/* @__PURE__ */ new Set([...delegation.roleIds, ...existingRoleIds])).values()
|
|
5337
|
+
].filter(Boolean);
|
|
5338
|
+
isLoading.value = true;
|
|
5339
|
+
await props.onDelegate({ userId: user.value.id, roleIds });
|
|
5340
|
+
isLoading.value = false;
|
|
5341
|
+
}
|
|
5342
|
+
async function getManyUsers(query2) {
|
|
5343
|
+
var _a, _b;
|
|
5344
|
+
const resp = await client2.query(
|
|
5345
|
+
context.GraphUtil.getMany(UserModel, {
|
|
5346
|
+
id: 1,
|
|
5347
|
+
flag: 1,
|
|
5348
|
+
display: 1,
|
|
5349
|
+
name: 1,
|
|
5350
|
+
username: 1,
|
|
5351
|
+
email: 1,
|
|
5352
|
+
phone: 1,
|
|
5353
|
+
image: 1,
|
|
5354
|
+
status: 1,
|
|
5355
|
+
lastLoggedInAt: 1,
|
|
5356
|
+
roleIds: 1
|
|
5357
|
+
}),
|
|
5358
|
+
{
|
|
5359
|
+
ids: query2.ids,
|
|
5360
|
+
page: query2.final.page,
|
|
5361
|
+
limit: query2.final.limit,
|
|
5362
|
+
search: query2.search,
|
|
5363
|
+
filter: query2.raw.criteria,
|
|
5364
|
+
sort: query2.raw.sort,
|
|
5365
|
+
logs: ["error"]
|
|
5366
|
+
},
|
|
5367
|
+
{ requestPolicy: "network-only" }
|
|
5368
|
+
).toPromise();
|
|
5369
|
+
const wrapper = (_a = resp.data) == null ? void 0 : _a[UserModel.plural];
|
|
5370
|
+
const items = (wrapper == null ? void 0 : wrapper.items) || [];
|
|
5371
|
+
const meta = ((_b = wrapper == null ? void 0 : wrapper.info) == null ? void 0 : _b.meta) || {};
|
|
5372
|
+
return { items, meta };
|
|
5373
|
+
}
|
|
5374
|
+
function clear() {
|
|
5375
|
+
emit("no-conflict");
|
|
5376
|
+
candidate.value = null;
|
|
5377
|
+
candidateId.value = null;
|
|
5378
|
+
}
|
|
5379
|
+
return (_ctx, _cache) => {
|
|
5380
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
|
|
5381
|
+
state.value === "connect" ? (vue.openBlock(), vue.createBlock(vue.unref(identitasInterfaces.IdentitasConnect), {
|
|
5382
|
+
key: 0,
|
|
5383
|
+
user: vue.unref(user),
|
|
5384
|
+
candidate: candidate.value,
|
|
5385
|
+
conflict: __props.conflict,
|
|
5386
|
+
"is-ready": "",
|
|
5387
|
+
"is-loading": isLoading.value,
|
|
5388
|
+
onChoose: onWillChoose,
|
|
5389
|
+
onRegister: onWillRegister,
|
|
5390
|
+
onConnect,
|
|
5391
|
+
onDisconnect,
|
|
5392
|
+
onBack
|
|
5393
|
+
}, {
|
|
5394
|
+
ready: vue.withCtx(() => {
|
|
5395
|
+
var _a;
|
|
5396
|
+
return [
|
|
5397
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5398
|
+
"model-value": (_a = vue.unref(user)) == null ? void 0 : _a.defaultPassword
|
|
5399
|
+
}, passwordField, {
|
|
5400
|
+
"more-options": {
|
|
5401
|
+
note: `<em>Password</em> awal pengguna. Tidak berlaku apabila pengguna <strong class='text-danger'>telah mengubah <em>password</em></strong> atau <strong class='text-danger'>mendaftarkan akunnya sendiri</strong>.`
|
|
5402
|
+
},
|
|
5403
|
+
"is-disabled": "",
|
|
5404
|
+
"is-alone": ""
|
|
5405
|
+
}), null, 16, ["model-value", "more-options"])
|
|
5406
|
+
];
|
|
5407
|
+
}),
|
|
5408
|
+
_: 1
|
|
5409
|
+
/* STABLE */
|
|
5410
|
+
}, 8, ["user", "candidate", "conflict", "is-loading"])) : state.value === "register" ? (vue.openBlock(), vue.createBlock(vue.unref(identitasInterfaces.IdentitasAssistRegistration), {
|
|
5411
|
+
key: 1,
|
|
5412
|
+
"initial-values": initialRegistration.value,
|
|
5413
|
+
"is-loading": isLoading.value,
|
|
5414
|
+
errors: __props.errors,
|
|
5415
|
+
onBack: _cache[0] || (_cache[0] = ($event) => state.value = "connect"),
|
|
5416
|
+
onSave: onRegister
|
|
5417
|
+
}, {
|
|
5418
|
+
default: vue.withCtx(() => {
|
|
5419
|
+
var _a;
|
|
5420
|
+
return [
|
|
5421
|
+
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
5422
|
+
"model-value": (_a = vue.unref(profile)) == null ? void 0 : _a.name
|
|
5423
|
+
}, fullNameField, {
|
|
5424
|
+
"is-disabled": "",
|
|
5425
|
+
"is-alone": ""
|
|
5426
|
+
}), null, 16, ["model-value"])
|
|
5427
|
+
];
|
|
5428
|
+
}),
|
|
5429
|
+
_: 1
|
|
5430
|
+
/* STABLE */
|
|
5431
|
+
}, 8, ["initial-values", "is-loading", "errors"])) : vue.createCommentVNode("v-if", true),
|
|
5432
|
+
vue.unref(user) && onDelegate ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$5, [
|
|
5433
|
+
vue.createVNode(vue.unref(interfaces.NeonDivider), {
|
|
5434
|
+
"is-dashed": "",
|
|
5435
|
+
label: "Delegasi",
|
|
5436
|
+
class: "divider"
|
|
5437
|
+
}),
|
|
5438
|
+
vue.createVNode(vue.unref(identitasInterfaces.IdentitasDelegate), {
|
|
5439
|
+
user: vue.unref(userForDelegating),
|
|
5440
|
+
roles: __props.roles,
|
|
5441
|
+
"is-loading": isLoading.value,
|
|
5442
|
+
onSave: onDelegate
|
|
5443
|
+
}, null, 8, ["user", "roles", "is-loading"])
|
|
5444
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
5445
|
+
isChoosing.value ? (vue.openBlock(), vue.createBlock(vue.unref(interfaces.NeonModal), {
|
|
5446
|
+
key: 3,
|
|
5447
|
+
"is-active": "",
|
|
5448
|
+
size: "lg",
|
|
5449
|
+
onClose: _cache[2] || (_cache[2] = ($event) => isChoosing.value = false)
|
|
5450
|
+
}, {
|
|
5451
|
+
default: vue.withCtx(() => [
|
|
5452
|
+
vue.createVNode(vue.unref(interfaces.NeonSheet), {
|
|
5453
|
+
icon: "user-magnifying-glass",
|
|
5454
|
+
title: "Pilih Akun",
|
|
5455
|
+
label: "User",
|
|
5456
|
+
"no-padding": "",
|
|
5457
|
+
onClose: _cache[1] || (_cache[1] = ($event) => isChoosing.value = false)
|
|
5458
|
+
}, {
|
|
5459
|
+
default: vue.withCtx(() => [
|
|
5460
|
+
vue.createVNode(vue.unref(relation.NeonRelationSheet))
|
|
5461
|
+
]),
|
|
5462
|
+
_: 1
|
|
5463
|
+
/* STABLE */
|
|
5464
|
+
})
|
|
5465
|
+
]),
|
|
5466
|
+
_: 1
|
|
5467
|
+
/* STABLE */
|
|
5468
|
+
})) : vue.createCommentVNode("v-if", true)
|
|
5469
|
+
]);
|
|
5470
|
+
};
|
|
5471
|
+
}
|
|
5472
|
+
});
|
|
5473
|
+
const OperasionalIdentitas_vue_vue_type_style_index_0_scoped_e17256c5_lang = "";
|
|
5474
|
+
const _export_sfc = (sfc, props) => {
|
|
5475
|
+
const target = sfc.__vccOpts || sfc;
|
|
5476
|
+
for (const [key, val] of props) {
|
|
5477
|
+
target[key] = val;
|
|
5478
|
+
}
|
|
5479
|
+
return target;
|
|
5480
|
+
};
|
|
5481
|
+
const OperasionalIdentitas = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-e17256c5"]]);
|
|
5482
|
+
const CheckInModel = tempatModels.models.CheckInModel;
|
|
5483
|
+
const useOperasionalStore = pinia.defineStore("neu:operasional", () => {
|
|
5484
|
+
const isLoading = vue.ref(false);
|
|
5485
|
+
const staff = vue.ref(null);
|
|
5486
|
+
return {
|
|
5487
|
+
isLoading,
|
|
5488
|
+
staff,
|
|
5489
|
+
setStaff
|
|
5490
|
+
};
|
|
5491
|
+
function setStaff(data) {
|
|
5492
|
+
staff.value = data;
|
|
5493
|
+
}
|
|
5494
|
+
});
|
|
5495
|
+
const useAttendanceStore = pinia.defineStore("neu:personalia:attendance", {
|
|
5496
|
+
state: () => ({
|
|
5497
|
+
isEntering: false,
|
|
5498
|
+
isAsking: false,
|
|
5499
|
+
isScanning: false,
|
|
5500
|
+
isScanError: false,
|
|
5501
|
+
isScanned: false,
|
|
5502
|
+
qrKey: "",
|
|
5503
|
+
type: "in",
|
|
5504
|
+
checkInId: ""
|
|
5505
|
+
}),
|
|
5506
|
+
getters: {},
|
|
5507
|
+
actions: {
|
|
5508
|
+
reset() {
|
|
5509
|
+
this.$patch((state) => {
|
|
5510
|
+
state.isEntering = false;
|
|
5511
|
+
state.isScanning = false;
|
|
5512
|
+
state.isScanError = false;
|
|
5513
|
+
state.isScanned = false;
|
|
5514
|
+
state.qrKey = "";
|
|
5515
|
+
state.type = "in";
|
|
5516
|
+
state.checkInId = "";
|
|
5517
|
+
});
|
|
5518
|
+
},
|
|
5519
|
+
async checkInStaff(qrKey, type, staffId) {
|
|
5520
|
+
const { client: client2 } = useClientHandle();
|
|
5521
|
+
try {
|
|
5522
|
+
this.qrKey = qrKey;
|
|
5523
|
+
this.type = type;
|
|
5524
|
+
const resp = await client2.mutation(context.GraphUtil.executeOne(tempatModels.models.CheckInModel, {}), {
|
|
5525
|
+
action: "presence",
|
|
5526
|
+
input: {
|
|
5527
|
+
staffId,
|
|
5528
|
+
qrKey: this.qrKey || null,
|
|
5529
|
+
type: this.type
|
|
5530
|
+
}
|
|
5531
|
+
}).toPromise();
|
|
5532
|
+
const data = resp.data.executeCheckIn.output;
|
|
5533
|
+
if (data) {
|
|
5534
|
+
this.checkInId = data || "";
|
|
5535
|
+
this.isScanning = false;
|
|
5536
|
+
this.isScanned = true;
|
|
5537
|
+
} else
|
|
5538
|
+
throw new Error("Terjadi kesalahan.");
|
|
5539
|
+
} catch (error) {
|
|
5540
|
+
console.log(error);
|
|
5541
|
+
this.isScanError = true;
|
|
5542
|
+
}
|
|
5543
|
+
}
|
|
5544
|
+
}
|
|
5545
|
+
});
|
|
5546
|
+
const operasional_types = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5547
|
+
__proto__: null
|
|
5548
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
5549
|
+
function useOperasional() {
|
|
5550
|
+
const context2 = component.ComponentUtil.injectStrict(
|
|
5551
|
+
"neu:operasional:operasional"
|
|
5552
|
+
);
|
|
5553
|
+
return { ...context2 };
|
|
5554
|
+
}
|
|
5555
|
+
const { StaffModel: StaffModel$1 } = personaliaModels.models;
|
|
5556
|
+
function withOperasional() {
|
|
5557
|
+
const authStore = identitasInterfaces.useAuthStore();
|
|
5558
|
+
const { userId } = pinia.storeToRefs(authStore);
|
|
5559
|
+
const store = useOperasionalStore();
|
|
5560
|
+
const { isLoading, staff } = pinia.storeToRefs(store);
|
|
5561
|
+
const { client: client2 } = useClientHandle();
|
|
5562
|
+
const context$1 = {
|
|
5563
|
+
isLoading,
|
|
5564
|
+
staff,
|
|
5565
|
+
setStaff: store.setStaff,
|
|
5566
|
+
getStaff,
|
|
5567
|
+
init
|
|
5568
|
+
};
|
|
5569
|
+
vue.provide("neu:operasional:operasional", context$1);
|
|
5570
|
+
return context$1;
|
|
5571
|
+
async function init() {
|
|
5572
|
+
await Promise.all([getStaff()]);
|
|
5573
|
+
}
|
|
5574
|
+
async function getStaff() {
|
|
5575
|
+
var _a;
|
|
5576
|
+
const resp = await client2.query(
|
|
5577
|
+
context.GraphUtil.getMany(StaffModel$1, {
|
|
5578
|
+
id: 1,
|
|
5579
|
+
flag: 1,
|
|
5580
|
+
display: 1,
|
|
5581
|
+
nik: 1,
|
|
5582
|
+
name: 1,
|
|
5583
|
+
birthDate: 1,
|
|
5584
|
+
birthPlace: 1,
|
|
5585
|
+
image: 1,
|
|
5586
|
+
branchId: 1,
|
|
5587
|
+
branchIds: 1,
|
|
5588
|
+
userId: 1,
|
|
5589
|
+
branch: { id: 1, name: 1 },
|
|
5590
|
+
branches: { id: 1, name: 1 },
|
|
5591
|
+
note: 1
|
|
5592
|
+
}),
|
|
5593
|
+
{
|
|
5594
|
+
filter: { userId: userId.value },
|
|
5595
|
+
limit: 1,
|
|
5596
|
+
logs: ["error"]
|
|
5597
|
+
},
|
|
5598
|
+
{ requestPolicy: "network-only" }
|
|
5599
|
+
).toPromise();
|
|
5600
|
+
const wrapper = (_a = resp.data) == null ? void 0 : _a[StaffModel$1.plural];
|
|
5601
|
+
const items = (wrapper == null ? void 0 : wrapper.items) || [];
|
|
5602
|
+
store.setStaff(items[0]);
|
|
5603
|
+
}
|
|
5604
|
+
}
|
|
5605
|
+
function mitt(n) {
|
|
5606
|
+
return { all: n = n || /* @__PURE__ */ new Map(), on: function(t3, e3) {
|
|
5607
|
+
var i3 = n.get(t3);
|
|
5608
|
+
i3 ? i3.push(e3) : n.set(t3, [e3]);
|
|
5609
|
+
}, off: function(t3, e3) {
|
|
5610
|
+
var i3 = n.get(t3);
|
|
5611
|
+
i3 && (e3 ? i3.splice(i3.indexOf(e3) >>> 0, 1) : n.set(t3, []));
|
|
5612
|
+
}, emit: function(t3, e3) {
|
|
5613
|
+
var i3 = n.get(t3);
|
|
5614
|
+
i3 && i3.slice().map(function(n2) {
|
|
5615
|
+
n2(e3);
|
|
5616
|
+
}), (i3 = n.get("*")) && i3.slice().map(function(n2) {
|
|
5617
|
+
n2(t3, e3);
|
|
5618
|
+
});
|
|
5619
|
+
} };
|
|
5620
|
+
}
|
|
5621
|
+
const bus = mitt();
|
|
5622
|
+
const _withScopeId$2 = (n) => (vue.pushScopeId("data-v-4069e2ed"), n = n(), vue.popScopeId(), n);
|
|
5623
|
+
const _hoisted_1$7 = { id: "view-checkIns" };
|
|
5624
|
+
const _hoisted_2$4 = { class: "summary" };
|
|
5625
|
+
const _hoisted_3$1 = { class: "wrapper" };
|
|
5626
|
+
const _hoisted_4$1 = { class: "header" };
|
|
5627
|
+
const _hoisted_5 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ vue.createElementVNode(
|
|
5628
|
+
"div",
|
|
5629
|
+
{ class: "start" },
|
|
5630
|
+
[
|
|
5631
|
+
/* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, "➡️ Presensi"),
|
|
5632
|
+
/* @__PURE__ */ vue.createElementVNode("div", { class: "description" }, "Daftar presensi hari ini.")
|
|
5633
|
+
],
|
|
5634
|
+
-1
|
|
5635
|
+
/* HOISTED */
|
|
5636
|
+
));
|
|
5637
|
+
const _hoisted_6 = { class: "end" };
|
|
5638
|
+
const __default__$7 = vue.defineComponent({
|
|
5639
|
+
name: "CheckInPresenceCollection"
|
|
5640
|
+
});
|
|
5641
|
+
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
5642
|
+
...__default__$7,
|
|
5643
|
+
setup(__props) {
|
|
5644
|
+
const collectionBus = core.useEventBus("neu:tempat:checkIn");
|
|
5645
|
+
const router = vueRouter.useRouter();
|
|
5646
|
+
const { client: client2 } = useClientHandle();
|
|
5647
|
+
const { staff } = useOperasional();
|
|
5648
|
+
const attendanceStore = useAttendanceStore();
|
|
5649
|
+
const { isAsking, isScanning, isEntering, isScanError, isScanned, type } = pinia.storeToRefs(attendanceStore);
|
|
5650
|
+
const toast = interfaces.useToastStore();
|
|
5651
|
+
const id = vue.ref("new");
|
|
5652
|
+
const isCheckpoint = vue.ref(false);
|
|
5653
|
+
const isOut = vue.ref(false);
|
|
5654
|
+
collectionBus.on((event, payload) => {
|
|
5655
|
+
const toastId = "neu:personalia:staff:checkIn";
|
|
5656
|
+
if (isCheckpoint.value === true || isOut.value === true) {
|
|
5657
|
+
if (event === "createOne:ok") {
|
|
5658
|
+
toast.push({
|
|
5659
|
+
id: toastId,
|
|
5660
|
+
icon: "check",
|
|
5661
|
+
content: "Presensi berhasil.",
|
|
5662
|
+
color: "success"
|
|
5663
|
+
});
|
|
5664
|
+
isCheckpoint.value = false;
|
|
5665
|
+
setTimeout(() => {
|
|
5666
|
+
router.go(0);
|
|
5667
|
+
}, 500);
|
|
5668
|
+
} else if (event === "updateOne:ok") {
|
|
5669
|
+
toast.push({
|
|
5670
|
+
id: toastId,
|
|
5671
|
+
icon: "check",
|
|
5672
|
+
content: "Catatan presensi berhasil ditambahkan.",
|
|
5673
|
+
color: "success"
|
|
5674
|
+
});
|
|
5675
|
+
isOut.value = false;
|
|
5676
|
+
setTimeout(() => {
|
|
5677
|
+
router.go(0);
|
|
5678
|
+
}, 500);
|
|
5679
|
+
}
|
|
5680
|
+
}
|
|
5681
|
+
});
|
|
5682
|
+
const query$1 = vue.computed(() => {
|
|
5683
|
+
var _a;
|
|
5684
|
+
return query.Query.define({
|
|
5685
|
+
filter: {
|
|
5686
|
+
handle: "",
|
|
5687
|
+
operator: "mongo",
|
|
5688
|
+
value: {
|
|
5689
|
+
// staffId: staff.value?.id,
|
|
5690
|
+
// $and: PeriodUtil.getPeriodFilter('checkInAt', new Date().toISOString()),
|
|
5691
|
+
$and: [
|
|
5692
|
+
{ staffId: (_a = staff.value) == null ? void 0 : _a.id },
|
|
5693
|
+
{ checkInAt: { $gte: addDays(startOfToday(), 1) } },
|
|
5694
|
+
{ checkInAt: { $lte: endOfToday() } }
|
|
5695
|
+
]
|
|
5696
|
+
}
|
|
5697
|
+
}
|
|
5698
|
+
});
|
|
5699
|
+
});
|
|
5700
|
+
function onPresenceIn(data) {
|
|
5701
|
+
isAsking.value = true;
|
|
5702
|
+
type.value = "in";
|
|
5703
|
+
}
|
|
5704
|
+
function onPresenceCheckpoint() {
|
|
5705
|
+
isCheckpoint.value = true;
|
|
5706
|
+
id.value = "new";
|
|
5707
|
+
}
|
|
5708
|
+
function onPresenceOut(data) {
|
|
5709
|
+
isAsking.value = true;
|
|
5710
|
+
type.value = "out";
|
|
5711
|
+
}
|
|
3830
5712
|
async function onPresenceHome() {
|
|
3831
5713
|
var _a;
|
|
3832
5714
|
await checkInStaff(null, "home", (_a = staff.value) == null ? void 0 : _a.id);
|
|
5715
|
+
setTimeout(() => {
|
|
5716
|
+
router.go(0);
|
|
5717
|
+
}, 500);
|
|
5718
|
+
}
|
|
5719
|
+
function onModalClose() {
|
|
5720
|
+
isCheckpoint.value = false;
|
|
5721
|
+
isOut.value = false;
|
|
3833
5722
|
}
|
|
3834
5723
|
async function onScanned(data) {
|
|
3835
5724
|
var _a;
|
|
3836
|
-
await checkInStaff(data, type.value, (_a = staff.value) == null ? void 0 : _a.id);
|
|
5725
|
+
id.value = await checkInStaff(data, type.value, (_a = staff.value) == null ? void 0 : _a.id);
|
|
3837
5726
|
}
|
|
3838
5727
|
async function checkInStaff(qrKey, type2, staffId) {
|
|
3839
5728
|
const toastId = "neu:personalia:staff:checkIn";
|
|
5729
|
+
let checkInId;
|
|
3840
5730
|
console.log("bangunan...", qrKey);
|
|
3841
5731
|
try {
|
|
3842
5732
|
const resp = await client2.mutation(context.GraphUtil.executeOne(tempatModels.models.CheckInModel, {}), {
|
|
@@ -3848,15 +5738,24 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
3848
5738
|
}
|
|
3849
5739
|
}).toPromise();
|
|
3850
5740
|
const data = resp.data.executeCheckIn.output;
|
|
5741
|
+
checkInId = data.checkInId;
|
|
3851
5742
|
if (data) {
|
|
3852
5743
|
isScanning.value = false;
|
|
3853
5744
|
isScanned.value = true;
|
|
5745
|
+
if (type2 === "out") {
|
|
5746
|
+
isOut.value = true;
|
|
5747
|
+
}
|
|
3854
5748
|
toast.push({
|
|
3855
5749
|
id: toastId,
|
|
3856
5750
|
icon: "check",
|
|
3857
5751
|
content: "Presensi berhasil.",
|
|
3858
5752
|
color: "success"
|
|
3859
5753
|
});
|
|
5754
|
+
if (type2 === "in") {
|
|
5755
|
+
setTimeout(() => {
|
|
5756
|
+
router.go(0);
|
|
5757
|
+
}, 500);
|
|
5758
|
+
}
|
|
3860
5759
|
} else
|
|
3861
5760
|
throw new Error("Terjadi kesalahan.");
|
|
3862
5761
|
} catch (error) {
|
|
@@ -3869,6 +5768,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
3869
5768
|
color: "danger"
|
|
3870
5769
|
});
|
|
3871
5770
|
}
|
|
5771
|
+
return checkInId;
|
|
3872
5772
|
}
|
|
3873
5773
|
return (_ctx, _cache) => {
|
|
3874
5774
|
const _component_CheckInSingleView = vue.resolveComponent("CheckInSingleView");
|
|
@@ -3916,7 +5816,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
3916
5816
|
vue.createVNode(vue.unref(interfaces.NeonStat), {
|
|
3917
5817
|
label: "Checkpoint",
|
|
3918
5818
|
icon: "barcode-read",
|
|
3919
|
-
onClick:
|
|
5819
|
+
onClick: onPresenceCheckpoint
|
|
3920
5820
|
}, {
|
|
3921
5821
|
default: vue.withCtx(() => [
|
|
3922
5822
|
vue.createTextVNode("Checkpoint")
|
|
@@ -3966,29 +5866,29 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
3966
5866
|
_: 1
|
|
3967
5867
|
/* STABLE */
|
|
3968
5868
|
}),
|
|
3969
|
-
isCheckpoint.value ? (vue.openBlock(), vue.createBlock(vue.unref(interfaces.NeonModal), {
|
|
5869
|
+
isCheckpoint.value || isOut.value ? (vue.openBlock(), vue.createBlock(vue.unref(interfaces.NeonModal), {
|
|
3970
5870
|
key: 0,
|
|
3971
5871
|
"is-active": "",
|
|
3972
5872
|
size: "lg",
|
|
3973
|
-
onClose:
|
|
5873
|
+
onClose: onModalClose
|
|
3974
5874
|
}, {
|
|
3975
5875
|
default: vue.withCtx(() => [
|
|
3976
5876
|
vue.createVNode(_component_CheckInSingleView, {
|
|
3977
|
-
id:
|
|
5877
|
+
id: id.value,
|
|
3978
5878
|
"is-new": "",
|
|
3979
5879
|
"is-main": false,
|
|
3980
|
-
onClose:
|
|
3981
|
-
})
|
|
5880
|
+
onClose: onModalClose
|
|
5881
|
+
}, null, 8, ["id"])
|
|
3982
5882
|
]),
|
|
3983
5883
|
_: 1
|
|
3984
5884
|
/* STABLE */
|
|
3985
5885
|
})) : vue.createCommentVNode("v-if", true),
|
|
3986
5886
|
vue.createVNode(vue.unref(CheckInAccess), {
|
|
3987
|
-
onClose: _cache[
|
|
5887
|
+
onClose: _cache[0] || (_cache[0] = ($event) => isAsking.value = false)
|
|
3988
5888
|
}),
|
|
3989
5889
|
vue.createVNode(vue.unref(CheckInScanner), {
|
|
3990
5890
|
onScanned,
|
|
3991
|
-
onClose: _cache[
|
|
5891
|
+
onClose: _cache[1] || (_cache[1] = ($event) => isScanning.value = false)
|
|
3992
5892
|
}),
|
|
3993
5893
|
vue.createCommentVNode(' <CheckInScanError @close="isScanError = false" />\n <CheckInScanSuccess @close="isScanned = false" /> ')
|
|
3994
5894
|
])
|
|
@@ -4003,6 +5903,8 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
4003
5903
|
peeks: ["modal"],
|
|
4004
5904
|
excludes: ["create"],
|
|
4005
5905
|
columns: ["type", "checkInAt", "staff", "building"],
|
|
5906
|
+
filters: ["type", "building"],
|
|
5907
|
+
sorts: ["checkInAt"],
|
|
4006
5908
|
"is-ready": "",
|
|
4007
5909
|
"is-main": ""
|
|
4008
5910
|
}, {
|
|
@@ -4023,7 +5925,8 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
4023
5925
|
]),
|
|
4024
5926
|
_: 1
|
|
4025
5927
|
/* STABLE */
|
|
4026
|
-
}, 8, ["query"])
|
|
5928
|
+
}, 8, ["query"]),
|
|
5929
|
+
vue.createCommentVNode(" <NeonDisplayFooter /> ")
|
|
4027
5930
|
])
|
|
4028
5931
|
]),
|
|
4029
5932
|
_: 1
|
|
@@ -4033,17 +5936,10 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
4033
5936
|
};
|
|
4034
5937
|
}
|
|
4035
5938
|
});
|
|
4036
|
-
const
|
|
4037
|
-
const
|
|
4038
|
-
const target = sfc.__vccOpts || sfc;
|
|
4039
|
-
for (const [key, val] of props) {
|
|
4040
|
-
target[key] = val;
|
|
4041
|
-
}
|
|
4042
|
-
return target;
|
|
4043
|
-
};
|
|
4044
|
-
const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-3ba48e60"]]);
|
|
5939
|
+
const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_4069e2ed_lang = "";
|
|
5940
|
+
const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-4069e2ed"]]);
|
|
4045
5941
|
const _hoisted_1$6 = { class: "grid gap-4 sm:grid-cols-2" };
|
|
4046
|
-
const _sfc_main$
|
|
5942
|
+
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
4047
5943
|
__name: "CheckInSingle",
|
|
4048
5944
|
setup(__props) {
|
|
4049
5945
|
const {
|
|
@@ -4141,7 +6037,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
4141
6037
|
}
|
|
4142
6038
|
});
|
|
4143
6039
|
const CheckInSingle_vue_vue_type_style_index_0_scoped_2e2803fb_lang = "";
|
|
4144
|
-
const CheckInSingle = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6040
|
+
const CheckInSingle = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-2e2803fb"]]);
|
|
4145
6041
|
const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-d23b6de5"), n = n(), vue.popScopeId(), n);
|
|
4146
6042
|
const _hoisted_1$5 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode(
|
|
4147
6043
|
"h4",
|
|
@@ -4161,7 +6057,7 @@ const _hoisted_2$3 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.cr
|
|
|
4161
6057
|
-1
|
|
4162
6058
|
/* HOISTED */
|
|
4163
6059
|
));
|
|
4164
|
-
const _sfc_main$
|
|
6060
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
4165
6061
|
__name: "CheckInAccess",
|
|
4166
6062
|
emits: ["close"],
|
|
4167
6063
|
setup(__props) {
|
|
@@ -4214,9 +6110,9 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
|
4214
6110
|
}
|
|
4215
6111
|
});
|
|
4216
6112
|
const CheckInAccess_vue_vue_type_style_index_0_scoped_d23b6de5_lang = "";
|
|
4217
|
-
const CheckInAccess = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6113
|
+
const CheckInAccess = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-d23b6de5"]]);
|
|
4218
6114
|
const _hoisted_1$4 = { class: "buttons" };
|
|
4219
|
-
const _sfc_main$
|
|
6115
|
+
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
4220
6116
|
__name: "CheckInScanError",
|
|
4221
6117
|
setup(__props) {
|
|
4222
6118
|
const attendanceStore = useAttendanceStore();
|
|
@@ -4263,106 +6159,106 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
4263
6159
|
};
|
|
4264
6160
|
}
|
|
4265
6161
|
});
|
|
4266
|
-
class
|
|
4267
|
-
constructor(
|
|
4268
|
-
this._legacyCanvasSize =
|
|
6162
|
+
class e2 {
|
|
6163
|
+
constructor(a3, b3, c2, d4, f2) {
|
|
6164
|
+
this._legacyCanvasSize = e2.DEFAULT_CANVAS_SIZE;
|
|
4269
6165
|
this._preferredCamera = "environment";
|
|
4270
6166
|
this._maxScansPerSecond = 25;
|
|
4271
6167
|
this._lastScanTimestamp = -1;
|
|
4272
6168
|
this._destroyed = this._flashOn = this._paused = this._active = false;
|
|
4273
|
-
this.$video =
|
|
6169
|
+
this.$video = a3;
|
|
4274
6170
|
this.$canvas = document.createElement("canvas");
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
this._onDecodeError =
|
|
4278
|
-
this._calculateScanRegion =
|
|
4279
|
-
this._preferredCamera =
|
|
4280
|
-
this._legacyCanvasSize = "number" === typeof
|
|
4281
|
-
this._maxScansPerSecond =
|
|
6171
|
+
c2 && "object" === typeof c2 ? this._onDecode = b3 : (c2 || d4 || f2 ? console.warn("You're using a deprecated version of the QrScanner constructor which will be removed in the future") : console.warn("Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."), this._legacyOnDecode = b3);
|
|
6172
|
+
b3 = "object" === typeof c2 ? c2 : {};
|
|
6173
|
+
this._onDecodeError = b3.onDecodeError || ("function" === typeof c2 ? c2 : this._onDecodeError);
|
|
6174
|
+
this._calculateScanRegion = b3.calculateScanRegion || ("function" === typeof d4 ? d4 : this._calculateScanRegion);
|
|
6175
|
+
this._preferredCamera = b3.preferredCamera || f2 || this._preferredCamera;
|
|
6176
|
+
this._legacyCanvasSize = "number" === typeof c2 ? c2 : "number" === typeof d4 ? d4 : this._legacyCanvasSize;
|
|
6177
|
+
this._maxScansPerSecond = b3.maxScansPerSecond || this._maxScansPerSecond;
|
|
4282
6178
|
this._onPlay = this._onPlay.bind(this);
|
|
4283
6179
|
this._onLoadedMetaData = this._onLoadedMetaData.bind(this);
|
|
4284
6180
|
this._onVisibilityChange = this._onVisibilityChange.bind(this);
|
|
4285
6181
|
this._updateOverlay = this._updateOverlay.bind(this);
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
let
|
|
4290
|
-
|
|
4291
|
-
document.body.contains(
|
|
4292
|
-
|
|
4293
|
-
if (
|
|
4294
|
-
|
|
4295
|
-
this.$overlay =
|
|
6182
|
+
a3.disablePictureInPicture = true;
|
|
6183
|
+
a3.playsInline = true;
|
|
6184
|
+
a3.muted = true;
|
|
6185
|
+
let h3 = false;
|
|
6186
|
+
a3.hidden && (a3.hidden = false, h3 = true);
|
|
6187
|
+
document.body.contains(a3) || (document.body.appendChild(a3), h3 = true);
|
|
6188
|
+
c2 = a3.parentElement;
|
|
6189
|
+
if (b3.highlightScanRegion || b3.highlightCodeOutline) {
|
|
6190
|
+
d4 = !!b3.overlay;
|
|
6191
|
+
this.$overlay = b3.overlay || document.createElement("div");
|
|
4296
6192
|
f2 = this.$overlay.style;
|
|
4297
6193
|
f2.position = "absolute";
|
|
4298
6194
|
f2.display = "none";
|
|
4299
6195
|
f2.pointerEvents = "none";
|
|
4300
6196
|
this.$overlay.classList.add("scan-region-highlight");
|
|
4301
|
-
if (!
|
|
6197
|
+
if (!d4 && b3.highlightScanRegion) {
|
|
4302
6198
|
this.$overlay.innerHTML = '<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';
|
|
4303
6199
|
try {
|
|
4304
6200
|
this.$overlay.firstElementChild.animate({ transform: [
|
|
4305
6201
|
"scale(.98)",
|
|
4306
6202
|
"scale(1.01)"
|
|
4307
6203
|
] }, { duration: 400, iterations: Infinity, direction: "alternate", easing: "ease-in-out" });
|
|
4308
|
-
} catch (
|
|
6204
|
+
} catch (m3) {
|
|
4309
6205
|
}
|
|
4310
|
-
|
|
6206
|
+
c2.insertBefore(this.$overlay, this.$video.nextSibling);
|
|
4311
6207
|
}
|
|
4312
|
-
|
|
6208
|
+
b3.highlightCodeOutline && (this.$overlay.insertAdjacentHTML("beforeend", '<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'), this.$codeOutlineHighlight = this.$overlay.lastElementChild);
|
|
4313
6209
|
}
|
|
4314
|
-
this._scanRegion = this._calculateScanRegion(
|
|
6210
|
+
this._scanRegion = this._calculateScanRegion(a3);
|
|
4315
6211
|
requestAnimationFrame(() => {
|
|
4316
|
-
let
|
|
4317
|
-
"none" ===
|
|
4318
|
-
"visible" !==
|
|
4319
|
-
|
|
6212
|
+
let m3 = window.getComputedStyle(a3);
|
|
6213
|
+
"none" === m3.display && (a3.style.setProperty("display", "block", "important"), h3 = true);
|
|
6214
|
+
"visible" !== m3.visibility && (a3.style.setProperty("visibility", "visible", "important"), h3 = true);
|
|
6215
|
+
h3 && (console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."), a3.style.opacity = "0", a3.style.width = "0", a3.style.height = "0", this.$overlay && this.$overlay.parentElement && this.$overlay.parentElement.removeChild(this.$overlay), delete this.$overlay, delete this.$codeOutlineHighlight);
|
|
4320
6216
|
this.$overlay && this._updateOverlay();
|
|
4321
6217
|
});
|
|
4322
|
-
|
|
4323
|
-
|
|
6218
|
+
a3.addEventListener("play", this._onPlay);
|
|
6219
|
+
a3.addEventListener("loadedmetadata", this._onLoadedMetaData);
|
|
4324
6220
|
document.addEventListener("visibilitychange", this._onVisibilityChange);
|
|
4325
6221
|
window.addEventListener("resize", this._updateOverlay);
|
|
4326
|
-
this._qrEnginePromise =
|
|
6222
|
+
this._qrEnginePromise = e2.createQrEngine();
|
|
4327
6223
|
}
|
|
4328
|
-
static set WORKER_PATH(
|
|
6224
|
+
static set WORKER_PATH(a3) {
|
|
4329
6225
|
console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.");
|
|
4330
6226
|
}
|
|
4331
6227
|
static async hasCamera() {
|
|
4332
6228
|
try {
|
|
4333
|
-
return !!(await
|
|
4334
|
-
} catch (
|
|
6229
|
+
return !!(await e2.listCameras(false)).length;
|
|
6230
|
+
} catch (a3) {
|
|
4335
6231
|
return false;
|
|
4336
6232
|
}
|
|
4337
6233
|
}
|
|
4338
|
-
static async listCameras(
|
|
6234
|
+
static async listCameras(a3 = false) {
|
|
4339
6235
|
if (!navigator.mediaDevices)
|
|
4340
6236
|
return [];
|
|
4341
|
-
let
|
|
6237
|
+
let b3 = async () => (await navigator.mediaDevices.enumerateDevices()).filter((d4) => "videoinput" === d4.kind), c2;
|
|
4342
6238
|
try {
|
|
4343
|
-
|
|
4344
|
-
} catch (
|
|
6239
|
+
a3 && (await b3()).every((d4) => !d4.label) && (c2 = await navigator.mediaDevices.getUserMedia({ audio: false, video: true }));
|
|
6240
|
+
} catch (d4) {
|
|
4345
6241
|
}
|
|
4346
6242
|
try {
|
|
4347
|
-
return (await
|
|
6243
|
+
return (await b3()).map((d4, f2) => ({ id: d4.deviceId, label: d4.label || (0 === f2 ? "Default Camera" : `Camera ${f2 + 1}`) }));
|
|
4348
6244
|
} finally {
|
|
4349
|
-
|
|
6245
|
+
c2 && (console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"), e2._stopVideoStream(c2));
|
|
4350
6246
|
}
|
|
4351
6247
|
}
|
|
4352
6248
|
async hasFlash() {
|
|
4353
|
-
let
|
|
6249
|
+
let a3;
|
|
4354
6250
|
try {
|
|
4355
6251
|
if (this.$video.srcObject) {
|
|
4356
6252
|
if (!(this.$video.srcObject instanceof MediaStream))
|
|
4357
6253
|
return false;
|
|
4358
|
-
|
|
6254
|
+
a3 = this.$video.srcObject;
|
|
4359
6255
|
} else
|
|
4360
|
-
|
|
4361
|
-
return "torch" in
|
|
4362
|
-
} catch (
|
|
6256
|
+
a3 = (await this._getCameraStream()).stream;
|
|
6257
|
+
return "torch" in a3.getVideoTracks()[0].getSettings();
|
|
6258
|
+
} catch (b3) {
|
|
4363
6259
|
return false;
|
|
4364
6260
|
} finally {
|
|
4365
|
-
|
|
6261
|
+
a3 && a3 !== this.$video.srcObject && (console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"), e2._stopVideoStream(a3));
|
|
4366
6262
|
}
|
|
4367
6263
|
}
|
|
4368
6264
|
isFlashOn() {
|
|
@@ -4377,8 +6273,8 @@ class e {
|
|
|
4377
6273
|
if (!await this.hasFlash())
|
|
4378
6274
|
throw "No flash available";
|
|
4379
6275
|
await this.$video.srcObject.getVideoTracks()[0].applyConstraints({ advanced: [{ torch: true }] });
|
|
4380
|
-
} catch (
|
|
4381
|
-
throw this._flashOn = false,
|
|
6276
|
+
} catch (a3) {
|
|
6277
|
+
throw this._flashOn = false, a3;
|
|
4382
6278
|
}
|
|
4383
6279
|
}
|
|
4384
6280
|
async turnFlashOff() {
|
|
@@ -4395,7 +6291,7 @@ class e {
|
|
|
4395
6291
|
this._destroyed = true;
|
|
4396
6292
|
this._flashOn = false;
|
|
4397
6293
|
this.stop();
|
|
4398
|
-
|
|
6294
|
+
e2._postWorkerMessage(this._qrEnginePromise, "close");
|
|
4399
6295
|
}
|
|
4400
6296
|
async start() {
|
|
4401
6297
|
if (this._destroyed)
|
|
@@ -4406,12 +6302,12 @@ class e {
|
|
|
4406
6302
|
await this.$video.play();
|
|
4407
6303
|
else
|
|
4408
6304
|
try {
|
|
4409
|
-
let { stream:
|
|
4410
|
-
!this._active || this._paused ?
|
|
6305
|
+
let { stream: a3, facingMode: b3 } = await this._getCameraStream();
|
|
6306
|
+
!this._active || this._paused ? e2._stopVideoStream(a3) : (this._setVideoMirror(b3), this.$video.srcObject = a3, await this.$video.play(), this._flashOn && (this._flashOn = false, this.turnFlashOn().catch(() => {
|
|
4411
6307
|
})));
|
|
4412
|
-
} catch (
|
|
6308
|
+
} catch (a3) {
|
|
4413
6309
|
if (!this._paused)
|
|
4414
|
-
throw this._active = false,
|
|
6310
|
+
throw this._active = false, a3;
|
|
4415
6311
|
}
|
|
4416
6312
|
}
|
|
4417
6313
|
}
|
|
@@ -4419,93 +6315,93 @@ class e {
|
|
|
4419
6315
|
this.pause();
|
|
4420
6316
|
this._active = false;
|
|
4421
6317
|
}
|
|
4422
|
-
async pause(
|
|
6318
|
+
async pause(a3 = false) {
|
|
4423
6319
|
this._paused = true;
|
|
4424
6320
|
if (!this._active)
|
|
4425
6321
|
return true;
|
|
4426
6322
|
this.$video.pause();
|
|
4427
6323
|
this.$overlay && (this.$overlay.style.display = "none");
|
|
4428
|
-
let
|
|
4429
|
-
this.$video.srcObject instanceof MediaStream && (
|
|
6324
|
+
let b3 = () => {
|
|
6325
|
+
this.$video.srcObject instanceof MediaStream && (e2._stopVideoStream(this.$video.srcObject), this.$video.srcObject = null);
|
|
4430
6326
|
};
|
|
4431
|
-
if (
|
|
4432
|
-
return
|
|
4433
|
-
await new Promise((
|
|
6327
|
+
if (a3)
|
|
6328
|
+
return b3(), true;
|
|
6329
|
+
await new Promise((c2) => setTimeout(c2, 300));
|
|
4434
6330
|
if (!this._paused)
|
|
4435
6331
|
return false;
|
|
4436
|
-
|
|
6332
|
+
b3();
|
|
4437
6333
|
return true;
|
|
4438
6334
|
}
|
|
4439
|
-
async setCamera(
|
|
4440
|
-
|
|
6335
|
+
async setCamera(a3) {
|
|
6336
|
+
a3 !== this._preferredCamera && (this._preferredCamera = a3, await this._restartVideoStream());
|
|
4441
6337
|
}
|
|
4442
|
-
static async scanImage(
|
|
4443
|
-
let
|
|
4444
|
-
|
|
4445
|
-
|
|
6338
|
+
static async scanImage(a3, b3, c2, d4, f2 = false, h3 = false) {
|
|
6339
|
+
let m3, n = false;
|
|
6340
|
+
b3 && ("scanRegion" in b3 || "qrEngine" in b3 || "canvas" in b3 || "disallowCanvasResizing" in b3 || "alsoTryWithoutScanRegion" in b3 || "returnDetailedScanResult" in b3) ? (m3 = b3.scanRegion, c2 = b3.qrEngine, d4 = b3.canvas, f2 = b3.disallowCanvasResizing || false, h3 = b3.alsoTryWithoutScanRegion || false, n = true) : b3 || c2 || d4 || f2 || h3 ? console.warn("You're using a deprecated api for scanImage which will be removed in the future.") : console.warn("Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true.");
|
|
6341
|
+
b3 = !!c2;
|
|
4446
6342
|
try {
|
|
4447
|
-
let p,
|
|
4448
|
-
[
|
|
4449
|
-
[
|
|
4450
|
-
let
|
|
4451
|
-
if (
|
|
4452
|
-
let g =
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
let
|
|
4456
|
-
|
|
4457
|
-
|
|
6343
|
+
let p, k2;
|
|
6344
|
+
[c2, p] = await Promise.all([c2 || e2.createQrEngine(), e2._loadImage(a3)]);
|
|
6345
|
+
[d4, k2] = e2._drawToCanvas(p, m3, d4, f2);
|
|
6346
|
+
let q2;
|
|
6347
|
+
if (c2 instanceof Worker) {
|
|
6348
|
+
let g = c2;
|
|
6349
|
+
b3 || e2._postWorkerMessageSync(g, "inversionMode", "both");
|
|
6350
|
+
q2 = await new Promise((l2, v2) => {
|
|
6351
|
+
let w2, u2, r2, y3 = -1;
|
|
6352
|
+
u2 = (t3) => {
|
|
6353
|
+
t3.data.id === y3 && (g.removeEventListener("message", u2), g.removeEventListener("error", r2), clearTimeout(w2), null !== t3.data.data ? l2({ data: t3.data.data, cornerPoints: e2._convertPoints(t3.data.cornerPoints, m3) }) : v2(e2.NO_QR_CODE_FOUND));
|
|
4458
6354
|
};
|
|
4459
|
-
r2 = (
|
|
4460
|
-
g.removeEventListener("message",
|
|
6355
|
+
r2 = (t3) => {
|
|
6356
|
+
g.removeEventListener("message", u2);
|
|
4461
6357
|
g.removeEventListener("error", r2);
|
|
4462
|
-
clearTimeout(
|
|
4463
|
-
v2("Scanner error: " + (
|
|
6358
|
+
clearTimeout(w2);
|
|
6359
|
+
v2("Scanner error: " + (t3 ? t3.message || t3 : "Unknown Error"));
|
|
4464
6360
|
};
|
|
4465
|
-
g.addEventListener("message",
|
|
6361
|
+
g.addEventListener("message", u2);
|
|
4466
6362
|
g.addEventListener("error", r2);
|
|
4467
|
-
|
|
4468
|
-
let
|
|
4469
|
-
|
|
6363
|
+
w2 = setTimeout(() => r2("timeout"), 1e4);
|
|
6364
|
+
let x2 = k2.getImageData(0, 0, d4.width, d4.height);
|
|
6365
|
+
y3 = e2._postWorkerMessageSync(g, "decode", x2, [x2.data.buffer]);
|
|
4470
6366
|
});
|
|
4471
6367
|
} else
|
|
4472
|
-
|
|
6368
|
+
q2 = await Promise.race([new Promise((g, l2) => window.setTimeout(() => l2("Scanner error: timeout"), 1e4)), (async () => {
|
|
4473
6369
|
try {
|
|
4474
|
-
var [g] = await
|
|
6370
|
+
var [g] = await c2.detect(d4);
|
|
4475
6371
|
if (!g)
|
|
4476
|
-
throw
|
|
4477
|
-
return { data: g.rawValue, cornerPoints:
|
|
6372
|
+
throw e2.NO_QR_CODE_FOUND;
|
|
6373
|
+
return { data: g.rawValue, cornerPoints: e2._convertPoints(g.cornerPoints, m3) };
|
|
4478
6374
|
} catch (l2) {
|
|
4479
6375
|
g = l2.message || l2;
|
|
4480
6376
|
if (/not implemented|service unavailable/.test(g))
|
|
4481
|
-
return
|
|
6377
|
+
return e2._disableBarcodeDetector = true, e2.scanImage(a3, { scanRegion: m3, canvas: d4, disallowCanvasResizing: f2, alsoTryWithoutScanRegion: h3 });
|
|
4482
6378
|
throw `Scanner error: ${g}`;
|
|
4483
6379
|
}
|
|
4484
6380
|
})()]);
|
|
4485
|
-
return n ?
|
|
6381
|
+
return n ? q2 : q2.data;
|
|
4486
6382
|
} catch (p) {
|
|
4487
|
-
if (!
|
|
6383
|
+
if (!m3 || !h3)
|
|
4488
6384
|
throw p;
|
|
4489
|
-
let
|
|
4490
|
-
return n ?
|
|
6385
|
+
let k2 = await e2.scanImage(a3, { qrEngine: c2, canvas: d4, disallowCanvasResizing: f2 });
|
|
6386
|
+
return n ? k2 : k2.data;
|
|
4491
6387
|
} finally {
|
|
4492
|
-
|
|
6388
|
+
b3 || e2._postWorkerMessage(c2, "close");
|
|
4493
6389
|
}
|
|
4494
6390
|
}
|
|
4495
|
-
setGrayscaleWeights(
|
|
4496
|
-
|
|
4497
|
-
red:
|
|
4498
|
-
green:
|
|
4499
|
-
blue:
|
|
4500
|
-
useIntegerApproximation:
|
|
6391
|
+
setGrayscaleWeights(a3, b3, c2, d4 = true) {
|
|
6392
|
+
e2._postWorkerMessage(this._qrEnginePromise, "grayscaleWeights", {
|
|
6393
|
+
red: a3,
|
|
6394
|
+
green: b3,
|
|
6395
|
+
blue: c2,
|
|
6396
|
+
useIntegerApproximation: d4
|
|
4501
6397
|
});
|
|
4502
6398
|
}
|
|
4503
|
-
setInversionMode(
|
|
4504
|
-
|
|
6399
|
+
setInversionMode(a3) {
|
|
6400
|
+
e2._postWorkerMessage(this._qrEnginePromise, "inversionMode", a3);
|
|
4505
6401
|
}
|
|
4506
|
-
static async createQrEngine(
|
|
4507
|
-
|
|
4508
|
-
return !
|
|
6402
|
+
static async createQrEngine(a3) {
|
|
6403
|
+
a3 && console.warn("Specifying a worker path is not required and not supported anymore.");
|
|
6404
|
+
return !e2._disableBarcodeDetector && "BarcodeDetector" in window && BarcodeDetector.getSupportedFormats && (await BarcodeDetector.getSupportedFormats()).includes("qr_code") ? new BarcodeDetector({ formats: ["qr_code"] }) : Promise.resolve().then(() => qrScannerWorker_min).then((b3) => b3.createWorker());
|
|
4509
6405
|
}
|
|
4510
6406
|
_onPlay() {
|
|
4511
6407
|
this._scanRegion = this._calculateScanRegion(this.$video);
|
|
@@ -4520,13 +6416,13 @@ class e {
|
|
|
4520
6416
|
_onVisibilityChange() {
|
|
4521
6417
|
document.hidden ? this.pause() : this._active && this.start();
|
|
4522
6418
|
}
|
|
4523
|
-
_calculateScanRegion(
|
|
4524
|
-
let
|
|
6419
|
+
_calculateScanRegion(a3) {
|
|
6420
|
+
let b3 = Math.round(2 / 3 * Math.min(a3.videoWidth, a3.videoHeight));
|
|
4525
6421
|
return {
|
|
4526
|
-
x: Math.round((
|
|
4527
|
-
y: Math.round((
|
|
4528
|
-
width:
|
|
4529
|
-
height:
|
|
6422
|
+
x: Math.round((a3.videoWidth - b3) / 2),
|
|
6423
|
+
y: Math.round((a3.videoHeight - b3) / 2),
|
|
6424
|
+
width: b3,
|
|
6425
|
+
height: b3,
|
|
4530
6426
|
downScaledWidth: this._legacyCanvasSize,
|
|
4531
6427
|
downScaledHeight: this._legacyCanvasSize
|
|
4532
6428
|
};
|
|
@@ -4534,152 +6430,152 @@ class e {
|
|
|
4534
6430
|
_updateOverlay() {
|
|
4535
6431
|
requestAnimationFrame(() => {
|
|
4536
6432
|
if (this.$overlay) {
|
|
4537
|
-
var
|
|
6433
|
+
var a3 = this.$video, b3 = a3.videoWidth, c2 = a3.videoHeight, d4 = a3.offsetWidth, f2 = a3.offsetHeight, h3 = a3.offsetLeft, m3 = a3.offsetTop, n = window.getComputedStyle(a3), p = n.objectFit, k2 = b3 / c2, q2 = d4 / f2;
|
|
4538
6434
|
switch (p) {
|
|
4539
6435
|
case "none":
|
|
4540
|
-
var g =
|
|
4541
|
-
var l2 =
|
|
6436
|
+
var g = b3;
|
|
6437
|
+
var l2 = c2;
|
|
4542
6438
|
break;
|
|
4543
6439
|
case "fill":
|
|
4544
|
-
g =
|
|
6440
|
+
g = d4;
|
|
4545
6441
|
l2 = f2;
|
|
4546
6442
|
break;
|
|
4547
6443
|
default:
|
|
4548
|
-
("cover" === p ?
|
|
6444
|
+
("cover" === p ? k2 > q2 : k2 < q2) ? (l2 = f2, g = l2 * k2) : (g = d4, l2 = g / k2), "scale-down" === p && (g = Math.min(g, b3), l2 = Math.min(l2, c2));
|
|
4549
6445
|
}
|
|
4550
|
-
var [v2,
|
|
4551
|
-
const
|
|
4552
|
-
return r2.endsWith("%") ? (
|
|
6446
|
+
var [v2, w2] = n.objectPosition.split(" ").map((r2, y3) => {
|
|
6447
|
+
const x2 = parseFloat(r2);
|
|
6448
|
+
return r2.endsWith("%") ? (y3 ? f2 - l2 : d4 - g) * x2 / 100 : x2;
|
|
4553
6449
|
});
|
|
4554
|
-
n = this._scanRegion.width ||
|
|
4555
|
-
|
|
6450
|
+
n = this._scanRegion.width || b3;
|
|
6451
|
+
q2 = this._scanRegion.height || c2;
|
|
4556
6452
|
p = this._scanRegion.x || 0;
|
|
4557
|
-
var
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
6453
|
+
var u2 = this._scanRegion.y || 0;
|
|
6454
|
+
k2 = this.$overlay.style;
|
|
6455
|
+
k2.width = `${n / b3 * g}px`;
|
|
6456
|
+
k2.height = `${q2 / c2 * l2}px`;
|
|
6457
|
+
k2.top = `${m3 + w2 + u2 / c2 * l2}px`;
|
|
6458
|
+
c2 = /scaleX\(-1\)/.test(a3.style.transform);
|
|
6459
|
+
k2.left = `${h3 + (c2 ? d4 - v2 - g : v2) + (c2 ? b3 - p - n : p) / b3 * g}px`;
|
|
6460
|
+
k2.transform = a3.style.transform;
|
|
4565
6461
|
}
|
|
4566
6462
|
});
|
|
4567
6463
|
}
|
|
4568
|
-
static _convertPoints(
|
|
4569
|
-
if (!
|
|
4570
|
-
return
|
|
4571
|
-
let
|
|
4572
|
-
|
|
4573
|
-
for (let
|
|
4574
|
-
|
|
4575
|
-
return
|
|
6464
|
+
static _convertPoints(a3, b3) {
|
|
6465
|
+
if (!b3)
|
|
6466
|
+
return a3;
|
|
6467
|
+
let c2 = b3.x || 0, d4 = b3.y || 0, f2 = b3.width && b3.downScaledWidth ? b3.width / b3.downScaledWidth : 1;
|
|
6468
|
+
b3 = b3.height && b3.downScaledHeight ? b3.height / b3.downScaledHeight : 1;
|
|
6469
|
+
for (let h3 of a3)
|
|
6470
|
+
h3.x = h3.x * f2 + c2, h3.y = h3.y * b3 + d4;
|
|
6471
|
+
return a3;
|
|
4576
6472
|
}
|
|
4577
6473
|
_scanFrame() {
|
|
4578
6474
|
!this._active || this.$video.paused || this.$video.ended || ("requestVideoFrameCallback" in this.$video ? this.$video.requestVideoFrameCallback.bind(this.$video) : requestAnimationFrame)(async () => {
|
|
4579
6475
|
if (!(1 >= this.$video.readyState)) {
|
|
4580
|
-
var
|
|
4581
|
-
|
|
6476
|
+
var a3 = Date.now() - this._lastScanTimestamp, b3 = 1e3 / this._maxScansPerSecond;
|
|
6477
|
+
a3 < b3 && await new Promise((d4) => setTimeout(d4, b3 - a3));
|
|
4582
6478
|
this._lastScanTimestamp = Date.now();
|
|
4583
6479
|
try {
|
|
4584
|
-
var
|
|
6480
|
+
var c2 = await e2.scanImage(
|
|
4585
6481
|
this.$video,
|
|
4586
6482
|
{ scanRegion: this._scanRegion, qrEngine: this._qrEnginePromise, canvas: this.$canvas }
|
|
4587
6483
|
);
|
|
4588
|
-
} catch (
|
|
6484
|
+
} catch (d4) {
|
|
4589
6485
|
if (!this._active)
|
|
4590
6486
|
return;
|
|
4591
|
-
this._onDecodeError(
|
|
6487
|
+
this._onDecodeError(d4);
|
|
4592
6488
|
}
|
|
4593
|
-
!
|
|
4594
|
-
|
|
6489
|
+
!e2._disableBarcodeDetector || await this._qrEnginePromise instanceof Worker || (this._qrEnginePromise = e2.createQrEngine());
|
|
6490
|
+
c2 ? (this._onDecode ? this._onDecode(c2) : this._legacyOnDecode && this._legacyOnDecode(c2.data), this.$codeOutlineHighlight && (clearTimeout(this._codeOutlineHighlightRemovalTimeout), this._codeOutlineHighlightRemovalTimeout = void 0, this.$codeOutlineHighlight.setAttribute(
|
|
4595
6491
|
"viewBox",
|
|
4596
6492
|
`${this._scanRegion.x || 0} ${this._scanRegion.y || 0} ${this._scanRegion.width || this.$video.videoWidth} ${this._scanRegion.height || this.$video.videoHeight}`
|
|
4597
|
-
), this.$codeOutlineHighlight.firstElementChild.setAttribute("points",
|
|
6493
|
+
), this.$codeOutlineHighlight.firstElementChild.setAttribute("points", c2.cornerPoints.map(({ x: d4, y: f2 }) => `${d4},${f2}`).join(" ")), this.$codeOutlineHighlight.style.display = "")) : this.$codeOutlineHighlight && !this._codeOutlineHighlightRemovalTimeout && (this._codeOutlineHighlightRemovalTimeout = setTimeout(() => this.$codeOutlineHighlight.style.display = "none", 100));
|
|
4598
6494
|
}
|
|
4599
6495
|
this._scanFrame();
|
|
4600
6496
|
});
|
|
4601
6497
|
}
|
|
4602
|
-
_onDecodeError(
|
|
4603
|
-
|
|
6498
|
+
_onDecodeError(a3) {
|
|
6499
|
+
a3 !== e2.NO_QR_CODE_FOUND && console.log(a3);
|
|
4604
6500
|
}
|
|
4605
6501
|
async _getCameraStream() {
|
|
4606
6502
|
if (!navigator.mediaDevices)
|
|
4607
6503
|
throw "Camera not found.";
|
|
4608
|
-
let
|
|
4609
|
-
for (let
|
|
6504
|
+
let a3 = /^(environment|user)$/.test(this._preferredCamera) ? "facingMode" : "deviceId", b3 = [{ width: { min: 1024 } }, { width: { min: 768 } }, {}], c2 = b3.map((d4) => Object.assign({}, d4, { [a3]: { exact: this._preferredCamera } }));
|
|
6505
|
+
for (let d4 of [...c2, ...b3])
|
|
4610
6506
|
try {
|
|
4611
|
-
let f2 = await navigator.mediaDevices.getUserMedia({ video:
|
|
4612
|
-
return { stream: f2, facingMode:
|
|
6507
|
+
let f2 = await navigator.mediaDevices.getUserMedia({ video: d4, audio: false }), h3 = this._getFacingMode(f2) || (d4.facingMode ? this._preferredCamera : "environment" === this._preferredCamera ? "user" : "environment");
|
|
6508
|
+
return { stream: f2, facingMode: h3 };
|
|
4613
6509
|
} catch (f2) {
|
|
4614
6510
|
}
|
|
4615
6511
|
throw "Camera not found.";
|
|
4616
6512
|
}
|
|
4617
6513
|
async _restartVideoStream() {
|
|
4618
|
-
let
|
|
4619
|
-
await this.pause(true) && !
|
|
4620
|
-
}
|
|
4621
|
-
static _stopVideoStream(
|
|
4622
|
-
for (let
|
|
4623
|
-
|
|
4624
|
-
}
|
|
4625
|
-
_setVideoMirror(
|
|
4626
|
-
this.$video.style.transform = "scaleX(" + ("user" ===
|
|
4627
|
-
}
|
|
4628
|
-
_getFacingMode(
|
|
4629
|
-
return (
|
|
4630
|
-
}
|
|
4631
|
-
static _drawToCanvas(
|
|
4632
|
-
|
|
4633
|
-
let f2 =
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
return [
|
|
4639
|
-
}
|
|
4640
|
-
static async _loadImage(
|
|
4641
|
-
if (
|
|
4642
|
-
return await
|
|
4643
|
-
if (
|
|
4644
|
-
return
|
|
4645
|
-
if (
|
|
4646
|
-
let
|
|
4647
|
-
|
|
6514
|
+
let a3 = this._paused;
|
|
6515
|
+
await this.pause(true) && !a3 && this._active && await this.start();
|
|
6516
|
+
}
|
|
6517
|
+
static _stopVideoStream(a3) {
|
|
6518
|
+
for (let b3 of a3.getTracks())
|
|
6519
|
+
b3.stop(), a3.removeTrack(b3);
|
|
6520
|
+
}
|
|
6521
|
+
_setVideoMirror(a3) {
|
|
6522
|
+
this.$video.style.transform = "scaleX(" + ("user" === a3 ? -1 : 1) + ")";
|
|
6523
|
+
}
|
|
6524
|
+
_getFacingMode(a3) {
|
|
6525
|
+
return (a3 = a3.getVideoTracks()[0]) ? /rear|back|environment/i.test(a3.label) ? "environment" : /front|user|face/i.test(a3.label) ? "user" : null : null;
|
|
6526
|
+
}
|
|
6527
|
+
static _drawToCanvas(a3, b3, c2, d4 = false) {
|
|
6528
|
+
c2 = c2 || document.createElement("canvas");
|
|
6529
|
+
let f2 = b3 && b3.x ? b3.x : 0, h3 = b3 && b3.y ? b3.y : 0, m3 = b3 && b3.width ? b3.width : a3.videoWidth || a3.width, n = b3 && b3.height ? b3.height : a3.videoHeight || a3.height;
|
|
6530
|
+
d4 || (d4 = b3 && b3.downScaledWidth ? b3.downScaledWidth : m3, b3 = b3 && b3.downScaledHeight ? b3.downScaledHeight : n, c2.width !== d4 && (c2.width = d4), c2.height !== b3 && (c2.height = b3));
|
|
6531
|
+
b3 = c2.getContext("2d", { alpha: false });
|
|
6532
|
+
b3.imageSmoothingEnabled = false;
|
|
6533
|
+
b3.drawImage(a3, f2, h3, m3, n, 0, 0, c2.width, c2.height);
|
|
6534
|
+
return [c2, b3];
|
|
6535
|
+
}
|
|
6536
|
+
static async _loadImage(a3) {
|
|
6537
|
+
if (a3 instanceof Image)
|
|
6538
|
+
return await e2._awaitImageLoad(a3), a3;
|
|
6539
|
+
if (a3 instanceof HTMLVideoElement || a3 instanceof HTMLCanvasElement || a3 instanceof SVGImageElement || "OffscreenCanvas" in window && a3 instanceof OffscreenCanvas || "ImageBitmap" in window && a3 instanceof ImageBitmap)
|
|
6540
|
+
return a3;
|
|
6541
|
+
if (a3 instanceof File || a3 instanceof Blob || a3 instanceof URL || "string" === typeof a3) {
|
|
6542
|
+
let b3 = new Image();
|
|
6543
|
+
b3.src = a3 instanceof File || a3 instanceof Blob ? URL.createObjectURL(a3) : a3.toString();
|
|
4648
6544
|
try {
|
|
4649
|
-
return await
|
|
6545
|
+
return await e2._awaitImageLoad(b3), b3;
|
|
4650
6546
|
} finally {
|
|
4651
|
-
(
|
|
6547
|
+
(a3 instanceof File || a3 instanceof Blob) && URL.revokeObjectURL(b3.src);
|
|
4652
6548
|
}
|
|
4653
6549
|
} else
|
|
4654
6550
|
throw "Unsupported image type.";
|
|
4655
6551
|
}
|
|
4656
|
-
static async _awaitImageLoad(
|
|
4657
|
-
|
|
4658
|
-
let
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
f2 instanceof ErrorEvent ?
|
|
6552
|
+
static async _awaitImageLoad(a3) {
|
|
6553
|
+
a3.complete && 0 !== a3.naturalWidth || await new Promise((b3, c2) => {
|
|
6554
|
+
let d4 = (f2) => {
|
|
6555
|
+
a3.removeEventListener("load", d4);
|
|
6556
|
+
a3.removeEventListener("error", d4);
|
|
6557
|
+
f2 instanceof ErrorEvent ? c2("Image load error") : b3();
|
|
4662
6558
|
};
|
|
4663
|
-
|
|
4664
|
-
|
|
6559
|
+
a3.addEventListener("load", d4);
|
|
6560
|
+
a3.addEventListener("error", d4);
|
|
4665
6561
|
});
|
|
4666
6562
|
}
|
|
4667
|
-
static async _postWorkerMessage(
|
|
4668
|
-
return
|
|
6563
|
+
static async _postWorkerMessage(a3, b3, c2, d4) {
|
|
6564
|
+
return e2._postWorkerMessageSync(await a3, b3, c2, d4);
|
|
4669
6565
|
}
|
|
4670
|
-
static _postWorkerMessageSync(
|
|
4671
|
-
if (!(
|
|
6566
|
+
static _postWorkerMessageSync(a3, b3, c2, d4) {
|
|
6567
|
+
if (!(a3 instanceof Worker))
|
|
4672
6568
|
return -1;
|
|
4673
|
-
let f2 =
|
|
4674
|
-
|
|
6569
|
+
let f2 = e2._workerMessageId++;
|
|
6570
|
+
a3.postMessage({ id: f2, type: b3, data: c2 }, d4);
|
|
4675
6571
|
return f2;
|
|
4676
6572
|
}
|
|
4677
6573
|
}
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
const Scanner =
|
|
6574
|
+
e2.DEFAULT_CANVAS_SIZE = 400;
|
|
6575
|
+
e2.NO_QR_CODE_FOUND = "No QR code found";
|
|
6576
|
+
e2._disableBarcodeDetector = false;
|
|
6577
|
+
e2._workerMessageId = 0;
|
|
6578
|
+
const Scanner = e2;
|
|
4683
6579
|
const _withScopeId = (n) => (vue.pushScopeId("data-v-ef426ef3"), n = n(), vue.popScopeId(), n);
|
|
4684
6580
|
const _hoisted_1$3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode(
|
|
4685
6581
|
"div",
|
|
@@ -4697,7 +6593,7 @@ const _hoisted_2$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.crea
|
|
|
4697
6593
|
));
|
|
4698
6594
|
const _hoisted_3 = ["onClick"];
|
|
4699
6595
|
const _hoisted_4 = { class: "mr-2 text-sm" };
|
|
4700
|
-
const _sfc_main$
|
|
6596
|
+
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
4701
6597
|
__name: "CheckInScanner",
|
|
4702
6598
|
emits: ["start", "stop", "scanned", "close"],
|
|
4703
6599
|
setup(__props, { emit }) {
|
|
@@ -4879,7 +6775,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
4879
6775
|
}
|
|
4880
6776
|
});
|
|
4881
6777
|
const CheckInScanner_vue_vue_type_style_index_0_scoped_ef426ef3_lang = "";
|
|
4882
|
-
const CheckInScanner = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6778
|
+
const CheckInScanner = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-ef426ef3"]]);
|
|
4883
6779
|
const _hoisted_1$2 = /* @__PURE__ */ vue.createElementVNode(
|
|
4884
6780
|
"h3",
|
|
4885
6781
|
{ align: "center" },
|
|
@@ -4887,7 +6783,7 @@ const _hoisted_1$2 = /* @__PURE__ */ vue.createElementVNode(
|
|
|
4887
6783
|
-1
|
|
4888
6784
|
/* HOISTED */
|
|
4889
6785
|
);
|
|
4890
|
-
const _sfc_main$
|
|
6786
|
+
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
4891
6787
|
__name: "CheckInScanSuccess",
|
|
4892
6788
|
emits: ["close"],
|
|
4893
6789
|
setup(__props) {
|
|
@@ -4922,7 +6818,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
4922
6818
|
const __default__$6 = vue.defineComponent({
|
|
4923
6819
|
name: "CheckInCollection"
|
|
4924
6820
|
});
|
|
4925
|
-
const _sfc_main$
|
|
6821
|
+
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
4926
6822
|
...__default__$6,
|
|
4927
6823
|
setup(__props) {
|
|
4928
6824
|
context.useCollection();
|
|
@@ -4941,7 +6837,7 @@ const StaffModel = personaliaModels.models.StaffModel;
|
|
|
4941
6837
|
const __default__$5 = vue.defineComponent({
|
|
4942
6838
|
name: "StaffCollection"
|
|
4943
6839
|
});
|
|
4944
|
-
const _sfc_main$
|
|
6840
|
+
const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
4945
6841
|
...__default__$5,
|
|
4946
6842
|
setup(__props) {
|
|
4947
6843
|
context.useCollection();
|
|
@@ -4958,7 +6854,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
4958
6854
|
});
|
|
4959
6855
|
const _hoisted_1$1 = { class: "grid gap-4 sm:grid-cols-[3fr_1fr]" };
|
|
4960
6856
|
const _hoisted_2$1 = { class: "grid gap-4 sm:grid-cols-2" };
|
|
4961
|
-
const _sfc_main$
|
|
6857
|
+
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
4962
6858
|
__name: "StaffSingle",
|
|
4963
6859
|
setup(__props) {
|
|
4964
6860
|
const {
|
|
@@ -5031,7 +6927,18 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
5031
6927
|
_: 1
|
|
5032
6928
|
/* STABLE */
|
|
5033
6929
|
}),
|
|
5034
|
-
vue.createCommentVNode(
|
|
6930
|
+
vue.createCommentVNode(" IDENTITAS "),
|
|
6931
|
+
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
6932
|
+
handle: "identity",
|
|
6933
|
+
icon: "key",
|
|
6934
|
+
title: "Identitas"
|
|
6935
|
+
}, {
|
|
6936
|
+
default: vue.withCtx(() => [
|
|
6937
|
+
vue.createVNode(vue.unref(_sfc_main$a))
|
|
6938
|
+
]),
|
|
6939
|
+
_: 1
|
|
6940
|
+
/* STABLE */
|
|
6941
|
+
}),
|
|
5035
6942
|
vue.createCommentVNode(" CABANG "),
|
|
5036
6943
|
vue.createVNode(vue.unref(office.OfficeTab), {
|
|
5037
6944
|
handle: "branch",
|
|
@@ -5052,12 +6959,14 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
5052
6959
|
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5053
6960
|
modelValue: vue.unref(values),
|
|
5054
6961
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5055
|
-
field: vue.unref(fields).branch
|
|
6962
|
+
field: vue.unref(fields).branch,
|
|
6963
|
+
fragment: { id: 1, display: 1, name: 1 }
|
|
5056
6964
|
}, null, 8, ["modelValue", "field"]),
|
|
5057
6965
|
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5058
6966
|
modelValue: vue.unref(values),
|
|
5059
6967
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5060
|
-
field: vue.unref(fields).branches
|
|
6968
|
+
field: vue.unref(fields).branches,
|
|
6969
|
+
fragment: { id: 1, display: 1, name: 1 }
|
|
5061
6970
|
}, null, 8, ["modelValue", "field"])
|
|
5062
6971
|
]),
|
|
5063
6972
|
_: 1
|
|
@@ -5103,8 +7012,112 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
5103
7012
|
};
|
|
5104
7013
|
}
|
|
5105
7014
|
});
|
|
5106
|
-
const
|
|
5107
|
-
const StaffSingle = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7015
|
+
const StaffSingle_vue_vue_type_style_index_0_scoped_a6f4ca9c_lang = "";
|
|
7016
|
+
const StaffSingle = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-a6f4ca9c"]]);
|
|
7017
|
+
const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
7018
|
+
__name: "StaffIdentity",
|
|
7019
|
+
setup(__props) {
|
|
7020
|
+
const { values, saveOne, executeOne, syncOne } = context.useSingle();
|
|
7021
|
+
const StaffModel2 = personaliaModels.models.StaffModel;
|
|
7022
|
+
const { client: client2 } = useClientHandle();
|
|
7023
|
+
const errors = vue.ref({});
|
|
7024
|
+
const conflict = vue.ref();
|
|
7025
|
+
const profile = vue.computed(() => getProfile(values.value));
|
|
7026
|
+
async function onChoose(userId) {
|
|
7027
|
+
var _a;
|
|
7028
|
+
const resp = await client2.query(
|
|
7029
|
+
context.GraphUtil.getMany(StaffModel2, {
|
|
7030
|
+
id: 1,
|
|
7031
|
+
flag: 1,
|
|
7032
|
+
display: 1,
|
|
7033
|
+
name: 1,
|
|
7034
|
+
birthDate: 1,
|
|
7035
|
+
branch: { id: 1, name: 1 }
|
|
7036
|
+
}),
|
|
7037
|
+
{
|
|
7038
|
+
filter: { userId },
|
|
7039
|
+
limit: 1,
|
|
7040
|
+
logs: ["error"]
|
|
7041
|
+
},
|
|
7042
|
+
{ requestPolicy: "network-only" }
|
|
7043
|
+
).toPromise();
|
|
7044
|
+
const wrapper = (_a = resp.data) == null ? void 0 : _a[StaffModel2.plural];
|
|
7045
|
+
const items = (wrapper == null ? void 0 : wrapper.items) || [];
|
|
7046
|
+
const staff = items[0];
|
|
7047
|
+
const profile2 = getProfile(staff);
|
|
7048
|
+
conflict.value = profile2;
|
|
7049
|
+
}
|
|
7050
|
+
async function onRegister(payload) {
|
|
7051
|
+
const resp = await executeOne("registerUser", payload);
|
|
7052
|
+
const wrapper = resp.data.executeStaff;
|
|
7053
|
+
const info = wrapper.info;
|
|
7054
|
+
const output = wrapper.output;
|
|
7055
|
+
if (info.status === "error") {
|
|
7056
|
+
errors.value = info.messages;
|
|
7057
|
+
return;
|
|
7058
|
+
}
|
|
7059
|
+
return output == null ? void 0 : output.userId;
|
|
7060
|
+
}
|
|
7061
|
+
async function onConnect(userId) {
|
|
7062
|
+
values.value.userId = userId;
|
|
7063
|
+
await saveOne();
|
|
7064
|
+
}
|
|
7065
|
+
async function onDisconnect(payload) {
|
|
7066
|
+
await executeOne("updateUser", payload);
|
|
7067
|
+
values.value.userId = null;
|
|
7068
|
+
await saveOne();
|
|
7069
|
+
}
|
|
7070
|
+
async function onDelegate(payload) {
|
|
7071
|
+
await executeOne("updateUser", payload);
|
|
7072
|
+
await syncOne();
|
|
7073
|
+
}
|
|
7074
|
+
function getProfile(staff) {
|
|
7075
|
+
var _a;
|
|
7076
|
+
if (!staff)
|
|
7077
|
+
return;
|
|
7078
|
+
const user = staff.user;
|
|
7079
|
+
const branches = (_a = staff.branches) == null ? void 0 : _a.map((s4) => s4.name).join(", ");
|
|
7080
|
+
return {
|
|
7081
|
+
name: staff.name,
|
|
7082
|
+
image: user == null ? void 0 : user.image,
|
|
7083
|
+
detail: [branches].filter(Boolean)
|
|
7084
|
+
};
|
|
7085
|
+
}
|
|
7086
|
+
return (_ctx, _cache) => {
|
|
7087
|
+
return vue.openBlock(), vue.createBlock(vue.unref(form.NeonFormWrapper), null, {
|
|
7088
|
+
default: vue.withCtx(() => [
|
|
7089
|
+
vue.createVNode(vue.unref(OperasionalIdentitas), {
|
|
7090
|
+
user: vue.unref(values).user,
|
|
7091
|
+
profile: vue.unref(profile),
|
|
7092
|
+
conflict: conflict.value,
|
|
7093
|
+
roles: [
|
|
7094
|
+
{ id: "64101f7078ae4f8388b1d1e8", name: "Cabang Operasional" },
|
|
7095
|
+
{ id: "a6c43f08a59b4292e3d1357b", name: "Super Admin" },
|
|
7096
|
+
{ id: "641044c878ae4f8388b1d280", name: "Admin Operasional" },
|
|
7097
|
+
{ id: "6309c3c2e64a1324b8663dab", name: "Karyawan" }
|
|
7098
|
+
// { id: '', name: 'Admin Keuangan' },
|
|
7099
|
+
// { id: '', name: 'Cabang Keuangan' },
|
|
7100
|
+
// { id: '', name: 'Admin Operasional' },
|
|
7101
|
+
// { id: '', name: 'Operasional' },
|
|
7102
|
+
// { id: '', name: 'Admin Marketing' },
|
|
7103
|
+
// { id: '', name: 'Cabang Marketing' },
|
|
7104
|
+
// { id: '', name: 'Admin Sentral' },
|
|
7105
|
+
],
|
|
7106
|
+
errors: errors.value,
|
|
7107
|
+
"on-choose": onChoose,
|
|
7108
|
+
"on-register": onRegister,
|
|
7109
|
+
"on-connect": onConnect,
|
|
7110
|
+
"on-disconnect": onDisconnect,
|
|
7111
|
+
"on-delegate": onDelegate,
|
|
7112
|
+
onNoConflict: _cache[0] || (_cache[0] = ($event) => conflict.value = void 0)
|
|
7113
|
+
}, null, 8, ["user", "profile", "conflict", "errors"])
|
|
7114
|
+
]),
|
|
7115
|
+
_: 1
|
|
7116
|
+
/* STABLE */
|
|
7117
|
+
});
|
|
7118
|
+
};
|
|
7119
|
+
}
|
|
7120
|
+
});
|
|
5108
7121
|
const SituationModel = personaliaModels.models.SituationModel;
|
|
5109
7122
|
const __default__$4 = vue.defineComponent({ name: "SituationCollection" });
|
|
5110
7123
|
const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -5275,6 +7288,28 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5275
7288
|
saveOne,
|
|
5276
7289
|
discardChanges
|
|
5277
7290
|
} = context.useSingle();
|
|
7291
|
+
const authStore = identitasInterfaces.useAuthStore();
|
|
7292
|
+
const { userId } = pinia.storeToRefs(authStore);
|
|
7293
|
+
const { staff } = useOperasional();
|
|
7294
|
+
vue.onMounted(() => {
|
|
7295
|
+
var _a, _b, _c, _d, _e, _f;
|
|
7296
|
+
if (id.value === "new") {
|
|
7297
|
+
values.value.situationReportedByIds = [((_a = staff.value) == null ? void 0 : _a.id) || ""];
|
|
7298
|
+
values.value.branchIds = [((_b = staff.value) == null ? void 0 : _b.branchId) || ""];
|
|
7299
|
+
values.value.userId = userId.value;
|
|
7300
|
+
values.value.situationReportedBy = [
|
|
7301
|
+
{
|
|
7302
|
+
id: (_c = staff.value) == null ? void 0 : _c.id,
|
|
7303
|
+
display: (_d = staff.value) == null ? void 0 : _d.display
|
|
7304
|
+
}
|
|
7305
|
+
];
|
|
7306
|
+
}
|
|
7307
|
+
if (isChanged) {
|
|
7308
|
+
values.value.situationReportedByIds = [((_e = staff.value) == null ? void 0 : _e.id) || ""];
|
|
7309
|
+
values.value.branchIds = [((_f = staff.value) == null ? void 0 : _f.branchId) || ""];
|
|
7310
|
+
values.value.userId = userId.value;
|
|
7311
|
+
}
|
|
7312
|
+
});
|
|
5278
7313
|
return (_ctx, _cache) => {
|
|
5279
7314
|
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-situation-single" }, {
|
|
5280
7315
|
default: vue.withCtx(() => [
|
|
@@ -5323,7 +7358,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5323
7358
|
modelValue: vue.unref(values),
|
|
5324
7359
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
5325
7360
|
field: vue.unref(fields).situationReportedBy,
|
|
5326
|
-
|
|
7361
|
+
fragment: { id: 1, display: 1, name: 1 }
|
|
5327
7362
|
}, null, 8, ["modelValue", "field"]),
|
|
5328
7363
|
vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
|
|
5329
7364
|
default: vue.withCtx(() => [
|
|
@@ -5414,6 +7449,26 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5414
7449
|
saveOne,
|
|
5415
7450
|
discardChanges
|
|
5416
7451
|
} = context.useSingle();
|
|
7452
|
+
const authStore = identitasInterfaces.useAuthStore();
|
|
7453
|
+
const { userId } = pinia.storeToRefs(authStore);
|
|
7454
|
+
const { staff } = useOperasional();
|
|
7455
|
+
vue.onMounted(() => {
|
|
7456
|
+
var _a, _b, _c, _d;
|
|
7457
|
+
if (id.value === "new") {
|
|
7458
|
+
initialValues.value.situationReportedByIds = [((_a = staff.value) == null ? void 0 : _a.id) || ""];
|
|
7459
|
+
initialValues.value.situationReportedBy = [
|
|
7460
|
+
{
|
|
7461
|
+
id: (_b = staff.value) == null ? void 0 : _b.id,
|
|
7462
|
+
display: (_c = staff.value) == null ? void 0 : _c.display
|
|
7463
|
+
}
|
|
7464
|
+
];
|
|
7465
|
+
initialValues.value.branches = (_d = staff.value) == null ? void 0 : _d.branches;
|
|
7466
|
+
values.value.userId = userId.value;
|
|
7467
|
+
}
|
|
7468
|
+
if (isChanged) {
|
|
7469
|
+
values.value.userId = userId.value;
|
|
7470
|
+
}
|
|
7471
|
+
});
|
|
5417
7472
|
return (_ctx, _cache) => {
|
|
5418
7473
|
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-situation-single" }, {
|
|
5419
7474
|
default: vue.withCtx(() => [
|
|
@@ -5463,13 +7518,18 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5463
7518
|
_: 1
|
|
5464
7519
|
/* STABLE */
|
|
5465
7520
|
}),
|
|
5466
|
-
vue.createVNode(vue.unref(
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
7521
|
+
vue.createVNode(vue.unref(form.NeonFields), { title: "Situasi" }, {
|
|
7522
|
+
default: vue.withCtx(() => [
|
|
7523
|
+
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
7524
|
+
modelValue: vue.unref(values),
|
|
7525
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
7526
|
+
field: vue.unref(fields).branches,
|
|
7527
|
+
"is-disabled": ""
|
|
7528
|
+
}, null, 8, ["modelValue", "field"])
|
|
7529
|
+
]),
|
|
7530
|
+
_: 1
|
|
7531
|
+
/* STABLE */
|
|
7532
|
+
}),
|
|
5473
7533
|
vue.createVNode(vue.unref(office.OfficeRelation), {
|
|
5474
7534
|
modelValue: vue.unref(values),
|
|
5475
7535
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.isRef(values) ? values.value = $event : null),
|
|
@@ -5648,7 +7708,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5648
7708
|
values.value.estimatedRealizedAssignmentEnd
|
|
5649
7709
|
],
|
|
5650
7710
|
([
|
|
5651
|
-
|
|
7711
|
+
estimatedRealizedAssignmentEndresultAssignment,
|
|
5652
7712
|
estimatedRealizedAssignmentStart,
|
|
5653
7713
|
estimatedRealizedAssignmentEnd
|
|
5654
7714
|
]) => {
|
|
@@ -5657,11 +7717,11 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5657
7717
|
onHandleTaskWork.value.onStartTaskWorking = true;
|
|
5658
7718
|
onHandleTaskWork.value.onFinishedTaskWorking = false;
|
|
5659
7719
|
break;
|
|
5660
|
-
case (
|
|
7720
|
+
case (estimatedRealizedAssignmentEnd === void 0 || estimatedRealizedAssignmentEnd === null):
|
|
5661
7721
|
onHandleTaskWork.value.onStartTaskWorking = false;
|
|
5662
7722
|
onHandleTaskWork.value.onFinishedTaskWorking = true;
|
|
5663
7723
|
break;
|
|
5664
|
-
case (
|
|
7724
|
+
case (estimatedRealizedAssignmentEnd !== void 0 || estimatedRealizedAssignmentEnd !== null):
|
|
5665
7725
|
onHandleTaskWork.value.onStartTaskWorking = false;
|
|
5666
7726
|
onHandleTaskWork.value.onFinishedTaskWorking = true;
|
|
5667
7727
|
onHandleTaskWork.value.onFinishedDisabledTaskWorking = true;
|
|
@@ -5673,7 +7733,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5673
7733
|
}
|
|
5674
7734
|
},
|
|
5675
7735
|
{
|
|
5676
|
-
immediate:
|
|
7736
|
+
immediate: false
|
|
5677
7737
|
}
|
|
5678
7738
|
);
|
|
5679
7739
|
const onClickHandlerStartTaskWork = async () => {
|
|
@@ -6005,6 +8065,17 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
6005
8065
|
saveOne,
|
|
6006
8066
|
discardChanges
|
|
6007
8067
|
} = context.useSingle();
|
|
8068
|
+
const authStore = identitasInterfaces.useAuthStore();
|
|
8069
|
+
const { userId } = pinia.storeToRefs(authStore);
|
|
8070
|
+
useOperasional();
|
|
8071
|
+
vue.onMounted(() => {
|
|
8072
|
+
if (id.value === "new") {
|
|
8073
|
+
values.value.userId = userId.value;
|
|
8074
|
+
}
|
|
8075
|
+
if (isChanged) {
|
|
8076
|
+
values.value.userId = userId.value;
|
|
8077
|
+
}
|
|
8078
|
+
});
|
|
6008
8079
|
function onChangeDateUpdate(date) {
|
|
6009
8080
|
values.value.estimatedStartDate = date == null ? void 0 : date.start.toISOString();
|
|
6010
8081
|
values.value.estimatedEndDate = date == null ? void 0 : date.end.toISOString();
|
|
@@ -6221,13 +8292,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
6221
8292
|
const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6222
8293
|
__proto__: null,
|
|
6223
8294
|
CheckInAccess,
|
|
6224
|
-
CheckInCollection: _sfc_main$
|
|
8295
|
+
CheckInCollection: _sfc_main$d,
|
|
6225
8296
|
CheckInModel,
|
|
6226
8297
|
CheckInPresenceCollection,
|
|
6227
|
-
CheckInScanError: _sfc_main$
|
|
6228
|
-
CheckInScanSuccess: _sfc_main$
|
|
8298
|
+
CheckInScanError: _sfc_main$g,
|
|
8299
|
+
CheckInScanSuccess: _sfc_main$e,
|
|
6229
8300
|
CheckInScanner,
|
|
6230
8301
|
CheckInSingle,
|
|
8302
|
+
OperasionalIdentitas,
|
|
6231
8303
|
SituationCollection: _sfc_main$9,
|
|
6232
8304
|
SituationModel,
|
|
6233
8305
|
SituationSingle: _sfc_main$8,
|
|
@@ -6236,7 +8308,8 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
6236
8308
|
SituationTypeModel,
|
|
6237
8309
|
SituationTypeSingle: _sfc_main$4,
|
|
6238
8310
|
SituationWork: _sfc_main$7,
|
|
6239
|
-
StaffCollection: _sfc_main$
|
|
8311
|
+
StaffCollection: _sfc_main$c,
|
|
8312
|
+
StaffIdentity: _sfc_main$a,
|
|
6240
8313
|
StaffModel,
|
|
6241
8314
|
StaffSingle,
|
|
6242
8315
|
TaskCollection: _sfc_main$2,
|
|
@@ -6244,7 +8317,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
6244
8317
|
TaskSingle: _sfc_main$1,
|
|
6245
8318
|
TaskWork: _sfc_main,
|
|
6246
8319
|
TaskWorkButton: _sfc_main$3,
|
|
6247
|
-
XxxButton: _sfc_main$
|
|
8320
|
+
XxxButton: _sfc_main$l
|
|
6248
8321
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6249
8322
|
function registerComponents(app) {
|
|
6250
8323
|
Object.entries(components).forEach(([name, component2]) => {
|
|
@@ -6362,14 +8435,15 @@ const qrScannerWorker_min = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
|
|
|
6362
8435
|
createWorker
|
|
6363
8436
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6364
8437
|
exports.CheckInAccess = CheckInAccess;
|
|
6365
|
-
exports.CheckInCollection = _sfc_main$
|
|
8438
|
+
exports.CheckInCollection = _sfc_main$d;
|
|
6366
8439
|
exports.CheckInModel = CheckInModel;
|
|
6367
8440
|
exports.CheckInPresenceCollection = CheckInPresenceCollection;
|
|
6368
|
-
exports.CheckInScanError = _sfc_main$
|
|
6369
|
-
exports.CheckInScanSuccess = _sfc_main$
|
|
8441
|
+
exports.CheckInScanError = _sfc_main$g;
|
|
8442
|
+
exports.CheckInScanSuccess = _sfc_main$e;
|
|
6370
8443
|
exports.CheckInScanner = CheckInScanner;
|
|
6371
8444
|
exports.CheckInSingle = CheckInSingle;
|
|
6372
8445
|
exports.NOperasional = operasional_types;
|
|
8446
|
+
exports.OperasionalIdentitas = OperasionalIdentitas;
|
|
6373
8447
|
exports.OperasionalInterfacesPlugin = OperasionalInterfacesPlugin;
|
|
6374
8448
|
exports.Schema = graphql;
|
|
6375
8449
|
exports.SituationCollection = _sfc_main$9;
|
|
@@ -6380,7 +8454,8 @@ exports.SituationTypeCollection = _sfc_main$5;
|
|
|
6380
8454
|
exports.SituationTypeModel = SituationTypeModel;
|
|
6381
8455
|
exports.SituationTypeSingle = _sfc_main$4;
|
|
6382
8456
|
exports.SituationWork = _sfc_main$7;
|
|
6383
|
-
exports.StaffCollection = _sfc_main$
|
|
8457
|
+
exports.StaffCollection = _sfc_main$c;
|
|
8458
|
+
exports.StaffIdentity = _sfc_main$a;
|
|
6384
8459
|
exports.StaffModel = StaffModel;
|
|
6385
8460
|
exports.StaffSingle = StaffSingle;
|
|
6386
8461
|
exports.TaskCollection = _sfc_main$2;
|
|
@@ -6388,7 +8463,7 @@ exports.TaskModel = TaskModel;
|
|
|
6388
8463
|
exports.TaskSingle = _sfc_main$1;
|
|
6389
8464
|
exports.TaskWork = _sfc_main;
|
|
6390
8465
|
exports.TaskWorkButton = _sfc_main$3;
|
|
6391
|
-
exports.XxxButton = _sfc_main$
|
|
8466
|
+
exports.XxxButton = _sfc_main$l;
|
|
6392
8467
|
exports.bus = bus;
|
|
6393
8468
|
exports.useAttendanceStore = useAttendanceStore;
|
|
6394
8469
|
exports.useOperasional = useOperasional;
|