{ "version": 3, "sources": ["../crates/web-assets/assets/elements/oswilno-price.js", "../crates/web-assets/assets/css.js", "../crates/web-assets/assets/elements/oswilno-error.js", "../crates/web-assets/assets/elements/oswilno-parking-space-rents.js", "../crates/web-assets/assets/elements/oswilno-parking-space-rent.js", "../crates/web-assets/assets/elements/oswilno-parking-space.js", "../crates/web-assets/assets/elements/oswilno-parking-space-location.js", "../crates/web-assets/assets/app.js"], "sourcesContent": ["customElements.define('oswilno-price', class extends HTMLElement {\n\t//constructor() {\n\t//\tsuper();\n\t//\tthis.attachShadow({ mode: 'open' });\n\t//}\n\t//connectedCallback() {\n\t//\tlet shadow = this.shadowRoot;\n\t//\tlet price = parseInt(this.getAttribute('price'));\n\t//\tif (isNaN(price)) price = 0;\n\t//\tconst multiplier = parseInt(this.getAttribute('multiplier'));\n\t//\tlet major = price;\n\t//\tlet minor = 0;\n\t//\tif (!isNaN(multiplier)) {\n\t//\t\tmajor = Math.floor(price / multiplier);\n\t//\t\tminor = price % multiplier;\n\t//\t}\n\t//\tconst currency = this.getAttribute('currency') || 'PLN';\n\t//\tshadow.innerHTML = `
${major}.${minor >= 10 ? minor : minor + '0'} ${ currency }
`;\n\t//}\n});\n", "export const copyCss = (shadow) => {\n\tlet css = '';\n\tfor (let i = 0; i < document.styleSheets.length; i++) {\n\t\tconst styleSheet = document.styleSheets[i];\n\t\tfor (let j = 0; j < styleSheet.rules.length; j++) {\n\t\t\tcss += styleSheet.rules[j].cssText;\t\n\t\t}\n\t}\n\tconst sheet = new CSSStyleSheet();\n\tsheet.replaceSync(css);\n\tshadow.adoptedStyleSheets = [sheet];\n};\n", "import { copyCss } from \"../css.js\";\n\ncustomElements.define('oswilno-error', class extends HTMLElement {\n\tconstructor() {\n\t\tsuper();\n\t\tconst shadow = this.attachShadow({ mode: 'open' });\n\t\tshadow.innerHTML = `\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t`;\n\t\tcopyCss(shadow);\n\t}\n});\n", "customElements.define('oswilno-parking-space-rents', class extends HTMLElement {\n\t// constructor() {\n\t// \tsuper();\n\t// \tconst shadow = this.attachShadow({ mode: 'open' });\n\t// \tshadow.innerHTML = `\n\t// \t\t\n\t// \t\t
\n // \n\t// \t\t
\n\t// \t`;\n\t// }\n});\n\n", "customElements.define('oswilno-parking-space-rent', class extends HTMLElement {\n\t// constructor() {\n\t// \tsuper();\n\t// \tconst shadow = this.attachShadow({ mode: 'open' });\n\t// \tshadow.innerHTML = `\n\t// \t\t\n\t// \t\t
\n // \n\t// \t\t
\n\t// \t`;\n // this.classList = \"w-[48%] p-4 bg-white border border-white-200 rounded-lg shadow sm:p-8 dark:bg-white-800 dark:border-white-700 mt-6\";\n\t// }\n});\n", "customElements.define('oswilno-parking-space', class extends HTMLElement {\n // static get observedAttibutes() { return 'spot'; }\n\t// constructor() {\n\t// \tsuper();\n\t// \tconst shadow = this.attachShadow({ mode: 'open' });\n\t// \tshadow.innerHTML = `\n\t// \t\t\n\t// \t\t
\n //
\n // \n\t// \t\t
\n\t// \t`;\n // this.render();\n\t// }\n // render() {\n // const spot = this.getAttribute('spot');\n // this.shadowRoot.textContent = `${spot}`;\n // }\n});\n", "customElements.define('oswilno-parking-space-location', class extends HTMLElement {\n // static get observedAttributes() { return 'name stage number'.split(' '); }\n\n\t// constructor() {\n\t// \tsuper();\n\t// \tconst shadow = this.attachShadow({ mode: 'open' });\n\t// \tshadow.innerHTML = `\n\t// \t\t\n\t// \t\t
\n //
\n\t// \t\t
\n // \n\t// \t\t
\n\t// \t`;\n\t// }\n\n // get name() { return this.getAttribute('name'); }\n // set name(s) { this.setAttribute('name',s); }\n // get stage() { return this.getAttribute('stage'); }\n // set stage(s) { this.setAttribute('stage',s); }\n // get number() { return this.getAttribute('number'); }\n // set number(s) { this.setAttribute('number',s); }\n\n\t// connectedCallback() { this.render(); }\n\n // attributeChangedCallback(name, oV, nV) { console.log({name,oV,nV}); this.render(); }\n\n // render() {\n\t// \tconst view = this.shadowRoot.querySelector('#view');\n // const { name, stage, number } = this;\n // view.innerHTML = `\n // ${name}\n // ${number}\n // ${stage}\n // `;\n // }\n});\n", "import './elements/oswilno-price.js';\nimport './elements/oswilno-error.js';\nimport './elements/oswilno-parking-space-rents.js';\nimport './elements/oswilno-parking-space-rent.js';\nimport './elements/oswilno-parking-space.js';\nimport './elements/oswilno-parking-space-location.js';\n\nimport(\"https://unpkg.com/htmx.org@1.9.4/dist/htmx.min.js\");\n\nconst READ_AUTH_HEADER = 'Authorization';\nconst AUTH_HEADER = 'ACX-Authorization';\nconst REFRESH_HEADER = 'ACX-Refresh';\nconst body = document.body;\nbody.addEventListener('htmx:beforeOnLoad', function (evt) {\n\tconst detail = evt.detail;\n\tconst xhr = detail.xhr;\n\tconst status = xhr.status;\n\tconst successful = detail.successful;\n\n\tif (status === 200) {\n\t\tconst bearer = xhr.getResponseHeader(READ_AUTH_HEADER);\n\t\tif (bearer) {\n\t\t\tconsole.log(xhr);\n\t\t\tlocalStorage.setItem('jwt', bearer.replace(/^Bearer /i, ''));\n\t\t}\n\t\tconst refresh = xhr.getResponseHeader(REFRESH_HEADER);\n\t\tif (refresh) {\n\t\t\tlocalStorage.setItem('refresh', bearer.replace(/^Bearer /i, ''));\n\t\t}\n\t} else if (status === 401) {\n\t\tlocalStorage.removeItem('jwt');\n\t}\n\tif (status === 422 || status === 400) {\n\t\tdetail.shouldSwap = true;\n\t\tdetail.isError = false;\n\t}\n});\nbody.addEventListener('htmx:configRequest', function (evt) {\n\tif (!localStorage.getItem('jwt')) {\n\t\treturn;\n\t}\n\tevt.detail.headers[AUTH_HEADER] = 'Bearer ' + (localStorage.getItem('jwt') || '');\n\tevt.detail.headers[READ_AUTH_HEADER] = 'Bearer ' + (localStorage.getItem('jwt') || '');\n\tevt.detail.headers[REFRESH_HEADER] = (localStorage.getItem('refresh') || '');\n});\n\n"], "mappings": "0sBAAA,eAAe,OAAO,gBAAiB,cAAc,WAAY,CAmBjE,CAAC,ECnBM,IAAMA,EAAWC,GAAW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BA,IAAW,KAAOA,IAAW,OAChCF,EAAO,WAAa,GACpBA,EAAO,QAAU,GAEnB,CAAC,EACDF,EAAK,iBAAiB,qBAAsB,SAAUC,EAAK,CACrD,aAAa,QAAQ,KAAK,IAG/BA,EAAI,OAAO,QAAQH,CAAW,EAAI,WAAa,aAAa,QAAQ,KAAK,GAAK,IAC9EG,EAAI,OAAO,QAAQJ,CAAgB,EAAI,WAAa,aAAa,QAAQ,KAAK,GAAK,IACnFI,EAAI,OAAO,QAAQF,CAAc,EAAK,aAAa,QAAQ,SAAS,GAAK,GAC1E,CAAC", "names": ["copyCss", "shadow", "css", "i", "styleSheet", "j", "sheet", "shadow", "copyCss", "READ_AUTH_HEADER", "AUTH_HEADER", "REFRESH_HEADER", "body", "evt", "detail", "xhr", "status", "successful", "bearer"] }