PageSourceSearch

https://www.hotelkansascity.net/new/designs/22/build/6307.7761c96314cef4c31685.js

js hotelkansascity.net collected 2026-10-10 01:15:01 UTC 17,839 bytes, 1 lines download raw bytes

1(self.webpackChunklib=self.webpackChunklib||[]).push([[1545,3161,3710,3926,6307,8688],{96307:(e,t,i)=>{"use strict";var s=i(23161),o=i(70046),r=document.querySelectorAll(".js-open-contact-us-modal");(0,o.A)(r,"click",(()=>{var e=new s.default(".js-contact-us-modal-2",{selectors:{close:".js-modal-close-2",content:".js-modal-content-2"}});r.forEach((t=>{t.addEventListener("click",(()=>e.show()))})),e.show(),travel.modals&&travel.modals.add("contact-us-modal",e)}));var n=i(78857),l={required:e=>!!e&&!!e.toString().trim().length,email:e=>/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)i/.test(e)};class a extends n.A{constructor(e){if(super(),this.form=e instanceof HTMLElement?e:document.querySelector(e),!this.form)throw new Error("ValidateForm: param form(element or selector) is required");this.touch=!1,this.form.addEventListener("input",this.revalidation.bind(this),{passive:!0}),this.form.addEventListener("change",this.revalidation.bind(this),{passive:!0})}validation(){this.touch=!0;var e=Object.keys(this.rules).reduce(((e,t)=>(e[t]=this.rules[t](this.form[t].value),e)),{});return this.showErrors(e),!Object.values(e).filter((e=>!e)).length}showErrors(e){Object.keys(e).forEach((t=>{var i=this.form[t]instanceof NodeList?[...this.form[t]]:[this.form[t]];e[t]?i.forEach((e=>e.classList.remove("invalid"))):i.forEach((e=>e.classList.add("invalid")))}))}revalidation(e){if(this.touch){var t=e.target;if(this.rules[t.name]){var i=this.rules[t.name](t.value);this.showErrors({[t.name]:i})}}}}const d=a;function c(e,t,i,s,o,r,n){try{var l=e[r](n),a=l.value}catch(e){return void i(e)}l.done?t(a):Promise.resolve(a).then(s,o)}function h(e){return function(){var t=this,i=arguments;return new Promise((function(s,o){var r=e.apply(t,i);function n(e){c(r,s,o,n,l,"next",e)}function l(e){c(r,s,o,n,l,"throw",e)}n(void 0)}))}}const u=class extends d{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.options=t,this.init()}init(){this.initValidation(),this.initSubmit()}initValidation(){this.rules={f_name:l.required,f_email:e=>l.required(e)&&l.email(e),f_subject:l.required,f_message:l.required}}initSubmit(){this.form.addEventListener("submit",this.submit.bind(this))}submit(e){var t=this;return h((function*(){if(e.preventDefault(),t.validation()){t.emit("loading");try{yield t.sendForm(),t.emit("success")}
1catch(e){throw t.emit("error"),new Error("Fail to submit contact form. ".concat(e))}}}))()}sendForm(){var e=this;return h((function*(){var t=new FormData(e.form);t.append("page","contact"),t.append("type","ajax");var i=yield fetch("/",{method:"POST",body:t});if(!(yield i.json()).success)throw new Error('ContactUs: response property "success" is false')}))()}resetForm(){this.touch=!1,this.form.reset()}};var p=i(1038),v=i.n(p),f=document.querySelector(".js-contact-us-form");new(v())(f.querySelector("#f_subject"));var g=new u(f),m={hide:()=>{f.dataset.status=""},show:e=>{m.hide(),f.dataset.status=e}};g.on("loading",(()=>{var e;f&&"first-screen-trigger"===f.dataset.eventSource&&(null===(e=travel.events)||void 0===e||null===(e=e.contactUsFirstScreenPopup)||void 0===e||e.send("send-btn"));m.show("loading")})),g.on("success",(()=>{m.hide(),m.show("success"),g.resetForm(),setTimeout((()=>m.hide()),3e3)})),g.on("error",(()=>{m.hide(),m.show("error"),setTimeout((()=>m.hide()),3e3)}))},23161:(e,t,i)=>{"use strict";i.d(t,{default:()=>n});var s=i(23710);function o(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function r(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class n extends s.default{constructor(e){var{trigger:t="",toggleClass:i,selectors:s,hideOnBackdrop:n=!0,lockScroll:l=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,{target:e,toggleClass:i}),this.selectors=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?o(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({close:".js-popup-close",content:".js-popup-content"},s),this.callbacks={show:()=>this.show(),hide:()=>this.hide(),clickBackdropHandler:e=>this._clickBackdropHandler(e)},this.lockScroll=l,this.initCloseBtn(),n&&this.initHideOnClickOutSide()}initCloseBtn(){this._closeTriggers=[...this.target.querySelectorAll(this.selectors.close)],this._closeTriggers.forEach((e=>e.addEventListener("click",this.callbacks.hide)))}initHideOnClickOutSide(){this.target.addEventListener("click",this.callbacks.clickBackdropHandler)}_clickBackdropHandler(e){e.target.matches(this.selectors.content)||e.target.closest(this.selectors.content)||this.hide()}show(){this.lockScroll&&(document.body.style.overflow="hidden"),super.show()}hide(){this.lockScroll&&(document.body.style.overflow="auto"),super.hide()}destroy(){super.destroy(),this._closeTriggers.forEach((e=>e.removeEventListener("click",this.callbacks.hide))),this.target.removeEventListener("click",this.callbacks.clickBackdropHandler)}}},23710:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ToggleWithScroll:()=>l,ToggleWithSmooth:()=>a,default:()=>d});var s=i(78857),o=i(80951),r=i(20041);class n extends s.A{constructor(e){var t,i,s,{target:r,toggleClass:n="active"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this.toggleClass=n,e&&(this.trigger=(0,o.XF)(e));var l=(0,o.XF)(r);if(this.target=l||document.querySelector(null===(t=this.trigger)||void 0===t?void 0:t.dataset.target),!this.target)throw new Error("Error in Toggle. Cannot find target with selector ".concat(r," or data-attribute ").
1concat(null===(i=this.trigger)||void 0===i?void 0:i.dataset.target));this._clickListener=e=>{e.currentTarget.blur(),this.toggle()},null===(s=this.trigger)||void 0===s||s.addEventListener("click",this._clickListener)}get active(){return this.target.classList.contains(this.toggleClass)}toggle(){this.target.classList.contains(this.toggleClass)?this.hide():this.show()}hide(){var e;this.target.classList.remove(this.toggleClass),null===(e=this.trigger)||void 0===e||e.classList.remove("active"),this.emit("hide")}show(){var e;this.target.classList.add(this.toggleClass),null===(e=this.trigger)||void 0===e||e.classList.add("active"),this.emit("show")}destroy(){var e;null===(e=this.trigger)||void 0===e||e.removeEventListener("click",this._clickListener)}}class l extends n{constructor(e){super(e)}toggle(){super.toggle(),this._scrollToViewport()}_scrollToViewport(){var e=document.body.getBoundingClientRect().top,t=this.target.getBoundingClientRect().top-e-150;window.scrollTo({top:t,behavior:"smooth"})}}class a extends n{constructor(e,t){var{target:i,toggleClass:s,defaultHeight:o=0,transitionTime:n="0.5s"}=t;super(e,{target:i,toggleClass:s}),this.defaultHeight=o,this.transitionTime=n,(0,r.Dk)(this.target,{maxHeight:this.target.scrollHeight+"px",overflow:"hidden",transition:"max-height "+this.transitionTime})}show(){super.show(),this.target.style.maxHeight=this.target.scrollHeight+"px"}hide(){super.hide(),this.target.style.maxHeight=this.defaultHeight+"px"}}const d=n},70046:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});const s=(e,t,i)=>{var s=e instanceof NodeList?e:document.querySelectorAll(e),o=e=>{i(e),r()},r=()=>{s.forEach((e=>e.removeEventListener(t,o)))};s.forEach((e=>e.addEventListener(t,o)))}},20041:(e,t,i)=>{"use strict";i.d(t,{Dk:()=>o,ME:()=>r});var s=i(80951),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,s.XF)(e);if(!i)throw new Error("Error in addCss: Such element doesn't exist.");Object.assign(i.style,t)},r=e=>{var t=document.documentElement;return getComputedStyle(t).getPropertyValue(e).trim()}},1038:e=>{var t;self,t=()=>(()=>{"use strict";var e={d:(t,i)=>{for(var s in i)e.o(i,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:i[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function i(e){var t=document.createEvent("MouseEvents");t.initEvent("click",!0,!1),e.dispatchEvent(t)}function s(e){var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1),e.dispatchEvent(t)}function o(e){var t=document.createEvent("FocusEvent");t.initEvent("focusin",!0,!1),e.dispatchEvent(t)}function r(e){var t=document.createEvent("FocusEvent");t.initEvent("focusout",!0,!1),e.dispatchEvent(t)}function n(e){var t=document.createEvent("UIEvent");t.initEvent("modalclose",!0,!1),e.dispatchEvent(t)}function l(e,t){"invalid"==t?(c(this.dropdown,"invalid"),h(this.dropdown,"valid")):(c(this.dropdown,"valid"),h(this.dropdown,"invalid"))}function a(e,t){return null!=e[t]?e[t]:e.getAttribute(t)}function d(e,t){return!!e&&e.classList.contains(t)}function c(e,t){if(e)return e.classList.add(t)}function h(e,t){if(e)return e.classList.remove(t)}e.r(t),e.d(t,{bind:()=>v,default:()=>p});var u={data:null,searchable:!1,showSelectedItems:!1};function p(e,t){this.el=e,this.config=Object.assign({},u,t||{}),this.data=this.config.data,this.selectedOptions=[],this.placeholder=a(this.el,"placeholder")||this.config.placeholder||"Select an option",this.searchtext=a(this.el,"searchtext")||this.config.searchtext||"Search",this.selectedtext=a(this.el,"selectedtext")||this.config.selectedtext||"selected",this.dropdown=null,this.multiple=a(this.el,"multiple"),this.disabled=a(this.el,"disabled"),this.create()}function v(e,t){return new p(e,t)}return p.prototype.create=function(){this.el.style.opacity="0",this.el.style.width="0",this.el.style.padding="0",this.el.style.height="0",this.data?this.processData(this.data):this.extractData(),this.renderDropdown(),this.bindEvent()},p.prototype.processData=function(e){var t=[];e.forEach((e=>{t.push({data:e,attributes:{selected:!!e.selected,disabled:!!e.disabled,optgroup:"optgroup"==e.value}})})),this.options=t},p.prototype.extractData=function(){var e=this.el.querySelectorAll("option,optgroup"),t=[],i=[],s=[];e.forEach((e=>{if("OPTGROUP"==e.tagName)var s={text:e.label,value:"optgroup"};else{let t=e.innerText;null!=e.dataset.display&&(t=e.dataset.display),s={text:t,value:e.value,selected:null!=e.getAttribute("selected"),disabled:null!=e.getAttribute("disabled")}}var o={selected:null!=e.getAttribute("selected"),disabled:null!=e.getAttribute("disabled"),optgroup:"OPTGROUP"==e.tagName};t.push(s),i.push({data:s,attributes:o})})),this.data=t,this.options=i,this.options.forEach((e=>{e.attributes.selected&&s.push(e)})),this.selectedOptions=s},p.prototype.renderDropdown=function(){var e=["nice-select",a(this.el,"class")||"",this.disabled?"disabled":"",this.multiple?"has-multiple":""];let t='<div class="nice-select-search-box">';t+=`<input type="text" class="nice-select-search" placeholder="${this.searchtext}..." title="search"/>`,t+="</div>";var i=`<div class="${e.join(" ")}" tabindex="${this.disabled?null:0}">`;i+=`<span class="${this.multiple?"multiple-options":"current"}"></span>`,i+='<div class="nice-select-dropdown">',i+=`${this.config.searchable?t:""}`,i+='<ul class="list"></ul>',i+="</div>",i+="</div>",this.el.insertAdjacentHTML("afterend",i),this.dropdown=this.el.nextElementSibling,this._renderSelectedItems(),this._renderItems()},p.prototype._renderSelectedItems=function(){if(this.multiple){var e="";this.config.showSelectedItems||this.config.showSelectedItems||"auto"==window.getComputedStyle(this.dropdown).width||this.selectedOptions.length<2?(this.selectedOptions.forEach((function(t){e+=`<span class="current">${t.data.text}</span>`})),e=""==e?this.placeholder:e):e=this.selectedOptions.length+" "+this.selectedtext,this.dropdown.querySelector(".multiple-options").innerHTML=e}else{var t=this.selectedOptions.length>0?this.selectedOptions[0].data.text:this.placeholder;this.dropdown.querySelector(".current").innerHTML=t}},p.prototype._renderItems=function(){var e=this.dropdown.querySelector("ul");this.options.forEach((t=>{e.appendChild(this._renderItem(t))}))},p.prototype._renderItem=function(e){var t=document.createElement("li");if(t.innerHTML=e.data.text,e.attributes.optgroup)c(t,"optgroup");else{t.setAttribute("data-value",e.data.value);var i=["option",e.attributes.selected?"selected":null,e.attributes.disabled?"disabled":null];t.addEventListener("click",this._onItemClicked.bind(this,e)),t.classList.add(...i)}return e.element=t,t},p.prototype.update=function(){if(this.extractData(),this.dropdown){var e=d(this.dropdown,"open");this.dropdown.parentNode.removeChild(this.dropdown),this.create(),e&&i(this.dropdown)}a(this.el,"disabled")?this.disable():this.enable()},p.prototype.disable=function(){this.disabled||(this.disabled=!0,c(this.dropdown,"disabled"))},p.prototype.enable=function(){this.disabled&&(this.disabled=!1,h(this.dropdown,"disabled"))},p.prototype.clear=function(){this.resetSelectValue(),this.selectedOptions=[],this._renderSelectedItems(),this.update(),s(this.el)},p.prototype.destroy=function(){this.dropdown&&(this.dropdown.parentNode.removeChild(this.dropdown),this.el.style.display="")},p.prototype.bindEvent=function(){this.dropdown.addEventListener("click",this._onClicked.bind(this)),this.dropdown.addEventListener("keydown",this._onKeyPressed.bind(this)),this.dropdown.addEventListener("focusin",o.bind(this,this.el)),this.dropdown.addEventListener("focusout",r.bind(this,this.el)),this.el.addEventListener("invalid",l.bind(this,this.el,"invali
1d")),window.addEventListener("click",this._onClickedOutside.bind(this)),this.config.searchable&&this._bindSearchEvent()},p.prototype._bindSearchEvent=function(){var e=this.dropdown.querySelector(".nice-select-search");e&&e.addEventListener("click",(function(e){return e.stopPropagation(),!1})),e.addEventListener("input",this._onSearchChanged.bind(this))},p.prototype._onClicked=function(e){var t,i;if(e.preventDefault(),d(this.dropdown,"open")?this.multiple||(h(this.dropdown,"open"),n(this.el)):(c(this.dropdown,"open"),t=this.el,(i=document.createEvent("UIEvent")).initEvent("modalopen",!0,!1),t.dispatchEvent(i)),d(this.dropdown,"open")){var s=this.dropdown.querySelector(".nice-select-search");s&&(s.value="",s.focus());var o=this.dropdown.querySelector(".focus");h(o,"focus"),c(o=this.dropdown.querySelector(".selected"),"focus"),this.dropdown.querySelectorAll("ul li").forEach((function(e){e.style.display=""}))}else this.dropdown.focus()},p.prototype._onItemClicked=function(e,t){var i=t.target;d(i,"disabled")||(this.multiple?d(i,"selected")?(h(i,"selected"),this.selectedOptions.splice(this.selectedOptions.indexOf(e),1),this.el.querySelector(`option[value="${i.dataset.value}"]`).removeAttribute("selected")):(c(i,"selected"),this.selectedOptions.push(e)):(this.selectedOptions.forEach((function(e){console.log(e),h(e.element,"selected")})),c(i,"selected"),this.selectedOptions=[e]),this._renderSelectedItems(),this.updateSelectValue())},p.prototype.updateSelectValue=function(){if(this.multiple){var e=this.el;this.selectedOptions.forEach((function(t){var i=e.querySelector(`option[value="${t.data.value}"]`);i&&i.setAttribute("selected",!0)}))}else this.selectedOptions.length>0&&(this.el.value=this.selectedOptions[0].data.value);s(this.el)},p.prototype.resetSelectValue=function(){if(this.multiple){var e=this.el;this.selectedOptions.forEach((function(t){var i=e.querySelector(`option[value="${t.data.value}"]`);i&&i.removeAttribute("selected")}))}else this.selectedOptions.length>0&&(this.el.selectedIndex=-1);s(this.el)},p.prototype._onClickedOutside=function(e){this.dropdown.contains(e.target)||(h(this.dropdown,"open"),n(this.el))},p.prototype._onKeyPressed=function(e){var t=this.dropdown.querySelector(".focus"),s=d(this.dropdown,"open");if(13==e.keyCode)i(s?t:this.dropdown);else if(40==e.keyCode){if(s){var o=this._findNext(t);o&&(h(this.dropdown.querySelector(".focus"),"focus"),c(o,"focus"))}else i(this.dropdown);e.preventDefault()}else if(38==e.keyCode){if(s){var r=this._findPrev(t);r&&(h(this.dropdown.querySelector(".focus"),"focus"),c(r,"focus"))}else i(this.dropdown);e.preventDefault()}else if(27==e.keyCode&&s)i(this.dropdown);else if(32===e.keyCode&&s)return!1;return!1},p.prototype._findNext=function(e){for(e=e?e.nextElementSibling:this.dropdown.querySelector(".list .option");e;){if(!d(e,"disabled")&&"none"!=e.style.display)return e;e=e.nextElementSibling}return null},p.prototype._findPrev=function(e){for(e=e?e.previousElementSibling:this.dropdown.querySelector(".list .option:last-child");e;){if(!d(e,"disabled")&&"none"!=e.style.display)return e;e=e.previousElementSibling}return null},p.prototype._onSearchChanged=function(e){var t=d(this.dropdown,"open"),i=e.target.value;if(""==(i=i.toLowerCase()))this.options.forEach((function(e){e.element.style.display=""}));else if(t){var s=new RegExp(i);this.options.forEach((function(e){var t=e.data.text.toLowerCase(),i=s.test(t);e.element.style.display=i?"":"none"}))}this.dropdown.querySelectorAll(".focus").forEach((function(e){h(e,"focus")})),c(this._findNext(null),"focus")},t})(),e.exports=t()}}]);

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.