@tmsoft/webphone 5.0.13 → 5.0.14
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 +17 -17
- package/dist/webphone.es.js +265 -262
- package/dist/webphone.umd.js +16 -16
- package/package.json +1 -1
package/dist/webphone.es.js
CHANGED
|
@@ -7126,41 +7126,41 @@ var concatArrays = (e, t) => {
|
|
|
7126
7126
|
isArbitraryVariablePosition,
|
|
7127
7127
|
isArbitraryPosition,
|
|
7128
7128
|
{ position: [isArbitraryVariable, isArbitraryValue] }
|
|
7129
|
-
],
|
|
7129
|
+
], vm = () => ["no-repeat", { repeat: [
|
|
7130
7130
|
"",
|
|
7131
7131
|
"x",
|
|
7132
7132
|
"y",
|
|
7133
7133
|
"space",
|
|
7134
7134
|
"round"
|
|
7135
|
-
] }],
|
|
7135
|
+
] }], B = () => [
|
|
7136
7136
|
"auto",
|
|
7137
7137
|
"cover",
|
|
7138
7138
|
"contain",
|
|
7139
7139
|
isArbitraryVariableSize,
|
|
7140
7140
|
isArbitrarySize,
|
|
7141
7141
|
{ size: [isArbitraryVariable, isArbitraryValue] }
|
|
7142
|
-
],
|
|
7142
|
+
], V = () => [
|
|
7143
7143
|
isPercent,
|
|
7144
7144
|
isArbitraryVariableLength,
|
|
7145
7145
|
isArbitraryLength
|
|
7146
|
-
],
|
|
7146
|
+
], H = () => [
|
|
7147
7147
|
"",
|
|
7148
7148
|
"none",
|
|
7149
7149
|
"full",
|
|
7150
7150
|
d,
|
|
7151
7151
|
isArbitraryVariable,
|
|
7152
7152
|
isArbitraryValue
|
|
7153
|
-
],
|
|
7153
|
+
], U = () => [
|
|
7154
7154
|
"",
|
|
7155
7155
|
isNumber,
|
|
7156
7156
|
isArbitraryVariableLength,
|
|
7157
7157
|
isArbitraryLength
|
|
7158
|
-
],
|
|
7158
|
+
], ym = () => [
|
|
7159
7159
|
"solid",
|
|
7160
7160
|
"dashed",
|
|
7161
7161
|
"dotted",
|
|
7162
7162
|
"double"
|
|
7163
|
-
],
|
|
7163
|
+
], W = () => [
|
|
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
|
+
], G = () => [
|
|
7181
7181
|
isNumber,
|
|
7182
7182
|
isPercent,
|
|
7183
7183
|
isArbitraryVariablePosition,
|
|
7184
7184
|
isArbitraryPosition
|
|
7185
|
-
],
|
|
7185
|
+
], K = () => [
|
|
7186
7186
|
"",
|
|
7187
7187
|
"none",
|
|
7188
7188
|
_,
|
|
@@ -7198,11 +7198,11 @@ var concatArrays = (e, t) => {
|
|
|
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()
|
|
@@ -7611,7 +7611,7 @@ var concatArrays = (e, t) => {
|
|
|
7611
7611
|
"line-through",
|
|
7612
7612
|
"no-underline"
|
|
7613
7613
|
],
|
|
7614
|
-
"text-decoration-style": [{ decoration: [...
|
|
7614
|
+
"text-decoration-style": [{ decoration: [...ym(), "wavy"] }],
|
|
7615
7615
|
"text-decoration-thickness": [{ decoration: [
|
|
7616
7616
|
isNumber,
|
|
7617
7617
|
"from-font",
|
|
@@ -7702,8 +7702,8 @@ var concatArrays = (e, t) => {
|
|
|
7702
7702
|
"content"
|
|
7703
7703
|
] }],
|
|
7704
7704
|
"bg-position": [{ bg: _m() }],
|
|
7705
|
-
"bg-repeat": [{ bg:
|
|
7706
|
-
"bg-size": [{ bg:
|
|
7705
|
+
"bg-repeat": [{ bg: vm() }],
|
|
7706
|
+
"bg-size": [{ bg: B() }],
|
|
7707
7707
|
"bg-image": [{ bg: [
|
|
7708
7708
|
"none",
|
|
7709
7709
|
{
|
|
@@ -7737,49 +7737,49 @@ var concatArrays = (e, t) => {
|
|
|
7737
7737
|
isArbitraryImage
|
|
7738
7738
|
] }],
|
|
7739
7739
|
"bg-color": [{ bg: z() }],
|
|
7740
|
-
"gradient-from-pos": [{ from:
|
|
7741
|
-
"gradient-via-pos": [{ via:
|
|
7742
|
-
"gradient-to-pos": [{ to:
|
|
7740
|
+
"gradient-from-pos": [{ from: V() }],
|
|
7741
|
+
"gradient-via-pos": [{ via: V() }],
|
|
7742
|
+
"gradient-to-pos": [{ to: V() }],
|
|
7743
7743
|
"gradient-from": [{ from: z() }],
|
|
7744
7744
|
"gradient-via": [{ via: z() }],
|
|
7745
7745
|
"gradient-to": [{ to: z() }],
|
|
7746
|
-
rounded: [{ rounded:
|
|
7747
|
-
"rounded-s": [{ "rounded-s":
|
|
7748
|
-
"rounded-e": [{ "rounded-e":
|
|
7749
|
-
"rounded-t": [{ "rounded-t":
|
|
7750
|
-
"rounded-r": [{ "rounded-r":
|
|
7751
|
-
"rounded-b": [{ "rounded-b":
|
|
7752
|
-
"rounded-l": [{ "rounded-l":
|
|
7753
|
-
"rounded-ss": [{ "rounded-ss":
|
|
7754
|
-
"rounded-se": [{ "rounded-se":
|
|
7755
|
-
"rounded-ee": [{ "rounded-ee":
|
|
7756
|
-
"rounded-es": [{ "rounded-es":
|
|
7757
|
-
"rounded-tl": [{ "rounded-tl":
|
|
7758
|
-
"rounded-tr": [{ "rounded-tr":
|
|
7759
|
-
"rounded-br": [{ "rounded-br":
|
|
7760
|
-
"rounded-bl": [{ "rounded-bl":
|
|
7761
|
-
"border-w": [{ border:
|
|
7762
|
-
"border-w-x": [{ "border-x":
|
|
7763
|
-
"border-w-y": [{ "border-y":
|
|
7764
|
-
"border-w-s": [{ "border-s":
|
|
7765
|
-
"border-w-e": [{ "border-e":
|
|
7766
|
-
"border-w-bs": [{ "border-bs":
|
|
7767
|
-
"border-w-be": [{ "border-be":
|
|
7768
|
-
"border-w-t": [{ "border-t":
|
|
7769
|
-
"border-w-r": [{ "border-r":
|
|
7770
|
-
"border-w-b": [{ "border-b":
|
|
7771
|
-
"border-w-l": [{ "border-l":
|
|
7772
|
-
"divide-x": [{ "divide-x":
|
|
7746
|
+
rounded: [{ rounded: H() }],
|
|
7747
|
+
"rounded-s": [{ "rounded-s": H() }],
|
|
7748
|
+
"rounded-e": [{ "rounded-e": H() }],
|
|
7749
|
+
"rounded-t": [{ "rounded-t": H() }],
|
|
7750
|
+
"rounded-r": [{ "rounded-r": H() }],
|
|
7751
|
+
"rounded-b": [{ "rounded-b": H() }],
|
|
7752
|
+
"rounded-l": [{ "rounded-l": H() }],
|
|
7753
|
+
"rounded-ss": [{ "rounded-ss": H() }],
|
|
7754
|
+
"rounded-se": [{ "rounded-se": H() }],
|
|
7755
|
+
"rounded-ee": [{ "rounded-ee": H() }],
|
|
7756
|
+
"rounded-es": [{ "rounded-es": H() }],
|
|
7757
|
+
"rounded-tl": [{ "rounded-tl": H() }],
|
|
7758
|
+
"rounded-tr": [{ "rounded-tr": H() }],
|
|
7759
|
+
"rounded-br": [{ "rounded-br": H() }],
|
|
7760
|
+
"rounded-bl": [{ "rounded-bl": H() }],
|
|
7761
|
+
"border-w": [{ border: U() }],
|
|
7762
|
+
"border-w-x": [{ "border-x": U() }],
|
|
7763
|
+
"border-w-y": [{ "border-y": U() }],
|
|
7764
|
+
"border-w-s": [{ "border-s": U() }],
|
|
7765
|
+
"border-w-e": [{ "border-e": U() }],
|
|
7766
|
+
"border-w-bs": [{ "border-bs": U() }],
|
|
7767
|
+
"border-w-be": [{ "border-be": U() }],
|
|
7768
|
+
"border-w-t": [{ "border-t": U() }],
|
|
7769
|
+
"border-w-r": [{ "border-r": U() }],
|
|
7770
|
+
"border-w-b": [{ "border-b": U() }],
|
|
7771
|
+
"border-w-l": [{ "border-l": U() }],
|
|
7772
|
+
"divide-x": [{ "divide-x": U() }],
|
|
7773
7773
|
"divide-x-reverse": ["divide-x-reverse"],
|
|
7774
|
-
"divide-y": [{ "divide-y":
|
|
7774
|
+
"divide-y": [{ "divide-y": U() }],
|
|
7775
7775
|
"divide-y-reverse": ["divide-y-reverse"],
|
|
7776
7776
|
"border-style": [{ border: [
|
|
7777
|
-
...
|
|
7777
|
+
...ym(),
|
|
7778
7778
|
"hidden",
|
|
7779
7779
|
"none"
|
|
7780
7780
|
] }],
|
|
7781
7781
|
"divide-style": [{ divide: [
|
|
7782
|
-
...
|
|
7782
|
+
...ym(),
|
|
7783
7783
|
"hidden",
|
|
7784
7784
|
"none"
|
|
7785
7785
|
] }],
|
|
@@ -7796,7 +7796,7 @@ var concatArrays = (e, t) => {
|
|
|
7796
7796
|
"border-color-l": [{ "border-l": z() }],
|
|
7797
7797
|
"divide-color": [{ divide: z() }],
|
|
7798
7798
|
"outline-style": [{ outline: [
|
|
7799
|
-
...
|
|
7799
|
+
...ym(),
|
|
7800
7800
|
"none",
|
|
7801
7801
|
"hidden"
|
|
7802
7802
|
] }],
|
|
@@ -7827,12 +7827,12 @@ var concatArrays = (e, t) => {
|
|
|
7827
7827
|
isArbitraryShadow
|
|
7828
7828
|
] }],
|
|
7829
7829
|
"inset-shadow-color": [{ "inset-shadow": z() }],
|
|
7830
|
-
"ring-w": [{ ring:
|
|
7830
|
+
"ring-w": [{ ring: U() }],
|
|
7831
7831
|
"ring-w-inset": ["ring-inset"],
|
|
7832
7832
|
"ring-color": [{ ring: z() }],
|
|
7833
7833
|
"ring-offset-w": [{ "ring-offset": [isNumber, isArbitraryLength] }],
|
|
7834
7834
|
"ring-offset-color": [{ "ring-offset": z() }],
|
|
7835
|
-
"inset-ring-w": [{ "inset-ring":
|
|
7835
|
+
"inset-ring-w": [{ "inset-ring": U() }],
|
|
7836
7836
|
"inset-ring-color": [{ "inset-ring": z() }],
|
|
7837
7837
|
"text-shadow": [{ "text-shadow": [
|
|
7838
7838
|
"none",
|
|
@@ -7847,11 +7847,11 @@ var concatArrays = (e, t) => {
|
|
|
7847
7847
|
isArbitraryValue
|
|
7848
7848
|
] }],
|
|
7849
7849
|
"mix-blend": [{ "mix-blend": [
|
|
7850
|
-
...
|
|
7850
|
+
...W(),
|
|
7851
7851
|
"plus-darker",
|
|
7852
7852
|
"plus-lighter"
|
|
7853
7853
|
] }],
|
|
7854
|
-
"bg-blend": [{ "bg-blend":
|
|
7854
|
+
"bg-blend": [{ "bg-blend": W() }],
|
|
7855
7855
|
"mask-clip": [{ "mask-clip": [
|
|
7856
7856
|
"border",
|
|
7857
7857
|
"padding",
|
|
@@ -7867,37 +7867,37 @@ 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":
|
|
7870
|
+
"mask-image-linear-from-pos": [{ "mask-linear-from": G() }],
|
|
7871
|
+
"mask-image-linear-to-pos": [{ "mask-linear-to": G() }],
|
|
7872
7872
|
"mask-image-linear-from-color": [{ "mask-linear-from": z() }],
|
|
7873
7873
|
"mask-image-linear-to-color": [{ "mask-linear-to": z() }],
|
|
7874
|
-
"mask-image-t-from-pos": [{ "mask-t-from":
|
|
7875
|
-
"mask-image-t-to-pos": [{ "mask-t-to":
|
|
7874
|
+
"mask-image-t-from-pos": [{ "mask-t-from": G() }],
|
|
7875
|
+
"mask-image-t-to-pos": [{ "mask-t-to": G() }],
|
|
7876
7876
|
"mask-image-t-from-color": [{ "mask-t-from": z() }],
|
|
7877
7877
|
"mask-image-t-to-color": [{ "mask-t-to": z() }],
|
|
7878
|
-
"mask-image-r-from-pos": [{ "mask-r-from":
|
|
7879
|
-
"mask-image-r-to-pos": [{ "mask-r-to":
|
|
7878
|
+
"mask-image-r-from-pos": [{ "mask-r-from": G() }],
|
|
7879
|
+
"mask-image-r-to-pos": [{ "mask-r-to": G() }],
|
|
7880
7880
|
"mask-image-r-from-color": [{ "mask-r-from": z() }],
|
|
7881
7881
|
"mask-image-r-to-color": [{ "mask-r-to": z() }],
|
|
7882
|
-
"mask-image-b-from-pos": [{ "mask-b-from":
|
|
7883
|
-
"mask-image-b-to-pos": [{ "mask-b-to":
|
|
7882
|
+
"mask-image-b-from-pos": [{ "mask-b-from": G() }],
|
|
7883
|
+
"mask-image-b-to-pos": [{ "mask-b-to": G() }],
|
|
7884
7884
|
"mask-image-b-from-color": [{ "mask-b-from": z() }],
|
|
7885
7885
|
"mask-image-b-to-color": [{ "mask-b-to": z() }],
|
|
7886
|
-
"mask-image-l-from-pos": [{ "mask-l-from":
|
|
7887
|
-
"mask-image-l-to-pos": [{ "mask-l-to":
|
|
7886
|
+
"mask-image-l-from-pos": [{ "mask-l-from": G() }],
|
|
7887
|
+
"mask-image-l-to-pos": [{ "mask-l-to": G() }],
|
|
7888
7888
|
"mask-image-l-from-color": [{ "mask-l-from": z() }],
|
|
7889
7889
|
"mask-image-l-to-color": [{ "mask-l-to": z() }],
|
|
7890
|
-
"mask-image-x-from-pos": [{ "mask-x-from":
|
|
7891
|
-
"mask-image-x-to-pos": [{ "mask-x-to":
|
|
7890
|
+
"mask-image-x-from-pos": [{ "mask-x-from": G() }],
|
|
7891
|
+
"mask-image-x-to-pos": [{ "mask-x-to": G() }],
|
|
7892
7892
|
"mask-image-x-from-color": [{ "mask-x-from": z() }],
|
|
7893
7893
|
"mask-image-x-to-color": [{ "mask-x-to": z() }],
|
|
7894
|
-
"mask-image-y-from-pos": [{ "mask-y-from":
|
|
7895
|
-
"mask-image-y-to-pos": [{ "mask-y-to":
|
|
7894
|
+
"mask-image-y-from-pos": [{ "mask-y-from": G() }],
|
|
7895
|
+
"mask-image-y-to-pos": [{ "mask-y-to": G() }],
|
|
7896
7896
|
"mask-image-y-from-color": [{ "mask-y-from": z() }],
|
|
7897
7897
|
"mask-image-y-to-color": [{ "mask-y-to": z() }],
|
|
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":
|
|
7899
|
+
"mask-image-radial-from-pos": [{ "mask-radial-from": G() }],
|
|
7900
|
+
"mask-image-radial-to-pos": [{ "mask-radial-to": G() }],
|
|
7901
7901
|
"mask-image-radial-from-color": [{ "mask-radial-from": z() }],
|
|
7902
7902
|
"mask-image-radial-to-color": [{ "mask-radial-to": z() }],
|
|
7903
7903
|
"mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
|
|
@@ -7907,8 +7907,8 @@ 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":
|
|
7910
|
+
"mask-image-conic-from-pos": [{ "mask-conic-from": G() }],
|
|
7911
|
+
"mask-image-conic-to-pos": [{ "mask-conic-to": G() }],
|
|
7912
7912
|
"mask-image-conic-from-color": [{ "mask-conic-from": z() }],
|
|
7913
7913
|
"mask-image-conic-to-color": [{ "mask-conic-to": z() }],
|
|
7914
7914
|
"mask-mode": [{ mask: [
|
|
@@ -7925,8 +7925,8 @@ var concatArrays = (e, t) => {
|
|
|
7925
7925
|
"view"
|
|
7926
7926
|
] }],
|
|
7927
7927
|
"mask-position": [{ mask: _m() }],
|
|
7928
|
-
"mask-repeat": [{ mask:
|
|
7929
|
-
"mask-size": [{ mask:
|
|
7928
|
+
"mask-repeat": [{ mask: vm() }],
|
|
7929
|
+
"mask-size": [{ mask: B() }],
|
|
7930
7930
|
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
7931
7931
|
"mask-image": [{ mask: [
|
|
7932
7932
|
"none",
|
|
@@ -7939,7 +7939,7 @@ var concatArrays = (e, t) => {
|
|
|
7939
7939
|
isArbitraryVariable,
|
|
7940
7940
|
isArbitraryValue
|
|
7941
7941
|
] }],
|
|
7942
|
-
blur: [{ blur:
|
|
7942
|
+
blur: [{ blur: K() }],
|
|
7943
7943
|
brightness: [{ brightness: [
|
|
7944
7944
|
isNumber,
|
|
7945
7945
|
isArbitraryVariable,
|
|
@@ -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": K() }],
|
|
7996
7996
|
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
7997
7997
|
isNumber,
|
|
7998
7998
|
isArbitraryVariable,
|
|
@@ -8094,9 +8094,9 @@ var concatArrays = (e, t) => {
|
|
|
8094
8094
|
"scale-y": [{ "scale-y": xm() }],
|
|
8095
8095
|
"scale-z": [{ "scale-z": xm() }],
|
|
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,10 +8107,10 @@ 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
8115
|
accent: [{ accent: z() }],
|
|
8116
8116
|
appearance: [{ appearance: ["none", "auto"] }],
|
|
@@ -8599,14 +8599,14 @@ const createSipService = (e, t = {}) => {
|
|
|
8599
8599
|
...o ? { queue: o } : {}
|
|
8600
8600
|
};
|
|
8601
8601
|
return f.set(n, s), t.onCallContext?.(s), s;
|
|
8602
|
-
},
|
|
8602
|
+
}, vm = (e, n) => {
|
|
8603
8603
|
let i = f.get(e);
|
|
8604
8604
|
i && t.onCallState?.({
|
|
8605
8605
|
...i,
|
|
8606
8606
|
state: n,
|
|
8607
8607
|
timestamp: Date.now()
|
|
8608
8608
|
});
|
|
8609
|
-
},
|
|
8609
|
+
}, B = (e, n) => {
|
|
8610
8610
|
if (a.value.get(n) !== e || e.state !== SessionState.Established) return;
|
|
8611
8611
|
let i = f.get(n), o = e.sessionDescriptionHandler, s = o?.localMediaStream ?? d.value, l = o?.remoteMediaStream ?? u.value, m = s?.getAudioTracks() ?? [], g = l?.getAudioTracks() ?? [];
|
|
8612
8612
|
if (!i || !s || !l || m.length === 0 || g.length === 0) return;
|
|
@@ -8620,14 +8620,14 @@ const createSipService = (e, t = {}) => {
|
|
|
8620
8620
|
localStream: s,
|
|
8621
8621
|
remoteStream: l
|
|
8622
8622
|
}));
|
|
8623
|
-
},
|
|
8623
|
+
}, V = (e) => {
|
|
8624
8624
|
f.delete(e), p.delete(e), m.delete(e);
|
|
8625
|
-
},
|
|
8625
|
+
}, H = (n, i) => {
|
|
8626
8626
|
if (a.value.get(n) !== i) return;
|
|
8627
8627
|
let o = g.get(i);
|
|
8628
8628
|
o && clearTimeout(o), g.delete(i);
|
|
8629
8629
|
let s = e.channels.value.find((e) => e.id === n), l = f.get(n), u = m.has(n) || s?.status === "connected";
|
|
8630
|
-
|
|
8630
|
+
V(n), a.value.delete(n), e.updateChannelState(n, {
|
|
8631
8631
|
status: "idle",
|
|
8632
8632
|
remoteNumber: "",
|
|
8633
8633
|
remoteDisplayName: void 0,
|
|
@@ -8661,11 +8661,11 @@ const createSipService = (e, t = {}) => {
|
|
|
8661
8661
|
console.warn("[SipJs] Call ended, but the state callback failed:", e);
|
|
8662
8662
|
}
|
|
8663
8663
|
}
|
|
8664
|
-
},
|
|
8664
|
+
}, ym = (e, t) => {
|
|
8665
8665
|
g.has(t) || g.set(t, setTimeout(() => {
|
|
8666
|
-
console.warn("[SipJs] Hangup did not terminate; releasing local call state"),
|
|
8666
|
+
console.warn("[SipJs] Hangup did not terminate; releasing local call state"), W(t), H(e, t);
|
|
8667
8667
|
}, 5e3));
|
|
8668
|
-
},
|
|
8668
|
+
}, W = (e) => {
|
|
8669
8669
|
if (e.state !== SessionState.Terminated) try {
|
|
8670
8670
|
e.dispose().catch((e) => {
|
|
8671
8671
|
console.warn("[SipJs] Session disposal failed:", e);
|
|
@@ -8673,15 +8673,17 @@ const createSipService = (e, t = {}) => {
|
|
|
8673
8673
|
} catch (e) {
|
|
8674
8674
|
console.warn("[SipJs] Session disposal failed:", e);
|
|
8675
8675
|
}
|
|
8676
|
+
}, G = () => {
|
|
8677
|
+
for (let [e, t] of a.value) t.state === SessionState.Initial && f.get(e)?.direction === "incoming" && (console.warn("[SipJs] Transport lost while ringing; releasing the incoming call"), H(e, t), W(t));
|
|
8676
8678
|
}, K = () => {
|
|
8677
8679
|
e.channels.value.some((e) => e.status === "incoming") && !isAutoAnswerEnabled() ? j() : M(), e.activeChannel.value?.status === "calling" ? N() : P();
|
|
8678
|
-
},
|
|
8679
|
-
await F(), isAutoAnswerEnabled() && a.value.get(e) === t && t.state === SessionState.Initial && await
|
|
8680
|
-
},
|
|
8680
|
+
}, bm = async (e, t, n) => {
|
|
8681
|
+
await F(), isAutoAnswerEnabled() && a.value.get(e) === t && t.state === SessionState.Initial && await Lm(n);
|
|
8682
|
+
}, xm = (e) => {
|
|
8681
8683
|
o.volume = e / 100;
|
|
8682
|
-
},
|
|
8684
|
+
}, q = async (e) => {
|
|
8683
8685
|
typeof o.setSinkId == "function" && await o.setSinkId(e);
|
|
8684
|
-
},
|
|
8686
|
+
}, J = async (t) => {
|
|
8685
8687
|
if (!t) return;
|
|
8686
8688
|
let n = [...a.value.entries()].flatMap(([e, t]) => {
|
|
8687
8689
|
let n = t.sessionDescriptionHandler, i = n?.peerConnection?.getSenders().find((e) => e.track?.kind === "audio");
|
|
@@ -8699,7 +8701,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8699
8701
|
let i = [], o = [];
|
|
8700
8702
|
try {
|
|
8701
8703
|
for (let { sender: e } of n) {
|
|
8702
|
-
let n = await navigator.mediaDevices.getUserMedia(
|
|
8704
|
+
let n = await navigator.mediaDevices.getUserMedia(Y(!1, t));
|
|
8703
8705
|
i.push(n);
|
|
8704
8706
|
let [a] = n.getAudioTracks(), s = e.track;
|
|
8705
8707
|
if (!a || !s) throw Error("Could not acquire an audio track for the selected microphone");
|
|
@@ -8720,7 +8722,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8720
8722
|
e !== l && d.value?.removeTrack(e);
|
|
8721
8723
|
}), d.value.getTracks().includes(l) || d.value.addTrack(l)));
|
|
8722
8724
|
try {
|
|
8723
|
-
|
|
8725
|
+
B(n, t);
|
|
8724
8726
|
} catch (e) {
|
|
8725
8727
|
console.error("[SipJs] Media-ready callback failed after microphone switch:", e);
|
|
8726
8728
|
}
|
|
@@ -8736,7 +8738,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8736
8738
|
} catch (e) {
|
|
8737
8739
|
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);
|
|
8738
8740
|
}
|
|
8739
|
-
},
|
|
8741
|
+
}, Sm = (e, t) => {
|
|
8740
8742
|
let n = !1, i = e.sessionDescriptionHandler;
|
|
8741
8743
|
return i?.peerConnection && i.peerConnection.getSenders().forEach((e) => {
|
|
8742
8744
|
e.track && e.track.kind === "audio" && (e.track.enabled = t, n = !0);
|
|
@@ -8746,22 +8748,22 @@ const createSipService = (e, t = {}) => {
|
|
|
8746
8748
|
return d.value && d.value.getAudioTracks().forEach((n) => {
|
|
8747
8749
|
n.enabled = e, t = !0;
|
|
8748
8750
|
}), t;
|
|
8749
|
-
},
|
|
8750
|
-
let n = !(t?.isHeld || t?.isMuted), i =
|
|
8751
|
+
}, wm = (e, t) => {
|
|
8752
|
+
let n = !(t?.isHeld || t?.isMuted), i = Sm(e, n), a = Cm(n);
|
|
8751
8753
|
!i && !a && console.warn("[SipJs] No audio tracks found to apply channel audio state");
|
|
8752
|
-
},
|
|
8754
|
+
}, Tm = (t) => {
|
|
8753
8755
|
for (let [n, i] of a.value.entries()) if (i === t) return e.channels.value.find((e) => e.id === n) || null;
|
|
8754
8756
|
return e.activeChannel.value || null;
|
|
8755
|
-
},
|
|
8757
|
+
}, Em = async (e) => {
|
|
8756
8758
|
let t = e.sessionDescriptionHandler?.peerConnection;
|
|
8757
8759
|
if (!t) return;
|
|
8758
|
-
let n =
|
|
8760
|
+
let n = Tm(e), i = !(n?.isHeld || n?.isMuted), o = t.getSenders().find((e) => e.track?.kind === "audio");
|
|
8759
8761
|
if (o?.track) {
|
|
8760
|
-
o.track.enabled = i, n &&
|
|
8762
|
+
o.track.enabled = i, n && B(e, n.id);
|
|
8761
8763
|
return;
|
|
8762
8764
|
}
|
|
8763
8765
|
try {
|
|
8764
|
-
let o = await navigator.mediaDevices.getUserMedia(
|
|
8766
|
+
let o = await navigator.mediaDevices.getUserMedia(Y(!1));
|
|
8765
8767
|
if (![...a.value.values()].includes(e)) {
|
|
8766
8768
|
o.getTracks().forEach((e) => e.stop());
|
|
8767
8769
|
return;
|
|
@@ -8772,11 +8774,11 @@ const createSipService = (e, t = {}) => {
|
|
|
8772
8774
|
let l = new MediaStream([s]);
|
|
8773
8775
|
d.value = l;
|
|
8774
8776
|
let u = t.getSenders().find((e) => e.track === null);
|
|
8775
|
-
u ? await u.replaceTrack(s) : t.addTrack(s, l),
|
|
8777
|
+
u ? await u.replaceTrack(s) : t.addTrack(s, l), wm(e, n), n && B(e, n.id);
|
|
8776
8778
|
} catch (e) {
|
|
8777
8779
|
console.warn("[SipJs] Failed to recover outbound audio track:", e);
|
|
8778
8780
|
}
|
|
8779
|
-
},
|
|
8781
|
+
}, Y = (e = !1, t = l.value) => {
|
|
8780
8782
|
let n = {
|
|
8781
8783
|
echoCancellation: { ideal: !0 },
|
|
8782
8784
|
noiseSuppression: { ideal: !1 },
|
|
@@ -8787,7 +8789,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8787
8789
|
audio: n,
|
|
8788
8790
|
video: e
|
|
8789
8791
|
};
|
|
8790
|
-
},
|
|
8792
|
+
}, Dm = async () => {
|
|
8791
8793
|
let t = i.value;
|
|
8792
8794
|
t && await t.register({ requestDelegate: {
|
|
8793
8795
|
onAccept: () => {
|
|
@@ -8796,10 +8798,10 @@ const createSipService = (e, t = {}) => {
|
|
|
8796
8798
|
onReject: (t) => {
|
|
8797
8799
|
e.setConnected(!1);
|
|
8798
8800
|
let n = t?.message?.statusCode;
|
|
8799
|
-
n === 401 || n === 403 || n === 404 ||
|
|
8801
|
+
n === 401 || n === 403 || n === 404 || jm();
|
|
8800
8802
|
}
|
|
8801
8803
|
} });
|
|
8802
|
-
},
|
|
8804
|
+
}, Om = async (t) => {
|
|
8803
8805
|
if (n.value) return;
|
|
8804
8806
|
D &&= (clearTimeout(D), null);
|
|
8805
8807
|
let a = k;
|
|
@@ -8826,9 +8828,9 @@ const createSipService = (e, t = {}) => {
|
|
|
8826
8828
|
delegate: {
|
|
8827
8829
|
onConnect: () => {},
|
|
8828
8830
|
onDisconnect: () => {
|
|
8829
|
-
e.setConnected(!1),
|
|
8831
|
+
e.setConnected(!1), G(), jm();
|
|
8830
8832
|
},
|
|
8831
|
-
onInvite: (e) =>
|
|
8833
|
+
onInvite: (e) => Fm(e)
|
|
8832
8834
|
}
|
|
8833
8835
|
}, l = typeof SharedWorker < "u", u = l;
|
|
8834
8836
|
l && (s.transportConstructor = SharedWorkerTransport, s.transportOptions = {
|
|
@@ -8843,7 +8845,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8843
8845
|
u = !1, console.warn("[SipJs] SharedWorker unavailable, using native WebSocket transport", e), delete s.transportConstructor, s.transportOptions = o, n.value = new UserAgent(s);
|
|
8844
8846
|
}
|
|
8845
8847
|
try {
|
|
8846
|
-
await n.value.start(), i.value = new Registerer(n.value), await
|
|
8848
|
+
await n.value.start(), i.value = new Registerer(n.value), await Dm();
|
|
8847
8849
|
} catch (e) {
|
|
8848
8850
|
if (!u) throw e;
|
|
8849
8851
|
console.warn("[SipJs] SharedWorker connection failed, retrying with native WebSocket", e);
|
|
@@ -8854,9 +8856,9 @@ const createSipService = (e, t = {}) => {
|
|
|
8854
8856
|
} catch (e) {
|
|
8855
8857
|
console.warn("[SipJs] Failed to clean up SharedWorker transport", e);
|
|
8856
8858
|
}
|
|
8857
|
-
delete s.transportConstructor, s.transportOptions = o, n.value = new UserAgent(s), await n.value.start(), i.value = new Registerer(n.value), await
|
|
8859
|
+
delete s.transportConstructor, s.transportOptions = o, n.value = new UserAgent(s), await n.value.start(), i.value = new Registerer(n.value), await Dm();
|
|
8858
8860
|
}
|
|
8859
|
-
|
|
8861
|
+
Am(), O = 0;
|
|
8860
8862
|
} catch (e) {
|
|
8861
8863
|
console.error("[SipJs] Failed to initialize WSS/SIP connection", e);
|
|
8862
8864
|
let o = n.value;
|
|
@@ -8865,26 +8867,27 @@ const createSipService = (e, t = {}) => {
|
|
|
8865
8867
|
} catch (e) {
|
|
8866
8868
|
console.warn("[SipJs] Failed to clean up after connection error", e);
|
|
8867
8869
|
}
|
|
8868
|
-
!(e instanceof InvalidUriError) && a === k &&
|
|
8870
|
+
!(e instanceof InvalidUriError) && a === k && km(t);
|
|
8869
8871
|
}
|
|
8870
|
-
},
|
|
8872
|
+
}, km = (e) => {
|
|
8871
8873
|
if (D) return;
|
|
8872
8874
|
let t = RECOVERY_DELAYS_MS[Math.min(O, RECOVERY_DELAYS_MS.length - 1)];
|
|
8873
8875
|
O++, D = setTimeout(async () => {
|
|
8874
8876
|
if (D = null, !navigator.onLine) {
|
|
8875
|
-
console.log("[SipJs] Skipping initial connection retry, device is offline"),
|
|
8877
|
+
console.log("[SipJs] Skipping initial connection retry, device is offline"), km(e);
|
|
8876
8878
|
return;
|
|
8877
8879
|
}
|
|
8878
|
-
console.log("[SipJs] Retrying initial connection..."), await
|
|
8880
|
+
console.log("[SipJs] Retrying initial connection..."), await Om(e);
|
|
8879
8881
|
}, t);
|
|
8880
|
-
},
|
|
8882
|
+
}, Am = () => {
|
|
8881
8883
|
b = new AbortController();
|
|
8882
8884
|
let { signal: t } = b, n = Date.now(), i = (e = 1e3) => {
|
|
8883
8885
|
x && clearTimeout(x), x = setTimeout(async () => {
|
|
8884
|
-
x = null, await
|
|
8886
|
+
x = null, await Nm();
|
|
8885
8887
|
}, e);
|
|
8886
8888
|
}, a = () => {
|
|
8887
8889
|
if (document.visibilityState === "visible") {
|
|
8890
|
+
K();
|
|
8888
8891
|
let e = Date.now() - n;
|
|
8889
8892
|
e > 5e3 ? (console.log(`[SipJs] Device was suspended for ${Math.round(e / 1e3)}s, reconnecting...`), i(1500)) : i(500);
|
|
8890
8893
|
}
|
|
@@ -8902,9 +8905,9 @@ const createSipService = (e, t = {}) => {
|
|
|
8902
8905
|
document.addEventListener("visibilitychange", a, { signal: t }), window.addEventListener("online", o, { signal: t }), window.addEventListener("offline", s, { signal: t }), document.addEventListener("freeze", () => {
|
|
8903
8906
|
console.log("[SipJs] Page frozen"), S &&= (clearInterval(S), null);
|
|
8904
8907
|
}, { signal: t }), document.addEventListener("resume", () => {
|
|
8905
|
-
console.log("[SipJs] Page resumed"), n = Date.now(), l(), i(1e3);
|
|
8906
|
-
}, { signal: t }), l(),
|
|
8907
|
-
},
|
|
8908
|
+
console.log("[SipJs] Page resumed"), K(), n = Date.now(), l(), i(1e3);
|
|
8909
|
+
}, { signal: t }), l(), Mm();
|
|
8910
|
+
}, jm = () => {
|
|
8908
8911
|
if (w || !n.value) return;
|
|
8909
8912
|
let t = RECOVERY_DELAYS_MS[Math.min(T, RECOVERY_DELAYS_MS.length - 1)];
|
|
8910
8913
|
w = setTimeout(async () => {
|
|
@@ -8912,13 +8915,13 @@ const createSipService = (e, t = {}) => {
|
|
|
8912
8915
|
T = 0;
|
|
8913
8916
|
return;
|
|
8914
8917
|
}
|
|
8915
|
-
T++, await
|
|
8918
|
+
T++, await Nm(), e.isConnected.value || jm();
|
|
8916
8919
|
}, t);
|
|
8917
|
-
},
|
|
8920
|
+
}, Mm = () => {
|
|
8918
8921
|
E && clearInterval(E), E = setInterval(() => {
|
|
8919
|
-
n.value && !e.isConnected.value &&
|
|
8922
|
+
n.value && !e.isConnected.value && jm();
|
|
8920
8923
|
}, 3e4);
|
|
8921
|
-
},
|
|
8924
|
+
}, Nm = async () => {
|
|
8922
8925
|
if (n.value) {
|
|
8923
8926
|
if (!navigator.onLine) {
|
|
8924
8927
|
console.log("[SipJs] Skipping reconnect, device is offline");
|
|
@@ -8930,18 +8933,18 @@ const createSipService = (e, t = {}) => {
|
|
|
8930
8933
|
}
|
|
8931
8934
|
try {
|
|
8932
8935
|
if (n.value.isConnected() || (console.log("[SipJs] Reconnecting..."), await n.value.reconnect()), i.value && n.value.isConnected()) try {
|
|
8933
|
-
await
|
|
8936
|
+
await Dm();
|
|
8934
8937
|
} catch {}
|
|
8935
8938
|
} catch (e) {
|
|
8936
8939
|
console.error("[SipJs] Reconnection failed:", e);
|
|
8937
8940
|
}
|
|
8938
8941
|
}
|
|
8939
|
-
},
|
|
8942
|
+
}, Pm = async () => {
|
|
8940
8943
|
b?.abort(), b = null, x &&= (clearTimeout(x), null), S &&= (clearInterval(S), null), E &&= (clearInterval(E), null), w &&= (clearTimeout(w), null), T = 0, D &&= (clearTimeout(D), null), O = 0, k++;
|
|
8941
8944
|
for (let [e, t] of a.value.entries()) {
|
|
8942
8945
|
let n;
|
|
8943
8946
|
try {
|
|
8944
|
-
await Promise.race([
|
|
8947
|
+
await Promise.race([Rm(e, t), new Promise((e) => {
|
|
8945
8948
|
n = setTimeout(e, 1500);
|
|
8946
8949
|
})]);
|
|
8947
8950
|
} finally {
|
|
@@ -8960,7 +8963,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8960
8963
|
} catch (e) {
|
|
8961
8964
|
console.warn("[SipJs] UserAgent stop failed:", e);
|
|
8962
8965
|
}
|
|
8963
|
-
},
|
|
8966
|
+
}, Fm = (t) => {
|
|
8964
8967
|
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);
|
|
8965
8968
|
let n = e.channels.value.find((e) => e.status === "idle" && !a.value.has(e.id));
|
|
8966
8969
|
if (!n) {
|
|
@@ -8975,21 +8978,21 @@ const createSipService = (e, t = {}) => {
|
|
|
8975
8978
|
remoteNumber: s,
|
|
8976
8979
|
remoteDisplayName: t.remoteIdentity.displayName || void 0,
|
|
8977
8980
|
hasVideo: o
|
|
8978
|
-
}), _m(t, i, "incoming", s),
|
|
8981
|
+
}), _m(t, i, "incoming", s), vm(i, "ringing"), K(), e.setActiveChannelId(i), isAutoAnswerEnabled() && bm(i, t, o), t.stateChange.addListener((n) => {
|
|
8979
8982
|
switch (n) {
|
|
8980
8983
|
case SessionState.Terminated:
|
|
8981
|
-
|
|
8984
|
+
H(i, t);
|
|
8982
8985
|
break;
|
|
8983
8986
|
case SessionState.Established:
|
|
8984
8987
|
if (a.value.get(i) !== t) break;
|
|
8985
8988
|
m.add(i), e.updateChannelState(i, {
|
|
8986
8989
|
status: "connected",
|
|
8987
8990
|
startTime: Date.now()
|
|
8988
|
-
}),
|
|
8991
|
+
}), vm(i, "connected"), e.activeChannelId.value === i && (Q(t), Em(t).then(() => B(t, i))), K();
|
|
8989
8992
|
break;
|
|
8990
8993
|
}
|
|
8991
8994
|
});
|
|
8992
|
-
},
|
|
8995
|
+
}, Im = async (t, i = !1) => {
|
|
8993
8996
|
if (!n.value) return;
|
|
8994
8997
|
let o = e.activeChannelId.value;
|
|
8995
8998
|
if (a.value.has(o)) return;
|
|
@@ -9000,7 +9003,7 @@ const createSipService = (e, t = {}) => {
|
|
|
9000
9003
|
}
|
|
9001
9004
|
if (!s) return;
|
|
9002
9005
|
let l = new Inviter(n.value, s, { earlyMedia: _ });
|
|
9003
|
-
a.value.set(o, l), _m(l, o, "outgoing", t),
|
|
9006
|
+
a.value.set(o, l), _m(l, o, "outgoing", t), vm(o, "dialing"), e.updateChannelState(o, {
|
|
9004
9007
|
status: "calling",
|
|
9005
9008
|
remoteNumber: t,
|
|
9006
9009
|
hasVideo: i
|
|
@@ -9011,15 +9014,15 @@ const createSipService = (e, t = {}) => {
|
|
|
9011
9014
|
m.add(o), e.channels.value.find((e) => e.id === o)?.status !== "connected" && (e.updateChannelState(o, {
|
|
9012
9015
|
status: "connected",
|
|
9013
9016
|
startTime: Date.now()
|
|
9014
|
-
}),
|
|
9017
|
+
}), vm(o, "connected"), Q(l), Em(l).then(() => B(l, o)), K());
|
|
9015
9018
|
break;
|
|
9016
9019
|
case SessionState.Terminated:
|
|
9017
|
-
|
|
9020
|
+
H(o, l);
|
|
9018
9021
|
break;
|
|
9019
9022
|
}
|
|
9020
9023
|
});
|
|
9021
9024
|
let u = {
|
|
9022
|
-
sessionDescriptionHandlerOptions: { constraints:
|
|
9025
|
+
sessionDescriptionHandlerOptions: { constraints: Y(i) },
|
|
9023
9026
|
requestDelegate: {
|
|
9024
9027
|
onProgress: (t) => {
|
|
9025
9028
|
a.value.get(o) === l && (t.message.statusCode === 180 || t.message.statusCode === 183) && (t.message.body && (e.updateChannelState(o, { hasEarlyMedia: !0 }), Q(l)), K());
|
|
@@ -9028,16 +9031,16 @@ const createSipService = (e, t = {}) => {
|
|
|
9028
9031
|
a.value.get(o) === l && e.channels.value.find((e) => e.id === o)?.status !== "connected" && (m.add(o), e.updateChannelState(o, {
|
|
9029
9032
|
status: "connected",
|
|
9030
9033
|
startTime: Date.now()
|
|
9031
|
-
}),
|
|
9034
|
+
}), vm(o, "connected"), Q(l), Em(l).then(() => B(l, o)), K());
|
|
9032
9035
|
}
|
|
9033
9036
|
}
|
|
9034
9037
|
};
|
|
9035
9038
|
try {
|
|
9036
9039
|
await l.invite(u);
|
|
9037
9040
|
} catch (e) {
|
|
9038
|
-
throw
|
|
9041
|
+
throw H(o, l), e;
|
|
9039
9042
|
}
|
|
9040
|
-
},
|
|
9043
|
+
}, Lm = async (t = !1) => {
|
|
9041
9044
|
let n = e.activeChannelId.value, i = a.value.get(n);
|
|
9042
9045
|
if (i instanceof Invitation && i.state === SessionState.Initial) {
|
|
9043
9046
|
M(), e.updateChannelState(n, {
|
|
@@ -9045,12 +9048,12 @@ const createSipService = (e, t = {}) => {
|
|
|
9045
9048
|
startTime: Date.now()
|
|
9046
9049
|
}), K();
|
|
9047
9050
|
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 {
|
|
9048
|
-
await
|
|
9051
|
+
await Z(n, !0), e.updateChannelState(t, { isHeld: !0 });
|
|
9049
9052
|
} catch (e) {
|
|
9050
9053
|
console.error(`[SipJs] Failed to hold channel ${t}:`, e);
|
|
9051
9054
|
}
|
|
9052
9055
|
let o = { sessionDescriptionHandlerOptions: {
|
|
9053
|
-
constraints:
|
|
9056
|
+
constraints: Y(t),
|
|
9054
9057
|
iceGatheringTimeout: 1e3
|
|
9055
9058
|
} };
|
|
9056
9059
|
try {
|
|
@@ -9063,8 +9066,8 @@ const createSipService = (e, t = {}) => {
|
|
|
9063
9066
|
}), K()), t;
|
|
9064
9067
|
}
|
|
9065
9068
|
}
|
|
9066
|
-
},
|
|
9067
|
-
|
|
9069
|
+
}, Rm = async (e, t) => {
|
|
9070
|
+
ym(e, t);
|
|
9068
9071
|
try {
|
|
9069
9072
|
switch (t.state) {
|
|
9070
9073
|
case SessionState.Initial:
|
|
@@ -9078,40 +9081,40 @@ const createSipService = (e, t = {}) => {
|
|
|
9078
9081
|
} catch (e) {
|
|
9079
9082
|
console.warn("[SipJs] Hangup signaling failed:", e);
|
|
9080
9083
|
} finally {
|
|
9081
|
-
|
|
9084
|
+
W(t), H(e, t);
|
|
9082
9085
|
}
|
|
9083
|
-
},
|
|
9086
|
+
}, zm = async () => {
|
|
9084
9087
|
let t = e.activeChannelId.value, n = a.value.get(t);
|
|
9085
|
-
n && await
|
|
9086
|
-
},
|
|
9088
|
+
n && await Rm(t, n);
|
|
9089
|
+
}, Bm = () => {
|
|
9087
9090
|
let t = a.value.get(e.activeChannelId.value);
|
|
9088
9091
|
if (!t) return;
|
|
9089
9092
|
let n = !e.isMuted.value;
|
|
9090
|
-
e.setMuted(n),
|
|
9091
|
-
},
|
|
9093
|
+
e.setMuted(n), wm(t, e.channels.value.find((t) => t.id === e.activeChannelId.value));
|
|
9094
|
+
}, Z = async (e, t) => {
|
|
9092
9095
|
let n = { sessionDescriptionHandlerOptions: { hold: t } };
|
|
9093
9096
|
await e.invite(n);
|
|
9094
|
-
},
|
|
9097
|
+
}, Vm = async () => {
|
|
9095
9098
|
let t = a.value.get(e.activeChannelId.value);
|
|
9096
9099
|
if (t?.state !== SessionState.Established) return;
|
|
9097
9100
|
let n = !e.isHeld.value;
|
|
9098
9101
|
try {
|
|
9099
|
-
await
|
|
9102
|
+
await Z(t, n), e.setHeld(n), wm(t, e.channels.value.find((t) => t.id === e.activeChannelId.value));
|
|
9100
9103
|
} catch {}
|
|
9101
|
-
},
|
|
9104
|
+
}, Hm = async (t) => {
|
|
9102
9105
|
let n = e.activeChannelId.value;
|
|
9103
9106
|
if (n === t) return;
|
|
9104
9107
|
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);
|
|
9105
9108
|
if (i && i.state === SessionState.Established && !s?.isHeld) try {
|
|
9106
|
-
await
|
|
9109
|
+
await Z(i, !0), e.updateChannelState(n, { isHeld: !0 }), wm(i, e.channels.value.find((e) => e.id === n));
|
|
9107
9110
|
} catch {}
|
|
9108
9111
|
if (e.setActiveChannelId(t), K(), o && o.state === SessionState.Established) {
|
|
9109
9112
|
if (l?.isHeld) try {
|
|
9110
|
-
await
|
|
9113
|
+
await Z(o, !1), e.updateChannelState(t, { isHeld: !1 });
|
|
9111
9114
|
} catch {}
|
|
9112
|
-
|
|
9115
|
+
wm(o, e.channels.value.find((e) => e.id === t)), Q(o);
|
|
9113
9116
|
} else $();
|
|
9114
|
-
},
|
|
9117
|
+
}, Um = (t) => {
|
|
9115
9118
|
if (!/^[0-9*#]$/.test(t)) return;
|
|
9116
9119
|
let n = a.value.get(e.activeChannelId.value);
|
|
9117
9120
|
if (n?.state !== SessionState.Established) return;
|
|
@@ -9126,10 +9129,10 @@ const createSipService = (e, t = {}) => {
|
|
|
9126
9129
|
contentDisposition: "signal"
|
|
9127
9130
|
} } };
|
|
9128
9131
|
n.info(o);
|
|
9129
|
-
},
|
|
9132
|
+
}, Wm = (t, n) => {
|
|
9130
9133
|
let i = e.channels.value.find((e) => e.id === t);
|
|
9131
|
-
!i || i.status !== "connected" || (Q(n),
|
|
9132
|
-
},
|
|
9134
|
+
!i || i.status !== "connected" || (Q(n), wm(n, i), Em(n), o.play().catch(() => {}));
|
|
9135
|
+
}, Gm = async (t) => {
|
|
9133
9136
|
console.log("[SipJs] 🔄 transferCall iniciado"), console.log("[SipJs] Target:", t);
|
|
9134
9137
|
let i = e.activeChannelId.value, o = a.value.get(i);
|
|
9135
9138
|
if (!o) throw console.error("[SipJs] ❌ No hay sesión activa en el canal", i), Error("No active session to transfer");
|
|
@@ -9149,7 +9152,7 @@ const createSipService = (e, t = {}) => {
|
|
|
9149
9152
|
},
|
|
9150
9153
|
onReject: (e) => {
|
|
9151
9154
|
let t = e.message.statusCode;
|
|
9152
|
-
console.error("[SipJs] ❌ Transfer REFER rechazado:", t), console.error("[SipJs] Response completo:", e.message),
|
|
9155
|
+
console.error("[SipJs] ❌ Transfer REFER rechazado:", t), console.error("[SipJs] Response completo:", e.message), Wm(i, o);
|
|
9153
9156
|
}
|
|
9154
9157
|
},
|
|
9155
9158
|
onNotify: (e) => {
|
|
@@ -9172,7 +9175,7 @@ const createSipService = (e, t = {}) => {
|
|
|
9172
9175
|
487: "Transferencia cancelada",
|
|
9173
9176
|
503: "Servicio no disponible - el destino puede estar fuera de línea"
|
|
9174
9177
|
}[t] || `Error en transferencia (código ${t})`;
|
|
9175
|
-
console.warn("[SipJs] 💬", e),
|
|
9178
|
+
console.warn("[SipJs] 💬", e), Wm(i, o);
|
|
9176
9179
|
} else t >= 100 && t < 200 && console.log("[SipJs] 📞 Transferencia en progreso:", t, n);
|
|
9177
9180
|
} else console.warn("[SipJs] ⚠️ No se pudo extraer el código de estado del NOTIFY body");
|
|
9178
9181
|
} else console.warn("[SipJs] ⚠️ NOTIFY sin body");
|
|
@@ -9181,28 +9184,28 @@ const createSipService = (e, t = {}) => {
|
|
|
9181
9184
|
} catch (e) {
|
|
9182
9185
|
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;
|
|
9183
9186
|
}
|
|
9184
|
-
},
|
|
9187
|
+
}, Km = async (t) => {
|
|
9185
9188
|
console.log("[SipJs] 🔄 startAttendedTransfer iniciado"), console.log("[SipJs] Target:", t);
|
|
9186
9189
|
let n = e.activeChannelId.value, i = a.value.get(n);
|
|
9187
9190
|
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");
|
|
9188
9191
|
let o = e.channels.value.find((e) => e.status === "idle");
|
|
9189
9192
|
if (console.log("[SipJs] Canal de consulta encontrado:", o?.id), !o) throw console.error("[SipJs] ❌ No hay canales disponibles para llamada de consulta"), Error("No available channel for consultation call");
|
|
9190
9193
|
try {
|
|
9191
|
-
console.log("[SipJs] 🔇 Poniendo llamada original en hold..."), await
|
|
9194
|
+
console.log("[SipJs] 🔇 Poniendo llamada original en hold..."), await Z(i, !0), e.updateChannelState(n, { isHeld: !0 }), console.log("[SipJs] ✅ Llamada original en hold");
|
|
9192
9195
|
} catch (e) {
|
|
9193
9196
|
throw console.error("[SipJs] ❌ Failed to hold original call:", e), Error("Failed to put call on hold");
|
|
9194
9197
|
}
|
|
9195
9198
|
console.log("[SipJs] 🔄 Cambiando al canal de consulta:", o.id), e.setActiveChannelId(o.id);
|
|
9196
9199
|
try {
|
|
9197
|
-
console.log("[SipJs] 📞 Iniciando llamada de consulta a:", t), await
|
|
9200
|
+
console.log("[SipJs] 📞 Iniciando llamada de consulta a:", t), await Im(t, !1), console.log("[SipJs] ✅ Llamada de consulta iniciada"), e.setTransferInProgress({
|
|
9198
9201
|
originalChannelId: n,
|
|
9199
9202
|
consultationChannelId: o.id,
|
|
9200
9203
|
targetNumber: t
|
|
9201
9204
|
}), console.log("[SipJs] 📋 Transferencia en progreso registrada");
|
|
9202
9205
|
} catch (t) {
|
|
9203
|
-
throw console.error("[SipJs] ❌ Failed to start consultation call:", t), console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."), e.setActiveChannelId(n), await
|
|
9206
|
+
throw console.error("[SipJs] ❌ Failed to start consultation call:", t), console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."), e.setActiveChannelId(n), await Z(i, !1).catch(() => {}), e.updateChannelState(n, { isHeld: !1 }), Error("Failed to initiate consultation call");
|
|
9204
9207
|
}
|
|
9205
|
-
},
|
|
9208
|
+
}, qm = async () => {
|
|
9206
9209
|
console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");
|
|
9207
9210
|
let t = e.transferInProgress.value;
|
|
9208
9211
|
if (!t) throw console.error("[SipJs] ❌ No hay transferencia en progreso"), Error("No transfer in progress");
|
|
@@ -9230,7 +9233,7 @@ const createSipService = (e, t = {}) => {
|
|
|
9230
9233
|
if (n && n[1]) {
|
|
9231
9234
|
let a = parseInt(n[1]);
|
|
9232
9235
|
a >= 200 && a < 300 ? setTimeout(() => {
|
|
9233
|
-
|
|
9236
|
+
Rm(t.originalChannelId, i), Rm(t.consultationChannelId, o), e.setTransferInProgress(null);
|
|
9234
9237
|
}, 500) : a >= 400 && (console.error("[SipJs] Attended transfer failed with status:", a), e.setTransferInProgress(null));
|
|
9235
9238
|
}
|
|
9236
9239
|
}
|
|
@@ -9245,18 +9248,18 @@ const createSipService = (e, t = {}) => {
|
|
|
9245
9248
|
} catch (e) {
|
|
9246
9249
|
throw console.error("[SipJs] Attended transfer failed:", e), e;
|
|
9247
9250
|
}
|
|
9248
|
-
},
|
|
9251
|
+
}, Jm = async () => {
|
|
9249
9252
|
let t = e.transferInProgress.value;
|
|
9250
9253
|
if (!t) throw Error("No transfer in progress");
|
|
9251
9254
|
console.log("[SipJs] Canceling attended transfer...");
|
|
9252
9255
|
let n = a.value.get(t.originalChannelId), i = a.value.get(t.consultationChannelId);
|
|
9253
9256
|
if (i) try {
|
|
9254
|
-
await
|
|
9257
|
+
await Rm(t.consultationChannelId, i), console.log("[SipJs] Consultation call ended");
|
|
9255
9258
|
} catch (e) {
|
|
9256
9259
|
console.warn("[SipJs] Error ending consultation:", e);
|
|
9257
9260
|
}
|
|
9258
9261
|
if (n) try {
|
|
9259
|
-
e.setActiveChannelId(t.originalChannelId), await
|
|
9262
|
+
e.setActiveChannelId(t.originalChannelId), await Z(n, !1), e.updateChannelState(t.originalChannelId, { isHeld: !1 }), console.log("[SipJs] Returned to original call");
|
|
9260
9263
|
} catch (e) {
|
|
9261
9264
|
console.warn("[SipJs] Error resuming original call:", e);
|
|
9262
9265
|
}
|
|
@@ -9274,8 +9277,8 @@ const createSipService = (e, t = {}) => {
|
|
|
9274
9277
|
}
|
|
9275
9278
|
if (u.value === n) return;
|
|
9276
9279
|
o.pause(), o.srcObject = null, v?.abort(), v = new AbortController(), u.value = n, d.value = t.localMediaStream ?? null;
|
|
9277
|
-
let i =
|
|
9278
|
-
|
|
9280
|
+
let i = Tm(e);
|
|
9281
|
+
wm(e, i), i && B(e, i.id);
|
|
9279
9282
|
let a = (e) => {
|
|
9280
9283
|
y?.abort(), y = new AbortController();
|
|
9281
9284
|
let { signal: t } = y, n = () => {
|
|
@@ -9288,34 +9291,34 @@ const createSipService = (e, t = {}) => {
|
|
|
9288
9291
|
}, { signal: t }), n();
|
|
9289
9292
|
};
|
|
9290
9293
|
n.addEventListener("addtrack", (t) => {
|
|
9291
|
-
t.track.kind === "audio" && (o.srcObject = null, o.srcObject = n, a(t.track), i &&
|
|
9294
|
+
t.track.kind === "audio" && (o.srcObject = null, o.srcObject = n, a(t.track), i && B(e, i.id));
|
|
9292
9295
|
}, { signal: v.signal });
|
|
9293
9296
|
let [s] = n.getTracks();
|
|
9294
|
-
s && (o.srcObject = n, a(s), i &&
|
|
9297
|
+
s && (o.srcObject = n, a(s), i && B(e, i.id));
|
|
9295
9298
|
}, $ = () => {
|
|
9296
9299
|
y?.abort(), y = null, v?.abort(), v = null, o.pause(), o.srcObject = null, u.value = null, d.value = null;
|
|
9297
9300
|
};
|
|
9298
9301
|
return {
|
|
9299
|
-
initUserAgent:
|
|
9300
|
-
stop:
|
|
9301
|
-
makeCall:
|
|
9302
|
-
answerCall:
|
|
9303
|
-
hangupCall:
|
|
9304
|
-
toggleMute:
|
|
9305
|
-
toggleHold:
|
|
9306
|
-
sendDTMF:
|
|
9307
|
-
transferCall:
|
|
9308
|
-
startAttendedTransfer:
|
|
9309
|
-
completeAttendedTransfer:
|
|
9310
|
-
cancelAttendedTransfer:
|
|
9311
|
-
switchChannel:
|
|
9302
|
+
initUserAgent: Om,
|
|
9303
|
+
stop: Pm,
|
|
9304
|
+
makeCall: Im,
|
|
9305
|
+
answerCall: Lm,
|
|
9306
|
+
hangupCall: zm,
|
|
9307
|
+
toggleMute: Bm,
|
|
9308
|
+
toggleHold: Vm,
|
|
9309
|
+
sendDTMF: Um,
|
|
9310
|
+
transferCall: Gm,
|
|
9311
|
+
startAttendedTransfer: Km,
|
|
9312
|
+
completeAttendedTransfer: qm,
|
|
9313
|
+
cancelAttendedTransfer: Jm,
|
|
9314
|
+
switchChannel: Hm,
|
|
9312
9315
|
extension: A,
|
|
9313
|
-
setVolume:
|
|
9316
|
+
setVolume: xm,
|
|
9314
9317
|
setNotificationVolume: I,
|
|
9315
9318
|
setRingtoneVolume: L,
|
|
9316
9319
|
setRingtoneTone: gm,
|
|
9317
|
-
setOutputDevice:
|
|
9318
|
-
setInputDevice:
|
|
9320
|
+
setOutputDevice: q,
|
|
9321
|
+
setInputDevice: J,
|
|
9319
9322
|
remoteStream: u,
|
|
9320
9323
|
localStream: d
|
|
9321
9324
|
};
|
|
@@ -16829,16 +16832,16 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
16829
16832
|
return `En espera - ${o.maskNumber ? maskPhoneNumber(t, o.extensions) : t}`;
|
|
16830
16833
|
}
|
|
16831
16834
|
return n === "connected" ? "Conectado" : n.charAt(0).toUpperCase() + n.slice(1);
|
|
16832
|
-
}),
|
|
16835
|
+
}), B = (e) => {
|
|
16833
16836
|
if (!e) return "";
|
|
16834
16837
|
let t = e.trim(), n = t.startsWith("+"), i = t.replace(/[^\d]/g, "");
|
|
16835
16838
|
return n ? `+${i}` : i;
|
|
16836
|
-
},
|
|
16839
|
+
}, V = (e) => /\d/.test(e) && /^[+\d\s().*#-]+$/.test(e.trim()), H = computed(() => {
|
|
16837
16840
|
let e = p.value, t = e?.remoteNumber || e?.keypadValue, n = e?.remoteDisplayName;
|
|
16838
16841
|
if (!t) return "Unknown";
|
|
16839
|
-
let i =
|
|
16840
|
-
return a ? o.maskNumber &&
|
|
16841
|
-
}),
|
|
16842
|
+
let i = B(t), a = o.contacts?.find((e) => B(e.number) === i);
|
|
16843
|
+
return a ? o.maskNumber && V(a.name) ? maskPhoneNumber(a.name, o.extensions) : a.name : n && n !== t ? o.maskNumber && V(n) ? B(n) === i ? maskPhoneNumber(t, o.extensions) : maskPhoneNumber(n, o.extensions) : n : o.maskNumber ? maskPhoneNumber(t, o.extensions) : t;
|
|
16844
|
+
}), U = computed(() => {
|
|
16842
16845
|
let e = p.value, t = e?.remoteNumber || e?.keypadValue || "";
|
|
16843
16846
|
return o.maskNumber ? maskPhoneNumber(t, o.extensions) : t;
|
|
16844
16847
|
});
|
|
@@ -16935,7 +16938,7 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
16935
16938
|
})) : (openBlock(), createBlock(unref(CircleUser), {
|
|
16936
16939
|
key: 4,
|
|
16937
16940
|
class: "wp:w-3 wp:h-3"
|
|
16938
|
-
}))], 2), createElementVNode("div", _hoisted_9$4, [createElementVNode("span", _hoisted_10$3, toDisplayString(e.name), 1), createElementVNode("span", _hoisted_11$3, toDisplayString(O(e)), 1)])], 40, _hoisted_8$4))), 128))], 512), [[vShow, v.value && E.value && (k.value.length > 0 || D.value)]])], 512)])) : (p.value?.status || "idle") === "connected" ? (openBlock(), createElementBlock("div", _hoisted_12$3, [createElementVNode("div", _hoisted_13$2, [createElementVNode("div", _hoisted_14$2, " En llamada con " + toDisplayString(
|
|
16941
|
+
}))], 2), createElementVNode("div", _hoisted_9$4, [createElementVNode("span", _hoisted_10$3, toDisplayString(e.name), 1), createElementVNode("span", _hoisted_11$3, toDisplayString(O(e)), 1)])], 40, _hoisted_8$4))), 128))], 512), [[vShow, v.value && E.value && (k.value.length > 0 || D.value)]])], 512)])) : (p.value?.status || "idle") === "connected" ? (openBlock(), createElementBlock("div", _hoisted_12$3, [createElementVNode("div", _hoisted_13$2, [createElementVNode("div", _hoisted_14$2, " En llamada con " + toDisplayString(H.value), 1), H.value === U.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_15$2, toDisplayString(U.value), 1))])])) : (p.value?.status || "idle") === "idle" ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_16$1, [createElementVNode("div", _hoisted_17$1, [createElementVNode("div", _hoisted_18$1, [createElementVNode("div", _hoisted_19$1, toDisplayString(H.value), 1), H.value === U.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_20$1, toDisplayString(U.value), 1))]), createVNode(unref(TooltipProvider_default), null, {
|
|
16939
16942
|
default: withCtx(() => [createVNode(unref(Tooltip_default), null, {
|
|
16940
16943
|
default: withCtx(() => [createVNode(unref(TooltipTrigger_default), { "as-child": "" }), createVNode(unref(TooltipContent_default), { class: "wp:flex wp:items-center wp:gap-2" }, {
|
|
16941
16944
|
default: withCtx(() => [createElementVNode("span", null, toDisplayString(unref(t).isKeypadVisible ? "Ocultar" : "Mostrar") + " teclado", 1), createVNode(unref(Kbd_default), null, {
|
|
@@ -17470,27 +17473,27 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17470
17473
|
}, z = (e) => {
|
|
17471
17474
|
let t = String(e);
|
|
17472
17475
|
D.value = t, v(t);
|
|
17473
|
-
},
|
|
17476
|
+
}, B = (e) => {
|
|
17474
17477
|
let t = String(e);
|
|
17475
17478
|
O.value = t, _(t);
|
|
17476
|
-
},
|
|
17479
|
+
}, V = (e, t = 35) => e.length <= t ? e : e.substring(0, t) + "...", H = computed({
|
|
17477
17480
|
get: () => [k.value],
|
|
17478
17481
|
set: (e) => {
|
|
17479
17482
|
k.value = e[0], p(k.value);
|
|
17480
17483
|
}
|
|
17481
|
-
}),
|
|
17484
|
+
}), U = computed({
|
|
17482
17485
|
get: () => [j.value],
|
|
17483
17486
|
set: (e) => {
|
|
17484
17487
|
j.value = e[0], y(j.value);
|
|
17485
17488
|
}
|
|
17486
|
-
}),
|
|
17489
|
+
}), W = computed({
|
|
17487
17490
|
get: () => [N.value],
|
|
17488
17491
|
set: (e) => {
|
|
17489
17492
|
N.value = e[0] ?? 100, b(N.value);
|
|
17490
17493
|
}
|
|
17491
|
-
}),
|
|
17494
|
+
}), G = (e) => {
|
|
17492
17495
|
F.value = String(e), x(F.value);
|
|
17493
|
-
},
|
|
17496
|
+
}, K = (e) => {
|
|
17494
17497
|
I.value = e;
|
|
17495
17498
|
};
|
|
17496
17499
|
return onMounted(() => {
|
|
@@ -17533,7 +17536,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17533
17536
|
value: e.deviceId,
|
|
17534
17537
|
title: e.label
|
|
17535
17538
|
}, {
|
|
17536
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
17539
|
+
default: withCtx(() => [createTextVNode(toDisplayString(V(e.label)), 1)]),
|
|
17537
17540
|
_: 2
|
|
17538
17541
|
}, 1032, ["value", "title"]))), 128))]),
|
|
17539
17542
|
_: 1
|
|
@@ -17547,7 +17550,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17547
17550
|
_: 1
|
|
17548
17551
|
}), createVNode(unref(Select_default), {
|
|
17549
17552
|
modelValue: unref(O),
|
|
17550
|
-
"onUpdate:modelValue": [o[1] ||= (e) => isRef(O) ? O.value = e : null,
|
|
17553
|
+
"onUpdate:modelValue": [o[1] ||= (e) => isRef(O) ? O.value = e : null, B]
|
|
17551
17554
|
}, {
|
|
17552
17555
|
default: withCtx(() => [createVNode(unref(SelectTrigger_default), { class: "wp:w-full" }, {
|
|
17553
17556
|
default: withCtx(() => [createVNode(unref(SelectValue_default), { placeholder: "Select Speaker" })]),
|
|
@@ -17559,7 +17562,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17559
17562
|
value: e.deviceId,
|
|
17560
17563
|
title: e.label
|
|
17561
17564
|
}, {
|
|
17562
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
17565
|
+
default: withCtx(() => [createTextVNode(toDisplayString(V(e.label)), 1)]),
|
|
17563
17566
|
_: 2
|
|
17564
17567
|
}, 1032, ["value", "title"]))), 128))]),
|
|
17565
17568
|
_: 1
|
|
@@ -17572,8 +17575,8 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17572
17575
|
default: withCtx(() => [...o[10] ||= [createTextVNode("Media Volume", -1)]]),
|
|
17573
17576
|
_: 1
|
|
17574
17577
|
}), createElementVNode("span", _hoisted_6$3, toDisplayString(unref(k)) + "%", 1)]), createVNode(unref(Slider_default), {
|
|
17575
|
-
modelValue:
|
|
17576
|
-
"onUpdate:modelValue": o[2] ||= (e) =>
|
|
17578
|
+
modelValue: H.value,
|
|
17579
|
+
"onUpdate:modelValue": o[2] ||= (e) => H.value = e,
|
|
17577
17580
|
max: 100,
|
|
17578
17581
|
step: 1
|
|
17579
17582
|
}, null, 8, ["modelValue"])]),
|
|
@@ -17581,8 +17584,8 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17581
17584
|
default: withCtx(() => [...o[11] ||= [createTextVNode("Notification Volume", -1)]]),
|
|
17582
17585
|
_: 1
|
|
17583
17586
|
}), createElementVNode("span", _hoisted_9$3, toDisplayString(unref(j)) + "%", 1)]), createVNode(unref(Slider_default), {
|
|
17584
|
-
modelValue:
|
|
17585
|
-
"onUpdate:modelValue": o[3] ||= (e) =>
|
|
17587
|
+
modelValue: U.value,
|
|
17588
|
+
"onUpdate:modelValue": o[3] ||= (e) => U.value = e,
|
|
17586
17589
|
max: 100,
|
|
17587
17590
|
step: 1
|
|
17588
17591
|
}, null, 8, ["modelValue"])]),
|
|
@@ -17590,8 +17593,8 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17590
17593
|
default: withCtx(() => [...o[12] ||= [createTextVNode("Volumen del tono", -1)]]),
|
|
17591
17594
|
_: 1
|
|
17592
17595
|
}), createElementVNode("span", _hoisted_12$2, toDisplayString(unref(N)) + "%", 1)]), createVNode(unref(Slider_default), {
|
|
17593
|
-
modelValue:
|
|
17594
|
-
"onUpdate:modelValue": o[4] ||= (e) =>
|
|
17596
|
+
modelValue: W.value,
|
|
17597
|
+
"onUpdate:modelValue": o[4] ||= (e) => W.value = e,
|
|
17595
17598
|
max: 100,
|
|
17596
17599
|
step: 1
|
|
17597
17600
|
}, null, 8, ["modelValue"])]),
|
|
@@ -17600,7 +17603,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17600
17603
|
_: 1
|
|
17601
17604
|
}), createVNode(unref(Select_default), {
|
|
17602
17605
|
"model-value": unref(F),
|
|
17603
|
-
"onUpdate:modelValue":
|
|
17606
|
+
"onUpdate:modelValue": G
|
|
17604
17607
|
}, {
|
|
17605
17608
|
default: withCtx(() => [createVNode(unref(SelectTrigger_default), { class: "wp:w-full" }, {
|
|
17606
17609
|
default: withCtx(() => [createVNode(unref(SelectValue_default), { placeholder: "Seleccionar tono" })]),
|
|
@@ -17639,7 +17642,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17639
17642
|
"aria-label": unref(I) ? "Desactivar respuesta automática" : "Activar respuesta automática",
|
|
17640
17643
|
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"]),
|
|
17641
17644
|
style: normalizeStyle({ backgroundColor: unref(I) ? "var(--color-primary-500)" : "var(--muted)" }),
|
|
17642
|
-
"onUpdate:modelValue":
|
|
17645
|
+
"onUpdate:modelValue": K
|
|
17643
17646
|
}, {
|
|
17644
17647
|
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)]),
|
|
17645
17648
|
_: 1
|
|
@@ -18307,7 +18310,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18307
18310
|
provide("webphone", x), provide("sip", S), t({ stop: S.stop }), watchEffect(() => {
|
|
18308
18311
|
o.mode === "webcall" && (o.to || console.error("WebPhone: \"to\" prop is required when mode is \"webcall\""), o.logo || console.error("WebPhone: \"logo\" prop is required when mode is \"webcall\""));
|
|
18309
18312
|
});
|
|
18310
|
-
let O = ref(!1), k = ref(!1), j = ref(!1), N = ref(null), F = ref(null), L = ref(null),
|
|
18313
|
+
let O = ref(!1), k = ref(!1), j = ref(!1), N = ref(null), F = ref(null), L = ref(null), B = navigator.platform.toUpperCase().indexOf("MAC") >= 0 ? "⌘" : "Ctrl+", V = computed(() => o.mode === "webcall"), H = ref(0), U = (e) => !!e && e.getVideoTracks().length > 0;
|
|
18311
18314
|
watch(() => x.callStatus, (e) => {
|
|
18312
18315
|
if (e === "idle" && !x.isKeypadVisible) {
|
|
18313
18316
|
x.toggleKeypad();
|
|
@@ -18315,18 +18318,18 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18315
18318
|
}
|
|
18316
18319
|
e !== "idle" && x.isKeypadVisible && x.toggleKeypad();
|
|
18317
18320
|
});
|
|
18318
|
-
let
|
|
18321
|
+
let W = computed(() => x.channels.find((e) => e.id === x.activeChannelId) ?? null), G = (e) => {
|
|
18319
18322
|
if (!e) return "";
|
|
18320
18323
|
let t = e.trim(), n = t.startsWith("+"), i = t.replace(/[^\d]/g, "");
|
|
18321
18324
|
return n ? `+${i}` : i;
|
|
18322
|
-
},
|
|
18323
|
-
let e =
|
|
18325
|
+
}, K = computed(() => {
|
|
18326
|
+
let e = W.value?.remoteNumber || x.remoteNumber, t = G(e), n = o.contacts.find((e) => G(e.number) === t);
|
|
18324
18327
|
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";
|
|
18325
18328
|
}), bm = computed(() => {
|
|
18326
|
-
let e =
|
|
18329
|
+
let e = W.value?.remoteNumber || x.remoteNumber;
|
|
18327
18330
|
return o.maskNumber ? maskPhoneNumber(e, o.extensions) : e;
|
|
18328
|
-
}), xm = computed(() => (
|
|
18329
|
-
km.value &&
|
|
18331
|
+
}), xm = computed(() => (H.value, !!W.value?.hasVideo || U(E.value) || U(D.value))), { isOnline: q } = useNetwork(), J = computed(() => !q.value), Cm = ref(null), Y = ref(!1), km = computed(() => o.enablePictureInPicture), Am = () => {
|
|
18332
|
+
km.value && Cm.value?.toggle();
|
|
18330
18333
|
}, jm = async (e, t) => {
|
|
18331
18334
|
try {
|
|
18332
18335
|
t === "blind" ? await S.transferCall(e) : await S.startAttendedTransfer(e);
|
|
@@ -18362,14 +18365,14 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18362
18365
|
}
|
|
18363
18366
|
S.hangupCall();
|
|
18364
18367
|
}, Rm = () => {
|
|
18365
|
-
j.value = !0,
|
|
18368
|
+
j.value = !0, Cm.value?.close(), window.focus();
|
|
18366
18369
|
}, zm = () => {
|
|
18367
18370
|
if (!km.value) return !1;
|
|
18368
18371
|
let e = x.callStatus !== "idle", t = document.hidden || !document.hasFocus();
|
|
18369
18372
|
return e && t && !Y.value;
|
|
18370
18373
|
}, Z = () => {
|
|
18371
18374
|
window.setTimeout(() => {
|
|
18372
|
-
zm() &&
|
|
18375
|
+
zm() && Cm.value?.open();
|
|
18373
18376
|
}, 150);
|
|
18374
18377
|
};
|
|
18375
18378
|
watchEffect(() => {
|
|
@@ -18378,16 +18381,16 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18378
18381
|
let Vm = (e) => {
|
|
18379
18382
|
if (!e || typeof e.addEventListener != "function" || typeof e.removeEventListener != "function") return () => {};
|
|
18380
18383
|
let t = () => {
|
|
18381
|
-
|
|
18384
|
+
H.value += 1;
|
|
18382
18385
|
};
|
|
18383
18386
|
return e.addEventListener("addtrack", t), e.addEventListener("removetrack", t), () => {
|
|
18384
18387
|
e.removeEventListener("addtrack", t), e.removeEventListener("removetrack", t);
|
|
18385
18388
|
};
|
|
18386
18389
|
};
|
|
18387
18390
|
watch(E, (e, t, n) => {
|
|
18388
|
-
|
|
18391
|
+
H.value += 1, n(Vm(e));
|
|
18389
18392
|
}, { immediate: !0 }), watch(D, (e, t, n) => {
|
|
18390
|
-
|
|
18393
|
+
H.value += 1, n(Vm(e));
|
|
18391
18394
|
}, { immediate: !0 });
|
|
18392
18395
|
let Hm = [
|
|
18393
18396
|
"button",
|
|
@@ -18424,7 +18427,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18424
18427
|
let t = Wm();
|
|
18425
18428
|
Gm.value = e.x ?? t.x, Km.value = e.y ?? t.y;
|
|
18426
18429
|
}, { deep: !0 });
|
|
18427
|
-
let
|
|
18430
|
+
let Jm = [
|
|
18428
18431
|
{
|
|
18429
18432
|
label: "Canal 1",
|
|
18430
18433
|
value: 0
|
|
@@ -18437,15 +18440,15 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18437
18440
|
label: "Canal 3",
|
|
18438
18441
|
value: 2
|
|
18439
18442
|
}
|
|
18440
|
-
],
|
|
18443
|
+
], Q = ref(!1), $ = computed({
|
|
18441
18444
|
get: () => x.activeChannelId.toString(),
|
|
18442
18445
|
set: async (e) => {
|
|
18443
|
-
if (!
|
|
18444
|
-
|
|
18446
|
+
if (!J.value && e && !Q.value) {
|
|
18447
|
+
Q.value = !0;
|
|
18445
18448
|
try {
|
|
18446
18449
|
await T(parseInt(e));
|
|
18447
18450
|
} finally {
|
|
18448
|
-
|
|
18451
|
+
Q.value = !1;
|
|
18449
18452
|
}
|
|
18450
18453
|
}
|
|
18451
18454
|
}
|
|
@@ -18456,17 +18459,17 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18456
18459
|
let t = x.channels.find((t) => t.id === e);
|
|
18457
18460
|
return t ? t.isHeld || t.status === "held" : !1;
|
|
18458
18461
|
}, Zm = (e) => {
|
|
18459
|
-
|
|
18462
|
+
J.value || ($.value = e.toString());
|
|
18460
18463
|
}, Qm = (e) => {
|
|
18461
|
-
if (!
|
|
18464
|
+
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) && [
|
|
18462
18465
|
"1",
|
|
18463
18466
|
"2",
|
|
18464
18467
|
"3"
|
|
18465
18468
|
].includes(e.key))) {
|
|
18466
18469
|
e.preventDefault();
|
|
18467
18470
|
let t = parseInt(e.key) - 1;
|
|
18468
|
-
|
|
18469
|
-
|
|
18471
|
+
Q.value || (Q.value = !0, T(t).finally(() => {
|
|
18472
|
+
Q.value = !1;
|
|
18470
18473
|
}));
|
|
18471
18474
|
}
|
|
18472
18475
|
};
|
|
@@ -18475,10 +18478,10 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18475
18478
|
}), watch(() => x.isConnected, (e) => {
|
|
18476
18479
|
v.value && a.set(v.value, e);
|
|
18477
18480
|
}, { immediate: !0 }), watch(km, (e) => {
|
|
18478
|
-
!e && Y.value &&
|
|
18481
|
+
!e && Y.value && Cm.value?.close();
|
|
18479
18482
|
});
|
|
18480
18483
|
let $m = ref(!1), eh = async () => {
|
|
18481
|
-
$m.value ||
|
|
18484
|
+
$m.value || J.value || !o.host || !o.extension || !o.password || (await w({
|
|
18482
18485
|
uri: `sip:${o.extension}@${o.host}`,
|
|
18483
18486
|
transportOptions: { server: _.value },
|
|
18484
18487
|
authorizationUsername: o.extension,
|
|
@@ -18494,7 +18497,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18494
18497
|
}
|
|
18495
18498
|
}), onMounted(async () => {
|
|
18496
18499
|
window.addEventListener("keydown", Qm), document.addEventListener("visibilitychange", Z), window.addEventListener("blur", Z), window.addEventListener("pagehide", Z), !(o.mode === "webcall" && (!o.to || !o.logo)) && await eh();
|
|
18497
|
-
}), watch(() =>
|
|
18500
|
+
}), watch(() => q.value, async (e) => {
|
|
18498
18501
|
e && await eh();
|
|
18499
18502
|
}), onUnmounted(() => {
|
|
18500
18503
|
S.stop(), window.removeEventListener("keydown", Qm), document.removeEventListener("visibilitychange", Z), window.removeEventListener("blur", Z), window.removeEventListener("pagehide", Z);
|
|
@@ -18503,10 +18506,10 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18503
18506
|
ref_key: "phoneRef",
|
|
18504
18507
|
ref: N,
|
|
18505
18508
|
style: normalizeStyle(unref(qm)),
|
|
18506
|
-
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",
|
|
18509
|
+
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" : ""]),
|
|
18507
18510
|
"data-mode": o.mode,
|
|
18508
18511
|
"data-call-status": x.callStatus,
|
|
18509
|
-
"data-network-status":
|
|
18512
|
+
"data-network-status": J.value ? "offline" : "online"
|
|
18510
18513
|
}, [
|
|
18511
18514
|
xm.value && !Y.value ? (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("video", {
|
|
18512
18515
|
ref_key: "remoteVideoRef",
|
|
@@ -18523,23 +18526,23 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18523
18526
|
class: "webphone__video-local wp:w-full wp:h-full wp:object-cover"
|
|
18524
18527
|
}, null, 512)])])) : createCommentVNode("", !0),
|
|
18525
18528
|
createElementVNode("div", _hoisted_4, [
|
|
18526
|
-
|
|
18527
|
-
createElementVNode("div", _hoisted_7, [(openBlock(), createElementBlock(Fragment, null, renderList(
|
|
18529
|
+
V.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_5, [createElementVNode("div", _hoisted_6, [
|
|
18530
|
+
createElementVNode("div", _hoisted_7, [(openBlock(), createElementBlock(Fragment, null, renderList(Jm, (e) => createElementVNode("button", {
|
|
18528
18531
|
key: e.value,
|
|
18529
18532
|
type: "button",
|
|
18530
18533
|
role: "radio",
|
|
18531
|
-
"aria-checked":
|
|
18532
|
-
disabled:
|
|
18533
|
-
title: `${e.label} (${unref(
|
|
18534
|
-
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", Xm(e.value) ? "wp:bg-status-hold/12 hover:wp:bg-status-hold/18" : Ym(e.value) ? "wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18" :
|
|
18534
|
+
"aria-checked": $.value === e.value.toString(),
|
|
18535
|
+
disabled: J.value,
|
|
18536
|
+
title: `${e.label} (${unref(B)}${e.value + 1})`,
|
|
18537
|
+
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", Xm(e.value) ? "wp:bg-status-hold/12 hover:wp:bg-status-hold/18" : Ym(e.value) ? "wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18" : $.value === e.value.toString() ? "wp:bg-[var(--p-primary-color)]/12" : "wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),
|
|
18535
18538
|
"data-channel-id": e.value,
|
|
18536
|
-
"data-state":
|
|
18539
|
+
"data-state": $.value === e.value.toString() ? "active" : "idle",
|
|
18537
18540
|
"data-call-state": Xm(e.value) ? "held" : Ym(e.value) ? "busy" : "available",
|
|
18538
18541
|
onClick: (t) => Zm(e.value)
|
|
18539
18542
|
}, [createVNode(unref(icon_phone_default), {
|
|
18540
|
-
class: normalizeClass(["webphone__channel-icon wp:size-3 wp:shrink-0", Xm(e.value) ? "wp:text-status-hold" : Ym(e.value) ? "wp:text-[var(--color-red)]" :
|
|
18543
|
+
class: normalizeClass(["webphone__channel-icon wp:size-3 wp:shrink-0", Xm(e.value) ? "wp:text-status-hold" : Ym(e.value) ? "wp:text-[var(--color-red)]" : $.value === e.value.toString() ? "wp:text-[var(--p-primary-color)]" : "wp:text-neutral-400"]),
|
|
18541
18544
|
"stroke-width": 1.8
|
|
18542
|
-
}, null, 8, ["class"]), createElementVNode("span", { class: normalizeClass(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold", Xm(e.value) ? "wp:text-status-hold" : Ym(e.value) ? "wp:text-[var(--color-red)]" :
|
|
18545
|
+
}, null, 8, ["class"]), createElementVNode("span", { class: normalizeClass(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold", Xm(e.value) ? "wp:text-status-hold" : Ym(e.value) ? "wp:text-[var(--color-red)]" : $.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))]),
|
|
18543
18546
|
createVNode(unref(TooltipProvider_default), null, {
|
|
18544
18547
|
default: withCtx(() => [createVNode(unref(Tooltip_default), null, {
|
|
18545
18548
|
default: withCtx(() => [createVNode(unref(TooltipTrigger_default), { "as-child": "" }, {
|
|
@@ -18577,7 +18580,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18577
18580
|
_: 1
|
|
18578
18581
|
}), createVNode(unref(TooltipContent_default), { class: "wp:flex wp:items-center wp:gap-2" }, {
|
|
18579
18582
|
default: withCtx(() => [t[9] ||= createElementVNode("span", null, "Configuración", -1), createVNode(unref(Kbd_default), null, {
|
|
18580
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
18583
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(B)) + ",", 1)]),
|
|
18581
18584
|
_: 1
|
|
18582
18585
|
})]),
|
|
18583
18586
|
_: 1
|
|
@@ -18590,9 +18593,9 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18590
18593
|
createElementVNode("div", _hoisted_9, [(openBlock(!0), createElementBlock(Fragment, null, renderList(x.channels, (e) => withDirectives((openBlock(), createBlock(CallDisplay_default, {
|
|
18591
18594
|
key: e.id,
|
|
18592
18595
|
"channel-id": e.id,
|
|
18593
|
-
"allow-input": !
|
|
18594
|
-
"is-web-call":
|
|
18595
|
-
"is-online": unref(
|
|
18596
|
+
"allow-input": !V.value,
|
|
18597
|
+
"is-web-call": V.value,
|
|
18598
|
+
"is-online": unref(q),
|
|
18596
18599
|
contacts: o.contacts,
|
|
18597
18600
|
user: o.extension,
|
|
18598
18601
|
"mask-number": o.maskNumber,
|
|
@@ -18613,8 +18616,8 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18613
18616
|
}, [createVNode(KeyPad_default)], 10, _hoisted_10),
|
|
18614
18617
|
createVNode(CallActions_default, {
|
|
18615
18618
|
class: "webphone__actions",
|
|
18616
|
-
style: normalizeStyle(
|
|
18617
|
-
destination:
|
|
18619
|
+
style: normalizeStyle(J.value ? "pointer-events: none;" : void 0),
|
|
18620
|
+
destination: V.value ? o.to : void 0,
|
|
18618
18621
|
"is-video": o.mode === "video",
|
|
18619
18622
|
"on-answer": o.onAnswer,
|
|
18620
18623
|
"on-hangup": o.onHangup,
|
|
@@ -18631,8 +18634,8 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18631
18634
|
"on-reject"
|
|
18632
18635
|
])
|
|
18633
18636
|
]),
|
|
18634
|
-
|
|
18635
|
-
|
|
18637
|
+
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),
|
|
18638
|
+
V.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", {
|
|
18636
18639
|
href: "https://www.nebula123.com",
|
|
18637
18640
|
target: "_blank",
|
|
18638
18641
|
class: "webphone__footer-link wp:text-[10px] wp:text-primary wp:hover:underline"
|
|
@@ -18670,17 +18673,17 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18670
18673
|
]),
|
|
18671
18674
|
createVNode(DocumentPip_default, {
|
|
18672
18675
|
ref_key: "documentPipRef",
|
|
18673
|
-
ref:
|
|
18676
|
+
ref: Cm,
|
|
18674
18677
|
active: Y.value,
|
|
18675
18678
|
"onUpdate:active": t[5] ||= (e) => Y.value = e,
|
|
18676
18679
|
"auto-open-on-blur": km.value,
|
|
18677
18680
|
"is-connected": x.isConnected,
|
|
18678
18681
|
"remote-number": bm.value,
|
|
18679
|
-
"caller-name":
|
|
18682
|
+
"caller-name": K.value,
|
|
18680
18683
|
"has-video": xm.value ?? !1,
|
|
18681
18684
|
"remote-stream": unref(E),
|
|
18682
18685
|
"local-stream": unref(D),
|
|
18683
|
-
destination:
|
|
18686
|
+
destination: V.value ? o.to : void 0,
|
|
18684
18687
|
"is-video": o.mode === "video",
|
|
18685
18688
|
"call-status": x.callStatus,
|
|
18686
18689
|
"is-muted": x.isMuted,
|