From 5a65a835630c9114a336e6427a4590e5c918bf9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Wed, 7 Apr 2021 16:36:27 +0200 Subject: [PATCH] remove old ssg dist dir --- test/.htaccess | 21 - test/authors/LiamHammett/index.html | 1 - test/authors/index.html | 1 - test/authors/reinink/index.html | 1 - test/authors/samuelstancl/index.html | 1 - test/authors/timacdonald87/index.html | 1 - test/css/app.css | 1059 ---- test/favicon.ico | 0 test/foo.txt | 1 - test/index.php | 55 - test/js/app.js | 4907 ----------------- test/mix-manifest.json | 4 - test/robots.txt | 2 - test/threads/1-rt-1-tip/index.html | 1 - test/threads/abc/index.html | 1 - test/threads/def/index.html | 1 - test/threads/index.html | 1 - .../laravel-clean-code-tactics/index.html | 1 - .../index.html | 90 - .../index.html | 92 - .../index.html | 90 - .../index.html | 90 - .../index.html | 91 - .../index.html | 87 - .../index.html | 86 - .../index.html | 88 - .../index.html | 91 - .../index.html | 89 - .../index.html | 89 - .../index.html | 88 - .../index.html | 87 - .../index.html | 89 - .../24-this-one-is-less-obscure/index.html | 91 - .../index.html | 89 - .../index.html | 87 - .../index.html | 88 - .../index.html | 89 - .../index.html | 89 - .../index.html | 90 - .../index.html | 91 - test/tips/avoid-helper-classes/index.html | 87 - .../index.html | 87 - test/tips/be-friends-with-your-ide/index.html | 86 - .../index.html | 86 - .../index.html | 88 - .../index.html | 88 - .../consider-using-form-requests/index.html | 87 - .../index.html | 87 - test/tips/context-matters/index.html | 87 - test/tips/create-action-classes/index.html | 87 - .../index.html | 86 - test/tips/create-fluent-objects/index.html | 87 - test/tips/create-helper-functions/index.html | 86 - .../index.html | 87 - .../index.html | 87 - .../index.html | 85 - test/tips/create-single-use-traits/index.html | 87 - .../index.html | 87 - .../index.html | 84 - .../index.html | 85 - .../index.html | 87 - .../index.html | 87 - .../index.html | 87 - test/tips/dont-use-abbreviations/index.html | 88 - .../index.html | 87 - .../eloquent-listeners-are-awesome/index.html | 86 - .../index.html | 87 - .../index.html | 85 - test/tips/extract-methods/index.html | 86 - .../index.html | 84 - .../index.html | 88 - .../index.html | 82 - .../index.html | 84 - .../index.html | 89 - .../index.html | 87 - .../index.html | 86 - test/tips/index.html | 959 ---- .../index.html | 86 - test/tips/its-about-the-micro/index.html | 84 - .../index.html | 88 - .../index.html | 86 - .../index.html | 88 - .../index.html | 87 - .../index.html | 87 - .../index.html | 86 - test/tips/this-one-is-less-obscure/index.html | 88 - .../index.html | 87 - .../index.html | 86 - .../index.html | 86 - test/tips/use-custom-collections/index.html | 86 - test/tips/use-custom-config-files/index.html | 86 - .../use-data-transfer-objects-dtos/index.html | 87 - .../index.html | 88 - test/tips/use-events/index.html | 87 - .../index.html | 87 - test/tips/use-short-operators/index.html | 86 - test/tips/use-strict-comparison/index.html | 87 - .../index.html | 80 - .../index.html | 87 - .../index.html | 80 - .../index.html | 86 - .../index.html | 80 - .../index.html | 86 - .../index.html | 86 - .../index.html | 86 - .../index.html | 86 - .../index.html | 86 - .../index.html | 87 - test/web.config | 28 - 109 files changed, 14781 deletions(-) delete mode 100644 test/.htaccess delete mode 100644 test/authors/LiamHammett/index.html delete mode 100644 test/authors/index.html delete mode 100644 test/authors/reinink/index.html delete mode 100644 test/authors/samuelstancl/index.html delete mode 100644 test/authors/timacdonald87/index.html delete mode 100644 test/css/app.css delete mode 100644 test/favicon.ico delete mode 100644 test/foo.txt delete mode 100644 test/index.php delete mode 100644 test/js/app.js delete mode 100644 test/mix-manifest.json delete mode 100644 test/robots.txt delete mode 100644 test/threads/1-rt-1-tip/index.html delete mode 100644 test/threads/abc/index.html delete mode 100644 test/threads/def/index.html delete mode 100644 test/threads/index.html delete mode 100644 test/threads/laravel-clean-code-tactics/index.html delete mode 100644 test/tips/1-people-underutilize-the-exception-handler/index.html delete mode 100644 test/tips/10-if-you-want-to-identify-teams-workspaces-etc-by-path-you-dont-have-to-pass-the-team-id-to-every-route/index.html delete mode 100644 test/tips/11-you-can-use-wherexandy-in-eloquent/index.html delete mode 100644 test/tips/13-if-youre-debugging-your-app-and-youd-like-to-examine-more-things-eg-the-stack-trace-executed-queries-app-context/index.html delete mode 100644 test/tips/14-comparing-changes-on-saving-using/index.html delete mode 100644 test/tips/151-eloquent-listeners-are-awesome/index.html delete mode 100644 test/tips/152-example-deleting-associated-files-on-deletion-httpstco4j8uzu0zyy/index.html delete mode 100644 test/tips/153-example-checking-a-parent-relationship-for-some-things/index.html delete mode 100644 test/tips/17-laravel-migrations-have-a-very-nice-syntax-for-foreign-keys/index.html delete mode 100644 test/tips/18-you-can-return-false-from-a-ing-eloquent-event-listener-creating-updating-saving-deleting-to-cancel-the-action/index.html delete mode 100644 test/tips/2-you-can-return-mailables-as-responses-from-controllers-it-will-show-the-rendered-version-in-the-browser/index.html delete mode 100644 test/tips/201-this-wont-fit-into-one-tweet-but-theres-so-much-cool-stuff-you-can-do-with-eloquent/index.html delete mode 100644 test/tips/202-you-can-create-dynamic-relationships-this-relationship-is-based-on-a-column-thats-added-using-a-subquery-in-a-scope/index.html delete mode 100644 test/tips/21-you-can-add-a-tags-method-to-a-job-anything-you-return-from-this-method-will-be-displayed-in-horizon/index.html delete mode 100644 test/tips/24-this-one-is-less-obscure/index.html delete mode 100644 test/tips/25-you-can-explicitly-bind-objects-to-routes-you-dont-have-to-use-route-model-binding-only-custom-objects-work-perfectly-well-too/index.html delete mode 100644 test/tips/31-theres-great-value-in-understanding-how-object-state-of-models-works-this-is-mostly-relevant-in-feature-tests-because-they-touch-many-parts-of-your-codebase-in-one-phplaravel-app-state/index.html delete mode 100644 test/tips/32-when-a-relationship-is-already-loaded-and-cached-on-the-model-instance-youll-have-to-refresh-it/index.html delete mode 100644 test/tips/4-laravel-nova-lets-you-show-different-resourcestoolscards-based-on-an-if-check/index.html delete mode 100644 test/tips/5-closure-validation-rules-are-theyre-often-better-than-creating-a-class-just-for-a-single-use/index.html delete mode 100644 test/tips/6-relevant-for-people-building-packages/index.html delete mode 100644 test/tips/9-laravel-telescope-is-great-for-so-many-things/index.html delete mode 100644 test/tips/avoid-helper-classes/index.html delete mode 100644 test/tips/avoid-queries-in-blade-when-possible/index.html delete mode 100644 test/tips/be-friends-with-your-ide/index.html delete mode 100644 test/tips/closure-validation-rules-are-theyre-often-better-than-creating-a-class-just-for-a-single-use/index.html delete mode 100644 test/tips/comparing-changes-on-saving-using/index.html delete mode 100644 test/tips/consider-single-action-controllers/index.html delete mode 100644 test/tips/consider-using-form-requests/index.html delete mode 100644 test/tips/consider-using-helpers-instead-of-facades-they-can-clean-things-up/index.html delete mode 100644 test/tips/context-matters/index.html delete mode 100644 test/tips/create-action-classes/index.html delete mode 100644 test/tips/create-custom-blade-directives-for-business-logic/index.html delete mode 100644 test/tips/create-fluent-objects/index.html delete mode 100644 test/tips/create-helper-functions/index.html delete mode 100644 test/tips/create-model-methods-for-business-logic/index.html delete mode 100644 test/tips/create-query-scopes-for-complex-wheres/index.html delete mode 100644 test/tips/create-single-use-blade-includes/index.html delete mode 100644 test/tips/create-single-use-traits/index.html delete mode 100644 test/tips/create-variables-when-they-improve-readability/index.html delete mode 100644 test/tips/dedicate-a-weekend-towards-learning-proper-oop/index.html delete mode 100644 test/tips/dont-create-variables-when-you-can-just-pass-the-value-directly-httpstcos8vozn7aor/index.html delete mode 100644 test/tips/dont-just-write-procedural-code-in-classes/index.html delete mode 100644 test/tips/dont-split-lines-at-random-places-but-dont-make-them-too-long-either/index.html delete mode 100644 test/tips/dont-use-a-controller-namespace/index.html delete mode 100644 test/tips/dont-use-abbreviations/index.html delete mode 100644 test/tips/dont-use-model-methods-to-retrieve-data/index.html delete mode 100644 test/tips/eloquent-listeners-are-awesome/index.html delete mode 100644 test/tips/example-checking-a-parent-relationship-for-some-things/index.html delete mode 100644 test/tips/example-deleting-associated-files-on-deletion-httpstco4j8uzu0zyy/index.html delete mode 100644 test/tips/extract-methods/index.html delete mode 100644 test/tips/have-a-single-source-of-truth-for-validation-rules/index.html delete mode 100644 test/tips/heres-another-example-of-the-model-state-stuff-mentioned-above/index.html delete mode 100644 test/tips/if-you-didnt-know-at-laravellivewire-now-triggers-updated-and-updating-hooks-for-nested-properties-which-works-with-both-array-and-model-properties-httpstco0rtwrpgfld/index.html delete mode 100644 test/tips/if-you-dont-like-the-double-indentation-of-vue-data-you-can-use-arrow-functions/index.html delete mode 100644 test/tips/if-you-want-to-identify-teams-workspaces-etc-by-path-you-dont-have-to-pass-the-team-id-to-every-route/index.html delete mode 100644 test/tips/if-youre-debugging-your-app-and-youd-like-to-examine-more-things-eg-the-stack-trace-executed-queries-app-context/index.html delete mode 100644 test/tips/import-namespaces-instead-of-using-aliases/index.html delete mode 100644 test/tips/index.html delete mode 100644 test/tips/instead-of-writing-repetitive-else-if-statements-use-an-array-to-look-up-the-wanted-value-based-on-the-key-you-have/index.html delete mode 100644 test/tips/its-about-the-micro/index.html delete mode 100644 test/tips/laravel-migrations-have-a-very-nice-syntax-for-foreign-keys/index.html delete mode 100644 test/tips/laravel-nova-lets-you-show-different-resourcestoolscards-based-on-an-if-check/index.html delete mode 100644 test/tips/laravel-telescope-is-great-for-so-many-things/index.html delete mode 100644 test/tips/people-underutilize-the-exception-handler/index.html delete mode 100644 test/tips/relevant-for-people-building-packages/index.html delete mode 100644 test/tips/theres-great-value-in-understanding-how-object-state-of-models-works-this-is-mostly-relevant-in-feature-tests-because-they-touch-many-parts-of-your-codebase-in-one-phplaravel-app-state/index.html delete mode 100644 test/tips/this-one-is-less-obscure/index.html delete mode 100644 test/tips/this-wont-fit-into-one-tweet-but-theres-so-much-cool-stuff-you-can-do-with-eloquent/index.html delete mode 100644 test/tips/try-to-avoid-unnecessary-nesting-by-returning-a-value-early/index.html delete mode 100644 test/tips/use-collections-when-they-can-clean-up-your-code/index.html delete mode 100644 test/tips/use-custom-collections/index.html delete mode 100644 test/tips/use-custom-config-files/index.html delete mode 100644 test/tips/use-data-transfer-objects-dtos/index.html delete mode 100644 test/tips/use-docblocks-only-when-they-clarify-things/index.html delete mode 100644 test/tips/use-events/index.html delete mode 100644 test/tips/use-expressive-names-for-methods/index.html delete mode 100644 test/tips/use-short-operators/index.html delete mode 100644 test/tips/use-strict-comparison/index.html delete mode 100644 test/tips/wanna-update-a-set-of-eloquent-models-and-have-the-change-updated-in-the-database-and-in-your-in-memory-instances-but-dont-wanna-incur-a-database-query-for-each-model/index.html delete mode 100644 test/tips/when-a-relationship-is-already-loaded-and-cached-on-the-model-instance-youll-have-to-refresh-it/index.html delete mode 100644 test/tips/when-im-converting-data-into-a-different-structure-one-thing-i-like-to-do-is-annotate-how-the-structure-looks-at-each-point-of-the-process/index.html delete mode 100644 test/tips/write-functional-code-when-it-benefits-you/index.html delete mode 100644 test/tips/yesterday-in-my-at-laracononline-talk-i-explained-how-to-use-the-query-builder-when-method-to-handle-complex-sorting/index.html delete mode 100644 test/tips/you-can-add-a-tags-method-to-a-job-anything-you-return-from-this-method-will-be-displayed-in-horizon/index.html delete mode 100644 test/tips/you-can-create-dynamic-relationships-this-relationship-is-based-on-a-column-thats-added-using-a-subquery-in-a-scope/index.html delete mode 100644 test/tips/you-can-explicitly-bind-objects-to-routes-you-dont-have-to-use-route-model-binding-only-custom-objects-work-perfectly-well-too/index.html delete mode 100644 test/tips/you-can-return-false-from-a-ing-eloquent-event-listener-creating-updating-saving-deleting-to-cancel-the-action/index.html delete mode 100644 test/tips/you-can-return-mailables-as-responses-from-controllers-it-will-show-the-rendered-version-in-the-browser/index.html delete mode 100644 test/tips/you-can-use-wherexandy-in-eloquent/index.html delete mode 100644 test/web.config diff --git a/test/.htaccess b/test/.htaccess deleted file mode 100644 index 3aec5e2..0000000 --- a/test/.htaccess +++ /dev/null @@ -1,21 +0,0 @@ - - - Options -MultiViews -Indexes - - - RewriteEngine On - - # Handle Authorization Header - RewriteCond %{HTTP:Authorization} . - RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] - - # Redirect Trailing Slashes If Not A Folder... - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_URI} (.+)/$ - RewriteRule ^ %1 [L,R=301] - - # Send Requests To Front Controller... - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^ index.php [L] - diff --git a/test/authors/LiamHammett/index.html b/test/authors/LiamHammett/index.html deleted file mode 100644 index 9c3cda3..0000000 --- a/test/authors/LiamHammett/index.html +++ /dev/null @@ -1 +0,0 @@ -show {"username":"LiamHammett","avatar":"https:\/\/pbs.twimg.com\/profile_images\/1236048705297485837\/oGeWeWid_normal.jpg","name":"Liam Hammett","content":""} \ No newline at end of file diff --git a/test/authors/index.html b/test/authors/index.html deleted file mode 100644 index 219e015..0000000 --- a/test/authors/index.html +++ /dev/null @@ -1 +0,0 @@ -author index \ No newline at end of file diff --git a/test/authors/reinink/index.html b/test/authors/reinink/index.html deleted file mode 100644 index 7e5d82b..0000000 --- a/test/authors/reinink/index.html +++ /dev/null @@ -1 +0,0 @@ -show {"username":"reinink","avatar":"https:\/\/pbs.twimg.com\/profile_images\/885868801232961537\/b1F6H4KC_normal.jpg","name":"Jonathan Reinink","content":""} \ No newline at end of file diff --git a/test/authors/samuelstancl/index.html b/test/authors/samuelstancl/index.html deleted file mode 100644 index c479e34..0000000 --- a/test/authors/samuelstancl/index.html +++ /dev/null @@ -1 +0,0 @@ -show {"username":"samuelstancl","avatar":"https:\/\/pbs.twimg.com\/profile_images\/1257272213088190464\/8kuysprf_normal.jpg","name":"Samuel \u0160tancl","content":""} \ No newline at end of file diff --git a/test/authors/timacdonald87/index.html b/test/authors/timacdonald87/index.html deleted file mode 100644 index 7273b9c..0000000 --- a/test/authors/timacdonald87/index.html +++ /dev/null @@ -1 +0,0 @@ -show {"username":"timacdonald87","avatar":"https:\/\/pbs.twimg.com\/profile_images\/1249274319059841024\/-8bpTPMC_normal.jpg","name":"Tim MacDonald","content":""} \ No newline at end of file diff --git a/test/css/app.css b/test/css/app.css deleted file mode 100644 index 1d9d5ce..0000000 --- a/test/css/app.css +++ /dev/null @@ -1,1059 +0,0 @@ -/*! tailwindcss v2.0.4 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */ - -/* -Document -======== -*/ - -/** -Use a better box model (opinionated). -*/ - -*, -*::before, -*::after { - box-sizing: border-box; -} - -/** -Use a more readable tab size (opinionated). -*/ - -:root { - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; -} - -/** -1. Correct the line height in all browsers. -2. Prevent adjustments of font size after orientation changes in iOS. -*/ - -html { - line-height: 1.15; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/* -Sections -======== -*/ - -/** -Remove the margin in all browsers. -*/ - -body { - margin: 0; -} - -/** -Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) -*/ - -body { - font-family: - system-ui, - -apple-system, /* Firefox supports this but not yet `system-ui` */ - 'Segoe UI', - Roboto, - Helvetica, - Arial, - sans-serif, - 'Apple Color Emoji', - 'Segoe UI Emoji'; -} - -/* -Grouping content -================ -*/ - -/** -1. Add the correct height in Firefox. -2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) -*/ - -hr { - height: 0; /* 1 */ - color: inherit; /* 2 */ -} - -/* -Text-level semantics -==================== -*/ - -/** -Add the correct text decoration in Chrome, Edge, and Safari. -*/ - -abbr[title] { - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; -} - -/** -Add the correct font weight in Edge and Safari. -*/ - -b, -strong { - font-weight: bolder; -} - -/** -1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) -2. Correct the odd 'em' font sizing in all browsers. -*/ - -code, -kbd, -samp, -pre { - font-family: - ui-monospace, - SFMono-Regular, - Consolas, - 'Liberation Mono', - Menlo, - monospace; /* 1 */ - font-size: 1em; /* 2 */ -} - -/** -Add the correct font size in all browsers. -*/ - -small { - font-size: 80%; -} - -/** -Prevent 'sub' and 'sup' elements from affecting the line height in all browsers. -*/ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* -Tabular data -============ -*/ - -/** -1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) -2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) -*/ - -table { - text-indent: 0; /* 1 */ - border-color: inherit; /* 2 */ -} - -/* -Forms -===== -*/ - -/** -1. Change the font styles in all browsers. -2. Remove the margin in Firefox and Safari. -*/ - -button, -input, -optgroup, -select, -textarea { - font-family: inherit; /* 1 */ - font-size: 100%; /* 1 */ - line-height: 1.15; /* 1 */ - margin: 0; /* 2 */ -} - -/** -Remove the inheritance of text transform in Edge and Firefox. -1. Remove the inheritance of text transform in Firefox. -*/ - -button, -select { /* 1 */ - text-transform: none; -} - -/** -Correct the inability to style clickable types in iOS and Safari. -*/ - -button, -[type='button'], -[type='reset'], -[type='submit'] { - -webkit-appearance: button; -} - -/** -Remove the inner border and padding in Firefox. -*/ - -::-moz-focus-inner { - border-style: none; - padding: 0; -} - -/** -Restore the focus styles unset by the previous rule. -*/ - -:-moz-focusring { - outline: 1px dotted ButtonText; -} - -/** -Remove the additional ':invalid' styles in Firefox. -See: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737 -*/ - -:-moz-ui-invalid { - box-shadow: none; -} - -/** -Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers. -*/ - -legend { - padding: 0; -} - -/** -Add the correct vertical alignment in Chrome and Firefox. -*/ - -progress { - vertical-align: baseline; -} - -/** -Correct the cursor style of increment and decrement buttons in Safari. -*/ - -::-webkit-inner-spin-button, -::-webkit-outer-spin-button { - height: auto; -} - -/** -1. Correct the odd appearance in Chrome and Safari. -2. Correct the outline style in Safari. -*/ - -[type='search'] { - -webkit-appearance: textfield; /* 1 */ - outline-offset: -2px; /* 2 */ -} - -/** -Remove the inner padding in Chrome and Safari on macOS. -*/ - -::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** -1. Correct the inability to style clickable types in iOS and Safari. -2. Change font properties to 'inherit' in Safari. -*/ - -::-webkit-file-upload-button { - -webkit-appearance: button; /* 1 */ - font: inherit; /* 2 */ -} - -/* -Interactive -=========== -*/ - -/* -Add the correct display in Chrome and Safari. -*/ - -summary { - display: list-item; -}/** - * Manually forked from SUIT CSS Base: https://github.com/suitcss/base - * A thin layer on top of normalize.css that provides a starting point more - * suitable for web applications. - */ - -/** - * Removes the default spacing and border for appropriate elements. - */ - -blockquote, -dl, -dd, -h1, -h2, -h3, -h4, -h5, -h6, -hr, -figure, -p, -pre { - margin: 0; -} - -button { - background-color: transparent; - background-image: none; -} - -/** - * Work around a Firefox/IE bug where the transparent `button` background - * results in a loss of the default `button` focus styles. - */ - -button:focus { - outline: 1px dotted; - outline: 5px auto -webkit-focus-ring-color; -} - -fieldset { - margin: 0; - padding: 0; -} - -ol, -ul { - list-style: none; - margin: 0; - padding: 0; -} - -/** - * Tailwind custom reset styles - */ - -/** - * 1. Use the user's configured `sans` font-family (with Tailwind's default - * sans-serif font stack as a fallback) as a sane default. - * 2. Use Tailwind's default "normal" line-height so the user isn't forced - * to override it to ensure consistency even when using the default theme. - */ - -html { - font-family: iA Writer Quattro S, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 1 */ - line-height: 1.5; /* 2 */ -} - - -/** - * Inherit font-family and line-height from `html` so users can set them as - * a class directly on the `html` element. - */ - -body { - font-family: inherit; - line-height: inherit; -} - -/** - * 1. Prevent padding and border from affecting element width. - * - * We used to set this in the html element and inherit from - * the parent element for everything else. This caused issues - * in shadow-dom-enhanced elements like
where the content - * is wrapped by a div with box-sizing set to `content-box`. - * - * https://github.com/mozdevs/cssremedy/issues/4 - * - * - * 2. Allow adding a border to an element by just adding a border-width. - * - * By default, the way the browser specifies that an element should have no - * border is by setting it's border-style to `none` in the user-agent - * stylesheet. - * - * In order to easily add borders to elements by just setting the `border-width` - * property, we change the default border-style for all elements to `solid`, and - * use border-width to hide them instead. This way our `border` utilities only - * need to set the `border-width` property instead of the entire `border` - * shorthand, making our border utilities much more straightforward to compose. - * - * https://github.com/tailwindcss/tailwindcss/pull/116 - */ - -*, -::before, -::after { - box-sizing: border-box; /* 1 */ - border-width: 0; /* 2 */ - border-style: solid; /* 2 */ - border-color: #e4e4e7; /* 2 */ -} - -/* - * Ensure horizontal rules are visible by default - */ - -hr { - border-top-width: 1px; -} - -/** - * Undo the `border-style: none` reset that Normalize applies to images so that - * our `border-{width}` utilities have the expected effect. - * - * The Normalize reset is unnecessary for us since we default the border-width - * to 0 on all elements. - * - * https://github.com/tailwindcss/tailwindcss/issues/362 - */ - -img { - border-style: solid; -} - -textarea { - resize: vertical; -} - -input::-moz-placeholder, textarea::-moz-placeholder { - opacity: 1; - color: #a1a1aa; -} - -input:-ms-input-placeholder, textarea:-ms-input-placeholder { - opacity: 1; - color: #a1a1aa; -} - -input::placeholder, -textarea::placeholder { - opacity: 1; - color: #a1a1aa; -} - -button, -[role="button"] { - cursor: pointer; -} - -table { - border-collapse: collapse; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - font-size: inherit; - font-weight: inherit; -} - -/** - * Reset links to optimize for opt-in styling instead of - * opt-out. - */ - -a { - color: inherit; - text-decoration: inherit; -} - -/** - * Reset form element properties that are easy to forget to - * style explicitly so you don't inadvertently introduce - * styles that deviate from your design system. These styles - * supplement a partial reset that is already applied by - * normalize.css. - */ - -button, -input, -optgroup, -select, -textarea { - padding: 0; - line-height: inherit; - color: inherit; -} - -/** - * Use the configured 'mono' font family for elements that - * are expected to be rendered with a monospace font, falling - * back to the system monospace stack if there is no configured - * 'mono' font family. - */ - -pre, -code, -kbd, -samp { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; -} - -/** - * Make replaced elements `display: block` by default as that's - * the behavior you want almost all of the time. Inspired by - * CSS Remedy, with `svg` added as well. - * - * https://github.com/mozdevs/cssremedy/issues/14 - */ - -img, -svg, -video, -canvas, -audio, -iframe, -embed, -object { - display: block; - vertical-align: middle; -} - -/** - * Constrain images and videos to the parent width and preserve - * their instrinsic aspect ratio. - * - * https://github.com/mozdevs/cssremedy/issues/14 - */ - -img, -video { - max-width: 100%; - height: auto; -} - -* { - --tw-shadow: 0 0 #0000; - --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgba(59, 130, 246, 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; -} -.prose { - color: #3f3f46; - max-width: 65ch; -} -.prose [class~="lead"] { - color: #52525b; - font-size: 1.25em; - line-height: 1.6; - margin-top: 1.2em; - margin-bottom: 1.2em; -} -.prose a { - color: #18181b; - text-decoration: underline; - font-weight: 500; -} -.prose strong { - color: #18181b; - font-weight: 600; -} -.prose ol[type="A"] { - --list-counter-style: upper-alpha; -} -.prose ol[type="a"] { - --list-counter-style: lower-alpha; -} -.prose ol[type="A s"] { - --list-counter-style: upper-alpha; -} -.prose ol[type="a s"] { - --list-counter-style: lower-alpha; -} -.prose ol[type="I"] { - --list-counter-style: upper-roman; -} -.prose ol[type="i"] { - --list-counter-style: lower-roman; -} -.prose ol[type="I s"] { - --list-counter-style: upper-roman; -} -.prose ol[type="i s"] { - --list-counter-style: lower-roman; -} -.prose ol[type="1"] { - --list-counter-style: decimal; -} -.prose ol > li { - position: relative; - padding-left: 1.75em; -} -.prose ol > li::before { - content: counter(list-item, var(--list-counter-style, decimal)) "."; - position: absolute; - font-weight: 400; - color: #71717a; - left: 0; -} -.prose ul > li { - position: relative; - padding-left: 1.75em; -} -.prose ul > li::before { - content: ""; - position: absolute; - background-color: #d4d4d8; - border-radius: 50%; - width: 0.375em; - height: 0.375em; - top: calc(0.875em - 0.1875em); - left: 0.25em; -} -.prose hr { - border-color: #e4e4e7; - border-top-width: 1px; - margin-top: 3em; - margin-bottom: 3em; -} -.prose blockquote { - font-weight: 500; - font-style: italic; - color: #18181b; - border-left-width: 0.25rem; - border-left-color: #e4e4e7; - quotes: "\201C""\201D""\2018""\2019"; - margin-top: 1.6em; - margin-bottom: 1.6em; - padding-left: 1em; -} -.prose blockquote p:first-of-type::before { - content: open-quote; -} -.prose blockquote p:last-of-type::after { - content: close-quote; -} -.prose h1 { - color: #18181b; - font-weight: 800; - font-size: 2.25em; - margin-top: 0; - margin-bottom: 0.8888889em; - line-height: 1.1111111; -} -.prose h2 { - color: #18181b; - font-weight: 700; - font-size: 1.5em; - margin-top: 2em; - margin-bottom: 1em; - line-height: 1.3333333; -} -.prose h3 { - color: #18181b; - font-weight: 600; - font-size: 1.25em; - margin-top: 1.6em; - margin-bottom: 0.6em; - line-height: 1.6; -} -.prose h4 { - color: #18181b; - font-weight: 600; - margin-top: 1.5em; - margin-bottom: 0.5em; - line-height: 1.5; -} -.prose figure figcaption { - color: #71717a; - font-size: 0.875em; - line-height: 1.4285714; - margin-top: 0.8571429em; -} -.prose code { - color: #18181b; - font-weight: 600; - font-size: 0.875em; -} -.prose code::before { - content: "`"; -} -.prose code::after { - content: "`"; -} -.prose a code { - color: #18181b; -} -.prose pre { - color: #e4e4e7; - background-color: #27272a; - overflow-x: auto; - font-size: 0.875em; - line-height: 1.7142857; - margin-top: 1.7142857em; - margin-bottom: 1.7142857em; - border-radius: 0.375rem; - padding-top: 0.8571429em; - padding-right: 1.1428571em; - padding-bottom: 0.8571429em; - padding-left: 1.1428571em; -} -.prose pre code { - background-color: transparent; - border-width: 0; - border-radius: 0; - padding: 0; - font-weight: 400; - color: inherit; - font-size: inherit; - font-family: inherit; - line-height: inherit; -} -.prose pre code::before { - content: none; -} -.prose pre code::after { - content: none; -} -.prose table { - width: 100%; - table-layout: auto; - text-align: left; - margin-top: 2em; - margin-bottom: 2em; - font-size: 0.875em; - line-height: 1.7142857; -} -.prose thead { - color: #18181b; - font-weight: 600; - border-bottom-width: 1px; - border-bottom-color: #d4d4d8; -} -.prose thead th { - vertical-align: bottom; - padding-right: 0.5714286em; - padding-bottom: 0.5714286em; - padding-left: 0.5714286em; -} -.prose tbody tr { - border-bottom-width: 1px; - border-bottom-color: #e4e4e7; -} -.prose tbody tr:last-child { - border-bottom-width: 0; -} -.prose tbody td { - vertical-align: top; - padding-top: 0.5714286em; - padding-right: 0.5714286em; - padding-bottom: 0.5714286em; - padding-left: 0.5714286em; -} -.prose { - font-size: 1rem; - line-height: 1.75; -} -.prose p { - margin-top: 1.25em; - margin-bottom: 1.25em; -} -.prose img { - margin-top: 2em; - margin-bottom: 2em; -} -.prose video { - margin-top: 2em; - margin-bottom: 2em; -} -.prose figure { - margin-top: 2em; - margin-bottom: 2em; -} -.prose figure > * { - margin-top: 0; - margin-bottom: 0; -} -.prose h2 code { - font-size: 0.875em; -} -.prose h3 code { - font-size: 0.9em; -} -.prose ol { - margin-top: 1.25em; - margin-bottom: 1.25em; -} -.prose ul { - margin-top: 1.25em; - margin-bottom: 1.25em; -} -.prose li { - margin-top: 0.5em; - margin-bottom: 0.5em; -} -.prose > ul > li p { - margin-top: 0.75em; - margin-bottom: 0.75em; -} -.prose > ul > li > *:first-child { - margin-top: 1.25em; -} -.prose > ul > li > *:last-child { - margin-bottom: 1.25em; -} -.prose > ol > li > *:first-child { - margin-top: 1.25em; -} -.prose > ol > li > *:last-child { - margin-bottom: 1.25em; -} -.prose ul ul, .prose ul ol, .prose ol ul, .prose ol ol { - margin-top: 0.75em; - margin-bottom: 0.75em; -} -.prose hr + * { - margin-top: 0; -} -.prose h2 + * { - margin-top: 0; -} -.prose h3 + * { - margin-top: 0; -} -.prose h4 + * { - margin-top: 0; -} -.prose thead th:first-child { - padding-left: 0; -} -.prose thead th:last-child { - padding-right: 0; -} -.prose tbody td:first-child { - padding-left: 0; -} -.prose tbody td:last-child { - padding-right: 0; -} -.prose > :first-child { - margin-top: 0; -} -.prose > :last-child { - margin-bottom: 0; -} -.fixed { - position: fixed; -} -.mx-auto { - margin-left: auto; - margin-right: auto; -} -.my-8 { - margin-top: 2rem; - margin-bottom: 2rem; -} -.mt-8 { - margin-top: 2rem; -} -.mt-4 { - margin-top: 1rem; -} -.mt-6 { - margin-top: 1.5rem; -} -.flex { - display: flex; -} -.grid { - display: grid; -} -.inline { - display: inline; -} -.block { - display: block; -} -.min-h-screen { - min-height: 100vh; -} -.w-full { - width: 100%; -} -.w-1\/2 { - width: 50%; -} -.w-8 { - width: 2rem; -} -.max-w-5xl { - max-width: 64rem; -} -.grid-cols-2 { - grid-template-columns: repeat(2, minmax(0, 1fr)); -} -.flex-col { - flex-direction: column; -} -.flex-wrap { - flex-wrap: wrap; -} -.items-center { - align-items: center; -} -.justify-between { - justify-content: space-between; -} -.justify-center { - justify-content: center; -} -.gap-8 { - gap: 2rem; -} -.gap-5 { - gap: 1.25rem; -} -.gap-2 { - gap: 0.5rem; -} -.gap-1 { - gap: 0.25rem; -} -.gap-x-5 { - -moz-column-gap: 1.25rem; - column-gap: 1.25rem; -} -.gap-y-4 { - row-gap: 1rem; -} -.space-y-2 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); -} -.rounded-full { - border-radius: 9999px; -} -.border-2 { - border-width: 2px; -} -.border-b-2 { - border-bottom-width: 2px; -} -.border-blue-800 { - --tw-border-opacity: 1; - border-color: rgba(30, 64, 175, var(--tw-border-opacity)); -} -.border-gray-200 { - --tw-border-opacity: 1; - border-color: rgba(228, 228, 231, var(--tw-border-opacity)); -} -.bg-white { - --tw-bg-opacity: 1; - background-color: rgba(255, 255, 255, var(--tw-bg-opacity)); -} -.p-3 { - padding: 0.75rem; -} -.py-16 { - padding-top: 4rem; - padding-bottom: 4rem; -} -.px-1 { - padding-left: 0.25rem; - padding-right: 0.25rem; -} -.px-2 { - padding-left: 0.5rem; - padding-right: 0.5rem; -} -.text-center { - text-align: center; -} -.text-right { - text-align: right; -} -.text-left { - text-align: left; -} -.text-xl { - font-size: 1.25rem; - line-height: 1.75rem; -} -.text-4xl { - font-size: 2.25rem; - line-height: 2.5rem; -} -.text-3xl { - font-size: 1.875rem; - line-height: 2.25rem; -} -.text-sm { - font-size: 0.875rem; - line-height: 1.25rem; -} -.text-5xl { - font-size: 3rem; - line-height: 1; -} -.text-2xl { - font-size: 1.5rem; - line-height: 2rem; -} -.text-lg { - font-size: 1.125rem; - line-height: 1.75rem; -} -.font-medium { - font-weight: 500; -} -.text-blue-800 { - --tw-text-opacity: 1; - color: rgba(30, 64, 175, var(--tw-text-opacity)); -} -.text-gray-700 { - --tw-text-opacity: 1; - color: rgba(63, 63, 70, var(--tw-text-opacity)); -} -.text-gray-800 { - --tw-text-opacity: 1; - color: rgba(39, 39, 42, var(--tw-text-opacity)); -} -.antialiased { - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.link { - border-bottom-width: 2px; - --tw-border-opacity: 1; - border-color: rgba(244, 244, 245, var(--tw-border-opacity)); - transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - -.link:hover { - --tw-border-opacity: 1; - border-color: rgba(161, 161, 170, var(--tw-border-opacity)); -} - diff --git a/test/favicon.ico b/test/favicon.ico deleted file mode 100644 index e69de29..0000000 diff --git a/test/foo.txt b/test/foo.txt deleted file mode 100644 index f2ba8f8..0000000 --- a/test/foo.txt +++ /dev/null @@ -1 +0,0 @@ -abc \ No newline at end of file diff --git a/test/index.php b/test/index.php deleted file mode 100644 index 66ea93c..0000000 --- a/test/index.php +++ /dev/null @@ -1,55 +0,0 @@ -make(Kernel::class); - -$response = tap($kernel->handle( - $request = Request::capture() -))->send(); - -$kernel->terminate($request, $response); diff --git a/test/js/app.js b/test/js/app.js deleted file mode 100644 index 731cb3a..0000000 --- a/test/js/app.js +++ /dev/null @@ -1,4907 +0,0 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ "./node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js": -/*!***************************************************************!*\ - !*** ./node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js ***! - \***************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "clearCache": () => (/* binding */ clearCache), -/* harmony export */ "connectStreamSource": () => (/* binding */ connectStreamSource), -/* harmony export */ "disconnectStreamSource": () => (/* binding */ disconnectStreamSource), -/* harmony export */ "navigator": () => (/* binding */ navigator), -/* harmony export */ "registerAdapter": () => (/* binding */ registerAdapter), -/* harmony export */ "renderStreamMessage": () => (/* binding */ renderStreamMessage), -/* harmony export */ "setProgressBarDelay": () => (/* binding */ setProgressBarDelay), -/* harmony export */ "start": () => (/* binding */ start), -/* harmony export */ "visit": () => (/* binding */ visit) -/* harmony export */ }); -/* -Turbo 7.0.0-beta.4 -Copyright © 2021 Basecamp, LLC - */ -(function () { - if (window.Reflect === undefined || window.customElements === undefined || - window.customElements.polyfillWrapFlushCallback) { - return; - } - const BuiltInHTMLElement = HTMLElement; - const wrapperForTheName = { - 'HTMLElement': function HTMLElement() { - return Reflect.construct(BuiltInHTMLElement, [], this.constructor); - } - }; - window.HTMLElement = - wrapperForTheName['HTMLElement']; - HTMLElement.prototype = BuiltInHTMLElement.prototype; - HTMLElement.prototype.constructor = HTMLElement; - Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement); -})(); - -const submittersByForm = new WeakMap; -function findSubmitterFromClickTarget(target) { - const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null; - const candidate = element ? element.closest("input, button") : null; - return (candidate === null || candidate === void 0 ? void 0 : candidate.type) == "submit" ? candidate : null; -} -function clickCaptured(event) { - const submitter = findSubmitterFromClickTarget(event.target); - if (submitter && submitter.form) { - submittersByForm.set(submitter.form, submitter); - } -} -(function () { - if ("SubmitEvent" in window) - return; - addEventListener("click", clickCaptured, true); - Object.defineProperty(Event.prototype, "submitter", { - get() { - if (this.type == "submit" && this.target instanceof HTMLFormElement) { - return submittersByForm.get(this.target); - } - } - }); -})(); - -var FrameLoadingStyle; -(function (FrameLoadingStyle) { - FrameLoadingStyle["eager"] = "eager"; - FrameLoadingStyle["lazy"] = "lazy"; -})(FrameLoadingStyle || (FrameLoadingStyle = {})); -class FrameElement extends HTMLElement { - constructor() { - super(); - this.loaded = Promise.resolve(); - this.delegate = new FrameElement.delegateConstructor(this); - } - static get observedAttributes() { - return ["loading", "src"]; - } - connectedCallback() { - this.delegate.connect(); - } - disconnectedCallback() { - this.delegate.disconnect(); - } - attributeChangedCallback(name) { - if (name == "loading") { - this.delegate.loadingStyleChanged(); - } - else if (name == "src") { - this.delegate.sourceURLChanged(); - } - } - get src() { - return this.getAttribute("src"); - } - set src(value) { - if (value) { - this.setAttribute("src", value); - } - else { - this.removeAttribute("src"); - } - } - get loading() { - return frameLoadingStyleFromString(this.getAttribute("loading") || ""); - } - set loading(value) { - if (value) { - this.setAttribute("loading", value); - } - else { - this.removeAttribute("loading"); - } - } - get disabled() { - return this.hasAttribute("disabled"); - } - set disabled(value) { - if (value) { - this.setAttribute("disabled", ""); - } - else { - this.removeAttribute("disabled"); - } - } - get autoscroll() { - return this.hasAttribute("autoscroll"); - } - set autoscroll(value) { - if (value) { - this.setAttribute("autoscroll", ""); - } - else { - this.removeAttribute("autoscroll"); - } - } - get complete() { - return !this.delegate.isLoading; - } - get isActive() { - return this.ownerDocument === document && !this.isPreview; - } - get isPreview() { - var _a, _b; - return (_b = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.documentElement) === null || _b === void 0 ? void 0 : _b.hasAttribute("data-turbo-preview"); - } -} -function frameLoadingStyleFromString(style) { - switch (style.toLowerCase()) { - case "lazy": return FrameLoadingStyle.lazy; - default: return FrameLoadingStyle.eager; - } -} - -function expandURL(locatable) { - const anchor = document.createElement("a"); - anchor.href = locatable.toString(); - return new URL(anchor.href); -} -function getAnchor(url) { - let anchorMatch; - if (url.hash) { - return url.hash.slice(1); - } - else if (anchorMatch = url.href.match(/#(.*)$/)) { - return anchorMatch[1]; - } - else { - return ""; - } -} -function getExtension(url) { - return (getLastPathComponent(url).match(/\.[^.]*$/) || [])[0] || ""; -} -function isHTML(url) { - return !!getExtension(url).match(/^(?:|\.(?:htm|html|xhtml))$/); -} -function isPrefixedBy(baseURL, url) { - const prefix = getPrefix(url); - return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix); -} -function toCacheKey(url) { - const anchorLength = url.hash.length; - if (anchorLength < 2) { - return url.href; - } - else { - return url.href.slice(0, -anchorLength); - } -} -function getPathComponents(url) { - return url.pathname.split("/").slice(1); -} -function getLastPathComponent(url) { - return getPathComponents(url).slice(-1)[0]; -} -function getPrefix(url) { - return addTrailingSlash(url.origin + url.pathname); -} -function addTrailingSlash(value) { - return value.endsWith("/") ? value : value + "/"; -} - -class FetchResponse { - constructor(response) { - this.response = response; - } - get succeeded() { - return this.response.ok; - } - get failed() { - return !this.succeeded; - } - get clientError() { - return this.statusCode >= 400 && this.statusCode <= 499; - } - get serverError() { - return this.statusCode >= 500 && this.statusCode <= 599; - } - get redirected() { - return this.response.redirected; - } - get location() { - return expandURL(this.response.url); - } - get isHTML() { - return this.contentType && this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/); - } - get statusCode() { - return this.response.status; - } - get contentType() { - return this.header("Content-Type"); - } - get responseText() { - return this.response.text(); - } - get responseHTML() { - if (this.isHTML) { - return this.response.text(); - } - else { - return Promise.resolve(undefined); - } - } - header(name) { - return this.response.headers.get(name); - } -} - -function dispatch(eventName, { target, cancelable, detail } = {}) { - const event = new CustomEvent(eventName, { cancelable, bubbles: true, detail }); - void (target || document.documentElement).dispatchEvent(event); - return event; -} -function nextAnimationFrame() { - return new Promise(resolve => requestAnimationFrame(() => resolve())); -} -function nextEventLoopTick() { - return new Promise(resolve => setTimeout(() => resolve(), 0)); -} -function nextMicrotask() { - return Promise.resolve(); -} -function parseHTMLDocument(html = "") { - return new DOMParser().parseFromString(html, "text/html"); -} -function unindent(strings, ...values) { - const lines = interpolate(strings, values).replace(/^\n/, "").split("\n"); - const match = lines[0].match(/^\s+/); - const indent = match ? match[0].length : 0; - return lines.map(line => line.slice(indent)).join("\n"); -} -function interpolate(strings, values) { - return strings.reduce((result, string, i) => { - const value = values[i] == undefined ? "" : values[i]; - return result + string + value; - }, ""); -} -function uuid() { - return Array.apply(null, { length: 36 }).map((_, i) => { - if (i == 8 || i == 13 || i == 18 || i == 23) { - return "-"; - } - else if (i == 14) { - return "4"; - } - else if (i == 19) { - return (Math.floor(Math.random() * 4) + 8).toString(16); - } - else { - return Math.floor(Math.random() * 15).toString(16); - } - }).join(""); -} - -var FetchMethod; -(function (FetchMethod) { - FetchMethod[FetchMethod["get"] = 0] = "get"; - FetchMethod[FetchMethod["post"] = 1] = "post"; - FetchMethod[FetchMethod["put"] = 2] = "put"; - FetchMethod[FetchMethod["patch"] = 3] = "patch"; - FetchMethod[FetchMethod["delete"] = 4] = "delete"; -})(FetchMethod || (FetchMethod = {})); -function fetchMethodFromString(method) { - switch (method.toLowerCase()) { - case "get": return FetchMethod.get; - case "post": return FetchMethod.post; - case "put": return FetchMethod.put; - case "patch": return FetchMethod.patch; - case "delete": return FetchMethod.delete; - } -} -class FetchRequest { - constructor(delegate, method, location, body = new URLSearchParams) { - this.abortController = new AbortController; - this.delegate = delegate; - this.method = method; - if (this.isIdempotent) { - this.url = mergeFormDataEntries(location, [...body.entries()]); - } - else { - this.body = body; - this.url = location; - } - } - get location() { - return this.url; - } - get params() { - return this.url.searchParams; - } - get entries() { - return this.body ? Array.from(this.body.entries()) : []; - } - cancel() { - this.abortController.abort(); - } - async perform() { - const { fetchOptions } = this; - dispatch("turbo:before-fetch-request", { detail: { fetchOptions } }); - try { - this.delegate.requestStarted(this); - const response = await fetch(this.url.href, fetchOptions); - return await this.receive(response); - } - catch (error) { - this.delegate.requestErrored(this, error); - throw error; - } - finally { - this.delegate.requestFinished(this); - } - } - async receive(response) { - const fetchResponse = new FetchResponse(response); - const event = dispatch("turbo:before-fetch-response", { cancelable: true, detail: { fetchResponse } }); - if (event.defaultPrevented) { - this.delegate.requestPreventedHandlingResponse(this, fetchResponse); - } - else if (fetchResponse.succeeded) { - this.delegate.requestSucceededWithResponse(this, fetchResponse); - } - else { - this.delegate.requestFailedWithResponse(this, fetchResponse); - } - return fetchResponse; - } - get fetchOptions() { - return { - method: FetchMethod[this.method].toUpperCase(), - credentials: "same-origin", - headers: this.headers, - redirect: "follow", - body: this.body, - signal: this.abortSignal - }; - } - get isIdempotent() { - return this.method == FetchMethod.get; - } - get headers() { - const headers = Object.assign({}, this.defaultHeaders); - if (typeof this.delegate.prepareHeadersForRequest == "function") { - this.delegate.prepareHeadersForRequest(headers, this); - } - return headers; - } - get abortSignal() { - return this.abortController.signal; - } - get defaultHeaders() { - return { - "Accept": "text/html, application/xhtml+xml" - }; - } -} -function mergeFormDataEntries(url, entries) { - const currentSearchParams = new URLSearchParams(url.search); - for (const [name, value] of entries) { - if (value instanceof File) - continue; - if (currentSearchParams.has(name)) { - currentSearchParams.delete(name); - url.searchParams.set(name, value); - } - else { - url.searchParams.append(name, value); - } - } - return url; -} - -class AppearanceObserver { - constructor(delegate, element) { - this.started = false; - this.intersect = entries => { - const lastEntry = entries.slice(-1)[0]; - if (lastEntry === null || lastEntry === void 0 ? void 0 : lastEntry.isIntersecting) { - this.delegate.elementAppearedInViewport(this.element); - } - }; - this.delegate = delegate; - this.element = element; - this.intersectionObserver = new IntersectionObserver(this.intersect); - } - start() { - if (!this.started) { - this.started = true; - this.intersectionObserver.observe(this.element); - } - } - stop() { - if (this.started) { - this.started = false; - this.intersectionObserver.unobserve(this.element); - } - } -} - -class StreamMessage { - constructor(html) { - this.templateElement = document.createElement("template"); - this.templateElement.innerHTML = html; - } - static wrap(message) { - if (typeof message == "string") { - return new this(message); - } - else { - return message; - } - } - get fragment() { - const fragment = document.createDocumentFragment(); - for (const element of this.foreignElements) { - fragment.appendChild(document.importNode(element, true)); - } - return fragment; - } - get foreignElements() { - return this.templateChildren.reduce((streamElements, child) => { - if (child.tagName.toLowerCase() == "turbo-stream") { - return [...streamElements, child]; - } - else { - return streamElements; - } - }, []); - } - get templateChildren() { - return Array.from(this.templateElement.content.children); - } -} -StreamMessage.contentType = "text/vnd.turbo-stream.html"; - -var FormSubmissionState; -(function (FormSubmissionState) { - FormSubmissionState[FormSubmissionState["initialized"] = 0] = "initialized"; - FormSubmissionState[FormSubmissionState["requesting"] = 1] = "requesting"; - FormSubmissionState[FormSubmissionState["waiting"] = 2] = "waiting"; - FormSubmissionState[FormSubmissionState["receiving"] = 3] = "receiving"; - FormSubmissionState[FormSubmissionState["stopping"] = 4] = "stopping"; - FormSubmissionState[FormSubmissionState["stopped"] = 5] = "stopped"; -})(FormSubmissionState || (FormSubmissionState = {})); -var FormEnctype; -(function (FormEnctype) { - FormEnctype["urlEncoded"] = "application/x-www-form-urlencoded"; - FormEnctype["multipart"] = "multipart/form-data"; - FormEnctype["plain"] = "text/plain"; -})(FormEnctype || (FormEnctype = {})); -function formEnctypeFromString(encoding) { - switch (encoding.toLowerCase()) { - case FormEnctype.multipart: return FormEnctype.multipart; - case FormEnctype.plain: return FormEnctype.plain; - default: return FormEnctype.urlEncoded; - } -} -class FormSubmission { - constructor(delegate, formElement, submitter, mustRedirect = false) { - this.state = FormSubmissionState.initialized; - this.delegate = delegate; - this.formElement = formElement; - this.submitter = submitter; - this.formData = buildFormData(formElement, submitter); - this.fetchRequest = new FetchRequest(this, this.method, this.location, this.body); - this.mustRedirect = mustRedirect; - } - get method() { - var _a; - const method = ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute("formmethod")) || this.formElement.getAttribute("method") || ""; - return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get; - } - get action() { - var _a; - return ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute("formaction")) || this.formElement.action; - } - get location() { - return expandURL(this.action); - } - get body() { - if (this.enctype == FormEnctype.urlEncoded || this.method == FetchMethod.get) { - return new URLSearchParams(this.stringFormData); - } - else { - return this.formData; - } - } - get enctype() { - var _a; - return formEnctypeFromString(((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute("formenctype")) || this.formElement.enctype); - } - get stringFormData() { - return [...this.formData].reduce((entries, [name, value]) => { - return entries.concat(typeof value == "string" ? [[name, value]] : []); - }, []); - } - async start() { - const { initialized, requesting } = FormSubmissionState; - if (this.state == initialized) { - this.state = requesting; - return this.fetchRequest.perform(); - } - } - stop() { - const { stopping, stopped } = FormSubmissionState; - if (this.state != stopping && this.state != stopped) { - this.state = stopping; - this.fetchRequest.cancel(); - return true; - } - } - prepareHeadersForRequest(headers, request) { - if (!request.isIdempotent) { - const token = getCookieValue(getMetaContent("csrf-param")) || getMetaContent("csrf-token"); - if (token) { - headers["X-CSRF-Token"] = token; - } - headers["Accept"] = [StreamMessage.contentType, headers["Accept"]].join(", "); - } - } - requestStarted(request) { - this.state = FormSubmissionState.waiting; - dispatch("turbo:submit-start", { target: this.formElement, detail: { formSubmission: this } }); - this.delegate.formSubmissionStarted(this); - } - requestPreventedHandlingResponse(request, response) { - this.result = { success: response.succeeded, fetchResponse: response }; - } - requestSucceededWithResponse(request, response) { - if (response.clientError || response.serverError) { - this.delegate.formSubmissionFailedWithResponse(this, response); - } - else if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) { - const error = new Error("Form responses must redirect to another location"); - this.delegate.formSubmissionErrored(this, error); - } - else { - this.state = FormSubmissionState.receiving; - this.result = { success: true, fetchResponse: response }; - this.delegate.formSubmissionSucceededWithResponse(this, response); - } - } - requestFailedWithResponse(request, response) { - this.result = { success: false, fetchResponse: response }; - this.delegate.formSubmissionFailedWithResponse(this, response); - } - requestErrored(request, error) { - this.result = { success: false, error }; - this.delegate.formSubmissionErrored(this, error); - } - requestFinished(request) { - this.state = FormSubmissionState.stopped; - dispatch("turbo:submit-end", { target: this.formElement, detail: Object.assign({ formSubmission: this }, this.result) }); - this.delegate.formSubmissionFinished(this); - } - requestMustRedirect(request) { - return !request.isIdempotent && this.mustRedirect; - } -} -function buildFormData(formElement, submitter) { - const formData = new FormData(formElement); - const name = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("name"); - const value = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("value"); - if (name && formData.get(name) != value) { - formData.append(name, value || ""); - } - return formData; -} -function getCookieValue(cookieName) { - if (cookieName != null) { - const cookies = document.cookie ? document.cookie.split("; ") : []; - const cookie = cookies.find((cookie) => cookie.startsWith(cookieName)); - if (cookie) { - const value = cookie.split("=").slice(1).join("="); - return value ? decodeURIComponent(value) : undefined; - } - } -} -function getMetaContent(name) { - const element = document.querySelector(`meta[name="${name}"]`); - return element && element.content; -} -function responseSucceededWithoutRedirect(response) { - return response.statusCode == 200 && !response.redirected; -} - -class Snapshot { - constructor(element) { - this.element = element; - } - get children() { - return [...this.element.children]; - } - hasAnchor(anchor) { - return this.getElementForAnchor(anchor) != null; - } - getElementForAnchor(anchor) { - try { - return this.element.querySelector(`[id='${anchor}'], a[name='${anchor}']`); - } - catch (_a) { - return null; - } - } - get firstAutofocusableElement() { - return this.element.querySelector("[autofocus]"); - } - get permanentElements() { - return [...this.element.querySelectorAll("[id][data-turbo-permanent]")]; - } - getPermanentElementById(id) { - return this.element.querySelector(`#${id}[data-turbo-permanent]`); - } - getPermanentElementsPresentInSnapshot(snapshot) { - return this.permanentElements.filter(({ id }) => snapshot.getPermanentElementById(id)); - } -} - -class FormInterceptor { - constructor(delegate, element) { - this.submitBubbled = ((event) => { - if (event.target instanceof HTMLFormElement) { - const form = event.target; - const submitter = event.submitter || undefined; - if (this.delegate.shouldInterceptFormSubmission(form, submitter)) { - event.preventDefault(); - event.stopImmediatePropagation(); - this.delegate.formSubmissionIntercepted(form, submitter); - } - } - }); - this.delegate = delegate; - this.element = element; - } - start() { - this.element.addEventListener("submit", this.submitBubbled); - } - stop() { - this.element.removeEventListener("submit", this.submitBubbled); - } -} - -class View { - constructor(delegate, element) { - this.delegate = delegate; - this.element = element; - } - scrollToAnchor(anchor) { - const element = this.snapshot.getElementForAnchor(anchor); - if (element) { - this.scrollToElement(element); - } - else { - this.scrollToPosition({ x: 0, y: 0 }); - } - } - scrollToElement(element) { - element.scrollIntoView(); - } - scrollToPosition({ x, y }) { - this.scrollRoot.scrollTo(x, y); - } - get scrollRoot() { - return window; - } - async render(renderer) { - if (this.renderer) { - throw new Error("rendering is already in progress"); - } - const { isPreview, shouldRender, newSnapshot: snapshot } = renderer; - if (shouldRender) { - try { - this.renderer = renderer; - this.prepareToRenderSnapshot(renderer); - this.delegate.viewWillRenderSnapshot(snapshot, isPreview); - await this.renderSnapshot(renderer); - this.delegate.viewRenderedSnapshot(snapshot, isPreview); - this.finishRenderingSnapshot(renderer); - } - finally { - delete this.renderer; - } - } - else { - this.invalidate(); - } - } - invalidate() { - this.delegate.viewInvalidated(); - } - prepareToRenderSnapshot(renderer) { - this.markAsPreview(renderer.isPreview); - renderer.prepareToRender(); - } - markAsPreview(isPreview) { - if (isPreview) { - this.element.setAttribute("data-turbo-preview", ""); - } - else { - this.element.removeAttribute("data-turbo-preview"); - } - } - async renderSnapshot(renderer) { - await renderer.render(); - } - finishRenderingSnapshot(renderer) { - renderer.finishRendering(); - } -} - -class FrameView extends View { - invalidate() { - this.element.innerHTML = ""; - } - get snapshot() { - return new Snapshot(this.element); - } -} - -class LinkInterceptor { - constructor(delegate, element) { - this.clickBubbled = (event) => { - if (this.respondsToEventTarget(event.target)) { - this.clickEvent = event; - } - else { - delete this.clickEvent; - } - }; - this.linkClicked = ((event) => { - if (this.clickEvent && this.respondsToEventTarget(event.target) && event.target instanceof Element) { - if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url)) { - this.clickEvent.preventDefault(); - event.preventDefault(); - this.delegate.linkClickIntercepted(event.target, event.detail.url); - } - } - delete this.clickEvent; - }); - this.willVisit = () => { - delete this.clickEvent; - }; - this.delegate = delegate; - this.element = element; - } - start() { - this.element.addEventListener("click", this.clickBubbled); - document.addEventListener("turbo:click", this.linkClicked); - document.addEventListener("turbo:before-visit", this.willVisit); - } - stop() { - this.element.removeEventListener("click", this.clickBubbled); - document.removeEventListener("turbo:click", this.linkClicked); - document.removeEventListener("turbo:before-visit", this.willVisit); - } - respondsToEventTarget(target) { - const element = target instanceof Element - ? target - : target instanceof Node - ? target.parentElement - : null; - return element && element.closest("turbo-frame, html") == this.element; - } -} - -class Renderer { - constructor(currentSnapshot, newSnapshot, isPreview) { - this.currentSnapshot = currentSnapshot; - this.newSnapshot = newSnapshot; - this.isPreview = isPreview; - this.promise = new Promise((resolve, reject) => this.resolvingFunctions = { resolve, reject }); - } - get shouldRender() { - return true; - } - prepareToRender() { - return; - } - finishRendering() { - if (this.resolvingFunctions) { - this.resolvingFunctions.resolve(); - delete this.resolvingFunctions; - } - } - createScriptElement(element) { - if (element.getAttribute("data-turbo-eval") == "false") { - return element; - } - else { - const createdScriptElement = document.createElement("script"); - createdScriptElement.textContent = element.textContent; - createdScriptElement.async = false; - copyElementAttributes(createdScriptElement, element); - return createdScriptElement; - } - } - preservingPermanentElements(callback) { - const placeholders = relocatePermanentElements(this.currentSnapshot, this.newSnapshot); - callback(); - replacePlaceholderElementsWithClonedPermanentElements(placeholders); - } - focusFirstAutofocusableElement() { - const element = this.newSnapshot.firstAutofocusableElement; - if (elementIsFocusable(element)) { - element.focus(); - } - } - get currentElement() { - return this.currentSnapshot.element; - } - get newElement() { - return this.newSnapshot.element; - } -} -function replaceElementWithElement(fromElement, toElement) { - const parentElement = fromElement.parentElement; - if (parentElement) { - return parentElement.replaceChild(toElement, fromElement); - } -} -function copyElementAttributes(destinationElement, sourceElement) { - for (const { name, value } of [...sourceElement.attributes]) { - destinationElement.setAttribute(name, value); - } -} -function createPlaceholderForPermanentElement(permanentElement) { - const element = document.createElement("meta"); - element.setAttribute("name", "turbo-permanent-placeholder"); - element.setAttribute("content", permanentElement.id); - return { element, permanentElement }; -} -function replacePlaceholderElementsWithClonedPermanentElements(placeholders) { - for (const { element, permanentElement } of placeholders) { - const clonedElement = permanentElement.cloneNode(true); - replaceElementWithElement(element, clonedElement); - } -} -function relocatePermanentElements(currentSnapshot, newSnapshot) { - return currentSnapshot.getPermanentElementsPresentInSnapshot(newSnapshot).reduce((placeholders, permanentElement) => { - const newElement = newSnapshot.getPermanentElementById(permanentElement.id); - if (newElement) { - const placeholder = createPlaceholderForPermanentElement(permanentElement); - replaceElementWithElement(permanentElement, placeholder.element); - replaceElementWithElement(newElement, permanentElement); - return [...placeholders, placeholder]; - } - else { - return placeholders; - } - }, []); -} -function elementIsFocusable(element) { - return element && typeof element.focus == "function"; -} - -class FrameRenderer extends Renderer { - get shouldRender() { - return true; - } - async render() { - await nextAnimationFrame(); - this.preservingPermanentElements(() => { - this.loadFrameElement(); - }); - this.scrollFrameIntoView(); - await nextAnimationFrame(); - this.focusFirstAutofocusableElement(); - } - loadFrameElement() { - var _a; - const destinationRange = document.createRange(); - destinationRange.selectNodeContents(this.currentElement); - destinationRange.deleteContents(); - const frameElement = this.newElement; - const sourceRange = (_a = frameElement.ownerDocument) === null || _a === void 0 ? void 0 : _a.createRange(); - if (sourceRange) { - sourceRange.selectNodeContents(frameElement); - this.currentElement.appendChild(sourceRange.extractContents()); - } - } - scrollFrameIntoView() { - if (this.currentElement.autoscroll || this.newElement.autoscroll) { - const element = this.currentElement.firstElementChild; - const block = readScrollLogicalPosition(this.currentElement.getAttribute("data-autoscroll-block"), "end"); - if (element) { - element.scrollIntoView({ block }); - return true; - } - } - return false; - } -} -function readScrollLogicalPosition(value, defaultValue) { - if (value == "end" || value == "start" || value == "center" || value == "nearest") { - return value; - } - else { - return defaultValue; - } -} - -class FrameController { - constructor(element) { - this.resolveVisitPromise = () => { }; - this.element = element; - this.view = new FrameView(this, this.element); - this.appearanceObserver = new AppearanceObserver(this, this.element); - this.linkInterceptor = new LinkInterceptor(this, this.element); - this.formInterceptor = new FormInterceptor(this, this.element); - } - connect() { - if (this.loadingStyle == FrameLoadingStyle.lazy) { - this.appearanceObserver.start(); - } - this.linkInterceptor.start(); - this.formInterceptor.start(); - } - disconnect() { - this.appearanceObserver.stop(); - this.linkInterceptor.stop(); - this.formInterceptor.stop(); - } - sourceURLChanged() { - if (this.loadingStyle == FrameLoadingStyle.eager) { - this.loadSourceURL(); - } - } - loadingStyleChanged() { - if (this.loadingStyle == FrameLoadingStyle.lazy) { - this.appearanceObserver.start(); - } - else { - this.appearanceObserver.stop(); - this.loadSourceURL(); - } - } - async loadSourceURL() { - if (this.isActive && this.sourceURL && this.sourceURL != this.loadingURL) { - try { - this.loadingURL = this.sourceURL; - this.element.loaded = this.visit(this.sourceURL); - this.appearanceObserver.stop(); - await this.element.loaded; - } - finally { - delete this.loadingURL; - } - } - } - async loadResponse(response) { - try { - const html = await response.responseHTML; - if (html) { - const { body } = parseHTMLDocument(html); - const snapshot = new Snapshot(await this.extractForeignFrameElement(body)); - const renderer = new FrameRenderer(this.view.snapshot, snapshot, false); - await this.view.render(renderer); - } - } - catch (error) { - console.error(error); - this.view.invalidate(); - } - } - elementAppearedInViewport(element) { - this.loadSourceURL(); - } - shouldInterceptLinkClick(element, url) { - return this.shouldInterceptNavigation(element); - } - linkClickIntercepted(element, url) { - this.navigateFrame(element, url); - } - shouldInterceptFormSubmission(element) { - return this.shouldInterceptNavigation(element); - } - formSubmissionIntercepted(element, submitter) { - if (this.formSubmission) { - this.formSubmission.stop(); - } - this.formSubmission = new FormSubmission(this, element, submitter); - if (this.formSubmission.fetchRequest.isIdempotent) { - this.navigateFrame(element, this.formSubmission.fetchRequest.url.href); - } - else { - this.formSubmission.start(); - } - } - prepareHeadersForRequest(headers, request) { - headers["Turbo-Frame"] = this.id; - } - requestStarted(request) { - this.element.setAttribute("busy", ""); - } - requestPreventedHandlingResponse(request, response) { - this.resolveVisitPromise(); - } - async requestSucceededWithResponse(request, response) { - await this.loadResponse(response); - this.resolveVisitPromise(); - } - requestFailedWithResponse(request, response) { - console.error(response); - this.resolveVisitPromise(); - } - requestErrored(request, error) { - console.error(error); - this.resolveVisitPromise(); - } - requestFinished(request) { - this.element.removeAttribute("busy"); - } - formSubmissionStarted(formSubmission) { - } - formSubmissionSucceededWithResponse(formSubmission, response) { - const frame = this.findFrameElement(formSubmission.formElement); - frame.delegate.loadResponse(response); - } - formSubmissionFailedWithResponse(formSubmission, fetchResponse) { - this.element.delegate.loadResponse(fetchResponse); - } - formSubmissionErrored(formSubmission, error) { - } - formSubmissionFinished(formSubmission) { - } - viewWillRenderSnapshot(snapshot, isPreview) { - } - viewRenderedSnapshot(snapshot, isPreview) { - } - viewInvalidated() { - } - async visit(url) { - const request = new FetchRequest(this, FetchMethod.get, expandURL(url)); - return new Promise(resolve => { - this.resolveVisitPromise = () => { - this.resolveVisitPromise = () => { }; - resolve(); - }; - request.perform(); - }); - } - navigateFrame(element, url) { - const frame = this.findFrameElement(element); - frame.src = url; - } - findFrameElement(element) { - var _a; - const id = element.getAttribute("data-turbo-frame") || this.element.getAttribute("target"); - return (_a = getFrameElementById(id)) !== null && _a !== void 0 ? _a : this.element; - } - async extractForeignFrameElement(container) { - let element; - const id = CSS.escape(this.id); - if (element = activateElement(container.querySelector(`turbo-frame#${id}`))) { - return element; - } - if (element = activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`))) { - await element.loaded; - return await this.extractForeignFrameElement(element); - } - console.error(`Response has no matching element`); - return new FrameElement(); - } - shouldInterceptNavigation(element) { - const id = element.getAttribute("data-turbo-frame") || this.element.getAttribute("target"); - if (!this.enabled || id == "_top") { - return false; - } - if (id) { - const frameElement = getFrameElementById(id); - if (frameElement) { - return !frameElement.disabled; - } - } - return true; - } - get id() { - return this.element.id; - } - get enabled() { - return !this.element.disabled; - } - get sourceURL() { - return this.element.src; - } - get loadingStyle() { - return this.element.loading; - } - get isLoading() { - return this.formSubmission !== undefined || this.loadingURL !== undefined; - } - get isActive() { - return this.element.isActive; - } -} -function getFrameElementById(id) { - if (id != null) { - const element = document.getElementById(id); - if (element instanceof FrameElement) { - return element; - } - } -} -function activateElement(element) { - if (element && element.ownerDocument !== document) { - element = document.importNode(element, true); - } - if (element instanceof FrameElement) { - return element; - } -} - -const StreamActions = { - append() { - var _a; - (_a = this.targetElement) === null || _a === void 0 ? void 0 : _a.append(this.templateContent); - }, - prepend() { - var _a; - (_a = this.targetElement) === null || _a === void 0 ? void 0 : _a.prepend(this.templateContent); - }, - remove() { - var _a; - (_a = this.targetElement) === null || _a === void 0 ? void 0 : _a.remove(); - }, - replace() { - var _a; - (_a = this.targetElement) === null || _a === void 0 ? void 0 : _a.replaceWith(this.templateContent); - }, - update() { - if (this.targetElement) { - this.targetElement.innerHTML = ""; - this.targetElement.append(this.templateContent); - } - } -}; - -class StreamElement extends HTMLElement { - async connectedCallback() { - try { - await this.render(); - } - catch (error) { - console.error(error); - } - finally { - this.disconnect(); - } - } - async render() { - var _a; - return (_a = this.renderPromise) !== null && _a !== void 0 ? _a : (this.renderPromise = (async () => { - if (this.dispatchEvent(this.beforeRenderEvent)) { - await nextAnimationFrame(); - this.performAction(); - } - })()); - } - disconnect() { - try { - this.remove(); - } - catch (_a) { } - } - get performAction() { - if (this.action) { - const actionFunction = StreamActions[this.action]; - if (actionFunction) { - return actionFunction; - } - this.raise("unknown action"); - } - this.raise("action attribute is missing"); - } - get targetElement() { - var _a; - if (this.target) { - return (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.getElementById(this.target); - } - this.raise("target attribute is missing"); - } - get templateContent() { - return this.templateElement.content; - } - get templateElement() { - if (this.firstElementChild instanceof HTMLTemplateElement) { - return this.firstElementChild; - } - this.raise("first child element must be a