You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
main
${ noResults }
1 line
37 KiB
Plaintext
1 line
37 KiB
Plaintext
(()=>{var e,t,a={420:()=>{window.wteL10n=window.wteL10n||{},window.wteL10n.api=window.wteapi=window.WTEApi=class{constructor(){}static async get(e,t={},a={}){let n={packages:this.getPackages,categories:this.getPackageCategories,trip:this.getTrip};return wteL10n.locale&&(t.lang=wteL10n.locale),this[e]||(this[e]="trip"==e?await n[e](t,a):lodash.keyBy(await n[e](t,a),"id")),this[e]}static async getTrip(e,t){const a=await fetch(`${wteL10n.wpapi.root+wteL10n.wpapi.versionString}trip/${e.id}?context=${e.context||"view"}`,t);return await a.json()}static async getPackageCategories(e){const t=await fetch(`${wteL10n.wpapi.root+wteL10n.wpapi.versionString}package-categories?per_page=100`);return await t.json()}static async getPackages(e,t){var a;const n=Object.entries(e).map((([e,t])=>`${e}=${t}`)).join("&"),i=await fetch(`${wteL10n.wpapi.root+wteL10n.wpapi.versionString}packages/${null!==(a=e.id)&&void 0!==a?a:`?${n}`}`,t);return await i.json()}static async addNewPackage(e){const t=await fetch(`${wteL10n.wpapi.root+wteL10n.wpapi.versionString}packages`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wteL10n.wpapi.nonce},body:JSON.stringify({title:"Untitled Package",status:"publish",post_type:"trip-packages",...e})});return await t.json()}static async removePackage(e){const t=await fetch(`${wteL10n.wpapi.root+wteL10n.wpapi.versionString}packages/${e.id}`,{method:"DELETE",headers:{"Content-Type":"application/json","X-WP-Nonce":wteL10n.wpapi.nonce}});return await t.json()}}},1778:(e,t,a)=>{"use strict";function n(){}a.d(t,{A:()=>i}),n.hasClass=function(e,t){return e.classList?e.classList.contains(t):!!e.getAttribute("class").match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},n.addClass=function(e,t){var a=t.split(" ");e.classList?e.classList.add(a[0]):n.hasClass(e,a[0])||e.setAttribute("class",e.getAttribute("class")+" "+a[0]),a.length>1&&n.addClass(e,a.slice(1).join(" "))},n.removeClass=function(e,t){var a=t.split(" ");if(e.classList)e.classList.remove(a[0]);else if(n.hasClass(e,a[0])){var i=new RegExp("(\\s|^)"+a[0]+"(\\s|$)");e.setAttribute("class",e.getAttribute("class").replace(i," "))}a.length>1&&n.removeClass(e,a.slice(1).join(" "))},n.toggleClass=function(e,t,a){a?n.addClass(e,t):n.removeClass(e,t)},n.setAttributes=function(e,t){for(var a in t)e?.setAttribute&&e.setAttribute(a,t[a])},n.getChildrenByClassName=function(e,t){e.children;for(var a=[],i=0;i<e.children.length;i++)n.hasClass(e.children[i],t)&&a.push(e.children[i]);return a},n.getIndexInArray=function(e,t){return Array.prototype.indexOf.call(e,t)},n.on=function(e,t,a){document.addEventListener(e,(function(e){for(var n=e.target;n&&n!=this;n=n.parentNode)if(n.matches(t)){a.call(n,e);break}}),!1)};const i=n},3051:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=()=>{new MutationObserver((()=>{const e=document.querySelectorAll(".wpte-material-ui-input-control");e&&e.forEach((e=>{const t=e.querySelector('input:not([type="hidden"])')||e.querySelector("select")||e.querySelector("textarea");((e,t)=>{e.value?t.classList.add("focus"):t.classList.remove("focus")})(t,e),"date"===t.type?e.classList.add("focus"):(t.addEventListener("blur",(()=>{t.value?e.classList.add("focus"):e.classList.remove("focus")})),t.addEventListener("focus",(()=>{e.classList.add("focus")})))}))})).observe(document.body,{childList:!0,subtree:!0})}},4126:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});const n=function(e){const t=e.querySelectorAll(".tab-anchor-wrapper");t&&Array.from(t).forEach((function(a){a.querySelector(".nb-tab-trigger").addEventListener("click",(function(n){n.preventDefault(),Array.from(t).forEach((e=>{e.classList.remove("nav-tab-active");let t=e.querySelector(".nb-tab-trigger");t.classList.remove("nav-tab-active");let a=document.getElementById(`nb-${t.dataset.configuration}-configurations`);a&&(a.style.display="none")}));let i=this.dataset.target,o=null;o=i?document.getElementById(i):document.getElementById(`nb-${this.dataset.configuration}-configurations`),a.classList.toggle("nav-tab-active"),this.classList.toggle("nav-tab-active"),"block"===o.style.display?o.style
|