1(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([[9805],{ 2 3/***/ 7167: 4/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 5 6"use strict"; 7/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294); 8 9/** 10 * @ignore - internal component. 11 */ 12const FormControlContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(undefined); 13if (false) {} 14/* harmony default export */ __webpack_exports__["Z"] = (FormControlContext); 15 16/***/ }), 17 18/***/ 5704: 19/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 20 21"use strict"; 22/* harmony export */ __webpack_require__.d(__webpack_exports__, { 23/* harmony export */ "Z": function() { return /* binding */ formControlState; } 24/* harmony export */ }); 25function formControlState({ 26 props, 27 states, 28 muiFormControl 29}) { 30 return states.reduce((acc, state) => { 31 acc[state] = props[state]; 32 if (muiFormControl) { 33 if (typeof props[state] === 'undefined') { 34 acc[state] = muiFormControl[state]; 35 } 36 } 37 return acc; 38 }, {}); 39} 40 41/***/ }), 42 43/***/ 4423: 44/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 45 46"use strict"; 47/* harmony export */ __webpack_require__.d(__webpack_exports__, { 48/* harmony export */ "Z": function() { return /* binding */ useFormControl; }
49/* harmony export */ }); 50/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294); 51/* harmony import */ var _FormControlContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7167); 52'use client'; 53 54 55 56function useFormControl() { 57 return react__WEBPACK_IMPORTED_MODULE_0__.useContext(_FormControlContext__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z); 58} 59 60/***/ }), 61 62/***/ 480: 63/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 64 65"use strict"; 66 67// EXPORTS 68__webpack_require__.d(__webpack_exports__, { 69 "Z": function() { return /* binding */ FormControlLabel_FormControlLabel; } 70}); 71 72// UNUSED EXPORTS: FormControlLabelRoot 73 74// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js 75var objectWithoutPropertiesLoose = __webpack_require__(3366); 76// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js 77var esm_extends = __webpack_require__(7462); 78// EXTERNAL MODULE: ./node_modules/react/index.js 79var react = __webpack_require__(7294); 80// EXTERNAL MODULE: ./node_modules/clsx/dist/clsx.mjs 81var clsx = __webpack_require__(512); 82// EXTERNAL MODULE: ./node_modules/@mui/material/node_modules/@mui/utils/esm/composeClasses/composeClasses.js 83var composeClasses = __webpack_require__(5463); 84// EXTERNAL MODULE: ./node_modules/@mui/material/FormControl/useFormControl.js 85var useFormControl = __webpack_require__(4423); 86// EXTERNAL MODULE: ./node_modules/@mui/material/Stack/Stack.js + 6 modules 87var Stack = __webpack_require__(6170); 88// EXTERNAL MODULE: ./node_modules/@mui/material/Typography/Typography.js + 1 modules 89var Typography = __webpack_require__(5861); 90// EXTERNAL MODULE: ./node_modules/@mui/material/utils/capitalize.js + 1 modules 91var capitalize = __webpack_require__(4277); 92// EXTERNAL MODULE: ./node_modules/@mui/material/styles/styled.js 93var styled = __webpack_require__(948); 94// EXTERNAL MODULE: ./node_modules/@mui/material/DefaultPropsProvider/DefaultPropsProvider.js 95var DefaultPropsProvider = __webpack_require__(8628); 96// EXTERNAL MODULE: ./node_modules/@mui/material/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js 97var generateUtilityClasses = __webpack_require__(5154); 98// EXTERNAL MODULE: ./node_modules/@mui/material/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js 99var generateUtilityClass = __webpack_require__(2104); 100;// CONCATENATED MODULE: ./node_modules/@mui/material/FormControlLabel/formControlLabelClasses.js 101 102 103function getFormControlLabelUtilityClasses(slot) { 104 return (0,generateUtilityClass/* default */.ZP)('MuiFormControlLabel', slot); 105} 106const formControlLabelClasses = (0,generateUtilityClasses/* default */.Z)('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error', 'required', 'asterisk']); 107/* harmony default export */ var FormControlLabel_formControlLabelClasses = (formControlLabelClasses); 108// EXTERNAL MODULE: ./node_modules/@mui/material/FormControl/formControlState.js 109var formControlState = __webpack_require__(5704); 110// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js 111var jsx_runtime = __webpack_require__(5893); 112;// CONCATENATED MODULE: ./node_modules/@mui/material/FormControlLabel/FormControlLabel.js 113'use client'; 114 115 116 117const _excluded = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "required", "slotProps", "value"]; 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133const useUtilityClasses = ownerState => { 134 const { 135 classes, 136 disabled, 137 labelPlacement, 138 error, 139 required 140 } = ownerState; 141 const slots = { 142 root: ['root', disabled && 'disabled', `labelPlacement${(0,capitalize/* default */.Z)(labelPlacement)}`, error && 'error', required && 'required'], 143 label: ['label', disabled && 'disabled'], 144 asterisk: ['asterisk', error && 'error'] 145 }; 146 return (0,composeClasses/* default */.Z)(slots, getFormControlLabelUtilityClasses, classes); 147}; 148const FormControlLabelRoot = (0,styled/* default */.ZP)('label', {
149 name: 'MuiFormControlLabel', 150 slot: 'Root', 151 overridesResolver: (props, styles) => { 152 const { 153 ownerState 154 } = props; 155 return [{ 156 [`& .${FormControlLabel_formControlLabelClasses.label}`]: styles.label 157 }, styles.root, styles[`labelPlacement${(0,capitalize/* default */.Z)(ownerState.labelPlacement)}`]]; 158 } 159})(({ 160 theme, 161 ownerState 162}) => (0,esm_extends/* default */.Z)({ 163 display: 'inline-flex', 164 alignItems: 'center', 165 cursor: 'pointer', 166 // For correct alignment with the text. 167 verticalAlign: 'middle', 168 WebkitTapHighlightColor: 'transparent', 169 marginLeft: -11, 170 marginRight: 16, 171 // used for row presentation of radio/checkbox 172 [`&.${FormControlLabel_formControlLabelClasses.disabled}`]: { 173 cursor: 'default' 174 } 175}, ownerState.labelPlacement === 'start' && { 176 flexDirection: 'row-reverse', 177 marginLeft: 16, 178 // used for row presentation of radio/checkbox 179 marginRight: -11 180}, ownerState.labelPlacement === 'top' && { 181 flexDirection: 'column-reverse', 182 marginLeft: 16 183}, ownerState.labelPlacement === 'bottom' && { 184 flexDirection: 'column', 185 marginLeft: 16 186}, { 187 [`& .${FormControlLabel_formControlLabelClasses.label}`]: { 188 [`&.${FormControlLabel_formControlLabelClasses.disabled}`]: { 189 color: (theme.vars || theme).palette.text.disabled 190 } 191 } 192})); 193const AsteriskComponent = (0,styled/* default */.ZP)('span', { 194 name: 'MuiFormControlLabel', 195 slot: 'Asterisk', 196 overridesResolver: (props, styles) => styles.asterisk 197})(({ 198 theme 199}) => ({ 200 [`&.${FormControlLabel_formControlLabelClasses.error}`]: { 201 color: (theme.vars || theme).palette.error.main 202 } 203})); 204 205/** 206 * Drop-in replacement of the `Radio`, `Switch` and `Checkbox` component. 207 * Use this component if you want to display an extra label. 208 */ 209const FormControlLabel = /*#__PURE__*/react.forwardRef(function FormControlLabel(inProps, ref) { 210 var _ref, _slotProps$typography; 211 const props = (0,DefaultPropsProvider/* useDefaultProps */.i)({ 212 props: inProps, 213 name: 'MuiFormControlLabel' 214 }); 215 const { 216 className, 217 componentsProps = {}, 218 control, 219 disabled: disabledProp, 220 disableTypography, 221 label: labelProp, 222 labelPlacement = 'end', 223 required: requiredProp, 224 slotProps = {} 225 } = props, 226 other = (0,objectWithoutPropertiesLoose/* default */.Z)(props, _excluded); 227 const muiFormControl = (0,useFormControl/* default */.Z)(); 228 const disabled = (_ref = disabledProp != null ? disabledProp : control.props.disabled) != null ? _ref : muiFormControl == null ? void 0 : muiFormControl.disabled; 229 const required = requiredProp != null ? requiredProp : control.props.required; 230 const controlProps = { 231 disabled, 232 required 233 }; 234 ['checked', 'name', 'onChange', 'value', 'inputRef'].forEach(key => { 235 if (typeof control.props[key] === 'undefined' && typeof props[key] !== 'undefined') { 236 controlProps[key] = props[key]; 237 } 238 }); 239 const fcs = (0,formControlState/* default */.Z)({ 240 props, 241 muiFormControl, 242 states: ['error'] 243 }); 244 const ownerState = (0,esm_extends/* default */.Z)({}, props, { 245 disabled, 246 labelPlacement, 247 required, 248 error: fcs.error 249 }); 250 const classes = useUtilityClasses(ownerState); 251 const typographySlotProps = (_slotProps$typography = slotProps.typography) != null ? _slotProps$typography : componentsProps.typography; 252 let label = labelProp; 253 if (label != null && label.type !== Typography/* default */.Z && !disableTypography) { 254 label = /*#__PURE__*/(0,jsx_runtime.jsx)(Typography/* default */.Z, (0,esm_extends/* default */.Z)({ 255 component: "span" 256 }, typographySlotProps, { 257 className: (0,clsx/* default */.Z)(classes.label, typographySlotProps == null ? void 0 : typographySlotProps.className), 258 children: label 259 })); 260 } 261 return /*#__PURE__*/(0,jsx_runtime.jsxs)(FormControlLabelRoot, (0,esm_extends/* default */.Z)({ 262 className: (0,clsx/* default */.Z)(classes.root, className), 263 ownerState: ownerState, 264 ref: ref 265 }, other, { 266 children: [/*#__PURE__*/react.cloneElement(control, controlProps), required ? /*#__PURE__*/(0,jsx_runtime.jsxs)(Stack/* default */.Z, { 267 display: "block", 268 children: [label, /*#__PURE__*/(0,jsx_runtime.jsxs)(AsteriskComponent, { 269 ownerState: ownerState, 270 "aria-hidden": true, 271 className: classes.asterisk, 272 children: ["\u2009", '*'] 273 })] 274 }) : label] 275 })); 276}); 277 false ? 0 : void 0;
278/* harmony default export */ var FormControlLabel_FormControlLabel = (FormControlLabel); 279 280/***/ }), 281 282/***/ 1964: 283/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 284 285"use strict"; 286 287// EXPORTS 288__webpack_require__.d(__webpack_exports__, { 289 "Z": function() { return /* binding */ internal_SwitchBase; } 290}); 291 292// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js 293var objectWithoutPropertiesLoose = __webpack_require__(3366); 294// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js 295var esm_extends = __webpack_require__(7462); 296// EXTERNAL MODULE: ./node_modules/react/index.js 297var react = __webpack_require__(7294); 298// EXTERNAL MODULE: ./node_modules/clsx/dist/clsx.mjs 299var clsx = __webpack_require__(512); 300// EXTERNAL MODULE: ./node_modules/@mui/material/node_modules/@mui/utils/esm/composeClasses/composeClasses.js 301var composeClasses = __webpack_require__(5463); 302// EXTERNAL MODULE: ./node_modules/@mui/material/utils/capitalize.js + 1 modules 303var capitalize = __webpack_require__(4277); 304// EXTERNAL MODULE: ./node_modules/@mui/material/styles/styled.js 305var styled = __webpack_require__(948); 306// EXTERNAL MODULE: ./node_modules/@mui/material/styles/rootShouldForwardProp.js 307var rootShouldForwardProp = __webpack_require__(4136); 308// EXTERNAL MODULE: ./node_modules/@mui/material/utils/useControlled.js 309var useControlled = __webpack_require__(9299); 310// EXTERNAL MODULE: ./node_modules/@mui/material/FormControl/useFormControl.js 311var useFormControl = __webpack_require__(4423); 312// EXTERNAL MODULE: ./node_modules/@mui/material/ButtonBase/ButtonBase.js + 7 modules 313var ButtonBase = __webpack_require__(7739); 314// EXTERNAL MODULE: ./node_modules/@mui/material/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js 315var generateUtilityClasses = __webpack_require__(5154); 316// EXTERNAL MODULE: ./node_modules/@mui/material/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js 317var generateUtilityClass = __webpack_require__(2104); 318;// CONCATENATED MODULE: ./node_modules/@mui/material/internal/switchBaseClasses.js 319 320 321function getSwitchBaseUtilityClass(slot) { 322 return (0,generateUtilityClass/* default */.ZP)('PrivateSwitchBase', slot); 323} 324const switchBaseClasses = (0,generateUtilityClasses/* default */.Z)('PrivateSwitchBase', ['root', 'checked', 'disabled', 'input', 'edgeStart', 'edgeEnd']); 325/* harmony default export */ var internal_switchBaseClasses = ((/* unused pure expression or super */ null && (switchBaseClasses))); 326// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js 327var jsx_runtime = __webpack_require__(5893); 328;// CONCATENATED MODULE: ./node_modules/@mui/material/internal/SwitchBase.js 329'use client'; 330 331 332 333const _excluded = ["autoFocus", "checked", "checkedIcon", "className", "defaultChecked", "disabled", "disableFocusRipple", "edge", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"]; 334 335 336 337 338 339 340 341 342 343 344 345 346 347const useUtilityClasses = ownerState => { 348 const { 349 classes, 350 checked, 351 disabled, 352 edge 353 } = ownerState; 354 const slots = { 355 root: ['root', checked && 'checked', disabled && 'disabled', edge && `edge${(0,capitalize/* default */.Z)(edge)}`], 356 input: ['input'] 357 }; 358 return (0,composeClasses/* default */.Z)(slots, getSwitchBaseUtilityClass, classes); 359}; 360const SwitchBaseRoot = (0,styled/* default */.ZP)(ButtonBase/* default */.Z)(({ 361 ownerState 362}) => (0,esm_extends/* default */.Z)({ 363 padding: 9, 364 borderRadius: '50%' 365}, ownerState.edge === 'start' && { 366 marginLeft: ownerState.size === 'small' ? -3 : -12 367}, ownerState.edge === 'end' && { 368 marginRight: ownerState.size === 'small' ? -3 : -12 369})); 370const SwitchBaseInput = (0,styled/* default */.ZP)('input', { 371 shouldForwardProp: rootShouldForwardProp/* default */.Z 372})({ 373 cursor: 'inherit', 374 position: 'absolute', 375 opacity: 0, 376 width: '100%', 377 height: '100%', 378 top: 0, 379 left: 0, 380 margin: 0, 381 padding: 0, 382 zIndex: 1 383}); 384 385/** 386 * @ignore - internal component. 387 */ 388const SwitchBase = /*#__PURE__*/react.forwardRef(function SwitchBase(props, ref) { 389 const { 390 autoFocus, 391 checked: checkedProp, 392 checkedIcon, 393 className, 394 defaultChecked, 395 disabled: disabledProp, 396 disableFocusRipple = false, 397 edge = false, 398 icon, 399 id, 400 inputProps, 401 inputRef, 402 name, 403 onBlur, 404 onChange, 405 onFocus, 406 readOnly, 407 required = false, 408 tabIndex, 409 type, 410 value 411 } = props, 412 other = (0,objectWithoutPropertiesLoose/* default */.Z)(props, _excluded); 413 const [checked, setCheckedState] = (0,useControlled/* default */.Z)({ 414 controlled: checkedProp, 415 default: Boolean(defaultChecked), 416 name: 'SwitchBase', 417 state: 'checked' 418 }); 419 const muiFormControl = (0,useFormControl/* default */.Z)(); 420 const handleFocus = event => { 421 if (onFocus) { 422 onFocus(event); 423 } 424 if (muiFormControl && muiFormControl.onFocus) { 425 muiFormControl.onFocus(event); 426 } 427 }; 428 const handleBlur = event => { 429 if (onBlur) { 430 onBlur(event); 431 } 432 if (muiFormControl && muiFormControl.onBlur) { 433 muiFormControl.onBlur(event); 434 } 435 }; 436 const handleInputChange = event => { 437 // Workaround for https://github.com/facebook/react/issues/9023 438 if (event.nativeEvent.defaultPrevented) { 439 return; 440 } 441 const newChecked = event.target.checked; 442 setCheckedState(newChecked); 443 if (onChange) { 444 // TODO v6: remove the second argument. 445 onChange(event, newChecked); 446 } 447 }; 448 let disabled = disabledProp; 449 if (muiFormControl) { 450 if (typeof disabled === 'undefined') { 451 disabled = muiFormControl.disabled; 452 } 453 } 454 const hasLabelFor = type === 'checkbox' || type === 'radio'; 455 const ownerState = (0,esm_extends/* default */.Z)({}, props, { 456 checked, 457 disabled, 458 disableFocusRipple, 459 edge 460 }); 461 const classes = useUtilityClasses(ownerState); 462 return /*#__PURE__*/(0,jsx_runtime.jsxs)(SwitchBaseRoot, (0,esm_extends/* default */.Z)({ 463 component: "span", 464 className: (0,clsx/* default */.Z)(classes.root, className), 465 centerRipple: true, 466 focusRipple: !disableFocusRipple, 467 disabled: disabled, 468 tabIndex: null, 469 role: undefined, 470 onFocus: handleFocus, 471 onBlur: handleBlur, 472 ownerState: ownerState, 473 ref: ref 474 }, other, { 475 children: [/*#__PURE__*/(0,jsx_runtime.jsx)(SwitchBaseInput, (0,esm_extends/* default */.Z)({
476 autoFocus: autoFocus, 477 checked: checkedProp, 478 defaultChecked: defaultChecked, 479 className: classes.input, 480 disabled: disabled, 481 id: hasLabelFor ? id : undefined, 482 name: name, 483 onChange: handleInputChange, 484 readOnly: readOnly, 485 ref: inputRef, 486 required: required, 487 ownerState: ownerState, 488 tabIndex: tabIndex, 489 type: type 490 }, type === 'checkbox' && value === undefined ? {} : { 491 value 492 }, inputProps)), checked ? checkedIcon : icon] 493 })); 494}); 495 496// NB: If changed, please update Checkbox, Switch and Radio 497// so that the API documentation is updated. 498 false ? 0 : void 0; 499/* harmony default export */ var internal_SwitchBase = (SwitchBase); 500 501/***/ }), 502 503/***/ 9552: 504/***/ (function(module) { 505 506var exports = module.exports = function (doc) { 507 if (!doc) doc = {}; 508 if (typeof doc === 'string') doc = { cookie: doc }; 509 if (doc.cookie === undefined) doc.cookie = ''; 510 511 var self = {}; 512 self.get = function (key) { 513 var splat = doc.cookie.split(/;\s*/); 514 for (var i = 0; i < splat.length; i++) { 515 var ps = splat[i].split('='); 516 var k = unescape(ps[0]); 517 if (k === key) return unescape(ps[1]); 518 } 519 return undefined; 520 }; 521 522 self.set = function (key, value, opts) { 523 if (!opts) opts = {}; 524 var s = escape(key) + '=' + escape(value); 525 if (opts.expires) s += '; expires=' + opts.expires; 526 if (opts.path) s += '; path=' + escape(opts.path); 527 if (opts.domain) s += '; domain=' + escape(opts.domain); 528 if (opts.secure) s += '; secure'; 529 doc.cookie = s; 530 return s; 531 }; 532 return self; 533}; 534 535if (typeof document !== 'undefined') { 536 var cookie = exports(document); 537 exports.get = cookie.get; 538 exports.set = cookie.set; 539} 540 541 542/***/ }), 543 544/***/ 7447: 545/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 546 547 548 (window.__NEXT_P = window.__NEXT_P || []).push([ 549 "/Main/AdditionalService", 550 function () { 551 return __webpack_require__(5519); 552 } 553 ]); 554 if(false) {} 555 556 557/***/ }), 558 559/***/ 7899: 560/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 561 562"use strict"; 563/* harmony export */ __webpack_require__.d(__webpack_exports__, { 564/* harmony export */ "y": function() { return /* binding */ useAdditionalServices; } 565/* harmony export */ }); 566/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294); 567/* harmony import */ var _useUserInfo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7254); 568 569 570const useAdditionalServices = (responseJson)=>{ 571 const { contextUserData , position } = (0,_useUserInfo__WEBPACK_IMPORTED_MODULE_1__/* .useUserInfo */ .P)(responseJson); 572 const [isLoading, setIsLoading] = react__WEBPACK_IMPORTED_MODULE_0__.useState(); 573 const [error, setError] = react__WEBPACK_IMPORTED_MODULE_0__.useState(); 574 const [thereIsChange, setThereIsChange] = react__WEBPACK_IMPORTED_MODULE_0__.useState(true); 575 const [activeAdditionalServices, setActiveAdditionalServices] = react__WEBPACK_IMPORTED_MODULE_0__.useState(); 576 const resetTransactions = ()=>{ 577 setError(undefined); 578 setIsLoading(undefined); 579 }; 580 const hideMyNumber = (service)=>{ 581 setIsLoading(true); 582 fetch("/api/toggleAditionalServices", { 583 method: "POST", 584 body: JSON.stringify({ 585 consumer_entity_id: contextUserData[position].userData.consumer_entity_id, 586 action: (activeAdditionalServices === null || activeAdditionalServices === void 0 ? void 0 : activeAdditionalServices.getServiceStatus.filter((row)=>row.service_code === service && row.status === "1").length) === 1 ? "D" : "A", 587 service 588 }) 589 }).then((res)=>res.json()).then((r)=>setError(r.error)).finally(()=>{ 590 setIsLoading(false); 591 setThereIsChange(true); 592 }); 593 }; 594 react__WEBPACK_IMPORTED_MODULE_0__.useEffect(()=>{ 595 if (contextUserData.length === 0 || position === undefined || thereIsChange === false) { 596 return; 597 } 598 fetch("/api/getAditionalServices", { 599 method: "POST", 600 body: JSON.stringify({ 601 consumer_entity_id: contextUserData[position].userData.consumer_entity_id 602 }) 603 }).then((res)=>res.json()).then((resJson)=>setActiveAdditionalServices(resJson)).finally(()=>setThereIsChange(false)); 604 }, [ 605 contextUserData, 606 position, 607 thereIsChange 608 ]); 609 return { 610 activeAdditionalServices, 611 hideMyNumber, 612 isLoading, 613 error, 614 resetTransactions 615 }; 616}; 617 618 619/***/ }), 620 621/***/ 7254: 622/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 623 624"use strict"; 625/* harmony export */ __webpack_require__.d(__webpack_exports__, { 626/* harmony export */ "P": function() { return /* binding */ useUserInfo; } 627/* harmony export */ }); 628/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294); 629/* harmony import */ var _context_HomeContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7056); 630 631 632const useUserInfo = (response)=>{ 633 const { saveServiceAndPos , contextUserData , position } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_context_HomeContext__WEBPACK_IMPORTED_MODULE_1__/* .HomeContext */ .Q); 634 const contextAArray = []; 635 react__WEBPACK_IMPORTED_MODULE_0__.useEffect(()=>{ 636 response === null || response === void 0 ? void 0 : response.customer_info.map((element, position)=>{ 637 const x = { 638 userData: element, 639 pos: position 640 }; 641 contextAArray.push(x); 642 }); 643 saveServiceAndPos(contextAArray); 644 // eslint-disable-next-line react-hooks/exhaustive-deps 645 }, [ 646 response 647 ]); 648 return { 649 contextUserData, 650 position 651 }; 652}; 653 654 655/***/ }), 656 657/***/ 450: 658/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 659 660"use strict"; 661/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5893); 662/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7294); 663/* harmony import */ var _BackButton_stylesBackButton_module_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6983); 664/* harmony import */ var _BackButton_stylesBackButton_module_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_BackButton_stylesBackButton_module_css__WEBPACK_IMPORTED_MODULE_4__); 665/* harmony import */ var _mui_icons_material_ArrowBackIosNew__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8298); 666/* harmony import */ var _context_HomeContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7056); 667/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1163); 668/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_3__); 669 670 671 672 673 674 675function BackButton(props) { 676 const router = (0,next_router__WEBPACK_IMPORTED_MODULE_3__.useRouter)(); 677 const { saveStep , step , popPath , popAll , breadcrumbPath } = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_context_HomeContext__WEBPACK_IMPORTED_MODULE_2__/* .HomeContext */ .Q); 678 return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { 679 className: (_BackButton_stylesBackButton_module_css__WEBPACK_IMPORTED_MODULE_4___default().contBack), 680 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("a", { 681 onClick: ()=>{ 682 if (props.isOnSteper && step !== 0) { 683 saveStep("-"); 684 return; 685 } 686 if (breadcrumbPath.length === 1) { 687 router.push("/Main/Home"); 688 popAll(); 689 return; 690 } 691 if (router.isReady) { 692 router.back(); 693 popPath(); 694 } 695 }, 696 children: [ 697 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_icons_material_ArrowBackIosNew__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {}), 698 "Atr\xe1s" 699 ] 700 }) 701 }); 702} 703/* harmony default export */ __webpack_exports__["Z"] = (BackButton); 704 705 706/***/ }), 707 708/***/ 1665: 709/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 710 711"use strict"; 712/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5893); 713/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7294); 714/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3408); 715/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8456); 716/* harmony import */ var _stylesGlobalButton_module_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5427); 717/* harmony import */ var _stylesGlobalButton_module_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_stylesGlobalButton_module_css__WEBPACK_IMPORTED_MODULE_4__); 718 719 720 721 722 723const GlobalButton = (param)=>{ 724 let { textButton , iconText , onClick , loading , ...props } = param; 725 const handleClick = (e)=>{ 726 onClick === null || onClick === void 0 ? void 0 : onClick(e); 727 }; 728 if (loading) { 729 return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(GlobalButton, { 730 ...props, 731 shouldBeActive: true, 732 iconText: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_material__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, { 733 size: 35, 734 sx: { 735 color: "white", 736 marginBottom: "10px", 737 marginTop: "10px" 738 }, 739 style: { 740 width: 25, 741 height: 25 742 } 743 }) 744 }); 745 } 746 return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mui_material_Button__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { 747 onClick: handleClick, 748 disabled: props === null || props === void 0 ? void 0 : props.shouldBeActive, 749 sx: { 750 backgroundColor: (props === null || props === void 0 ? void 0 : props.shouldBeActive) ? "#BAE46B !important" : "#93D500", 751 color: "white !important", 752 marginTop: (props === null || props === void 0 ? void 0 : props.marginTop) ? "20px !important" : "", 753 marginBottom: (props === null || props === void 0 ? void 0 : props.marginBottom) ? "20px !important" : null 754 }, 755 className: (_stylesGlobalButton_module_css__WEBPACK_IMPORTED_MODULE_4___default().btnAcept), 756 children: [ 757 iconText, 758 textButton 759 ] 760 }); 761}; 762/* harmony default export */ __webpack_exports__["Z"] = (GlobalButton); 763 764 765/***/ }), 766 767/***/ 1251: 768/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 769 770"use strict"; 771/* harmony export */ __webpack_require__.d(__webpack_exports__, { 772/* harmony export */ "GZ": function() { return /* binding */ stringAvatar; } 773/* harmony export */ }); 774/* unused harmony export stringToColor */ 775/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5893); 776/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7294); 777/* harmony import */ var react_icons_md__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80); 778/* harmony import */ var _Header_module_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3335); 779/* harmony import */ var _Header_module_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_Header_module_css__WEBPACK_IMPORTED_MODULE_5__); 780/* harmony import */ var _utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5109); 781/* harmony import */ var _mui_material_Avatar__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9661); 782/* harmony import */ var _mui_material_Stack__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6170); 783/* harmony import */ var _context_HomeContext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7056); 784/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1163); 785/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_4__); 786 787 788 789 790 791 792 793 794 795function stringToColor(string) { 796 let hash = 0; 797 let i; 798 /* eslint-disable no-bitwise */ for(i = 0; i < string.length; i += 1){ 799 hash = string.charCodeAt(i) + ((hash << 5) - hash); 800 }
801 let color = "#"; 802 for(i = 0; i < 3; i += 1){ 803 const value = hash >> i * 8 & 0xff; 804 color += "00".concat(value.toString(16)).slice(-2); 805 } 806 /* eslint-enable no-bitwise */ return color; 807} 808function stringAvatar(name) { 809 return { 810 sx: { 811 bgcolor: stringToColor(name) 812 }, 813 children: "".concat(name === null || name === void 0 ? void 0 : name.split(" ")[0][0]).concat(name.split(" ")[1] ? name === null || name === void 0 ? void 0 : name.split(" ")[1][0] : "") 814 }; 815} 816function Header(props) { 817 const { popAll } = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_context_HomeContext__WEBPACK_IMPORTED_MODULE_3__/* .HomeContext */ .Q); 818 const router = (0,next_router__WEBPACK_IMPORTED_MODULE_4__.useRouter)(); 819 const goToService = ()=>{ 820 router.replace({ 821 pathname: "/Main/ServiceDetailed", 822 query: { 823 selected: props.selected 824 } 825 }); 826 popAll(); 827 }; 828 return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { 829 className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().container), 830 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 831 className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contHeader), 832 children: [ 833 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 834 className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contTopHeader), 835 children: [ 836 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 837 className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contInfoTitle), 838 onClick: goToService, 839 children: [ 840 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { 841 className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contIcon), 842 children: props.planCode === "HIBESPXS" || props.planCode === "INTERPRE" ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_icons_md__WEBPACK_IMPORTED_MODULE_6__/* .MdRouter */ .wt4, { 843 style: { 844 marginRight: 4, 845 marginTop: 2 846 } 847 }) : props.planCode === "PREPAG_4G" ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_icons_md__WEBPACK_IMPORTED_MODULE_6__/* .MdPhoneAndroid */ .uuN, { 848 style: { 849 marginTop: 5 850 } 851 }) : props.planCode === "VMCP" ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_icons_md__WEBPACK_IMPORTED_MODULE_6__/* .MdPhone */ .IXo, { 852 style: { 853 marginRight: 4, 854 marginTop: 2 855 } 856 }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_icons_md__WEBPACK_IMPORTED_MODULE_6__/* .MdPhoneAndroid */ .uuN, {}) 857 }), 858 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 859 children: [ 860 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { 861 className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contTitle), 862 children: props.planDescription ? (0,_utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__/* .formatToLowerCaseText */ .gr)(props.planDescription).map((Element)=>"".concat(Element, " ")) : null 863 }), 864 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { 865 className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contNumber), 866 children: (0,_utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__/* .formatNumber */ .uf)(props.number) 867 }) 868 ] 869 }) 870 ] 871 }), 872 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 873 className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contHeaderImg), 874 children: [ 875 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { 876 className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contName), 877 children: props.name ? (0,_utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__/* .formatToLowerCaseText */ .gr)(props.name).map((Element)=>"".concat(Element, " ")) : null 878 }), 879 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_material_Stack__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, { 880 direction: "row", 881 spacing: 2, 882 sx: { 883 marginLeft: 2 884 }, 885 children: props.name ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_material_Avatar__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, { 886 style: { 887 background: "#9164CC" 888 }, 889 ...stringAvatar("".concat(props.name)) 890 }) : null 891 }) 892 ] 893 }) 894 ] 895 }), 896 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { 897 className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contBottonHeader), 898 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", { 899 children: [ 900 "".concat(props.planType !== "CCOPRE" ? "Balance a la fecha" : "Balance", ":"), 901 " ", 902 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { 903 children: props.planType !== "CCOPRE" ? (0,_utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__/* .formatBalance */ .az)(props.debtAmount) : (0,_utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__/* .formatBalance */ .az)(props.balance, true) 904 }), 905 " \xa0 | \xa0 ", 906 props.planType !== "CCOPRE" ? "Fecha de corte: ".concat(props.fechaCorte) : "Vence: ".concat(props.fechaExpiracion), 907 " \xa0 | \xa0 Estado: ", 908 props.estado ? (0,_utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__/* .formatToLowerCaseText */ .gr)(props.estado) : null 909 ] 910 }) 911 }) 912 ] 913 }) 914 }); 915} 916/* harmony default export */ __webpack_exports__["ZP"] = (Header); 917 918 919/***/ }), 920 921/***/ 9601: 922/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 923 924"use strict"; 925/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5893); 926/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7294); 927/* harmony import */ var _NavBar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4122); 928/* harmony import */ var _NavResponsive_NavResponsive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9651); 929/* harmony import */ var _Header__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1251); 930/* harmony import */ var _styleMainServiceDetailed_module_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(124); 931/* harmony import */ var _styleMainServiceDetailed_module_css__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_styleMainServiceDetailed_module_css__WEBPACK_IMPORTED_MODULE_7__); 932/* harmony import */ var _BreadcrumbsComponent_BreadcrumbsComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9151); 933/* harmony import */ var _Main_global_BreadcrumbsComponent_styleBreadCrumbs_module_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4094); 934/* harmony import */ var _Main_global_BreadcrumbsComponent_styleBreadCrumbs_module_css__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_Main_global_BreadcrumbsComponent_styleBreadCrumbs_module_css__WEBPACK_IMPORTED_MODULE_8__); 935/* harmony import */ var _Hooks_useBalanceInfo__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1449); 936//@ts-nocheck 937 938 939 940 941 942 943 944 945 946const BasicHeaderPageComponent = (param)=>{ 947 let { children } = param; 948 var _userInfoS_customer_info_selected, _userInfoS_customer_info_selected1, _userInfoS_customer_info_selected2, _userInfoS_customer_info_selected3, _balanceInfo_balance, _balanceInfo_balance1, _userInfoS_customer_info_selected4, _userInfoS_customer_info_selected5, _userInfoS_customer_info_selected6, _userInfoS_customer_info_selected7; 949 const { balanceInfo , userInfoS , selected } = (0,_Hooks_useBalanceInfo__WEBPACK_IMPORTED_MODULE_6__/* .useBalanceInfo */ .R)(); 950 return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 951 children: [ 952 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_NavResponsive_NavResponsive__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {}), 953 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 954 className: (_styleMainServiceDetailed_module_css__WEBPACK_IMPORTED_MODULE_7___default().styContHomeyNav), 955 children: [ 956 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_NavBar__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {}), 957 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 958 className: (_styleMainServiceDetailed_module_css__WEBPACK_IMPORTED_MODULE_7___default().contServiceDitailed), 959 children: [ 960 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, { 961 selected: selected, 962 planDescription: (_userInfoS_customer_info_selected = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected === void 0 ? void 0 : _userInfoS_customer_info_selected.plan_descripcion,
963 planCode: (_userInfoS_customer_info_selected1 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected1 === void 0 ? void 0 : _userInfoS_customer_info_selected1.plan_code, 964 name: (_userInfoS_customer_info_selected2 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected2 === void 0 ? void 0 : _userInfoS_customer_info_selected2.full_name, 965 number: (_userInfoS_customer_info_selected3 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected3 === void 0 ? void 0 : _userInfoS_customer_info_selected3.msisdn, 966 fechaExpiracion: balanceInfo === null || balanceInfo === void 0 ? void 0 : (_balanceInfo_balance = balanceInfo.balance) === null || _balanceInfo_balance === void 0 ? void 0 : _balanceInfo_balance.supervisionExpiryDate, 967 balance: balanceInfo === null || balanceInfo === void 0 ? void 0 : (_balanceInfo_balance1 = balanceInfo.balance) === null || _balanceInfo_balance1 === void 0 ? void 0 : _balanceInfo_balance1.mainAccountValue, 968 estado: (_userInfoS_customer_info_selected4 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected4 === void 0 ? void 0 : _userInfoS_customer_info_selected4.status_descripcion, 969 planType: (_userInfoS_customer_info_selected5 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected5 === void 0 ? void 0 : _userInfoS_customer_info_selected5.plan_type, 970 debtAmount: ((_userInfoS_customer_info_selected6 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected6 === void 0 ? void 0 : _userInfoS_customer_info_selected6.debt_amount) || "", 971 fechaCorte: (_userInfoS_customer_info_selected7 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected7 === void 0 ? void 0 : _userInfoS_customer_info_selected7.bill_date 972 }), 973 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 974 className: (_styleMainServiceDetailed_module_css__WEBPACK_IMPORTED_MODULE_7___default().continfoGlobal), 975 children: [ 976 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { 977 className: (_Main_global_BreadcrumbsComponent_styleBreadCrumbs_module_css__WEBPACK_IMPORTED_MODULE_8___default().contBreadCrumbs), 978 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_BreadcrumbsComponent_BreadcrumbsComponent__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {}) 979 }), 980 children 981 ] 982 }) 983 ] 984 }) 985 ] 986 }) 987 ] 988 }); 989}; 990/* harmony default export */ __webpack_exports__["Z"] = (BasicHeaderPageComponent); 991 992 993/***/ }), 994 995/***/ 5519: 996/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 997 998"use strict";
999// ESM COMPAT FLAG 1000__webpack_require__.r(__webpack_exports__); 1001 1002// EXPORTS 1003__webpack_require__.d(__webpack_exports__, { 1004 "__N_SSP": function() { return /* binding */ __N_SSP; }, 1005 "default": function() { return /* binding */ Main_AdditionalService; } 1006}); 1007 1008// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js 1009var jsx_runtime = __webpack_require__(5893); 1010// EXTERNAL MODULE: ./node_modules/react/index.js 1011var react = __webpack_require__(7294); 1012// EXTERNAL MODULE: ./components/Main/global/basicHeaderPage.tsx 1013var basicHeaderPage = __webpack_require__(9601); 1014// EXTERNAL MODULE: ./components/Main/global/BackButton/BackButton.tsx 1015var BackButton = __webpack_require__(450); 1016// EXTERNAL MODULE: ./components/Main/AdditionalServices/AdditionalServiced.module.css 1017var AdditionalServiced_module = __webpack_require__(2681); 1018var AdditionalServiced_module_default = /*#__PURE__*/__webpack_require__.n(AdditionalServiced_module); 1019// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js 1020var objectWithoutPropertiesLoose = __webpack_require__(3366); 1021// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js 1022var esm_extends = __webpack_require__(7462); 1023// EXTERNAL MODULE: ./node_modules/clsx/dist/clsx.mjs 1024var clsx = __webpack_require__(512); 1025// EXTERNAL MODULE: ./node_modules/@mui/material/node_modules/@mui/utils/esm/composeClasses/composeClasses.js 1026var composeClasses = __webpack_require__(5463); 1027// EXTERNAL MODULE: ./node_modules/@mui/system/colorManipulator.js 1028var colorManipulator = __webpack_require__(2101); 1029// EXTERNAL MODULE: ./node_modules/@mui/material/utils/capitalize.js + 1 modules 1030var capitalize = __webpack_require__(4277); 1031// EXTERNAL MODULE: ./node_modules/@mui/material/internal/SwitchBase.js + 1 modules 1032var SwitchBase = __webpack_require__(1964); 1033// EXTERNAL MODULE: ./node_modules/@mui/material/styles/styled.js 1034var styled = __webpack_require__(948); 1035// EXTERNAL MODULE: ./node_modules/@mui/material/DefaultPropsProvider/DefaultPropsProvider.js 1036var DefaultPropsProvider = __webpack_require__(8628); 1037// EXTERNAL MODULE: ./node_modules/@mui/material/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js 1038var generateUtilityClasses = __webpack_require__(5154); 1039// EXTERNAL MODULE: ./node_modules/@mui/material/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js 1040var generateUtilityClass = __webpack_require__(2104); 1041;// CONCATENATED MODULE: ./node_modules/@mui/material/Switch/switchClasses.js 1042 1043 1044function getSwitchUtilityClass(slot) { 1045 return (0,generateUtilityClass/* default */.ZP)('MuiSwitch', slot); 1046} 1047const switchClasses = (0,generateUtilityClasses/* default */.Z)('MuiSwitch', ['root', 'edgeStart', 'edgeEnd', 'switchBase', 'colorPrimary', 'colorSecondary', 'sizeSmall', 'sizeMedium', 'checked', 'disabled', 'input', 'thumb', 'track']); 1048/* harmony default export */ var Switch_switchClasses = (switchClasses); 1049;// CONCATENATED MODULE: ./node_modules/@mui/material/Switch/Switch.js 1050'use client'; 1051 1052// @inheritedComponent IconButton 1053 1054 1055const _excluded = ["className", "color", "edge", "size", "sx"]; 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069const useUtilityClasses = ownerState => { 1070 const { 1071 classes, 1072 edge, 1073 size, 1074 color, 1075 checked, 1076 disabled 1077 } = ownerState; 1078 const slots = { 1079 root: ['root', edge && `edge${(0,capitalize/* default */.Z)(edge)}`, `size${(0,capitalize/* default */.Z)(size)}`], 1080 switchBase: ['switchBase', `color${(0,capitalize/* default */.Z)(color)}`, checked && 'checked', disabled && 'disabled'], 1081 thumb: ['thumb'], 1082 track: ['track'], 1083 input: ['input'] 1084 }; 1085 const composedClasses = (0,composeClasses/* default */.Z)(slots, getSwitchUtilityClass, classes); 1086 return (0,esm_extends/* default */.Z)({}, classes, composedClasses); 1087}; 1088const SwitchRoot = (0,styled/* default */.ZP)('span', { 1089 name: 'MuiSwitch', 1090 slot: 'Root', 1091 overridesResolver: (props, styles) => { 1092 const { 1093 ownerState 1094 } = props; 1095 return [styles.root, ownerState.edge && styles[`edge${(0,capitalize/* default */.Z)(ownerState.edge)}`], styles[`size${(0,capitalize/* default */.Z)(ownerState.size)}`]]; 1096 } 1097})({ 1098 display: 'inline-flex', 1099 width: 34 + 12 * 2, 1100 height: 14 + 12 * 2, 1101 overflow: 'hidden', 1102 padding: 12, 1103 boxSizing: 'border-box', 1104 position: 'relative', 1105 flexShrink: 0, 1106 zIndex: 0, 1107 // Reset the stacking context. 1108 verticalAlign: 'middle', 1109 // For correct alignment with the text. 1110 '@media print': { 1111 colorAdjust: 'exact' 1112 }, 1113 variants: [{ 1114 props: { 1115 edge: 'start' 1116 }, 1117 style: { 1118 marginLeft: -8 1119 } 1120 }, { 1121 props: { 1122 edge: 'end' 1123 }, 1124 style: { 1125 marginRight: -8 1126 } 1127 }, { 1128 props: { 1129 size: 'small' 1130 }, 1131 style: { 1132 width: 40, 1133 height: 24, 1134 padding: 7, 1135 [`& .${Switch_switchClasses.thumb}`]: { 1136 width: 16, 1137 height: 16 1138 }, 1139 [`& .${Switch_switchClasses.switchBase}`]: { 1140 padding: 4, 1141 [`&.${Switch_switchClasses.checked}`]: { 1142 transform: 'translateX(16px)' 1143 } 1144 } 1145 } 1146 }] 1147}); 1148const SwitchSwitchBase = (0,styled/* default */.ZP)(SwitchBase/* default */.Z, { 1149 name: 'MuiSwitch', 1150 slot: 'SwitchBase', 1151 overridesResolver: (props, styles) => { 1152 const { 1153 ownerState 1154 } = props; 1155 return [styles.switchBase, { 1156 [`& .${Switch_switchClasses.input}`]: styles.input 1157 }, ownerState.color !== 'default' && styles[`color${(0,capitalize/* default */.Z)(ownerState.color)}`]]; 1158 } 1159})(({ 1160 theme 1161}) => ({ 1162 position: 'absolute', 1163 top: 0, 1164 left: 0, 1165 zIndex: 1, 1166 // Render above the focus ripple. 1167 color: theme.vars ? theme.vars.palette.Switch.defaultColor : `${theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300]}`, 1168 transition: theme.transitions.create(['left', 'transform'], { 1169 duration: theme.transitions.duration.shortest 1170 }), 1171 [`&.${Switch_switchClasses.checked}`]: { 1172 transform: 'translateX(20px)' 1173 }, 1174 [`&.${Switch_switchClasses.disabled}`]: { 1175 color: theme.vars ? theme.vars.palette.Switch.defaultDisabledColor : `${theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600]}` 1176 }, 1177 [`&.${Switch_switchClasses.checked} + .${Switch_switchClasses.track}`]: { 1178 opacity: 0.5 1179 }, 1180 [`&.${Switch_switchClasses.disabled} + .${Switch_switchClasses.track}`]: { 1181 opacity: theme.vars ? theme.vars.opacity.switchTrackDisabled : `${theme.palette.mode === 'light' ? 0.12 : 0.2}` 1182 }, 1183 [`& .${Switch_switchClasses.input}`]: { 1184 left: '-100%', 1185 width: '300%' 1186 } 1187}), ({ 1188 theme 1189}) => ({ 1190 '&:hover': { 1191 backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0,colorManipulator/* alpha */.Fq)(theme.palette.action.active, theme.palette.action.hoverOpacity), 1192 // Reset on touch devices, it doesn't add specificity 1193 '@media (hover: none)': { 1194 backgroundColor: 'transparent' 1195 } 1196 }, 1197 variants: [...Object.entries(theme.palette).filter(([, value]) => value.main && value.light) // check all the used fields in the style below 1198 .map(([color]) => ({ 1199 props: { 1200 color 1201 }, 1202 style: { 1203 [`&.${Switch_switchClasses.checked}`]: { 1204 color: (theme.vars || theme).palette[color].main, 1205 '&:hover': { 1206 backgroundColor: theme.vars ? `rgba(${theme.vars.palette[color].mainCh
1206annel} / ${theme.vars.palette.action.hoverOpacity})` : (0,colorManipulator/* alpha */.Fq)(theme.palette[color].main, theme.palette.action.hoverOpacity), 1207 '@media (hover: none)': { 1208 backgroundColor: 'transparent' 1209 } 1210 }, 1211 [`&.${Switch_switchClasses.disabled}`]: { 1212 color: theme.vars ? theme.vars.palette.Switch[`${color}DisabledColor`] : `${theme.palette.mode === 'light' ? (0,colorManipulator/* lighten */.$n)(theme.palette[color].main, 0.62) : (0,colorManipulator/* darken */._j)(theme.palette[color].main, 0.55)}` 1213 } 1214 }, 1215 [`&.${Switch_switchClasses.checked} + .${Switch_switchClasses.track}`]: { 1216 backgroundColor: (theme.vars || theme).palette[color].main 1217 } 1218 } 1219 }))] 1220})); 1221const SwitchTrack = (0,styled/* default */.ZP)('span', { 1222 name: 'MuiSwitch', 1223 slot: 'Track', 1224 overridesResolver: (props, styles) => styles.track 1225})(({ 1226 theme 1227}) => ({ 1228 height: '100%', 1229 width: '100%', 1230 borderRadius: 14 / 2, 1231 zIndex: -1, 1232 transition: theme.transitions.create(['opacity', 'background-color'], { 1233 duration: theme.transitions.duration.shortest 1234 }), 1235 backgroundColor: theme.vars ? theme.vars.palette.common.onBackground : `${theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white}`, 1236 opacity: theme.vars ? theme.vars.opacity.switchTrack : `${theme.palette.mode === 'light' ? 0.38 : 0.3}` 1237})); 1238const SwitchThumb = (0,styled/* default */.ZP)('span', { 1239 name: 'MuiSwitch', 1240 slot: 'Thumb', 1241 overridesResolver: (props, styles) => styles.thumb 1242})(({ 1243 theme 1244}) => ({ 1245 boxShadow: (theme.vars || theme).shadows[1], 1246 backgroundColor: 'currentColor', 1247 width: 20, 1248 height: 20, 1249 borderRadius: '50%' 1250})); 1251const Switch = /*#__PURE__*/react.forwardRef(function Switch(inProps, ref) { 1252 const props = (0,DefaultPropsProvider/* useDefaultProps */.i)({ 1253 props: inProps, 1254 name: 'MuiSwitch' 1255 }); 1256 const { 1257 className, 1258 color = 'primary', 1259 edge = false, 1260 size = 'medium', 1261 sx 1262 } = props, 1263 other = (0,objectWithoutPropertiesLoose/* default */.Z)(props, _excluded); 1264 const ownerState = (0,esm_extends/* default */.Z)({}, props, { 1265 color, 1266 edge, 1267 size 1268 }); 1269 const classes = useUtilityClasses(ownerState); 1270 const icon = /*#__PURE__*/(0,jsx_runtime.jsx)(SwitchThumb, { 1271 className: classes.thumb, 1272 ownerState: ownerState 1273 }); 1274 return /*#__PURE__*/(0,jsx_runtime.jsxs)(SwitchRoot, { 1275 className: (0,clsx/* default */.Z)(classes.root, className), 1276 sx: sx, 1277 ownerState: ownerState, 1278 children: [/*#__PURE__*/(0,jsx_runtime.jsx)(SwitchSwitchBase, (0,esm_extends/* default */.Z)({ 1279 type: "checkbox", 1280 icon: icon, 1281 checkedIcon: icon, 1282 ref: ref, 1283 ownerState: ownerState 1284 }, other, { 1285 classes: (0,esm_extends/* default */.Z)({}, classes, { 1286 root: classes.switchBase 1287 }) 1288 })), /*#__PURE__*/(0,jsx_runtime.jsx)(SwitchTrack, { 1289 className: classes.track, 1290 ownerState: ownerState 1291 })] 1292 }); 1293}); 1294 false ? 0 : void 0; 1295/* harmony default export */ var Switch_Switch = (Switch); 1296// EXTERNAL MODULE: ./node_modules/@mui/material/FormControlLabel/FormControlLabel.js + 1 modules 1297var FormControlLabel = __webpack_require__(480); 1298// EXTERNAL MODULE: ./components/Main/context/HomeContext.tsx 1299var HomeContext = __webpack_require__(7056); 1300;// CONCATENATED MODULE: ./components/Main/global/RadioButtonSwitch/RadioButtonSwitch.tsx 1301 1302 1303 1304 1305 1306function ButtonSwitch(param) { 1307 let { iam , activeServices , cud , pos , setTheFirstTime } = param; 1308 const [isActive, setIsActive] = react.useState(false); 1309 const { thereIsChange } = react.useContext(HomeContext/* HomeContext */.Q); 1310 react.useEffect(()=>{ 1311 var _activeServices_getServiceStatus; 1312 setIsActive((activeServices === null || activeServices === void 0 ? void 0 : (_activeServices_getServiceStatus = activeServices.getServiceStatus) === null || _activeServices_getServiceStatus === void 0 ? void 0 : _activeServices_getServiceStatus.filter((e)=>{ 1313 return iam === e.service_code; 1314 }).length) === 1); 1315 // eslint-disable-next-line react-hooks/exhaustive-deps 1316 }, [ 1317 activeServices 1318 ]); 1319 const handleChange = ()=>{ 1320 setIsActive(!isActive); 1321 setTheFirstTime(); 1322 }; 1323 const handleClick = ()=>{ 1324 var _cud_pos; 1325 if (cud === undefined || pos === undefined) { 1326 return; 1327 } 1328 fetch("/api/toggleAditionalServices", { 1329 method: "POST", 1330 body: JSON.stringify({ 1331 action: !isActive ? "D" : "A", 1332 service: iam, 1333 consumer_entity_id: (_cud_pos = cud[pos]) === null || _cud_pos === void 0 ? void 0 : _cud_pos.userData.consumer_entity_id 1334 }) 1335 }).then((res)=>res.json()).then((resJson)=>console.log(resJson)); 1336 }; 1337 react.useEffect(()=>{ 1338 if (thereIsChange !== undefined) { 1339 handleClick(); 1340 } 1341 // eslint-disable-next-line react-hooks/exhaustive-deps 1342 }, [ 1343 thereIsChange 1344 ]); 1345 const IOSSwitch = (0,styled/* default */.ZP)((props)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(Switch_Switch, { 1346 focusVisibleClassName: ".Mui-focusVisible", 1347 disableRipple: true, 1348 ...props, 1349 checked: isActive 1350 }))((param)=>{ 1351 let { theme } = param; 1352 return { 1353 width: 42, 1354 height: 26, 1355 padding: 0, 1356 "& .MuiSwitch-switchBase": { 1357 padding: 0, 1358 margin: 2, 1359 transitionDuration: "300ms", 1360 "&.Mui-checked": { 1361 transform: "translateX(16px)", 1362 color: "#fff", 1363 "& + .MuiSwitch-track": { 1364 backgroundColor: theme.palette.mode === "dark" ? "#93D500" : "#93D500", 1365 opacity: 1, 1366 border: 0 1367 }, 1368 "&.Mui-disabled + .MuiSwitch-track": { 1369 opacity: 0.5 1370 } 1371 }, 1372 "&.Mui-focusVisible .MuiSwitch-thumb": { 1373 color: "#33cf4d", 1374 border: "6px solid #fff" 1375 }, 1376 "&.Mui-disabled .MuiSwitch-thumb": { 1377 color: theme.palette.mode === "light" ? theme.palette.grey[100] : theme.palette.grey[600] 1378 }, 1379 color: "#7C878E", 1380 "&.Mui-disabled + .MuiSwitch-track": { 1381 opacity: theme.palette.mode === "light" ? 0.7 : 0.3 1382 } 1383 }, 1384 "& .MuiSwitch-thumb": { 1385 boxSizing: "border-box", 1386 width: 22, 1387 height: 22 1388 }, 1389 "& .MuiSwitch-track": { 1390 borderRadius: 26 / 2, 1391 bordeWidth: 10, 1392 backgroundColor: theme.palette.mode === "light" ? "#E9E9EA" : "#93D500", 1393 opacity: 1, 1394 transition: theme.transitions.create([ 1395 "background-color" 1396 ], { 1397 duration: 500 1398 }) 1399 } 1400 }; 1401 }); 1402 return /*#__PURE__*/ (0,jsx_runtime.jsx)(jsx_runtime.Fragment, { 1403 children: /*#__PURE__*/ (0,jsx_runtime.jsx)("label", { 1404 children: /*#__PURE__*/ (0,jsx_runtime.jsx)(FormControl
1404Label/* default */.Z, { 1405 onChange: handleChange, 1406 control: /*#__PURE__*/ (0,jsx_runtime.jsx)(IOSSwitch, { 1407 sx: { 1408 m: 1 1409 } 1410 }), 1411 label: "" 1412 }) 1413 }) 1414 }); 1415} 1416/* harmony default export */ var RadioButtonSwitch = (ButtonSwitch); 1417 1418// EXTERNAL MODULE: ./components/Main/global/GlobalButton/GlobalButton.tsx 1419var GlobalButton = __webpack_require__(1665); 1420;// CONCATENATED MODULE: ./components/Main/AdditionalServices/AdditionalServicedComponent.tsx 1421 1422 1423 1424 1425 1426 1427 1428function AdditionalServiceComp(param) { 1429 let { addServices , cud , pos } = param; 1430 const { toggleThereChange , thereIsChange } = react.useContext(HomeContext/* HomeContext */.Q); 1431 const [thereIsTheFirstChange, setThereIsTheFirstChange] = react.useState(true); 1432 const setTrueTheFirstChange = ()=>setThereIsTheFirstChange(false); 1433 react.useEffect(()=>{ 1434 setThereIsTheFirstChange(true); 1435 }, [ 1436 thereIsChange 1437 ]); 1438 return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { 1439 children: [ 1440 /*#__PURE__*/ (0,jsx_runtime.jsx)(BackButton/* default */.Z, {}), 1441 /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", { 1442 className: (AdditionalServiced_module_default()).contDebtToDate, 1443 children: [ 1444 /*#__PURE__*/ (0,jsx_runtime.jsx)("p", { 1445 className: (AdditionalServiced_module_default()).titleHead, 1446 children: "Servicios adicionales" 1447 }), 1448 /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", { 1449 className: (AdditionalServiced_module_default()).contInfoGlobal, 1450 children: [ 1451 /*#__PURE__*/ (0,jsx_runtime.jsx)("div", { 1452 children: /*#__PURE__*/ (0,jsx_runtime.jsxs)("label", { 1453 className: (AdditionalServiced_module_default()).contInput, 1454 children: [ 1455 /*#__PURE__*/ (0,jsx_runtime.jsx)(RadioButtonSwitch, { 1456 setTheFirstTime: setTrueTheFirstChange, 1457 iam: "3WAY", 1458 activeServices: addServices, 1459 cud: cud, 1460 pos: pos 1461 }), 1462 /*#__PURE__*/ (0,jsx_runtime.jsxs)("p", { 1463 children: [ 1464 "Conferencia", 1465 /*#__PURE__*/ (0,jsx_runtime.jsx)("span", { 1466 children: "Habla con varios n\xfameros a la vez" 1467 }) 1468 ] 1469 }) 1470 ] 1471 }) 1472 }), 1473 /*#__PURE__*/ (0,jsx_runtime.jsx)("div", { 1474 children: /*#__PURE__*/ (0,jsx_runtime.jsxs)("label", { 1475 className: (AdditionalServiced_module_default()).contInput, 1476 children: [ 1477 /*#__PURE__*/ (0,jsx_runtime.jsx)(RadioButtonSwitch, { 1478 setTheFirstTime: setTrueTheFirstChange, 1479 iam: "CWT", 1480 activeServices: addServices, 1481 cud: cud, 1482 pos: pos 1483 }), 1484 /*#__PURE__*/ (0,jsx_runtime.jsxs)("p", { 1485 children: [ 1486 "Llamada en Espera", 1487 /*#__PURE__*/ (0,jsx_runtime.jsx)("span", { 1488 children: "Pausar o atender nuevas llamadas" 1489 }) 1490 ] 1491 }) 1492 ] 1493 }) 1494 }), 1495 /*#__PURE__*/ (0,jsx_runtime.jsx)("div", { 1496 children: /*#__PURE__*/ (0,jsx_runtime.jsxs)("label", { 1497 className: (AdditionalServiced_module_default()).contInput, 1498 children: [ 1499 /*#__PURE__*/ (0,jsx_runtime.jsx)(RadioButtonSwitch, { 1500 setTheFirstTime: setTrueTheFirstChange, 1501 iam: "ROAM", 1502 activeServices: addServices, 1503 cud: cud, 1504 pos: pos 1505 }), 1506 /*#__PURE__*/ (0,jsx_runtime.jsxs)("p", { 1507 children: [ 1508 "Roaming", 1509 /*#__PURE__*/ (0,jsx_runtime.jsx)("span", { 1510 children: "Cobertura desde cualquier lugar" 1511 }) 1512 ] 1513 }) 1514 ] 1515 }) 1516 }), 1517 /*#__PURE__*/ (0,jsx_runtime.jsx)("div", { 1518 children: /*#__PURE__*/ (0,jsx_runtime.jsxs)("label", { 1519 className: (AdditionalServiced_module_default()).contInput, 1520 children: [ 1521 /*#__PURE__*/ (0,jsx_runtime.jsx)(RadioButtonSwitch, { 1522 setTheFirstTime: setTrueTheFirstChange, 1523 iam: "11", 1524 activeServices: addServices, 1525 cud: cud, 1526 pos: pos 1527 }), 1528 /*#__PURE__*/ (0,jsx_runtime.jsxs)("p", { 1529 children: [ 1530 "Llamadas Internacionales", 1531 /*#__PURE__*/ (0,jsx_runtime.jsx)("span", { 1532 children: "Llamadas Internacionales" 1533 }) 1534 ] 1535 }) 1536 ] 1537 }) 1538 }) 1539 ] 1540 }), 1541 /*#__PURE__*/ (0,jsx_runtime.jsx)(GlobalButton/* default */.Z, { 1542 iconText: "", 1543 textButton: "Aplicar", 1544 onClick: ()=>toggleThereChange(), 1545 shouldBeActive: thereIsTheFirstChange, 1546 marginTop: true 1547 }) 1548 ] 1549 }) 1550 ] 1551 }); 1552} 1553/* harmony default export */ var AdditionalServicedComponent = (AdditionalServiceComp); 1554 1555// EXTERNAL MODULE: ./components/Main/Hooks/useBreadCrumbs.tsx 1556var useBreadCrumbs = __webpack_require__(7325); 1557// EXTERNAL MODULE: ./components/Main/Hooks/useUserInfo.tsx 1558var useUserInfo = __webpack_require__(7254); 1559// EXTERNAL MODULE: ./node_modules/next/head.js 1560var head = __webpack_require__(9008); 1561var head_default = /*#__PURE__*/__webpack_require__.n(head); 1562// EXTERNAL MODULE: ./components/Main/Hooks/useAdditionalServices.tsx 1563var useAdditionalServices = __webpack_require__(7899); 1564;// CONCATENATED MODULE: ./pages/Main/AdditionalService.tsx 1565//@ts-nocheck 1566 1567 1568 1569 1570 1571 1572 1573 1574const AdditionalService = (param)=>{ 1575 let { responseJson } = param; 1576 (0,useBreadCrumbs/* useBreadCrumbs */.Z)(); 1577 const { contextUserData , position } = (0,useUserInfo/* useUserInfo */.P)(responseJson); 1578 const { activeAdditionalServices } = (0,useAdditionalServices/* useAdditionalServices */.y)(responseJson); 1579 return /*#__PURE__*/ (0,jsx_runtime.jsxs)(basicHeaderPage/* default */.Z, { 1580 children: [ 1581 /*#__PURE__*/ (0,jsx_runtime.jsx)((head_default()), { 1582 children: /*#__PURE__*/ (0,jsx_runtime.jsx)("title", { 1583 children: "Web Channel - Servicios adicionales" 1584 }) 1585 }), 1586 /*#__PURE__*/ (0,jsx_runtime.jsx)(AdditionalServicedComponent, { 1587 addServices: activeAdditionalServices, 1588 cud: contextUserData, 1589 pos: position 1590 }) 1591 ] 1592 }); 1593}; 1594var __N_SSP = true; 1595/* harmony default export */ var Main_AdditionalService = (AdditionalService); 1596 1597
1598/***/ }), 1599 1600/***/ 5109: 1601/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 1602 1603"use strict"; 1604/* harmony export */ __webpack_require__.d(__webpack_exports__, { 1605/* harmony export */ "BL": function() { return /* binding */ pointToNumber; }, 1606/* harmony export */ "CC": function() { return /* binding */ cleanMask; }, 1607/* harmony export */ "E6": function() { return /* binding */ convertByte; }, 1608/* harmony export */ "Jz": function() { return /* binding */ customerInfoFetch; }, 1609/* harmony export */ "Mb": function() { return /* binding */ formattedCedula; }, 1610/* harmony export */ "W0": function() { return /* binding */ getAfinidadFavNumber; }, 1611/* harmony export */ "az": function() { return /* binding */ formatBalance; }, 1612/* harmony export */ "gr": function() { return /* binding */ formatToLowerCaseText; }, 1613/* harmony export */ "gs": function() { return /* binding */ ModifyFavNumber; }, 1614/* harmony export */ "if": function() { return /* binding */ avoidNotSpace; }, 1615/* harmony export */ "jf": function() { return /* binding */ avoidNotLetters; }, 1616/* harmony export */ "ln": function() { return /* binding */ returnTheFixedArrayFromRechargeArray; }, 1617/* harmony export */ "ni": function() { return /* binding */ logOut; }, 1618/* harmony export */ "oM": function() { return /* binding */ cleanCedula; }, 1619/* harmony export */ "p6": function() { return /* binding */ formatDate; }, 1620/* harmony export */ "rJ": function() { return /* binding */ convertTime; }, 1621/* harmony export */ "sb": function() { return /* binding */ getBalance; }, 1622/* harmony export */ "uf": function() { return /* binding */ formatNumber; } 1623/* harmony export */ }); 1624/* unused harmony exports encoder, serverSideProps, getBalances, getOffers, downloadReceipt */ 1625/* provided dependency */ var process = __webpack_require__(3454); 1626/* provided dependency */ var Buffer = __webpack_require__(1876)["Buffer"]; 1627const customerInfoFetch = async (userID, jwt)=>{ 1628 try { 1629 const response = await fetch("/api/getUserInfo", { 1630 method: "POST", 1631 body: JSON.stringify({ 1632 user_id: userID, 1633 token: jwt 1634 }) 1635 }); 1636 const responseJson = await response.json(); 1637 return responseJson; 1638 } catch (e) { 1639 console.log(e); 1640 } 1641}; 1642const logOut = async ()=>{ 1643 await fetch("/api/LogOut"); 1644}; 1645const getBalance = async (pcs, userID, jwt)=>{ 1646 const response = await fetch("/api/getServiceInfo", { 1647 method: "POST", 1648 body: JSON.stringify({ 1649 pcs: pcs, 1650 user_id: userID, 1651 token: jwt 1652 }) 1653 }); 1654 const responseJson = await response.json(); 1655 return responseJson; 1656}; 1657const encoder = ()=>{ 1658 const userPassString = "".concat(process.env.USERDB, ":").concat(process.env.PASSDB); 1659 const bufferEncode = Buffer.from(userPassString); 1660 const userPassEncode = bufferEncode.toString("base64"); 1661 return userPassEncode; 1662}; 1663const formatBalance = function() { 1664 let balance = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", isMainBalance = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; 1665 const balanceTransformed = isMainBalance ? +balance / 100 : +balance; 1666 const header = "RD$"; 1667 const options = { 1668 style: "currency", 1669 currency: "RUB" 1670 }; 1671 const number = new Intl.NumberFormat("en-US", options); 1672 const formated = number.format(balanceTransformed); 1673 const numberFormated = formated.split("B"); 1674 return "".concat(header).concat(numberFormated[1]); 1675}; 1676const formatNumber = function() { 1677 let number = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; 1678 const headerNumber = "(".concat(number.substring(0, 3), ")"); 1679 const firstPartNumber = number.substring(3, 6); 1680 const secondPartNumber = number.substring(6, 10); 1681 const finalNumber = "".concat(headerNumber, " ").concat(firstPartNumber, "-").concat(secondPartNumber); 1682 return finalNumber; 1683}; 1684const formatToLowerCaseText = function() { 1685 let text = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; 1686 const words = text.split(" "); 1687 const finalTextArr = []; 1688 for(let x = 0; x < words.length; x++){ 1689 const firstLetter = words[x][0]; 1690 const textComplete = words[x].toLowerCase(); 1691 const finalWordText = textComplete.replace(firstLetter === null || firstLetter === void 0 ? void 0 : firstLetter.toLowerCase(), firstLetter); 1692 finalTextArr.push(finalWordText); 1693 } 1694 return finalTextArr; 1695}; 1696const returnTheFixedArrayFromRechargeArray = (arr)=>{ 1697 let finalArray = []; 1698 const regex = /\s\(|\)/g; 1699 const regex2 = /y Voz|-/g; 1700 const regex3 = /Recupera Velocidad|Recarga WhatsApp|Recarga de |IG|FB|\(s|\+/g; 1701 const regex4 = /a(s)?/; 1702 const regex5 = /B{1}?/; 1703 const regex6 = /horas/; 1704 const regex7 = /1 dias/; 1705 let semiFinalArray = []; 1706 arr.map((element)=>{ 1707 var _element__getAvailableRechargeByPackage; 1708 (_element__getAvailableRechargeByPackage = element[1].getAvailableRechargeByPackage) === null || _element__getAvailableRechargeByPackage === void 0 ? void 0 : _element__getAvailableRechargeByPackage.map((subElement)=>{ 1709 const description = subElement.recharge_description; 1710 const price = subElement.price; 1711 const descriptionSubStr = description.replace(regex, " "); 1712 const descriptionSubStr2 = descriptionSubStr.replace(regex2, " "); 1713 const descriptionSubStr3 = descriptionSubStr2.replace(regex3, " "); 1714 const descriptionSubStr4 = descriptionSubStr3.replace(regex4, "as | "); 1715 const descriptionSubStr5 = descriptionSubStr4.replace(regex5, "B |"); 1716 const descriptionSubStr6 = descriptionSubStr5.replace(regex6, "hora"); 1717 const descriptionSubStr7 = descriptionSubStr6.replace(regex7, "1 dia"); 1718 let finalSTR = " ".concat(descriptionSubStr7, " RD$").concat(price); 1719 if (element[0].cod_tipo_servicio === "PSRRSS") { 1720 finalSTR = " ".concat(subElement.recharge_description, " | RD$").concat(price); 1721 } 1722 semiFinalArray.push(finalSTR); 1723 }); 1724 finalArray.push([ 1725 element[0], 1726 [ 1727 ...semiFinalArray 1728 ] 1729 ]); 1730 semiFinalArray = []; 1731 }); 1732 return finalArray; 1733}; 1734async function serverSideProps(context) { 1735 const jwtRegex = /jwt=/g; 1736 const userRegex = /user_id=/g; 1737 const jwt = context.req.headers.cookie.split(";").find((e)=>e.match(jwtRegex)).trim().slice(4); 1738 const userID = context.req.headers.cookie.split(";").find((e)=>e.match(userRegex)).trim().slice(8); 1739 const response = await fetch("".concat(process.env.BASEIP, "/api/getUserInfo"), { 1740 method: "POST", 1741 body: JSON.stringify({ 1742 user_id: userID, 1743 token: jwt 1744 }) 1745 }); 1746 const responseJson = await response.json(); 1747 if (response.newToken !== undefined) { 1748 serverSideProps(context); 1749 return; 1750 } 1751 return { 1752 props: { 1753 responseJson 1754 } 1755 }; 1756} 1757const byteConversion = [ 1758 "Bytes", 1759 "KB", 1760 "MB", 1761 "GB", 1762 "TB" 1763]; 1764const convertByte = (bytes, times)=>{ 1765 if (isNaN(bytes) || bytes === undefined) { 1766 return; 1767 } 1768 if (bytes < 1) { 1769 return "".concat((bytes * 1024).toFixed(2), " ").concat(byteConversion[times - 1] || ""); 1770 } 1771 return convertByte(bytes / 1024, times + 1); 1772}; 1773const pointToNumber = function() { 1774 let number = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; 1775 if (number.length === 10) { 1776 const firts = number.substring(0, 3).split(""); 1777 const second = number.substring(3, 6).split(""); 1778 const final = number.substring(6); 1779 firts.push("."); 1780 second.push("."); 1781 const finalNumber = [ 1782 ...firts, 1783 ...second, 1784 ...final 1785 ].join(""); 1786 return finalNumber; 1787 } 1788 return ""; 1789}; 1790const formatDate = (date)=>{ 1791 return date.split(" ")[0].replaceAll("-", "/").split("/").reverse().join("/"); 1792}; 1793const ModifyFavNumber = async (action, prevNumber, newNumber, consumer_id, faf_type)=>{ 1794 let isFullFilled = false;
1795 const response = await fetch("/api/updateFavNumber", { 1796 method: "POST", 1797 body: JSON.stringify({ 1798 consumer_entity_id: consumer_id, 1799 faf_type: faf_type, 1800 faf_number: newNumber, 1801 action_type: action, 1802 faf_number_old: prevNumber 1803 }) 1804 }); 1805 const resJson = await response.json(); 1806 isFullFilled = resJson.code === "OK"; 1807 return isFullFilled; 1808}; 1809const getAfinidadFavNumber = async function() { 1810 let idEntidadConsumo = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; 1811 const res = await fetch("/api/genericRequest", { 1812 method: "POST", 1813 body: JSON.stringify({ 1814 url: "getFafServices", 1815 consumer_entity_id: idEntidadConsumo 1816 }) 1817 }); 1818 const resJson = await res.json(); 1819 return resJson; 1820}; 1821const getBalances = (balances)=>{ 1822 let balanceBalances = {}; 1823 let main = {}; 1824 balances.DAList.forEach((key)=>{ 1825 let res = { 1826 balance: null, 1827 expiryDate: null, 1828 type: null 1829 }; 1830 if (parseInt(key.id) === 100 || parseInt(key.id) === 101) { 1831 delete balances.DAList[key]; 1832 } 1833 res.balance = parseInt(key.balance); 1834 res.expiryDate = key.expiryDate; 1835 res.type = key.type; 1836 if (key.bonusStartAt) { 1837 res.bonusStartAt = key.bonusStartAt; 1838 } 1839 balanceBalances[key.id] = res; 1840 }); 1841 main.balance = parseInt(balances.mainAccountValue); 1842 main.expiryDate = balances.supervisionExpiryDate; 1843 balanceBalances.CORE_BALANCE = main; 1844 // We proceed to return the balances formatted 1845 return balanceBalances; 1846}; 1847const getOffers = (offers)=>{ 1848 let counters = {}; 1849 offers.balance.counterList.forEach((key)=>{ 1850 let res = { 1851 usageCounterValue: null, 1852 usageThresholdValue: null 1853 }; 1854 res.usageCounterValue = parseInt(key.usageCounterValue); 1855 res.usageThresholdValue = parseInt(key.usageThresholdValue); 1856 counters[key.usageCounterID] = res; 1857 }); 1858 // We proceed to return the offers formatted 1859 return counters; 1860}; 1861const convertTime = function() { 1862 let seconds = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; 1863 if (!seconds) { 1864 return ""; 1865 } 1866 try { 1867 let minutes = Math.floor(seconds / 60); 1868 const seconds1 = seconds % 60; 1869 const hours = Math.floor(minutes / 60); 1870 minutes = minutes % 60; 1871 return "".concat(hours, " Hora ").concat(minutes, " mins ").concat(seconds1, " secs "); 1872 } catch (e) { 1873 return "Error: ".concat(e); 1874 } 1875}; 1876// Funcion para descargar/abrir factura 1877function downloadReceipt(codPeriodo, codCicloFacturacion, comunityId) { 1878 if (true) { 1879 const url = "https://omega.viva.com.do/supreme/_files/pdf/".concat(codPeriodo, "_").concat(codCicloFacturacion, "_").concat(comunityId, ".pdf"); 1880 // Crear una ventana emergente con un enlace de descarga 1881 const popup = window.open("", "_blank", "width=1,height=1,left=-1000,top=-1000"); // Abrir ventana emergente oculta 1882 const link = document.createElement("a"); 1883 link.href = url; 1884 link.setAttribute("download", "".concat(codPeriodo, "_").concat(codCicloFacturacion, "_").concat(comunityId, ".pdf")); // Nombre del archivo 1885 // Añadir el enlace al DOM y simular el click para descargar 1886 popup.document.body.appendChild(link); 1887 link.click(); 1888 // Eliminar el enlace después de descargar 1889 popup.document.body.removeChild(link); 1890 popup.close(); 1891 } 1892} 1893//Texto sin espacios ni caracteres especiales 1894const avoidNotSpace = (text)=>{ 1895 const newText = text.replace(/[^a-zA-Z0-9@_-]/g, "").slice(0, 24); 1896 return newText; 1897}; 1898//Texto sin letras 1899const avoidNotLetters = (text)=>{ 1900 const newText = text.replace(/[^0-9]/g, ""); 1901 return newText; 1902}; 1903//Formato de cedulas con guiones 1904const formattedCedula = (text)=>{ 1905 const cleanedValue = text.replace(/\D/g, ""); 1906 const match = cleanedValue.match(/^(\d{0,3})(\d{0,7})(\d{0,1})$/); 1907 if (match) { 1908 let formattedNumber = ""; 1909 if (match[1]) { 1910 formattedNumber += "".concat(match[1]); 1911 } 1912 if (match[1].length === 3 && match[2]) { 1913 formattedNumber += "-".concat(match[2]); 1914 } 1915 if (match[2].length === 7 && match[3]) { 1916 formattedNumber += "-".concat(match[3]); 1917 } 1918 return formattedNumber; 1919 } 1920 return text; 1921}; 1922const cleanMask = (text)=>{ 1923 if (!text) return ""; 1924 return text.replace(/\D/g, ""); 1925}; 1926const cleanCedula = (text)=>{ 1927 return text === null || text === void 0 ? void 0 : text.replace(/-/g, ""); 1928}; 1929 1930 1931/***/ }), 1932 1933/***/ 2681: 1934/***/ (function(module) { 1935 1936// extracted by mini-css-extract-plugin 1937module.exports = {"contDebtToDate":"AdditionalServiced_contDebtToDate__occnb","titleHead":"AdditionalServiced_titleHead__6edHI","contInput":"AdditionalServiced_contInput__gqT_n"}; 1938 1939/***/ }), 1940 1941/***/ 6983: 1942/***/ (function(module) { 1943 1944// extracted by mini-css-extract-plugin 1945module.exports = {"contBack":"stylesBackButton_contBack__blKzl"}; 1946 1947/***/ }), 1948 1949/***/ 5427: 1950/***/ (function(module) { 1951 1952// extracted by mini-css-extract-plugin 1953module.exports = {"btnAcept":"stylesGlobalButton_btnAcept__3BY33"}; 1954 1955/***/ }), 1956 1957/***/ 3335: 1958/***/ (function(module) { 1959 1960// extracted by mini-css-extract-plugin 1961module.exports = {"container":"Header_container__8KVbA","contHeader":"Header_contHeader__qJ3Ws","contTopHeader":"Header_contTopHeader__emVqk","contHeaderImg":"Header_contHeaderImg__s3vOo","headerImg":"Header_headerImg__csWCY","contInfoTitle":"Header_contInfoTitle__umOWn","contIcon":"Header_contIcon__9zzjj","contTitle":"Header_contTitle__1J3Ck","contNumber":"Header_contNumber__xoaJJ","contName":"Header_contName__izyWi","contBottonHeader":"Header_contBottonHeader__le03t"}; 1962 1963/***/ }), 1964 1965/***/ 124: 1966/***/ (function(module) { 1967 1968// extracted by mini-css-extract-plugin 1969module.exports = {"styContHomeyNav":"styleMainServiceDetailed_styContHomeyNav__l9ohX","logoVivaBlanco":"styleMainServiceDetailed_logoVivaBlanco__Nqucj","contGlobal":"styleMainServiceDetailed_contGlobal__06EVt","contServiceDitailed":"styleMainServiceDetailed_contServiceDitailed__so2__","continfoGlobal":"styleMainServiceDetailed_continfoGlobal__iwlz_","css-12i7wg6-MuiPaper-root-MuiDrawer-paper":"styleMainServiceDetailed_css-12i7wg6-MuiPaper-root-MuiDrawer-paper__rzkQa","contNavResponsive":"styleMainServiceDetailed_contNavResponsive__KiS_p"}; 1970 1971/***/ }) 1972 1973}, 1974/******/ function(__webpack_require__) { // webpackRuntimeModules 1975/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); } 1976/******/ __webpack_require__.O(0, [3365,4976,2510,594,4838,908,5221,9378,1664,287,6170,5518,3700,9774,2888,179], function() { return __webpack_exec__(7447); }); 1977/******/ var __webpack_exports__ = __webpack_require__.O(); 1978/******/ _N_E = __webpack_exports__; 1979/******/ } 1980]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.