voxnix 1.0.10 → 1.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/README.md CHANGED
@@ -1,14 +1,22 @@
1
1
  # Voxnix
2
2
 
3
- Universal Voice Widget SDK. Works in React, Vue, Angular, plain HTML any stack.
3
+ Universal Voice Widget SDK — SIP-based floating phone widget. Works in React, Vue, Angular, plain HTML, or any stack.
4
+
5
+ **Current version: `1.0.12`**
6
+
7
+ ---
4
8
 
5
9
  ## What it does
6
10
 
7
11
  - Floating phone button (fixed position, configurable placement)
8
12
  - Auto-connects to your SIP/PABX server on init
9
13
  - Shows dialer numpad immediately after registration
10
- - Full call UI: incoming call, outgoing dialing, in-call controls (mute, hold, DTMF)
11
- - Fires callbacks for all call events so your app can react
14
+ - Full call UI: incoming call, outgoing dialing, in-call controls (mute, hold, DTMF keypad)
15
+ - **Agent status bar** Ready / Not Ready / AUX with optional custom AUX codes
16
+ - Fires callbacks for all call and agent-status events so your app can react
17
+ - Keyboard shortcuts: digits to dial, `Enter` to call, `Backspace` to delete, `0–9`/`*`/`#` for DTMF during a call
18
+
19
+ ---
12
20
 
13
21
  ## Installation
14
22
 
@@ -18,28 +26,41 @@ npm install voxnix
18
26
  yarn add voxnix
19
27
  ```
20
28
 
29
+ ---
30
+
21
31
  ## Quick start (any framework)
22
32
 
23
33
  ```js
24
34
  import { OmnixWidget } from 'voxnix';
25
35
 
26
36
  const widget = OmnixWidget.init({
27
- platform: 'sipjs',
28
37
  auth: {
29
- username: '1001',
30
- pwd_pbx: 'secret',
38
+ username: '1001',
39
+ pwd_pbx: 'secret',
31
40
  pabx_host: 'sip.example.com',
32
- port: 8089,
41
+ port: 8089, // optional, default 8089
33
42
  },
34
- placement: 'bottom-left', // 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'
35
43
 
44
+ // Required for agent status API (Ready / AUX / Not Ready)
45
+ 'X-CPAAS-Key-Fingerprint': 'your-cpaas-key-fingerprint-here',
46
+
47
+ placement: 'bottom-left', // 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'
48
+
49
+ // Agent status options (optional)
50
+ autoReady: true, // auto-set agent to Ready after SIP register (default: true)
51
+ showAuxButton: false, // show AUX button in status bar (default: false)
52
+ auxOptions: [], // array of { code, label } — custom AUX codes
53
+
54
+ // Callbacks
36
55
  onRegisterStatus: (status) => {
37
- console.log('SIP status:', status); // 'REGISTERED' | 'FAILED'
56
+ // status: 'REGISTERED' | { status: 'FAILED', reason: string }
57
+ console.log('SIP status:', status);
38
58
  },
39
- onIncomingCall: (data) => console.log('Incoming:', data),
40
- onCallAnswered: (data) => console.log('Answered:', data),
41
- onCallEnded: (data) => console.log('Ended:', data),
42
- onCallUnanswered: () => console.log('Missed call'),
59
+ onAgentStatus: (status) => console.log('Agent:', status), // 'READY' | 'NOT_READY' | 'AUX'
60
+ onIncomingCall: (data) => console.log('Incoming:', data),
61
+ onCallAnswered: (data) => console.log('Answered:', data),
62
+ onCallEnded: (data) => console.log('Ended:', data),
63
+ onCallUnanswered: () => console.log('Missed call'),
43
64
  });
44
65
 
45
66
  // Imperative controls (optional — widget has its own UI)
@@ -54,17 +75,155 @@ widget.dial('1002'); // programmatic dial
54
75
  widget.destroy(); // unmount widget
55
76
  ```
56
77
 
57
- ### Custom container or offset
78
+ ---
79
+
80
+ ## Config reference
81
+
82
+ ### Top-level options
83
+
84
+ | Option | Type | Default | Description |
85
+ |-----------------------------|--------------------------------------------------------------------|-----------------|-----------------------------------------------------------------|
86
+ | `auth` | `object` | — | SIP credentials (see [auth object](#auth-object)) |
87
+ | `pabxConfig` | `{ auth: object }` | — | Alternative config shape — use `pabxConfig.auth` instead of `auth` |
88
+ | `X-CPAAS-Key-Fingerprint` | `string` | — | **Required** for agent status API calls. See [section below](#x-cpaas-key-fingerprint) |
89
+ | `fingerprint` | `string` | — | Alias for `X-CPAAS-Key-Fingerprint` |
90
+ | `cpaasKeyFingerprint` | `string` | — | Alias for `X-CPAAS-Key-Fingerprint` |
91
+ | `placement` | `'bottom-left'` \| `'bottom-right'` \| `'top-left'` \| `'top-right'` | `'bottom-left'` | Fixed position of the floating widget |
92
+ | `offset` | `{ bottom?, top?, left?, right? }` | — | CSS pixel coords — overrides `placement` |
93
+ | `container` | `string` \| `HTMLElement` | — | Mount target. Auto-creates `<div id="omnix-widget-root">` if omitted |
94
+ | `autoReady` | `boolean` | `true` | Auto-call the Ready API right after SIP registration |
95
+ | `showAuxButton` | `boolean` | `false` | Show the AUX menu in the agent status bar |
96
+ | `auxOptions` | `Array<{ code: string, label: string }>` | `[]` | Custom AUX reason codes shown in the status dropdown |
97
+ | `onRegisterStatus` | `(status) => void` | — | `'REGISTERED'` or `{ status: 'FAILED', reason: string }` |
98
+ | `onAgentStatus` | `(status: string) => void` | — | `'READY'` \| `'NOT_READY'` \| `'AUX'` |
99
+ | `onIncomingCall` | `(data) => void` | — | Fired on incoming SIP INVITE |
100
+ | `onCallAnswered` | `(data) => void` | — | Fired when call is established |
101
+ | `onCallEnded` | `(data) => void` | — | Fired on BYE / hangup |
102
+ | `onCallUnanswered` | `() => void` | — | Fired when incoming call is not answered (missed) |
103
+
104
+ ### `auth` object
105
+
106
+ | Field | Type | Description |
107
+ |-------------|----------|------------------------------------------|
108
+ | `username` | `string` | SIP username / extension number |
109
+ | `user_pbx` | `string` | Alias for `username` |
110
+ | `pwd_pbx` | `string` | SIP password |
111
+ | `secret` | `string` | Alias for `pwd_pbx` |
112
+ | `pabx_host` | `string` | SIP domain / WSS host (strips `http(s)://`) |
113
+ | `pbxurl` | `string` | Alias for `pabx_host` |
114
+ | `port` | `number` | WSS port (default `8089`) |
115
+
116
+ ---
117
+
118
+ ## `X-CPAAS-Key-Fingerprint`
119
+
120
+ This key is the **API authentication credential** used when the widget calls the CPaaS extension status endpoint:
121
+
122
+ ```
123
+ POST https://api-cpaas.omnix.co.id/voice/extensions/status
124
+ Header: X-CPAAS-Key-Fingerprint: <your-fingerprint>
125
+ ```
126
+
127
+ The endpoint is hit automatically whenever the agent status changes (Ready / AUX / Not Ready). Without this key, status updates will silently fail and — if `autoReady: true` (default) — the widget will report `FAILED` registration even if the SIP connection itself succeeded.
128
+
129
+ ### Accepted config locations
130
+
131
+ The widget looks for the fingerprint in the following order, using the first match:
132
+
133
+ | Priority | Config key | Example |
134
+ |----------|------------|---------|
135
+ | 1 | `'X-CPAAS-Key-Fingerprint'` (top-level) | `{ 'X-CPAAS-Key-Fingerprint': 'abc123', auth: { ... } }` |
136
+ | 2 | `fingerprint` (top-level) | `{ fingerprint: 'abc123', auth: { ... } }` |
137
+ | 3 | `cpaasKeyFingerprint` (top-level) | `{ cpaasKeyFingerprint: 'abc123', auth: { ... } }` |
138
+ | 4 | `env.fingerprint` | `{ env: { fingerprint: 'abc123' }, auth: { ... } }` |
139
+ | 5 | `env.X_CPAAS_Key_Fingerprint` | `{ env: { X_CPAAS_Key_Fingerprint: 'abc123' }, auth: { ... } }` |
140
+ | 6 | `pabxConfig['X-CPAAS-Key-Fingerprint']` | `{ pabxConfig: { 'X-CPAAS-Key-Fingerprint': 'abc123', auth: { ... } } }` |
141
+
142
+ ### Recommended usage
143
+
144
+ ```js
145
+ // Option A — top-level key (simplest)
146
+ OmnixWidget.init({
147
+ 'X-CPAAS-Key-Fingerprint': 'your-fingerprint-here',
148
+ auth: { username: '1001', pwd_pbx: 'secret', pabx_host: 'sip.example.com' },
149
+ autoReady: true,
150
+ });
151
+
152
+ // Option B — inside pabxConfig (if your backend returns this shape)
153
+ OmnixWidget.init({
154
+ pabxConfig: {
155
+ 'X-CPAAS-Key-Fingerprint': 'your-fingerprint-here',
156
+ auth: { username: '1001', pwd_pbx: 'secret', pabx_host: 'sip.example.com' },
157
+ },
158
+ });
159
+
160
+ // Option C — via env object
161
+ OmnixWidget.init({
162
+ env: { fingerprint: 'your-fingerprint-here' },
163
+ auth: { username: '1001', pwd_pbx: 'secret', pabx_host: 'sip.example.com' },
164
+ });
165
+ ```
166
+
167
+ > **Important:** If the fingerprint is missing and `autoReady: true` (default), the widget will emit `{ status: 'FAILED', reason: 'Failed to hit extension ready API' }` via `onRegisterStatus` even though the SIP connection itself was successful. Set `autoReady: false` if you do not have a fingerprint yet.
168
+
169
+ ### Custom container / offset
58
170
 
59
171
  ```js
60
172
  OmnixWidget.init({
61
173
  container: '#my-widget-slot', // CSS selector or DOM element
62
- // or use offset to position precisely (bypasses placement classes)
63
- offset: { bottom: 80, left: 10 },
174
+ // or
175
+ offset: { bottom: 80, left: 10 }, // exact pixel position (bypasses placement)
64
176
  // ... rest of config
65
177
  });
66
178
  ```
67
179
 
180
+ ---
181
+
182
+ ## Instance API
183
+
184
+ `OmnixWidget.init()` returns an instance with these methods:
185
+
186
+ | Method | Description |
187
+ |----------------|------------------------------------------------------------|
188
+ | `answer()` | Answer the current incoming call |
189
+ | `hangup()` | End the active / outgoing call |
190
+ | `reject()` | Reject the current incoming call |
191
+ | `mute(bool)` | `true` = mute microphone, `false` = unmute |
192
+ | `hold(bool)` | `true` = put call on hold, `false` = resume |
193
+ | `dial(number)` | Programmatically dial a number string |
194
+ | `destroy()` | Unmount the widget and clean up the DOM container |
195
+
196
+ ---
197
+
198
+ ## Agent status bar
199
+
200
+ When `autoReady: false` or `showAuxButton: true` a status bar appears at the bottom of the dialer.
201
+
202
+ > **Note:** The agent status bar calls the CPaaS extension status API. You **must** provide `X-CPAAS-Key-Fingerprint` (or one of its aliases) for these calls to succeed.
203
+
204
+ ```js
205
+ OmnixWidget.init({
206
+ auth: { ... },
207
+ 'X-CPAAS-Key-Fingerprint': 'your-fingerprint-here',
208
+ autoReady: false, // agent starts as NOT_READY; must go Ready manually
209
+ showAuxButton: true, // show AUX dropdown
210
+ auxOptions: [
211
+ { code: 'BRK', label: 'Break' },
212
+ { code: 'LCH', label: 'Lunch' },
213
+ { code: 'TRN', label: 'Training' },
214
+ ],
215
+ onAgentStatus: (status) => console.log('Agent status changed:', status),
216
+ });
217
+ ```
218
+
219
+ | Status | Badge colour | Meaning |
220
+ |-------------|--------------|--------------------------------------|
221
+ | `READY` | 🟢 Green | Agent is available for calls |
222
+ | `NOT_READY` | ⚪ Gray | Agent is unavailable |
223
+ | `AUX` | 🟡 Amber | Agent is on a break / custom reason |
224
+
225
+ ---
226
+
68
227
  ## React integration
69
228
 
70
229
  ```jsx
@@ -76,13 +235,22 @@ function App() {
76
235
 
77
236
  useEffect(() => {
78
237
  widgetRef.current = OmnixWidget.init({
79
- platform: 'sipjs',
80
- auth: { username: '1001', pwd_pbx: 'secret', pabx_host: 'sip.example.com' },
81
- placement: 'bottom-right',
82
- onIncomingCall: (data) => { /* navigate, show notification, etc. */ },
83
- onCallAnswered: (data) => { /* routing logic */ },
84
- onCallEnded: () => { /* cleanup */ },
85
- onRegisterStatus: (s) => { /* update UI */ },
238
+ auth: {
239
+ username: '1001',
240
+ pwd_pbx: 'secret',
241
+ pabx_host: 'sip.example.com',
242
+ },
243
+ 'X-CPAAS-Key-Fingerprint': 'your-fingerprint-here',
244
+ placement: 'bottom-right',
245
+ autoReady: true,
246
+ showAuxButton: true,
247
+ auxOptions: [{ code: 'BRK', label: 'Break' }],
248
+
249
+ onIncomingCall: (data) => { /* navigate, show notification, etc. */ },
250
+ onCallAnswered: (data) => { /* routing logic */ },
251
+ onCallEnded: () => { /* cleanup */ },
252
+ onRegisterStatus: (s) => { /* update UI */ },
253
+ onAgentStatus: (s) => { /* s: 'READY' | 'NOT_READY' | 'AUX' */ },
86
254
  });
87
255
 
88
256
  return () => widgetRef.current?.destroy();
@@ -92,96 +260,114 @@ function App() {
92
260
  }
93
261
  ```
94
262
 
263
+ ---
264
+
95
265
  ## Vue integration
96
266
 
97
267
  ```js
98
- // composable or mounted()
99
268
  import { OmnixWidget } from 'voxnix';
100
269
 
270
+ // inside setup() or options API
101
271
  onMounted(() => {
102
- const widget = OmnixWidget.init({ ... });
272
+ const widget = OmnixWidget.init({
273
+ auth: { username: '1001', pwd_pbx: 'secret', pabx_host: 'sip.example.com' },
274
+ 'X-CPAAS-Key-Fingerprint': 'your-fingerprint-here',
275
+ autoReady: false,
276
+ showAuxButton: true,
277
+ auxOptions: [{ code: 'BRK', label: 'Break' }],
278
+ });
103
279
  onUnmounted(() => widget.destroy());
104
280
  });
105
281
  ```
106
282
 
283
+ ---
284
+
107
285
  ## Via CDN (plain HTML, no bundler)
108
286
 
109
287
  ```html
110
- <!-- Include React CDN first -->
111
- <script src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
112
- <script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
113
-
114
- <!-- Or use the self-contained IIFE build (includes React) -->
115
- <script src="./dist/voxnix.iife.js"></script>
288
+ <!-- Self-contained IIFE build (bundles React) -->
289
+ <script src="https://unpkg.com/voxnix/dist/voxnix.iife.js"></script>
116
290
  <script>
117
291
  OmnixWidget.init({
118
- platform: 'sipjs',
119
292
  auth: {
120
- username: '1001',
121
- pwd_pbx: 'secret',
293
+ username: '1001',
294
+ pwd_pbx: 'secret',
122
295
  pabx_host: 'sip.example.com',
123
296
  },
124
- placement: 'bottom-right',
297
+ 'X-CPAAS-Key-Fingerprint': 'your-fingerprint-here',
298
+ placement: 'bottom-right',
299
+ autoReady: true,
300
+ showAuxButton: true,
301
+ auxOptions: [
302
+ { code: 'BRK', label: 'Break' },
303
+ { code: 'LCH', label: 'Lunch' },
304
+ ],
125
305
  onRegisterStatus: (s) => console.log('SIP:', s),
126
306
  onIncomingCall: (d) => console.log('Incoming:', d),
307
+ onAgentStatus: (s) => console.log('Agent:', s),
127
308
  });
128
309
  </script>
129
310
  ```
130
311
 
131
- ## Config reference
312
+ > If you need to use your own React instance, include `react@18` and `react-dom@18` UMD builds **before** the script tag and use `dist/voxnix.js` (ESM) or `dist/voxnix.umd.cjs` (CJS) instead.
132
313
 
133
- | Option | Type | Default | Description |
134
- |---------------------|------------------------------------------------|-----------------|--------------------------------------------------|
135
- | `platform` | `string` | `'sipjs'` | Voice platform. Currently: `'sipjs'` |
136
- | `auth` | `object` | — | SIP credentials (see below) |
137
- | `placement` | `'bottom-left'│'bottom-right'│'top-left'│'top-right'` | `'bottom-left'` | Fixed position of the floating widget |
138
- | `offset` | `{ bottom?, top?, left?, right? }` | `undefined` | CSS pixel coords — overrides `placement` |
139
- | `container` | `string │ HTMLElement` | `undefined` | Mount target. Auto-creates `div` if omitted |
140
- | `onIncomingCall` | `(data) => void` | — | Fired on incoming SIP INVITE |
141
- | `onCallAnswered` | `(data) => void` | — | Fired when call is established |
142
- | `onCallEnded` | `(data) => void` | — | Fired on BYE / hangup |
143
- | `onCallUnanswered` | `() => void` | — | Fired when incoming call is not answered |
144
- | `onRegisterStatus` | `(status: string) => void` | — | `'REGISTERED'` or `'FAILED'` |
314
+ ---
145
315
 
146
- ### `auth` object
316
+ ## Keyboard shortcuts
147
317
 
148
- | Field | Description |
149
- |---------------|---------------------------------|
150
- | `username` | SIP username / extension |
151
- | `pwd_pbx` | SIP password |
152
- | `pabx_host` | SIP domain / WSS host |
153
- | `port` | WSS port (default `8089`) |
318
+ These shortcuts are active whenever the dialer widget is open:
154
319
 
155
- ## Instance API
320
+ | Key | State | Action |
321
+ |------------------|---------|-------------------------------|
322
+ | `0–9`, `*`, `#` | Idle | Append digit to dial input |
323
+ | `Backspace` | Idle | Delete last digit |
324
+ | `Enter` | Idle | Dial the current number |
325
+ | `0–9`, `*`, `#` | In-call | Send DTMF tone |
156
326
 
157
- `OmnixWidget.init()` returns an instance with these methods:
158
-
159
- | Method | Description |
160
- |-----------------|------------------------------------|
161
- | `answer()` | Answer incoming call |
162
- | `hangup()` | End active call |
163
- | `reject()` | Reject incoming call |
164
- | `mute(bool)` | Mute / unmute microphone |
165
- | `hold(bool)` | Hold / resume call |
166
- | `dial(number)` | Programmatically dial a number |
167
- | `destroy()` | Unmount widget and clean up |
327
+ ---
168
328
 
169
329
  ## Build
170
330
 
171
331
  ```bash
172
- # ESM + UMD (peer React, for npm consumers)
332
+ # ESM + UMD (peer React for npm consumers)
173
333
  yarn build:lib
174
334
 
175
- # Self-contained IIFE (bundles React, for CDN/script tag)
335
+ # Self-contained IIFE (bundles React for CDN / script tag)
176
336
  yarn build:iife
177
337
 
178
- # Both
338
+ # Both outputs
179
339
  yarn build
180
340
  ```
181
341
 
342
+ Output files in `dist/`:
343
+
344
+ | File | Format | React | Use case |
345
+ |--------------------|--------|----------|-----------------------|
346
+ | `voxnix.js` | ESM | peer dep | `import` / bundlers |
347
+ | `voxnix.umd.cjs` | UMD | peer dep | CommonJS / `require` |
348
+ | `voxnix.iife.js` | IIFE | bundled | `<script>` / CDN |
349
+
350
+ ---
351
+
182
352
  ## Development
183
353
 
184
354
  ```bash
185
355
  yarn install
186
- yarn dev
356
+ yarn dev # Vite dev server with hot reload
357
+ yarn watch # Vite library watch mode
187
358
  ```
359
+
360
+ ---
361
+
362
+ ## Changelog
363
+
364
+ ### v1.0.12
365
+ - Rollback DevToast / console interceptor feature
366
+
367
+ ### v1.0.11 and earlier
368
+ - Agent status bar (Ready / Not Ready / AUX) with configurable `auxOptions`
369
+ - `onAgentStatus` callback
370
+ - `autoReady` and `showAuxButton` config options
371
+ - Keyboard shortcut support for dialer and DTMF
372
+ - React 17 / 18 compatibility layer
373
+ - Dual-SIP auth shape support (`auth` and `pabxConfig.auth`)
@@ -351,7 +351,7 @@ React keys must be passed directly to JSX without using spread:
351
351
  * Counter block mode compatible with Dr Brian Gladman fileenc.c
352
352
  * derived from CryptoJS.mode.CTR
353
353
  * Jan Hruby jhruby.web@gmail.com
