/home/techb158/immovalet.com/vendor/tightenco/ziggy/dist
Edit: /home/techb158/immovalet.com/vendor/tightenco/ziggy/dist/vue.es.js (12963B)
function t(){return(t=Object.assign||function(t){for(var r=1;r
1;){var r=t.pop(),n=r.obj[r.prop];if(e(n)){for(var i=[],o=0;o=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?o+=i.charAt(u):s<128?o+=n[s]:s<2048?o+=n[192|s>>6]+n[128|63&s]:s<55296||s>=57344?o+=n[224|s>>12]+n[128|s>>6&63]+n[128|63&s]:(s=65536+((1023&s)<<10|1023&i.charCodeAt(u+=1)),o+=n[240|s>>18]+n[128|s>>12&63]+n[128|s>>6&63]+n[128|63&s])}return o},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,r){if(e(t)){for(var n=[],i=0;i-1?t.split(","):t},E=function(t,r,e,n){if(t){var i=e.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/g,u=e.depth>0&&/(\[[^[\]]*])/.exec(i),s=u?i.slice(0,u.index):i,f=[];if(s){if(!e.plainObjects&&m.call(Object.prototype,s)&&!e.allowPrototypes)return;f.push(s)}for(var a=0;e.depth>0&&null!==(u=o.exec(i))&&a=0;--o){var u,s=t[o];if("[]"===s&&e.parseArrays)u=[].concat(i);else{u=e.plainObjects?Object.create(null):{};var f="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,a=parseInt(f,10);e.parseArrays||""!==f?!isNaN(a)&&s!==f&&String(a)===f&&a>=0&&e.parseArrays&&a<=e.arrayLimit?(u=[])[a]=i:u[f]=i:u={0:i}}i=u}return i}(f,r,e,n)}};class S{constructor(t,r,e){var n;this.name=t,this.definition=r,this.bindings=null!=(n=r.bindings)?n:{},this.config=e}get template(){return`${this.config.absolute?this.definition.domain?`${this.config.url.match(/^\w+:\/\//)[0]}${this.definition.domain}${this.config.port?":"+this.config.port:""}`:this.config.url:""}/${this.definition.uri}`.replace(/\/+$/,"")}get parameterSegments(){var t,r;return null!=(t=null===(r=this.template.match(/{[^}?]+\??}/g))||void 0===r?void 0:r.map(t=>({name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)})))?t:[]}matchesUrl(t){if(!this.definition.methods.includes("GET"))return!1;const r=this.template.replace(/\/{[^}?]*\?}/g,"(/[^/?]+)?").replace(/{[^}]+}/g,"[^/?]+").replace(/^\w+:\/\//,"");return new RegExp(`^${r}$`).test(t.replace(/\/+$/,"").split("?").shift())}compile(t){return this.parameterSegments.length?this.template.replace(/{([^}?]+)\??}/g,(r,e)=>{var n;if([null,void 0].includes(t[e])&&this.parameterSegments.find(({name:t})=>t===e).required)throw new Error(`Ziggy error: '${e}' parameter is required for route '${this.name}'.`);return encodeURIComponent(null!=(n=t[e])?n:"")}).replace(/\/+$/,""):this.template}}class R extends String{constructor(r,e,n=!0,i){var o;if(super(),this.t=null!=(o=null!=i?i:Ziggy)?o:null===globalThis||void 0===globalThis?void 0:globalThis.Ziggy,this.t=t({},this.t,{absolute:n}),r){if(!this.t.routes[r])throw new Error(`Ziggy error: route '${r}' is not in the route list.`);this.i=new S(r,this.t.routes[r],this.t),this.u=this.s(e)}}toString(){const r=Object.keys(this.u).filter(t=>!this.i.parameterSegments.some(({name:r})=>r===t)).filter(t=>"_query"!==t).reduce((r,e)=>t({},r,{[e]:this.u[e]}),{});return this.i.compile(this.u)+function(t,r){var e,n=t,i=function(t){if(!t)return b;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var r=t.charset||b.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=a.default;if(void 0!==t.format){if(!c.call(a.formatters,t.format))throw new TypeError("Unknown format option provided.");e=t.format}var n=a.formatters[e],i=b.filter;return("function"==typeof t.filter||h(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:b.addQueryPrefix,allowDots:void 0===t.allowDots?b.allowDots:!!t.allowDots,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:b.charsetSentinel,delimiter:void 0===t.delimiter?b.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:b.encode,encoder:"function"==typeof t.encoder?t.encoder:b.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:b.encodeValuesOnly,filter:i,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:b.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:b.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:b.strictNullHandling}}(r);"function"==typeof i.filter?n=(0,i.filter)("",n):h(i.filter)&&(e=i.filter);var o=[];if("object"!=typeof n||null===n)return"";var u=l[r&&r.arrayFormat in l?r.arrayFormat:r&&"indices"in r?r.indices?"indices":"repeat":"indices"];e||(e=Object.keys(n)),i.sort&&e.sort(i.sort);for(var s=0;s0?v+d:""}(t({},r,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:(t,r)=>"boolean"==typeof t?Number(t):r(t)})}current(t,r){const e=this.t.absolute?this.l().host+this.l().pathname:this.l().pathname.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"),[n,i]=Object.entries(this.t.routes).find(([r,n])=>new S(t,n,this.t).matchesUrl(e))||[void 0,void 0];if(!t)return n;const o=new RegExp(`^${t.replace(".","\\.").replace("*",".*")}$`).test(n);if([null,void 0].includes(r)||!o)return o;const u=new S(n,i,this.t);r=this.s(r,u);const s=this.h(i);return!(!Object.values(r).every(t=>!t)||Object.values(s).length)||Object.entries(r).every(([t,r])=>s[t]==r)}l(){var t,r,e,n,i,o;const{host:u="",pathname:s="",search:f=""}="undefined"!=typeof window?window.location:{};return{host:null!=(t=null===(r=this.t.location)||void 0===r?void 0:r.host)?t:u,pathname:null!=(e=null===(n=this.t.location)||void 0===n?void 0:n.pathname)?e:s,search:null!=(i=null===(o=this.t.location)||void 0===o?void 0:o.search)?i:f}}get params(){return this.h(this.t.routes[this.current()])}has(t){return Object.keys(this.t.routes).includes(t)}s(r={},e=this.i){r=["string","number"].includes(typeof r)?[r]:r;const n=e.parameterSegments.filter(({name:t})=>!this.t.defaults[t]);return Array.isArray(r)?r=r.reduce((r,e,i)=>t({},r,n[i]?{[n[i].name]:e}:{[e]:""}),{}):1!==n.length||r[n[0].name]||!r.hasOwnProperty(Object.values(e.bindings)[0])&&!r.hasOwnProperty("id")||(r={[n[0].name]:r}),t({},this.p(e),this.v(r,e.bindings))}p(r){return r.parameterSegments.filter(({name:t})=>this.t.defaults[t]).reduce((r,{name:e},n)=>t({},r,{[e]:this.t.defaults[e]}),{})}v(r,e={}){return Object.entries(r).reduce((r,[n,i])=>{if(!i||"object"!=typeof i||Array.isArray(i)||"_query"===n)return t({},r,{[n]:i});if(!i.hasOwnProperty(e[n])){if(!i.hasOwnProperty("id"))throw new Error(`Ziggy error: object passed as '${n}' parameter is missing route model binding key '${e[n]}'.`);e[n]="id"}return t({},r,{[n]:i[e[n]]})},{})}h(r){var e;let n=this.l().pathname.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"");const i=(r,e="",n)=>{const[i,o]=[r,e].map(t=>t.split(n));return o.reduce((r,e,n)=>/^{[^}?]+\??}$/.test(e)&&i[n]?t({},r,{[e.replace(/^{|\??}$/g,"")]:i[n]}):r,{})};return t({},i(this.l().host,r.domain,"."),i(n,r.uri,"/"),function(t,r){var e=O;if(""===t||null==t)return e.plainObjects?Object.create(null):{};for(var n="string"==typeof t?function(t,r){var e,n={},i=(r.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(r.delimiter,Infinity===r.parameterLimit?void 0:r.parameterLimit),u=-1,s=r.charset;if(r.charsetSentinel)for(e=0;e-1&&(a=j(a)?[a]:a),n[f]=m.call(n,f)?o.combine(n[f],a):a}return n}(t,e):t,i=e.plainObjects?Object.create(null):{},u=Object.keys(n),s=0;st.mixin({methods:{route:(t,e,n,i=r)=>function(t,r,e,n){const i=new R(t,r,e,n);return t?i.toString():i}(t,e,n,i)}})};export{k as ZiggyVue};