PageSourceSearch

https://www.royalcaribbean.com/myaccount/5513.c3dd0c66f4779a4c.js

js royalcaribbean.com collected 2026-09-24 08:35:50 UTC 14,662 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkroyal=self.webpackChunkroyal||[]).push([[5513],{95513:(g,p,s)=>{s.r(p),s.d(p,{rcg_input_phone:()=>b});var d=s(10467),n=s(60774),u=s(36583);const b=(()=>{let h=class{constructor(e){(0,n.r)(this,e),this.valueChanged=(0,n.c)(this,"valueChanged"),this.autofocus=!1,this.required=!1,this.errorMessage="",this.brand="royal",this.maskForContentSquare=!1,this.autocomplete="off",this.focused=!1,this.focusedSelect=!1,this.setInputFocus=()=>{this.focused=!0},this.setInputFocusOut=()=>{this.focused=!1,this.valueChanged.emit(Object.assign(Object.assign({},this.inputData),{isComplete:!0}))},this.setInputFocusSelect=()=>{this.focusedSelect=!0},this.setInputFocusOutSelect=()=>{this.focusedSelect=!1,this.focused=!1},this.clearInput=()=>{this.textInput.value=""}}get computedStyles(){return(0,u.p)(this.customStyles)}watchSubmittedHandler(e){e&&!this.textInput.value&&this.valueChanged.emit(this.inputData)}componentWillLoad(){var e,t,o;let r;if(this.phoneCallingCodes&&(r=(0,u.a)(this.phoneCallingCodes,"value prop format invalid"),this.callingCodeOptions=this.generateCountryOptions(r),this.selectedISOCountryCode=this.callingCodeOptions[0].triggerLabel,this.selectedCallingCode=`+${r.find(l=>l.countryCode===this.selectedISOCountryCode).callingCode}`),this._value=(null===(e=this.value)||void 0===e?void 0:e.length)>0?(0,u.a)(this.value,"value prop format invalid"):{phoneNumber:"",countryCode:""},this.hasDefaultValue()){const l=null!==(o=null===(t=r.find(a=>{var i;return a.countryCode===(null===(i=this._value)||void 0===i?void 0:i.countryCode)}))||void 0===t?void 0:t.callingCode)&&void 0!==o?o:"";this.inputData={label:this.name,value:`${l}${this._value.phoneNumber}`,isValid:!this.showErrorMessage(),countryCode:this._value.countryCode,phoneNumber:this._value.phoneNumber},this.selectedCallingCode=`+${l}`,this.valueChanged.emit(this.inputData)}}componentDidLoad(){var e;!(null===(e=this.selectInput)||void 0===e)&&e.value&&(this.selectedCallingCode=(0,u.a)(this.selectInput.value).value),this.autofocus&&(setTimeout(()=>this.textInput.focus(),0),this.setInputFocus())}hasDefaultValue(){return!(!this._value||null===this._value||""===this._value.phoneNumber||(this.phoneValue=this._value.phoneNumber,this.selectedISOCountryCode=this._value.countryCode,0))}handleChange(e){this.phoneValue=e.target.value,this._value?this._value.phoneNumber=this.phoneValue:this._value={countryCode:this.selectedISOCountryCode||"",phoneNumber:this.phoneValue},this.emitValueChanged()}emitValueChanged(){const e=this.phoneValue?this.phoneValue:"";this.inputData={label:this.name,value:`${this.selectedCallingCode}${e}`,isValid:!this.showErrorMessage(),countryCode:this.selectedISOCountryCode,phoneNumber:e},this.valueChanged.emit(this.inputData)}resetPhoneField(e){var t=this;return(0,d.A)(function*(){var o,r;const l=e?.phoneNumber||"";let i,a=e?.countryCode||"";t._value={phoneNumber:l,countryCode:a},t.phoneValue=l,!(null===(o=t.callingCodeOptions)||void 0===o)&&o.length&&(i=t.callingCodeOptions.find(f=>f.triggerLabel===a),i||(i=null===(r=t.callingCodeOptions)||void 0===r?void 0:r[0],a=i?.triggerLabel||"",t._value.countryCode=a),t.selectedISOCountryCode=i?.triggerLabel||"",t.selectedCallingCode=i?.value||"",t.selectInput&&(t.selectInput.value=JSON.stringify(i))),t.textInput&&(t.textInput.value=l),t.inputData={label:t.name,countryCode:a,phoneNumber:l,isValid:l.length>0,value:`${t.selectedCallingCode}${l}`},t.valueChanged.emit(t.inputData)})()}generateCountryOptions(e){return e.map(t=>({value:`+${t.callingCode}`,label:this.createCountryLabel(t),triggerLabel:t.countryCode,sorting:t.sorting}))}createCountryLabel(e){let t=e.countryName;return e.callingCode&&(t=[t,`(+${e.callingCode})`].join(" ")),t}updateCountryCode(e){this.selectedCountryOption=e,this.selectedISOCountryCode=e.triggerLabel,this.selectedCallingCode=e.value,this.selectedISOCountryCode&&this._value&&(this._value.countryCode=this.selectedISOCountryCode)}handleCountryChange(e){var t,o,r;if(!e.target.value)return this.inputData={label:this.name,value:`${(null===(t=this._value)||void 0===t?void 0:t.phoneNumber)||""}`,isValid:!1,countryCode:"",phoneNumber:(null===(o=this._value)||void 0===o?void 0:o.phoneNumber)||""},void this.valueChanged.emit(this.inputData);const l=(0,u.a)(e.target.value);if(this.updateCountryCode(l),this.phoneValue||this.hasDefaultValue()){this.emitValueChanged();const a=this.el.shadowRoot.querySelector(`#rcg-input-phone-${this.group}-${this.name}`);a instanceof HTMLInputElement&&a.focus()}else this.inputData={label:this.name,isValid:!1,countryCode:this.selectedISOCountryCode||"",phoneNumber:"",value:`${this.selectedCallingCode}${(null===(r=this._value)||void 0===r?void 0:r.phoneNumber)||""}`},this.valueChanged.emit(this.inputData)}disallowLettersInput(e){const t=e.key;!/\d/.test(t)&&!"()+-".includes(t)&&e.preventDefault()}showErrorMessage(){return!!this.errorMessage}render(){var e;const t=this.focusedSelect?`input-phone__select--${this.brand}`:"";return(0,n.h)(n.H,{key:"8b438c75c014b76d6ebf9373c783ac59466c95c3"},(0,n.h)("div",{key:"f682f3af4946d574ead265b506f41a8f00746511",class:`input-phone\n          ${this.focused?"input-phone--focus":""} input-phone-${this.brand}\n          ${this.showErrorMessage()?"input-phone--error":""}`,onClick:this.setInputFocus,"data-cs-mask":this.maskForContentSquare?"":null},(0,n.h)("select",{key:"094b37afa5b26694e600214de75b9472daf1c328",name:"",id:"country-select","aria-label":this.label,class:`input-phone__select ${t}`,onFocus:this.setInputFocusSelect.bind(this),onFocusout:this.setInputFocusOutSelect.bind(this),tabindex:"0",ref:o=>this.selectInput=o,onInput:o=>this.handleCountryChange(o)},!(null!==(e=this._value)&&void 0!==e&&e.countryCode)&&(0,n.h)("option",{key:"empty",value:"",disabled:!0,selected:!0,hidden:!0}),this.callingCodeOptions.map(o=>(0,n.h)("option",{key:o.triggerLabel,selected:this._value&&this._value.countryCode?o.triggerLabel===this._value.countryCode:this.selectValue===JSON.stringify(o),value:JSON.stringify(o)},o.label))),(0,n.h)("span",{key:"752b6bb78f2029b13e165c2666d18b08eb375943",class:"input-phone__chevron"}),(0,n.h)("span",{key:"17516542db945e17b6441cf1ec6975ca4878067c",class:"input-phone__trigger"},this._value&&this._value.countryCode?this._value.countryCode:this.selectedISOCountryCode),(0,n.h)("div",{key:"e43fe1991f3b32d85f08b90133e42993c04e4e78",class:"input-phone__number"},(0,n.h)("div",{key:"5117c65180786096e3cc134126746bc266cf2b90",class:"input-phone__number__input"},!this.showErrorMessage()&&this.focused&&this.showClearButton&&(0,n.h)("clear-button",{key:"58d9570e5146ca772b1e8edaac0d9ca01fd14777",onFocus:this.setInputFocus,onFocusOut:this.setInputFocusOut,onClick:this.clearInput}),this.showErrorMessage()&&(0,n.h)("exclamation-icon",{key:"f472bdc78a2b07aaa16ecdf0d9f30de27e7e2f68"}),(0,n.h)("span",{key:"bd05c2959487130d8a4ca9cfd83d91cc3a542da3",class:"input-phone__number__input__prefix",style:this.computedStyles},this.selectedCallingCode),(0,n.h)("input",{key:"d026b237ab1961e6d36abb461de41a916b263ced",style:this.computedStyles,id:`rcg-input-phone-${this.group}-${this.name}`,name:this.name,"aria-label":this.label,onInput:this.handleChange.bind(this),onFocus:this.setInputFocus.bind(this),onFocusout:this.setInputFocusOut.bind(this),placeholder:"text",ref:o=>this.textInput=o,class:"input-phone__number__input__field",type:"tel",required:this.required,pattern:this.pattern,maxLength:this.maxLength,minLength:this.minLength,onKeyPress:this.disallowLettersInput.bind(this),value:this._value?this._value.phoneNumber:"",autocomplete:this.autocomplete})),(0,n.h)("label",{key:"6995c62265f561dbf014cad000b698bb827edf82",class:`input-phone__number__label\n              ${this.focused?"input-phone__number__label--focus":""}\n              ${this.showErrorMessage()?"input-phone__number__label--error":""}`,htmlFor:`rcg-input-phone-${this.group}-${this.name}`},this.label))),this.showErrorMessage()&&(0,n.h)("input-error",{key:"8a27930ff494bc9339389e709007a41092d227cb",errorMessage:this.errorMessage}))}get el(){return(0,n.a)(this)}static get watchers(){return{submitted:["watchSubmittedHandler"]}}};return h.style={celebrity:'.input-phone__number__input__field{position:relative;top:23px;color:#131516;caret-color:#131516;font-size:16px;font-weight:700;width:100%;border:none;outline:none;line-height:20px;letter-spacing:0.15px}:host{width:100%;outline:none;--input-font-size:16px}.input-phone{height:56px;border:1px solid #B4BAC0;border-radius:4px;background-color:#ffffff;display:flex;margin-bottom:12px;position:relative}.input-phone ::placeholder{color:transparent}.input-phone ::-ms-input-placeholder{color:transparent}.input-phone{border:1px solid #B4BAC0}.input-phone-celebrity.input-phone--focus{border-color:#2588CD}.input-phone.input-phone--error{border-color:#e40f2f}.input-phone--focus{border-color:#006AF4}.input-phone--disable-border{border-width:0}.input-phone--readonly{pointer-events:none}.input-phone__number{padding:3px 9px;display:flex;flex-direction:column;width:80%}.input-phone__number__label{position:relative;bottom:24px;color:#555F61;font-size:14px;font-weight:400;padding-top:1.6rem;transition:all 0.3s ease;line-height:20px;letter-spacing:0.15px}.input-phone__number__label--float{font-size:12px;opacity:1;line-height:16px;letter-spacing:0.15px}.input-phone__number__label--error{color:#e40f2f}.input-phone__number__label--focus{font-weight:400;opacity:1}.input-phone__number__label{font-size:12px;padding-top:7px}.input-phone__number__label--error{color:var(--error-color-sign-in, #e40f2f)}.input-phone__number__label--focus{font-size:12px;opacity:1;padding-top:10px}.input-phone__number__label--selected{display:block;transform:translateY(-4px);font-size:12px;padding-top:10px}.input-phone__number__input__field{top:24px;width:80%}@keyframes cdk-text-field-autofill-color-royal{to{background:transparent;color:#131516}}.input-phone__number__input__field.cdk-text-field-autofill-monitored:-webkit-autofill{animation-fill-mode:both;animation-name:cdk-text-field-autofill-start, cdk-text-field-autofill-color-royal !important}.input-phone__number__input__field{font-size:var(--input-font-size)}.input-phone__number__input__prefix{position:relative;top:24px;color:#555f61;padding-right:2px;font-size:var(--input-font-size)}.input-phone__number__input__clear{position:absolute;right:14px;top:20px;background-color:rgba(85, 95, 97, 0.5);border:none;height:20px;width:20px;border-radius:100%;outline:none;text-align:center;font-weight:bold;z-index:100;padding:2px;cursor:pointer}.input-phone__number__input__clear:hover{background-color:#6a7582}.input-phone__number__input__clear__icon{cursor:pointer}.input-phone__select{width:75px;padding-left:16px;
1background-color:rgba(237, 240, 244, 0.5019607843);border:none;appearance:none;color:transparent}.input-phone__select--royal{background-color:#006AF4;opacity:0.2}.input-phone__select--celebrity{background-color:#004275;opacity:0.2}.input-phone__select option{background-color:#ffffff;color:#555F61}.input-phone__trigger{position:absolute;top:19px;left:16px;font-weight:bold;font-size:16px;color:#131516}.input-phone__chevron::before{border-style:solid;border-width:0.09em 0.09em 0 0;content:"";height:0.3em;position:absolute;vertical-align:top;width:0.3em;top:23px;left:57px;color:#555f61;transform:rotate(135deg)}.input-phone--error{margin-bottom:4px}input-error{display:block;margin-bottom:12px}',royal:'.input-phone__number__input__field{position:relative;top:23px;color:#131516;caret-color:#131516;font-size:16px;font-weight:700;width:100%;border:none;outline:none;line-height:20px;letter-spacing:0.15px}:host{width:100%;outline:none;--input-font-size:16px}.input-phone{height:56px;border:1px solid #B4BAC0;border-radius:4px;background-color:#ffffff;display:flex;margin-bottom:12px;position:relative}.input-phone ::placeholder{color:transparent}.input-phone ::-ms-input-placeholder{color:transparent}.input-phone{border:1px solid #B4BAC0}.input-phone-celebrity.input-phone--focus{border-color:#2588CD}.input-phone.input-phone--error{border-color:#e40f2f}.input-phone--focus{border-color:#006AF4}.input-phone--disable-border{border-width:0}.input-phone--readonly{pointer-events:none}.input-phone__number{padding:3px 9px;display:flex;flex-direction:column;width:80%}.input-phone__number__label{position:relative;bottom:24px;color:#555F61;font-size:14px;font-weight:400;padding-top:1.6rem;transition:all 0.3s ease;line-height:20px;letter-spacing:0.15px}.input-phone__number__label--float{font-size:12px;opacity:1;line-height:16px;letter-spacing:0.15px}.input-phone__number__label--error{color:#e40f2f}.input-phone__number__label--focus{font-weight:400;opacity:1}.input-phone__number__label{font-size:12px;padding-top:7px}.input-phone__number__label--error{color:var(--error-color-sign-in, #e40f2f)}.input-phone__number__label--focus{font-size:12px;opacity:1;padding-top:10px}.input-phone__number__label--selected{display:block;transform:translateY(-4px);font-size:12px;padding-top:10px}.input-phone__number__input__field{top:24px;width:80%}@keyframes cdk-text-field-autofill-color-royal{to{background:transparent;color:#131516}}.input-phone__number__input__field.cdk-text-field-autofill-monitored:-webkit-autofill{animation-fill-mode:both;animation-name:cdk-text-field-autofill-start, cdk-text-field-autofill-color-royal !important}.input-phone__number__input__field{font-size:var(--input-font-size)}.input-phone__number__input__prefix{position:relative;top:24px;color:#555f61;padding-right:2px;font-size:var(--input-font-size)}.input-phone__number__input__clear{position:absolute;right:14px;top:20px;background-color:rgba(85, 95, 97, 0.5);border:none;height:20px;width:20px;border-radius:100%;outline:none;text-align:center;font-weight:bold;z-index:100;padding:2px;cursor:pointer}.input-phone__number__input__clear:hover{background-color:#6a7582}.input-phone__number__input__clear__icon{cursor:pointer}.input-phone__select{width:75px;padding-left:16px;background-color:rgba(237, 240, 244, 0.5019607843);border:none;appearance:none;color:transparent}.input-phone__select--royal{background-color:#006AF4;opacity:0.2}.input-phone__select--celebrity{background-color:#004275;opacity:0.2}.input-phone__select option{background-color:#ffffff;color:#555F61}.input-phone__trigger{position:absolute;top:19px;left:16px;font-weight:bold;font-size:16px;color:#131516}.input-phone__chevron::before{border-style:solid;border-width:0.09em 0.09em 0 0;content:"";height:0.3em;position:absolute;vertical-align:top;width:0.3em;top:23px;left:57px;color:#555f61;transform:rotate(135deg)}.input-phone--error{margin-bottom:4px}input-error{display:block;margin-bottom:12px}'},h})()}}]);

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.