354
- */return i.mode.CTRGladman=function(){var l=i.lib.BlockCipherMode.extend();function f(S){if((S>>24&255)===255){var w=S>>16&255,C=S>>8&255,b=S&255;w===255?(w=0,C===255?(C=0,b===255?b=0:++b):++C):++w,S=0,S+=w<<16,S+=C<<8,S+=b}else S+=16777216;return S}function p(S){return(S[0]=f(S[0]))===0&&(S[1]=f(S[1])),S}var v=l.Encryptor=l.extend({processBlock:function(S,w){var C=this._cipher,b=C.blockSize,R=this._iv,T=this._counter;R&&(T=this._counter=R.slice(0),this._iv=void 0),p(T);var H=T.slice(0);C.encryptBlock(H,0);for(var P=0;P<b;P++)S[w+P]^=H[P]}});return l.Decryptor=v,l}(),i.mode.CTRGladman})}(mx)),mx.exports}var yx={exports:{}},wS;function CR(){return wS||(wS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.mode.OFB=function(){var l=i.lib.BlockCipherMode.extend(),f=l.Encryptor=l.extend({processBlock:function(p,v){var S=this._cipher,w=S.blockSize,C=this._iv,b=this._keystream;C&&(b=this._keystream=C.slice(0),this._iv=void 0),S.encryptBlock(b,0);for(var R=0;R<w;R++)p[v+R]^=b[R]}});return l.Decryptor=f,l}(),i.mode.OFB})}(yx)),yx.exports}var xx={exports:{}},bS;function SR(){return bS||(bS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.mode.ECB=function(){var l=i.lib.BlockCipherMode.extend();return l.Encryptor=l.extend({processBlock:function(f,p){this._cipher.encryptBlock(f,p)}}),l.Decryptor=l.extend({processBlock:function(f,p){this._cipher.decryptBlock(f,p)}}),l}(),i.mode.ECB})}(xx)),xx.exports}var Ex={exports:{}},_S;function wR(){return _S||(_S=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.pad.AnsiX923={pad:function(l,f){var p=l.sigBytes,v=f*4,S=v-p%v,w=p+S-1;l.clamp(),l.words[w>>>2]|=S<<24-w%4*8,l.sigBytes+=S},unpad:function(l){var f=l.words[l.sigBytes-1>>>2]&255;l.sigBytes-=f}},i.pad.Ansix923})}(Ex)),Ex.exports}var Cx={exports:{}},DS;function bR(){return DS||(DS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.pad.Iso10126={pad:function(l,f){var p=f*4,v=p-l.sigBytes%p;l.concat(i.lib.WordArray.random(v-1)).concat(i.lib.WordArray.create([v<<24],1))},unpad:function(l){var f=l.words[l.sigBytes-1>>>2]&255;l.sigBytes-=f}},i.pad.Iso10126})}(Cx)),Cx.exports}var Sx={exports:{}},TS;function _R(){return TS||(TS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.pad.Iso97971={pad:function(l,f){l.concat(i.lib.WordArray.create([2147483648],1)),i.pad.ZeroPadding.pad(l,f)},unpad:function(l){i.pad.ZeroPadding.unpad(l),l.sigBytes--}},i.pad.Iso97971})}(Sx)),Sx.exports}var wx={exports:{}},RS;function DR(){return RS||(RS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.pad.ZeroPadding={pad:function(l,f){var p=f*4;l.clamp(),l.sigBytes+=p-(l.sigBytes%p||p)},unpad:function(l){for(var f=l.words,p=l.sigBytes-1,p=l.sigBytes-1;p>=0;p--)if(f[p>>>2]>>>24-p%4*8&255){l.sigBytes=p+1;break}}},i.pad.ZeroPadding})}(wx)),wx.exports}var bx={exports:{}},AS;function TR(){return AS||(AS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.pad.NoPadding={pad:function(){},unpad:function(){}},i.pad.NoPadding})}(bx)),bx.exports}var _x={exports:{}},kS;function RR(){return kS||(kS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return function(l){var f=i,p=f.lib,v=p.CipherParams,S=f.enc,w=S.Hex,C=f.format;C.Hex={stringify:function(b){return b.ciphertext.toString(w)},parse:function(b){var R=w.parse(b);return v.create({ciphertext:R})}}}(),i.format.Hex})}(_x)),_x.exports}var Dx={exports:{}},FS;function AR(){return FS||(FS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),Cc(),Sc(),pu(),si())})(Lt,function(i){return function(){var l=i,f=l.lib,p=f.BlockCipher,v=l.algo,S=[],w=[],C=[],b=[],R=[],T=[],H=[],P=[],j=[],z=[];(function(){for(var U=[],q=0;q<256;q++)q<128?U[q]=q<<1:U[q]=q<<1^283;for(var K=0,X=0,q=0;q<256;q++){var ee=X^X<<1^X<<2^X<<3^X<<4;ee=ee>>>8^ee&255^99,S[K]=ee,w[ee]=K;var A=U[K],Ee=U[A],Z=U[Ee],F=U[ee]*257^ee*16843008;C[K]=F<<24|F>>>8,b[K]=F<<16|F>>>16,R[K]=F<<8|F>>>24,T[K]=F;var F=Z*16843009^Ee*65537^A*257^K*16843008;H[ee]=F<<24|F>>>8,P[ee]=F<<16|F>>>16,j[ee]=F<<8|F>>>24,z[ee]=F,K?(K=A^U[U[U[Z^A]]],X^=U[U[X]]):K=X=1}})();var B=[0,1,2,4,8,16,32,64,128,27,54],M=v.AES=p.extend({_doReset:function(){var U;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var q=this._keyPriorReset=this._key,K=q.words,X=q.sigBytes/4,ee=this._nRounds=X+6,A=(ee+1)*4,Ee=this._keySchedule=[],Z=0;Z<A;Z++)Z<X?Ee[Z]=K[Z]:(U=Ee[Z-1],Z%X?X>6&&Z%X==4&&(U=S[U>>>24]<<24|S[U>>>16&255]<<16|S[U>>>8&255]<<8|S[U&255]):(U=U<<8|U>>>24,U=S[U>>>24]<<24|S[U>>>16&255]<<16|S[U>>>8&255]<<8|S[U&255],U^=B[Z/X|0]<<24),Ee[Z]=Ee[Z-X]^U);for(var F=this._invKeySchedule=[],L=0;L<A;L++){var Z=A-L;if(L%4)var U=Ee[Z];else var U=Ee[Z-4];L<4||Z<=4?F[L]=U:F[L]=H[S[U>>>24]]^P[S[U>>>16&255]]^j[S[U>>>8&255]]^z[S[U&255]]}}},encryptBlock:function(U,q){this._doCryptBlock(U,q,this._keySchedule,C,b,R,T,S)},decryptBlock:function(U,q){var K=U[q+1];U[q+1]=U[q+3],U[q+3]=K,this._doCryptBlock(U,q,this._invKeySchedule,H,P,j,z,w);var K=U[q+1];U[q+1]=U[q+3],U[q+3]=K},_doCryptBlock:function(U,q,K,X,ee,A,Ee,Z){for(var F=this._nRounds,L=U[q]^K[0],N=U[q+1]^K[1],De=U[q+2]^K[2],be=U[q+3]^K[3],$e=4,ge=1;ge<F;ge++){var Ce=X[L>>>24]^ee[N>>>16&255]^A[De>>>8&255]^Ee[be&255]^K[$e++],He=X[N>>>24]^ee[De>>>16&255]^A[be>>>8&255]^Ee[L&255]^K[$e++],_e=X[De>>>24]^ee[be>>>16&255]^A[L>>>8&255]^Ee[N&255]^K[$e++],$=X[be>>>24]^ee[L>>>16&255]^A[N>>>8&255]^Ee[De&255]^K[$e++];L=Ce,N=He,De=_e,be=$}var Ce=(Z[L>>>24]<<24|Z[N>>>16&255]<<16|Z[De>>>8&255]<<8|Z[be&255])^K[$e++],He=(Z[N>>>24]<<24|Z[De>>>16&255]<<16|Z[be>>>8&255]<<8|Z[L&255])^K[$e++],_e=(Z[De>>>24]<<24|Z[be>>>16&255]<<16|Z[L>>>8&255]<<8|Z[N&255])^K[$e++],$=(Z[be>>>24]<<24|Z[L>>>16&255]<<16|Z[N>>>8&255]<<8|Z[De&255])^K[$e++];U[q]=Ce,U[q+1]=He,U[q+2]=_e,U[q+3]=$},keySize:256/32});l.AES=p._createHelper(M)}(),i.AES})}(Dx)),Dx.exports}var Tx={exports:{}},OS;function kR(){return OS||(OS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),Cc(),Sc(),pu(),si())})(Lt,function(i){return function(){var l=i,f=l.lib,p=f.WordArray,v=f.BlockCipher,S=l.algo,w=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],C=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],b=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],R=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],T=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],H=S.DES=v.extend({_doReset:function(){for(var B=this._key,M=B.words,U=[],q=0;q<56;q++){var K=w[q]-1;U[q]=M[K>>>5]>>>31-K%32&1}for(var X=this._subKeys=[],ee=0;ee<16;ee++){for(var A=X[ee]=[],Ee=b[ee],q=0;q<24;q++)A[q/6|0]|=U[(C[q]-1+Ee)%28]<<31-q%6,A[4+(q/6|0)]|=U[28+(C[q+24]-1+Ee)%28]<<31-q%6;A[0]=A[0]<<1|A[0]>>>31;for(var q=1;q<7;q++)A[q]=A[q]>>>(q-1)*4+3;A[7]=A[7]<<5|A[7]>>>27}for(var Z=this._invSubKeys=[],q=0;q<16;q++)Z[q]=X[15-q]},encryptBlock:function(B,M){this._doCryptBlock(B,M,this._subKeys)},decryptBlock:function(B,M){this._doCryptBlock(B,M,this._invSubKeys)},_doCryptBlock:function(B,M,U){this._lBlock=B[M],this._rBlock=B[M+1],P.call(this,4,252645135),P.call(this,16,65535),j.call(this,2,858993459),j.call(this,8,16711935),P.call(this,1,1431655765);for(var q=0;q<16;q++){for(var K=U[q],X=this._lBlock,ee=this._rBlock,A=0,Ee=0;Ee<8;Ee++)A|=R[Ee][((ee^K[Ee])&T[Ee])>>>0];this._lBlock=ee,this._rBlock=X^A}var Z=this._lBlock;this._lBlock=this._rBlock,this._rBlock=Z,P.call(this,1,1431655765),j.call(this,8,16711935),j.call(this,2,858993459),P.call(this,16,65535),P.call(this,4,252645135),B[M]=this._lBlock,B[M+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function P(B,M){var U=(this._lBlock>>>B^this._rBlock)&M;this._rBlock^=U,this._lBlock^=U<<B}function j(B,M){var U=(this._rBlock>>>B^this._lBlock)&M;this._lBlock^=U,this._rBlock^=U<<B}l.DES=v._createHelper(H);var z=S.TripleDES=v.extend({_doReset:function(){var B=this._key,M=B.words;if(M.length!==2&&M.length!==4&&M.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var U=M.slice(0,2),q=M.length<4?M.slice(0,2):M.slice(2,4),K=M.length<6?M.slice(0,2):M.slice(4,6);this._des1=H.createEncryptor(p.create(U)),this._des2=H.createEncryptor(p.create(q)),this._des3=H.createEncryptor(p.create(K))},encryptBlock:function(B,M){this._des1.encryptBlock(B,M),this._des2.decryptBlock(B,M),this._des3.encryptBlock(B,M)},decryptBlock:function(B,M){this._des3.decryptBlock(B,M),this._des2.encryptBlock(B,M),this._des1.decryptBlock(B,M)},keySize:192/32,ivSize:64/32,blockSize:64/32});l.TripleDES=v._createHelper(z)}(),i.TripleDES})}(Tx)),Tx.exports}var Rx={exports:{}},BS;function FR(){return BS||(BS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),Cc(),Sc(),pu(),si())})(Lt,function(i){return function(){var l=i,f=l.lib,p=f.StreamCipher,v=l.algo,S=v.RC4=p.extend({_doReset:function(){for(var b=this._key,R=b.words,T=b.sigBytes,H=this._S=[],P=0;P<256;P++)H[P]=P;for(var P=0,j=0;P<256;P++){var z=P%T,B=R[z>>>2]>>>24-z%4*8&255;j=(j+H[P]+B)%256;var M=H[P];H[P]=H[j],H[j]=M}this._i=this._j=0},_doProcessBlock:function(b,R){b[R]^=w.call(this)},keySize:256/32,ivSize:0});function w(){for(var b=this._S,R=this._i,T=this._j,H=0,P=0;P<4;P++){R=(R+1)%256,T=(T+b[R])%256;var j=b[R];b[R]=b[T],b[T]=j,H|=b[(b[R]+b[T])%256]<<24-P*8}return this._i=R,this._j=T,H}l.RC4=p._createHelper(S);var C=v.RC4Drop=S.extend({cfg:S.cfg.extend({drop:192}),_doReset:function(){S._doReset.call(this);for(var b=this.cfg.drop;b>0;b--)w.call(this)}});l.RC4Drop=p._createHelper(C)}(),i.RC4})}(Rx)),Rx.exports}var Ax={exports:{}},MS;function OR(){return MS||(MS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),Cc(),Sc(),pu(),si())})(Lt,function(i){return function(){var l=i,f=l.lib,p=f.StreamCipher,v=l.algo,S=[],w=[],C=[],b=v.Rabbit=p.extend({_doReset:function(){for(var T=this._key.words,H=this.cfg.iv,P=0;P<4;P++)T[P]=(T[P]<<8|T[P]>>>24)&16711935|(T[P]<<24|T[P]>>>8)&4278255360;var j=this._X=[T[0],T[3]<<16|T[2]>>>16,T[1],T[0]<<16|T[3]>>>16,T[2],T[1]<<16|T[0]>>>16,T[3],T[2]<<16|T[1]>>>16],z=this._C=[T[2]<<16|T[2]>>>16,T[0]&4294901760|T[1]&65535,T[3]<<16|T[3]>>>16,T[1]&4294901760|T[2]&65535,T[0]<<16|T[0]>>>16,T[2]&4294901760|T[3]&65535,T[1]<<16|T[1]>>>16,T[3]&4294901760|T[0]&65535];this._b=0;for(var P=0;P<4;P++)R.call(this);for(var P=0;P<8;P++)z[P]^=j[P+4&7];if(H){var B=H.words,M=B[0],U=B[1],q=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,K=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360,X=q>>>16|K&4294901760,ee=K<<16|q&65535;z[0]^=q,z[1]^=X,z[2]^=K,z[3]^=ee,z[4]^=q,z[5]^=X,z[6]^=K,z[7]^=ee;for(var P=0;P<4;P++)R.call(this)}},_doProcessBlock:function(T,H){var P=this._X;R.call(this),S[0]=P[0]^P[5]>>>16^P[3]<<16,S[1]=P[2]^P[7]>>>16^P[5]<<16,S[2]=P[4]^P[1]>>>16^P[7]<<16,S[3]=P[6]^P[3]>>>16^P[1]<<16;for(var j=0;j<4;j++)S[j]=(S[j]<<8|S[j]>>>24)&16711935|(S[j]<<24|S[j]>>>8)&4278255360,T[H+j]^=S[j]},blockSize:128/32,ivSize:64/32});function R(){for(var T=this._X,H=this._C,P=0;P<8;P++)w[P]=H[P];H[0]=H[0]+1295307597+this._b|0,H[1]=H[1]+3545052371+(H[0]>>>0<w[0]>>>0?1:0)|0,H[2]=H[2]+886263092+(H[1]>>>0<w[1]>>>0?1:0)|0,H[3]=H[3]+1295307597+(H[2]>>>0<w[2]>>>0?1:0)|0,H[4]=H[4]+3545052371+(H[3]>>>0<w[3]>>>0?1:0)|0,H[5]=H[5]+886263092+(H[4]>>>0<w[4]>>>0?1:0)|0,H[6]=H[6]+1295307597+(H[5]>>>0<w[5]>>>0?1:0)|0,H[7]=H[7]+3545052371+(H[6]>>>0<w[6]>>>0?1:0)|0,this._b=H[7]>>>0<w[7]>>>0?1:0;for(var P=0;P<8;P++){var j=T[P]+H[P],z=j&65535,B=j>>>16,M=((z*z>>>17)+z*B>>>15)+B*B,U=((j&4294901760)*j|0)+((j&65535)*j|0);C[P]=M^U}T[0]=C[0]+(C[7]<<16|C[7]>>>16)+(C[6]<<16|C[6]>>>16)|0,T[1]=C[1]+(C[0]<<8|C[0]>>>24)+C[7]|0,T[2]=C[2]+(C[1]<<16|C[1]>>>16)+(C[0]<<16|C[0]>>>16)|0,T[3]=C[3]+(C[2]<<8|C[2]>>>24)+C[1]|0,T[4]=C[4]+(C[3]<<16|C[3]>>>16)+(C[2]<<16|C[2]>>>16)|0,T[5]=C[5]+(C[4]<<8|C[4]>>>24)+C[3]|0,T[6]=C[6]+(C[5]<<16|C[5]>>>16)+(C[4]<<16|C[4]>>>16)|0,T[7]=C[7]+(C[6]<<8|C[6]>>>24)+C[5]|0}l.Rabbit=p._createHelper(b)}(),i.Rabbit})}(Ax)),Ax.exports}var kx={exports:{}},NS;function BR(){return NS||(NS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),Cc(),Sc(),pu(),si())})(Lt,function(i){return function(){var l=i,f=l.lib,p=f.StreamCipher,v=l.algo,S=[],w=[],C=[],b=v.RabbitLegacy=p.extend({_doReset:function(){var T=this._key.words,H=this.cfg.iv,P=this._X=[T[0],T[3]<<16|T[2]>>>16,T[1],T[0]<<16|T[3]>>>16,T[2],T[1]<<16|T[0]>>>16,T[3],T[2]<<16|T[1]>>>16],j=this._C=[T[2]<<16|T[2]>>>16,T[0]&4294901760|T[1]&65535,T[3]<<16|T[3]>>>16,T[1]&4294901760|T[2]&65535,T[0]<<16|T[0]>>>16,T[2]&4294901760|T[3]&65535,T[1]<<16|T[1]>>>16,T[3]&4294901760|T[0]&65535];this._b=0;for(var z=0;z<4;z++)R.call(this);for(var z=0;z<8;z++)j[z]^=P[z+4&7];if(H){var B=H.words,M=B[0],U=B[1],q=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,K=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360,X=q>>>16|K&4294901760,ee=K<<16|q&65535;j[0]^=q,j[1]^=X,j[2]^=K,j[3]^=ee,j[4]^=q,j[5]^=X,j[6]^=K,j[7]^=ee;for(var z=0;z<4;z++)R.call(this)}},_doProcessBlock:function(T,H){var P=this._X;R.call(this),S[0]=P[0]^P[5]>>>16^P[3]<<16,S[1]=P[2]^P[7]>>>16^P[5]<<16,S[2]=P[4]^P[1]>>>16^P[7]<<16,S[3]=P[6]^P[3]>>>16^P[1]<<16;for(var j=0;j<4;j++)S[j]=(S[j]<<8|S[j]>>>24)&16711935|(S[j]<<24|S[j]>>>8)&4278255360,T[H+j]^=S[j]},blockSize:128/32,ivSize:64/32});function R(){for(var T=this._X,H=this._C,P=0;P<8;P++)w[P]=H[P];H[0]=H[0]+1295307597+this._b|0,H[1]=H[1]+3545052371+(H[0]>>>0<w[0]>>>0?1:0)|0,H[2]=H[2]+886263092+(H[1]>>>0<w[1]>>>0?1:0)|0,H[3]=H[3]+1295307597+(H[2]>>>0<w[2]>>>0?1:0)|0,H[4]=H[4]+3545052371+(H[3]>>>0<w[3]>>>0?1:0)|0,H[5]=H[5]+886263092+(H[4]>>>0<w[4]>>>0?1:0)|0,H[6]=H[6]+1295307597+(H[5]>>>0<w[5]>>>0?1:0)|0,H[7]=H[7]+3545052371+(H[6]>>>0<w[6]>>>0?1:0)|0,this._b=H[7]>>>0<w[7]>>>0?1:0;for(var P=0;P<8;P++){var j=T[P]+H[P],z=j&65535,B=j>>>16,M=((z*z>>>17)+z*B>>>15)+B*B,U=((j&4294901760)*j|0)+((j&65535)*j|0);C[P]=M^U}T[0]=C[0]+(C[7]<<16|C[7]>>>16)+(C[6]<<16|C[6]>>>16)|0,T[1]=C[1]+(C[0]<<8|C[0]>>>24)+C[7]|0,T[2]=C[2]+(C[1]<<16|C[1]>>>16)+(C[0]<<16|C[0]>>>16)|0,T[3]=C[3]+(C[2]<<8|C[2]>>>24)+C[1]|0,T[4]=C[4]+(C[3]<<16|C[3]>>>16)+(C[2]<<16|C[2]>>>16)|0,T[5]=C[5]+(C[4]<<8|C[4]>>>24)+C[3]|0,T[6]=C[6]+(C[5]<<16|C[5]>>>16)+(C[4]<<16|C[4]>>>16)|0,T[7]=C[7]+(C[6]<<8|C[6]>>>24)+C[5]|0}l.RabbitLegacy=p._createHelper(b)}(),i.RabbitLegacy})}(kx)),kx.exports}var Fx={exports:{}},HS;function MR(){return HS||(HS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),Cc(),Sc(),pu(),si())})(Lt,function(i){return function(){var l=i,f=l.lib,p=f.BlockCipher,v=l.algo;const S=16,w=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],C=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var b={pbox:[],sbox:[]};function R(z,B){let M=B>>24&255,U=B>>16&255,q=B>>8&255,K=B&255,X=z.sbox[0][M]+z.sbox[1][U];return X=X^z.sbox[2][q],X=X+z.sbox[3][K],X}function T(z,B,M){let U=B,q=M,K;for(let X=0;X<S;++X)U=U^z.pbox[X],q=R(z,U)^q,K=U,U=q,q=K;return K=U,U=q,q=K,q=q^z.pbox[S],U=U^z.pbox[S+1],{left:U,right:q}}function H(z,B,M){let U=B,q=M,K;for(let X=S+1;X>1;--X)U=U^z.pbox[X],q=R(z,U)^q,K=U,U=q,q=K;return K=U,U=q,q=K,q=q^z.pbox[1],U=U^z.pbox[0],{left:U,right:q}}function P(z,B,M){for(let ee=0;ee<4;ee++){z.sbox[ee]=[];for(let A=0;A<256;A++)z.sbox[ee][A]=C[ee][A]}let U=0;for(let ee=0;ee<S+2;ee++)z.pbox[ee]=w[ee]^B[U],U++,U>=M&&(U=0);let q=0,K=0,X=0;for(let ee=0;ee<S+2;ee+=2)X=T(z,q,K),q=X.left,K=X.right,z.pbox[ee]=q,z.pbox[ee+1]=K;for(let ee=0;ee<4;ee++)for(let A=0;A<256;A+=2)X=T(z,q,K),q=X.left,K=X.right,z.sbox[ee][A]=q,z.sbox[ee][A+1]=K;return!0}var j=v.Blowfish=p.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var z=this._keyPriorReset=this._key,B=z.words,M=z.sigBytes/4;P(b,B,M)}},encryptBlock:function(z,B){var M=T(b,z[B],z[B+1]);z[B]=M.left,z[B+1]=M.right},decryptBlock:function(z,B){var M=H(b,z[B],z[B+1]);z[B]=M.left,z[B+1]=M.right},blockSize:64/32,keySize:128/32,ivSize:64/32});l.Blowfish=p._createHelper(j)}(),i.Blowfish})}(Fx)),Fx.exports}(function(o,r){(function(i,l,f){o.exports=l(Jt(),Cv(),cR(),fR(),Cc(),dR(),Sc(),lS(),ix(),hR(),dS(),pR(),vR(),gR(),fx(),mR(),pu(),si(),yR(),xR(),ER(),CR(),SR(),wR(),bR(),_R(),DR(),TR(),RR(),AR(),kR(),FR(),OR(),BR(),MR())})(Lt,function(i){return i})})(J2);var NR=J2.exports;const wc=I2(NR);let er=null,sn=null,Gf=null;const ea={setConfig(o){er=o},getConfig(){return er},decrypt(o,r=null,i=null){var l,f;try{const p=r||((l=er==null?void 0:er.env)==null?void 0:l.DECODE_IV)||"default_iv_1234",v=i||((f=er==null?void 0:er.env)==null?void 0:f.DECODE_KEY)||"default_key_1234",S=wc.enc.Base64.parse(o),w=wc.enc.Utf8.parse(v),C=wc.enc.Utf8.parse(p);return wc.AES.decrypt({ciphertext:S},w,{iv:C,mode:wc.mode.CTR,padding:wc.pad.NoPadding}).toString(wc.enc.Utf8)}catch(p){return console.log("ERROR ===> failed decrypt:",p),!1}},pushSound(){try{Gf&&clearInterval(Gf);const o=()=>{try{(!sn||sn.state==="closed")&&(sn=new(window.AudioContext||window.webkitAudioContext)),sn.state==="suspended"&&sn.resume();const r=sn.createOscillator(),i=sn.createOscillator(),l=sn.createGain();r.type="sine",i.type="sine",r.frequency.setValueAtTime(400,sn.currentTime),i.frequency.setValueAtTime(450,sn.currentTime);const f=sn.createOscillator(),p=sn.createGain();f.frequency.value=25,p.gain.value=15,f.connect(p),p.connect(r.frequency),p.connect(i.frequency),r.connect(l),i.connect(l),l.connect(sn.destination),l.gain.setValueAtTime(0,sn.currentTime),l.gain.linearRampToValueAtTime(.08,sn.currentTime+.05),l.gain.setValueAtTime(.08,sn.currentTime+1.2),l.gain.linearRampToValueAtTime(0,sn.currentTime+1.3),f.start(),r.start(),i.start(),f.stop(sn.currentTime+1.4),r.stop(sn.currentTime+1.4),i.stop(sn.currentTime+1.4)}catch(r){console.warn("Failed to play synthesized tone:",r)}};o(),Gf=setInterval(o,3e3)}catch(o){console.warn("AudioContext initialization failed:",o)}},stopSound(){Gf&&(clearInterval(Gf),Gf=null),sn&&(sn.close().catch(()=>{}),sn=null)},pushNotification(o){it.emitToParent("show_notification",{message:o})},toHHMMSS(o){const r=parseInt(o,10),i=Math.floor(r/3600),l=Math.floor(r/60)%60,f=r%60;return[i,l,f].map(p=>p<10?"0"+p:p).filter((p,v)=>p!=="00"||v>0).join(":")},mute(o,r,i,l){o?r?o.unmute():o.mute():l&&(r?l.unmuteAudio():l.muteAudio()),i(!r)},hold(o,r,i,l){o?r?o.unhold():o.hold():l&&(r?l.unhold():l.hold()),i(!r)},async hangup(o,r,i,l,f,p,v,S){l&&await l(!1),f&&f(!1),p&&p(0),o&&o.current&&clearInterval(o.current),r?(await(r==null?void 0:r.terminate("hangup")),v&&v(!1),it.emitLocal("yeastarSession",!1)):i&&(await(i==null?void 0:i.hangup()),S&&S(!1),it.emitLocal("flashphonerCall",!1))},attachRemoteAudio(o){if(!o)return;let r=document.getElementById("ys-remote-audio");r||(r=document.createElement("audio"),r.id="ys-remote-audio",r.autoplay=!0,r.playsInline=!0,r.hidden=!0,document.body.appendChild(r)),r.srcObject=o,r.play().catch(()=>{console.warn("User gesture needed to play audio"),it.emitLocal("needUserGestureToPlay",!0)})},getContactName(o){return o&&((er==null?void 0:er.contacts)||{1001:"John Doe",1002:"Jane Smith","08123456789":"Alice Johnson",123:"Customer Support"})[o]||null},async updateExtensionStatus(o,r="Ready",i="ready"){var l,f,p;try{const v=(er==null?void 0:er["X-CPAAS-Key-Fingerprint"])||(er==null?void 0:er.fingerprint)||(er==null?void 0:er.cpaasKeyFingerprint)||((l=er==null?void 0:er.env)==null?void 0:l.fingerprint)||((f=er==null?void 0:er.env)==null?void 0:f.X_CPAAS_Key_Fingerprint)||((p=er==null?void 0:er.pabxConfig)==null?void 0:p["X-CPAAS-Key-Fingerprint"]);if(!v)return console.warn("X-CPAAS-Key-Fingerprint not found. Cannot update extension status."),!1;const S=await fetch("https://cpaas-api-dev.omni-x.dev/voice/extensions/status",{method:"POST",headers:{"X-CPAAS-Key-Fingerprint":v,"Content-Type":"application/json"},body:JSON.stringify({extension:o,status:r,reason:i})}),w=await S.json();return console.log(`[ExtStatus] ${r}/${i}:`,w),S.ok}catch(v){return console.error("Failed to update extension status:",v),!1}},getExtensionUsername(){var o,r;return((o=er==null?void 0:er.auth)==null?void 0:o.user_pbx)||((r=er==null?void 0:er.auth)==null?void 0:r.username)||null}};function HR({initialRegisterStatus:o="CONNECTING",autoReady:r=!0,showAuxButton:i=!1,auxOptions:l=[]}){const[f,p]=zt.useState(""),[v,S]=zt.useState("Idle"),[w,C]=zt.useState("00:00"),[b,R]=zt.useState(!1),[T,H]=zt.useState(!1),[P,j]=zt.useState(!1),[z,B]=zt.useState(""),[M,U]=zt.useState(""),[q,K]=zt.useState(""),[X,ee]=zt.useState(o),[A,Ee]=zt.useState(""),[Z,F]=zt.useState(r&&o==="REGISTERED"?"READY":"NOT_READY"),[L,N]=zt.useState(!1),[De,be]=zt.useState(null),$e=zt.useCallback(Se=>{U(Se),setTimeout(()=>U(""),4e3)},[]);zt.useEffect(()=>{const Se=[it.on("call_status",Re=>{S(Re),Re!=="InCall"&&(j(!1),B(""),H(!1),R(!1))}),it.on("call_duration",C),it.on("incoming_call",Re=>{var zr,qt,Qt,Fr,br,nn,Tn,vn;const yt=((qt=(zr=Re==null?void 0:Re.remoteIdentity)==null?void 0:zr.uri)==null?void 0:qt.user)||(Re==null?void 0:Re.from_id)||"Unknown",dr=((Qt=Re==null?void 0:Re.remoteIdentity)==null?void 0:Qt.displayName)||((br=(Fr=Re==null?void 0:Re.request)==null?void 0:Fr.from)==null?void 0:br.displayName)||((vn=(Tn=(nn=Re==null?void 0:Re.incomingInviteRequest)==null?void 0:nn.message)==null?void 0:Tn.from)==null?void 0:vn.displayName)||(Re==null?void 0:Re.from_name)||ea.getContactName(yt)||"";p(yt),K(dr),S("Ringing")}),it.on("register_status",Re=>{const yt=typeof Re=="string"?Re:(Re==null?void 0:Re.status)??"FAILED",dr=typeof Re=="object"?Re==null?void 0:Re.reason:"";ee(yt),Ee(yt==="FAILED"?dr||"Failed to connect to Voice Platform":""),yt!=="REGISTERED"&&F("NOT_READY")}),it.on("agent_status",Re=>{F(Re),Re!=="AUX"&&be(null)}),it.on("call_failed",Re=>$e(Re||"Call Failed"))];return()=>Se.forEach(Re=>Re())},[$e]),zt.useEffect(()=>{v==="Idle"&&K(ea.getContactName(f)||"")},[f,v]),zt.useEffect(()=>{const Se=Re=>{Re.metaKey||Re.ctrlKey||Re.altKey||(v==="InCall"&&/^[0-9*#]$/.test(Re.key)?G(Re.key):v==="Idle"&&X==="REGISTERED"&&/^[0-9+*#]$/.test(Re.key)?p(yt=>yt+Re.key):v==="Idle"&&Re.key==="Backspace"?p(yt=>yt.slice(0,-1)):v==="Idle"&&Re.key==="Enter"&&$())};return window.addEventListener("keydown",Se),()=>window.removeEventListener("keydown",Se)},[v,X,f]);const ge=async(Se,Re)=>{const yt=ea.getExtensionUsername();if(!yt)return!1;N(!0);const dr=await ea.updateExtensionStatus(yt,Se,Re);return N(!1),dr},Ce=async()=>{await ge("Ready","ready")&&(F("READY"),be(null),it.emitLocal("agent_status","READY"))},He=async()=>{await ge("Logout","not_ready")&&(F("NOT_READY"),be(null),it.emitLocal("agent_status","NOT_READY"))},_e=async(Se=null)=>{const Re=(Se==null?void 0:Se.code)||"AUX",yt=(Se==null?void 0:Se.label)||"AUX";await ge("AUX",Re)&&(F("AUX"),be({code:Re,label:yt}),it.emitLocal("agent_status","AUX")),setShowAuxMenu(!1)},$=()=>{const Se=f.trim();Se&&it.emitLocal("local_dial",{number:Se})},G=Se=>{B(Re=>Re+Se),it.emitLocal("local_dtmf",{key:Se})},de=()=>it.emitLocal("local_hangup"),oe=()=>it.emitLocal("local_answer"),Je=()=>it.emitLocal("local_reject"),Ge=()=>{const Se=!b;R(Se),it.emitLocal("local_toggle_mute",{muted:Se})},ut=()=>{it.emitLocal("local_toggle_hold",{isOnHold:T,setIsOnHold:H})};return v==="Ringing"?he.jsxs(Qh,{error:M,children:[he.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[he.jsx(Ox,{color:"green",pulse:!0,children:he.jsx(Z2,{className:"w-9 h-9 text-green-600"})}),he.jsxs("div",{className:"text-center space-y-1",children:[he.jsx("p",{className:"text-lg font-bold text-gray-800 leading-tight",children:q||f||"Unknown"}),q&&he.jsx("p",{className:"text-sm font-mono text-gray-400 tracking-wider",children:f}),he.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-green-50 border border-green-100 mt-1",children:[he.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),he.jsx("span",{className:"text-[11px] font-semibold text-green-600 uppercase tracking-widest",children:"Incoming Call"})]})]})]}),he.jsxs(IS,{children:[he.jsx(Bx,{color:"red",size:"lg",onClick:Je,title:"Reject",children:he.jsx(xv,{className:"w-6 h-6"})}),he.jsx(Bx,{color:"green",size:"lg",onClick:oe,title:"Answer",pulse:!0,children:he.jsx(Ev,{className:"w-6 h-6 fill-white"})})]})]}):v==="Calling..."?he.jsxs(Qh,{error:M,children:[he.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[he.jsx(Ox,{color:"primary",pulse:!0,children:he.jsx(nR,{className:"w-9 h-9 text-primary"})}),he.jsxs("div",{className:"text-center space-y-1",children:[he.jsx("p",{className:"text-lg font-bold text-gray-800 leading-tight",children:q||f}),q&&he.jsx("p",{className:"text-xs font-mono text-gray-400 tracking-wider",children:f}),he.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-primary/8 border border-primary/15 mt-1",children:[he.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary animate-pulse"}),he.jsx("span",{className:"text-[11px] font-semibold text-primary uppercase tracking-widest",children:"Dialing..."})]})]})]}),he.jsx(IS,{children:he.jsx(Bx,{color:"red",size:"lg",onClick:de,title:"Cancel",children:he.jsx(xv,{className:"w-6 h-6"})})})]}):v==="InCall"?he.jsxs(Qh,{error:M,children:[P?he.jsxs("div",{className:"animate-fadeIn",children:[he.jsxs("div",{className:"px-6 pt-5 pb-2 text-center",children:[he.jsx("p",{className:"text-[10px] font-bold text-gray-400 uppercase tracking-[0.2em] mb-2",children:"DTMF"}),he.jsx("div",{className:"min-h-[44px] flex items-center justify-center",children:he.jsx("span",{className:"text-3xl font-light text-gray-700 tracking-[0.25em] font-mono",children:z||he.jsx("span",{className:"text-gray-200",children:"—"})})})]}),he.jsx(X2,{onKeyPress:G})]}):he.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[he.jsx(Ox,{color:T?"primary":"green",pulse:!T,children:T?he.jsx(Q2,{className:"w-9 h-9 text-primary"}):he.jsx(Z2,{className:"w-9 h-9 text-green-600"})}),he.jsxs("div",{className:"text-center space-y-1",children:[he.jsx("p",{className:"text-base font-bold text-gray-800 leading-tight",children:q||f||"Connected"}),q&&he.jsx("p",{className:"text-xs font-mono text-gray-400 tracking-wider",children:f}),he.jsxs("div",{className:"flex items-center justify-center gap-2 mt-1",children:[!T&&he.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),he.jsx("span",{className:`text-sm font-mono font-semibold ${T?"text-primary":"text-green-600"}`,children:T?"On Hold":w})]})]})]}),he.jsx("div",{className:"border-t border-gray-100 bg-gray-50/60 px-6 py-4",children:he.jsxs("div",{className:"flex items-center justify-between gap-2 max-w-[260px] mx-auto",children:[he.jsx(Mx,{onClick:Ge,active:b,activeColor:"red",title:b?"Unmute":"Mute",children:b?he.jsx(tR,{className:"w-[18px] h-[18px]"}):he.jsx(rR,{className:"w-[18px] h-[18px]"})}),he.jsx(Mx,{onClick:ut,active:T,activeColor:"primary",title:T?"Resume":"Hold",children:T?he.jsx(iR,{className:"w-[18px] h-[18px]"}):he.jsx(Q2,{className:"w-[18px] h-[18px]"})}),he.jsx(Mx,{onClick:()=>j(Se=>!Se),active:P,activeColor:"primary",title:"Keypad",children:he.jsx(eR,{className:"w-[18px] h-[18px]"})}),he.jsx("button",{onClick:de,title:"End Call",className:"w-12 h-12 rounded-full bg-red-500 hover:bg-red-600 text-white flex items-center justify-center shadow-[0_4px_14px_rgba(239,68,68,0.4)] hover:shadow-[0_6px_18px_rgba(239,68,68,0.5)] transition-all active:scale-95",children:he.jsx(xv,{className:"w-5 h-5"})})]})})]}):X==="REGISTERED"?he.jsxs(Qh,{error:M,children:[he.jsxs("div",{className:"px-5 pt-5 pb-1",children:[he.jsxs("div",{className:"relative flex items-center justify-center min-h-[56px] bg-gray-50 rounded-2xl border border-gray-100 px-10",children:[he.jsx("input",{type:"text",value:f,onChange:Se=>p(Se.target.value.replace(/[^0-9+*#]/g,"")),onKeyDown:Se=>Se.key==="Enter"&&$(),className:"w-full text-center text-[28px] font-light text-gray-800 tracking-[0.12em] bg-transparent outline-none placeholder:text-gray-300 placeholder:text-2xl placeholder:font-normal",placeholder:"Enter number"}),f&&he.jsx("button",{onClick:()=>p(Se=>Se.slice(0,-1)),onMouseDown:Se=>Se.preventDefault(),className:"absolute right-3 p-1.5 rounded-full text-gray-300 hover:text-gray-500 hover:bg-gray-200 transition-all",children:he.jsx(JT,{className:"w-4 h-4"})})]}),q&&he.jsx("p",{className:"text-center text-xs text-primary/70 font-medium mt-1.5 tracking-wide",children:q})]}),he.jsx(X2,{onKeyPress:Se=>p(Re=>Re+Se)}),he.jsx("div",{className:"px-5 pb-4 pt-1 flex justify-center",children:he.jsxs("button",{onClick:$,disabled:!f.trim(),className:`
354
+ */return i.mode.CTRGladman=function(){var l=i.lib.BlockCipherMode.extend();function f(S){if((S>>24&255)===255){var w=S>>16&255,C=S>>8&255,b=S&255;w===255?(w=0,C===255?(C=0,b===255?b=0:++b):++C):++w,S=0,S+=w<<16,S+=C<<8,S+=b}else S+=16777216;return S}function p(S){return(S[0]=f(S[0]))===0&&(S[1]=f(S[1])),S}var v=l.Encryptor=l.extend({processBlock:function(S,w){var C=this._cipher,b=C.blockSize,R=this._iv,T=this._counter;R&&(T=this._counter=R.slice(0),this._iv=void 0),p(T);var H=T.slice(0);C.encryptBlock(H,0);for(var P=0;P<b;P++)S[w+P]^=H[P]}});return l.Decryptor=v,l}(),i.mode.CTRGladman})}(mx)),mx.exports}var yx={exports:{}},wS;function CR(){return wS||(wS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.mode.OFB=function(){var l=i.lib.BlockCipherMode.extend(),f=l.Encryptor=l.extend({processBlock:function(p,v){var S=this._cipher,w=S.blockSize,C=this._iv,b=this._keystream;C&&(b=this._keystream=C.slice(0),this._iv=void 0),S.encryptBlock(b,0);for(var R=0;R<w;R++)p[v+R]^=b[R]}});return l.Decryptor=f,l}(),i.mode.OFB})}(yx)),yx.exports}var xx={exports:{}},bS;function SR(){return bS||(bS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.mode.ECB=function(){var l=i.lib.BlockCipherMode.extend();return l.Encryptor=l.extend({processBlock:function(f,p){this._cipher.encryptBlock(f,p)}}),l.Decryptor=l.extend({processBlock:function(f,p){this._cipher.decryptBlock(f,p)}}),l}(),i.mode.ECB})}(xx)),xx.exports}var Ex={exports:{}},_S;function wR(){return _S||(_S=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.pad.AnsiX923={pad:function(l,f){var p=l.sigBytes,v=f*4,S=v-p%v,w=p+S-1;l.clamp(),l.words[w>>>2]|=S<<24-w%4*8,l.sigBytes+=S},unpad:function(l){var f=l.words[l.sigBytes-1>>>2]&255;l.sigBytes-=f}},i.pad.Ansix923})}(Ex)),Ex.exports}var Cx={exports:{}},DS;function bR(){return DS||(DS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.pad.Iso10126={pad:function(l,f){var p=f*4,v=p-l.sigBytes%p;l.concat(i.lib.WordArray.random(v-1)).concat(i.lib.WordArray.create([v<<24],1))},unpad:function(l){var f=l.words[l.sigBytes-1>>>2]&255;l.sigBytes-=f}},i.pad.Iso10126})}(Cx)),Cx.exports}var Sx={exports:{}},TS;function _R(){return TS||(TS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.pad.Iso97971={pad:function(l,f){l.concat(i.lib.WordArray.create([2147483648],1)),i.pad.ZeroPadding.pad(l,f)},unpad:function(l){i.pad.ZeroPadding.unpad(l),l.sigBytes--}},i.pad.Iso97971})}(Sx)),Sx.exports}var wx={exports:{}},RS;function DR(){return RS||(RS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.pad.ZeroPadding={pad:function(l,f){var p=f*4;l.clamp(),l.sigBytes+=p-(l.sigBytes%p||p)},unpad:function(l){for(var f=l.words,p=l.sigBytes-1,p=l.sigBytes-1;p>=0;p--)if(f[p>>>2]>>>24-p%4*8&255){l.sigBytes=p+1;break}}},i.pad.ZeroPadding})}(wx)),wx.exports}var bx={exports:{}},AS;function TR(){return AS||(AS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return i.pad.NoPadding={pad:function(){},unpad:function(){}},i.pad.NoPadding})}(bx)),bx.exports}var _x={exports:{}},kS;function RR(){return kS||(kS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),si())})(Lt,function(i){return function(l){var f=i,p=f.lib,v=p.CipherParams,S=f.enc,w=S.Hex,C=f.format;C.Hex={stringify:function(b){return b.ciphertext.toString(w)},parse:function(b){var R=w.parse(b);return v.create({ciphertext:R})}}}(),i.format.Hex})}(_x)),_x.exports}var Dx={exports:{}},FS;function AR(){return FS||(FS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),Cc(),Sc(),pu(),si())})(Lt,function(i){return function(){var l=i,f=l.lib,p=f.BlockCipher,v=l.algo,S=[],w=[],C=[],b=[],R=[],T=[],H=[],P=[],j=[],z=[];(function(){for(var U=[],q=0;q<256;q++)q<128?U[q]=q<<1:U[q]=q<<1^283;for(var K=0,X=0,q=0;q<256;q++){var ee=X^X<<1^X<<2^X<<3^X<<4;ee=ee>>>8^ee&255^99,S[K]=ee,w[ee]=K;var A=U[K],Ee=U[A],Z=U[Ee],F=U[ee]*257^ee*16843008;C[K]=F<<24|F>>>8,b[K]=F<<16|F>>>16,R[K]=F<<8|F>>>24,T[K]=F;var F=Z*16843009^Ee*65537^A*257^K*16843008;H[ee]=F<<24|F>>>8,P[ee]=F<<16|F>>>16,j[ee]=F<<8|F>>>24,z[ee]=F,K?(K=A^U[U[U[Z^A]]],X^=U[U[X]]):K=X=1}})();var B=[0,1,2,4,8,16,32,64,128,27,54],M=v.AES=p.extend({_doReset:function(){var U;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var q=this._keyPriorReset=this._key,K=q.words,X=q.sigBytes/4,ee=this._nRounds=X+6,A=(ee+1)*4,Ee=this._keySchedule=[],Z=0;Z<A;Z++)Z<X?Ee[Z]=K[Z]:(U=Ee[Z-1],Z%X?X>6&&Z%X==4&&(U=S[U>>>24]<<24|S[U>>>16&255]<<16|S[U>>>8&255]<<8|S[U&255]):(U=U<<8|U>>>24,U=S[U>>>24]<<24|S[U>>>16&255]<<16|S[U>>>8&255]<<8|S[U&255],U^=B[Z/X|0]<<24),Ee[Z]=Ee[Z-X]^U);for(var F=this._invKeySchedule=[],L=0;L<A;L++){var Z=A-L;if(L%4)var U=Ee[Z];else var U=Ee[Z-4];L<4||Z<=4?F[L]=U:F[L]=H[S[U>>>24]]^P[S[U>>>16&255]]^j[S[U>>>8&255]]^z[S[U&255]]}}},encryptBlock:function(U,q){this._doCryptBlock(U,q,this._keySchedule,C,b,R,T,S)},decryptBlock:function(U,q){var K=U[q+1];U[q+1]=U[q+3],U[q+3]=K,this._doCryptBlock(U,q,this._invKeySchedule,H,P,j,z,w);var K=U[q+1];U[q+1]=U[q+3],U[q+3]=K},_doCryptBlock:function(U,q,K,X,ee,A,Ee,Z){for(var F=this._nRounds,L=U[q]^K[0],N=U[q+1]^K[1],De=U[q+2]^K[2],be=U[q+3]^K[3],$e=4,ge=1;ge<F;ge++){var Ce=X[L>>>24]^ee[N>>>16&255]^A[De>>>8&255]^Ee[be&255]^K[$e++],He=X[N>>>24]^ee[De>>>16&255]^A[be>>>8&255]^Ee[L&255]^K[$e++],_e=X[De>>>24]^ee[be>>>16&255]^A[L>>>8&255]^Ee[N&255]^K[$e++],$=X[be>>>24]^ee[L>>>16&255]^A[N>>>8&255]^Ee[De&255]^K[$e++];L=Ce,N=He,De=_e,be=$}var Ce=(Z[L>>>24]<<24|Z[N>>>16&255]<<16|Z[De>>>8&255]<<8|Z[be&255])^K[$e++],He=(Z[N>>>24]<<24|Z[De>>>16&255]<<16|Z[be>>>8&255]<<8|Z[L&255])^K[$e++],_e=(Z[De>>>24]<<24|Z[be>>>16&255]<<16|Z[L>>>8&255]<<8|Z[N&255])^K[$e++],$=(Z[be>>>24]<<24|Z[L>>>16&255]<<16|Z[N>>>8&255]<<8|Z[De&255])^K[$e++];U[q]=Ce,U[q+1]=He,U[q+2]=_e,U[q+3]=$},keySize:256/32});l.AES=p._createHelper(M)}(),i.AES})}(Dx)),Dx.exports}var Tx={exports:{}},OS;function kR(){return OS||(OS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),Cc(),Sc(),pu(),si())})(Lt,function(i){return function(){var l=i,f=l.lib,p=f.WordArray,v=f.BlockCipher,S=l.algo,w=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],C=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],b=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],R=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],T=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],H=S.DES=v.extend({_doReset:function(){for(var B=this._key,M=B.words,U=[],q=0;q<56;q++){var K=w[q]-1;U[q]=M[K>>>5]>>>31-K%32&1}for(var X=this._subKeys=[],ee=0;ee<16;ee++){for(var A=X[ee]=[],Ee=b[ee],q=0;q<24;q++)A[q/6|0]|=U[(C[q]-1+Ee)%28]<<31-q%6,A[4+(q/6|0)]|=U[28+(C[q+24]-1+Ee)%28]<<31-q%6;A[0]=A[0]<<1|A[0]>>>31;for(var q=1;q<7;q++)A[q]=A[q]>>>(q-1)*4+3;A[7]=A[7]<<5|A[7]>>>27}for(var Z=this._invSubKeys=[],q=0;q<16;q++)Z[q]=X[15-q]},encryptBlock:function(B,M){this._doCryptBlock(B,M,this._subKeys)},decryptBlock:function(B,M){this._doCryptBlock(B,M,this._invSubKeys)},_doCryptBlock:function(B,M,U){this._lBlock=B[M],this._rBlock=B[M+1],P.call(this,4,252645135),P.call(this,16,65535),j.call(this,2,858993459),j.call(this,8,16711935),P.call(this,1,1431655765);for(var q=0;q<16;q++){for(var K=U[q],X=this._lBlock,ee=this._rBlock,A=0,Ee=0;Ee<8;Ee++)A|=R[Ee][((ee^K[Ee])&T[Ee])>>>0];this._lBlock=ee,this._rBlock=X^A}var Z=this._lBlock;this._lBlock=this._rBlock,this._rBlock=Z,P.call(this,1,1431655765),j.call(this,8,16711935),j.call(this,2,858993459),P.call(this,16,65535),P.call(this,4,252645135),B[M]=this._lBlock,B[M+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function P(B,M){var U=(this._lBlock>>>B^this._rBlock)&M;this._rBlock^=U,this._lBlock^=U<<B}function j(B,M){var U=(this._rBlock>>>B^this._lBlock)&M;this._lBlock^=U,this._rBlock^=U<<B}l.DES=v._createHelper(H);var z=S.TripleDES=v.extend({_doReset:function(){var B=this._key,M=B.words;if(M.length!==2&&M.length!==4&&M.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var U=M.slice(0,2),q=M.length<4?M.slice(0,2):M.slice(2,4),K=M.length<6?M.slice(0,2):M.slice(4,6);this._des1=H.createEncryptor(p.create(U)),this._des2=H.createEncryptor(p.create(q)),this._des3=H.createEncryptor(p.create(K))},encryptBlock:function(B,M){this._des1.encryptBlock(B,M),this._des2.decryptBlock(B,M),this._des3.encryptBlock(B,M)},decryptBlock:function(B,M){this._des3.decryptBlock(B,M),this._des2.encryptBlock(B,M),this._des1.decryptBlock(B,M)},keySize:192/32,ivSize:64/32,blockSize:64/32});l.TripleDES=v._createHelper(z)}(),i.TripleDES})}(Tx)),Tx.exports}var Rx={exports:{}},BS;function FR(){return BS||(BS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),Cc(),Sc(),pu(),si())})(Lt,function(i){return function(){var l=i,f=l.lib,p=f.StreamCipher,v=l.algo,S=v.RC4=p.extend({_doReset:function(){for(var b=this._key,R=b.words,T=b.sigBytes,H=this._S=[],P=0;P<256;P++)H[P]=P;for(var P=0,j=0;P<256;P++){var z=P%T,B=R[z>>>2]>>>24-z%4*8&255;j=(j+H[P]+B)%256;var M=H[P];H[P]=H[j],H[j]=M}this._i=this._j=0},_doProcessBlock:function(b,R){b[R]^=w.call(this)},keySize:256/32,ivSize:0});function w(){for(var b=this._S,R=this._i,T=this._j,H=0,P=0;P<4;P++){R=(R+1)%256,T=(T+b[R])%256;var j=b[R];b[R]=b[T],b[T]=j,H|=b[(b[R]+b[T])%256]<<24-P*8}return this._i=R,this._j=T,H}l.RC4=p._createHelper(S);var C=v.RC4Drop=S.extend({cfg:S.cfg.extend({drop:192}),_doReset:function(){S._doReset.call(this);for(var b=this.cfg.drop;b>0;b--)w.call(this)}});l.RC4Drop=p._createHelper(C)}(),i.RC4})}(Rx)),Rx.exports}var Ax={exports:{}},MS;function OR(){return MS||(MS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),Cc(),Sc(),pu(),si())})(Lt,function(i){return function(){var l=i,f=l.lib,p=f.StreamCipher,v=l.algo,S=[],w=[],C=[],b=v.Rabbit=p.extend({_doReset:function(){for(var T=this._key.words,H=this.cfg.iv,P=0;P<4;P++)T[P]=(T[P]<<8|T[P]>>>24)&16711935|(T[P]<<24|T[P]>>>8)&4278255360;var j=this._X=[T[0],T[3]<<16|T[2]>>>16,T[1],T[0]<<16|T[3]>>>16,T[2],T[1]<<16|T[0]>>>16,T[3],T[2]<<16|T[1]>>>16],z=this._C=[T[2]<<16|T[2]>>>16,T[0]&4294901760|T[1]&65535,T[3]<<16|T[3]>>>16,T[1]&4294901760|T[2]&65535,T[0]<<16|T[0]>>>16,T[2]&4294901760|T[3]&65535,T[1]<<16|T[1]>>>16,T[3]&4294901760|T[0]&65535];this._b=0;for(var P=0;P<4;P++)R.call(this);for(var P=0;P<8;P++)z[P]^=j[P+4&7];if(H){var B=H.words,M=B[0],U=B[1],q=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,K=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360,X=q>>>16|K&4294901760,ee=K<<16|q&65535;z[0]^=q,z[1]^=X,z[2]^=K,z[3]^=ee,z[4]^=q,z[5]^=X,z[6]^=K,z[7]^=ee;for(var P=0;P<4;P++)R.call(this)}},_doProcessBlock:function(T,H){var P=this._X;R.call(this),S[0]=P[0]^P[5]>>>16^P[3]<<16,S[1]=P[2]^P[7]>>>16^P[5]<<16,S[2]=P[4]^P[1]>>>16^P[7]<<16,S[3]=P[6]^P[3]>>>16^P[1]<<16;for(var j=0;j<4;j++)S[j]=(S[j]<<8|S[j]>>>24)&16711935|(S[j]<<24|S[j]>>>8)&4278255360,T[H+j]^=S[j]},blockSize:128/32,ivSize:64/32});function R(){for(var T=this._X,H=this._C,P=0;P<8;P++)w[P]=H[P];H[0]=H[0]+1295307597+this._b|0,H[1]=H[1]+3545052371+(H[0]>>>0<w[0]>>>0?1:0)|0,H[2]=H[2]+886263092+(H[1]>>>0<w[1]>>>0?1:0)|0,H[3]=H[3]+1295307597+(H[2]>>>0<w[2]>>>0?1:0)|0,H[4]=H[4]+3545052371+(H[3]>>>0<w[3]>>>0?1:0)|0,H[5]=H[5]+886263092+(H[4]>>>0<w[4]>>>0?1:0)|0,H[6]=H[6]+1295307597+(H[5]>>>0<w[5]>>>0?1:0)|0,H[7]=H[7]+3545052371+(H[6]>>>0<w[6]>>>0?1:0)|0,this._b=H[7]>>>0<w[7]>>>0?1:0;for(var P=0;P<8;P++){var j=T[P]+H[P],z=j&65535,B=j>>>16,M=((z*z>>>17)+z*B>>>15)+B*B,U=((j&4294901760)*j|0)+((j&65535)*j|0);C[P]=M^U}T[0]=C[0]+(C[7]<<16|C[7]>>>16)+(C[6]<<16|C[6]>>>16)|0,T[1]=C[1]+(C[0]<<8|C[0]>>>24)+C[7]|0,T[2]=C[2]+(C[1]<<16|C[1]>>>16)+(C[0]<<16|C[0]>>>16)|0,T[3]=C[3]+(C[2]<<8|C[2]>>>24)+C[1]|0,T[4]=C[4]+(C[3]<<16|C[3]>>>16)+(C[2]<<16|C[2]>>>16)|0,T[5]=C[5]+(C[4]<<8|C[4]>>>24)+C[3]|0,T[6]=C[6]+(C[5]<<16|C[5]>>>16)+(C[4]<<16|C[4]>>>16)|0,T[7]=C[7]+(C[6]<<8|C[6]>>>24)+C[5]|0}l.Rabbit=p._createHelper(b)}(),i.Rabbit})}(Ax)),Ax.exports}var kx={exports:{}},NS;function BR(){return NS||(NS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),Cc(),Sc(),pu(),si())})(Lt,function(i){return function(){var l=i,f=l.lib,p=f.StreamCipher,v=l.algo,S=[],w=[],C=[],b=v.RabbitLegacy=p.extend({_doReset:function(){var T=this._key.words,H=this.cfg.iv,P=this._X=[T[0],T[3]<<16|T[2]>>>16,T[1],T[0]<<16|T[3]>>>16,T[2],T[1]<<16|T[0]>>>16,T[3],T[2]<<16|T[1]>>>16],j=this._C=[T[2]<<16|T[2]>>>16,T[0]&4294901760|T[1]&65535,T[3]<<16|T[3]>>>16,T[1]&4294901760|T[2]&65535,T[0]<<16|T[0]>>>16,T[2]&4294901760|T[3]&65535,T[1]<<16|T[1]>>>16,T[3]&4294901760|T[0]&65535];this._b=0;for(var z=0;z<4;z++)R.call(this);for(var z=0;z<8;z++)j[z]^=P[z+4&7];if(H){var B=H.words,M=B[0],U=B[1],q=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,K=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360,X=q>>>16|K&4294901760,ee=K<<16|q&65535;j[0]^=q,j[1]^=X,j[2]^=K,j[3]^=ee,j[4]^=q,j[5]^=X,j[6]^=K,j[7]^=ee;for(var z=0;z<4;z++)R.call(this)}},_doProcessBlock:function(T,H){var P=this._X;R.call(this),S[0]=P[0]^P[5]>>>16^P[3]<<16,S[1]=P[2]^P[7]>>>16^P[5]<<16,S[2]=P[4]^P[1]>>>16^P[7]<<16,S[3]=P[6]^P[3]>>>16^P[1]<<16;for(var j=0;j<4;j++)S[j]=(S[j]<<8|S[j]>>>24)&16711935|(S[j]<<24|S[j]>>>8)&4278255360,T[H+j]^=S[j]},blockSize:128/32,ivSize:64/32});function R(){for(var T=this._X,H=this._C,P=0;P<8;P++)w[P]=H[P];H[0]=H[0]+1295307597+this._b|0,H[1]=H[1]+3545052371+(H[0]>>>0<w[0]>>>0?1:0)|0,H[2]=H[2]+886263092+(H[1]>>>0<w[1]>>>0?1:0)|0,H[3]=H[3]+1295307597+(H[2]>>>0<w[2]>>>0?1:0)|0,H[4]=H[4]+3545052371+(H[3]>>>0<w[3]>>>0?1:0)|0,H[5]=H[5]+886263092+(H[4]>>>0<w[4]>>>0?1:0)|0,H[6]=H[6]+1295307597+(H[5]>>>0<w[5]>>>0?1:0)|0,H[7]=H[7]+3545052371+(H[6]>>>0<w[6]>>>0?1:0)|0,this._b=H[7]>>>0<w[7]>>>0?1:0;for(var P=0;P<8;P++){var j=T[P]+H[P],z=j&65535,B=j>>>16,M=((z*z>>>17)+z*B>>>15)+B*B,U=((j&4294901760)*j|0)+((j&65535)*j|0);C[P]=M^U}T[0]=C[0]+(C[7]<<16|C[7]>>>16)+(C[6]<<16|C[6]>>>16)|0,T[1]=C[1]+(C[0]<<8|C[0]>>>24)+C[7]|0,T[2]=C[2]+(C[1]<<16|C[1]>>>16)+(C[0]<<16|C[0]>>>16)|0,T[3]=C[3]+(C[2]<<8|C[2]>>>24)+C[1]|0,T[4]=C[4]+(C[3]<<16|C[3]>>>16)+(C[2]<<16|C[2]>>>16)|0,T[5]=C[5]+(C[4]<<8|C[4]>>>24)+C[3]|0,T[6]=C[6]+(C[5]<<16|C[5]>>>16)+(C[4]<<16|C[4]>>>16)|0,T[7]=C[7]+(C[6]<<8|C[6]>>>24)+C[5]|0}l.RabbitLegacy=p._createHelper(b)}(),i.RabbitLegacy})}(kx)),kx.exports}var Fx={exports:{}},HS;function MR(){return HS||(HS=1,function(o,r){(function(i,l,f){o.exports=l(Jt(),Cc(),Sc(),pu(),si())})(Lt,function(i){return function(){var l=i,f=l.lib,p=f.BlockCipher,v=l.algo;const S=16,w=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],C=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var b={pbox:[],sbox:[]};function R(z,B){let M=B>>24&255,U=B>>16&255,q=B>>8&255,K=B&255,X=z.sbox[0][M]+z.sbox[1][U];return X=X^z.sbox[2][q],X=X+z.sbox[3][K],X}function T(z,B,M){let U=B,q=M,K;for(let X=0;X<S;++X)U=U^z.pbox[X],q=R(z,U)^q,K=U,U=q,q=K;return K=U,U=q,q=K,q=q^z.pbox[S],U=U^z.pbox[S+1],{left:U,right:q}}function H(z,B,M){let U=B,q=M,K;for(let X=S+1;X>1;--X)U=U^z.pbox[X],q=R(z,U)^q,K=U,U=q,q=K;return K=U,U=q,q=K,q=q^z.pbox[1],U=U^z.pbox[0],{left:U,right:q}}function P(z,B,M){for(let ee=0;ee<4;ee++){z.sbox[ee]=[];for(let A=0;A<256;A++)z.sbox[ee][A]=C[ee][A]}let U=0;for(let ee=0;ee<S+2;ee++)z.pbox[ee]=w[ee]^B[U],U++,U>=M&&(U=0);let q=0,K=0,X=0;for(let ee=0;ee<S+2;ee+=2)X=T(z,q,K),q=X.left,K=X.right,z.pbox[ee]=q,z.pbox[ee+1]=K;for(let ee=0;ee<4;ee++)for(let A=0;A<256;A+=2)X=T(z,q,K),q=X.left,K=X.right,z.sbox[ee][A]=q,z.sbox[ee][A+1]=K;return!0}var j=v.Blowfish=p.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var z=this._keyPriorReset=this._key,B=z.words,M=z.sigBytes/4;P(b,B,M)}},encryptBlock:function(z,B){var M=T(b,z[B],z[B+1]);z[B]=M.left,z[B+1]=M.right},decryptBlock:function(z,B){var M=H(b,z[B],z[B+1]);z[B]=M.left,z[B+1]=M.right},blockSize:64/32,keySize:128/32,ivSize:64/32});l.Blowfish=p._createHelper(j)}(),i.Blowfish})}(Fx)),Fx.exports}(function(o,r){(function(i,l,f){o.exports=l(Jt(),Cv(),cR(),fR(),Cc(),dR(),Sc(),lS(),ix(),hR(),dS(),pR(),vR(),gR(),fx(),mR(),pu(),si(),yR(),xR(),ER(),CR(),SR(),wR(),bR(),_R(),DR(),TR(),RR(),AR(),kR(),FR(),OR(),BR(),MR())})(Lt,function(i){return i})})(J2);var NR=J2.exports;const wc=I2(NR);let er=null,sn=null,Gf=null;const ea={setConfig(o){er=o},getConfig(){return er},decrypt(o,r=null,i=null){var l,f;try{const p=r||((l=er==null?void 0:er.env)==null?void 0:l.DECODE_IV)||"default_iv_1234",v=i||((f=er==null?void 0:er.env)==null?void 0:f.DECODE_KEY)||"default_key_1234",S=wc.enc.Base64.parse(o),w=wc.enc.Utf8.parse(v),C=wc.enc.Utf8.parse(p);return wc.AES.decrypt({ciphertext:S},w,{iv:C,mode:wc.mode.CTR,padding:wc.pad.NoPadding}).toString(wc.enc.Utf8)}catch(p){return console.log("ERROR ===> failed decrypt:",p),!1}},pushSound(){try{Gf&&clearInterval(Gf);const o=()=>{try{(!sn||sn.state==="closed")&&(sn=new(window.AudioContext||window.webkitAudioContext)),sn.state==="suspended"&&sn.resume();const r=sn.createOscillator(),i=sn.createOscillator(),l=sn.createGain();r.type="sine",i.type="sine",r.frequency.setValueAtTime(400,sn.currentTime),i.frequency.setValueAtTime(450,sn.currentTime);const f=sn.createOscillator(),p=sn.createGain();f.frequency.value=25,p.gain.value=15,f.connect(p),p.connect(r.frequency),p.connect(i.frequency),r.connect(l),i.connect(l),l.connect(sn.destination),l.gain.setValueAtTime(0,sn.currentTime),l.gain.linearRampToValueAtTime(.08,sn.currentTime+.05),l.gain.setValueAtTime(.08,sn.currentTime+1.2),l.gain.linearRampToValueAtTime(0,sn.currentTime+1.3),f.start(),r.start(),i.start(),f.stop(sn.currentTime+1.4),r.stop(sn.currentTime+1.4),i.stop(sn.currentTime+1.4)}catch(r){console.warn("Failed to play synthesized tone:",r)}};o(),Gf=setInterval(o,3e3)}catch(o){console.warn("AudioContext initialization failed:",o)}},stopSound(){Gf&&(clearInterval(Gf),Gf=null),sn&&(sn.close().catch(()=>{}),sn=null)},pushNotification(o){it.emitToParent("show_notification",{message:o})},toHHMMSS(o){const r=parseInt(o,10),i=Math.floor(r/3600),l=Math.floor(r/60)%60,f=r%60;return[i,l,f].map(p=>p<10?"0"+p:p).filter((p,v)=>p!=="00"||v>0).join(":")},mute(o,r,i,l){o?r?o.unmute():o.mute():l&&(r?l.unmuteAudio():l.muteAudio()),i(!r)},hold(o,r,i,l){o?r?o.unhold():o.hold():l&&(r?l.unhold():l.hold()),i(!r)},async hangup(o,r,i,l,f,p,v,S){l&&await l(!1),f&&f(!1),p&&p(0),o&&o.current&&clearInterval(o.current),r?(await(r==null?void 0:r.terminate("hangup")),v&&v(!1),it.emitLocal("yeastarSession",!1)):i&&(await(i==null?void 0:i.hangup()),S&&S(!1),it.emitLocal("flashphonerCall",!1))},attachRemoteAudio(o){if(!o)return;let r=document.getElementById("ys-remote-audio");r||(r=document.createElement("audio"),r.id="ys-remote-audio",r.autoplay=!0,r.playsInline=!0,r.hidden=!0,document.body.appendChild(r)),r.srcObject=o,r.play().catch(()=>{console.warn("User gesture needed to play audio"),it.emitLocal("needUserGestureToPlay",!0)})},getContactName(o){return o&&((er==null?void 0:er.contacts)||{1001:"John Doe",1002:"Jane Smith","08123456789":"Alice Johnson",123:"Customer Support"})[o]||null},async updateExtensionStatus(o,r="Ready",i="ready"){var l,f,p;try{const v=(er==null?void 0:er["X-CPAAS-Key-Fingerprint"])||(er==null?void 0:er.fingerprint)||(er==null?void 0:er.cpaasKeyFingerprint)||((l=er==null?void 0:er.env)==null?void 0:l.fingerprint)||((f=er==null?void 0:er.env)==null?void 0:f.X_CPAAS_Key_Fingerprint)||((p=er==null?void 0:er.pabxConfig)==null?void 0:p["X-CPAAS-Key-Fingerprint"]);if(!v)return console.warn("X-CPAAS-Key-Fingerprint not found. Cannot update extension status."),!1;const S=await fetch("https://api-cpaas.omnix.co.id/voice/extensions/status",{method:"POST",headers:{"X-CPAAS-Key-Fingerprint":v,"Content-Type":"application/json"},body:JSON.stringify({extension:o,status:r,reason:i})}),w=await S.json();return console.log(`[ExtStatus] ${r}/${i}:`,w),S.ok}catch(v){return console.error("Failed to update extension status:",v),!1}},getExtensionUsername(){var o,r;return((o=er==null?void 0:er.auth)==null?void 0:o.user_pbx)||((r=er==null?void 0:er.auth)==null?void 0:r.username)||null}};function HR({initialRegisterStatus:o="CONNECTING",autoReady:r=!0,showAuxButton:i=!1,auxOptions:l=[]}){const[f,p]=zt.useState(""),[v,S]=zt.useState("Idle"),[w,C]=zt.useState("00:00"),[b,R]=zt.useState(!1),[T,H]=zt.useState(!1),[P,j]=zt.useState(!1),[z,B]=zt.useState(""),[M,U]=zt.useState(""),[q,K]=zt.useState(""),[X,ee]=zt.useState(o),[A,Ee]=zt.useState(""),[Z,F]=zt.useState(r&&o==="REGISTERED"?"READY":"NOT_READY"),[L,N]=zt.useState(!1),[De,be]=zt.useState(null),$e=zt.useCallback(Se=>{U(Se),setTimeout(()=>U(""),4e3)},[]);zt.useEffect(()=>{const Se=[it.on("call_status",Re=>{S(Re),Re!=="InCall"&&(j(!1),B(""),H(!1),R(!1))}),it.on("call_duration",C),it.on("incoming_call",Re=>{var zr,qt,Qt,Fr,br,nn,Tn,vn;const yt=((qt=(zr=Re==null?void 0:Re.remoteIdentity)==null?void 0:zr.uri)==null?void 0:qt.user)||(Re==null?void 0:Re.from_id)||"Unknown",dr=((Qt=Re==null?void 0:Re.remoteIdentity)==null?void 0:Qt.displayName)||((br=(Fr=Re==null?void 0:Re.request)==null?void 0:Fr.from)==null?void 0:br.displayName)||((vn=(Tn=(nn=Re==null?void 0:Re.incomingInviteRequest)==null?void 0:nn.message)==null?void 0:Tn.from)==null?void 0:vn.displayName)||(Re==null?void 0:Re.from_name)||ea.getContactName(yt)||"";p(yt),K(dr),S("Ringing")}),it.on("register_status",Re=>{const yt=typeof Re=="string"?Re:(Re==null?void 0:Re.status)??"FAILED",dr=typeof Re=="object"?Re==null?void 0:Re.reason:"";ee(yt),Ee(yt==="FAILED"?dr||"Failed to connect to Voice Platform":""),yt!=="REGISTERED"&&F("NOT_READY")}),it.on("agent_status",Re=>{F(Re),Re!=="AUX"&&be(null)}),it.on("call_failed",Re=>$e(Re||"Call Failed"))];return()=>Se.forEach(Re=>Re())},[$e]),zt.useEffect(()=>{v==="Idle"&&K(ea.getContactName(f)||"")},[f,v]),zt.useEffect(()=>{const Se=Re=>{Re.metaKey||Re.ctrlKey||Re.altKey||(v==="InCall"&&/^[0-9*#]$/.test(Re.key)?G(Re.key):v==="Idle"&&X==="REGISTERED"&&/^[0-9+*#]$/.test(Re.key)?p(yt=>yt+Re.key):v==="Idle"&&Re.key==="Backspace"?p(yt=>yt.slice(0,-1)):v==="Idle"&&Re.key==="Enter"&&$())};return window.addEventListener("keydown",Se),()=>window.removeEventListener("keydown",Se)},[v,X,f]);const ge=async(Se,Re)=>{const yt=ea.getExtensionUsername();if(!yt)return!1;N(!0);const dr=await ea.updateExtensionStatus(yt,Se,Re);return N(!1),dr},Ce=async()=>{await ge("Ready","ready")&&(F("READY"),be(null),it.emitLocal("agent_status","READY"))},He=async()=>{await ge("Logout","not_ready")&&(F("NOT_READY"),be(null),it.emitLocal("agent_status","NOT_READY"))},_e=async(Se=null)=>{const Re=(Se==null?void 0:Se.code)||"AUX",yt=(Se==null?void 0:Se.label)||"AUX";await ge("AUX",Re)&&(F("AUX"),be({code:Re,label:yt}),it.emitLocal("agent_status","AUX")),setShowAuxMenu(!1)},$=()=>{const Se=f.trim();Se&&it.emitLocal("local_dial",{number:Se})},G=Se=>{B(Re=>Re+Se),it.emitLocal("local_dtmf",{key:Se})},de=()=>it.emitLocal("local_hangup"),oe=()=>it.emitLocal("local_answer"),Je=()=>it.emitLocal("local_reject"),Ge=()=>{const Se=!b;R(Se),it.emitLocal("local_toggle_mute",{muted:Se})},ut=()=>{it.emitLocal("local_toggle_hold",{isOnHold:T,setIsOnHold:H})};return v==="Ringing"?he.jsxs(Qh,{error:M,children:[he.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[he.jsx(Ox,{color:"green",pulse:!0,children:he.jsx(Z2,{className:"w-9 h-9 text-green-600"})}),he.jsxs("div",{className:"text-center space-y-1",children:[he.jsx("p",{className:"text-lg font-bold text-gray-800 leading-tight",children:q||f||"Unknown"}),q&&he.jsx("p",{className:"text-sm font-mono text-gray-400 tracking-wider",children:f}),he.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-green-50 border border-green-100 mt-1",children:[he.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),he.jsx("span",{className:"text-[11px] font-semibold text-green-600 uppercase tracking-widest",children:"Incoming Call"})]})]})]}),he.jsxs(IS,{children:[he.jsx(Bx,{color:"red",size:"lg",onClick:Je,title:"Reject",children:he.jsx(xv,{className:"w-6 h-6"})}),he.jsx(Bx,{color:"green",size:"lg",onClick:oe,title:"Answer",pulse:!0,children:he.jsx(Ev,{className:"w-6 h-6 fill-white"})})]})]}):v==="Calling..."?he.jsxs(Qh,{error:M,children:[he.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[he.jsx(Ox,{color:"primary",pulse:!0,children:he.jsx(nR,{className:"w-9 h-9 text-primary"})}),he.jsxs("div",{className:"text-center space-y-1",children:[he.jsx("p",{className:"text-lg font-bold text-gray-800 leading-tight",children:q||f}),q&&he.jsx("p",{className:"text-xs font-mono text-gray-400 tracking-wider",children:f}),he.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-primary/8 border border-primary/15 mt-1",children:[he.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary animate-pulse"}),he.jsx("span",{className:"text-[11px] font-semibold text-primary uppercase tracking-widest",children:"Dialing..."})]})]})]}),he.jsx(IS,{children:he.jsx(Bx,{color:"red",size:"lg",onClick:de,title:"Cancel",children:he.jsx(xv,{className:"w-6 h-6"})})})]}):v==="InCall"?he.jsxs(Qh,{error:M,children:[P?he.jsxs("div",{className:"animate-fadeIn",children:[he.jsxs("div",{className:"px-6 pt-5 pb-2 text-center",children:[he.jsx("p",{className:"text-[10px] font-bold text-gray-400 uppercase tracking-[0.2em] mb-2",children:"DTMF"}),he.jsx("div",{className:"min-h-[44px] flex items-center justify-center",children:he.jsx("span",{className:"text-3xl font-light text-gray-700 tracking-[0.25em] font-mono",children:z||he.jsx("span",{className:"text-gray-200",children:"—"})})})]}),he.jsx(X2,{onKeyPress:G})]}):he.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[he.jsx(Ox,{color:T?"primary":"green",pulse:!T,children:T?he.jsx(Q2,{className:"w-9 h-9 text-primary"}):he.jsx(Z2,{className:"w-9 h-9 text-green-600"})}),he.jsxs("div",{className:"text-center space-y-1",children:[he.jsx("p",{className:"text-base font-bold text-gray-800 leading-tight",children:q||f||"Connected"}),q&&he.jsx("p",{className:"text-xs font-mono text-gray-400 tracking-wider",children:f}),he.jsxs("div",{className:"flex items-center justify-center gap-2 mt-1",children:[!T&&he.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),he.jsx("span",{className:`text-sm font-mono font-semibold ${T?"text-primary":"text-green-600"}`,children:T?"On Hold":w})]})]})]}),he.jsx("div",{className:"border-t border-gray-100 bg-gray-50/60 px-6 py-4",children:he.jsxs("div",{className:"flex items-center justify-between gap-2 max-w-[260px] mx-auto",children:[he.jsx(Mx,{onClick:Ge,active:b,activeColor:"red",title:b?"Unmute":"Mute",children:b?he.jsx(tR,{className:"w-[18px] h-[18px]"}):he.jsx(rR,{className:"w-[18px] h-[18px]"})}),he.jsx(Mx,{onClick:ut,active:T,activeColor:"primary",title:T?"Resume":"Hold",children:T?he.jsx(iR,{className:"w-[18px] h-[18px]"}):he.jsx(Q2,{className:"w-[18px] h-[18px]"})}),he.jsx(Mx,{onClick:()=>j(Se=>!Se),active:P,activeColor:"primary",title:"Keypad",children:he.jsx(eR,{className:"w-[18px] h-[18px]"})}),he.jsx("button",{onClick:de,title:"End Call",className:"w-12 h-12 rounded-full bg-red-500 hover:bg-red-600 text-white flex items-center justify-center shadow-[0_4px_14px_rgba(239,68,68,0.4)] hover:shadow-[0_6px_18px_rgba(239,68,68,0.5)] transition-all active:scale-95",children:he.jsx(xv,{className:"w-5 h-5"})})]})})]}):X==="REGISTERED"?he.jsxs(Qh,{error:M,children:[he.jsxs("div",{className:"px-5 pt-5 pb-1",children:[he.jsxs("div",{className:"relative flex items-center justify-center min-h-[56px] bg-gray-50 rounded-2xl border border-gray-100 px-10",children:[he.jsx("input",{type:"text",value:f,onChange:Se=>p(Se.target.value.replace(/[^0-9+*#]/g,"")),onKeyDown:Se=>Se.key==="Enter"&&$(),className:"w-full text-center text-[28px] font-light text-gray-800 tracking-[0.12em] bg-transparent outline-none placeholder:text-gray-300 placeholder:text-2xl placeholder:font-normal",placeholder:"Enter number"}),f&&he.jsx("button",{onClick:()=>p(Se=>Se.slice(0,-1)),onMouseDown:Se=>Se.preventDefault(),className:"absolute right-3 p-1.5 rounded-full text-gray-300 hover:text-gray-500 hover:bg-gray-200 transition-all",children:he.jsx(JT,{className:"w-4 h-4"})})]}),q&&he.jsx("p",{className:"text-center text-xs text-primary/70 font-medium mt-1.5 tracking-wide",children:q})]}),he.jsx(X2,{onKeyPress:Se=>p(Re=>Re+Se)}),he.jsx("div",{className:"px-5 pb-4 pt-1 flex justify-center",children:he.jsxs("button",{onClick:$,disabled:!f.trim(),className:`
355
355
  flex items-center gap-3 px-10 py-3.5 rounded-full
356
356
  bg-gradient-to-r from-green-500 to-green-600
357
357
  hover:from-green-600 hover:to-green-700
package/dist/voxnix.js CHANGED
@@ -5956,15 +5956,11 @@ const Ve = {
5956
5956
  var s, i;
5957
5957
  try {
5958
5958
  const n = e || ((s = ae == null ? void 0 : ae.env) == null ? void 0 : s.DECODE_IV) || "default_iv_1234", a = t || ((i = ae == null ? void 0 : ae.env) == null ? void 0 : i.DECODE_KEY) || "default_key_1234", o = nr.enc.Base64.parse(r), d = nr.enc.Utf8.parse(a), c = nr.enc.Utf8.parse(n);
5959
- return nr.AES.decrypt(
5960
- { ciphertext: o },
5961
- d,
5962
- {
5963
- iv: c,
5964
- mode: nr.mode.CTR,
5965
- padding: nr.pad.NoPadding
5966
- }
5967
- ).toString(nr.enc.Utf8);
5959
+ return nr.AES.decrypt({ ciphertext: o }, d, {
5960
+ iv: c,
5961
+ mode: nr.mode.CTR,
5962
+ padding: nr.pad.NoPadding
5963
+ }).toString(nr.enc.Utf8);
5968
5964
  } catch (n) {
5969
5965
  return console.log("ERROR ===> failed decrypt:", n), !1;
5970
5966
  }
@@ -5978,7 +5974,10 @@ const Ve = {
5978
5974
  const e = De.createOscillator(), t = De.createOscillator(), s = De.createGain();
5979
5975
  e.type = "sine", t.type = "sine", e.frequency.setValueAtTime(400, De.currentTime), t.frequency.setValueAtTime(450, De.currentTime);
5980
5976
  const i = De.createOscillator(), n = De.createGain();
5981
- i.frequency.value = 25, n.gain.value = 15, i.connect(n), n.connect(e.frequency), n.connect(t.frequency), e.connect(s), t.connect(s), s.connect(De.destination), s.gain.setValueAtTime(0, De.currentTime), s.gain.linearRampToValueAtTime(0.08, De.currentTime + 0.05), s.gain.setValueAtTime(0.08, De.currentTime + 1.2), s.gain.linearRampToValueAtTime(0, De.currentTime + 1.3), i.start(), e.start(), t.start(), i.stop(De.currentTime + 1.4), e.stop(De.currentTime + 1.4), t.stop(De.currentTime + 1.4);
5977
+ i.frequency.value = 25, n.gain.value = 15, i.connect(n), n.connect(e.frequency), n.connect(t.frequency), e.connect(s), t.connect(s), s.connect(De.destination), s.gain.setValueAtTime(0, De.currentTime), s.gain.linearRampToValueAtTime(
5978
+ 0.08,
5979
+ De.currentTime + 0.05
5980
+ ), s.gain.setValueAtTime(0.08, De.currentTime + 1.2), s.gain.linearRampToValueAtTime(0, De.currentTime + 1.3), i.start(), e.start(), t.start(), i.stop(De.currentTime + 1.4), e.stop(De.currentTime + 1.4), t.stop(De.currentTime + 1.4);
5982
5981
  } catch (e) {
5983
5982
  console.warn("Failed to play synthesized tone:", e);
5984
5983
  }
@@ -6033,15 +6032,20 @@ const Ve = {
6033
6032
  try {
6034
6033
  const a = (ae == null ? void 0 : ae["X-CPAAS-Key-Fingerprint"]) || (ae == null ? void 0 : ae.fingerprint) || (ae == null ? void 0 : ae.cpaasKeyFingerprint) || ((s = ae == null ? void 0 : ae.env) == null ? void 0 : s.fingerprint) || ((i = ae == null ? void 0 : ae.env) == null ? void 0 : i.X_CPAAS_Key_Fingerprint) || ((n = ae == null ? void 0 : ae.pabxConfig) == null ? void 0 : n["X-CPAAS-Key-Fingerprint"]);
6035
6034
  if (!a)
6036
- return console.warn("X-CPAAS-Key-Fingerprint not found. Cannot update extension status."), !1;
6037
- const o = await fetch("https://cpaas-api-dev.omni-x.dev/voice/extensions/status", {
6038
- method: "POST",
6039
- headers: {
6040
- "X-CPAAS-Key-Fingerprint": a,
6041
- "Content-Type": "application/json"
6042
- },
6043
- body: JSON.stringify({ extension: r, status: e, reason: t })
6044
- }), d = await o.json();
6035
+ return console.warn(
6036
+ "X-CPAAS-Key-Fingerprint not found. Cannot update extension status."
6037
+ ), !1;
6038
+ const o = await fetch(
6039
+ "https://api-cpaas.omnix.co.id/voice/extensions/status",
6040
+ {
6041
+ method: "POST",
6042
+ headers: {
6043
+ "X-CPAAS-Key-Fingerprint": a,
6044
+ "Content-Type": "application/json"
6045
+ },
6046
+ body: JSON.stringify({ extension: r, status: e, reason: t })
6047
+ }
6048
+ ), d = await o.json();
6045
6049
  return console.log(`[ExtStatus] ${e}/${t}:`, d), o.ok;
6046
6050
  } catch (a) {
6047
6051
  return console.error("Failed to update extension status:", a), !1;
@@ -140,7 +140,7 @@ React keys must be passed directly to JSX without using spread:
140
140
  * Counter block mode compatible with Dr Brian Gladman fileenc.c
141
141
  * derived from CryptoJS.mode.CTR
142
142
  * Jan Hruby jhruby.web@gmail.com
143
- */return t.mode.CTRGladman=function(){var s=t.lib.BlockCipherMode.extend();function i(o){if((o>>24&255)===255){var d=o>>16&255,c=o>>8&255,l=o&255;d===255?(d=0,c===255?(c=0,l===255?l=0:++l):++c):++d,o=0,o+=d<<16,o+=c<<8,o+=l}else o+=1<<24;return o}function n(o){return(o[0]=i(o[0]))===0&&(o[1]=i(o[1])),o}var a=s.Encryptor=s.extend({processBlock:function(o,d){var c=this._cipher,l=c.blockSize,g=this._iv,u=this._counter;g&&(u=this._counter=g.slice(0),this._iv=void 0),n(u);var y=u.slice(0);c.encryptBlock(y,0);for(var w=0;w<l;w++)o[d+w]^=y[w]}});return s.Decryptor=a,s}(),t.mode.CTRGladman})}(mi)),mi.exports}var vi={exports:{}},aa;function E0(){return aa||(aa=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.mode.OFB=function(){var s=t.lib.BlockCipherMode.extend(),i=s.Encryptor=s.extend({processBlock:function(n,a){var o=this._cipher,d=o.blockSize,c=this._iv,l=this._keystream;c&&(l=this._keystream=c.slice(0),this._iv=void 0),o.encryptBlock(l,0);for(var g=0;g<d;g++)n[a+g]^=l[g]}});return s.Decryptor=i,s}(),t.mode.OFB})}(vi)),vi.exports}var yi={exports:{}},oa;function b0(){return oa||(oa=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.mode.ECB=function(){var s=t.lib.BlockCipherMode.extend();return s.Encryptor=s.extend({processBlock:function(i,n){this._cipher.encryptBlock(i,n)}}),s.Decryptor=s.extend({processBlock:function(i,n){this._cipher.decryptBlock(i,n)}}),s}(),t.mode.ECB})}(yi)),yi.exports}var wi={exports:{}},ca;function C0(){return ca||(ca=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.pad.AnsiX923={pad:function(s,i){var n=s.sigBytes,a=i*4,o=a-n%a,d=n+o-1;s.clamp(),s.words[d>>>2]|=o<<24-d%4*8,s.sigBytes+=o},unpad:function(s){var i=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=i}},t.pad.Ansix923})}(wi)),wi.exports}var Ei={exports:{}},la;function _0(){return la||(la=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.pad.Iso10126={pad:function(s,i){var n=i*4,a=n-s.sigBytes%n;s.concat(t.lib.WordArray.random(a-1)).concat(t.lib.WordArray.create([a<<24],1))},unpad:function(s){var i=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=i}},t.pad.Iso10126})}(Ei)),Ei.exports}var bi={exports:{}},da;function D0(){return da||(da=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.pad.Iso97971={pad:function(s,i){s.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(s,i)},unpad:function(s){t.pad.ZeroPadding.unpad(s),s.sigBytes--}},t.pad.Iso97971})}(bi)),bi.exports}var Ci={exports:{}},ha;function A0(){return ha||(ha=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.pad.ZeroPadding={pad:function(s,i){var n=i*4;s.clamp(),s.sigBytes+=n-(s.sigBytes%n||n)},unpad:function(s){for(var i=s.words,n=s.sigBytes-1,n=s.sigBytes-1;n>=0;n--)if(i[n>>>2]>>>24-n%4*8&255){s.sigBytes=n+1;break}}},t.pad.ZeroPadding})}(Ci)),Ci.exports}var _i={exports:{}},ua;function S0(){return ua||(ua=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(_i)),_i.exports}var Di={exports:{}},fa;function T0(){return fa||(fa=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return function(s){var i=t,n=i.lib,a=n.CipherParams,o=i.enc,d=o.Hex,c=i.format;c.Hex={stringify:function(l){return l.ciphertext.toString(d)},parse:function(l){var g=d.parse(l);return a.create({ciphertext:g})}}}(),t.format.Hex})}(Di)),Di.exports}var Ai={exports:{}},ga;function R0(){return ga||(ga=1,function(r,e){(function(t,s,i){r.exports=s(oe(),sr(),ir(),Wt(),Pe())})(se,function(t){return function(){var s=t,i=s.lib,n=i.BlockCipher,a=s.algo,o=[],d=[],c=[],l=[],g=[],u=[],y=[],w=[],b=[],C=[];(function(){for(var E=[],_=0;_<256;_++)_<128?E[_]=_<<1:E[_]=_<<1^283;for(var T=0,S=0,_=0;_<256;_++){var R=S^S<<1^S<<2^S<<3^S<<4;R=R>>>8^R&255^99,o[T]=R,d[R]=T;var h=E[T],N=E[h],A=E[N],f=E[R]*257^R*16843008;c[T]=f<<24|f>>>8,l[T]=f<<16|f>>>16,g[T]=f<<8|f>>>24,u[T]=f;var f=A*16843009^N*65537^h*257^T*16843008;y[R]=f<<24|f>>>8,w[R]=f<<16|f>>>16,b[R]=f<<8|f>>>24,C[R]=f,T?(T=h^E[E[E[A^h]]],S^=E[E[S]]):T=S=1}})();var x=[0,1,2,4,8,16,32,64,128,27,54],p=a.AES=n.extend({_doReset:function(){var E;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var _=this._keyPriorReset=this._key,T=_.words,S=_.sigBytes/4,R=this._nRounds=S+6,h=(R+1)*4,N=this._keySchedule=[],A=0;A<h;A++)A<S?N[A]=T[A]:(E=N[A-1],A%S?S>6&&A%S==4&&(E=o[E>>>24]<<24|o[E>>>16&255]<<16|o[E>>>8&255]<<8|o[E&255]):(E=E<<8|E>>>24,E=o[E>>>24]<<24|o[E>>>16&255]<<16|o[E>>>8&255]<<8|o[E&255],E^=x[A/S|0]<<24),N[A]=N[A-S]^E);for(var f=this._invKeySchedule=[],v=0;v<h;v++){var A=h-v;if(v%4)var E=N[A];else var E=N[A-4];v<4||A<=4?f[v]=E:f[v]=y[o[E>>>24]]^w[o[E>>>16&255]]^b[o[E>>>8&255]]^C[o[E&255]]}}},encryptBlock:function(E,_){this._doCryptBlock(E,_,this._keySchedule,c,l,g,u,o)},decryptBlock:function(E,_){var T=E[_+1];E[_+1]=E[_+3],E[_+3]=T,this._doCryptBlock(E,_,this._invKeySchedule,y,w,b,C,d);var T=E[_+1];E[_+1]=E[_+3],E[_+3]=T},_doCryptBlock:function(E,_,T,S,R,h,N,A){for(var f=this._nRounds,v=E[_]^T[0],m=E[_+1]^T[1],U=E[_+2]^T[2],q=E[_+3]^T[3],X=4,W=1;W<f;W++){var ie=S[v>>>24]^R[m>>>16&255]^h[U>>>8&255]^N[q&255]^T[X++],he=S[m>>>24]^R[U>>>16&255]^h[q>>>8&255]^N[v&255]^T[X++],ue=S[U>>>24]^R[q>>>16&255]^h[v>>>8&255]^N[m&255]^T[X++],I=S[q>>>24]^R[v>>>16&255]^h[m>>>8&255]^N[U&255]^T[X++];v=ie,m=he,U=ue,q=I}var ie=(A[v>>>24]<<24|A[m>>>16&255]<<16|A[U>>>8&255]<<8|A[q&255])^T[X++],he=(A[m>>>24]<<24|A[U>>>16&255]<<16|A[q>>>8&255]<<8|A[v&255])^T[X++],ue=(A[U>>>24]<<24|A[q>>>16&255]<<16|A[v>>>8&255]<<8|A[m&255])^T[X++],I=(A[q>>>24]<<24|A[v>>>16&255]<<16|A[m>>>8&255]<<8|A[U&255])^T[X++];E[_]=ie,E[_+1]=he,E[_+2]=ue,E[_+3]=I},keySize:256/32});s.AES=n._createHelper(p)}(),t.AES})}(Ai)),Ai.exports}var Si={exports:{}},xa;function F0(){return xa||(xa=1,function(r,e){(function(t,s,i){r.exports=s(oe(),sr(),ir(),Wt(),Pe())})(se,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,a=i.BlockCipher,o=s.algo,d=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],g=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],y=o.DES=a.extend({_doReset:function(){for(var x=this._key,p=x.words,E=[],_=0;_<56;_++){var T=d[_]-1;E[_]=p[T>>>5]>>>31-T%32&1}for(var S=this._subKeys=[],R=0;R<16;R++){for(var h=S[R]=[],N=l[R],_=0;_<24;_++)h[_/6|0]|=E[(c[_]-1+N)%28]<<31-_%6,h[4+(_/6|0)]|=E[28+(c[_+24]-1+N)%28]<<31-_%6;h[0]=h[0]<<1|h[0]>>>31;for(var _=1;_<7;_++)h[_]=h[_]>>>(_-1)*4+3;h[7]=h[7]<<5|h[7]>>>27}for(var A=this._invSubKeys=[],_=0;_<16;_++)A[_]=S[15-_]},encryptBlock:function(x,p){this._doCryptBlock(x,p,this._subKeys)},decryptBlock:function(x,p){this._doCryptBlock(x,p,this._invSubKeys)},_doCryptBlock:function(x,p,E){this._lBlock=x[p],this._rBlock=x[p+1],w.call(this,4,252645135),w.call(this,16,65535),b.call(this,2,858993459),b.call(this,8,16711935),w.call(this,1,1431655765);for(var _=0;_<16;_++){for(var T=E[_],S=this._lBlock,R=this._rBlock,h=0,N=0;N<8;N++)h|=g[N][((R^T[N])&u[N])>>>0];this._lBlock=R,this._rBlock=S^h}var A=this._lBlock;this._lBlock=this._rBlock,this._rBlock=A,w.call(this,1,1431655765),b.call(this,8,16711935),b.call(this,2,858993459),w.call(this,16,65535),w.call(this,4,252645135),x[p]=this._lBlock,x[p+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function w(x,p){var E=(this._lBlock>>>x^this._rBlock)&p;this._rBlock^=E,this._lBlock^=E<<x}function b(x,p){var E=(this._rBlock>>>x^this._lBlock)&p;this._lBlock^=E,this._rBlock^=E<<x}s.DES=a._createHelper(y);var C=o.TripleDES=a.extend({_doReset:function(){var x=this._key,p=x.words;if(p.length!==2&&p.length!==4&&p.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var E=p.slice(0,2),_=p.length<4?p.slice(0,2):p.slice(2,4),T=p.length<6?p.slice(0,2):p.slice(4,6);this._des1=y.createEncryptor(n.create(E)),this._des2=y.createEncryptor(n.create(_)),this._des3=y.createEncryptor(n.create(T))},encryptBlock:function(x,p){this._des1.encryptBlock(x,p),this._des2.decryptBlock(x,p),this._des3.encryptBlock(x,p)},decryptBlock:function(x,p){this._des3.decryptBlock(x,p),this._des2.encryptBlock(x,p),this._des1.decryptBlock(x,p)},keySize:192/32,ivSize:64/32,blockSize:64/32});s.TripleDES=a._createHelper(C)}(),t.TripleDES})}(Si)),Si.exports}var Ti={exports:{}},pa;function k0(){return pa||(pa=1,function(r,e){(function(t,s,i){r.exports=s(oe(),sr(),ir(),Wt(),Pe())})(se,function(t){return function(){var s=t,i=s.lib,n=i.StreamCipher,a=s.algo,o=a.RC4=n.extend({_doReset:function(){for(var l=this._key,g=l.words,u=l.sigBytes,y=this._S=[],w=0;w<256;w++)y[w]=w;for(var w=0,b=0;w<256;w++){var C=w%u,x=g[C>>>2]>>>24-C%4*8&255;b=(b+y[w]+x)%256;var p=y[w];y[w]=y[b],y[b]=p}this._i=this._j=0},_doProcessBlock:function(l,g){l[g]^=d.call(this)},keySize:256/32,ivSize:0});function d(){for(var l=this._S,g=this._i,u=this._j,y=0,w=0;w<4;w++){g=(g+1)%256,u=(u+l[g])%256;var b=l[g];l[g]=l[u],l[u]=b,y|=l[(l[g]+l[u])%256]<<24-w*8}return this._i=g,this._j=u,y}s.RC4=n._createHelper(o);var c=a.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)d.call(this)}});s.RC4Drop=n._createHelper(c)}(),t.RC4})}(Ti)),Ti.exports}var Ri={exports:{}},ma;function B0(){return ma||(ma=1,function(r,e){(function(t,s,i){r.exports=s(oe(),sr(),ir(),Wt(),Pe())})(se,function(t){return function(){var s=t,i=s.lib,n=i.StreamCipher,a=s.algo,o=[],d=[],c=[],l=a.Rabbit=n.extend({_doReset:function(){for(var u=this._key.words,y=this.cfg.iv,w=0;w<4;w++)u[w]=(u[w]<<8|u[w]>>>24)&16711935|(u[w]<<24|u[w]>>>8)&4278255360;var b=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],C=this._C=[u[2]<<16|u[2]>>>16,u[0]&4294901760|u[1]&65535,u[3]<<16|u[3]>>>16,u[1]&4294901760|u[2]&65535,u[0]<<16|u[0]>>>16,u[2]&4294901760|u[3]&65535,u[1]<<16|u[1]>>>16,u[3]&4294901760|u[0]&65535];this._b=0;for(var w=0;w<4;w++)g.call(this);for(var w=0;w<8;w++)C[w]^=b[w+4&7];if(y){var x=y.words,p=x[0],E=x[1],_=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,T=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,S=_>>>16|T&4294901760,R=T<<16|_&65535;C[0]^=_,C[1]^=S,C[2]^=T,C[3]^=R,C[4]^=_,C[5]^=S,C[6]^=T,C[7]^=R;for(var w=0;w<4;w++)g.call(this)}},_doProcessBlock:function(u,y){var w=this._X;g.call(this),o[0]=w[0]^w[5]>>>16^w[3]<<16,o[1]=w[2]^w[7]>>>16^w[5]<<16,o[2]=w[4]^w[1]>>>16^w[7]<<16,o[3]=w[6]^w[3]>>>16^w[1]<<16;for(var b=0;b<4;b++)o[b]=(o[b]<<8|o[b]>>>24)&16711935|(o[b]<<24|o[b]>>>8)&4278255360,u[y+b]^=o[b]},blockSize:128/32,ivSize:64/32});function g(){for(var u=this._X,y=this._C,w=0;w<8;w++)d[w]=y[w];y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<d[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<d[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<d[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<d[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<d[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<d[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<d[6]>>>0?1:0)|0,this._b=y[7]>>>0<d[7]>>>0?1:0;for(var w=0;w<8;w++){var b=u[w]+y[w],C=b&65535,x=b>>>16,p=((C*C>>>17)+C*x>>>15)+x*x,E=((b&4294901760)*b|0)+((b&65535)*b|0);c[w]=p^E}u[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,u[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,u[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,u[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,u[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,u[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,u[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,u[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}s.Rabbit=n._createHelper(l)}(),t.Rabbit})}(Ri)),Ri.exports}var Fi={exports:{}},va;function I0(){return va||(va=1,function(r,e){(function(t,s,i){r.exports=s(oe(),sr(),ir(),Wt(),Pe())})(se,function(t){return function(){var s=t,i=s.lib,n=i.StreamCipher,a=s.algo,o=[],d=[],c=[],l=a.RabbitLegacy=n.extend({_doReset:function(){var u=this._key.words,y=this.cfg.iv,w=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],b=this._C=[u[2]<<16|u[2]>>>16,u[0]&4294901760|u[1]&65535,u[3]<<16|u[3]>>>16,u[1]&4294901760|u[2]&65535,u[0]<<16|u[0]>>>16,u[2]&4294901760|u[3]&65535,u[1]<<16|u[1]>>>16,u[3]&4294901760|u[0]&65535];this._b=0;for(var C=0;C<4;C++)g.call(this);for(var C=0;C<8;C++)b[C]^=w[C+4&7];if(y){var x=y.words,p=x[0],E=x[1],_=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,T=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,S=_>>>16|T&4294901760,R=T<<16|_&65535;b[0]^=_,b[1]^=S,b[2]^=T,b[3]^=R,b[4]^=_,b[5]^=S,b[6]^=T,b[7]^=R;for(var C=0;C<4;C++)g.call(this)}},_doProcessBlock:function(u,y){var w=this._X;g.call(this),o[0]=w[0]^w[5]>>>16^w[3]<<16,o[1]=w[2]^w[7]>>>16^w[5]<<16,o[2]=w[4]^w[1]>>>16^w[7]<<16,o[3]=w[6]^w[3]>>>16^w[1]<<16;for(var b=0;b<4;b++)o[b]=(o[b]<<8|o[b]>>>24)&16711935|(o[b]<<24|o[b]>>>8)&4278255360,u[y+b]^=o[b]},blockSize:128/32,ivSize:64/32});function g(){for(var u=this._X,y=this._C,w=0;w<8;w++)d[w]=y[w];y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<d[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<d[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<d[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<d[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<d[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<d[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<d[6]>>>0?1:0)|0,this._b=y[7]>>>0<d[7]>>>0?1:0;for(var w=0;w<8;w++){var b=u[w]+y[w],C=b&65535,x=b>>>16,p=((C*C>>>17)+C*x>>>15)+x*x,E=((b&4294901760)*b|0)+((b&65535)*b|0);c[w]=p^E}u[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,u[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,u[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,u[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,u[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,u[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,u[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,u[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}s.RabbitLegacy=n._createHelper(l)}(),t.RabbitLegacy})}(Fi)),Fi.exports}var ki={exports:{}},ya;function H0(){return ya||(ya=1,function(r,e){(function(t,s,i){r.exports=s(oe(),sr(),ir(),Wt(),Pe())})(se,function(t){return function(){var s=t,i=s.lib,n=i.BlockCipher,a=s.algo;const o=16,d=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],c=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function g(C,x){let p=x>>24&255,E=x>>16&255,_=x>>8&255,T=x&255,S=C.sbox[0][p]+C.sbox[1][E];return S=S^C.sbox[2][_],S=S+C.sbox[3][T],S}function u(C,x,p){let E=x,_=p,T;for(let S=0;S<o;++S)E=E^C.pbox[S],_=g(C,E)^_,T=E,E=_,_=T;return T=E,E=_,_=T,_=_^C.pbox[o],E=E^C.pbox[o+1],{left:E,right:_}}function y(C,x,p){let E=x,_=p,T;for(let S=o+1;S>1;--S)E=E^C.pbox[S],_=g(C,E)^_,T=E,E=_,_=T;return T=E,E=_,_=T,_=_^C.pbox[1],E=E^C.pbox[0],{left:E,right:_}}function w(C,x,p){for(let R=0;R<4;R++){C.sbox[R]=[];for(let h=0;h<256;h++)C.sbox[R][h]=c[R][h]}let E=0;for(let R=0;R<o+2;R++)C.pbox[R]=d[R]^x[E],E++,E>=p&&(E=0);let _=0,T=0,S=0;for(let R=0;R<o+2;R+=2)S=u(C,_,T),_=S.left,T=S.right,C.pbox[R]=_,C.pbox[R+1]=T;for(let R=0;R<4;R++)for(let h=0;h<256;h+=2)S=u(C,_,T),_=S.left,T=S.right,C.sbox[R][h]=_,C.sbox[R][h+1]=T;return!0}var b=a.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var C=this._keyPriorReset=this._key,x=C.words,p=C.sigBytes/4;w(l,x,p)}},encryptBlock:function(C,x){var p=u(l,C[x],C[x+1]);C[x]=p.left,C[x+1]=p.right},decryptBlock:function(C,x){var p=y(l,C[x],C[x+1]);C[x]=p.left,C[x+1]=p.right},blockSize:64/32,keySize:128/32,ivSize:64/32});s.Blowfish=n._createHelper(b)}(),t.Blowfish})}(ki)),ki.exports}(function(r,e){(function(t,s,i){r.exports=s(oe(),os(),d0(),h0(),sr(),u0(),ir(),Wn(),ii(),f0(),Kn(),g0(),x0(),p0(),hi(),m0(),Wt(),Pe(),v0(),y0(),w0(),E0(),b0(),C0(),_0(),D0(),A0(),S0(),T0(),R0(),F0(),k0(),B0(),I0(),H0())})(se,function(t){return t})})($n);var P0=$n.exports;const nr=Lo(P0);let ce=null,Ae=null,mr=null;const Ge={setConfig(r){ce=r},getConfig(){return ce},decrypt(r,e=null,t=null){var s,i;try{const n=e||((s=ce==null?void 0:ce.env)==null?void 0:s.DECODE_IV)||"default_iv_1234",a=t||((i=ce==null?void 0:ce.env)==null?void 0:i.DECODE_KEY)||"default_key_1234",o=nr.enc.Base64.parse(r),d=nr.enc.Utf8.parse(a),c=nr.enc.Utf8.parse(n);return nr.AES.decrypt({ciphertext:o},d,{iv:c,mode:nr.mode.CTR,padding:nr.pad.NoPadding}).toString(nr.enc.Utf8)}catch(n){return console.log("ERROR ===> failed decrypt:",n),!1}},pushSound(){try{mr&&clearInterval(mr);const r=()=>{try{(!Ae||Ae.state==="closed")&&(Ae=new(window.AudioContext||window.webkitAudioContext)),Ae.state==="suspended"&&Ae.resume();const e=Ae.createOscillator(),t=Ae.createOscillator(),s=Ae.createGain();e.type="sine",t.type="sine",e.frequency.setValueAtTime(400,Ae.currentTime),t.frequency.setValueAtTime(450,Ae.currentTime);const i=Ae.createOscillator(),n=Ae.createGain();i.frequency.value=25,n.gain.value=15,i.connect(n),n.connect(e.frequency),n.connect(t.frequency),e.connect(s),t.connect(s),s.connect(Ae.destination),s.gain.setValueAtTime(0,Ae.currentTime),s.gain.linearRampToValueAtTime(.08,Ae.currentTime+.05),s.gain.setValueAtTime(.08,Ae.currentTime+1.2),s.gain.linearRampToValueAtTime(0,Ae.currentTime+1.3),i.start(),e.start(),t.start(),i.stop(Ae.currentTime+1.4),e.stop(Ae.currentTime+1.4),t.stop(Ae.currentTime+1.4)}catch(e){console.warn("Failed to play synthesized tone:",e)}};r(),mr=setInterval(r,3e3)}catch(r){console.warn("AudioContext initialization failed:",r)}},stopSound(){mr&&(clearInterval(mr),mr=null),Ae&&(Ae.close().catch(()=>{}),Ae=null)},pushNotification(r){Z.emitToParent("show_notification",{message:r})},toHHMMSS(r){const e=parseInt(r,10),t=Math.floor(e/3600),s=Math.floor(e/60)%60,i=e%60;return[t,s,i].map(n=>n<10?"0"+n:n).filter((n,a)=>n!=="00"||a>0).join(":")},mute(r,e,t,s){r?e?r.unmute():r.mute():s&&(e?s.unmuteAudio():s.muteAudio()),t(!e)},hold(r,e,t,s){r?e?r.unhold():r.hold():s&&(e?s.unhold():s.hold()),t(!e)},async hangup(r,e,t,s,i,n,a,o){s&&await s(!1),i&&i(!1),n&&n(0),r&&r.current&&clearInterval(r.current),e?(await(e==null?void 0:e.terminate("hangup")),a&&a(!1),Z.emitLocal("yeastarSession",!1)):t&&(await(t==null?void 0:t.hangup()),o&&o(!1),Z.emitLocal("flashphonerCall",!1))},attachRemoteAudio(r){if(!r)return;let e=document.getElementById("ys-remote-audio");e||(e=document.createElement("audio"),e.id="ys-remote-audio",e.autoplay=!0,e.playsInline=!0,e.hidden=!0,document.body.appendChild(e)),e.srcObject=r,e.play().catch(()=>{console.warn("User gesture needed to play audio"),Z.emitLocal("needUserGestureToPlay",!0)})},getContactName(r){return r&&((ce==null?void 0:ce.contacts)||{1001:"John Doe",1002:"Jane Smith","08123456789":"Alice Johnson",123:"Customer Support"})[r]||null},async updateExtensionStatus(r,e="Ready",t="ready"){var s,i,n;try{const a=(ce==null?void 0:ce["X-CPAAS-Key-Fingerprint"])||(ce==null?void 0:ce.fingerprint)||(ce==null?void 0:ce.cpaasKeyFingerprint)||((s=ce==null?void 0:ce.env)==null?void 0:s.fingerprint)||((i=ce==null?void 0:ce.env)==null?void 0:i.X_CPAAS_Key_Fingerprint)||((n=ce==null?void 0:ce.pabxConfig)==null?void 0:n["X-CPAAS-Key-Fingerprint"]);if(!a)return console.warn("X-CPAAS-Key-Fingerprint not found. Cannot update extension status."),!1;const o=await fetch("https://cpaas-api-dev.omni-x.dev/voice/extensions/status",{method:"POST",headers:{"X-CPAAS-Key-Fingerprint":a,"Content-Type":"application/json"},body:JSON.stringify({extension:r,status:e,reason:t})}),d=await o.json();return console.log(`[ExtStatus] ${e}/${t}:`,d),o.ok}catch(a){return console.error("Failed to update extension status:",a),!1}},getExtensionUsername(){var r,e;return((r=ce==null?void 0:ce.auth)==null?void 0:r.user_pbx)||((e=ce==null?void 0:ce.auth)==null?void 0:e.username)||null}};function $0({initialRegisterStatus:r="CONNECTING",autoReady:e=!0,showAuxButton:t=!1,auxOptions:s=[]}){const[i,n]=re.useState(""),[a,o]=re.useState("Idle"),[d,c]=re.useState("00:00"),[l,g]=re.useState(!1),[u,y]=re.useState(!1),[w,b]=re.useState(!1),[C,x]=re.useState(""),[p,E]=re.useState(""),[_,T]=re.useState(""),[S,R]=re.useState(r),[h,N]=re.useState(""),[A,f]=re.useState(e&&r==="REGISTERED"?"READY":"NOT_READY"),[v,m]=re.useState(!1),[U,q]=re.useState(null),X=re.useCallback(j=>{E(j),setTimeout(()=>E(""),4e3)},[]);re.useEffect(()=>{const j=[Z.on("call_status",K=>{o(K),K!=="InCall"&&(b(!1),x(""),y(!1),g(!1))}),Z.on("call_duration",c),Z.on("incoming_call",K=>{var pt,Le,Ne,lt,Xe,Tt,mt,vt;const Ee=((Le=(pt=K==null?void 0:K.remoteIdentity)==null?void 0:pt.uri)==null?void 0:Le.user)||(K==null?void 0:K.from_id)||"Unknown",ct=((Ne=K==null?void 0:K.remoteIdentity)==null?void 0:Ne.displayName)||((Xe=(lt=K==null?void 0:K.request)==null?void 0:lt.from)==null?void 0:Xe.displayName)||((vt=(mt=(Tt=K==null?void 0:K.incomingInviteRequest)==null?void 0:Tt.message)==null?void 0:mt.from)==null?void 0:vt.displayName)||(K==null?void 0:K.from_name)||Ge.getContactName(Ee)||"";n(Ee),T(ct),o("Ringing")}),Z.on("register_status",K=>{const Ee=typeof K=="string"?K:(K==null?void 0:K.status)??"FAILED",ct=typeof K=="object"?K==null?void 0:K.reason:"";R(Ee),N(Ee==="FAILED"?ct||"Failed to connect to Voice Platform":""),Ee!=="REGISTERED"&&f("NOT_READY")}),Z.on("agent_status",K=>{f(K),K!=="AUX"&&q(null)}),Z.on("call_failed",K=>X(K||"Call Failed"))];return()=>j.forEach(K=>K())},[X]),re.useEffect(()=>{a==="Idle"&&T(Ge.getContactName(i)||"")},[i,a]),re.useEffect(()=>{const j=K=>{K.metaKey||K.ctrlKey||K.altKey||(a==="InCall"&&/^[0-9*#]$/.test(K.key)?P(K.key):a==="Idle"&&S==="REGISTERED"&&/^[0-9+*#]$/.test(K.key)?n(Ee=>Ee+K.key):a==="Idle"&&K.key==="Backspace"?n(Ee=>Ee.slice(0,-1)):a==="Idle"&&K.key==="Enter"&&I())};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[a,S,i]);const W=async(j,K)=>{const Ee=Ge.getExtensionUsername();if(!Ee)return!1;m(!0);const ct=await Ge.updateExtensionStatus(Ee,j,K);return m(!1),ct},ie=async()=>{await W("Ready","ready")&&(f("READY"),q(null),Z.emitLocal("agent_status","READY"))},he=async()=>{await W("Logout","not_ready")&&(f("NOT_READY"),q(null),Z.emitLocal("agent_status","NOT_READY"))},ue=async(j=null)=>{const K=(j==null?void 0:j.code)||"AUX",Ee=(j==null?void 0:j.label)||"AUX";await W("AUX",K)&&(f("AUX"),q({code:K,label:Ee}),Z.emitLocal("agent_status","AUX")),setShowAuxMenu(!1)},I=()=>{const j=i.trim();j&&Z.emitLocal("local_dial",{number:j})},P=j=>{x(K=>K+j),Z.emitLocal("local_dtmf",{key:j})},$=()=>Z.emitLocal("local_hangup"),H=()=>Z.emitLocal("local_answer"),we=()=>Z.emitLocal("local_reject"),pe=()=>{const j=!l;g(j),Z.emitLocal("local_toggle_mute",{muted:j})},ke=()=>{Z.emitLocal("local_toggle_hold",{isOnHold:u,setIsOnHold:y})};return a==="Ringing"?F.jsxs(Or,{error:p,children:[F.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[F.jsx(Bi,{color:"green",pulse:!0,children:F.jsx(Hn,{className:"w-9 h-9 text-green-600"})}),F.jsxs("div",{className:"text-center space-y-1",children:[F.jsx("p",{className:"text-lg font-bold text-gray-800 leading-tight",children:_||i||"Unknown"}),_&&F.jsx("p",{className:"text-sm font-mono text-gray-400 tracking-wider",children:i}),F.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-green-50 border border-green-100 mt-1",children:[F.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),F.jsx("span",{className:"text-[11px] font-semibold text-green-600 uppercase tracking-widest",children:"Incoming Call"})]})]})]}),F.jsxs(wa,{children:[F.jsx(Ii,{color:"red",size:"lg",onClick:we,title:"Reject",children:F.jsx(ns,{className:"w-6 h-6"})}),F.jsx(Ii,{color:"green",size:"lg",onClick:H,title:"Answer",pulse:!0,children:F.jsx(as,{className:"w-6 h-6 fill-white"})})]})]}):a==="Calling..."?F.jsxs(Or,{error:p,children:[F.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[F.jsx(Bi,{color:"primary",pulse:!0,children:F.jsx(s0,{className:"w-9 h-9 text-primary"})}),F.jsxs("div",{className:"text-center space-y-1",children:[F.jsx("p",{className:"text-lg font-bold text-gray-800 leading-tight",children:_||i}),_&&F.jsx("p",{className:"text-xs font-mono text-gray-400 tracking-wider",children:i}),F.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-primary/8 border border-primary/15 mt-1",children:[F.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary animate-pulse"}),F.jsx("span",{className:"text-[11px] font-semibold text-primary uppercase tracking-widest",children:"Dialing..."})]})]})]}),F.jsx(wa,{children:F.jsx(Ii,{color:"red",size:"lg",onClick:$,title:"Cancel",children:F.jsx(ns,{className:"w-6 h-6"})})})]}):a==="InCall"?F.jsxs(Or,{error:p,children:[w?F.jsxs("div",{className:"animate-fadeIn",children:[F.jsxs("div",{className:"px-6 pt-5 pb-2 text-center",children:[F.jsx("p",{className:"text-[10px] font-bold text-gray-400 uppercase tracking-[0.2em] mb-2",children:"DTMF"}),F.jsx("div",{className:"min-h-[44px] flex items-center justify-center",children:F.jsx("span",{className:"text-3xl font-light text-gray-700 tracking-[0.25em] font-mono",children:C||F.jsx("span",{className:"text-gray-200",children:"—"})})})]}),F.jsx(Pn,{onKeyPress:P})]}):F.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[F.jsx(Bi,{color:u?"primary":"green",pulse:!u,children:u?F.jsx(In,{className:"w-9 h-9 text-primary"}):F.jsx(Hn,{className:"w-9 h-9 text-green-600"})}),F.jsxs("div",{className:"text-center space-y-1",children:[F.jsx("p",{className:"text-base font-bold text-gray-800 leading-tight",children:_||i||"Connected"}),_&&F.jsx("p",{className:"text-xs font-mono text-gray-400 tracking-wider",children:i}),F.jsxs("div",{className:"flex items-center justify-center gap-2 mt-1",children:[!u&&F.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),F.jsx("span",{className:`text-sm font-mono font-semibold ${u?"text-primary":"text-green-600"}`,children:u?"On Hold":d})]})]})]}),F.jsx("div",{className:"border-t border-gray-100 bg-gray-50/60 px-6 py-4",children:F.jsxs("div",{className:"flex items-center justify-between gap-2 max-w-[260px] mx-auto",children:[F.jsx(Hi,{onClick:pe,active:l,activeColor:"red",title:l?"Unmute":"Mute",children:l?F.jsx(t0,{className:"w-[18px] h-[18px]"}):F.jsx(r0,{className:"w-[18px] h-[18px]"})}),F.jsx(Hi,{onClick:ke,active:u,activeColor:"primary",title:u?"Resume":"Hold",children:u?F.jsx(i0,{className:"w-[18px] h-[18px]"}):F.jsx(In,{className:"w-[18px] h-[18px]"})}),F.jsx(Hi,{onClick:()=>b(j=>!j),active:w,activeColor:"primary",title:"Keypad",children:F.jsx(e0,{className:"w-[18px] h-[18px]"})}),F.jsx("button",{onClick:$,title:"End Call",className:"w-12 h-12 rounded-full bg-red-500 hover:bg-red-600 text-white flex items-center justify-center shadow-[0_4px_14px_rgba(239,68,68,0.4)] hover:shadow-[0_6px_18px_rgba(239,68,68,0.5)] transition-all active:scale-95",children:F.jsx(ns,{className:"w-5 h-5"})})]})})]}):S==="REGISTERED"?F.jsxs(Or,{error:p,children:[F.jsxs("div",{className:"px-5 pt-5 pb-1",children:[F.jsxs("div",{className:"relative flex items-center justify-center min-h-[56px] bg-gray-50 rounded-2xl border border-gray-100 px-10",children:[F.jsx("input",{type:"text",value:i,onChange:j=>n(j.target.value.replace(/[^0-9+*#]/g,"")),onKeyDown:j=>j.key==="Enter"&&I(),className:"w-full text-center text-[28px] font-light text-gray-800 tracking-[0.12em] bg-transparent outline-none placeholder:text-gray-300 placeholder:text-2xl placeholder:font-normal",placeholder:"Enter number"}),i&&F.jsx("button",{onClick:()=>n(j=>j.slice(0,-1)),onMouseDown:j=>j.preventDefault(),className:"absolute right-3 p-1.5 rounded-full text-gray-300 hover:text-gray-500 hover:bg-gray-200 transition-all",children:F.jsx(Qo,{className:"w-4 h-4"})})]}),_&&F.jsx("p",{className:"text-center text-xs text-primary/70 font-medium mt-1.5 tracking-wide",children:_})]}),F.jsx(Pn,{onKeyPress:j=>n(K=>K+j)}),F.jsx("div",{className:"px-5 pb-4 pt-1 flex justify-center",children:F.jsxs("button",{onClick:I,disabled:!i.trim(),className:`
143
+ */return t.mode.CTRGladman=function(){var s=t.lib.BlockCipherMode.extend();function i(o){if((o>>24&255)===255){var d=o>>16&255,c=o>>8&255,l=o&255;d===255?(d=0,c===255?(c=0,l===255?l=0:++l):++c):++d,o=0,o+=d<<16,o+=c<<8,o+=l}else o+=1<<24;return o}function n(o){return(o[0]=i(o[0]))===0&&(o[1]=i(o[1])),o}var a=s.Encryptor=s.extend({processBlock:function(o,d){var c=this._cipher,l=c.blockSize,g=this._iv,u=this._counter;g&&(u=this._counter=g.slice(0),this._iv=void 0),n(u);var y=u.slice(0);c.encryptBlock(y,0);for(var w=0;w<l;w++)o[d+w]^=y[w]}});return s.Decryptor=a,s}(),t.mode.CTRGladman})}(mi)),mi.exports}var vi={exports:{}},aa;function E0(){return aa||(aa=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.mode.OFB=function(){var s=t.lib.BlockCipherMode.extend(),i=s.Encryptor=s.extend({processBlock:function(n,a){var o=this._cipher,d=o.blockSize,c=this._iv,l=this._keystream;c&&(l=this._keystream=c.slice(0),this._iv=void 0),o.encryptBlock(l,0);for(var g=0;g<d;g++)n[a+g]^=l[g]}});return s.Decryptor=i,s}(),t.mode.OFB})}(vi)),vi.exports}var yi={exports:{}},oa;function b0(){return oa||(oa=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.mode.ECB=function(){var s=t.lib.BlockCipherMode.extend();return s.Encryptor=s.extend({processBlock:function(i,n){this._cipher.encryptBlock(i,n)}}),s.Decryptor=s.extend({processBlock:function(i,n){this._cipher.decryptBlock(i,n)}}),s}(),t.mode.ECB})}(yi)),yi.exports}var wi={exports:{}},ca;function C0(){return ca||(ca=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.pad.AnsiX923={pad:function(s,i){var n=s.sigBytes,a=i*4,o=a-n%a,d=n+o-1;s.clamp(),s.words[d>>>2]|=o<<24-d%4*8,s.sigBytes+=o},unpad:function(s){var i=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=i}},t.pad.Ansix923})}(wi)),wi.exports}var Ei={exports:{}},la;function _0(){return la||(la=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.pad.Iso10126={pad:function(s,i){var n=i*4,a=n-s.sigBytes%n;s.concat(t.lib.WordArray.random(a-1)).concat(t.lib.WordArray.create([a<<24],1))},unpad:function(s){var i=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=i}},t.pad.Iso10126})}(Ei)),Ei.exports}var bi={exports:{}},da;function D0(){return da||(da=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.pad.Iso97971={pad:function(s,i){s.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(s,i)},unpad:function(s){t.pad.ZeroPadding.unpad(s),s.sigBytes--}},t.pad.Iso97971})}(bi)),bi.exports}var Ci={exports:{}},ha;function A0(){return ha||(ha=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.pad.ZeroPadding={pad:function(s,i){var n=i*4;s.clamp(),s.sigBytes+=n-(s.sigBytes%n||n)},unpad:function(s){for(var i=s.words,n=s.sigBytes-1,n=s.sigBytes-1;n>=0;n--)if(i[n>>>2]>>>24-n%4*8&255){s.sigBytes=n+1;break}}},t.pad.ZeroPadding})}(Ci)),Ci.exports}var _i={exports:{}},ua;function S0(){return ua||(ua=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(_i)),_i.exports}var Di={exports:{}},fa;function T0(){return fa||(fa=1,function(r,e){(function(t,s,i){r.exports=s(oe(),Pe())})(se,function(t){return function(s){var i=t,n=i.lib,a=n.CipherParams,o=i.enc,d=o.Hex,c=i.format;c.Hex={stringify:function(l){return l.ciphertext.toString(d)},parse:function(l){var g=d.parse(l);return a.create({ciphertext:g})}}}(),t.format.Hex})}(Di)),Di.exports}var Ai={exports:{}},ga;function R0(){return ga||(ga=1,function(r,e){(function(t,s,i){r.exports=s(oe(),sr(),ir(),Wt(),Pe())})(se,function(t){return function(){var s=t,i=s.lib,n=i.BlockCipher,a=s.algo,o=[],d=[],c=[],l=[],g=[],u=[],y=[],w=[],b=[],C=[];(function(){for(var E=[],_=0;_<256;_++)_<128?E[_]=_<<1:E[_]=_<<1^283;for(var T=0,S=0,_=0;_<256;_++){var R=S^S<<1^S<<2^S<<3^S<<4;R=R>>>8^R&255^99,o[T]=R,d[R]=T;var h=E[T],N=E[h],A=E[N],f=E[R]*257^R*16843008;c[T]=f<<24|f>>>8,l[T]=f<<16|f>>>16,g[T]=f<<8|f>>>24,u[T]=f;var f=A*16843009^N*65537^h*257^T*16843008;y[R]=f<<24|f>>>8,w[R]=f<<16|f>>>16,b[R]=f<<8|f>>>24,C[R]=f,T?(T=h^E[E[E[A^h]]],S^=E[E[S]]):T=S=1}})();var x=[0,1,2,4,8,16,32,64,128,27,54],p=a.AES=n.extend({_doReset:function(){var E;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var _=this._keyPriorReset=this._key,T=_.words,S=_.sigBytes/4,R=this._nRounds=S+6,h=(R+1)*4,N=this._keySchedule=[],A=0;A<h;A++)A<S?N[A]=T[A]:(E=N[A-1],A%S?S>6&&A%S==4&&(E=o[E>>>24]<<24|o[E>>>16&255]<<16|o[E>>>8&255]<<8|o[E&255]):(E=E<<8|E>>>24,E=o[E>>>24]<<24|o[E>>>16&255]<<16|o[E>>>8&255]<<8|o[E&255],E^=x[A/S|0]<<24),N[A]=N[A-S]^E);for(var f=this._invKeySchedule=[],v=0;v<h;v++){var A=h-v;if(v%4)var E=N[A];else var E=N[A-4];v<4||A<=4?f[v]=E:f[v]=y[o[E>>>24]]^w[o[E>>>16&255]]^b[o[E>>>8&255]]^C[o[E&255]]}}},encryptBlock:function(E,_){this._doCryptBlock(E,_,this._keySchedule,c,l,g,u,o)},decryptBlock:function(E,_){var T=E[_+1];E[_+1]=E[_+3],E[_+3]=T,this._doCryptBlock(E,_,this._invKeySchedule,y,w,b,C,d);var T=E[_+1];E[_+1]=E[_+3],E[_+3]=T},_doCryptBlock:function(E,_,T,S,R,h,N,A){for(var f=this._nRounds,v=E[_]^T[0],m=E[_+1]^T[1],U=E[_+2]^T[2],q=E[_+3]^T[3],X=4,W=1;W<f;W++){var ie=S[v>>>24]^R[m>>>16&255]^h[U>>>8&255]^N[q&255]^T[X++],he=S[m>>>24]^R[U>>>16&255]^h[q>>>8&255]^N[v&255]^T[X++],ue=S[U>>>24]^R[q>>>16&255]^h[v>>>8&255]^N[m&255]^T[X++],I=S[q>>>24]^R[v>>>16&255]^h[m>>>8&255]^N[U&255]^T[X++];v=ie,m=he,U=ue,q=I}var ie=(A[v>>>24]<<24|A[m>>>16&255]<<16|A[U>>>8&255]<<8|A[q&255])^T[X++],he=(A[m>>>24]<<24|A[U>>>16&255]<<16|A[q>>>8&255]<<8|A[v&255])^T[X++],ue=(A[U>>>24]<<24|A[q>>>16&255]<<16|A[v>>>8&255]<<8|A[m&255])^T[X++],I=(A[q>>>24]<<24|A[v>>>16&255]<<16|A[m>>>8&255]<<8|A[U&255])^T[X++];E[_]=ie,E[_+1]=he,E[_+2]=ue,E[_+3]=I},keySize:256/32});s.AES=n._createHelper(p)}(),t.AES})}(Ai)),Ai.exports}var Si={exports:{}},xa;function F0(){return xa||(xa=1,function(r,e){(function(t,s,i){r.exports=s(oe(),sr(),ir(),Wt(),Pe())})(se,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,a=i.BlockCipher,o=s.algo,d=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],g=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],y=o.DES=a.extend({_doReset:function(){for(var x=this._key,p=x.words,E=[],_=0;_<56;_++){var T=d[_]-1;E[_]=p[T>>>5]>>>31-T%32&1}for(var S=this._subKeys=[],R=0;R<16;R++){for(var h=S[R]=[],N=l[R],_=0;_<24;_++)h[_/6|0]|=E[(c[_]-1+N)%28]<<31-_%6,h[4+(_/6|0)]|=E[28+(c[_+24]-1+N)%28]<<31-_%6;h[0]=h[0]<<1|h[0]>>>31;for(var _=1;_<7;_++)h[_]=h[_]>>>(_-1)*4+3;h[7]=h[7]<<5|h[7]>>>27}for(var A=this._invSubKeys=[],_=0;_<16;_++)A[_]=S[15-_]},encryptBlock:function(x,p){this._doCryptBlock(x,p,this._subKeys)},decryptBlock:function(x,p){this._doCryptBlock(x,p,this._invSubKeys)},_doCryptBlock:function(x,p,E){this._lBlock=x[p],this._rBlock=x[p+1],w.call(this,4,252645135),w.call(this,16,65535),b.call(this,2,858993459),b.call(this,8,16711935),w.call(this,1,1431655765);for(var _=0;_<16;_++){for(var T=E[_],S=this._lBlock,R=this._rBlock,h=0,N=0;N<8;N++)h|=g[N][((R^T[N])&u[N])>>>0];this._lBlock=R,this._rBlock=S^h}var A=this._lBlock;this._lBlock=this._rBlock,this._rBlock=A,w.call(this,1,1431655765),b.call(this,8,16711935),b.call(this,2,858993459),w.call(this,16,65535),w.call(this,4,252645135),x[p]=this._lBlock,x[p+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function w(x,p){var E=(this._lBlock>>>x^this._rBlock)&p;this._rBlock^=E,this._lBlock^=E<<x}function b(x,p){var E=(this._rBlock>>>x^this._lBlock)&p;this._lBlock^=E,this._rBlock^=E<<x}s.DES=a._createHelper(y);var C=o.TripleDES=a.extend({_doReset:function(){var x=this._key,p=x.words;if(p.length!==2&&p.length!==4&&p.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var E=p.slice(0,2),_=p.length<4?p.slice(0,2):p.slice(2,4),T=p.length<6?p.slice(0,2):p.slice(4,6);this._des1=y.createEncryptor(n.create(E)),this._des2=y.createEncryptor(n.create(_)),this._des3=y.createEncryptor(n.create(T))},encryptBlock:function(x,p){this._des1.encryptBlock(x,p),this._des2.decryptBlock(x,p),this._des3.encryptBlock(x,p)},decryptBlock:function(x,p){this._des3.decryptBlock(x,p),this._des2.encryptBlock(x,p),this._des1.decryptBlock(x,p)},keySize:192/32,ivSize:64/32,blockSize:64/32});s.TripleDES=a._createHelper(C)}(),t.TripleDES})}(Si)),Si.exports}var Ti={exports:{}},pa;function k0(){return pa||(pa=1,function(r,e){(function(t,s,i){r.exports=s(oe(),sr(),ir(),Wt(),Pe())})(se,function(t){return function(){var s=t,i=s.lib,n=i.StreamCipher,a=s.algo,o=a.RC4=n.extend({_doReset:function(){for(var l=this._key,g=l.words,u=l.sigBytes,y=this._S=[],w=0;w<256;w++)y[w]=w;for(var w=0,b=0;w<256;w++){var C=w%u,x=g[C>>>2]>>>24-C%4*8&255;b=(b+y[w]+x)%256;var p=y[w];y[w]=y[b],y[b]=p}this._i=this._j=0},_doProcessBlock:function(l,g){l[g]^=d.call(this)},keySize:256/32,ivSize:0});function d(){for(var l=this._S,g=this._i,u=this._j,y=0,w=0;w<4;w++){g=(g+1)%256,u=(u+l[g])%256;var b=l[g];l[g]=l[u],l[u]=b,y|=l[(l[g]+l[u])%256]<<24-w*8}return this._i=g,this._j=u,y}s.RC4=n._createHelper(o);var c=a.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)d.call(this)}});s.RC4Drop=n._createHelper(c)}(),t.RC4})}(Ti)),Ti.exports}var Ri={exports:{}},ma;function B0(){return ma||(ma=1,function(r,e){(function(t,s,i){r.exports=s(oe(),sr(),ir(),Wt(),Pe())})(se,function(t){return function(){var s=t,i=s.lib,n=i.StreamCipher,a=s.algo,o=[],d=[],c=[],l=a.Rabbit=n.extend({_doReset:function(){for(var u=this._key.words,y=this.cfg.iv,w=0;w<4;w++)u[w]=(u[w]<<8|u[w]>>>24)&16711935|(u[w]<<24|u[w]>>>8)&4278255360;var b=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],C=this._C=[u[2]<<16|u[2]>>>16,u[0]&4294901760|u[1]&65535,u[3]<<16|u[3]>>>16,u[1]&4294901760|u[2]&65535,u[0]<<16|u[0]>>>16,u[2]&4294901760|u[3]&65535,u[1]<<16|u[1]>>>16,u[3]&4294901760|u[0]&65535];this._b=0;for(var w=0;w<4;w++)g.call(this);for(var w=0;w<8;w++)C[w]^=b[w+4&7];if(y){var x=y.words,p=x[0],E=x[1],_=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,T=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,S=_>>>16|T&4294901760,R=T<<16|_&65535;C[0]^=_,C[1]^=S,C[2]^=T,C[3]^=R,C[4]^=_,C[5]^=S,C[6]^=T,C[7]^=R;for(var w=0;w<4;w++)g.call(this)}},_doProcessBlock:function(u,y){var w=this._X;g.call(this),o[0]=w[0]^w[5]>>>16^w[3]<<16,o[1]=w[2]^w[7]>>>16^w[5]<<16,o[2]=w[4]^w[1]>>>16^w[7]<<16,o[3]=w[6]^w[3]>>>16^w[1]<<16;for(var b=0;b<4;b++)o[b]=(o[b]<<8|o[b]>>>24)&16711935|(o[b]<<24|o[b]>>>8)&4278255360,u[y+b]^=o[b]},blockSize:128/32,ivSize:64/32});function g(){for(var u=this._X,y=this._C,w=0;w<8;w++)d[w]=y[w];y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<d[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<d[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<d[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<d[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<d[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<d[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<d[6]>>>0?1:0)|0,this._b=y[7]>>>0<d[7]>>>0?1:0;for(var w=0;w<8;w++){var b=u[w]+y[w],C=b&65535,x=b>>>16,p=((C*C>>>17)+C*x>>>15)+x*x,E=((b&4294901760)*b|0)+((b&65535)*b|0);c[w]=p^E}u[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,u[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,u[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,u[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,u[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,u[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,u[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,u[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}s.Rabbit=n._createHelper(l)}(),t.Rabbit})}(Ri)),Ri.exports}var Fi={exports:{}},va;function I0(){return va||(va=1,function(r,e){(function(t,s,i){r.exports=s(oe(),sr(),ir(),Wt(),Pe())})(se,function(t){return function(){var s=t,i=s.lib,n=i.StreamCipher,a=s.algo,o=[],d=[],c=[],l=a.RabbitLegacy=n.extend({_doReset:function(){var u=this._key.words,y=this.cfg.iv,w=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],b=this._C=[u[2]<<16|u[2]>>>16,u[0]&4294901760|u[1]&65535,u[3]<<16|u[3]>>>16,u[1]&4294901760|u[2]&65535,u[0]<<16|u[0]>>>16,u[2]&4294901760|u[3]&65535,u[1]<<16|u[1]>>>16,u[3]&4294901760|u[0]&65535];this._b=0;for(var C=0;C<4;C++)g.call(this);for(var C=0;C<8;C++)b[C]^=w[C+4&7];if(y){var x=y.words,p=x[0],E=x[1],_=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,T=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,S=_>>>16|T&4294901760,R=T<<16|_&65535;b[0]^=_,b[1]^=S,b[2]^=T,b[3]^=R,b[4]^=_,b[5]^=S,b[6]^=T,b[7]^=R;for(var C=0;C<4;C++)g.call(this)}},_doProcessBlock:function(u,y){var w=this._X;g.call(this),o[0]=w[0]^w[5]>>>16^w[3]<<16,o[1]=w[2]^w[7]>>>16^w[5]<<16,o[2]=w[4]^w[1]>>>16^w[7]<<16,o[3]=w[6]^w[3]>>>16^w[1]<<16;for(var b=0;b<4;b++)o[b]=(o[b]<<8|o[b]>>>24)&16711935|(o[b]<<24|o[b]>>>8)&4278255360,u[y+b]^=o[b]},blockSize:128/32,ivSize:64/32});function g(){for(var u=this._X,y=this._C,w=0;w<8;w++)d[w]=y[w];y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<d[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<d[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<d[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<d[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<d[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<d[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<d[6]>>>0?1:0)|0,this._b=y[7]>>>0<d[7]>>>0?1:0;for(var w=0;w<8;w++){var b=u[w]+y[w],C=b&65535,x=b>>>16,p=((C*C>>>17)+C*x>>>15)+x*x,E=((b&4294901760)*b|0)+((b&65535)*b|0);c[w]=p^E}u[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,u[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,u[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,u[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,u[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,u[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,u[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,u[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}s.RabbitLegacy=n._createHelper(l)}(),t.RabbitLegacy})}(Fi)),Fi.exports}var ki={exports:{}},ya;function H0(){return ya||(ya=1,function(r,e){(function(t,s,i){r.exports=s(oe(),sr(),ir(),Wt(),Pe())})(se,function(t){return function(){var s=t,i=s.lib,n=i.BlockCipher,a=s.algo;const o=16,d=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],c=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function g(C,x){let p=x>>24&255,E=x>>16&255,_=x>>8&255,T=x&255,S=C.sbox[0][p]+C.sbox[1][E];return S=S^C.sbox[2][_],S=S+C.sbox[3][T],S}function u(C,x,p){let E=x,_=p,T;for(let S=0;S<o;++S)E=E^C.pbox[S],_=g(C,E)^_,T=E,E=_,_=T;return T=E,E=_,_=T,_=_^C.pbox[o],E=E^C.pbox[o+1],{left:E,right:_}}function y(C,x,p){let E=x,_=p,T;for(let S=o+1;S>1;--S)E=E^C.pbox[S],_=g(C,E)^_,T=E,E=_,_=T;return T=E,E=_,_=T,_=_^C.pbox[1],E=E^C.pbox[0],{left:E,right:_}}function w(C,x,p){for(let R=0;R<4;R++){C.sbox[R]=[];for(let h=0;h<256;h++)C.sbox[R][h]=c[R][h]}let E=0;for(let R=0;R<o+2;R++)C.pbox[R]=d[R]^x[E],E++,E>=p&&(E=0);let _=0,T=0,S=0;for(let R=0;R<o+2;R+=2)S=u(C,_,T),_=S.left,T=S.right,C.pbox[R]=_,C.pbox[R+1]=T;for(let R=0;R<4;R++)for(let h=0;h<256;h+=2)S=u(C,_,T),_=S.left,T=S.right,C.sbox[R][h]=_,C.sbox[R][h+1]=T;return!0}var b=a.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var C=this._keyPriorReset=this._key,x=C.words,p=C.sigBytes/4;w(l,x,p)}},encryptBlock:function(C,x){var p=u(l,C[x],C[x+1]);C[x]=p.left,C[x+1]=p.right},decryptBlock:function(C,x){var p=y(l,C[x],C[x+1]);C[x]=p.left,C[x+1]=p.right},blockSize:64/32,keySize:128/32,ivSize:64/32});s.Blowfish=n._createHelper(b)}(),t.Blowfish})}(ki)),ki.exports}(function(r,e){(function(t,s,i){r.exports=s(oe(),os(),d0(),h0(),sr(),u0(),ir(),Wn(),ii(),f0(),Kn(),g0(),x0(),p0(),hi(),m0(),Wt(),Pe(),v0(),y0(),w0(),E0(),b0(),C0(),_0(),D0(),A0(),S0(),T0(),R0(),F0(),k0(),B0(),I0(),H0())})(se,function(t){return t})})($n);var P0=$n.exports;const nr=Lo(P0);let ce=null,Ae=null,mr=null;const Ge={setConfig(r){ce=r},getConfig(){return ce},decrypt(r,e=null,t=null){var s,i;try{const n=e||((s=ce==null?void 0:ce.env)==null?void 0:s.DECODE_IV)||"default_iv_1234",a=t||((i=ce==null?void 0:ce.env)==null?void 0:i.DECODE_KEY)||"default_key_1234",o=nr.enc.Base64.parse(r),d=nr.enc.Utf8.parse(a),c=nr.enc.Utf8.parse(n);return nr.AES.decrypt({ciphertext:o},d,{iv:c,mode:nr.mode.CTR,padding:nr.pad.NoPadding}).toString(nr.enc.Utf8)}catch(n){return console.log("ERROR ===> failed decrypt:",n),!1}},pushSound(){try{mr&&clearInterval(mr);const r=()=>{try{(!Ae||Ae.state==="closed")&&(Ae=new(window.AudioContext||window.webkitAudioContext)),Ae.state==="suspended"&&Ae.resume();const e=Ae.createOscillator(),t=Ae.createOscillator(),s=Ae.createGain();e.type="sine",t.type="sine",e.frequency.setValueAtTime(400,Ae.currentTime),t.frequency.setValueAtTime(450,Ae.currentTime);const i=Ae.createOscillator(),n=Ae.createGain();i.frequency.value=25,n.gain.value=15,i.connect(n),n.connect(e.frequency),n.connect(t.frequency),e.connect(s),t.connect(s),s.connect(Ae.destination),s.gain.setValueAtTime(0,Ae.currentTime),s.gain.linearRampToValueAtTime(.08,Ae.currentTime+.05),s.gain.setValueAtTime(.08,Ae.currentTime+1.2),s.gain.linearRampToValueAtTime(0,Ae.currentTime+1.3),i.start(),e.start(),t.start(),i.stop(Ae.currentTime+1.4),e.stop(Ae.currentTime+1.4),t.stop(Ae.currentTime+1.4)}catch(e){console.warn("Failed to play synthesized tone:",e)}};r(),mr=setInterval(r,3e3)}catch(r){console.warn("AudioContext initialization failed:",r)}},stopSound(){mr&&(clearInterval(mr),mr=null),Ae&&(Ae.close().catch(()=>{}),Ae=null)},pushNotification(r){Z.emitToParent("show_notification",{message:r})},toHHMMSS(r){const e=parseInt(r,10),t=Math.floor(e/3600),s=Math.floor(e/60)%60,i=e%60;return[t,s,i].map(n=>n<10?"0"+n:n).filter((n,a)=>n!=="00"||a>0).join(":")},mute(r,e,t,s){r?e?r.unmute():r.mute():s&&(e?s.unmuteAudio():s.muteAudio()),t(!e)},hold(r,e,t,s){r?e?r.unhold():r.hold():s&&(e?s.unhold():s.hold()),t(!e)},async hangup(r,e,t,s,i,n,a,o){s&&await s(!1),i&&i(!1),n&&n(0),r&&r.current&&clearInterval(r.current),e?(await(e==null?void 0:e.terminate("hangup")),a&&a(!1),Z.emitLocal("yeastarSession",!1)):t&&(await(t==null?void 0:t.hangup()),o&&o(!1),Z.emitLocal("flashphonerCall",!1))},attachRemoteAudio(r){if(!r)return;let e=document.getElementById("ys-remote-audio");e||(e=document.createElement("audio"),e.id="ys-remote-audio",e.autoplay=!0,e.playsInline=!0,e.hidden=!0,document.body.appendChild(e)),e.srcObject=r,e.play().catch(()=>{console.warn("User gesture needed to play audio"),Z.emitLocal("needUserGestureToPlay",!0)})},getContactName(r){return r&&((ce==null?void 0:ce.contacts)||{1001:"John Doe",1002:"Jane Smith","08123456789":"Alice Johnson",123:"Customer Support"})[r]||null},async updateExtensionStatus(r,e="Ready",t="ready"){var s,i,n;try{const a=(ce==null?void 0:ce["X-CPAAS-Key-Fingerprint"])||(ce==null?void 0:ce.fingerprint)||(ce==null?void 0:ce.cpaasKeyFingerprint)||((s=ce==null?void 0:ce.env)==null?void 0:s.fingerprint)||((i=ce==null?void 0:ce.env)==null?void 0:i.X_CPAAS_Key_Fingerprint)||((n=ce==null?void 0:ce.pabxConfig)==null?void 0:n["X-CPAAS-Key-Fingerprint"]);if(!a)return console.warn("X-CPAAS-Key-Fingerprint not found. Cannot update extension status."),!1;const o=await fetch("https://api-cpaas.omnix.co.id/voice/extensions/status",{method:"POST",headers:{"X-CPAAS-Key-Fingerprint":a,"Content-Type":"application/json"},body:JSON.stringify({extension:r,status:e,reason:t})}),d=await o.json();return console.log(`[ExtStatus] ${e}/${t}:`,d),o.ok}catch(a){return console.error("Failed to update extension status:",a),!1}},getExtensionUsername(){var r,e;return((r=ce==null?void 0:ce.auth)==null?void 0:r.user_pbx)||((e=ce==null?void 0:ce.auth)==null?void 0:e.username)||null}};function $0({initialRegisterStatus:r="CONNECTING",autoReady:e=!0,showAuxButton:t=!1,auxOptions:s=[]}){const[i,n]=re.useState(""),[a,o]=re.useState("Idle"),[d,c]=re.useState("00:00"),[l,g]=re.useState(!1),[u,y]=re.useState(!1),[w,b]=re.useState(!1),[C,x]=re.useState(""),[p,E]=re.useState(""),[_,T]=re.useState(""),[S,R]=re.useState(r),[h,N]=re.useState(""),[A,f]=re.useState(e&&r==="REGISTERED"?"READY":"NOT_READY"),[v,m]=re.useState(!1),[U,q]=re.useState(null),X=re.useCallback(j=>{E(j),setTimeout(()=>E(""),4e3)},[]);re.useEffect(()=>{const j=[Z.on("call_status",K=>{o(K),K!=="InCall"&&(b(!1),x(""),y(!1),g(!1))}),Z.on("call_duration",c),Z.on("incoming_call",K=>{var pt,Le,Ne,lt,Xe,Tt,mt,vt;const Ee=((Le=(pt=K==null?void 0:K.remoteIdentity)==null?void 0:pt.uri)==null?void 0:Le.user)||(K==null?void 0:K.from_id)||"Unknown",ct=((Ne=K==null?void 0:K.remoteIdentity)==null?void 0:Ne.displayName)||((Xe=(lt=K==null?void 0:K.request)==null?void 0:lt.from)==null?void 0:Xe.displayName)||((vt=(mt=(Tt=K==null?void 0:K.incomingInviteRequest)==null?void 0:Tt.message)==null?void 0:mt.from)==null?void 0:vt.displayName)||(K==null?void 0:K.from_name)||Ge.getContactName(Ee)||"";n(Ee),T(ct),o("Ringing")}),Z.on("register_status",K=>{const Ee=typeof K=="string"?K:(K==null?void 0:K.status)??"FAILED",ct=typeof K=="object"?K==null?void 0:K.reason:"";R(Ee),N(Ee==="FAILED"?ct||"Failed to connect to Voice Platform":""),Ee!=="REGISTERED"&&f("NOT_READY")}),Z.on("agent_status",K=>{f(K),K!=="AUX"&&q(null)}),Z.on("call_failed",K=>X(K||"Call Failed"))];return()=>j.forEach(K=>K())},[X]),re.useEffect(()=>{a==="Idle"&&T(Ge.getContactName(i)||"")},[i,a]),re.useEffect(()=>{const j=K=>{K.metaKey||K.ctrlKey||K.altKey||(a==="InCall"&&/^[0-9*#]$/.test(K.key)?P(K.key):a==="Idle"&&S==="REGISTERED"&&/^[0-9+*#]$/.test(K.key)?n(Ee=>Ee+K.key):a==="Idle"&&K.key==="Backspace"?n(Ee=>Ee.slice(0,-1)):a==="Idle"&&K.key==="Enter"&&I())};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[a,S,i]);const W=async(j,K)=>{const Ee=Ge.getExtensionUsername();if(!Ee)return!1;m(!0);const ct=await Ge.updateExtensionStatus(Ee,j,K);return m(!1),ct},ie=async()=>{await W("Ready","ready")&&(f("READY"),q(null),Z.emitLocal("agent_status","READY"))},he=async()=>{await W("Logout","not_ready")&&(f("NOT_READY"),q(null),Z.emitLocal("agent_status","NOT_READY"))},ue=async(j=null)=>{const K=(j==null?void 0:j.code)||"AUX",Ee=(j==null?void 0:j.label)||"AUX";await W("AUX",K)&&(f("AUX"),q({code:K,label:Ee}),Z.emitLocal("agent_status","AUX")),setShowAuxMenu(!1)},I=()=>{const j=i.trim();j&&Z.emitLocal("local_dial",{number:j})},P=j=>{x(K=>K+j),Z.emitLocal("local_dtmf",{key:j})},$=()=>Z.emitLocal("local_hangup"),H=()=>Z.emitLocal("local_answer"),we=()=>Z.emitLocal("local_reject"),pe=()=>{const j=!l;g(j),Z.emitLocal("local_toggle_mute",{muted:j})},ke=()=>{Z.emitLocal("local_toggle_hold",{isOnHold:u,setIsOnHold:y})};return a==="Ringing"?F.jsxs(Or,{error:p,children:[F.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[F.jsx(Bi,{color:"green",pulse:!0,children:F.jsx(Hn,{className:"w-9 h-9 text-green-600"})}),F.jsxs("div",{className:"text-center space-y-1",children:[F.jsx("p",{className:"text-lg font-bold text-gray-800 leading-tight",children:_||i||"Unknown"}),_&&F.jsx("p",{className:"text-sm font-mono text-gray-400 tracking-wider",children:i}),F.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-green-50 border border-green-100 mt-1",children:[F.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),F.jsx("span",{className:"text-[11px] font-semibold text-green-600 uppercase tracking-widest",children:"Incoming Call"})]})]})]}),F.jsxs(wa,{children:[F.jsx(Ii,{color:"red",size:"lg",onClick:we,title:"Reject",children:F.jsx(ns,{className:"w-6 h-6"})}),F.jsx(Ii,{color:"green",size:"lg",onClick:H,title:"Answer",pulse:!0,children:F.jsx(as,{className:"w-6 h-6 fill-white"})})]})]}):a==="Calling..."?F.jsxs(Or,{error:p,children:[F.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[F.jsx(Bi,{color:"primary",pulse:!0,children:F.jsx(s0,{className:"w-9 h-9 text-primary"})}),F.jsxs("div",{className:"text-center space-y-1",children:[F.jsx("p",{className:"text-lg font-bold text-gray-800 leading-tight",children:_||i}),_&&F.jsx("p",{className:"text-xs font-mono text-gray-400 tracking-wider",children:i}),F.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-primary/8 border border-primary/15 mt-1",children:[F.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary animate-pulse"}),F.jsx("span",{className:"text-[11px] font-semibold text-primary uppercase tracking-widest",children:"Dialing..."})]})]})]}),F.jsx(wa,{children:F.jsx(Ii,{color:"red",size:"lg",onClick:$,title:"Cancel",children:F.jsx(ns,{className:"w-6 h-6"})})})]}):a==="InCall"?F.jsxs(Or,{error:p,children:[w?F.jsxs("div",{className:"animate-fadeIn",children:[F.jsxs("div",{className:"px-6 pt-5 pb-2 text-center",children:[F.jsx("p",{className:"text-[10px] font-bold text-gray-400 uppercase tracking-[0.2em] mb-2",children:"DTMF"}),F.jsx("div",{className:"min-h-[44px] flex items-center justify-center",children:F.jsx("span",{className:"text-3xl font-light text-gray-700 tracking-[0.25em] font-mono",children:C||F.jsx("span",{className:"text-gray-200",children:"—"})})})]}),F.jsx(Pn,{onKeyPress:P})]}):F.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 gap-7 min-h-[300px] animate-fadeIn",children:[F.jsx(Bi,{color:u?"primary":"green",pulse:!u,children:u?F.jsx(In,{className:"w-9 h-9 text-primary"}):F.jsx(Hn,{className:"w-9 h-9 text-green-600"})}),F.jsxs("div",{className:"text-center space-y-1",children:[F.jsx("p",{className:"text-base font-bold text-gray-800 leading-tight",children:_||i||"Connected"}),_&&F.jsx("p",{className:"text-xs font-mono text-gray-400 tracking-wider",children:i}),F.jsxs("div",{className:"flex items-center justify-center gap-2 mt-1",children:[!u&&F.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),F.jsx("span",{className:`text-sm font-mono font-semibold ${u?"text-primary":"text-green-600"}`,children:u?"On Hold":d})]})]})]}),F.jsx("div",{className:"border-t border-gray-100 bg-gray-50/60 px-6 py-4",children:F.jsxs("div",{className:"flex items-center justify-between gap-2 max-w-[260px] mx-auto",children:[F.jsx(Hi,{onClick:pe,active:l,activeColor:"red",title:l?"Unmute":"Mute",children:l?F.jsx(t0,{className:"w-[18px] h-[18px]"}):F.jsx(r0,{className:"w-[18px] h-[18px]"})}),F.jsx(Hi,{onClick:ke,active:u,activeColor:"primary",title:u?"Resume":"Hold",children:u?F.jsx(i0,{className:"w-[18px] h-[18px]"}):F.jsx(In,{className:"w-[18px] h-[18px]"})}),F.jsx(Hi,{onClick:()=>b(j=>!j),active:w,activeColor:"primary",title:"Keypad",children:F.jsx(e0,{className:"w-[18px] h-[18px]"})}),F.jsx("button",{onClick:$,title:"End Call",className:"w-12 h-12 rounded-full bg-red-500 hover:bg-red-600 text-white flex items-center justify-center shadow-[0_4px_14px_rgba(239,68,68,0.4)] hover:shadow-[0_6px_18px_rgba(239,68,68,0.5)] transition-all active:scale-95",children:F.jsx(ns,{className:"w-5 h-5"})})]})})]}):S==="REGISTERED"?F.jsxs(Or,{error:p,children:[F.jsxs("div",{className:"px-5 pt-5 pb-1",children:[F.jsxs("div",{className:"relative flex items-center justify-center min-h-[56px] bg-gray-50 rounded-2xl border border-gray-100 px-10",children:[F.jsx("input",{type:"text",value:i,onChange:j=>n(j.target.value.replace(/[^0-9+*#]/g,"")),onKeyDown:j=>j.key==="Enter"&&I(),className:"w-full text-center text-[28px] font-light text-gray-800 tracking-[0.12em] bg-transparent outline-none placeholder:text-gray-300 placeholder:text-2xl placeholder:font-normal",placeholder:"Enter number"}),i&&F.jsx("button",{onClick:()=>n(j=>j.slice(0,-1)),onMouseDown:j=>j.preventDefault(),className:"absolute right-3 p-1.5 rounded-full text-gray-300 hover:text-gray-500 hover:bg-gray-200 transition-all",children:F.jsx(Qo,{className:"w-4 h-4"})})]}),_&&F.jsx("p",{className:"text-center text-xs text-primary/70 font-medium mt-1.5 tracking-wide",children:_})]}),F.jsx(Pn,{onKeyPress:j=>n(K=>K+j)}),F.jsx("div",{className:"px-5 pb-4 pt-1 flex justify-center",children:F.jsxs("button",{onClick:I,disabled:!i.trim(),className:`
144
144
  flex items-center gap-3 px-10 py-3.5 rounded-full
145
145
  bg-gradient-to-r from-green-500 to-green-600
146
146
  hover:from-green-600 hover:to-green-700
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "voxnix",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"