@tmsoft/webphone 5.0.11 → 5.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/webphone.component.js +28 -28
- package/dist/webphone.es.js +349 -325
- package/dist/webphone.umd.js +17 -17
- package/package.json +1 -1
package/dist/webphone.es.js
CHANGED
|
@@ -7094,7 +7094,7 @@ var concatArrays = (e, t) => {
|
|
|
7094
7094
|
"max",
|
|
7095
7095
|
"fit",
|
|
7096
7096
|
...O()
|
|
7097
|
-
],
|
|
7097
|
+
], R = () => [
|
|
7098
7098
|
isFraction,
|
|
7099
7099
|
"screen",
|
|
7100
7100
|
"full",
|
|
@@ -7105,7 +7105,7 @@ var concatArrays = (e, t) => {
|
|
|
7105
7105
|
"max",
|
|
7106
7106
|
"fit",
|
|
7107
7107
|
...O()
|
|
7108
|
-
],
|
|
7108
|
+
], z = () => [
|
|
7109
7109
|
isFraction,
|
|
7110
7110
|
"screen",
|
|
7111
7111
|
"full",
|
|
@@ -7117,16 +7117,16 @@ var concatArrays = (e, t) => {
|
|
|
7117
7117
|
"max",
|
|
7118
7118
|
"fit",
|
|
7119
7119
|
...O()
|
|
7120
|
-
],
|
|
7120
|
+
], B = () => [
|
|
7121
7121
|
e,
|
|
7122
7122
|
isArbitraryVariable,
|
|
7123
7123
|
isArbitraryValue
|
|
7124
|
-
],
|
|
7124
|
+
], hm = () => [
|
|
7125
7125
|
...w(),
|
|
7126
7126
|
isArbitraryVariablePosition,
|
|
7127
7127
|
isArbitraryPosition,
|
|
7128
7128
|
{ position: [isArbitraryVariable, isArbitraryValue] }
|
|
7129
|
-
],
|
|
7129
|
+
], gm = () => ["no-repeat", { repeat: [
|
|
7130
7130
|
"",
|
|
7131
7131
|
"x",
|
|
7132
7132
|
"y",
|
|
@@ -7160,7 +7160,7 @@ var concatArrays = (e, t) => {
|
|
|
7160
7160
|
"dashed",
|
|
7161
7161
|
"dotted",
|
|
7162
7162
|
"double"
|
|
7163
|
-
],
|
|
7163
|
+
], G = () => [
|
|
7164
7164
|
"normal",
|
|
7165
7165
|
"multiply",
|
|
7166
7166
|
"screen",
|
|
@@ -7177,12 +7177,12 @@ var concatArrays = (e, t) => {
|
|
|
7177
7177
|
"saturation",
|
|
7178
7178
|
"color",
|
|
7179
7179
|
"luminosity"
|
|
7180
|
-
],
|
|
7180
|
+
], K = () => [
|
|
7181
7181
|
isNumber,
|
|
7182
7182
|
isPercent,
|
|
7183
7183
|
isArbitraryVariablePosition,
|
|
7184
7184
|
isArbitraryPosition
|
|
7185
|
-
],
|
|
7185
|
+
], vm = () => [
|
|
7186
7186
|
"",
|
|
7187
7187
|
"none",
|
|
7188
7188
|
_,
|
|
@@ -7193,16 +7193,16 @@ var concatArrays = (e, t) => {
|
|
|
7193
7193
|
isNumber,
|
|
7194
7194
|
isArbitraryVariable,
|
|
7195
7195
|
isArbitraryValue
|
|
7196
|
-
],
|
|
7196
|
+
], bm = () => [
|
|
7197
7197
|
"none",
|
|
7198
7198
|
isNumber,
|
|
7199
7199
|
isArbitraryVariable,
|
|
7200
7200
|
isArbitraryValue
|
|
7201
|
-
],
|
|
7201
|
+
], q = () => [
|
|
7202
7202
|
isNumber,
|
|
7203
7203
|
isArbitraryVariable,
|
|
7204
7204
|
isArbitraryValue
|
|
7205
|
-
],
|
|
7205
|
+
], J = () => [
|
|
7206
7206
|
isFraction,
|
|
7207
7207
|
"full",
|
|
7208
7208
|
...O()
|
|
@@ -7491,12 +7491,12 @@ var concatArrays = (e, t) => {
|
|
|
7491
7491
|
"space-y": [{ "space-y": O() }],
|
|
7492
7492
|
"space-y-reverse": ["space-y-reverse"],
|
|
7493
7493
|
size: [{ size: L() }],
|
|
7494
|
-
"inline-size": [{ inline: ["auto", ...
|
|
7495
|
-
"min-inline-size": [{ "min-inline": ["auto", ...
|
|
7496
|
-
"max-inline-size": [{ "max-inline": ["none", ...
|
|
7497
|
-
"block-size": [{ block: ["auto", ...
|
|
7498
|
-
"min-block-size": [{ "min-block": ["auto", ...
|
|
7499
|
-
"max-block-size": [{ "max-block": ["none", ...
|
|
7494
|
+
"inline-size": [{ inline: ["auto", ...R()] }],
|
|
7495
|
+
"min-inline-size": [{ "min-inline": ["auto", ...R()] }],
|
|
7496
|
+
"max-inline-size": [{ "max-inline": ["none", ...R()] }],
|
|
7497
|
+
"block-size": [{ block: ["auto", ...z()] }],
|
|
7498
|
+
"min-block-size": [{ "min-block": ["auto", ...z()] }],
|
|
7499
|
+
"max-block-size": [{ "max-block": ["none", ...z()] }],
|
|
7500
7500
|
w: [{ w: [
|
|
7501
7501
|
l,
|
|
7502
7502
|
"screen",
|
|
@@ -7603,8 +7603,8 @@ var concatArrays = (e, t) => {
|
|
|
7603
7603
|
"start",
|
|
7604
7604
|
"end"
|
|
7605
7605
|
] }],
|
|
7606
|
-
"placeholder-color": [{ placeholder:
|
|
7607
|
-
"text-color": [{ text:
|
|
7606
|
+
"placeholder-color": [{ placeholder: B() }],
|
|
7607
|
+
"text-color": [{ text: B() }],
|
|
7608
7608
|
"text-decoration": [
|
|
7609
7609
|
"underline",
|
|
7610
7610
|
"overline",
|
|
@@ -7619,7 +7619,7 @@ var concatArrays = (e, t) => {
|
|
|
7619
7619
|
isArbitraryVariable,
|
|
7620
7620
|
isArbitraryLength
|
|
7621
7621
|
] }],
|
|
7622
|
-
"text-decoration-color": [{ decoration:
|
|
7622
|
+
"text-decoration-color": [{ decoration: B() }],
|
|
7623
7623
|
"underline-offset": [{ "underline-offset": [
|
|
7624
7624
|
isNumber,
|
|
7625
7625
|
"auto",
|
|
@@ -7701,8 +7701,8 @@ var concatArrays = (e, t) => {
|
|
|
7701
7701
|
"padding",
|
|
7702
7702
|
"content"
|
|
7703
7703
|
] }],
|
|
7704
|
-
"bg-position": [{ bg:
|
|
7705
|
-
"bg-repeat": [{ bg:
|
|
7704
|
+
"bg-position": [{ bg: hm() }],
|
|
7705
|
+
"bg-repeat": [{ bg: gm() }],
|
|
7706
7706
|
"bg-size": [{ bg: V() }],
|
|
7707
7707
|
"bg-image": [{ bg: [
|
|
7708
7708
|
"none",
|
|
@@ -7736,13 +7736,13 @@ var concatArrays = (e, t) => {
|
|
|
7736
7736
|
isArbitraryVariableImage,
|
|
7737
7737
|
isArbitraryImage
|
|
7738
7738
|
] }],
|
|
7739
|
-
"bg-color": [{ bg:
|
|
7739
|
+
"bg-color": [{ bg: B() }],
|
|
7740
7740
|
"gradient-from-pos": [{ from: H() }],
|
|
7741
7741
|
"gradient-via-pos": [{ via: H() }],
|
|
7742
7742
|
"gradient-to-pos": [{ to: H() }],
|
|
7743
|
-
"gradient-from": [{ from:
|
|
7744
|
-
"gradient-via": [{ via:
|
|
7745
|
-
"gradient-to": [{ to:
|
|
7743
|
+
"gradient-from": [{ from: B() }],
|
|
7744
|
+
"gradient-via": [{ via: B() }],
|
|
7745
|
+
"gradient-to": [{ to: B() }],
|
|
7746
7746
|
rounded: [{ rounded: U() }],
|
|
7747
7747
|
"rounded-s": [{ "rounded-s": U() }],
|
|
7748
7748
|
"rounded-e": [{ "rounded-e": U() }],
|
|
@@ -7783,18 +7783,18 @@ var concatArrays = (e, t) => {
|
|
|
7783
7783
|
"hidden",
|
|
7784
7784
|
"none"
|
|
7785
7785
|
] }],
|
|
7786
|
-
"border-color": [{ border:
|
|
7787
|
-
"border-color-x": [{ "border-x":
|
|
7788
|
-
"border-color-y": [{ "border-y":
|
|
7789
|
-
"border-color-s": [{ "border-s":
|
|
7790
|
-
"border-color-e": [{ "border-e":
|
|
7791
|
-
"border-color-bs": [{ "border-bs":
|
|
7792
|
-
"border-color-be": [{ "border-be":
|
|
7793
|
-
"border-color-t": [{ "border-t":
|
|
7794
|
-
"border-color-r": [{ "border-r":
|
|
7795
|
-
"border-color-b": [{ "border-b":
|
|
7796
|
-
"border-color-l": [{ "border-l":
|
|
7797
|
-
"divide-color": [{ divide:
|
|
7786
|
+
"border-color": [{ border: B() }],
|
|
7787
|
+
"border-color-x": [{ "border-x": B() }],
|
|
7788
|
+
"border-color-y": [{ "border-y": B() }],
|
|
7789
|
+
"border-color-s": [{ "border-s": B() }],
|
|
7790
|
+
"border-color-e": [{ "border-e": B() }],
|
|
7791
|
+
"border-color-bs": [{ "border-bs": B() }],
|
|
7792
|
+
"border-color-be": [{ "border-be": B() }],
|
|
7793
|
+
"border-color-t": [{ "border-t": B() }],
|
|
7794
|
+
"border-color-r": [{ "border-r": B() }],
|
|
7795
|
+
"border-color-b": [{ "border-b": B() }],
|
|
7796
|
+
"border-color-l": [{ "border-l": B() }],
|
|
7797
|
+
"divide-color": [{ divide: B() }],
|
|
7798
7798
|
"outline-style": [{ outline: [
|
|
7799
7799
|
..._m(),
|
|
7800
7800
|
"none",
|
|
@@ -7811,7 +7811,7 @@ var concatArrays = (e, t) => {
|
|
|
7811
7811
|
isArbitraryVariableLength,
|
|
7812
7812
|
isArbitraryLength
|
|
7813
7813
|
] }],
|
|
7814
|
-
"outline-color": [{ outline:
|
|
7814
|
+
"outline-color": [{ outline: B() }],
|
|
7815
7815
|
shadow: [{ shadow: [
|
|
7816
7816
|
"",
|
|
7817
7817
|
"none",
|
|
@@ -7819,39 +7819,39 @@ var concatArrays = (e, t) => {
|
|
|
7819
7819
|
isArbitraryVariableShadow,
|
|
7820
7820
|
isArbitraryShadow
|
|
7821
7821
|
] }],
|
|
7822
|
-
"shadow-color": [{ shadow:
|
|
7822
|
+
"shadow-color": [{ shadow: B() }],
|
|
7823
7823
|
"inset-shadow": [{ "inset-shadow": [
|
|
7824
7824
|
"none",
|
|
7825
7825
|
p,
|
|
7826
7826
|
isArbitraryVariableShadow,
|
|
7827
7827
|
isArbitraryShadow
|
|
7828
7828
|
] }],
|
|
7829
|
-
"inset-shadow-color": [{ "inset-shadow":
|
|
7829
|
+
"inset-shadow-color": [{ "inset-shadow": B() }],
|
|
7830
7830
|
"ring-w": [{ ring: W() }],
|
|
7831
7831
|
"ring-w-inset": ["ring-inset"],
|
|
7832
|
-
"ring-color": [{ ring:
|
|
7832
|
+
"ring-color": [{ ring: B() }],
|
|
7833
7833
|
"ring-offset-w": [{ "ring-offset": [isNumber, isArbitraryLength] }],
|
|
7834
|
-
"ring-offset-color": [{ "ring-offset":
|
|
7834
|
+
"ring-offset-color": [{ "ring-offset": B() }],
|
|
7835
7835
|
"inset-ring-w": [{ "inset-ring": W() }],
|
|
7836
|
-
"inset-ring-color": [{ "inset-ring":
|
|
7836
|
+
"inset-ring-color": [{ "inset-ring": B() }],
|
|
7837
7837
|
"text-shadow": [{ "text-shadow": [
|
|
7838
7838
|
"none",
|
|
7839
7839
|
m,
|
|
7840
7840
|
isArbitraryVariableShadow,
|
|
7841
7841
|
isArbitraryShadow
|
|
7842
7842
|
] }],
|
|
7843
|
-
"text-shadow-color": [{ "text-shadow":
|
|
7843
|
+
"text-shadow-color": [{ "text-shadow": B() }],
|
|
7844
7844
|
opacity: [{ opacity: [
|
|
7845
7845
|
isNumber,
|
|
7846
7846
|
isArbitraryVariable,
|
|
7847
7847
|
isArbitraryValue
|
|
7848
7848
|
] }],
|
|
7849
7849
|
"mix-blend": [{ "mix-blend": [
|
|
7850
|
-
...
|
|
7850
|
+
...G(),
|
|
7851
7851
|
"plus-darker",
|
|
7852
7852
|
"plus-lighter"
|
|
7853
7853
|
] }],
|
|
7854
|
-
"bg-blend": [{ "bg-blend":
|
|
7854
|
+
"bg-blend": [{ "bg-blend": G() }],
|
|
7855
7855
|
"mask-clip": [{ "mask-clip": [
|
|
7856
7856
|
"border",
|
|
7857
7857
|
"padding",
|
|
@@ -7867,39 +7867,39 @@ var concatArrays = (e, t) => {
|
|
|
7867
7867
|
"exclude"
|
|
7868
7868
|
] }],
|
|
7869
7869
|
"mask-image-linear-pos": [{ "mask-linear": [isNumber] }],
|
|
7870
|
-
"mask-image-linear-from-pos": [{ "mask-linear-from":
|
|
7871
|
-
"mask-image-linear-to-pos": [{ "mask-linear-to":
|
|
7872
|
-
"mask-image-linear-from-color": [{ "mask-linear-from":
|
|
7873
|
-
"mask-image-linear-to-color": [{ "mask-linear-to":
|
|
7874
|
-
"mask-image-t-from-pos": [{ "mask-t-from":
|
|
7875
|
-
"mask-image-t-to-pos": [{ "mask-t-to":
|
|
7876
|
-
"mask-image-t-from-color": [{ "mask-t-from":
|
|
7877
|
-
"mask-image-t-to-color": [{ "mask-t-to":
|
|
7878
|
-
"mask-image-r-from-pos": [{ "mask-r-from":
|
|
7879
|
-
"mask-image-r-to-pos": [{ "mask-r-to":
|
|
7880
|
-
"mask-image-r-from-color": [{ "mask-r-from":
|
|
7881
|
-
"mask-image-r-to-color": [{ "mask-r-to":
|
|
7882
|
-
"mask-image-b-from-pos": [{ "mask-b-from":
|
|
7883
|
-
"mask-image-b-to-pos": [{ "mask-b-to":
|
|
7884
|
-
"mask-image-b-from-color": [{ "mask-b-from":
|
|
7885
|
-
"mask-image-b-to-color": [{ "mask-b-to":
|
|
7886
|
-
"mask-image-l-from-pos": [{ "mask-l-from":
|
|
7887
|
-
"mask-image-l-to-pos": [{ "mask-l-to":
|
|
7888
|
-
"mask-image-l-from-color": [{ "mask-l-from":
|
|
7889
|
-
"mask-image-l-to-color": [{ "mask-l-to":
|
|
7890
|
-
"mask-image-x-from-pos": [{ "mask-x-from":
|
|
7891
|
-
"mask-image-x-to-pos": [{ "mask-x-to":
|
|
7892
|
-
"mask-image-x-from-color": [{ "mask-x-from":
|
|
7893
|
-
"mask-image-x-to-color": [{ "mask-x-to":
|
|
7894
|
-
"mask-image-y-from-pos": [{ "mask-y-from":
|
|
7895
|
-
"mask-image-y-to-pos": [{ "mask-y-to":
|
|
7896
|
-
"mask-image-y-from-color": [{ "mask-y-from":
|
|
7897
|
-
"mask-image-y-to-color": [{ "mask-y-to":
|
|
7870
|
+
"mask-image-linear-from-pos": [{ "mask-linear-from": K() }],
|
|
7871
|
+
"mask-image-linear-to-pos": [{ "mask-linear-to": K() }],
|
|
7872
|
+
"mask-image-linear-from-color": [{ "mask-linear-from": B() }],
|
|
7873
|
+
"mask-image-linear-to-color": [{ "mask-linear-to": B() }],
|
|
7874
|
+
"mask-image-t-from-pos": [{ "mask-t-from": K() }],
|
|
7875
|
+
"mask-image-t-to-pos": [{ "mask-t-to": K() }],
|
|
7876
|
+
"mask-image-t-from-color": [{ "mask-t-from": B() }],
|
|
7877
|
+
"mask-image-t-to-color": [{ "mask-t-to": B() }],
|
|
7878
|
+
"mask-image-r-from-pos": [{ "mask-r-from": K() }],
|
|
7879
|
+
"mask-image-r-to-pos": [{ "mask-r-to": K() }],
|
|
7880
|
+
"mask-image-r-from-color": [{ "mask-r-from": B() }],
|
|
7881
|
+
"mask-image-r-to-color": [{ "mask-r-to": B() }],
|
|
7882
|
+
"mask-image-b-from-pos": [{ "mask-b-from": K() }],
|
|
7883
|
+
"mask-image-b-to-pos": [{ "mask-b-to": K() }],
|
|
7884
|
+
"mask-image-b-from-color": [{ "mask-b-from": B() }],
|
|
7885
|
+
"mask-image-b-to-color": [{ "mask-b-to": B() }],
|
|
7886
|
+
"mask-image-l-from-pos": [{ "mask-l-from": K() }],
|
|
7887
|
+
"mask-image-l-to-pos": [{ "mask-l-to": K() }],
|
|
7888
|
+
"mask-image-l-from-color": [{ "mask-l-from": B() }],
|
|
7889
|
+
"mask-image-l-to-color": [{ "mask-l-to": B() }],
|
|
7890
|
+
"mask-image-x-from-pos": [{ "mask-x-from": K() }],
|
|
7891
|
+
"mask-image-x-to-pos": [{ "mask-x-to": K() }],
|
|
7892
|
+
"mask-image-x-from-color": [{ "mask-x-from": B() }],
|
|
7893
|
+
"mask-image-x-to-color": [{ "mask-x-to": B() }],
|
|
7894
|
+
"mask-image-y-from-pos": [{ "mask-y-from": K() }],
|
|
7895
|
+
"mask-image-y-to-pos": [{ "mask-y-to": K() }],
|
|
7896
|
+
"mask-image-y-from-color": [{ "mask-y-from": B() }],
|
|
7897
|
+
"mask-image-y-to-color": [{ "mask-y-to": B() }],
|
|
7898
7898
|
"mask-image-radial": [{ "mask-radial": [isArbitraryVariable, isArbitraryValue] }],
|
|
7899
|
-
"mask-image-radial-from-pos": [{ "mask-radial-from":
|
|
7900
|
-
"mask-image-radial-to-pos": [{ "mask-radial-to":
|
|
7901
|
-
"mask-image-radial-from-color": [{ "mask-radial-from":
|
|
7902
|
-
"mask-image-radial-to-color": [{ "mask-radial-to":
|
|
7899
|
+
"mask-image-radial-from-pos": [{ "mask-radial-from": K() }],
|
|
7900
|
+
"mask-image-radial-to-pos": [{ "mask-radial-to": K() }],
|
|
7901
|
+
"mask-image-radial-from-color": [{ "mask-radial-from": B() }],
|
|
7902
|
+
"mask-image-radial-to-color": [{ "mask-radial-to": B() }],
|
|
7903
7903
|
"mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
|
|
7904
7904
|
"mask-image-radial-size": [{ "mask-radial": [{
|
|
7905
7905
|
closest: ["side", "corner"],
|
|
@@ -7907,10 +7907,10 @@ var concatArrays = (e, t) => {
|
|
|
7907
7907
|
}] }],
|
|
7908
7908
|
"mask-image-radial-pos": [{ "mask-radial-at": w() }],
|
|
7909
7909
|
"mask-image-conic-pos": [{ "mask-conic": [isNumber] }],
|
|
7910
|
-
"mask-image-conic-from-pos": [{ "mask-conic-from":
|
|
7911
|
-
"mask-image-conic-to-pos": [{ "mask-conic-to":
|
|
7912
|
-
"mask-image-conic-from-color": [{ "mask-conic-from":
|
|
7913
|
-
"mask-image-conic-to-color": [{ "mask-conic-to":
|
|
7910
|
+
"mask-image-conic-from-pos": [{ "mask-conic-from": K() }],
|
|
7911
|
+
"mask-image-conic-to-pos": [{ "mask-conic-to": K() }],
|
|
7912
|
+
"mask-image-conic-from-color": [{ "mask-conic-from": B() }],
|
|
7913
|
+
"mask-image-conic-to-color": [{ "mask-conic-to": B() }],
|
|
7914
7914
|
"mask-mode": [{ mask: [
|
|
7915
7915
|
"alpha",
|
|
7916
7916
|
"luminance",
|
|
@@ -7924,8 +7924,8 @@ var concatArrays = (e, t) => {
|
|
|
7924
7924
|
"stroke",
|
|
7925
7925
|
"view"
|
|
7926
7926
|
] }],
|
|
7927
|
-
"mask-position": [{ mask:
|
|
7928
|
-
"mask-repeat": [{ mask:
|
|
7927
|
+
"mask-position": [{ mask: hm() }],
|
|
7928
|
+
"mask-repeat": [{ mask: gm() }],
|
|
7929
7929
|
"mask-size": [{ mask: V() }],
|
|
7930
7930
|
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
7931
7931
|
"mask-image": [{ mask: [
|
|
@@ -7939,7 +7939,7 @@ var concatArrays = (e, t) => {
|
|
|
7939
7939
|
isArbitraryVariable,
|
|
7940
7940
|
isArbitraryValue
|
|
7941
7941
|
] }],
|
|
7942
|
-
blur: [{ blur:
|
|
7942
|
+
blur: [{ blur: vm() }],
|
|
7943
7943
|
brightness: [{ brightness: [
|
|
7944
7944
|
isNumber,
|
|
7945
7945
|
isArbitraryVariable,
|
|
@@ -7957,7 +7957,7 @@ var concatArrays = (e, t) => {
|
|
|
7957
7957
|
isArbitraryVariableShadow,
|
|
7958
7958
|
isArbitraryShadow
|
|
7959
7959
|
] }],
|
|
7960
|
-
"drop-shadow-color": [{ "drop-shadow":
|
|
7960
|
+
"drop-shadow-color": [{ "drop-shadow": B() }],
|
|
7961
7961
|
grayscale: [{ grayscale: [
|
|
7962
7962
|
"",
|
|
7963
7963
|
isNumber,
|
|
@@ -7992,7 +7992,7 @@ var concatArrays = (e, t) => {
|
|
|
7992
7992
|
isArbitraryVariable,
|
|
7993
7993
|
isArbitraryValue
|
|
7994
7994
|
] }],
|
|
7995
|
-
"backdrop-blur": [{ "backdrop-blur":
|
|
7995
|
+
"backdrop-blur": [{ "backdrop-blur": vm() }],
|
|
7996
7996
|
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
7997
7997
|
isNumber,
|
|
7998
7998
|
isArbitraryVariable,
|
|
@@ -8089,14 +8089,14 @@ var concatArrays = (e, t) => {
|
|
|
8089
8089
|
"rotate-x": [{ "rotate-x": ym() }],
|
|
8090
8090
|
"rotate-y": [{ "rotate-y": ym() }],
|
|
8091
8091
|
"rotate-z": [{ "rotate-z": ym() }],
|
|
8092
|
-
scale: [{ scale:
|
|
8093
|
-
"scale-x": [{ "scale-x":
|
|
8094
|
-
"scale-y": [{ "scale-y":
|
|
8095
|
-
"scale-z": [{ "scale-z":
|
|
8092
|
+
scale: [{ scale: bm() }],
|
|
8093
|
+
"scale-x": [{ "scale-x": bm() }],
|
|
8094
|
+
"scale-y": [{ "scale-y": bm() }],
|
|
8095
|
+
"scale-z": [{ "scale-z": bm() }],
|
|
8096
8096
|
"scale-3d": ["scale-3d"],
|
|
8097
|
-
skew: [{ skew:
|
|
8098
|
-
"skew-x": [{ "skew-x":
|
|
8099
|
-
"skew-y": [{ "skew-y":
|
|
8097
|
+
skew: [{ skew: q() }],
|
|
8098
|
+
"skew-x": [{ "skew-x": q() }],
|
|
8099
|
+
"skew-y": [{ "skew-y": q() }],
|
|
8100
8100
|
transform: [{ transform: [
|
|
8101
8101
|
isArbitraryVariable,
|
|
8102
8102
|
isArbitraryValue,
|
|
@@ -8107,14 +8107,14 @@ var concatArrays = (e, t) => {
|
|
|
8107
8107
|
] }],
|
|
8108
8108
|
"transform-origin": [{ origin: T() }],
|
|
8109
8109
|
"transform-style": [{ transform: ["3d", "flat"] }],
|
|
8110
|
-
translate: [{ translate:
|
|
8111
|
-
"translate-x": [{ "translate-x":
|
|
8112
|
-
"translate-y": [{ "translate-y":
|
|
8113
|
-
"translate-z": [{ "translate-z":
|
|
8110
|
+
translate: [{ translate: J() }],
|
|
8111
|
+
"translate-x": [{ "translate-x": J() }],
|
|
8112
|
+
"translate-y": [{ "translate-y": J() }],
|
|
8113
|
+
"translate-z": [{ "translate-z": J() }],
|
|
8114
8114
|
"translate-none": ["translate-none"],
|
|
8115
|
-
accent: [{ accent:
|
|
8115
|
+
accent: [{ accent: B() }],
|
|
8116
8116
|
appearance: [{ appearance: ["none", "auto"] }],
|
|
8117
|
-
"caret-color": [{ caret:
|
|
8117
|
+
"caret-color": [{ caret: B() }],
|
|
8118
8118
|
"color-scheme": [{ scheme: [
|
|
8119
8119
|
"normal",
|
|
8120
8120
|
"dark",
|
|
@@ -8238,14 +8238,14 @@ var concatArrays = (e, t) => {
|
|
|
8238
8238
|
isArbitraryVariable,
|
|
8239
8239
|
isArbitraryValue
|
|
8240
8240
|
] }],
|
|
8241
|
-
fill: [{ fill: ["none", ...
|
|
8241
|
+
fill: [{ fill: ["none", ...B()] }],
|
|
8242
8242
|
"stroke-w": [{ stroke: [
|
|
8243
8243
|
isNumber,
|
|
8244
8244
|
isArbitraryVariableLength,
|
|
8245
8245
|
isArbitraryLength,
|
|
8246
8246
|
isArbitraryNumber
|
|
8247
8247
|
] }],
|
|
8248
|
-
stroke: [{ stroke: ["none", ...
|
|
8248
|
+
stroke: [{ stroke: ["none", ...B()] }],
|
|
8249
8249
|
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
|
|
8250
8250
|
},
|
|
8251
8251
|
conflictingClassGroups: {
|
|
@@ -8565,10 +8565,17 @@ var sipSharedWorker_default = "/assets/sipSharedWorker-HqRmUaB2.js", SharedWorke
|
|
|
8565
8565
|
this.currentState !== e && (this.currentState = e, this.stateEventEmitter.emit(e));
|
|
8566
8566
|
}
|
|
8567
8567
|
}, QUEUE_NAME_HEADER = "X-Nebula-Queue", QUEUE_ID_HEADER = "X-Nebula-Queue-Id";
|
|
8568
|
-
const
|
|
8568
|
+
const RECOVERY_DELAYS_MS = [
|
|
8569
|
+
1e3,
|
|
8570
|
+
2e3,
|
|
8571
|
+
5e3,
|
|
8572
|
+
1e4,
|
|
8573
|
+
2e4,
|
|
8574
|
+
3e4
|
|
8575
|
+
], createSipService = (e, t = {}) => {
|
|
8569
8576
|
let n = shallowRef(null), i = shallowRef(null), a = shallowRef(/* @__PURE__ */ new Map()), o = new Audio();
|
|
8570
8577
|
o.autoplay = !0;
|
|
8571
|
-
let l = shallowRef(void 0), u = shallowRef(null), d = shallowRef(null), f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Map(), _ = !1, v = null, y = null, b = null, x = null, S = null, w = computed(() => n.value?.configuration.uri?.user || ""), { startRingtone:
|
|
8578
|
+
let l = shallowRef(void 0), u = shallowRef(null), d = shallowRef(null), f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Map(), _ = !1, v = null, y = null, b = null, x = null, S = null, w = null, T = 0, E = null, D = computed(() => n.value?.configuration.uri?.user || ""), { startRingtone: O, stopRingtone: k, startRingback: A, stopRingback: j, playAutoAnswerBeep: M, setNotificationVolume: N, setRingtoneVolume: P, setRingtoneTone: F } = useAudioSounds(), I = (e) => e instanceof Inviter || e instanceof Invitation ? e.request?.callId || e.dialog?.callId || e.id || crypto.randomUUID() : e.dialog?.callId || e.id || crypto.randomUUID(), L = (e) => {
|
|
8572
8579
|
if (!(e instanceof Invitation)) return;
|
|
8573
8580
|
let t = e.request;
|
|
8574
8581
|
if (!t) return;
|
|
@@ -8577,23 +8584,23 @@ const createSipService = (e, t = {}) => {
|
|
|
8577
8584
|
...i ? { id: i } : {},
|
|
8578
8585
|
...n ? { name: n } : {}
|
|
8579
8586
|
};
|
|
8580
|
-
},
|
|
8581
|
-
let o =
|
|
8587
|
+
}, R = (e, n, i, a) => {
|
|
8588
|
+
let o = L(e), s = {
|
|
8582
8589
|
channelId: n,
|
|
8583
|
-
sipCallId:
|
|
8590
|
+
sipCallId: I(e),
|
|
8584
8591
|
direction: i,
|
|
8585
8592
|
remoteNumber: a,
|
|
8586
8593
|
...o ? { queue: o } : {}
|
|
8587
8594
|
};
|
|
8588
8595
|
return f.set(n, s), t.onCallContext?.(s), s;
|
|
8589
|
-
},
|
|
8596
|
+
}, z = (e, n) => {
|
|
8590
8597
|
let i = f.get(e);
|
|
8591
8598
|
i && t.onCallState?.({
|
|
8592
8599
|
...i,
|
|
8593
8600
|
state: n,
|
|
8594
8601
|
timestamp: Date.now()
|
|
8595
8602
|
});
|
|
8596
|
-
},
|
|
8603
|
+
}, B = (e, n) => {
|
|
8597
8604
|
if (a.value.get(n) !== e || e.state !== SessionState.Established) return;
|
|
8598
8605
|
let i = f.get(n), o = e.sessionDescriptionHandler, s = o?.localMediaStream ?? d.value, l = o?.remoteMediaStream ?? u.value, m = s?.getAudioTracks() ?? [], g = l?.getAudioTracks() ?? [];
|
|
8599
8606
|
if (!i || !s || !l || m.length === 0 || g.length === 0) return;
|
|
@@ -8609,7 +8616,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8609
8616
|
}));
|
|
8610
8617
|
}, hm = (e) => {
|
|
8611
8618
|
f.delete(e), p.delete(e), m.delete(e);
|
|
8612
|
-
},
|
|
8619
|
+
}, gm = (n, i) => {
|
|
8613
8620
|
if (a.value.get(n) !== i) return;
|
|
8614
8621
|
let o = g.get(i);
|
|
8615
8622
|
o && clearTimeout(o), g.delete(i);
|
|
@@ -8626,7 +8633,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8626
8633
|
hasEarlyMedia: !1
|
|
8627
8634
|
});
|
|
8628
8635
|
let d = e.transferInProgress.value;
|
|
8629
|
-
if (d && (d.originalChannelId === n || d.consultationChannelId === n) && e.setTransferInProgress(null), e.activeChannelId.value === n &&
|
|
8636
|
+
if (d && (d.originalChannelId === n || d.consultationChannelId === n) && e.setTransferInProgress(null), e.activeChannelId.value === n && Hm(), U(), l) {
|
|
8630
8637
|
try {
|
|
8631
8638
|
e.addCallLog({
|
|
8632
8639
|
number: l.remoteNumber,
|
|
@@ -8648,11 +8655,11 @@ const createSipService = (e, t = {}) => {
|
|
|
8648
8655
|
console.warn("[SipJs] Call ended, but the state callback failed:", e);
|
|
8649
8656
|
}
|
|
8650
8657
|
}
|
|
8651
|
-
},
|
|
8658
|
+
}, V = (e, t) => {
|
|
8652
8659
|
g.has(t) || g.set(t, setTimeout(() => {
|
|
8653
|
-
console.warn("[SipJs] Hangup did not terminate; releasing local call state"),
|
|
8660
|
+
console.warn("[SipJs] Hangup did not terminate; releasing local call state"), H(t), gm(e, t);
|
|
8654
8661
|
}, 5e3));
|
|
8655
|
-
},
|
|
8662
|
+
}, H = (e) => {
|
|
8656
8663
|
if (e.state !== SessionState.Terminated) try {
|
|
8657
8664
|
e.dispose().catch((e) => {
|
|
8658
8665
|
console.warn("[SipJs] Session disposal failed:", e);
|
|
@@ -8660,15 +8667,15 @@ const createSipService = (e, t = {}) => {
|
|
|
8660
8667
|
} catch (e) {
|
|
8661
8668
|
console.warn("[SipJs] Session disposal failed:", e);
|
|
8662
8669
|
}
|
|
8663
|
-
},
|
|
8664
|
-
e.channels.value.some((e) => e.status === "incoming") && !isAutoAnswerEnabled() ?
|
|
8665
|
-
},
|
|
8666
|
-
await
|
|
8667
|
-
},
|
|
8670
|
+
}, U = () => {
|
|
8671
|
+
e.channels.value.some((e) => e.status === "incoming") && !isAutoAnswerEnabled() ? O() : k(), e.activeChannel.value?.status === "calling" ? A() : j();
|
|
8672
|
+
}, _m = async (e, t, n) => {
|
|
8673
|
+
await M(), isAutoAnswerEnabled() && a.value.get(e) === t && t.state === SessionState.Initial && await Am(n);
|
|
8674
|
+
}, G = (e) => {
|
|
8668
8675
|
o.volume = e / 100;
|
|
8669
|
-
},
|
|
8676
|
+
}, K = async (e) => {
|
|
8670
8677
|
typeof o.setSinkId == "function" && await o.setSinkId(e);
|
|
8671
|
-
},
|
|
8678
|
+
}, vm = async (t) => {
|
|
8672
8679
|
if (!t) return;
|
|
8673
8680
|
let n = [...a.value.entries()].flatMap(([e, t]) => {
|
|
8674
8681
|
let n = t.sessionDescriptionHandler, i = n?.peerConnection?.getSenders().find((e) => e.track?.kind === "audio");
|
|
@@ -8686,7 +8693,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8686
8693
|
let i = [], o = [];
|
|
8687
8694
|
try {
|
|
8688
8695
|
for (let { sender: e } of n) {
|
|
8689
|
-
let n = await navigator.mediaDevices.getUserMedia(
|
|
8696
|
+
let n = await navigator.mediaDevices.getUserMedia(Y(!1, t));
|
|
8690
8697
|
i.push(n);
|
|
8691
8698
|
let [a] = n.getAudioTracks(), s = e.track;
|
|
8692
8699
|
if (!a || !s) throw Error("Could not acquire an audio track for the selected microphone");
|
|
@@ -8707,7 +8714,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8707
8714
|
e !== l && d.value?.removeTrack(e);
|
|
8708
8715
|
}), d.value.getTracks().includes(l) || d.value.addTrack(l)));
|
|
8709
8716
|
try {
|
|
8710
|
-
|
|
8717
|
+
B(n, t);
|
|
8711
8718
|
} catch (e) {
|
|
8712
8719
|
console.error("[SipJs] Media-ready callback failed after microphone switch:", e);
|
|
8713
8720
|
}
|
|
@@ -8723,32 +8730,32 @@ const createSipService = (e, t = {}) => {
|
|
|
8723
8730
|
} catch (e) {
|
|
8724
8731
|
await Promise.allSettled(o.map(({ sender: e, previousTrack: t }) => e.replaceTrack(t))), i.forEach((e) => e.getTracks().forEach((e) => e.stop())), console.warn("[SipJs] Failed to switch microphone:", e);
|
|
8725
8732
|
}
|
|
8726
|
-
},
|
|
8733
|
+
}, ym = (e, t) => {
|
|
8727
8734
|
let n = !1, i = e.sessionDescriptionHandler;
|
|
8728
8735
|
return i?.peerConnection && i.peerConnection.getSenders().forEach((e) => {
|
|
8729
8736
|
e.track && e.track.kind === "audio" && (e.track.enabled = t, n = !0);
|
|
8730
8737
|
}), n;
|
|
8731
|
-
},
|
|
8738
|
+
}, bm = (e) => {
|
|
8732
8739
|
let t = !1;
|
|
8733
8740
|
return d.value && d.value.getAudioTracks().forEach((n) => {
|
|
8734
8741
|
n.enabled = e, t = !0;
|
|
8735
8742
|
}), t;
|
|
8736
|
-
},
|
|
8737
|
-
let n = !(t?.isHeld || t?.isMuted), i =
|
|
8743
|
+
}, q = (e, t) => {
|
|
8744
|
+
let n = !(t?.isHeld || t?.isMuted), i = ym(e, n), a = bm(n);
|
|
8738
8745
|
!i && !a && console.warn("[SipJs] No audio tracks found to apply channel audio state");
|
|
8739
|
-
},
|
|
8746
|
+
}, J = (t) => {
|
|
8740
8747
|
for (let [n, i] of a.value.entries()) if (i === t) return e.channels.value.find((e) => e.id === n) || null;
|
|
8741
8748
|
return e.activeChannel.value || null;
|
|
8742
|
-
},
|
|
8749
|
+
}, xm = async (e) => {
|
|
8743
8750
|
let t = e.sessionDescriptionHandler?.peerConnection;
|
|
8744
8751
|
if (!t) return;
|
|
8745
|
-
let n =
|
|
8752
|
+
let n = J(e), i = !(n?.isHeld || n?.isMuted), o = t.getSenders().find((e) => e.track?.kind === "audio");
|
|
8746
8753
|
if (o?.track) {
|
|
8747
|
-
o.track.enabled = i, n &&
|
|
8754
|
+
o.track.enabled = i, n && B(e, n.id);
|
|
8748
8755
|
return;
|
|
8749
8756
|
}
|
|
8750
8757
|
try {
|
|
8751
|
-
let o = await navigator.mediaDevices.getUserMedia(
|
|
8758
|
+
let o = await navigator.mediaDevices.getUserMedia(Y(!1));
|
|
8752
8759
|
if (![...a.value.values()].includes(e)) {
|
|
8753
8760
|
o.getTracks().forEach((e) => e.stop());
|
|
8754
8761
|
return;
|
|
@@ -8759,11 +8766,11 @@ const createSipService = (e, t = {}) => {
|
|
|
8759
8766
|
let l = new MediaStream([s]);
|
|
8760
8767
|
d.value = l;
|
|
8761
8768
|
let u = t.getSenders().find((e) => e.track === null);
|
|
8762
|
-
u ? await u.replaceTrack(s) : t.addTrack(s, l),
|
|
8769
|
+
u ? await u.replaceTrack(s) : t.addTrack(s, l), q(e, n), n && B(e, n.id);
|
|
8763
8770
|
} catch (e) {
|
|
8764
8771
|
console.warn("[SipJs] Failed to recover outbound audio track:", e);
|
|
8765
8772
|
}
|
|
8766
|
-
},
|
|
8773
|
+
}, Y = (e = !1, t = l.value) => {
|
|
8767
8774
|
let n = {
|
|
8768
8775
|
echoCancellation: { ideal: !0 },
|
|
8769
8776
|
noiseSuppression: { ideal: !1 },
|
|
@@ -8774,17 +8781,19 @@ const createSipService = (e, t = {}) => {
|
|
|
8774
8781
|
audio: n,
|
|
8775
8782
|
video: e
|
|
8776
8783
|
};
|
|
8777
|
-
},
|
|
8784
|
+
}, Sm = async () => {
|
|
8778
8785
|
let t = i.value;
|
|
8779
8786
|
t && await t.register({ requestDelegate: {
|
|
8780
8787
|
onAccept: () => {
|
|
8781
|
-
e.setConnected(!0);
|
|
8788
|
+
e.setConnected(!0), T = 0;
|
|
8782
8789
|
},
|
|
8783
|
-
onReject: () => {
|
|
8790
|
+
onReject: (t) => {
|
|
8784
8791
|
e.setConnected(!1);
|
|
8792
|
+
let n = t?.message?.statusCode;
|
|
8793
|
+
n === 401 || n === 403 || n === 404 || Z();
|
|
8785
8794
|
}
|
|
8786
8795
|
} });
|
|
8787
|
-
},
|
|
8796
|
+
}, Cm = async (t) => {
|
|
8788
8797
|
if (!n.value) {
|
|
8789
8798
|
try {
|
|
8790
8799
|
(await navigator.mediaDevices.getUserMedia({ audio: !0 })).getTracks().forEach((e) => e.stop());
|
|
@@ -8805,12 +8814,13 @@ const createSipService = (e, t = {}) => {
|
|
|
8805
8814
|
transportOptions: o,
|
|
8806
8815
|
authorizationUsername: t.authorizationUsername,
|
|
8807
8816
|
authorizationPassword: t.authorizationPassword,
|
|
8808
|
-
|
|
8809
|
-
reconnectionAttempts: 3,
|
|
8817
|
+
reconnectionAttempts: 0,
|
|
8810
8818
|
delegate: {
|
|
8811
8819
|
onConnect: () => {},
|
|
8812
|
-
onDisconnect: () =>
|
|
8813
|
-
|
|
8820
|
+
onDisconnect: () => {
|
|
8821
|
+
e.setConnected(!1), Z();
|
|
8822
|
+
},
|
|
8823
|
+
onInvite: (e) => Om(e)
|
|
8814
8824
|
}
|
|
8815
8825
|
}, l = typeof SharedWorker < "u", u = l;
|
|
8816
8826
|
l && (s.transportConstructor = SharedWorkerTransport, s.transportOptions = {
|
|
@@ -8825,7 +8835,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8825
8835
|
u = !1, console.warn("[SipJs] SharedWorker unavailable, using native WebSocket transport", e), delete s.transportConstructor, s.transportOptions = o, n.value = new UserAgent(s);
|
|
8826
8836
|
}
|
|
8827
8837
|
try {
|
|
8828
|
-
await n.value.start(), i.value = new Registerer(n.value), await
|
|
8838
|
+
await n.value.start(), i.value = new Registerer(n.value), await Sm();
|
|
8829
8839
|
} catch (e) {
|
|
8830
8840
|
if (!u) throw e;
|
|
8831
8841
|
console.warn("[SipJs] SharedWorker connection failed, retrying with native WebSocket", e);
|
|
@@ -8836,9 +8846,9 @@ const createSipService = (e, t = {}) => {
|
|
|
8836
8846
|
} catch (e) {
|
|
8837
8847
|
console.warn("[SipJs] Failed to clean up SharedWorker transport", e);
|
|
8838
8848
|
}
|
|
8839
|
-
delete s.transportConstructor, s.transportOptions = o, n.value = new UserAgent(s), await n.value.start(), i.value = new Registerer(n.value), await
|
|
8849
|
+
delete s.transportConstructor, s.transportOptions = o, n.value = new UserAgent(s), await n.value.start(), i.value = new Registerer(n.value), await Sm();
|
|
8840
8850
|
}
|
|
8841
|
-
|
|
8851
|
+
wm();
|
|
8842
8852
|
} catch (e) {
|
|
8843
8853
|
console.error("[SipJs] Failed to initialize WSS/SIP connection", e);
|
|
8844
8854
|
let t = n.value;
|
|
@@ -8849,11 +8859,11 @@ const createSipService = (e, t = {}) => {
|
|
|
8849
8859
|
}
|
|
8850
8860
|
}
|
|
8851
8861
|
}
|
|
8852
|
-
},
|
|
8862
|
+
}, wm = () => {
|
|
8853
8863
|
b = new AbortController();
|
|
8854
8864
|
let { signal: t } = b, n = Date.now(), i = (e = 1e3) => {
|
|
8855
8865
|
x && clearTimeout(x), x = setTimeout(async () => {
|
|
8856
|
-
x = null, await
|
|
8866
|
+
x = null, await Em();
|
|
8857
8867
|
}, e);
|
|
8858
8868
|
}, a = () => {
|
|
8859
8869
|
if (document.visibilityState === "visible") {
|
|
@@ -8875,8 +8885,22 @@ const createSipService = (e, t = {}) => {
|
|
|
8875
8885
|
console.log("[SipJs] Page frozen"), S &&= (clearInterval(S), null);
|
|
8876
8886
|
}, { signal: t }), document.addEventListener("resume", () => {
|
|
8877
8887
|
console.log("[SipJs] Page resumed"), n = Date.now(), l(), i(1e3);
|
|
8878
|
-
}, { signal: t }), l();
|
|
8879
|
-
},
|
|
8888
|
+
}, { signal: t }), l(), Tm();
|
|
8889
|
+
}, Z = () => {
|
|
8890
|
+
if (w || !n.value) return;
|
|
8891
|
+
let t = RECOVERY_DELAYS_MS[Math.min(T, RECOVERY_DELAYS_MS.length - 1)];
|
|
8892
|
+
w = setTimeout(async () => {
|
|
8893
|
+
if (w = null, !n.value || e.isConnected.value) {
|
|
8894
|
+
T = 0;
|
|
8895
|
+
return;
|
|
8896
|
+
}
|
|
8897
|
+
T++, await Em(), e.isConnected.value || Z();
|
|
8898
|
+
}, t);
|
|
8899
|
+
}, Tm = () => {
|
|
8900
|
+
E && clearInterval(E), E = setInterval(() => {
|
|
8901
|
+
n.value && !e.isConnected.value && Z();
|
|
8902
|
+
}, 3e4);
|
|
8903
|
+
}, Em = async () => {
|
|
8880
8904
|
if (n.value) {
|
|
8881
8905
|
if (!navigator.onLine) {
|
|
8882
8906
|
console.log("[SipJs] Skipping reconnect, device is offline");
|
|
@@ -8888,25 +8912,25 @@ const createSipService = (e, t = {}) => {
|
|
|
8888
8912
|
}
|
|
8889
8913
|
try {
|
|
8890
8914
|
if (n.value.isConnected() || (console.log("[SipJs] Reconnecting..."), await n.value.reconnect()), i.value && n.value.isConnected()) try {
|
|
8891
|
-
await
|
|
8915
|
+
await Sm();
|
|
8892
8916
|
} catch {}
|
|
8893
8917
|
} catch (e) {
|
|
8894
8918
|
console.error("[SipJs] Reconnection failed:", e);
|
|
8895
8919
|
}
|
|
8896
8920
|
}
|
|
8897
|
-
},
|
|
8898
|
-
b?.abort(), b = null, x &&= (clearTimeout(x), null), S &&= (clearInterval(S), null);
|
|
8921
|
+
}, Dm = async () => {
|
|
8922
|
+
b?.abort(), b = null, x &&= (clearTimeout(x), null), S &&= (clearInterval(S), null), E &&= (clearInterval(E), null), w &&= (clearTimeout(w), null), T = 0;
|
|
8899
8923
|
for (let [e, t] of a.value.entries()) {
|
|
8900
8924
|
let n;
|
|
8901
8925
|
try {
|
|
8902
|
-
await Promise.race([
|
|
8926
|
+
await Promise.race([jm(e, t), new Promise((e) => {
|
|
8903
8927
|
n = setTimeout(e, 1500);
|
|
8904
8928
|
})]);
|
|
8905
8929
|
} finally {
|
|
8906
8930
|
n && clearTimeout(n);
|
|
8907
8931
|
}
|
|
8908
8932
|
}
|
|
8909
|
-
|
|
8933
|
+
Hm();
|
|
8910
8934
|
let e = i.value, t = n.value;
|
|
8911
8935
|
if (i.value = null, n.value = null, e) try {
|
|
8912
8936
|
await e.unregister();
|
|
@@ -8918,7 +8942,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8918
8942
|
} catch (e) {
|
|
8919
8943
|
console.warn("[SipJs] UserAgent stop failed:", e);
|
|
8920
8944
|
}
|
|
8921
|
-
},
|
|
8945
|
+
}, Om = (t) => {
|
|
8922
8946
|
console.log("[SipJs] 📞 Llamada entrante recibida"), console.log("[SipJs] Remote Identity URI:", t.remoteIdentity.uri.toString()), console.log("[SipJs] Remote Identity URI user:", t.remoteIdentity.uri.user), console.log("[SipJs] Remote Identity displayName:", t.remoteIdentity.displayName);
|
|
8923
8947
|
let n = e.channels.value.find((e) => e.status === "idle" && !a.value.has(e.id));
|
|
8924
8948
|
if (!n) {
|
|
@@ -8933,21 +8957,21 @@ const createSipService = (e, t = {}) => {
|
|
|
8933
8957
|
remoteNumber: s,
|
|
8934
8958
|
remoteDisplayName: t.remoteIdentity.displayName || void 0,
|
|
8935
8959
|
hasVideo: o
|
|
8936
|
-
}),
|
|
8960
|
+
}), R(t, i, "incoming", s), z(i, "ringing"), U(), e.setActiveChannelId(i), isAutoAnswerEnabled() && _m(i, t, o), t.stateChange.addListener((n) => {
|
|
8937
8961
|
switch (n) {
|
|
8938
8962
|
case SessionState.Terminated:
|
|
8939
|
-
|
|
8963
|
+
gm(i, t);
|
|
8940
8964
|
break;
|
|
8941
8965
|
case SessionState.Established:
|
|
8942
8966
|
if (a.value.get(i) !== t) break;
|
|
8943
8967
|
m.add(i), e.updateChannelState(i, {
|
|
8944
8968
|
status: "connected",
|
|
8945
8969
|
startTime: Date.now()
|
|
8946
|
-
}),
|
|
8970
|
+
}), z(i, "connected"), e.activeChannelId.value === i && (Vm(t), xm(t).then(() => B(t, i))), U();
|
|
8947
8971
|
break;
|
|
8948
8972
|
}
|
|
8949
8973
|
});
|
|
8950
|
-
},
|
|
8974
|
+
}, km = async (t, i = !1) => {
|
|
8951
8975
|
if (!n.value) return;
|
|
8952
8976
|
let o = e.activeChannelId.value;
|
|
8953
8977
|
if (a.value.has(o)) return;
|
|
@@ -8958,71 +8982,71 @@ const createSipService = (e, t = {}) => {
|
|
|
8958
8982
|
}
|
|
8959
8983
|
if (!s) return;
|
|
8960
8984
|
let l = new Inviter(n.value, s, { earlyMedia: _ });
|
|
8961
|
-
a.value.set(o, l),
|
|
8985
|
+
a.value.set(o, l), R(l, o, "outgoing", t), z(o, "dialing"), e.updateChannelState(o, {
|
|
8962
8986
|
status: "calling",
|
|
8963
8987
|
remoteNumber: t,
|
|
8964
8988
|
hasVideo: i
|
|
8965
|
-
}), e.setLastDialedNumber(t),
|
|
8989
|
+
}), e.setLastDialedNumber(t), U(), l.stateChange.addListener((t) => {
|
|
8966
8990
|
switch (t) {
|
|
8967
8991
|
case SessionState.Established:
|
|
8968
8992
|
if (a.value.get(o) !== l) break;
|
|
8969
8993
|
m.add(o), e.channels.value.find((e) => e.id === o)?.status !== "connected" && (e.updateChannelState(o, {
|
|
8970
8994
|
status: "connected",
|
|
8971
8995
|
startTime: Date.now()
|
|
8972
|
-
}),
|
|
8996
|
+
}), z(o, "connected"), Vm(l), xm(l).then(() => B(l, o)), U());
|
|
8973
8997
|
break;
|
|
8974
8998
|
case SessionState.Terminated:
|
|
8975
|
-
|
|
8999
|
+
gm(o, l);
|
|
8976
9000
|
break;
|
|
8977
9001
|
}
|
|
8978
9002
|
});
|
|
8979
9003
|
let u = {
|
|
8980
|
-
sessionDescriptionHandlerOptions: { constraints:
|
|
9004
|
+
sessionDescriptionHandlerOptions: { constraints: Y(i) },
|
|
8981
9005
|
requestDelegate: {
|
|
8982
9006
|
onProgress: (t) => {
|
|
8983
|
-
a.value.get(o) === l && (t.message.statusCode === 180 || t.message.statusCode === 183) && (t.message.body && (e.updateChannelState(o, { hasEarlyMedia: !0 }),
|
|
9007
|
+
a.value.get(o) === l && (t.message.statusCode === 180 || t.message.statusCode === 183) && (t.message.body && (e.updateChannelState(o, { hasEarlyMedia: !0 }), Vm(l)), U());
|
|
8984
9008
|
},
|
|
8985
9009
|
onAccept: (t) => {
|
|
8986
9010
|
a.value.get(o) === l && e.channels.value.find((e) => e.id === o)?.status !== "connected" && (m.add(o), e.updateChannelState(o, {
|
|
8987
9011
|
status: "connected",
|
|
8988
9012
|
startTime: Date.now()
|
|
8989
|
-
}),
|
|
9013
|
+
}), z(o, "connected"), Vm(l), xm(l).then(() => B(l, o)), U());
|
|
8990
9014
|
}
|
|
8991
9015
|
}
|
|
8992
9016
|
};
|
|
8993
9017
|
try {
|
|
8994
9018
|
await l.invite(u);
|
|
8995
9019
|
} catch (e) {
|
|
8996
|
-
throw
|
|
9020
|
+
throw gm(o, l), e;
|
|
8997
9021
|
}
|
|
8998
|
-
},
|
|
9022
|
+
}, Am = async (t = !1) => {
|
|
8999
9023
|
let n = e.activeChannelId.value, i = a.value.get(n);
|
|
9000
9024
|
if (i instanceof Invitation && i.state === SessionState.Initial) {
|
|
9001
|
-
|
|
9025
|
+
k(), e.updateChannelState(n, {
|
|
9002
9026
|
status: "connected",
|
|
9003
9027
|
startTime: Date.now()
|
|
9004
|
-
}),
|
|
9028
|
+
}), U();
|
|
9005
9029
|
for (let [t, n] of a.value.entries()) if (t !== e.activeChannelId.value && n.state === SessionState.Established && !e.channels.value.find((e) => e.id === t)?.isHeld) try {
|
|
9006
9030
|
await Q(n, !0), e.updateChannelState(t, { isHeld: !0 });
|
|
9007
9031
|
} catch (e) {
|
|
9008
9032
|
console.error(`[SipJs] Failed to hold channel ${t}:`, e);
|
|
9009
9033
|
}
|
|
9010
9034
|
let o = { sessionDescriptionHandlerOptions: {
|
|
9011
|
-
constraints:
|
|
9035
|
+
constraints: Y(t),
|
|
9012
9036
|
iceGatheringTimeout: 1e3
|
|
9013
9037
|
} };
|
|
9014
9038
|
try {
|
|
9015
|
-
await i.accept(o),
|
|
9039
|
+
await i.accept(o), U();
|
|
9016
9040
|
} catch (t) {
|
|
9017
9041
|
let i = a.value.get(n);
|
|
9018
9042
|
throw i instanceof Invitation && i.state === SessionState.Initial && (e.updateChannelState(n, {
|
|
9019
9043
|
status: "incoming",
|
|
9020
9044
|
startTime: void 0
|
|
9021
|
-
}),
|
|
9045
|
+
}), U()), t;
|
|
9022
9046
|
}
|
|
9023
9047
|
}
|
|
9024
|
-
},
|
|
9025
|
-
|
|
9048
|
+
}, jm = async (e, t) => {
|
|
9049
|
+
V(e, t);
|
|
9026
9050
|
try {
|
|
9027
9051
|
switch (t.state) {
|
|
9028
9052
|
case SessionState.Initial:
|
|
@@ -9036,40 +9060,40 @@ const createSipService = (e, t = {}) => {
|
|
|
9036
9060
|
} catch (e) {
|
|
9037
9061
|
console.warn("[SipJs] Hangup signaling failed:", e);
|
|
9038
9062
|
} finally {
|
|
9039
|
-
|
|
9063
|
+
H(t), gm(e, t);
|
|
9040
9064
|
}
|
|
9041
|
-
},
|
|
9065
|
+
}, Mm = async () => {
|
|
9042
9066
|
let t = e.activeChannelId.value, n = a.value.get(t);
|
|
9043
|
-
n && await
|
|
9044
|
-
},
|
|
9067
|
+
n && await jm(t, n);
|
|
9068
|
+
}, Nm = () => {
|
|
9045
9069
|
let t = a.value.get(e.activeChannelId.value);
|
|
9046
9070
|
if (!t) return;
|
|
9047
9071
|
let n = !e.isMuted.value;
|
|
9048
|
-
e.setMuted(n),
|
|
9072
|
+
e.setMuted(n), q(t, e.channels.value.find((t) => t.id === e.activeChannelId.value));
|
|
9049
9073
|
}, Q = async (e, t) => {
|
|
9050
9074
|
let n = { sessionDescriptionHandlerOptions: { hold: t } };
|
|
9051
9075
|
await e.invite(n);
|
|
9052
|
-
},
|
|
9076
|
+
}, Pm = async () => {
|
|
9053
9077
|
let t = a.value.get(e.activeChannelId.value);
|
|
9054
9078
|
if (t?.state !== SessionState.Established) return;
|
|
9055
9079
|
let n = !e.isHeld.value;
|
|
9056
9080
|
try {
|
|
9057
|
-
await Q(t, n), e.setHeld(n),
|
|
9081
|
+
await Q(t, n), e.setHeld(n), q(t, e.channels.value.find((t) => t.id === e.activeChannelId.value));
|
|
9058
9082
|
} catch {}
|
|
9059
|
-
},
|
|
9083
|
+
}, Fm = async (t) => {
|
|
9060
9084
|
let n = e.activeChannelId.value;
|
|
9061
9085
|
if (n === t) return;
|
|
9062
9086
|
let i = a.value.get(n), o = a.value.get(t), s = e.channels.value.find((e) => e.id === n), l = e.channels.value.find((e) => e.id === t);
|
|
9063
9087
|
if (i && i.state === SessionState.Established && !s?.isHeld) try {
|
|
9064
|
-
await Q(i, !0), e.updateChannelState(n, { isHeld: !0 }),
|
|
9088
|
+
await Q(i, !0), e.updateChannelState(n, { isHeld: !0 }), q(i, e.channels.value.find((e) => e.id === n));
|
|
9065
9089
|
} catch {}
|
|
9066
|
-
if (e.setActiveChannelId(t),
|
|
9090
|
+
if (e.setActiveChannelId(t), U(), o && o.state === SessionState.Established) {
|
|
9067
9091
|
if (l?.isHeld) try {
|
|
9068
9092
|
await Q(o, !1), e.updateChannelState(t, { isHeld: !1 });
|
|
9069
9093
|
} catch {}
|
|
9070
|
-
|
|
9071
|
-
} else
|
|
9072
|
-
},
|
|
9094
|
+
q(o, e.channels.value.find((e) => e.id === t)), Vm(o);
|
|
9095
|
+
} else Hm();
|
|
9096
|
+
}, Im = (t) => {
|
|
9073
9097
|
if (!/^[0-9*#]$/.test(t)) return;
|
|
9074
9098
|
let n = a.value.get(e.activeChannelId.value);
|
|
9075
9099
|
if (n?.state !== SessionState.Established) return;
|
|
@@ -9084,10 +9108,10 @@ const createSipService = (e, t = {}) => {
|
|
|
9084
9108
|
contentDisposition: "signal"
|
|
9085
9109
|
} } };
|
|
9086
9110
|
n.info(o);
|
|
9087
|
-
},
|
|
9111
|
+
}, Lm = (t, n) => {
|
|
9088
9112
|
let i = e.channels.value.find((e) => e.id === t);
|
|
9089
|
-
!i || i.status !== "connected" || (
|
|
9090
|
-
},
|
|
9113
|
+
!i || i.status !== "connected" || (Vm(n), q(n, i), xm(n), o.play().catch(() => {}));
|
|
9114
|
+
}, $ = async (t) => {
|
|
9091
9115
|
console.log("[SipJs] 🔄 transferCall iniciado"), console.log("[SipJs] Target:", t);
|
|
9092
9116
|
let i = e.activeChannelId.value, o = a.value.get(i);
|
|
9093
9117
|
if (!o) throw console.error("[SipJs] ❌ No hay sesión activa en el canal", i), Error("No active session to transfer");
|
|
@@ -9107,7 +9131,7 @@ const createSipService = (e, t = {}) => {
|
|
|
9107
9131
|
},
|
|
9108
9132
|
onReject: (e) => {
|
|
9109
9133
|
let t = e.message.statusCode;
|
|
9110
|
-
console.error("[SipJs] ❌ Transfer REFER rechazado:", t), console.error("[SipJs] Response completo:", e.message),
|
|
9134
|
+
console.error("[SipJs] ❌ Transfer REFER rechazado:", t), console.error("[SipJs] Response completo:", e.message), Lm(i, o);
|
|
9111
9135
|
}
|
|
9112
9136
|
},
|
|
9113
9137
|
onNotify: (e) => {
|
|
@@ -9130,7 +9154,7 @@ const createSipService = (e, t = {}) => {
|
|
|
9130
9154
|
487: "Transferencia cancelada",
|
|
9131
9155
|
503: "Servicio no disponible - el destino puede estar fuera de línea"
|
|
9132
9156
|
}[t] || `Error en transferencia (código ${t})`;
|
|
9133
|
-
console.warn("[SipJs] 💬", e),
|
|
9157
|
+
console.warn("[SipJs] 💬", e), Lm(i, o);
|
|
9134
9158
|
} else t >= 100 && t < 200 && console.log("[SipJs] 📞 Transferencia en progreso:", t, n);
|
|
9135
9159
|
} else console.warn("[SipJs] ⚠️ No se pudo extraer el código de estado del NOTIFY body");
|
|
9136
9160
|
} else console.warn("[SipJs] ⚠️ NOTIFY sin body");
|
|
@@ -9139,7 +9163,7 @@ const createSipService = (e, t = {}) => {
|
|
|
9139
9163
|
} catch (e) {
|
|
9140
9164
|
throw console.error("[SipJs] ❌ Error en transferCall:", e), console.error("[SipJs] Error type:", e?.constructor?.name), console.error("[SipJs] Error message:", e instanceof Error ? e.message : String(e)), console.error("[SipJs] Error stack:", e instanceof Error ? e.stack : "N/A"), e;
|
|
9141
9165
|
}
|
|
9142
|
-
},
|
|
9166
|
+
}, Rm = async (t) => {
|
|
9143
9167
|
console.log("[SipJs] 🔄 startAttendedTransfer iniciado"), console.log("[SipJs] Target:", t);
|
|
9144
9168
|
let n = e.activeChannelId.value, i = a.value.get(n);
|
|
9145
9169
|
if (console.log("[SipJs] Canal original:", n), console.log("[SipJs] Sesión original:", i?.state), !i || i.state !== SessionState.Established) throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"), Error("No established call to transfer");
|
|
@@ -9152,7 +9176,7 @@ const createSipService = (e, t = {}) => {
|
|
|
9152
9176
|
}
|
|
9153
9177
|
console.log("[SipJs] 🔄 Cambiando al canal de consulta:", o.id), e.setActiveChannelId(o.id);
|
|
9154
9178
|
try {
|
|
9155
|
-
console.log("[SipJs] 📞 Iniciando llamada de consulta a:", t), await
|
|
9179
|
+
console.log("[SipJs] 📞 Iniciando llamada de consulta a:", t), await km(t, !1), console.log("[SipJs] ✅ Llamada de consulta iniciada"), e.setTransferInProgress({
|
|
9156
9180
|
originalChannelId: n,
|
|
9157
9181
|
consultationChannelId: o.id,
|
|
9158
9182
|
targetNumber: t
|
|
@@ -9160,7 +9184,7 @@ const createSipService = (e, t = {}) => {
|
|
|
9160
9184
|
} catch (t) {
|
|
9161
9185
|
throw console.error("[SipJs] ❌ Failed to start consultation call:", t), console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."), e.setActiveChannelId(n), await Q(i, !1).catch(() => {}), e.updateChannelState(n, { isHeld: !1 }), Error("Failed to initiate consultation call");
|
|
9162
9186
|
}
|
|
9163
|
-
},
|
|
9187
|
+
}, zm = async () => {
|
|
9164
9188
|
console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");
|
|
9165
9189
|
let t = e.transferInProgress.value;
|
|
9166
9190
|
if (!t) throw console.error("[SipJs] ❌ No hay transferencia en progreso"), Error("No transfer in progress");
|
|
@@ -9188,7 +9212,7 @@ const createSipService = (e, t = {}) => {
|
|
|
9188
9212
|
if (n && n[1]) {
|
|
9189
9213
|
let a = parseInt(n[1]);
|
|
9190
9214
|
a >= 200 && a < 300 ? setTimeout(() => {
|
|
9191
|
-
|
|
9215
|
+
jm(t.originalChannelId, i), jm(t.consultationChannelId, o), e.setTransferInProgress(null);
|
|
9192
9216
|
}, 500) : a >= 400 && (console.error("[SipJs] Attended transfer failed with status:", a), e.setTransferInProgress(null));
|
|
9193
9217
|
}
|
|
9194
9218
|
}
|
|
@@ -9203,13 +9227,13 @@ const createSipService = (e, t = {}) => {
|
|
|
9203
9227
|
} catch (e) {
|
|
9204
9228
|
throw console.error("[SipJs] Attended transfer failed:", e), e;
|
|
9205
9229
|
}
|
|
9206
|
-
},
|
|
9230
|
+
}, Bm = async () => {
|
|
9207
9231
|
let t = e.transferInProgress.value;
|
|
9208
9232
|
if (!t) throw Error("No transfer in progress");
|
|
9209
9233
|
console.log("[SipJs] Canceling attended transfer...");
|
|
9210
9234
|
let n = a.value.get(t.originalChannelId), i = a.value.get(t.consultationChannelId);
|
|
9211
9235
|
if (i) try {
|
|
9212
|
-
await
|
|
9236
|
+
await jm(t.consultationChannelId, i), console.log("[SipJs] Consultation call ended");
|
|
9213
9237
|
} catch (e) {
|
|
9214
9238
|
console.warn("[SipJs] Error ending consultation:", e);
|
|
9215
9239
|
}
|
|
@@ -9219,7 +9243,7 @@ const createSipService = (e, t = {}) => {
|
|
|
9219
9243
|
console.warn("[SipJs] Error resuming original call:", e);
|
|
9220
9244
|
}
|
|
9221
9245
|
e.setTransferInProgress(null);
|
|
9222
|
-
},
|
|
9246
|
+
}, Vm = (e) => {
|
|
9223
9247
|
let t = e.sessionDescriptionHandler;
|
|
9224
9248
|
if (!t) {
|
|
9225
9249
|
console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");
|
|
@@ -9232,8 +9256,8 @@ const createSipService = (e, t = {}) => {
|
|
|
9232
9256
|
}
|
|
9233
9257
|
if (u.value === n) return;
|
|
9234
9258
|
o.pause(), o.srcObject = null, v?.abort(), v = new AbortController(), u.value = n, d.value = t.localMediaStream ?? null;
|
|
9235
|
-
let i =
|
|
9236
|
-
|
|
9259
|
+
let i = J(e);
|
|
9260
|
+
q(e, i), i && B(e, i.id);
|
|
9237
9261
|
let a = (e) => {
|
|
9238
9262
|
y?.abort(), y = new AbortController();
|
|
9239
9263
|
let { signal: t } = y, n = () => {
|
|
@@ -9246,34 +9270,34 @@ const createSipService = (e, t = {}) => {
|
|
|
9246
9270
|
}, { signal: t }), n();
|
|
9247
9271
|
};
|
|
9248
9272
|
n.addEventListener("addtrack", (t) => {
|
|
9249
|
-
t.track.kind === "audio" && (o.srcObject = null, o.srcObject = n, a(t.track), i &&
|
|
9273
|
+
t.track.kind === "audio" && (o.srcObject = null, o.srcObject = n, a(t.track), i && B(e, i.id));
|
|
9250
9274
|
}, { signal: v.signal });
|
|
9251
9275
|
let [s] = n.getTracks();
|
|
9252
|
-
s && (o.srcObject = n, a(s), i &&
|
|
9253
|
-
},
|
|
9276
|
+
s && (o.srcObject = n, a(s), i && B(e, i.id));
|
|
9277
|
+
}, Hm = () => {
|
|
9254
9278
|
y?.abort(), y = null, v?.abort(), v = null, o.pause(), o.srcObject = null, u.value = null, d.value = null;
|
|
9255
9279
|
};
|
|
9256
9280
|
return {
|
|
9257
|
-
initUserAgent:
|
|
9258
|
-
stop:
|
|
9259
|
-
makeCall:
|
|
9260
|
-
answerCall:
|
|
9261
|
-
hangupCall:
|
|
9262
|
-
toggleMute:
|
|
9263
|
-
toggleHold:
|
|
9264
|
-
sendDTMF:
|
|
9265
|
-
transferCall:
|
|
9266
|
-
startAttendedTransfer:
|
|
9267
|
-
completeAttendedTransfer:
|
|
9268
|
-
cancelAttendedTransfer:
|
|
9269
|
-
switchChannel:
|
|
9270
|
-
extension:
|
|
9271
|
-
setVolume:
|
|
9272
|
-
setNotificationVolume:
|
|
9273
|
-
setRingtoneVolume:
|
|
9274
|
-
setRingtoneTone:
|
|
9275
|
-
setOutputDevice:
|
|
9276
|
-
setInputDevice:
|
|
9281
|
+
initUserAgent: Cm,
|
|
9282
|
+
stop: Dm,
|
|
9283
|
+
makeCall: km,
|
|
9284
|
+
answerCall: Am,
|
|
9285
|
+
hangupCall: Mm,
|
|
9286
|
+
toggleMute: Nm,
|
|
9287
|
+
toggleHold: Pm,
|
|
9288
|
+
sendDTMF: Im,
|
|
9289
|
+
transferCall: $,
|
|
9290
|
+
startAttendedTransfer: Rm,
|
|
9291
|
+
completeAttendedTransfer: zm,
|
|
9292
|
+
cancelAttendedTransfer: Bm,
|
|
9293
|
+
switchChannel: Fm,
|
|
9294
|
+
extension: D,
|
|
9295
|
+
setVolume: G,
|
|
9296
|
+
setNotificationVolume: N,
|
|
9297
|
+
setRingtoneVolume: P,
|
|
9298
|
+
setRingtoneTone: F,
|
|
9299
|
+
setOutputDevice: K,
|
|
9300
|
+
setInputDevice: vm,
|
|
9277
9301
|
remoteStream: u,
|
|
9278
9302
|
localStream: d
|
|
9279
9303
|
};
|
|
@@ -16339,19 +16363,19 @@ var IconDelete_default = { render: render$1 }, _hoisted_1$7 = ["data-call-status
|
|
|
16339
16363
|
p(e);
|
|
16340
16364
|
}, L = async () => {
|
|
16341
16365
|
await o(), await D.onHangup?.();
|
|
16342
|
-
},
|
|
16366
|
+
}, z = () => {
|
|
16343
16367
|
if (D.onReject) {
|
|
16344
16368
|
D.onReject();
|
|
16345
16369
|
return;
|
|
16346
16370
|
}
|
|
16347
16371
|
o();
|
|
16348
|
-
},
|
|
16372
|
+
}, B = computed(() => {
|
|
16349
16373
|
let e = {};
|
|
16350
16374
|
return i.channels.forEach((t) => {
|
|
16351
16375
|
let n = t.status === "connected" || t.status === "calling" || t.status === "incoming";
|
|
16352
16376
|
e[t.id] = n ? "wp:text-[var(--color-red)]" : "wp:text-[var(--color-avaible)]";
|
|
16353
16377
|
}), e;
|
|
16354
|
-
}),
|
|
16378
|
+
}), hm = computed(() => B.value[i.activeChannelId] ?? "wp:text-[var(--p-primary-color)]");
|
|
16355
16379
|
return (e, t) => (openBlock(), createElementBlock("div", {
|
|
16356
16380
|
class: "webphone-actions wp:flex wp:justify-center wp:items-center wp:gap-2 wp:px-4 wp:relative wp:mb-4",
|
|
16357
16381
|
"data-call-status": unref(i).callStatus
|
|
@@ -16374,7 +16398,7 @@ var IconDelete_default = { render: render$1 }, _hoisted_1$7 = ["data-call-status
|
|
|
16374
16398
|
"aria-label": "Video Call",
|
|
16375
16399
|
class: "webphone-actions__button webphone-actions__button--video wp:w-full wp:px-4 wp:bg-transparent wp:border wp:border-primary wp:hover:bg-[var(--p-primary-color)]/8"
|
|
16376
16400
|
}, {
|
|
16377
|
-
default: withCtx(() => [createVNode(unref(videocall_icon_default), { class: normalizeClass(["webphone-actions__button-icon wp:size-6 wp:text-primary wp:dark:text-white",
|
|
16401
|
+
default: withCtx(() => [createVNode(unref(videocall_icon_default), { class: normalizeClass(["webphone-actions__button-icon wp:size-6 wp:text-primary wp:dark:text-white", hm.value]) }, null, 8, ["class"]), t[13] ||= createElementVNode("span", { class: "webphone-actions__button-label wp:w-full wp:text-primary wp:text-xs wp:dark:text-white" }, " Video llamada a extensiones ", -1)]),
|
|
16378
16402
|
_: 1
|
|
16379
16403
|
})) : createCommentVNode("", !0)])) : createCommentVNode("", !0),
|
|
16380
16404
|
unref(i).callStatus === "incoming" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
@@ -16402,7 +16426,7 @@ var IconDelete_default = { render: render$1 }, _hoisted_1$7 = ["data-call-status
|
|
|
16402
16426
|
createVNode(unref(Button_default), {
|
|
16403
16427
|
variant: "destructive",
|
|
16404
16428
|
size: "icon",
|
|
16405
|
-
onClick:
|
|
16429
|
+
onClick: z,
|
|
16406
16430
|
"aria-label": "Reject",
|
|
16407
16431
|
class: "webphone-actions__button webphone-actions__button--hangup webphone-actions__button--reject wp:w-12 wp:h-12 wp:rounded-full wp:border-0 wp:bg-gradient-to-r wp:from-destructive/60 wp:to-destructive/90 wp:hover:from-destructive/70 wp:hover:to-destructive/95"
|
|
16408
16432
|
}, {
|
|
@@ -16771,12 +16795,12 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
16771
16795
|
useIntervalFn(() => {
|
|
16772
16796
|
L.value = Date.now();
|
|
16773
16797
|
}, 1e3);
|
|
16774
|
-
let
|
|
16798
|
+
let z = computed(() => {
|
|
16775
16799
|
let e = p.value?.startTime, t = p.value?.status || "idle";
|
|
16776
16800
|
if (!e || t !== "connected") return "00:00:00";
|
|
16777
16801
|
let n = Math.floor((L.value - e) / 1e3);
|
|
16778
16802
|
return n < 0 ? "00:00:00" : `${Math.floor(n / 3600).toString().padStart(2, "0")}:${Math.floor(n % 3600 / 60).toString().padStart(2, "0")}:${(n % 60).toString().padStart(2, "0")}`;
|
|
16779
|
-
}),
|
|
16803
|
+
}), B = computed(() => {
|
|
16780
16804
|
if (!o.isOnline) return "Sin internet";
|
|
16781
16805
|
if (!t.isConnected) return "Sin conexión";
|
|
16782
16806
|
let e = p.value, n = e?.status || "idle";
|
|
@@ -16807,11 +16831,11 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
16807
16831
|
(p.value?.status || "idle") === "connected" ? (openBlock(), createElementBlock("div", {
|
|
16808
16832
|
key: 0,
|
|
16809
16833
|
class: normalizeClass([_.value, "webphone-display__connected-status wp:w-full wp:flex wp:items-center wp:justify-between wp:gap-2 wp:text-3xl wp:font-light wp:mb-5"])
|
|
16810
|
-
}, [createElementVNode("div", _hoisted_2$4, [createVNode(unref(icon_phone_default), { class: "webphone-display__connected-status-icon wp:w-4 wp:h-4" }), i[3] ||= createElementVNode("span", { class: "webphone-display__connected-status-text wp:text-sm wp:montserrat wp:font-medium" }, "En llamada", -1)]), createElementVNode("span", _hoisted_3$4, toDisplayString(
|
|
16834
|
+
}, [createElementVNode("div", _hoisted_2$4, [createVNode(unref(icon_phone_default), { class: "webphone-display__connected-status-icon wp:w-4 wp:h-4" }), i[3] ||= createElementVNode("span", { class: "webphone-display__connected-status-text wp:text-sm wp:montserrat wp:font-medium" }, "En llamada", -1)]), createElementVNode("span", _hoisted_3$4, toDisplayString(z.value), 1)], 2)) : createCommentVNode("", !0),
|
|
16811
16835
|
o.user ? (openBlock(), createElementBlock("span", {
|
|
16812
16836
|
key: 1,
|
|
16813
16837
|
class: normalizeClass([_.value, "webphone-display__user wp:font-bold wp:text-lg wp:flex wp:items-center wp:gap-1 wp:transition-colors wp:duration-300"])
|
|
16814
|
-
}, [createElementVNode("div", _hoisted_4$4, [createVNode(unref(icon_phone_default), { class: "webphone-display__user-icon wp:size-6 wp:shrink-0 montserrat" }), createTextVNode(" " + toDisplayString(o.user), 1)]), createElementVNode("div", { class: normalizeClass(["webphone-display__status-text wp:font-semibold wp:tracking-wider wp:text-sm wp:text-[var(--color-primary)] montserrat", _.value]) }, toDisplayString(
|
|
16838
|
+
}, [createElementVNode("div", _hoisted_4$4, [createVNode(unref(icon_phone_default), { class: "webphone-display__user-icon wp:size-6 wp:shrink-0 montserrat" }), createTextVNode(" " + toDisplayString(o.user), 1)]), createElementVNode("div", { class: normalizeClass(["webphone-display__status-text wp:font-semibold wp:tracking-wider wp:text-sm wp:text-[var(--color-primary)] montserrat", _.value]) }, toDisplayString(B.value), 3)], 2)) : createCommentVNode("", !0),
|
|
16815
16839
|
(p.value?.status || "idle") === "idle" && o.allowInput ? (openBlock(), createElementBlock("div", _hoisted_5$4, [createElementVNode("div", {
|
|
16816
16840
|
class: "webphone-display__dialer-container wp:relative wp:w-full wp:max-w-80",
|
|
16817
16841
|
ref_key: "containerRef",
|
|
@@ -17407,7 +17431,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17407
17431
|
classic: "original",
|
|
17408
17432
|
"original-loud": "aurora",
|
|
17409
17433
|
"original-intense": "resonancia"
|
|
17410
|
-
},
|
|
17434
|
+
}, z = async () => {
|
|
17411
17435
|
try {
|
|
17412
17436
|
await navigator.mediaDevices.getUserMedia({ audio: !0 });
|
|
17413
17437
|
let e = await navigator.mediaDevices.enumerateDevices();
|
|
@@ -17425,7 +17449,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17425
17449
|
} catch (e) {
|
|
17426
17450
|
console.error("Error loading devices", e);
|
|
17427
17451
|
}
|
|
17428
|
-
},
|
|
17452
|
+
}, B = (e) => {
|
|
17429
17453
|
let t = String(e);
|
|
17430
17454
|
D.value = t, v(t);
|
|
17431
17455
|
}, V = (e) => {
|
|
@@ -17441,18 +17465,18 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17441
17465
|
set: (e) => {
|
|
17442
17466
|
j.value = e[0], y(j.value);
|
|
17443
17467
|
}
|
|
17444
|
-
}),
|
|
17468
|
+
}), G = computed({
|
|
17445
17469
|
get: () => [N.value],
|
|
17446
17470
|
set: (e) => {
|
|
17447
17471
|
N.value = e[0] ?? 100, b(N.value);
|
|
17448
17472
|
}
|
|
17449
|
-
}),
|
|
17473
|
+
}), K = (e) => {
|
|
17450
17474
|
F.value = String(e), x(F.value);
|
|
17451
|
-
},
|
|
17475
|
+
}, vm = (e) => {
|
|
17452
17476
|
I.value = e;
|
|
17453
17477
|
};
|
|
17454
17478
|
return onMounted(() => {
|
|
17455
|
-
|
|
17479
|
+
z(), p(k.value), y(j.value), b(N.value), localStorage.removeItem("webphone-custom-ringtone");
|
|
17456
17480
|
let e = L[F.value] ?? F.value;
|
|
17457
17481
|
F.value = [
|
|
17458
17482
|
"original",
|
|
@@ -17479,7 +17503,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17479
17503
|
_: 1
|
|
17480
17504
|
}), createVNode(unref(Select_default), {
|
|
17481
17505
|
modelValue: unref(D),
|
|
17482
|
-
"onUpdate:modelValue": [o[0] ||= (e) => isRef(D) ? D.value = e : null,
|
|
17506
|
+
"onUpdate:modelValue": [o[0] ||= (e) => isRef(D) ? D.value = e : null, B]
|
|
17483
17507
|
}, {
|
|
17484
17508
|
default: withCtx(() => [createVNode(unref(SelectTrigger_default), { class: "wp:w-full" }, {
|
|
17485
17509
|
default: withCtx(() => [createVNode(unref(SelectValue_default), { placeholder: "Select Microphone" })]),
|
|
@@ -17548,8 +17572,8 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17548
17572
|
default: withCtx(() => [...o[12] ||= [createTextVNode("Volumen del tono", -1)]]),
|
|
17549
17573
|
_: 1
|
|
17550
17574
|
}), createElementVNode("span", _hoisted_12$2, toDisplayString(unref(N)) + "%", 1)]), createVNode(unref(Slider_default), {
|
|
17551
|
-
modelValue:
|
|
17552
|
-
"onUpdate:modelValue": o[4] ||= (e) =>
|
|
17575
|
+
modelValue: G.value,
|
|
17576
|
+
"onUpdate:modelValue": o[4] ||= (e) => G.value = e,
|
|
17553
17577
|
max: 100,
|
|
17554
17578
|
step: 1
|
|
17555
17579
|
}, null, 8, ["modelValue"])]),
|
|
@@ -17558,7 +17582,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17558
17582
|
_: 1
|
|
17559
17583
|
}), createVNode(unref(Select_default), {
|
|
17560
17584
|
"model-value": unref(F),
|
|
17561
|
-
"onUpdate:modelValue":
|
|
17585
|
+
"onUpdate:modelValue": K
|
|
17562
17586
|
}, {
|
|
17563
17587
|
default: withCtx(() => [createVNode(unref(SelectTrigger_default), { class: "wp:w-full" }, {
|
|
17564
17588
|
default: withCtx(() => [createVNode(unref(SelectValue_default), { placeholder: "Seleccionar tono" })]),
|
|
@@ -17597,7 +17621,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17597
17621
|
"aria-label": unref(I) ? "Desactivar respuesta automática" : "Activar respuesta automática",
|
|
17598
17622
|
class: normalizeClass(["wp:flex wp:h-7 wp:w-12 wp:shrink-0 wp:cursor-pointer wp:items-center wp:justify-start wp:rounded-full wp:border-0 wp:p-0.5 wp:transition-colors wp:focus-visible:ring-2 wp:focus-visible:ring-primary/50"]),
|
|
17599
17623
|
style: normalizeStyle({ backgroundColor: unref(I) ? "var(--color-primary-500)" : "var(--muted)" }),
|
|
17600
|
-
"onUpdate:modelValue":
|
|
17624
|
+
"onUpdate:modelValue": vm
|
|
17601
17625
|
}, {
|
|
17602
17626
|
default: withCtx(() => [createElementVNode("span", { class: normalizeClass(["wp:pointer-events-none wp:block wp:h-6 wp:w-6 wp:shrink-0 wp:rounded-full wp:bg-white wp:shadow-sm wp:transition-transform", unref(I) ? "wp:translate-x-5" : "wp:translate-x-0"]) }, null, 2)]),
|
|
17603
17627
|
_: 1
|
|
@@ -18011,14 +18035,14 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18011
18035
|
onMounted(() => {
|
|
18012
18036
|
o.value = "documentPictureInPicture" in window, document.addEventListener("visibilitychange", y), window.addEventListener("blur", b);
|
|
18013
18037
|
}), onUnmounted(() => {
|
|
18014
|
-
document.removeEventListener("visibilitychange", y), window.removeEventListener("blur", b), g &&= (clearTimeout(g), null), S(),
|
|
18038
|
+
document.removeEventListener("visibilitychange", y), window.removeEventListener("blur", b), g &&= (clearTimeout(g), null), S(), z();
|
|
18015
18039
|
});
|
|
18016
18040
|
let _ = () => {
|
|
18017
18041
|
let e = i.callStatus !== "idle", t = document.hidden || !document.hasFocus();
|
|
18018
18042
|
return i.autoOpenOnBlur !== !1 && e && o.value && t && !l.value && !u.value;
|
|
18019
18043
|
}, v = () => {
|
|
18020
18044
|
_() && (g && clearTimeout(g), g = setTimeout(() => {
|
|
18021
|
-
_() &&
|
|
18045
|
+
_() && R();
|
|
18022
18046
|
}, 120));
|
|
18023
18047
|
}, y = () => {
|
|
18024
18048
|
v();
|
|
@@ -18035,9 +18059,9 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18035
18059
|
return `${t.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}`;
|
|
18036
18060
|
};
|
|
18037
18061
|
watch(() => i.callStatus, (e, t) => {
|
|
18038
|
-
e === "connected" && t !== "connected" ? x() : e === "idle" && t !== "idle" && (S(), l.value &&
|
|
18062
|
+
e === "connected" && t !== "connected" ? x() : e === "idle" && t !== "idle" && (S(), l.value && z());
|
|
18039
18063
|
}, { immediate: !0 }), watch(() => i.isConnected, (e) => {
|
|
18040
|
-
!e && l.value && (S(),
|
|
18064
|
+
!e && l.value && (S(), z());
|
|
18041
18065
|
}), watch(() => [
|
|
18042
18066
|
i.callStatus,
|
|
18043
18067
|
i.isMuted,
|
|
@@ -18111,7 +18135,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18111
18135
|
n.className = "pip-btn pip-btn-answer", n.title = "Contestar", n.innerHTML = E.phone, n.onclick = () => a("answer", !1), t.appendChild(n);
|
|
18112
18136
|
let o = e.createElement("button");
|
|
18113
18137
|
o.className = "pip-btn pip-btn-hangup", o.title = "Rechazar", o.innerHTML = E.phoneOff, o.onclick = () => {
|
|
18114
|
-
a("hangup"),
|
|
18138
|
+
a("hangup"), z();
|
|
18115
18139
|
}, t.appendChild(o);
|
|
18116
18140
|
} else if (i.callStatus === "connected") {
|
|
18117
18141
|
let n = e.createElement("button");
|
|
@@ -18122,12 +18146,12 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18122
18146
|
s.className = "pip-btn pip-btn-transfer", s.title = "Transferir", s.innerHTML = E.transfer, s.onclick = () => a("transfer"), t.appendChild(s);
|
|
18123
18147
|
let l = e.createElement("button");
|
|
18124
18148
|
l.className = "pip-btn pip-btn-hangup", l.title = "Colgar", l.innerHTML = E.phoneOff, l.onclick = () => {
|
|
18125
|
-
a("hangup"),
|
|
18149
|
+
a("hangup"), z();
|
|
18126
18150
|
}, t.appendChild(l);
|
|
18127
18151
|
} else if (i.callStatus === "calling") {
|
|
18128
18152
|
let n = e.createElement("button");
|
|
18129
18153
|
n.className = "pip-btn pip-btn-hangup", n.title = "Cancelar", n.innerHTML = E.phoneOff, n.onclick = () => {
|
|
18130
|
-
a("hangup"),
|
|
18154
|
+
a("hangup"), z();
|
|
18131
18155
|
}, t.appendChild(n);
|
|
18132
18156
|
}
|
|
18133
18157
|
}
|
|
@@ -18143,7 +18167,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18143
18167
|
}, 1e3));
|
|
18144
18168
|
}, L = () => {
|
|
18145
18169
|
m &&= (clearInterval(m), null);
|
|
18146
|
-
},
|
|
18170
|
+
}, R = async () => {
|
|
18147
18171
|
if (!(!o.value || l.value || u.value)) {
|
|
18148
18172
|
u.value = !0;
|
|
18149
18173
|
try {
|
|
@@ -18163,14 +18187,14 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18163
18187
|
u.value = !1;
|
|
18164
18188
|
}
|
|
18165
18189
|
}
|
|
18166
|
-
},
|
|
18190
|
+
}, z = () => {
|
|
18167
18191
|
L(), d.value && (d.value.close(), d.value = null, l.value = !1, a("update:active", !1));
|
|
18168
18192
|
};
|
|
18169
18193
|
return t({
|
|
18170
|
-
open:
|
|
18171
|
-
close:
|
|
18194
|
+
open: R,
|
|
18195
|
+
close: z,
|
|
18172
18196
|
toggle: () => {
|
|
18173
|
-
l.value ?
|
|
18197
|
+
l.value ? z() : R();
|
|
18174
18198
|
},
|
|
18175
18199
|
isActive: l,
|
|
18176
18200
|
isSupported: o,
|
|
@@ -18273,45 +18297,45 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18273
18297
|
}
|
|
18274
18298
|
e !== "idle" && x.isKeypadVisible && x.toggleKeypad();
|
|
18275
18299
|
});
|
|
18276
|
-
let
|
|
18300
|
+
let G = computed(() => x.channels.find((e) => e.id === x.activeChannelId) ?? null), K = (e) => {
|
|
18277
18301
|
if (!e) return "";
|
|
18278
18302
|
let t = e.trim(), n = t.startsWith("+"), i = t.replace(/[^\d]/g, "");
|
|
18279
18303
|
return n ? `+${i}` : i;
|
|
18280
|
-
},
|
|
18281
|
-
let e =
|
|
18304
|
+
}, vm = computed(() => {
|
|
18305
|
+
let e = G.value?.remoteNumber || x.remoteNumber, t = K(e), n = o.contacts.find((e) => K(e.number) === t);
|
|
18282
18306
|
return n?.name ? o.maskNumber && /^[+\d\s().*#-]+$/.test(n.name.trim()) ? maskPhoneNumber(n.name, o.extensions) : n.name : o.maskNumber && e ? maskPhoneNumber(e, o.extensions) : e || "Llamada";
|
|
18283
18307
|
}), ym = computed(() => {
|
|
18284
|
-
let e =
|
|
18308
|
+
let e = G.value?.remoteNumber || x.remoteNumber;
|
|
18285
18309
|
return o.maskNumber ? maskPhoneNumber(e, o.extensions) : e;
|
|
18286
|
-
}),
|
|
18287
|
-
Dm.value &&
|
|
18288
|
-
},
|
|
18310
|
+
}), bm = computed(() => (U.value, !!G.value?.hasVideo || W(E.value) || W(D.value))), { isOnline: q } = useNetwork(), J = computed(() => !q.value), Y = ref(null), Z = ref(!1), Dm = computed(() => o.enablePictureInPicture), Om = () => {
|
|
18311
|
+
Dm.value && Y.value?.toggle();
|
|
18312
|
+
}, km = async (e, t) => {
|
|
18289
18313
|
try {
|
|
18290
18314
|
t === "blind" ? await S.transferCall(e) : await S.startAttendedTransfer(e);
|
|
18291
18315
|
} catch (e) {
|
|
18292
18316
|
console.error("[WebPhone] Transfer error:", e), alert(e instanceof Error ? e.message : "Transfer failed. Please try again.");
|
|
18293
18317
|
}
|
|
18294
|
-
},
|
|
18318
|
+
}, Am = async () => {
|
|
18295
18319
|
try {
|
|
18296
18320
|
await S.completeAttendedTransfer();
|
|
18297
18321
|
} catch (e) {
|
|
18298
18322
|
console.error("[WebPhone] Complete transfer error:", e), alert(e instanceof Error ? e.message : "Failed to complete transfer.");
|
|
18299
18323
|
}
|
|
18300
|
-
},
|
|
18324
|
+
}, jm = async () => {
|
|
18301
18325
|
try {
|
|
18302
18326
|
await S.cancelAttendedTransfer();
|
|
18303
18327
|
} catch (e) {
|
|
18304
18328
|
console.error("[WebPhone] Cancel transfer error:", e), alert(e instanceof Error ? e.message : "Failed to cancel transfer.");
|
|
18305
18329
|
}
|
|
18306
|
-
}, jm = (e) => {
|
|
18307
|
-
x.keypadValue = e, S.makeCall(e);
|
|
18308
18330
|
}, Mm = (e) => {
|
|
18331
|
+
x.keypadValue = e, S.makeCall(e);
|
|
18332
|
+
}, Nm = (e) => {
|
|
18309
18333
|
if (o.onAnswer) {
|
|
18310
18334
|
o.onAnswer(e);
|
|
18311
18335
|
return;
|
|
18312
18336
|
}
|
|
18313
18337
|
S.answerCall(e);
|
|
18314
|
-
},
|
|
18338
|
+
}, Q = async () => {
|
|
18315
18339
|
await S.hangupCall(), await o.onHangup?.();
|
|
18316
18340
|
}, Pm = () => {
|
|
18317
18341
|
if (o.onReject) {
|
|
@@ -18320,14 +18344,14 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18320
18344
|
}
|
|
18321
18345
|
S.hangupCall();
|
|
18322
18346
|
}, Fm = () => {
|
|
18323
|
-
j.value = !0,
|
|
18347
|
+
j.value = !0, Y.value?.close(), window.focus();
|
|
18324
18348
|
}, Im = () => {
|
|
18325
18349
|
if (!Dm.value) return !1;
|
|
18326
18350
|
let e = x.callStatus !== "idle", t = document.hidden || !document.hasFocus();
|
|
18327
18351
|
return e && t && !Z.value;
|
|
18328
18352
|
}, $ = () => {
|
|
18329
18353
|
window.setTimeout(() => {
|
|
18330
|
-
Im() &&
|
|
18354
|
+
Im() && Y.value?.open();
|
|
18331
18355
|
}, 150);
|
|
18332
18356
|
};
|
|
18333
18357
|
watchEffect(() => {
|
|
@@ -18358,15 +18382,15 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18358
18382
|
"[role=\"button\"]",
|
|
18359
18383
|
"[role=\"radio\"]",
|
|
18360
18384
|
"[data-no-drag]"
|
|
18361
|
-
].join(", "),
|
|
18385
|
+
].join(", "), Vm = () => {
|
|
18362
18386
|
let e = window.innerWidth < 640, t = window.innerWidth < 1024, n = 360;
|
|
18363
18387
|
return e ? n = window.innerWidth * .9 : t && (n = 340), {
|
|
18364
18388
|
x: Math.max(0, (window.innerWidth - n) / 2),
|
|
18365
18389
|
y: e ? 30 : 80
|
|
18366
18390
|
};
|
|
18367
|
-
}, { x:
|
|
18391
|
+
}, { x: Hm, y: Um, style: Wm } = useDraggable(N, {
|
|
18368
18392
|
initialValue: computed(() => {
|
|
18369
|
-
let e =
|
|
18393
|
+
let e = Vm();
|
|
18370
18394
|
return {
|
|
18371
18395
|
x: o.position.x ?? e.x,
|
|
18372
18396
|
y: o.position.y ?? e.y
|
|
@@ -18379,10 +18403,10 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18379
18403
|
}
|
|
18380
18404
|
});
|
|
18381
18405
|
watch(() => o.position, (e) => {
|
|
18382
|
-
let t =
|
|
18383
|
-
|
|
18406
|
+
let t = Vm();
|
|
18407
|
+
Hm.value = e.x ?? t.x, Um.value = e.y ?? t.y;
|
|
18384
18408
|
}, { deep: !0 });
|
|
18385
|
-
let
|
|
18409
|
+
let Gm = [
|
|
18386
18410
|
{
|
|
18387
18411
|
label: "Canal 1",
|
|
18388
18412
|
value: 0
|
|
@@ -18395,36 +18419,36 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18395
18419
|
label: "Canal 3",
|
|
18396
18420
|
value: 2
|
|
18397
18421
|
}
|
|
18398
|
-
],
|
|
18422
|
+
], Km = ref(!1), qm = computed({
|
|
18399
18423
|
get: () => x.activeChannelId.toString(),
|
|
18400
18424
|
set: async (e) => {
|
|
18401
|
-
if (!
|
|
18402
|
-
|
|
18425
|
+
if (!J.value && e && !Km.value) {
|
|
18426
|
+
Km.value = !0;
|
|
18403
18427
|
try {
|
|
18404
18428
|
await T(parseInt(e));
|
|
18405
18429
|
} finally {
|
|
18406
|
-
|
|
18430
|
+
Km.value = !1;
|
|
18407
18431
|
}
|
|
18408
18432
|
}
|
|
18409
18433
|
}
|
|
18410
|
-
}),
|
|
18434
|
+
}), Jm = (e) => {
|
|
18411
18435
|
let t = x.channels.find((t) => t.id === e);
|
|
18412
18436
|
return t ? t.status === "connected" || t.status === "calling" || t.status === "incoming" : !1;
|
|
18413
|
-
},
|
|
18437
|
+
}, Ym = (e) => {
|
|
18414
18438
|
let t = x.channels.find((t) => t.id === e);
|
|
18415
18439
|
return t ? t.isHeld || t.status === "held" : !1;
|
|
18416
|
-
}, Ym = (e) => {
|
|
18417
|
-
Y.value || (Km.value = e.toString());
|
|
18418
18440
|
}, Xm = (e) => {
|
|
18419
|
-
|
|
18441
|
+
J.value || (qm.value = e.toString());
|
|
18442
|
+
}, Zm = (e) => {
|
|
18443
|
+
if (!J.value && ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "h" && (e.preventDefault(), k.value = !0), (e.metaKey || e.ctrlKey) && e.key === "," && (e.preventDefault(), O.value = !0), (e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k" && (e.preventDefault(), x.toggleKeypad()), (e.metaKey || e.ctrlKey) && [
|
|
18420
18444
|
"1",
|
|
18421
18445
|
"2",
|
|
18422
18446
|
"3"
|
|
18423
18447
|
].includes(e.key))) {
|
|
18424
18448
|
e.preventDefault();
|
|
18425
18449
|
let t = parseInt(e.key) - 1;
|
|
18426
|
-
|
|
18427
|
-
|
|
18450
|
+
Km.value || (Km.value = !0, T(t).finally(() => {
|
|
18451
|
+
Km.value = !1;
|
|
18428
18452
|
}));
|
|
18429
18453
|
}
|
|
18430
18454
|
};
|
|
@@ -18433,40 +18457,40 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18433
18457
|
}), watch(() => x.isConnected, (e) => {
|
|
18434
18458
|
v.value && a.set(v.value, e);
|
|
18435
18459
|
}, { immediate: !0 }), watch(Dm, (e) => {
|
|
18436
|
-
!e && Z.value &&
|
|
18460
|
+
!e && Z.value && Y.value?.close();
|
|
18437
18461
|
});
|
|
18438
|
-
let
|
|
18439
|
-
|
|
18462
|
+
let Qm = ref(!1), $m = async () => {
|
|
18463
|
+
Qm.value || J.value || !o.host || !o.extension || !o.password || (await w({
|
|
18440
18464
|
uri: `sip:${o.extension}@${o.host}`,
|
|
18441
18465
|
transportOptions: { server: _.value },
|
|
18442
18466
|
authorizationUsername: o.extension,
|
|
18443
18467
|
authorizationPassword: o.password,
|
|
18444
18468
|
earlyMedia: o.earlyMedia
|
|
18445
|
-
}), S.extension.value && (
|
|
18469
|
+
}), S.extension.value && (Qm.value = !0, o.mode === "webcall" && o.to && S.makeCall(o.to)));
|
|
18446
18470
|
};
|
|
18447
18471
|
return provide("webphoneRegistration", {
|
|
18448
18472
|
isConnected: computed(() => x.isConnected),
|
|
18449
|
-
register: () =>
|
|
18473
|
+
register: () => $m(),
|
|
18450
18474
|
unregister: async () => {
|
|
18451
|
-
await S.stop(),
|
|
18475
|
+
await S.stop(), Qm.value = !1;
|
|
18452
18476
|
}
|
|
18453
18477
|
}), onMounted(async () => {
|
|
18454
|
-
window.addEventListener("keydown",
|
|
18455
|
-
}), watch(() =>
|
|
18456
|
-
e && await
|
|
18478
|
+
window.addEventListener("keydown", Zm), document.addEventListener("visibilitychange", $), window.addEventListener("blur", $), window.addEventListener("pagehide", $), !(o.mode === "webcall" && (!o.to || !o.logo)) && await $m();
|
|
18479
|
+
}), watch(() => q.value, async (e) => {
|
|
18480
|
+
e && await $m();
|
|
18457
18481
|
}), onUnmounted(() => {
|
|
18458
|
-
S.stop(), window.removeEventListener("keydown",
|
|
18482
|
+
S.stop(), window.removeEventListener("keydown", Zm), document.removeEventListener("visibilitychange", $), window.removeEventListener("blur", $), window.removeEventListener("pagehide", $);
|
|
18459
18483
|
}), (e, t) => (openBlock(), createElementBlock(Fragment, null, [
|
|
18460
18484
|
createElementVNode("div", {
|
|
18461
18485
|
ref_key: "phoneRef",
|
|
18462
18486
|
ref: N,
|
|
18463
|
-
style: normalizeStyle(unref(
|
|
18464
|
-
class: normalizeClass(["webphone webphone-container wp:bg-white wp:dark:bg-neutral-800 wp:rounded-lg wp:shadow-sm wp:inset-shadow-2xs wp:w-[min(92vw,330px)] wp:fixed wp:z-50 wp:select-none wp:[&_button]:cursor-pointer wp:**:[[role=button]]:cursor-pointer",
|
|
18487
|
+
style: normalizeStyle(unref(Wm)),
|
|
18488
|
+
class: normalizeClass(["webphone webphone-container wp:bg-white wp:dark:bg-neutral-800 wp:rounded-lg wp:shadow-sm wp:inset-shadow-2xs wp:w-[min(92vw,330px)] wp:fixed wp:z-50 wp:select-none wp:[&_button]:cursor-pointer wp:**:[[role=button]]:cursor-pointer", J.value ? "wp:opacity-70" : ""]),
|
|
18465
18489
|
"data-mode": o.mode,
|
|
18466
18490
|
"data-call-status": x.callStatus,
|
|
18467
|
-
"data-network-status":
|
|
18491
|
+
"data-network-status": J.value ? "offline" : "online"
|
|
18468
18492
|
}, [
|
|
18469
|
-
|
|
18493
|
+
bm.value && !Z.value ? (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("video", {
|
|
18470
18494
|
ref_key: "remoteVideoRef",
|
|
18471
18495
|
ref: F,
|
|
18472
18496
|
autoplay: "",
|
|
@@ -18482,22 +18506,22 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18482
18506
|
}, null, 512)])])) : createCommentVNode("", !0),
|
|
18483
18507
|
createElementVNode("div", _hoisted_4, [
|
|
18484
18508
|
H.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_5, [createElementVNode("div", _hoisted_6, [
|
|
18485
|
-
createElementVNode("div", _hoisted_7, [(openBlock(), createElementBlock(Fragment, null, renderList(
|
|
18509
|
+
createElementVNode("div", _hoisted_7, [(openBlock(), createElementBlock(Fragment, null, renderList(Gm, (e) => createElementVNode("button", {
|
|
18486
18510
|
key: e.value,
|
|
18487
18511
|
type: "button",
|
|
18488
18512
|
role: "radio",
|
|
18489
|
-
"aria-checked":
|
|
18490
|
-
disabled:
|
|
18513
|
+
"aria-checked": qm.value === e.value.toString(),
|
|
18514
|
+
disabled: J.value,
|
|
18491
18515
|
title: `${e.label} (${unref(V)}${e.value + 1})`,
|
|
18492
|
-
class: normalizeClass(["webphone__channel-button wp:flex wp:items-center wp:gap-1 wp:px-2 wp:py-2 wp:rounded-lg wp:transition-colors wp:duration-200 wp:outline-none wp:focus-visible:ring-2 wp:focus-visible:ring-[var(--p-primary-color)] wp:focus-visible:ring-offset-2 wp:focus-visible:ring-offset-white wp:dark:focus-visible:ring-offset-neutral-900",
|
|
18516
|
+
class: normalizeClass(["webphone__channel-button wp:flex wp:items-center wp:gap-1 wp:px-2 wp:py-2 wp:rounded-lg wp:transition-colors wp:duration-200 wp:outline-none wp:focus-visible:ring-2 wp:focus-visible:ring-[var(--p-primary-color)] wp:focus-visible:ring-offset-2 wp:focus-visible:ring-offset-white wp:dark:focus-visible:ring-offset-neutral-900", Ym(e.value) ? "wp:bg-status-hold/12 hover:wp:bg-status-hold/18" : Jm(e.value) ? "wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18" : qm.value === e.value.toString() ? "wp:bg-[var(--p-primary-color)]/12" : "wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),
|
|
18493
18517
|
"data-channel-id": e.value,
|
|
18494
|
-
"data-state":
|
|
18495
|
-
"data-call-state":
|
|
18496
|
-
onClick: (t) =>
|
|
18518
|
+
"data-state": qm.value === e.value.toString() ? "active" : "idle",
|
|
18519
|
+
"data-call-state": Ym(e.value) ? "held" : Jm(e.value) ? "busy" : "available",
|
|
18520
|
+
onClick: (t) => Xm(e.value)
|
|
18497
18521
|
}, [createVNode(unref(icon_phone_default), {
|
|
18498
|
-
class: normalizeClass(["webphone__channel-icon wp:size-3 wp:shrink-0",
|
|
18522
|
+
class: normalizeClass(["webphone__channel-icon wp:size-3 wp:shrink-0", Ym(e.value) ? "wp:text-status-hold" : Jm(e.value) ? "wp:text-[var(--color-red)]" : qm.value === e.value.toString() ? "wp:text-[var(--p-primary-color)]" : "wp:text-neutral-400"]),
|
|
18499
18523
|
"stroke-width": 1.8
|
|
18500
|
-
}, null, 8, ["class"]), createElementVNode("span", { class: normalizeClass(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold",
|
|
18524
|
+
}, null, 8, ["class"]), createElementVNode("span", { class: normalizeClass(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold", Ym(e.value) ? "wp:text-status-hold" : Jm(e.value) ? "wp:text-[var(--color-red)]" : qm.value === e.value.toString() ? "wp:text-[var(--p-primary-color)]" : "wp:text-neutral-500 wp:dark:text-neutral-400"]) }, toDisplayString(e.label), 3)], 10, _hoisted_8)), 64))]),
|
|
18501
18525
|
createVNode(unref(TooltipProvider_default), null, {
|
|
18502
18526
|
default: withCtx(() => [createVNode(unref(Tooltip_default), null, {
|
|
18503
18527
|
default: withCtx(() => [createVNode(unref(TooltipTrigger_default), { "as-child": "" }, {
|
|
@@ -18550,7 +18574,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18550
18574
|
"channel-id": e.id,
|
|
18551
18575
|
"allow-input": !H.value,
|
|
18552
18576
|
"is-web-call": H.value,
|
|
18553
|
-
"is-online": unref(
|
|
18577
|
+
"is-online": unref(q),
|
|
18554
18578
|
contacts: o.contacts,
|
|
18555
18579
|
user: o.extension,
|
|
18556
18580
|
"mask-number": o.maskNumber,
|
|
@@ -18571,15 +18595,15 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18571
18595
|
}, [createVNode(KeyPad_default)], 10, _hoisted_10),
|
|
18572
18596
|
createVNode(CallActions_default, {
|
|
18573
18597
|
class: "webphone__actions",
|
|
18574
|
-
style: normalizeStyle(
|
|
18598
|
+
style: normalizeStyle(J.value ? "pointer-events: none;" : void 0),
|
|
18575
18599
|
destination: H.value ? o.to : void 0,
|
|
18576
18600
|
"is-video": o.mode === "video",
|
|
18577
18601
|
"on-answer": o.onAnswer,
|
|
18578
18602
|
"on-hangup": o.onHangup,
|
|
18579
18603
|
"on-reject": o.onReject,
|
|
18580
18604
|
onTransfer: t[1] ||= (e) => j.value = !0,
|
|
18581
|
-
onCompleteTransfer:
|
|
18582
|
-
onCancelTransfer:
|
|
18605
|
+
onCompleteTransfer: Am,
|
|
18606
|
+
onCancelTransfer: jm
|
|
18583
18607
|
}, null, 8, [
|
|
18584
18608
|
"style",
|
|
18585
18609
|
"destination",
|
|
@@ -18589,7 +18613,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18589
18613
|
"on-reject"
|
|
18590
18614
|
])
|
|
18591
18615
|
]),
|
|
18592
|
-
|
|
18616
|
+
J.value ? (openBlock(), createElementBlock("div", _hoisted_11, [...t[10] ||= [createElementVNode("span", { class: "wp:text-sm wp:font-semibold wp:text-status-disconnected" }, "Sin internet", -1)]])) : createCommentVNode("", !0),
|
|
18593
18617
|
H.value ? (openBlock(), createElementBlock("div", _hoisted_12, [...t[11] ||= [createElementVNode("div", { class: "webphone__footer-label wp:text-[10px] wp:text-primary" }, "Powered By", -1), createElementVNode("div", { class: "webphone__footer-content wp:flex wp:items-center wp:gap-2" }, [createElementVNode("a", {
|
|
18594
18618
|
href: "https://www.nebula123.com",
|
|
18595
18619
|
target: "_blank",
|
|
@@ -18606,7 +18630,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18606
18630
|
contacts: o.contacts,
|
|
18607
18631
|
"mask-number": o.maskNumber,
|
|
18608
18632
|
extensions: o.extensions,
|
|
18609
|
-
onCall:
|
|
18633
|
+
onCall: Mm
|
|
18610
18634
|
}, null, 8, [
|
|
18611
18635
|
"visible",
|
|
18612
18636
|
"contacts",
|
|
@@ -18619,7 +18643,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18619
18643
|
contacts: o.contacts,
|
|
18620
18644
|
"mask-number": o.maskNumber,
|
|
18621
18645
|
extensions: o.extensions,
|
|
18622
|
-
onTransfer:
|
|
18646
|
+
onTransfer: km
|
|
18623
18647
|
}, null, 8, [
|
|
18624
18648
|
"visible",
|
|
18625
18649
|
"contacts",
|
|
@@ -18628,14 +18652,14 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18628
18652
|
]),
|
|
18629
18653
|
createVNode(DocumentPip_default, {
|
|
18630
18654
|
ref_key: "documentPipRef",
|
|
18631
|
-
ref:
|
|
18655
|
+
ref: Y,
|
|
18632
18656
|
active: Z.value,
|
|
18633
18657
|
"onUpdate:active": t[5] ||= (e) => Z.value = e,
|
|
18634
18658
|
"auto-open-on-blur": Dm.value,
|
|
18635
18659
|
"is-connected": x.isConnected,
|
|
18636
18660
|
"remote-number": ym.value,
|
|
18637
|
-
"caller-name":
|
|
18638
|
-
"has-video":
|
|
18661
|
+
"caller-name": vm.value,
|
|
18662
|
+
"has-video": bm.value ?? !1,
|
|
18639
18663
|
"remote-stream": unref(E),
|
|
18640
18664
|
"local-stream": unref(D),
|
|
18641
18665
|
destination: H.value ? o.to : void 0,
|
|
@@ -18644,10 +18668,10 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18644
18668
|
"is-muted": x.isMuted,
|
|
18645
18669
|
"is-held": x.isHeld,
|
|
18646
18670
|
onTransfer: Fm,
|
|
18647
|
-
onTransferRequest:
|
|
18648
|
-
onHangup:
|
|
18671
|
+
onTransferRequest: km,
|
|
18672
|
+
onHangup: Q,
|
|
18649
18673
|
onReject: Pm,
|
|
18650
|
-
onAnswer:
|
|
18674
|
+
onAnswer: Nm,
|
|
18651
18675
|
onToggleMute: t[6] ||= (e) => unref(S).toggleMute(),
|
|
18652
18676
|
onToggleHold: t[7] ||= (e) => unref(S).toggleHold()
|
|
18653
18677
|
}, null, 8, [
|