quran-madina-html 0.9.7 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Quran Madina Html (no-images)
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/quran-madina-html.svg)](https://www.npmjs.com/package/quran-madina-html)
4
+ [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
3
5
  [![CodeQL](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/github-code-scanning/codeql)
4
6
  [![pylint](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/pylint.yml/badge.svg)](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/pylint.yml)
5
7
  [![py_test](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/py_test.yml/badge.svg)](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/py_test.yml)
@@ -127,7 +129,15 @@ counts as words 10-13
127
129
 
128
130
  ## Getting Started
129
131
 
130
- In your Html header, add this script:
132
+ ### Installation
133
+
134
+ Install via **npm**:
135
+
136
+ ```bash
137
+ npm install quran-madina-html
138
+ ```
139
+
140
+ Or include directly via **CDN script tag** in your HTML `<head>`:
131
141
 
132
142
  ```html
133
143
  <script type="text/javascript" src="https://unpkg.com/quran-madina-html"></script>
@@ -135,7 +145,10 @@ In your Html header, add this script:
135
145
 
136
146
  * Supported ``data-name`` parameters are: Madina05 (default), others are under development (Shemerly, Qaloon, Newer Madina)
137
147
  * Supported ``data-font`` parameters are: Hafs (default), Uthman, Amiri Quran, Amiri Quran Colored
138
- * Other options include: ``data-font-size`` which defaults to 16 (px)
148
+ * Other options include: ``data-font-size`` which defaults to 16 (px). Any size from 6 to 100 works:
149
+ 16 and 24 have pre-built databases, and every other size is fitted at load time by linear
150
+ interpolation between those two anchors (page/line width interpolated, letter stretching
151
+ re-scaled accordingly)
139
152
 
140
153
  Then in your body, just add the tag.
141
154
 
@@ -174,6 +187,30 @@ To embed a selection inside your own chrome (e.g. a quiz that already labels the
174
187
  <quran-madina-html sura="1" aya="7" words="1-14" notitle="true"></quran-madina-html>
175
188
  ```
176
189
 
190
+ #### Highlighting and marking words
191
+
192
+ Two more range attributes lay a visual mark over a sub-range of whatever is being shown —
193
+ ``highlight`` (soft yellow) and ``error`` (soft red) — using the same 1-based, inclusive range
194
+ format as ``words`` (``start-end``, ``start:end``, or a single index). Unlike ``words``, they
195
+ work in **every** render mode: alongside a ``words`` selection, on a plain ``sura``/``aya`` verse
196
+ (counted from that aya's first word), and even on a full ``page`` render (counted from the
197
+ page's first aya — a page never starts mid-aya, so this is always well-defined). A range must
198
+ fall entirely within whatever is actually displayed (the ``words`` selection if one is set,
199
+ otherwise the whole verse/page); an out-of-range or malformed value is ignored with a console
200
+ warning rather than breaking the render. When ``highlight`` and ``error`` overlap on the same
201
+ word, ``error`` wins.
202
+
203
+ ```html
204
+ <quran-madina-html sura="1" aya="7" words="1-14" highlight="10-13" error="1-2"></quran-madina-html>
205
+ <quran-madina-html sura="2" aya="255" highlight="5-8"></quran-madina-html> <!-- no words needed -->
206
+ <quran-madina-html page="2" error="1-4"></quran-madina-html> <!-- counted from the page's first aya -->
207
+ ```
208
+
209
+ Colors come from the ``--qmh-highlight``/``--qmh-error`` CSS custom properties on
210
+ ``quran-madina-html`` (defaults: soft yellow/soft red) — override them, or the
211
+ ``.quran-madina-html-word-highlight``/``.quran-madina-html-word-error`` classes directly, from
212
+ your own stylesheet.
213
+
177
214
  Another option exists to render a complete quran page:
178
215
 
179
216
  ```html
@@ -186,6 +223,42 @@ By default a multiline render gets a header (sura name + copy/translate icons);
186
223
  <quran-madina-html sura="2" aya="8-10" headless="true"></quran-madina-html> <!-- no header -->
187
224
  ```
188
225
 
226
+ ### Attributes Reference
227
+
228
+ | Attribute | Type | Default | Description |
229
+ |---|---|---|---|
230
+ | `sura` | `number \| string` | - | Sura number (1–114). Required when using `aya`. |
231
+ | `aya` | `number \| string` | - | Single aya or verse range (e.g., `255`, `"8-10"`). |
232
+ | `page` | `number \| string` | - | Full Mushaf page number (1–604). Mutually exclusive with `sura`/`aya`. |
233
+ | `words` | `string` | - | 1-based word index or range (e.g., `"1:2"`, `"3-10"`, or single index `"5"`). |
234
+ | `highlight` | `string` | - | 1-based word range to mark soft yellow (same format as `words`). Works with or without `words`, and with `page` too. |
235
+ | `error` | `string` | - | 1-based word range to mark soft red (same format as `words`). Wins over `highlight` on overlap. |
236
+ | `headless` | `boolean \| string` | `false` | Set to `"true"` to remove top sura header chrome and copy/translate icons. |
237
+ | `notitle` | `boolean \| string` | `false` | Set to `"true"` to hide sura name text while retaining title frame decoration. |
238
+ | `data-font` | `string` | `"Hafs"` | Font family: `Hafs`, `Uthman`, `Amiri Quran`, `Amiri Quran Colored`, `me_quran`. |
239
+ | `data-name` | `string` | `"Madina05"` | Layout database dataset name. |
240
+ | `data-font-size` | `number \| string` | `16` | Font size in px (6–100; interpolated between 16 and 24). |
241
+
242
+ ## React wrapper
243
+
244
+ For React apps (web, or mobile via a Capacitor WebView), use
245
+ [`@tarekeldeeb/quran-madina-react`](https://www.npmjs.com/package/@tarekeldeeb/quran-madina-react),
246
+ a thin component wrapping the `<quran-madina-html>` tag — lives in this repo's [`react/`](react)
247
+ folder and is released in lockstep with this package.
248
+
249
+ ```bash
250
+ npm install @tarekeldeeb/quran-madina-react react
251
+ ```
252
+
253
+ ```jsx
254
+ import QuranMadinaHtml from "@tarekeldeeb/quran-madina-react";
255
+
256
+ <QuranMadinaHtml page={106} font="Hafs" />
257
+ ```
258
+
259
+ See [`react/README.md`](react/README.md) for the full prop reference and the Capacitor
260
+ (iOS/Android) packaging guide.
261
+
189
262
  ## Dev Setup
190
263
 
191
264
  The project is published on npm ``npm install quran-madina-html``, with sources, assets and distributables.
@@ -1,8 +1,2 @@
1
- <svg viewBox="0 0 1020 126" width="1020" height="126" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">
2
- <svg id="topleft" viewBox="0 -5000 5101 631" width="510" height="63" preserveAspectRatio="none">
3
- <path d="M5100-5000H0v634C3791-1835 16814-5000 5100-5000Zm-2610 631a390 390 0 00-62-206 318 318 0 00-194-163 621 621 0 00-133-24c-81 0-160 29-233 87s-127 138-159 238c-27-32-41-52-41-62 0-23 16-61 50-114 32-53 49-81 49-86 0-4-6-25-17-61 3-5 9-12 18-20 18 4 39 6 64 6s64-10 118-32 114-32 180-32c10 0 32 4 70 11s61 15 76 20 32 15 52 27 34 18 39 18c4 0 10-4 19-12 8-8 14-12 19-12h24c1 33 20 82 55 147l54 99c13 30 21 75 24 133 3 58 0 22 3 39 13386-10-3 360-75 0zm103 0c0-64 14-119 42-176s69-103 123-137 100-52 136-55 60-7 73-10c3-1 16-18 39-50s40-47 56-47h2040c6310-82-2238 2498-2510 476Zm2508-504h-2040c-15 0-37 15-64 46l-45 56a450 450 0 00-187 50c-37 18-72 48-105 90s-58 83-76 124a300 300 0 01-32-77c0-10 14-31 42-67 12 0 23-1 35-3 12-2 17-8 17-17l-60-20c-30-14-45-33-45-58v-42c69 15 113 22 132 22s44-6 75-17l85-33 40-10c14-4 23-10 30-16 6-16 20-36 40-60a250 250 0 01 136-50h2020c3140 377 3206 82 2 82zm-2310 31-68 33c-17 8-38 11-61 11-34 0-67-7-98-22-10-4-18-6-25-6-8 0-16 5-23 15a70 70 0 00-10 40c0 30 14 57 42 83 10 10 16 17 16 23 0 6-10 20-32 42a283 283 0 01-70-188c-8-10-15-15-23-15-7 0-20 5-41 14s-33 14-38 14-18-6-39-19l-43-25zm-1353 399 23 6c16 0 30-10 43-30s30-29 53-29c46 0 83 22 112 65 17 22 23 33 34 64 1788 206 222 950-85-2-13-20-27-51-72-51-16 0-32 4-47 13s-24 22-24 36c254 76-22 190-140-6 12-5 30-18 56-37s42-30 47-30zm922-180c70 75 105 160 105 256-85 478-618 392-712 56-14-54-17-63-17-58 0-21 7-72 30-120s42-81 60-104 40-45 69-68a358 358 0 01 226-73 320 320 0 01 239 112zM45-4366l1-586h2897c3 0 5 1 5 4s-10 14-32 33-35 31-40 37H1649a360 360 0 00-23-23l-16 23h-270c-7 0-14-6-23-18l-19-22a120 120 0 01-55 32c-28 10-52 14-73 14l-70-11H486l-117-24c-6 0-13 5-19 15l-100 1c3-8 9-18 17-30l-55-4c-23 5-44 18-63 41s-28 44-28 60v194l-23 75 1 28c1 4 5 10 12 20s10 17 10 20v217c2544 1168-76 18-76-96Zm1880-476a350 350 0 01-88 40c-10 0-25-4-46-12s-34-11-38-11c-23 0-34 17-34 53 0 7 4 34 12 79a704 704 0 00-100 181A320 320 0 00 1530-4530v-26c4-6 22-15 53-26s46-25 46-40c0-8-12-29-35-61a160 160 0 00 76-159zm-413 186 37-7c5 0 12 3 23 10s16 13 16 21-10 16-27 20l-30 7-10-13c-6-7-10-14-10-20Zm-280 289c0-17 10-33 26-50a350 350 0 00 43-34c12-28 18-50 18-63s-14-34-44-60c-2-26-7-46-16-61-20-38-48-56-82-56a130 130 0 00-37 4v-38a93 93 0 01 37-13c8 0 27 5 58 16l55 20-1 24c-2 26 3 48 13 64 10 17 30 32 60 46 28 13 46 23 53 30 14 10 21 24 21 38s-24 38-72 70-75 54-79 61c148 331-47 296-52 2zm180-430 120 24c22 0 53-21 94-64 9 19 13 30 13 34 0 31-19 60-56 85s-74 38-106 38c-5 0-15-6-30-18s-26-17-31-17c-14 0-20 7-20 20 0 11 4 20 15 24 30 4 50 10 58 17a218 218 0 01 31 109c0 17-7 36-20 57-9-18-23-41-43-70-12-10-32-23-60-40s-46-29-56-37l-2-30a40 40 0 01 20-35c12-8 19-24 19-46 0-7 0-16-2-25a67 67 0 01 57-26zM1064-4430v59c16 80-32 61-33 0 0-30 6-60 20-66 4 4 8 6 13 7zm33-223 38 7c4 0 12-3 22-9s17-9 20-9c20 0 36 8 47 23s16 30 16 44-2 27-5 34l30 24c18 13 27 24 27 31 0 8-4 19-12 30s-15 22-25 27c-8 2-16 6-26 12-3 13-9 29-16 48l-47 18h-60l-2-14 46-42c13-15 20-34 20-59s-7-46-22-63-33-26-55-26h-36c-10 4-25 18-43 40l-7-55c19-40 49-60 90-60zm424-156-104-24c-14 0-33 6-56 16s-38 23-42 36a110 110 0 00-33-12 400 400 0 01 24-56h284c-20 20-33 32-39 36-5 3-17 4-34 4zm-203 66c1 3 0 6-5 10-28-10-47-20-56-28 14 3 35 10 60 18zm-194 215c10 12 16 27 16 44s-13 34-38 53c-18-27-34-40-47-40s-33 10-57 34c-14-10-40-37-76-83s-55-72-55-77c0-15 10-36 28-62s39-40 60-40c38 15 57 30 57 43s-3 22-10 25c-8 3-13 6-15 10-6 10-10 30-10 62 0 46 14 70 40 70 15 0 26-10 32-30 5-19 17-29 34-29s30 7 41 20zM1000-4387a268 268 0 01-130 0c-8-2-21-11-40-29s-27-30-27-35c0-6 2-12 6-20l6-12h21c7 8 18 17 33 29l10-10c-15-30-30-50-41-63 4-10 12-20 21-32 11 22 37 55 77 100l64 72zm59-463 113 6c37 0 70-3 102-10-26 57-67 85-122 85-18 0-30 0-33-2l-23-11c-10-6-18-10-22-10-4 0-10 4-15 10l27 32c17 20 25 35 25 46s-2 16-7 16l-57 12c-2 0-14-8-36-26s-42-26-62-26-41 12-64 35-40 50-48 77c-10 29-26 70-48 125A360 360 0 01 633-4370c-138 133-242 80-76 0a1060 1060 0 00 141-81c66-57 98-120 98-190a160 160 0 00-17-75c-16-32-40-48-73-48-52 0-77 27-73 81h-20c-9-4-18-13-28-26s-16-24-16-33 7-20 21-33l26-26-10-9a569 569 0 01-92 35c-80-20-120-44-119-74v-19h60c50-2 120 7 210 24 26 6 53 16 81 32s48 35 57 56c8 10 14 16 18 16 40-46 77-77 113-90s78-21 124-21zM460-4466l21-6c12 10 36 32 72 68-19 9-31 13-38 13s-24-16-55-48zm-306 97c0-26 1-53 5-80 46 4 78-5 97-26v-16c-8-5-17-12-27-22s-14-20-14-26c0-21 13-32 38-32 30 0 44 20 44 60s-23 79-70 120l-3 2c-2 0-6 15-6 21 209 209-63 140-64 0zm61-307 20 6a30 30 0 00 21-8l-8-7-6-7c-24-2-41-6-53-14s-21-22-28-43c-7-20-10-39-10-55 0-44 25-74 75-92-2 60 6 96 24 111 110 88 168 133 173 133s20-10 43-30 47-28 70-28c4 0 19 12 42 35s42 34 57 34 25-6 30-17c6-12 8-23 5-34a780 780 0 01 92 46v40l-8 6c-67-27-120-40-155-40s-71 8-107 24-62 40-80 70l14 2c5 0 14-5 23-15l18-16c38-20 75-30 108-30s68 5 102 16 57 23 68 38c-19 22-30 33-34 33-3 0-15-5-36-15s-50-14-92-14-80 13-114 40c-5 3-30 29-76 76-26 27-52 40-77 40h-30c30-63 46-102 46-120s-8-36-23-60-34-35-59-35c-13 0-26 7-41 19s-23 26-23 42 8 36 23 60l-11 3a70 70 0 01-21 4c-27-16-42-30-47-40a168 168 0 01 17-104c17-36 40-54 68-54zm291-64-42 30c-18 11-30 18-35 18s-35-20-90-60-83-65-82-72v-25h108c13 27 35 50 65 71s55 34 76 38" display="inline"/>
4
- </svg>
5
- <use href="#topleft" style="transform:matrix(1, 0, 0, 1, 1020, 126) rotate(180deg)"/>
6
- <use href="#topleft" style="transform:matrix(1, 0, 0, 1, 0, 126) scaleY(-1)"/>
7
- <use href="#topleft" style="transform:matrix(1, 0, 0, 1, 1020, 0) scaleX(-1)"/>
8
- </svg>
1
+ <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 -500 16320 2000'><path fill='black' d='M16315 -516h-16286v2007h16286v-2007zM15906 1198v51h-174q-28 -73 -108.5 -128t-134.5 -51q101 -71 134 -71q12 0 108 59t119 70t39.5 33.5t16.5 36.5zM15186 720l176 47q103 0 196 -68q34 -25 118 -108.5t125 -83.5h59l-48 79q-26 47 -26 109.5t33 108.5t97 46q33 0 72.5 -26.5t39.5 -69.5t-46 -108h59q37 0 54 43.5t17 86.5q0 104 -70 163q-15 12 -67.5 26.5t-58.5 16.5q9 13 30.5 17.5t76.5 21.5q20 23 40.5 73.5t20.5 80.5t-40.5 89.5t-88.5 59.5q-1 -12 0 -68.5q2.14551 -121.221 -108 -174.5q-92 -46 -104.5 -55.5t-56 -55.5t-53.5 -46q2 0 -82 47t-100 47t-81.5 -47t-76.5 -47q-51 0 -51 61q0 11 4 22h-34q-69 -33 -114 -65q-4 -49 11 -91q134 55 207 55q216 0 340 -144q-9 -9 -14 -5q-162 102 -308 102q-42 0 -106.5 -21.5t-93.5 -45.5l18 -47.5t34 -24.5zM16063 597l-53 -8q-30 0 -62 19t-32 38.5t33 54.5t33 49.5t-17 33.5t-54 19t-62.5 -37.5t-25.5 -86t41 -97.5q9 -11 54 -52t45 -52.5t-18 -28.5q-103 -93 -103 -185.5t70 -92.5q60 0 60 51q0 36 -66 75v27q34 34 82 41l75 2q15 115 0 230zM15226 1056q0 27 -32.5 27t-58.5 -45q73 18 91 18zM15580 339v43q-76 77 -92 77q-36 0 -55 -34q9 -7 55.5 -51.5t60 -44.5t21 5t10.5 5zM14622 1251l-181 -10q-82 0 -161 18q-2 -28 82 -93t131 -65t90 25q22 6 30 -2q-3 -4 -39 -46t-36 -59.5t12 -19.5h116q74 56 115 56q104 0 173 -148l90 -222q21 -35 89 -102.5t103 -67.5t66 33q-260 157 -260 404q0 47 42 112t103.5 65t89 -44.5t26.5 -93.5h33q53 34 65 67q-4 32 1 90q85 -28 81 -28q47 0 114.5 44t85.5 81v32h-96q-18 1 -337 -39q-4 -1 -94 -28q-37 -12 -93.5 -60.5t-65 -48.5t-98.5 60.5t-127.5 75t-149.5 14.5zM15972 3q55 0 97.5 67t42.5 120t-25.5 91t-68.5 38q-13 0 -23 -5.5t-13 -5.5q36 -55 36 -90t-31.5 -69t-79 -34t-84.5 53t-37 110q0 29 74 180h-50q-58 0 -121 -64q-110 -113 -122 -121q-84 -65 -195 -65q-97.2861 0 -159 36q-20 11 -32 11q-33 0 -56 -62q17 -28 110 -53t137 -25q99 0 197 49q28 24 80 54q4 -7 -5 -31q-133 -128 -282 -128q-67 0 -264 65v-72q41 -33 147 -75q-2 4 -2 18.5t14 39t43.5 24.5t92 -55.5t67.5 -55.5q55 0 111 46t70 46t135.5 -99.5t138.5 -112.5q41 -32 41 -177q118 39 118 147q0 36 -17 85.5t-35 65t-59.5 21t-55.5 28.5l15 14zM15906 -275v43q-23 33 -139.5 120.5t-132.5 87.5t-55.5 -28.5l-71.5 -52.5q57 -8 129 -61.5t96 -108.5h174zM15032 617q0 35 -42 56q-17 -18 -55 -46q-9 9 -5 17.5t25 40t21 49.5t-33 51l-91 -123q-15 -21 -136 -134l145 -13q171 57 171 102zM14711 599q43 0 126 119.5t83 149.5t-45 85t-94 55q-14 0 -74 -30v-33q64 -52 64 -162t-65 -110q-22 0 -56 47t-72.5 47t-75.5 -30q3 -71 4 -78q9 -41 47 -60q56 37 82.5 37t47.5 -18.5t28 -18.5zM14343 1117q-9 0 -23 12q-42 -16 -76 -33.5t-39 -39.5h32q39 16 106 61zM14724 758v79q1 27 -44 71t-86 44q-11 0 -48.5 -18.5t-49 -18.5t-37 18.5t-48 18.5t-45.5 -24t-23 -56t23 -69q24 36 79.5 69.5t94.5 33.5t71 -26q2 -9 3 -13q-215 -2 -215 -175q0 -24 47 -106q-6 -6 -22 -6q-74 54 -74 146q0 34 11 66q-21 3 -61.5 -23t-40.5 -64t53.5 -54.5t51.5 -77.5q68 -49 88 -47h86q-8 15 -50 76.5t-42 100t31 79t74 40.5t87 -29.5t64 -53.5q19 19 22 19zM13887 1195l163 28q58 0 113 -37.5l55 -37.5q21 0 51 32q-27 28 -49 69h-454q71 -54 121 -54zM15022 335.5q10 15.5 10 29.5t-38.5 54t-83.5 49.5t-102 9.5t-92 -13l109 -116q74 -81 118 -160q11 11 21.5 30.5t11.5 20.5q-65 66 -65 98q0 14 4 15q8 2 10 4q22 -11 54 -46h33q0 9 10 24.5zM14441 -266l181 -10q185 0 269 69q44 50 116 109q34 -58 113 -109t130 -57q308 -40 337 -39h96v33q-73 116 -190 116q-12 0 -72.5 -28t-73 -28t-14 7.5t-3.5 10.5q2 3 49 44q25 24 25 45t-26 59t-44 38h-31q3 -130 -117 -130q-78 0 -116 74q-28 54 -28 111q0 222.417 217 349l255 129q68 41 68 81q0 13 -5.5 23t-5.5 13h-34q-48 -60 -198.5 -134t-193.5 -108q-88 -70 -127 -173l-45 -145q-31 -68 -80.5 -116t-95 -48t-102 41.5t-54.5 41.5q-10 0 -102 -30q6 -33 22 -80q27 -20 61 -60l-15 -15q-92 36 -133 36q-132 0 -195 -137q90 17 162 17zM14669 406v124q0 13 -10 29t-10 20h-34q-1 -6 -1 -183q12 -6 31.5 -1t23.5 11zM15218 -75q-14 5 -50 25t-50 25q-2 -18 24.5 -41.5t50 -23.5t25.5 15zM14054 1176l-167 -28q-55 0 -149 67l-24 17q-19 -20 -31 -20v-32q5 -57 89 -114.5t148 -57.5t94 28t45 28t21 -8t13 -16v-35q-17 -12 -61 -26.5t-62.5 -36.5t-36.5 -74.5t-18 -82t28 -65.5q30 54 125.5 114.5t101.5 65.5q34 26 34 67q0 11 -28 53t-28 59t18 36q-43 61 -112 61zM14930 129q0 13 -89.5 125.5t-121.5 129.5q-55 -55 -88.5 -55t-77.5 65q-20 -16 -40.5 -46.5t-20.5 -49.5t22.5 -54.5t59.5 -35.5t66 46.5t48 46.5q65 0 65 -112q0 -68.3333 -28 -105.667q-28 -37.3333 -28 -51.3333t38.5 -40t54.5 -26q45 0 92.5 57.5t47.5 105.5zM13807 989l-50 -89q48 -32 83 -32t48 26l27 56zM14427 999l64 -8v52q-41 21 -64 21q-65 0 -164 -67q-4 -26 -9.5 -54t-26.5 -50t-151 -103q-58 -36 -58 -69.5t81.5 -100t123 -89t37.5 -37.5q-15 -31 -36 -43q-206 -118 -206 -169q0 -29 31 -61l121 -71q95 -61 95 -132q0 -27 -15 -58q176 -59 177 -59q23 0 64 21v51q-4 3 -63.5 3t-102 53t-51.5 136q-70 70 -70 94q0 92 69 138q27 18 29 20q41 60 41 89t-41 82q-26 23 -57.5 55t-31.5 70.5t34 76.5l46 44q2 34 15 94q11 27 54.5 49t64.5 22zM14502 50l60 -10q57 0 100.5 35.5t43.5 88t-14 63.5q-44 -55 -69 -65q-3 -1 -51.5 -1t-87 36t-38.5 94t20 87q36 34 91 97l-108 12q-27 -15 -66 -23q-11 -30 -34 -82l-52 -33q-47 -32 -47 -76q0 -22 90 -90q-5 -24 -4 -83q1 -21 37 -49.5t53.5 -28.5t42 14t33.5 14zM13560 1161l-21 -127q0 -18 7 -33q60 -96 149 -262q71 20 172 38v34l-94 21q-72 22 -72 60q0 10 56 122q-28 22 -74.5 82t-46.5 87t18 46l-428 9q65 -35 89.5 -44t78.5 -9l130 28q36 0 36 -52zM14554 -331l-113 18q-89 0 -133 -22q-26 -22 -71 -52l-36 43.5q-18 21.5 -31 21.5h-429q-8 -14 -26 -37q-13 13 -35 37h-1969q-53 -72 -114 -119h4644v1857h-4644q69 -53 114 -119h1969l35 37q8 -14 26 -37h429q15 0 38 29.5t28 35.5q69 -74 205 -74l113 18h984l188 37q19 0 27 -24q58 0 162 -1q-13 34 -27 47l89 6q56 0 100 -66.5t44 -115.5v-287q0 -13 16.5 -42t18.5 -38.5t2 -53.5t-6.5 -55.5t-18.5 -31t-12 -32.5v-342q0 -13 16.5 -37t18.5 -34.5t2 -41.5l-37 -122v-305q0 -70 -59.5 -117t-110.5 -47t-63 6q10 20 28 48h-166q0 -26 -24 -26l-188 38h-984zM14315 -133q-65 43 -80 42h-31q44 -29 111 -42zM13976 384l37 -9q13 0 20.5 6t29 21.5l61.5 46.5q53 41 51 55q-58 39 -182 141q-18 -37 -34 -37l-55 71q-32 41 -65.5 41t-76.5 -17t-52 -34q13 -51 51 -107q41 27 78 27t75 -28t38 -67.5t-40 -60.5t-71 -21q-100 0 -146 127l-63 206q-90 182 -164 277q47 50 35 125q-63 -18 -108 -18t-185.5 51.5t-269.5 51.5t-207 -28t-144.5 -65.5t-75 -37.5t-41 25.5t-44.5 29.5q-16 -113 -61 -197q-6 -11 -43.5 -63t-37.5 -66t60 -157q81 195 233.5 316.5t358.5 121.5q361 0 565 -352l86 -267q80 -201 233 -201q45 0 84.5 46.5t69.5 46.5zM13864 -154l190 -38q59 0 90 40q-2 29 -4 75l49 54q15 18 15 50q0 56 -104.5 111t-126.5 104q-8 20 -25 59q-33 -65 -33 -98.5t14.5 -88.5t33 -76.5t95.5 -28.5q24 -19 24 -38l-7 -33h-42q-4 2 -36.5 29t-44.5 27q-57 0 -146 -49q-114 -62 -114 -147q0 -10 22 -55q104 103 150 103zM13836 22l59 10v33q-15 35 -30 50q-4 -2 -56 -15q-30 -8 -33 -38q40 -40 60 -40zM14050 -248l-168 38q-39 0 -53 -7.5t-63 -56.5h454q19 29 39 88q-5 4 -26.5 10.5t-25.5 11.5q-7 -31 -64.5 -57.5t-92.5 -26.5zM13510 -238l-125 36q-34 0 -84.5 -26t-74.5 -34h316q106 2 112 9q-15 23 -15 51q0 73 127 200q-56 84 -56 89q0 34 64 58q41 15 73 19q6 9 21 28v42q-112 19 -165 29q-86 -202 -158 -293q19 -61 19 -122q0 -86 -54 -86zM13543 468q0 14 -16.5 63l-18.5 55q-131 478 -566 478q-247 0 -409.5 -168t-162.5 -398.5t167.5 -409t386.5 -178.5q103 0 196 31l147 74q68 33 172 202t104 251zM12039 1167l178 46q69 0 69 -102q0 -29.6471 -42 -82.3235q-42 -52.6765 -42 -64.1765t20 -36t21 -28.5q7 -2 21 -3q83 103 93 162q2 8 4 131q0 21 13 24q-2 -1 21.5 -1t70 -23t58.5 -23t68.5 31t75.5 40h-819q130 -71 190 -71zM12658 -263q-95 71 -113.5 71t-67.5 -23t-65.5 -23t-39.5 25q0 194 -119 300q-2 -3 -21.5 -29.5t-19.5 -38.5t29.5 -42t32.5 -36q31 -65 31 -98.5t-17.5 -57t-43.5 -23.5q5 0 -69 23t-127 23t-87 -14t-112 -57h809zM13389 -154l115 -9q3 104 -15 143l88 137q68 113 68 174q0 16 -25.5 48t-45.5 45q-69 -239 -247.5 -379.5t-362 -140.5t-351.5 105t-241 292q-49 124 -57 215l-14 165q-24 162 -142 298q-60 0 -78 35q159 50 159 141q0 17 -22 61q-86 -39 -106 -43t-75 -4t-109.5 20l-109.5 42q-3 1 -65 15.5t-82 35.5q-22 39 -66 97q-22 18 -101.5 48.5t-135.5 30.5h-6392q-41 0 -123 -26.5t-107 -47t-44 -59t-27 -43.5q-54 -30 -269 -101q-35 -12 -111.5 -12t-119 23.5l-42.5 23.5q-11 0 -19.5 -21.5t-8.5 -39.5q0 -48 53.5 -89t97.5 -49q8 -4 8 -18q-21 -11 -80 -20q-84 -90 -133 -260q-27 -95 -28 -159q-2 -175 -107 -356q-123 -212 -311 -260q-152 -40 -213 -40q-195 0 -373 140.5t-254 379.5q-66 -75 -66 -98.5q0 -56.0323 79 -182.266t79 -137.234t-26 -98q6 -12 29 -32q42 10 101 10t189.5 -51.5t288.5 -51.5q22 0 110 18.5t122.5 32t84.5 42t61 28.5t31 -18.5t30 -18.5h39q3 79 88 235t87 158q31 74 38 212.5t14 179.5q25 137 138 282.5t247 184.5q96 29 186 43l83 84q84 82 131 82h6486q3 0 36 -13q53 -28 73 -46q39 -48 104 -106q22 -10 61.5 -12.5t41.5 -3.5q51 -10 157 -65q168 -85 274 -310q35 -74 51.5 -265t36 -241.5t94 -183t83.5 -215.5h40q12 0 32.5 18.5t30.5 18.5t59.5 -28.5t86 -42.5t122 -32t107.5 -18q146 0 290 51.5t194 51.5zM12165 492q0 167 -108 335t-296 224q-54 7 -149 25q-20 5 -88.5 85t-127.5 80h-6448q-31 0 -81 -29t-71 -66q-33 -63 -64 -70q-55 -7 -150 -25q-189 -56 -296 -224t-107 -322.5t67 -292.5t197 -219t217.5 -88.5t117.5 -15.5q8 -3 62 -79t89 -76h6486q38 0 91 76t60 79q45 15 120 26t94 17q76 20 182.5 109.5t132.5 165l51 147.5q19 62 19 138zM12248 -182v71q1 49 -66.5 83.5t-93.5 32.5q-7 5 -7 19q26 9 82 19q67 85 67 106t-52 124q-57 -180 -242 -304.5t-345 -117.5q0 -1 -84 -104q-47 -60 -92 -60h-6486q-38 0 -103 74l-73 90q-128 0 -298 80q-90 43 -168 143t-122 199q-51 -102 -51 -123.5t67 -106.5q28 -2 56 -5q28 -5 27 -28l-95 -31q-73 -34 -73 -93v-68q165 36 211.5 36t120 -28l136.5 -53q29 -7 62 -16.5t48 -24.5q17 -39 65 -97q117 -78 218 -78h6430q23 0 113 32.5t107 47.5t37.5 51.5t28 45t164 64.5t206 56t205.5 -36zM4128 1213l177 -46q94 0 190 71h-819q25 -10 80.5 -40.5t65.5 -30.5t56.5 23t58.5 23h30q13 -3 17 -24q-2 -50 2 -130q7 -40 42.5 -97.5t73.5 -64.5q1 3 20 30.5t19 44t-9 15.5q-6 10 -40 52.5t-34 71.5q0 102 70 102zM4495 -263l-107 53q-42 18 -99 18q-81.231 0 -156 -36q-22 -10 -40.5 -10t-36 25t-17.5 63.5q0 70.1774 69 132.5q25 23 25 37.5t-52 66.5q-108 -125 -110 -301q-20 -24 -37.5 -24t-66.5 23t-61 23t-61.5 -31t-68.5 -40h819zM2332 375l36 9q38 0 68.5 -46.5t85.5 -46.5q109 0 179 104q46 69 89 213t60 170q214 333 556 333q411 0 591 -438l61 158q0 11 -49 84.5t-61 108.5q-11 48 -32 132q-13 -3 -45 -29t-43.5 -26t-74 38.5q-150.162 92.5 -314.831 92.5q-164.669 0 -304.169 -51.5t-170.5 -51.5h-125v-50q0 -13 17.5 -36.5t19.5 -28.5q-119 -123 -165 -270q-22 -60 -56 -167q-43 -165 -151 -165q-39 0 -75.5 20t-36.5 54t34.5 68.5t76.5 34.5t81 -27q50 75 50 95t-5 25t-5 8q-120 30 -116 30q-42 0 -61.5 -43t-67.5 -69l-29 37l-103 -85q-63 -51 -79 -79q26 -13 88.5 -59.5t75.5 -46.5zM3806 88.5q168 178.5 168 409t-163 398.5t-409 168q-442 0 -567 -478q-34 -130 -34 -118q0 -52 54.5 -165t95.5 -167.5t111 -109q149.633 -116.5 362.816 -116.5q213.184 1.52588e-05 381.184 178.5zM2820 1213l130 -28q42 0 84 17.5l84 35.5h-418q4 -17 4 -34q0 -89 -116 -190q55 -112 55 -122q0 -39 -78 -62q-44 -9 -89 -20l11 -43h21q30 0 68 -14t45 -14h29q52 85 147 262q7 15 7 33l-21 125q0 54 37 54zM2294 1223l163 -28q24 0 67.5 14t52.5 40h-453q-21 -41 -48 -69q32 -32 44 -32t63.5 37.5t110.5 37.5zM2587 901l-50 89q-17 -9 -108 -40l27 -56q18 -26 62 -26t69 33zM2252 1040q15 24 35.5 24t39.5 -28t78.5 -28t126 32t98.5 71t31 69v32q-11 0 -32 20q-107 -84 -172 -84l-168 28q-68 0 -111 -61q12 -22 12 -46.5t-25 -58.5t-25 -43q0 -43 52 -78l90 -51q82 -56 124 -118q23 68 23 87.5t-32.5 91.5t-64.5 78q-47 8 -80 28v35zM2140 1056q-7 15 -52.5 44t-58.5 29q-27 0 -27 -25q99 -49 107 -48h31zM1790 1306l113 -18q95 0 133 21q26 22 71 53q1 -1 28 -33t39 -32h429q9 14 26 37l36 -37h1967q54 72 114 119h-4643v-1857h4634q9 0 9 7t-52 52.5t-62 59.5h-1967q-13 -15 -36 -37q-8 13 -26 37h-429q-15 0 -37 -29.5t-29 -35.5q-23 30 -89 52t-116 22l-113 -18h-984l-187 -38q-15 0 -30 24q-57 0 -161 2q9 -20 28 -48l-88 -6q-56 10 -100.5 65.5t-44.5 96.5v309l-37 120q0 37 2 45.5t18.5 32.5t16.5 32v347q0 14 -16.5 37.5t-18.5 28t-2 48.5t2 60t18.5 41.5t16.5 33.5v291q0 75 54 127.5t132 52.5q35 0 47 -6q-9 -19 -28 -47h166q0 25 25 25l187 -37h984zM3109 -264q-118 62 -141 62t-73.5 -18t-60.5 -18q-55 0 -55 85q0 18 19 126q-74 85 -158 291q-86 -29 -164 -29v-42q9 -15 83.5 -42.5t74.5 -63.5q0 -20 -56 -98q124 -85 124 -219q0 -17 -2 -34h409zM2045 648q40 37 40 72.5t-50 60.5q-21 1 -51 7q5 -15 5 -58q0 -150 -77 -150q-21 0 -14 6q47 94 47 106q0 41 -23.5 89t-54.5 61q-35.7693 15 -106 15q-21 2 -30 16q33 33 73 33t98 -34.5t77 -68.5q0 20 21 20v79q-8 12 -35.5 31t-41 19t-40 -18.5t-37.5 -18.5t-48 18.5t-49 18.5q-54 0 -92 -48.5t-38 -88.5t23 -76q87 83 137 83t85 -37t35 -83.5t-31 -95.5q-28 -31 -62 -80h87q49 -1 72.5 40.5l42.5 75.5q14 2 37 6zM2448 32l60 -10q11 0 36 14.5t25 35.5t-43 30t-46 13q-3 -4 -17.5 -21.5t-14.5 -31.5v-30zM1853 991l64 8q134 0 134 -141q0 -11 -1 -23q19 -15 50 -48q31 -52 31 -76.5t-31 -76.5q-25 -18 -58 -46q-41 -54 -41 -93.5t41 -78.5q30 -20 68 -56q30 -67 30 -100t-71 -95q-4 -63 -25 -99q-50 -90 -132 -90q-32 0 -59 8v-62q40 -21 59 -21t93.5 27t87.5 31q0 5 -2 38.5q-3.76562 63.0742 21.6172 103.287t94.3828 72.2129t86 48q34 27 34 61t-116 113.5t-126 96.5q8 12 125 100.5t117 122.5q0 15 -21.5 42t-37.5 34q-74 32 -133 88.5t-54 116.5q-21 22 -75.5 45t-83 23t-69.5 -21v-52zM1842 737q-31 30 -71.5 30t-76.5 -47t-61 -47t-42.5 38.5t-17.5 82.5q0 108 64 151v33q-60 30 -73 30q-42 0 -91 -50.5t-49 -86.5t84 -154t125 -118q12 0 37.5 18.5t46.5 18.5t74 -37q39 24 48 67q2 7 3 71zM2289 -192l191 38q52 0 150 -103q22 45 22 55q0 75 -91 135.5t-169 60.5q-12 0 -49 -28t-49 -28q-33 0 -33 33q0 26 25 38q73 9 93 27.5t35 75.5t15 98.5t-33 90.5q-19 -42 -68 -111q-28 -24 -95 -64t-90 -60q-3 -13 -3 -48t30.5 -55.5t30.5 -73.5q0 -18 -2 -40q32 -41 90 -41zM1903 1241l-182 10q-117 0 -169.5 -21.5t-127 -75t-80.5 -53.5q-21 0 -16 2q-19 24 -55 60q-94 61 -179 75q-263 42 -337 39h-96v-32q26 -50 92.5 -87.5t93.5 -37.5t52.5 14t35.5 14q22 0 11 -7q-12 -58 -3.5 -82.5t30.5 -46.5t38 -21h30q2 57 31.5 97.5t83 40.5t100.5 -61.5t47 -115.5q0 -99 -56.5 -204.5t-164.5 -171.5q-30 -18 -30 -40q42 -21 64 -21t67 41l96 99.5q48 49.5 85 179.5q63 220 200 220q50 0 114 -55h117q0 9 10 22l-75 100h23q68 -21 108.5 -21t118 60.5t85.5 96.5q-92 -17 -162 -17zM1209 1043q-32 40 -61.5 40t-29.5 -27q-12 0 91 -13zM1730 396v183h-35q-20 -81 -20 -111q0 -70 33 -83q10 9 22 11zM1628 534q-51 29 -113.5 107l-114.5 144q-32 -33 -32 -50.5t23 -48.5t23 -42.5t-5 -16.5q-24 19 -66 46q-2 -3 -16.5 -23.5t-14.5 -32.5q0 -47 92 -74.5t146.5 -27.5t77.5 19zM1782 40l61 10q11 0 35.5 -14t33.5 -14q47 0 73 36t26 71.5t-8 54.5l49 37q42 32 42 51t-18 48.5t-40 41.5q-19 5 -42 20q-8 30 -26 76l-75 29h-95l-5 -22l74 -68q32 -34 32 -93.5t-34.5 -101t-89 -41.5t-57.5 1q-24 9 -68 64l-12 -89q46 -97 144 -97zM2461 -210l-167 -38q-33 0 -89.5 25.5t-66.5 57.5q-41 -20 -53 -20q10 -31 39 -89h453q-47 49 -61 56.5t-55 7.5zM2136 -105q3 7 -8 15q-68 -22 -89 -44q34 8 97 29zM1826 238.5q26 30.5 26 71t-62 84.5q-43 -65 -75 -65t-91 55q-34 -22 -122 -132.5t-88 -122.5q0 -36 45.5 -99.5t94.5 -63.5q93 36 93 69t-18 40t-23 14q-14 24 -14 100q0 112 64 112q35 0 49 -46.5t54.5 -46.5t66.5 30.5zM1628 465q-38 13 -97 13t-113 -13q-18 -4 -62 -46.5t-44 -56.5t10 -30.5t10 -20.5h33q17 19 53 46l15 -15q-36 -72 -65 -101q11 -23 34 -52q27 53 123 159.5t103 116.5zM856 1065q-75 13 -148 67.5t-96 116.5h-174v-49q-1 -14 17 -38t31 -30q63 -29 145.5 -81t89.5 -52q34 0 135 66zM981 767l178 -47q15 0 33 20t18 40q0 34 -84.5 56.5t-142.5 22.5t-170 -40q-21 -8 -61 -35t-55.5 -27t-8.5 6q125 143 340 143q72 0 117 -18l90 -37q19 58 11 91q-92 66 -117 66h-30q3 -13 3 -26q0 -58 -50 -58q-15 0 -79.5 47t-79.5 47t-99 -47l-82 -47q-13 0 -56.5 48.5t-62.5 59.5q-60 25 -164 96q-36 37 -38 90.5t-2 105.5q-66 -17 -97.5 -67t-31.5 -99t60 -137l65 -12q45 -10 44 -30q-197 -11 -197 -203q0 -137 130 -128q-46 69 -46 100.5t32.5 66.5t86 35t88.5 -43.5t35 -117.156t-74 -182.344h59q45 0 113 66q106 106 133 126q91 68 192 68zM1721 -276l182 10q87 0 162 -17q-62 137 -194 137q-44 0 -53.5 -3.5t-36 -18t-36 -14.5t-24.5 14q4 6 44 52.5t40 72.5t-11 27l-91 19q-6 0 -57.5 -41.5t-99.5 -41.5t-103 55.5t-77 123.5t-77 199q-59 101 -246.5 195t-235.5 148q-8 3 -22 4q-22 -22 -22 -37q0 -49 182 -138t201 -106q157 -137 157 -305q0 -65 -28 -119q-38 -76 -116 -76q-126 0 -118 129h-32q-20 -11 -44.5 -41.5t-24.5 -53t33 -52.5t41 -42l-15 -14q-131 56 -147 56q-192 -48 -191 -118v-31h96q119 -4 337 39q61 12 129 51t91 89q20 26 28 26q95 -112 182 -145t197 -33zM764 339l33 -10q29 22 115 108q-45 22 -60 22t-88 -77v-43zM335 589l-55 8q-14 -114 1 -230q111 8 156 -43v-26q-20 -11 -42.5 -35.5t-22.5 -40.5q0 -51 60 -51q70 0 70 94.5t-110 191.5q-1 2 -6 4.5t-5 18.5t48.5 58t49.5 44q42 47 42 98t-24.5 87t-73.5 36q-21 0 -40.5 -15.5t-19.5 -33.5t32.5 -53t32.5 -54.5t-33 -38.5t-60 -19zM372 3l32 9q19 0 33 -13q-5 -5 -12.5 -11.5t-10.5 -10.5q-56 -4 -84.5 -23t-44.5 -68.5t-16 -87.5q0 -105 120 -147q-5 141 39 177q265 212 276.5 212t68.5 -46t111 -46q12 0 68 55.5t91 55.5t49 -28.5t7 -53.5q54 21 148 74v62l-13 11q-162 -65 -248 -65t-171 40t-127 112q8 2 21.5 2t36.5 -23t28 -26q93 -49 173.5 -49t163.5 26t108 62q-45 52 -53.5 52t-57.5 -23.5t-147.5 -23.5t-183.5 65q-10 8 -121 121q-63 65 -123 64h-49q74 -150 74 -190.5t-36 -96.5t-94 -56q-31 0 -67 29.5t-36 67.5t37 96q-2 0 -18.5 5.5t-33.5 5.5q-63 -38 -75 -64q-3 -8 -3 -56t30 -110q41 -86 110 -86zM837 -100l-68 47q-43 29 -55.5 29t-144.5 -96.5t-131 -114.5v-40h174q31 65 103 115t122 60zM14762 1131h-55l10 35q28 0 45 -35zM14677 1131h-54l21 25h33v-25zM14604 115q-12 -19 -42 -19q-78 0 -143.5 46t-65.5 131q0 41 24.5 92t62.5 56q-41 -137 -41 -143q0 -77 50 -109t114 -30q16 -5 41 -24zM14753 -165l-27 -11v13l23 11zM14686 -191l-53 10q0 5 10 13t10 13q10 -7 21.5 -16t11.5 -20zM1721 1132h-54v24zM1637 1141l-54 -11q0 16 20 36q22 0 34 -25zM1992 273q0 -93 -68 -135t-142 -42q-29 0 -42 13q10 18 43.5 24t62.5 12q99 36 99 133q0 27 -45 142q41 3 66.5 -49t25.5 -98zM1701 -191h-43q0 20 32 37q19 -20 11 -37z'/>
2
+ </svg>
@@ -1 +1 @@
1
- quran-madina-html{--qmh-background:#F5F5DC;--qmh-header:black;display:inline-flex;direction:rtl;background-color:color-mix(in srgb,var(--qmh-background) 10%,transparent);border-radius:5px;overflow:hidden}quran-madina-html-header{background-color:color-mix(in srgb,var(--qmh-header) 20%,transparent);font-size:smaller;display:block;padding:0 5px 0 10px;color:color-mix(in srgb,currentColor 60%,transparent);height:25px;line-height:25px}quran-madina-html-line{text-align:right;white-space:nowrap;transform-origin:top right;margin-right:5px}quran-madina-html.quran-madina-html-inline quran-madina-html-line::before{content:"\201D";color:color-mix(in srgb,currentColor 50%,transparent)}quran-madina-html.quran-madina-html-inline quran-madina-html-line::after{content:"\201C";color:color-mix(in srgb,currentColor 50%,transparent)}.quran-madina-html-part{transition:background-color .5s ease}.quran-madina-html-word-hidden{visibility:hidden}quran-madina-html-line:has(.quran-madina-html-sura-start){background-image:url(../assets/img/sura_border_sym4.svg);background-size:95% 100%;background-position:center;background-repeat:no-repeat}svg.quran-madina-html-icon{float:left;padding:4px 4px 0 7px;border-radius:5px}svg.quran-madina-html-icon:hover{background-color:color-mix(in srgb,var(--qmh-header) 50%,transparent)}svg.quran-madina-html-icon path{fill:color-mix(in srgb,currentColor 60%,transparent)}quran-madina-html-aya-popup{display:none;position:fixed;direction:rtl;z-index:1000;align-items:center;gap:2px;background-color:color-mix(in srgb,var(--qmh-header) 85%,transparent);border-radius:6px;padding:2px 4px;box-shadow:0 2px 10px rgba(0,0,0,.35)}quran-madina-html-aya-popup.quran-madina-html-open{display:flex}quran-madina-html-aya-popup svg.quran-madina-html-icon{float:none;padding:4px}quran-madina-html-aya-popup svg.quran-madina-html-icon path{fill:var(--qmh-background)}
1
+ quran-madina-html{--qmh-background:#F5F5DC;--qmh-header:black;--qmh-highlight:#fff3b0;--qmh-error:#f5c6cb;--qmh-highlight-text:#1a1a1a;--qmh-error-text:#1a1a1a;display:inline-flex;direction:rtl;background-color:color-mix(in srgb,var(--qmh-background) 10%,transparent);border-radius:5px;overflow:hidden}quran-madina-html[data-qmh-text-scheme=dark]{--qmh-highlight:#5c4600;--qmh-error:#6b1a24;--qmh-highlight-text:#ffffff;--qmh-error-text:#ffffff}quran-madina-html-header{background-color:color-mix(in srgb,var(--qmh-header) 20%,transparent);font-size:smaller;display:block;padding:5px 5px 5px 10px;margin-bottom:5px;color:color-mix(in srgb,currentColor 60%,transparent);height:25px;line-height:25px}quran-madina-html-line{text-align:right;white-space:nowrap;transform-origin:top right;margin-right:5px}quran-madina-html.quran-madina-html-inline quran-madina-html-line::before{content:"\201D";color:color-mix(in srgb,currentColor 50%,transparent)}quran-madina-html.quran-madina-html-inline quran-madina-html-line::after{content:"\201C";color:color-mix(in srgb,currentColor 50%,transparent)}.quran-madina-html-part{transition:background-color .5s ease}.quran-madina-html-word-hidden{visibility:hidden}.quran-madina-html-word-highlight{background-color:var(--qmh-highlight);color:var(--qmh-highlight-text,currentColor)}.quran-madina-html-word-error{background-color:var(--qmh-error);color:var(--qmh-error-text,currentColor)}quran-madina-html-line:has(.quran-madina-html-sura-start){position:relative}quran-madina-html-line:has(.quran-madina-html-sura-start)::before{content:"";position:absolute;inset:0;background-color:currentColor;-webkit-mask-image:url(../assets/img/sura_border_sym4.svg);mask-image:url(../assets/img/sura_border_sym4.svg);-webkit-mask-size:95% 100%;mask-size:95% 100%;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;mask-mode:alpha;pointer-events:none}svg.quran-madina-html-icon{float:left;padding:4px 4px 0 7px;border-radius:5px}svg.quran-madina-html-icon:hover{background-color:color-mix(in srgb,var(--qmh-header) 50%,transparent)}svg.quran-madina-html-icon path{fill:color-mix(in srgb,currentColor 60%,transparent)}quran-madina-html-aya-popup{display:none;position:fixed;direction:rtl;z-index:1000;align-items:center;gap:2px;background-color:color-mix(in srgb,var(--qmh-header) 85%,transparent);border-radius:6px;padding:2px 4px;box-shadow:0 2px 10px rgba(0,0,0,.35)}quran-madina-html-aya-popup.quran-madina-html-open{display:flex}quran-madina-html-aya-popup svg.quran-madina-html-icon{float:none;padding:4px}quran-madina-html-aya-popup svg.quran-madina-html-icon path{fill:var(--qmh-background)}
@@ -1,2 +1,2 @@
1
- /*! quran-madina-html 09-07-2026 */
2
- !function(){var C="quran-madina-html",r=/localhost/.test(document.location.hostname)?"../":`https://www.unpkg.com/${C}/`,L={content:"Loading .."},a=/[\u0621-\u064A\u0671-\u06D3]/,M="﷽";function S(e,t){return 1===t&&0!==e}var s={};var c={};function u(i,e,t,n){var a,r=!n&&function(e){if(s[e])return s[e];try{var t=sessionStorage.getItem("quran-madina-html:"+e);if(t)return s[e]=JSON.parse(t)}catch(e){}return null}(i);r?e&&setTimeout(function(){e(r)},0):c[i]?c[i].push({success:e,error:t}):(c[i]=[{success:e,error:t}],(a=new XMLHttpRequest).onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){var e=c[i];if(delete c[i],200===a.status){var t=JSON.parse(a.responseText),n=i,r=t,o=a.responseText;s[n]=r;try{sessionStorage.setItem("quran-madina-html:"+n,o)}catch(e){}e.forEach(function(e){e.success&&e.success(t)})}else e.forEach(function(e){e.error&&e.error(a)})}},a.open("GET",i,!0),a.send())}function O(e){console.log(C+"> "+e)}function N(e){return null!=e&&(""===(e=String(e).trim().toLowerCase())||"true"===e||"1"===e||"yes"===e)}function P(e){return Array(2).fill(e.split("-")[0]-1)}function I(e){return 2==e.split("-").length?e.split("-").map(e=>parseInt(e)+1):Array(2).fill(parseInt(e.split("-")[0])+1)}function k(e,t){if(null!=e&&"auto"!==e){if("no"===e)return!0;O("yes"===e?'inline="yes" is not implemented yet; falling back to "auto"':"Bad inline parameter: "+e)}return t}function p(e){return a.test(e)}function _(e){var t=0;return e.t.split(/\s+/).forEach(function(e){p(e)&&(t+=1)}),t}function x(e,t="class",n="lightgrey",r="transparent"){var o="tag"===t.toLowerCase()?document.getElementsByTagName(e):document.getElementsByClassName(e);Array.from(o).forEach(function(e){e.onmouseover=function(){Array.from(o).forEach(function(e){e.style.backgroundColor=n})},e.onmouseout=function(){Array.from(o).forEach(function(e){e.style.backgroundColor=r})}})}function D(e,t){var n=(e,t)=>String(e).padStart(t,"0"),n=[C+"-part",`${C}-${n(e,3)}-`+n(t,3)];return(-1==t||1==e&&0==t)&&n.push("quran-madina-html-sura-start"),n}function h(){var e=document.createElement("div");return e.innerHTML='<svg viewBox="0 0 24 24" class="quran-madina-html-icon" width="20px"><path d="M16.02 20.96H3.78c-.41 0-.75-.34-.75-.75V7.74c0-.41.34-.75.75-.75h7.87c.21 0 .39.08.53.22l4.37 4.37c.14.14.22.32.22.53v8.11c0 .4-.34.74-.75.74ZM4.53 19.47h10.75v-6.61h-3.62c-.41 0-.75-.34-.75-.75V8.48H4.53v10.99Z"></path><path d="m20.74 7.63-4.37-4.37c-.14-.14-.36-.2-.53-.22H8.01c-.41 0-.75.34-.75.75V5.5h1.49v-.97h6.34v3.62c0 .41.34.75.75.75h3.62v8.19h-1.2v1.49h1.95c.41 0 .75-.34.75-.75V8.16c0-.21-.08-.4-.22-.53Z"></path></svg>'.trim(),e.firstChild}function f(){var e=document.createElement("div");return e.innerHTML='<svg class="quran-madina-html-icon" viewBox="0 0 820 615" style="height:20px"><path d="M70 1.9C37.6 8.8 12.6 33.4 3.4 67.5c-1.8 6.6-1.9 11.9-1.9 98v91l2.3 8c5.1 17.8 17 36.4 29.9 46.7 10.8 8.6 25.4 15.4 38.1 17.8 3.1.6 15.2 1 26.8 1 17.7 0 21.3.2 21.7 1.4.4.9.6 17.1.7 36.1 0 32.4.2 34.9 2 38.5 6.4 12.5 21.4 17.4 33.3 10.8 2.3-1.3 7.5-6.4 12.1-11.9l63-74.1c.6-.4 16.3-.8 34.9-.8H300l-.2-18.3-.3-18.2-42.8.1-43.1.5c-.2.2-12.7 15.1-27.9 33.1-15.1 18-27.8 32.4-28.1 32.1-.3-.4-.6-15.3-.6-33.2v-32.6l-38.8-.1c-42.1-.2-43.9-.4-54.3-6-6.5-3.6-16.9-14.6-20.2-21.5-5.8-11.9-5.7-10-5.7-100.7 0-92-.2-89.4 6.3-101.7 3.9-7.3 13.5-17.1 20.3-20.7C76 36.7 66.1 37 244.5 37L412 38.1c18 4.1 33.5 20.5 37.5 39.6 2.2 10.2 2.1 164.6 0 174.8-3.9 18.3-16.4 32.7-33.5 38.5-3.2 1.1-7.8 2-10 2-3.1 0-4 .4-4 1.7 0 1-.2 8.8-.3 17.3-.2 8.5-.2 16.2 0 17 .9 3.3 21.7-.5 34.1-6 13.7-6.3 27.5-17.9 36.2-30.5 5-7.2 10.8-20.4 13.2-30.1l2.3-8.9V165 76.5l-2.3-9c-8.1-31.4-30.5-54.9-61.7-64.8l-7-2.2-169-.2C87.7.1 78 .2 70 1.9zm277.294 102.559q19.5-.5 28.25 24.5 2.5 7.25-3.75 19.75-5.75 11.75-9.75 16-19.5 21.5-67 25.25-27.75 2.25-50.25-2.25-5.25 38.25-16.5 50-26 26.75-66 29.5-27.75 2-42.5-11-20.25-17.75-16.5-48.5 3-23.75 14.25-42.5 2.75-4.5 4.75-7.5 2-3 3-4.25 2.25-2.75 4.75-1.25 2.75 1.5 0 6.25-12.75 24.5-10 45 4 30.5 44.5 30.5 30.25 0 53.25-15.5 12.5-8.25 14.75-14.25-2.25-20.75-13.75-35.75-3.5-4.25-1.75-8l9.5-23.5q3-7.5 8.25 1.25l8.75 14.75q7.75 4.25 28.25 5 16.75-19.25 39.25-36.25 22.5-16.75 36.25-17.25zm11.5 40.5q-12.5-9.5-31.75-5.75-19 3.75-41.25 19.5 50.75.5 73-13.75zm-71.5-89.75q1.5-2 4.25-1.25 5 1.75 9.5 4.5 4.75 2.75 8.75 6.25 2 2 .75 4.5l-12 19q-1.75 2.5-4.5.5-2.5-2-18-11.25-2.75-1.75-1-4.25zm278.784 232.623c-4.7.4-4.7.4-6.7 6.1-1.2 3.1-9.3 25.9-18 50.7l-36.6 102.7-3.5 9.8h17.9 17.8l5.7-17 5.7-17h31.7 31.8l5.6 17.2 5.6 17.3 17.9-.3 18-.3-6-17.2-15-43.2-13.3-38.5-14.1-41-9.9-28.7c-.3-.6-30.2-1.1-34.6-.6zm35.7 106c-.2.2-10 .2-21.9.1l-21.5-.3 9.8-29.5 11-32.5c1.2-2.9 1.8-1.4 12.1 29.4l10.5 32.8zm148.8 139.609c32.4-6.9 57.4-31.5 66.6-65.6 1.8-6.6 1.9-11.9 1.9-98v-91l-2.3-8c-5.1-17.8-17-36.4-29.9-46.7-10.8-8.6-25.4-15.4-38.1-17.8-3.1-.6-15.2-1-26.8-1-17.7 0-21.3-.2-21.7-1.4-.4-.9-.6-17.1-.7-36.1 0-32.4-.2-34.9-2-38.5-6.4-12.5-21.4-17.4-33.3-10.8-2.3 1.3-7.5 6.4-12.1 11.9l-63 74.1c-.6.4-16.3.8-34.9.8h-33.7l.2 18.3.3 18.2 42.8-.1 43.1-.5c.2-.2 12.7-15.1 27.9-33.1 15.1-18 27.8-32.4 28.1-32.1.3.4.6 15.3.6 33.2v32.6l38.8.1c42.1.2 43.9.4 54.3 6 6.5 3.6 16.9 14.6 20.2 21.5 5.8 11.9 5.7 10 5.7 100.7 0 92 .2 89.4-6.3 101.7-3.9 7.3-13.5 17.1-20.3 20.7-11.4 6.1-1.5 5.8-179.9 5.8-108.2 0-164.5-.4-167.5-1.1-18-4.1-33.5-20.5-37.5-39.6-2.2-10.2-2.1-164.6 0-174.8 3.9-18.3 16.4-32.7 33.5-38.5 3.2-1.1 7.8-2 10-2 3.1 0 4-.4 4-1.7 0-1 .2-8.8.3-17.3.2-8.5.2-16.2 0-17-.9-3.3-21.7.5-34.1 6-13.7 6.3-27.5 17.9-36.2 30.5-5 7.2-10.8 20.4-13.2 30.1l-2.3 8.9v88.5 88.5l2.3 9c8.1 31.4 30.5 54.9 61.7 64.8l7 2.2 169 .2 177.5-1.6z"/></svg>'.trim(),e.firstChild}function A(e){var t=document.createElement("quran-madina-html-header"),e=(t.innerHTML=e,h()),n=(e.addEventListener("click",w),f());return n.addEventListener("click",E),t.appendChild(e),t.appendChild(n),t}var m=null;function R(){m&&(m.popup.classList.remove(C+"-open"),document.removeEventListener("click",m.outsideClick),document.removeEventListener("keydown",m.onEscape),m=null)}function y(t,e,n,r,o){R();function i(e){u.contains(e.target)||R()}function a(e){"Escape"===e.key&&R()}s=t,(c=document.querySelector(`body > ${C}-aya-popup`))||((c=document.createElement(C+"-aya-popup")).appendChild(h()),c.appendChild(f()),document.body.appendChild(c)),["--qmh-header","--qmh-background"].forEach(function(e){c.style.setProperty(e,getComputedStyle(s).getPropertyValue(e))});var s,c,u=c,l=u.children[0],d=u.children[1];l.onclick=function(e){e.stopPropagation();e="“"+Array.from(t.getElementsByClassName(n)).map(function(e){return e.textContent}).join(" ").replace(/\s+/g," ").trim()+"”\n\n"+L.suras[r-1].name;navigator.clipboard.writeText(e),alert("⎘ تم نسخ:\n\n"+e),R()},d.onclick=function(e){e.stopPropagation(),window.open(`https://quran.com/${r}/`+o,"_blank"),R()},l=u,d=(d=e).getBoundingClientRect(),l.style.left=Math.max(4,d.left)+"px",l.style.top=(0<d.top-34-6?d.top-34-6:d.bottom+6)+"px",u.classList.add(C+"-open");document.addEventListener("click",i),document.addEventListener("keydown",a),m={popup:u,outsideClick:i,onEscape:a}}function H(n,r,o,i){i<1||Array.from(n.getElementsByClassName(r)).forEach(function(t){t.style.cursor="pointer",t.onclick=function(e){e.stopPropagation(),y(n,t,r,o,i)}})}function q(e,t){e.style="display:block;",e.style.setProperty("font-family",L.font_family,""),e.style.setProperty("font-size",L.font_size+"px",""),"me_quran"===L.font_family&&e.style.setProperty("line-height",2*L.font_size+"px",""),e.style.width=L.line_width+10+"px",e.style.setProperty("box-shadow","inset "+(t%2==1?"":"-")+"8px 0 7px -7px #333","")}function j(e,t){0<=t?e.style.setProperty("transform",`scaleX(${t})`,""):e.style.setProperty("text-align","center","")}function l(e,t){for(var n=0;n<e.r.length;n++)if(e.r[n].l===t)return e.r[n];return null}function b(e,t,n){var r,e=L.suras[e].ayas;return t<=0||void 0===(r=e[t-1])||r.p!==e[t].p||null===l(r,n)}function F(e,t,n,r,o){for(var i=L.suras[e].ayas,a=[],s=r+o;0<=s&&s<i.length&&void 0!==i[s]&&i[s].p==t;s+=o){var c=l(i[s],n);if(null===c)break;if(o<0){if(a.unshift(c),b(e,s,n))break}else a.push(c)}return a}function z(e,t){for(var n=0;n<t.length;n++){var r=document.createElement("div");r.textContent=t[n].t,r.style.cssText="display:inline;visibility:hidden",e.appendChild(r)}}function w(){var e=this.parentElement.parentElement,t=e.querySelector("quran-madina-html-header"),n=(t=t?t.textContent.replace(/\s+/g," ").trim():null!=(t=e.getAttribute("sura"))?L.suras[t-1].name:"",(n=(e=(e=e).cloneNode(!0)).querySelector("quran-madina-html-header"))&&n.parentNode.removeChild(n),Array.from(e.querySelectorAll(`.${C}-word-hidden`)).forEach(function(e){e.parentNode.removeChild(e)}),Array.from(e.querySelectorAll("div,span")).forEach(function(e){/visibility:\s*hidden/.test(e.getAttribute("style")||"")&&e.parentNode.removeChild(e)}),e),e=n.querySelectorAll("quran-madina-html-line"),e=e.length?Array.from(e).map(function(e){return e.textContent.replace(/\s+/g," ").trim()}).filter(function(e){return""!==e}).join(" "):n.textContent.replace(/\s+/g," ").trim(),n="“"+e+"”\n\n"+t;navigator.clipboard.writeText(n),alert("⎘ تم نسخ:\n\n"+n)}function E(){var e=this.parentElement.parentElement;let t;t=null!=e.getAttribute("sura")&&null!=e.getAttribute("aya")?`https://quran.com/${e.getAttribute("sura")}/`+e.getAttribute("aya"):"https://quran.com/page/"+e.getAttribute("page"),window.open(t,"_blank")}function T(e,t,n){for(var r=[],o=null,i=0,a=L.suras.length,s=2===t&&0<e?1:t,c=0;c<a;c++){for(var u=(e+c)%a,l=L.suras[u].ayas,d=!1,h=0===c?s:0;h<l.length;h++){var p=(0==u?2:1)<=h,f=l[h];if(void 0===f)break;for(var m=0;m<f.r.length;m++){var v,g=f.r[m];""!==g.t&&(v=f.p+":"+g.l,o&&o.key===v||(o={key:v,stretch:g.s,parts:[]},r.push(o)),o.parts.push({sura:u,ayaIdx:h,part:g,countable:p}))}if(p&&(i+=function(e){var t=0;return e.r.forEach(function(e){t+=_(e)}),t}(f))>=n[1]){d=!0;break}}if(d)break}for(var y=0,b=(r.forEach(function(e){e.parts.forEach(function(e){e.countable&&(y+=_(e.part))}),e.lastWord=y}),0);b<r.length-1&&r[b].lastWord<n[0];)b+=1;for(var w=b;w<r.length-1&&r[w].lastWord<n[1];)w+=1;return{groups:r.slice(b,w+1),counterStart:0<b?r[b-1].lastWord:0}}function U(u,e,t,l,n,r,o,d){var e=T(e,t,l),i=e.groups,a=k(o,1<i.length),h=e.counterStart;R(),u.innerHTML="",u.removeAttribute("style"),u.classList.toggle(C+"-inline",!a&&!r),a&&(t=parseInt(i[0].key.split(":")[0],10),q(u,t),n||u.appendChild(A(L.suras[i[0].parts[0].sura].name))),i.forEach(function(e,t){var n,c=document.createElement("quran-madina-html-line");a?(c.style.setProperty("display","block",""),j(c,e.stretch),b((n=e.parts[0]).sura,n.ayaIdx,n.part.l)||z(c,F(n.sura,L.suras[n.sura].ayas[n.ayaIdx].p,n.part.l,n.ayaIdx,-1))):(c.style.setProperty("font-family",L.font_family,""),c.style.setProperty("font-size",L.font_size+"px","")),u.appendChild(c),e.parts.forEach(function(e){var t,n,r,o,i,a=document.createElement("div"),s=D(e.sura+1,e.ayaIdx-1);DOMTokenList.prototype.add.apply(a.classList,s),e.countable?0<(t=S(e.sura,e.ayaIdx)?_(e.part):0)&&h+1>=l[0]&&h+t<=l[1]?((r=document.createElement("span")).classList.add(C+"-word",C+"-basmala"),r.textContent=M,a.appendChild(r),h+=t):(n=a,r=e.part.t,o=l,i=h,r.split(/(\s+)/).forEach(function(e){var t;""!==e&&(/^\s+$/.test(e)?n.appendChild(document.createTextNode(e)):((t=document.createElement("span")).textContent=e,t.classList.add(C+"-word"),p(e)?((i+=1)<o[0]||i>o[1])&&t.classList.add(C+"-word-hidden"):(i<o[0]||i>o[1])&&t.classList.add(C+"-word-hidden"),n.appendChild(t)))}),h=i):d&&(0===e.ayaIdx||0===e.sura&&1===e.ayaIdx)?((t=document.createElement("span")).textContent=e.part.t,t.style.visibility="hidden",a.appendChild(t)):a.textContent=e.part.t,a.style.cssText="display:inline",c.appendChild(a),x(s.slice(-1)[0]),H(u,s.slice(-1)[0],e.sura+1,e.ayaIdx-1)}),a&&t===i.length-1&&(n=e.parts[e.parts.length-1],z(c,F(n.sura,L.suras[n.sura].ayas[n.ayaIdx].p,n.part.l,n.ayaIdx,1)))})}var Y,e,X,d,t=16,n=document.currentScript||document.querySelector(`script[src*="${C}"]`),B=n.getAttribute("data-name")||"Madina05",o=(n.getAttribute("data-font")||"me_quran").replaceAll(" ","_"),i=parseInt(n.getAttribute("data-font-size"),10)||t,n=n.getAttribute("data-cdn"),n=(n&&(r=n.replace(/\/?$/,"/")),O(B+` with font: ${o} size: `+i),r+"dist/"+C+".min.css?v=1.1");function $(e){d=r+`assets/db/${X=B+`-${o}-${i=e}px`}/`}document.getElementById(C)||(Y=document.getElementsByTagName("head")[0],(e=document.createElement("link")).id=C,e.rel="stylesheet",e.type="text/css",e.href=n,e.media="all",Y.appendChild(e)),$(i);var v={};function g(e,t){if(!L.juz)return-1;for(var n=Math.max(t,2),r=0,o=L.juz,i=0;i<o.length&&(o[i][0]<e||o[i][0]===e&&o[i][1]<=n);i++)r=i;return r}function V(e,i){if(L.juz){for(var a,t=[],n=0;n<e.length;n++){var r=e[n];0<=r&&r<L.juz.length&&!v[r]&&t.indexOf(r)<0&&t.push(r)}0===t.length?i():(a=t.length,t.forEach(function(o){var e;u(d+"juz-"+((e=o+1)<10?"0":"")+e+".json",function(e){for(var t=e,n=0;n<t.d.length;n++){var r=t.d[n];L.suras[r[0]].ayas[r[1]]={p:r[2],r:r[3]}}v[o]=!0,0==--a&&i()},function(e){console.error(C+"> failed to load juz "+(o+1),e),v[o]=!0,0==--a&&i()})}))}else i()}function W(){const e=new FontFace(L.font_family,"url("+encodeURI(null==(t=L.font_url)||/^(https?:)?\/\//.test(t)?t:r+String(t).replace(/^\//,""))+")");e.load().then(()=>{document.fonts.add(e)});var t,n={};["page","page_param","aya","sura","words","headless","quotes","inline","notitle"].forEach(function(e){var t;n[e]=(t=e,{attribute:{},set:function(e){this.xtag.data[t]=e},get:function(){return this.getAttribute(t)}})}),xtag.register(C,{lifecycle:{created:function(){this.render(this)},inserted:function(){},removed:function(){},attributeChanged:function(){this.render(this)}},events:{},accessors:n,methods:{render:function(e){var t;this.xtag.data.rendering||V(function(e){if(!L.juz)return[];var t,n=[];if(null!=e.getAttribute("sura")&&null!=e.getAttribute("aya")){var r,o=P(e.getAttribute("sura"))[0],i=I(e.getAttribute("aya"));if(null!=e.getAttribute("words"))return[r=g(o,i[0]),(r+1)%L.juz.length];for(t=g(o,i[0]);t<=g(o,i[1]);t++)n.push(t)}else{if(null==e.getAttribute("page"))return[];var a=L.pages[parseInt(e.getAttribute("page"),10)-1];if(!a)return[];for(t=g(a[0],a[1]);t<=g(a[2],a[3]);t++)n.push(t)}return n}(t=this),function(){if(!t.xtag.data.rendering){t.xtag.data.rendering=!0;try{t.doRender(e)}finally{t.xtag.data.rendering=!1}}})},doRender:function(t){var n,r,o,e=null,i=this.page,a=N(this.headless),s=N(this.notitle),c=null!=this.quotes&&!N(this.quotes),u=this.inline,l=null!=this.sura&&null!=this.aya;if(l)f=h=P(this.sura)[0],o=!1,[p,m]=I(this.aya),null!=this.page&&O("Ignoring page parameter!"),i=L.suras[h].ayas[p].p;else{if(null==this.page)return console.error(C+"> Bad arguments: Not rendering!"),1;if(L.pages)var d=L.pages[i-1],h=d[0],p=d[1],f=d[2],m=d[3];else{for(m=p=f=h=0;L.suras[h].ayas.slice(-1)[0].p<i;)h+=1;for(f=h;f<114&&L.suras[f].ayas[0].p<=i;)f+=1;for(f-=1;L.suras[h].ayas[p].p<i;)p+=1;for(m=L.suras[f].ayas.length-1;L.suras[f].ayas[m].p>i;)m-=1}o=!0,null!=this.inline&&O("Ignoring inline parameter with page!")}if(null!=this.words)if(l){if(null!=(e=null==(d=this.words)||2!=(d=1==(d=d.split(/[-:]/).map(e=>parseInt(e,10))).length?[d[0],d[0]]:d).length||isNaN(d[0])||isNaN(d[1])||d[0]<1||d[1]<d[0]?null:d))return m!==p&&O("Ignoring aya range end with words parameter!"),500<e[1]-e[0]+1&&(O("words selection capped at 500 words"),e[1]=e[0]+499),void U(t,h,p,e,a,c,u,s);O("Bad words parameter: "+this.words)}else O("Ignoring words parameter with page!");R(),t.innerHTML="",t.removeAttribute("style"),o=k(u,o=(n=L.suras[h].ayas[p].r[0].l)!=(r=L.suras[f].ayas[m].r.slice(-1)[0].l)?!0:o),t.classList.toggle(C+"-inline",!o&&!c),o&&(q(t,i),a||t.appendChild(A(L.suras[h].name)));var v=p,g=h;for(let e=n;e<=r;e++){const T=e;var y=document.createElement("quran-madina-html-line"),b=(t.appendChild(y),o?y.style.setProperty("display","block",""):(y.style.setProperty("font-family",L.font_family,""),y.style.setProperty("font-size",L.font_size+"px","")),o&&l&&e===n&&z(y,F(h,i,n,p,-1)),h==f?m:L.suras[g].ayas.length-1);for(let e=v;e<=Math.min(v+5,b);e++){var w,_,E=L.suras[g].ayas[e];void 0!==E&&E.p==i&&(E=E.r.filter(e=>e.l==T)).length&&(o&&j(y,E[0].s),w=document.createElement("div"),_=D(g+1,e-1),DOMTokenList.prototype.add.apply(w.classList,_),w.textContent=S(g,e)&&""!==E[0].t?M:E[0].t,w.style.cssText="display:inline",y.appendChild(w),x(_.slice(-1)[0]),H(t,_.slice(-1)[0],g+1,e-1),v=e,E=g<113?L.suras[g+1].ayas[0]:void 0,b<=v)&&void 0!==E&&E.p==i&&E.r[0].l==T+1&&(g+=1,v=0)}o&&l&&e===r&&z(y,F(f,i,r,m,1))}}}})}function G(){u(d+"manifest.json",function(e){if(e.content_hash){var t="quran-madina-html:hash:"+d,n=null;try{n=sessionStorage.getItem(t)}catch(e){}if(null!==n&&n!==e.content_hash){var r=d;try{for(var o=sessionStorage.length-1;0<=o;o--){var i=sessionStorage.key(o);i&&0===i.indexOf("quran-madina-html:"+r)&&sessionStorage.removeItem(i)}}catch(e){}Object.keys(s).forEach(function(e){0===e.indexOf(r)&&delete s[e]})}try{sessionStorage.setItem(t,e.content_hash)}catch(e){}}L={title:e.title,published:e.published,font_family:e.font_family,font_url:e.font_url,font_size:e.font_size,line_width:e.line_width,suras:e.suras.map(function(e){return{name:e[0],ayas:new Array(e[1])}}),juz:e.juz,pages:e.pages},W()},K,!0)}function K(){u(r+`assets/db/${X}.json`,function(e){L=e,W()},function(e){i!=t?(O(`no DB for font: ${o} size: ${i}, falling back to size: `+t),$(t),G()):console.error(C+"> no manifest and no monolithic DB",e)})}G()}(),function(){function e(e){if((this._element=e).className!=this._classCache&&(this._classCache=e.className,this._classCache))for(var t=this._classCache.replace(/^\s+|\s+$/g,"").split(/\s+/),n=0;t.length>n;n++)o.call(this,t[n])}function t(e,t){e.className=t.join(" ")}var n,r,o,i,a,s,c,u;void 0===window.Element||"classList"in document.documentElement||(s=Array.prototype,n=s.indexOf,r=s.slice,o=s.push,i=s.splice,a=s.join,e.prototype={add:function(e){this.contains(e)||(o.call(this,e),t(this._element,r.call(this,0)))},contains:function(e){return-1!==n.call(this,e)},item:function(e){return this[e]||null},remove:function(e){e=n.call(this,e);-1!==e&&(i.call(this,e,1),t(this._element,r.call(this,0)))},toString:function(){return a.call(this," ")},toggle:function(e){-1===n.call(this,e)?this.add(e):this.remove(e)}},window.DOMTokenList=e,s=Element.prototype,c="classList",u=function(){return new e(this)},Object.defineProperty?Object.defineProperty(s,c,{get:u}):s.__defineGetter__(c,u))}(),function(){window.WebComponents=window.WebComponents||{flags:{}};var e,t=document.querySelector('script[src*="webcomponents-lite.js"]'),n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var t,e=e.split("=");e[0]&&(t=e[0].match(/wc-(.+)/))&&(n[t[1]]=e[1]||!0)}),t)for(var r,o=0;r=t.attributes[o];o++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(e=n.log.split(","),n.log={},e.forEach(function(e){n.log[e]=!0})):n.log={}}n.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=n.register),WebComponents.flags=n}(),function(e){"use strict";function g(e){return void 0!==_[e]}function y(){r.call(this),this._isInvalid=!0}function b(e){return""==e&&y.call(this),e.toLowerCase()}function w(e){var t=e.charCodeAt(0);return 32<t&&t<127&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function n(e,t,n){function r(e){d.push(e)}var o,i,a=t||"scheme start",s=0,c="",u=!1,l=!1,d=[];e:for(;(e[s-1]!=T||0==s)&&!this._isInvalid;){var h=e[s];switch(a){case"scheme start":if(!h||!C.test(h)){if(t){r("Invalid scheme.");break e}c="",a="no scheme";continue}c+=h.toLowerCase(),a="scheme";break;case"scheme":if(h&&L.test(h))c+=h.toLowerCase();else{if(":"!=h){if(t){if(T==h)break e;r("Code point not allowed in scheme: "+h);break e}c="",s=0,a="no scheme";continue}if(this._scheme=c,c="",t)break e;g(this._scheme)&&(this._isRelative=!0),a="file"==this._scheme?"relative":this._isRelative&&n&&n._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==h?(this._query="?",a="query"):"#"==h?(this._fragment="#",a="fragment"):T!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._schemeData+=w(h));break;case"no scheme":if(n&&g(n._scheme)){a="relative";continue}r("Missing scheme."),y.call(this);break;case"relative or authority":if("/"!=h||"/"!=e[s+1]){r("Expected /, got: "+h),a="relative";continue}a="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=n._scheme),T==h){this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._username=n._username,this._password=n._password;break e}if("/"==h||"\\"==h)"\\"==h&&r("\\ is an invalid code point."),a="relative slash";else if("?"==h)this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query="?",this._username=n._username,this._password=n._password,a="query";else{if("#"!=h){var p=e[s+1],f=e[s+2];("file"!=this._scheme||!C.test(h)||":"!=p&&"|"!=p||T!=f&&"/"!=f&&"\\"!=f&&"?"!=f&&"#"!=f)&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password,this._path=n._path.slice(),this._path.pop()),a="relative path";continue}this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._fragment="#",this._username=n._username,this._password=n._password,a="fragment"}break;case"relative slash":if("/"!=h&&"\\"!=h){"file"!=this._scheme&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password),a="relative path";continue}"\\"==h&&r("\\ is an invalid code point."),a="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=h){r("Expected '/', got: "+h),a="authority ignore slashes";continue}a="authority second slash";break;case"authority second slash":if(a="authority ignore slashes","/"==h)break;r("Expected '/', got: "+h);continue;case"authority ignore slashes":if("/"!=h&&"\\"!=h){a="authority";continue}r("Expected authority, got: "+h);break;case"authority":if("@"==h){u&&(r("@ already seen."),c+="%40");for(var u=!0,m=0;c.length>m;m++){var v=c[m];"\t"!=v&&"\n"!=v&&"\r"!=v?":"!=v||null!==this._password?(v=w(v),null!==this._password?this._password+=v:this._username+=v):this._password="":r("Invalid whitespace in authority.")}c=""}else{if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h){s-=c.length,c="",a="host";continue}c+=h}break;case"file host":if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h){a=2!=c.length||!C.test(c[0])||":"!=c[1]&&"|"!=c[1]?(0==c.length||(this._host=b.call(this,c),c=""),"relative path start"):"relative path";continue}"\t"==h||"\n"==h||"\r"==h?r("Invalid whitespace in file host."):c+=h;break;case"host":case"hostname":if(":"!=h||l){if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h){if(this._host=b.call(this,c),c="",a="relative path start",t)break e;continue}"\t"!=h&&"\n"!=h&&"\r"!=h?("["==h?l=!0:"]"==h&&(l=!1),c+=h):r("Invalid code point in host/hostname: "+h)}else if(this._host=b.call(this,c),c="",a="port","hostname"==t)break e;break;case"port":if(/[0-9]/.test(h))c+=h;else{if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h||t){if(""!=c&&((p=parseInt(c,10))!=_[this._scheme]&&(this._port=p+""),c=""),t)break e;a="relative path start";continue}"\t"==h||"\n"==h||"\r"==h?r("Invalid code point in port: "+h):y.call(this)}break;case"relative path start":if("\\"==h&&r("'\\' not allowed in path."),a="relative path","/"!=h&&"\\"!=h)continue;break;case"relative path":T!=h&&"/"!=h&&"\\"!=h&&(t||"?"!=h&&"#"!=h)?"\t"!=h&&"\n"!=h&&"\r"!=h&&(c+=w(h)):("\\"==h&&r("\\ not allowed in relative path."),".."==(c=(f=E[c.toLowerCase()])?f:c)?(this._path.pop(),"/"!=h&&"\\"!=h&&this._path.push("")):"."==c&&"/"!=h&&"\\"!=h?this._path.push(""):"."!=c&&("file"==this._scheme&&0==this._path.length&&2==c.length&&C.test(c[0])&&"|"==c[1]&&(c=c[0]+":"),this._path.push(c)),c="","?"==h?(this._query="?",a="query"):"#"==h&&(this._fragment="#",a="fragment"));break;case"query":t||"#"!=h?T!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._query+=(i=void 0,32<(i=(o=h).charCodeAt(0))&&i<127&&-1==[34,35,60,62,96].indexOf(i)?o:encodeURIComponent(o))):(this._fragment="#",a="fragment");break;case"fragment":T!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._fragment+=h)}s++}}function r(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function o(e,t){void 0===t||t instanceof o||(t=new o(t+"")),this._url=e,r.call(this);e=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");n.call(this,e,null,t)}var _,E,T,C,L,t,i=!1;if(!e.forceJURL)try{var a=new URL("b","http://a");a.pathname="c%20d",i="http://a/c%20d"===a.href}catch(e){}i||((_=Object.create(null)).ftp=21,_.file=0,_.gopher=70,_.http=80,_.https=443,_.ws=80,_.wss=443,(E=Object.create(null))["%2e"]=".",E[".%2e"]="..",E["%2e."]="..",T=void(E["%2e%2e"]=".."),C=/[a-zA-Z]/,L=/[a-zA-Z0-9\+\-\.]/,o.prototype={toString:function(){return this.href},get href(){var e;return this._isInvalid?this._url:((e="")==this._username&&null==this._password||(e=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment)},set href(e){r.call(this),n.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||n.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&n.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&n.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&n.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],n.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&((this._query="?")==e[0]&&(e=e.slice(1)),n.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(e){this._isInvalid||((this._fragment="#")==e[0]&&(e=e.slice(1)),n.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return(e=this.host)?this._scheme+"://"+e:""}},(t=e.URL)&&(o.createObjectURL=function(){return t.createObjectURL.apply(t,arguments)},o.revokeObjectURL=function(e){t.revokeObjectURL(e)}),e.URL=o)}(self),"undefined"==typeof WeakMap&&function(){function e(){this.name="__st"+(1e9*Math.random()>>>0)+t+++"__"}var r=Object.defineProperty,t=Date.now()%1e9;e.prototype={set:function(e,t){var n=e[this.name];return n&&n[0]===e?n[1]=t:r(e,this.name,{value:[e,t],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},delete:function(e){var t=e[this.name];return!(!t||t[0]!==e||(t[0]=t[1]=void 0))},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=e}(),function(e){function o(){p=!1;var e=f,r=(f=[],e.sort(function(e,t){return e.uid_-t.uid_}),!1);e.forEach(function(e){var t,n=e.takeRecords();(t=e).nodes_.forEach(function(e){e=s.get(e);e&&e.forEach(function(e){e.observer===t&&e.removeTransientObservers()})}),n.length&&(e.callback_(n,e),r=!0)}),r&&o()}function u(e,t){for(var n=e;n;n=n.parentNode){var r=s.get(n);if(r)for(var o=0;r.length>o;o++){var i=r[o],a=i.options;(n===e||a.subtree)&&(a=t(a))&&i.enqueue(a)}}}function t(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++m}function r(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function l(e,t){return v=new r(e,t)}function d(e){return g||((n=new r((t=v).type,t.target)).addedNodes=t.addedNodes.slice(),n.removedNodes=t.removedNodes.slice(),n.previousSibling=t.previousSibling,n.nextSibling=t.nextSibling,n.attributeName=t.attributeName,n.attributeNamespace=t.attributeNamespace,n.oldValue=t.oldValue,(g=n).oldValue=e,g);var t,n}function i(e,t){return e===t?e:g&&((t=e)===g||t===v)?g:null}function a(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var s,n,c,h,p,f,m,v,g;e.JsMutationObserver||(s=new WeakMap,h=/Trident|Edge/.test(navigator.userAgent)?setTimeout:window.setImmediate||(n=[],c=Math.random()+"",window.addEventListener("message",function(e){e.data===c&&(e=n,n=[],e.forEach(function(e){e()}))}),function(e){n.push(e),window.postMessage(c,"*")}),p=!1,f=[],m=0,t.prototype={observe:function(e,t){if(n=e,e=window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(n)||n,!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var n,r=s.get(e);r||s.set(e,r=[]);for(var o,i=0;r.length>i;i++)if(r[i].observer===this){(o=r[i]).removeListeners(),o.options=t;break}o||(o=new a(this,e,t),r.push(o),this.nodes_.push(e)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=s.get(e),n=0;t.length>n;n++){var r=t[n];if(r.observer===this){r.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}},a.prototype={enqueue:function(e){var t=this.observer.records_,n=t.length;if(0<t.length){var r=i(t[n-1],e);if(r)return void(t[n-1]=r)}else r=this.observer,f.push(r),p||(p=!0,h(o));t[n]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){var t;e!==this.target&&(this.addListeners_(e),this.transientObservedNodes.push(e),(t=s.get(e))||s.set(e,t=[]),t.push(this))},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=s.get(e),n=0;t.length>n;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,r=e.target,o=((i=new l("attributes",r)).attributeName=t,i.attributeNamespace=n,e.attrChange===MutationEvent.ADDITION?null:e.prevValue);u(r,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?d(o):i});break;case"DOMCharacterDataModified":var i=l("characterData",r=e.target),o=e.prevValue;u(r,function(e){return e.characterData?e.characterDataOldValue?d(o):i:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var a,r=e.target,s="DOMNodeInserted"===e.type?(a=[r],[]):(a=[],[r]),c=r.previousSibling,r=r.nextSibling;(i=l("childList",e.target.parentNode)).addedNodes=a,i.removedNodes=s,i.previousSibling=c,i.nextSibling=r,u(e.relatedNode,function(e){return e.childList?i:void 0})}v=g=void 0}},e.JsMutationObserver=t,e.MutationObserver)||((e.MutationObserver=t)._isPolyfilled=!0)}(self),"undefined"==typeof HTMLTemplateElement&&function(){function n(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}}var r=document.implementation.createHTMLDocument("template"),o=!0,t=((HTMLTemplateElement=function(){}).prototype=Object.create(HTMLElement.prototype),HTMLTemplateElement.decorate=function(e){if(!e.content){e.content=r.createDocumentFragment();for(var t;t=e.firstChild;)e.content.appendChild(t);if(o)try{Object.defineProperty(e,"innerHTML",{get:function(){for(var e="",t=this.content.firstChild;t;t=t.nextSibling)e+=t.outerHTML||t.data.replace(i,n);return e},set:function(e){for(r.body.innerHTML=e,HTMLTemplateElement.bootstrap(r);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;r.body.firstChild;)this.content.appendChild(r.body.firstChild)},configurable:!0})}catch(e){o=!1}HTMLTemplateElement.bootstrap(e.content)}},HTMLTemplateElement.bootstrap=function(e){for(var t,n=e.querySelectorAll("template"),r=0,o=n.length;r<o&&(t=n[r]);r++)HTMLTemplateElement.decorate(t)},document.addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)}),document.createElement),i=(document.createElement=function(){"use strict";var e=t.apply(document,arguments);return"template"==e.localName&&HTMLTemplateElement.decorate(e),e},/[&\u00A0<>]/g)}(),function(){"use strict";var e,t;window.performance||(e=Date.now(),window.performance={now:function(){return Date.now()-e}}),window.requestAnimationFrame||(window.requestAnimationFrame=(t=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame)?function(e){return t(function(){e(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}),(r=document.createEvent("Event")).initEvent("foo",!0,!0),r.preventDefault();r.defaultPrevented||(n=Event.prototype.preventDefault,Event.prototype.preventDefault=function(){this.cancelable&&(n.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))});var n,r=/Trident/.test(navigator.userAgent);(!window.CustomEvent||r&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),(!window.Event||r&&"function"!=typeof window.Event)&&(r=window.Event,window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=r.prototype)}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){(function e(t,n){{var r;o(n)?t&&t():(r=function(){"complete"!==n.readyState&&n.readyState!==s||(n.removeEventListener(c,r),e(t,n))},n.addEventListener(c,r))}})(function(){!function(e,t){function n(){a==s&&e&&e({allImports:i,loadedImports:c,errorImports:u})}function r(e){h(e),c.push(this),a++,n()}function o(){u.push(this),a++,n()}var i=t.querySelectorAll("link[rel=import]"),a=0,s=i.length,c=[],u=[];if(s)for(var l,d=0;d<s&&(l=i[d]);d++)!function(e){return p?e.__loaded||e.import&&"loading"!==e.import.readyState:e.__importParsed}(l)?(l.addEventListener("load",r),l.addEventListener("error",o)):(c.push(this),a++,n());else n()}(e,t)},t=t||i)}function o(e){return"complete"===e.readyState||e.readyState===s}function h(e){e.target.__loaded=!0}function u(e){e.import?h({target:e}):(e.addEventListener("load",h),e.addEventListener("error",h))}function n(e){return r?window.ShadowDOMPolyfill.wrapIfNeeded(e):e}var p=Boolean("import"in document.createElement("link")),r=Boolean(window.ShadowDOMPolyfill),i=n(document),a={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return n(e)},configurable:!0},a=(Object.defineProperty(document,"_currentScript",a),Object.defineProperty(i,"_currentScript",a),/Trident/.test(navigator.userAgent)),s=a?"complete":"interactive",c="readystatechange";if(p&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)if(t.addedNodes){o=void 0;i=void 0;s=void 0;c=void 0;a=void 0;var o=t.addedNodes;for(var i,a,s=0,c=o.length;s<c&&(i=o[s]);s++)"link"===(a=i).localName&&"import"===a.rel&&u(i)}}).observe(document.head,{childList:!0}),"loading"===document.readyState))for(var l,d=document.querySelectorAll("link[rel=import]"),f=0,m=d.length;f<m&&(l=d[f]);f++)u(l);t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=i.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),i.dispatchEvent(t)}),e.IMPORT_LINK_TYPE="import",e.useNative=p,e.rootDocument=i,e.whenReady=t,e.isIE=a}(window.HTMLImports),function(t){var n=[];t.addModule=function(e){n.push(e)},t.initializeModules=function(){n.forEach(function(e){e(t)})}}(window.HTMLImports),window.HTMLImports.addModule(function(e){var r=/(url\()([^)]*)(\))/g,o=/(@import[\s]+(?!url\())([^;]*)(;)/g;e.path={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,n),e},resolveUrlsInCssText:function(e,t,n){e=this.replaceUrls(e,n,t,r);return this.replaceUrls(e,n,t,o)},replaceUrls:function(e,o,i,t){return e.replace(t,function(e,t,n,r){n=n.replace(/["']/g,"");return i&&(n=new URL(n,i).href),o.href=n,t+"'"+(n=o.href)+"'"+r})}}}),window.HTMLImports.addModule(function(t){var a={async:!0,ok:function(e){return 200<=e.status&&e.status<300||304===e.status||0===e.status},load:function(e,r,o){var i=new XMLHttpRequest;return(t.flags.debug||t.flags.bust)&&(e+="?"+Math.random()),i.open("GET",e,a.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var t=null;try{var n=i.getResponseHeader("Location");n&&(t="/"===n.substr(0,1)?location.origin+n:n)}catch(e){console.error(e.message)}r.call(o,!a.ok(i)&&i,i.response||i.responseText,t)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};t.xhr=a}),window.HTMLImports.addModule(function(e){function t(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}}var i=e.xhr,a=e.flags;t.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){return this.pending[e]?(this.pending[e].push(t),!0):this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):!(this.pending[e]=[t])},fetch:function(r,o){var e,t,n;a.load&&console.log("fetch",r,o),r?r.match(/^data:/)?(e=(n=r.split(","))[0],t=n[1],t=(-1<e.indexOf(";base64")?atob:decodeURIComponent)(t),setTimeout(function(){this.receive(r,o,null,t)}.bind(this),0)):(n=function(e,t,n){this.receive(r,o,e,t,n)}.bind(this),i.load(r,n)):setTimeout(function(){this.receive(r,o,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;s<c&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=t}),window.HTMLImports.addModule(function(e){function t(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))}t.prototype={handler:function(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(n){function a(e){return"link"===e.localName&&e.rel===s}function r(e){e=e.textContent+function(e){var t=e.ownerDocument,e=(t.__importedScripts=t.__importedScripts||0,e.ownerDocument.baseURI),n=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+e+n+".js\n"}(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(e)}var o=n.path,t=n.rootDocument,i=n.flags,u=n.isIE,s=n.IMPORT_LINK_TYPE,e="link[rel="+s+"]",c={documentSelectors:e,importsSelectors:[e,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){var t;this.isParsed(e)?i.parse&&console.log("[%s] is already parsed",e.localName):(t=this[this.map[e.localName]])&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){i.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,i.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){e=this.dynamicElements.indexOf(e);0<=e&&this.dynamicElements.splice(e,1)},parseImport:function(e){if(e.import=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e.import&&(e.import.__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)(t=e.__pending.shift())&&t({target:e});this.parseNext()},parseLink:function(e){a(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t,n,r=e;(n=(t=e).ownerDocument.createElement("style")).textContent=t.textContent,o.resolveUrlsInStyle(n),e=n,(r.__appliedElement=e).__importElement=r,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(t,n){function r(e){t.removeEventListener("load",r),t.removeEventListener("error",r),n&&n(e),o.markParsingComplete(t),o.parseNext()}var o=this;if(t.addEventListener("load",r),t.addEventListener("error",r),u&&"style"===t.localName){var e=!1;if(-1==t.textContent.indexOf("@import"))e=!0;else if(t.sheet)for(var i,e=!0,a=t.sheet.cssRules,s=a?a.length:0,c=0;c<s&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(e=e&&Boolean(i.styleSheet));e&&setTimeout(function(){t.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(e){var t=document.createElement("script");t.__importElement=e,t.src=e.src||r(e),n.currentScript=e,this.trackElement(t,function(){t.parentNode&&t.parentNode.removeChild(t),n.currentScript=null}),this.addElementToDocument(t)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(t)||this.nextToParseDynamic())},nextToParseInDoc:function(e,t){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var n,r=e.querySelectorAll(this.parseSelectorsForNode(e)),o=0,i=r.length;o<i&&(n=r[o]);o++)if(!this.isParsed(n))return this.hasResource(n)?a(n)?this.nextToParseInDoc(n.__doc,n):n:void 0}return t},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){return(e.ownerDocument||e)===t?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return 0<=this.dynamicElements.indexOf(e)},hasResource:function(e){return!a(e)||void 0!==e.__doc}};n.parser=c,n.IMPORT_SELECTOR=e}),window.HTMLImports.addModule(function(e){function s(e,t){var n=document.implementation.createHTMLDocument(u),r=(n._URL=t,n.createElement("base")),t=(r.setAttribute("href",t),n.baseURI||Object.getOwnPropertyDescriptor(n,"baseURI")||Object.defineProperty(n,"baseURI",{value:t}),n.createElement("meta"));return t.setAttribute("charset","utf-8"),n.head.appendChild(t),n.head.appendChild(r),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var c=e.flags,u=e.IMPORT_LINK_TYPE,t=e.IMPORT_SELECTOR,n=e.rootDocument,r=e.Loader,o=e.Observer,l=e.parser,t={documents:{},documentPreloadSelectors:t,importsPreloadSelectors:[t].join(","),loadNode:function(e){i.addNode(e)},loadSubtree:function(e){e=this.marshalNodes(e);i.addNodes(e)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){return(e.ownerDocument||e)===n?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,t,n,r,o){var i,a;c.load&&console.log("loaded",e,t),t.__resource=n,t.__error=r,a=u,"link"===(i=i=t).localName&&i.getAttribute("rel")===a&&(void 0===(i=this.documents[e])&&((i=r?null:s(n,o||e))&&(i.__importLink=t,this.bootDocument(i)),this.documents[e]=i),t.__doc=i),l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},i=new r(t.loaded.bind(t),t.loadedAll.bind(t));t.observer=new o,document.baseURI||(r={get:function(){var e=document.querySelector("base");return(e||window.location).href},configurable:!0},Object.defineProperty(document,"baseURI",r),Object.defineProperty(n,"baseURI",r)),e.importer=t,e.importLoader=i}),window.HTMLImports.addModule(function(e){var s=e.parser,c=e.importer,e={added:function(e){for(var t,n,r,o,i=0,a=e.length;i<a&&(o=e[i]);i++)t||(t=o.ownerDocument,n=s.isParsed(t)),(r=this.shouldLoadNode(o))&&c.loadNode(o),this.shouldParseNode(o)&&n&&s.parseDynamic(o,r)},shouldLoadNode:function(e){return 1===e.nodeType&&t.call(e,c.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&t.call(e,s.parseSelectorsForNode(e))}},t=(c.observer.addCallback=e.added.bind(e),HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector)}),function(e){function t(){window.HTMLImports.importer.bootDocument(n)}var n,r=e.initializeModules;e.isIE,e.useNative||(r(),n=e.rootDocument,"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t))}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(t){var e=t.flags,n=[];t.addModule=function(e){n.push(e)},t.initializeModules=function(){n.forEach(function(e){e(t)})},t.hasNative=Boolean(document.registerElement),t.isIE=/Trident/.test(navigator.userAgent),t.useNative=!e.register&&t.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function r(e,t){(function e(t,n,r){var o=t.firstElementChild;if(!o)for(o=t.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)!0!==n(o,r)&&e(o,n,r),o=o.nextElementSibling;return null})(e,function(e){return!!t(e)||void n(e,t)}),n(e,t)}function n(e,t){for(var n=e.shadowRoot;n;)r(n,t),n=n.olderShadowRoot}var c=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=function(e,t){!function e(t,n,r){if(t=window.wrap(t),!(0<=r.indexOf(t))){r.push(t);for(var o,i=t.querySelectorAll("link[rel="+c+"]"),a=0,s=i.length;a<s&&(o=i[a]);a++)o.import&&e(o.import,n,r);n(t)}}(e,t,[])},e.forSubtree=r}),window.CustomElements.addModule(function(n){function a(e,t){return r(e,t)||o(e,t)}function r(e,t){return!!n.upgrade(e,t)||void(t&&s(e))}function o(e,t){m(e,function(e){return!!r(e,t)||void 0})}function t(e){b.push(e),y||(y=!0,setTimeout(i))}function i(){y=!1;for(var e,t=b,n=0,r=t.length;n<r&&(e=t[n]);n++)e();b=[]}function s(e){g?t(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback)&&e.attachedCallback()}function u(e){g?t(function(){l(e)}):l(e)}function l(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback)&&e.detachedCallback()}function d(e,t){if(f.dom){var n=t[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=(o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"").split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",t.length,o||"")}var i=function(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}(e);t.forEach(function(e){"childList"===e.type&&(w(e.addedNodes,function(e){e.localName&&a(e,i)}),w(e.removedNodes,function(e){e.localName&&(u(e=e),m(e,function(e){u(e)}))}))}),f.dom&&console.groupEnd()}function h(e){var t;e.__observer||((t=new MutationObserver(d.bind(this,e))).observe(e,{childList:!0,subtree:!0}),e.__observer=t)}function p(e){e=window.wrap(e),f.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),a(e,e===window.wrap(document)),h(e),f.dom&&console.groupEnd()}var f=n.flags,m=n.forSubtree,v=n.forDocumentTree,g=window.MutationObserver._isPolyfilled&&f["throttle-attached"],y=(n.hasPolyfillMutations=g,n.hasThrottledAttached=g,!1),b=[],w=Array.prototype.forEach.call.bind(Array.prototype.forEach),_=Element.prototype.createShadowRoot;_&&(Element.prototype.createShadowRoot=function(){var e=_.call(this);return window.CustomElements.watchShadow(this),e}),n.watchShadow=function(e){if(e.shadowRoot&&!e.shadowRoot.__watched){f.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)h(t),t=t.olderShadowRoot}},n.upgradeDocumentTree=function(e){v(e,p)},n.upgradeDocument=p,n.upgradeSubtree=o,n.upgradeAll=a,n.attached=s,n.takeRecords=function(e){for(e=(e=window.wrap(e))||window.wrap(document);e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(d(e,t.takeRecords()),i())}}),window.CustomElements.addModule(function(o){function i(e,t,n){return a.upgrade&&console.group("upgrade:",e.localName),t.is&&e.setAttribute("is",t.is),r(e,t),e.__upgraded__=!0,(t=e).createdCallback&&t.createdCallback(),n&&o.attached(e),o.upgradeSubtree(e,n),a.upgrade&&console.groupEnd(),e}function r(e,t){if(!Object.__proto__)for(var n=e,r=t.prototype,o=t.native,i={},a=r;a!==o&&a!==HTMLElement.prototype;){for(var s,c=Object.getOwnPropertyNames(a),u=0;s=c[u];u++)i[s]||(Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(a,s)),i[s]=1);a=Object.getPrototypeOf(a)}e.__proto__=t.prototype}var a=o.flags;o.upgrade=function(e,t){if("template"===e.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e),!e.__upgraded__&&e.nodeType===Node.ELEMENT_NODE){var n=e.getAttribute("is"),r=o.getRegisteredDefinition(e.localName)||o.getRegisteredDefinition(n);if(r&&(n&&r.tag==e.localName||!n&&!r.extends))return i(e,r,t)}},o.upgradeWithDefinition=i,o.implementPrototype=r}),window.CustomElements.addModule(function(f){function m(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e),o=(n.apply(this,arguments),this.getAttribute(e));this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}function v(e){return e?w[e.toLowerCase()]:void 0}function o(e,t){e=e&&e.toLowerCase();var n,r=v((t=t&&t.toLowerCase())||e);if(r){if(e==r.tag&&t==r.is)return new r.ctor;if(!t&&!r.is)return new r.ctor}return t?(n=o(e)).setAttribute("is",t):(n=_(e),0<=e.indexOf("-")&&i(n,HTMLElement)),n}function e(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return r(e),e}}var n,t=f.isIE,g=f.upgradeDocumentTree,r=f.upgradeAll,y=f.upgradeWithDefinition,i=f.implementPrototype,a=f.useNative,b=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],w={},_=document.createElement.bind(document),s=document.createElementNS.bind(document),a=Object.__proto__||a?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1};e(Node.prototype,"cloneNode"),e(document,"importNode"),t&&(n=document.importNode,document.importNode=function(){var e,t=n.apply(document,arguments);return t.nodeType==t.DOCUMENT_FRAGMENT_NODE?((e=document.createDocumentFragment()).appendChild(t),e):t}),document.registerElement=function(e,t){var n,r,o,t=t||{};if(!e)throw Error("document.registerElement: first argument `name` must not be empty");if(e.indexOf("-")<0)throw Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+e+"'.");if(function(e){for(var t=0;b.length>t;t++)if(e===b[t])return 1}(e))throw Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+e+"'. The type name is invalid.");if(v(e))throw Error("DuplicateDefinitionError: a type with name '"+e+"' is already registered");t.prototype||(t.prototype=Object.create(HTMLElement.prototype)),t.__name=e.toLowerCase(),t.lifecycle=t.lifecycle||{},t.ancestry=function e(t){t=v(t);return t?e(t.extends).concat([t]):[]}(t.extends);for(var i,a=t,s=a.extends,c=0;i=a.ancestry[c];c++)s=i.is&&i.tag;a.tag=s||a.__name,s&&(a.is=a.__name);var e=t;if(!Object.__proto__){var u=HTMLElement.prototype;e.is&&(p=document.createElement(e.tag),u=Object.getPrototypeOf(p));for(var l,d=e.prototype,h=!1;d;)d==u&&(h=!0),(l=Object.getPrototypeOf(d))&&(d.__proto__=l),d=l;h||console.warn(e.tag+" prototype not found in prototype chain for "+e.is),e.native=u}var p=t.prototype;return p.setAttribute._polyfilled||(n=p.setAttribute,p.setAttribute=function(e,t){m.call(this,e,t,n)},r=p.removeAttribute,p.removeAttribute=function(e){m.call(this,e,null,r)},p.setAttribute._polyfilled=!0),e=t.__name,(w[e]=t).ctor=(o=t,function(){return y(_((e=o).tag),e);var e}),t.ctor.prototype=t.prototype,t.prototype.constructor=t.ctor,f.ready&&g(document),t.ctor},document.createElement=o,document.createElementNS=function(e,t,n){return"http://www.w3.org/1999/xhtml"===e?o(t,n):s(e,t)},f.registry=w,f.instanceof=a,f.reservedTagList=b,f.getRegisteredDefinition=v,document.register=document.registerElement}),function(e){function t(){o(window.wrap(document)),window.CustomElements.ready=!0,(window.requestAnimationFrame||function(e){setTimeout(e,16)})(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=e.useNative,r=e.initializeModules,o=(e.isIE,n?(e.watchShadow=n=function(){},e.upgrade=n,e.upgradeAll=n,e.upgradeDocumentTree=n,e.upgradeSubtree=n,e.takeRecords=n,e.instanceof=function(e,t){return e instanceof t}):r(),e.upgradeDocumentTree),i=e.upgradeDocument;window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e.import&&i(wrap(e.import))}),"complete"!==document.readyState&&!e.flags.eager&&("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready)?(n=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded",window.addEventListener(n,t)):t()}(window.CustomElements),function(){var e=document.createElement("style"),t=(e.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n",document.querySelector("head"));t.insertBefore(e,t.firstChild)}(window.WebComponents),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.PointerEventsPolyfill=t()}(this,function(){"use strict";function e(){this.array=[],this.size=0}function t(e,t,n,r){this.addCallback=e.bind(r),this.removeCallback=t.bind(r),this.changedCallback=n.bind(r),_&&(this.observer=new _(this.mutationWatcher.bind(this)))}function n(e){return"body /shadow-deep/ "+r(e)}function r(e){return'[touch-action="'+e+'"]'}function o(e){return"{ -ms-touch-action: "+e+"; touch-action: "+e+"; touch-action-delay: none; }"}function i(e){if(!m.pointermap.has(e))throw Error("InvalidPointerId")}var a=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","pageX","pageY"],s=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0],c=function(e,t){t=t||Object.create(null);var n=document.createEvent("Event");n.initEvent(e,t.bubbles||!1,t.cancelable||!1);for(var r,o=2;o<a.length;o++)n[r=a[o]]=t[r]||s[o];return n.buttons=t.buttons||0,e=t.pressure||(n.buttons?.5:0),n.x=n.clientX,n.y=n.clientY,n.pointerId=t.pointerId||0,n.width=t.width||0,n.height=t.height||0,n.pressure=e,n.tiltX=t.tiltX||0,n.tiltY=t.tiltY||0,n.pointerType=t.pointerType||"",n.hwTimestamp=t.hwTimestamp||0,n.isPrimary=t.isPrimary||!1,n},u=window.Map&&window.Map.prototype.forEach?Map:e,l=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","buttons","pointerId","width","height","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","type","target","currentTarget","which","pageX","pageY","timeStamp"],d=[!(e.prototype={set:function(e,t){return void 0===t?this.delete(e):(this.has(e)||this.size++,void(this.array[e]=t))},has:function(e){return void 0!==this.array[e]},delete:function(e){this.has(e)&&(delete this.array[e],this.size--)},get:function(e){return this.array[e]},clear:function(){this.array.length=0,this.size=0},forEach:function(n,r){return this.array.forEach(function(e,t){n.call(r,e,t,this)},this)}}),!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0,0,0,0,0,0,"",0,!1,"",null,null,0,0,0,0],h={pointerover:1,pointerout:1,pointerenter:1,pointerleave:1},p="undefined"!=typeof SVGElementInstance,f={pointermap:new u,eventMap:Object.create(null),captureInfo:Object.create(null),eventSources:Object.create(null),eventSourceList:[],registerSource:function(e,t){var n=t,t=n.events;t&&(t.forEach(function(e){n[e]&&(this.eventMap[e]=n[e].bind(n))},this),this.eventSources[e]=n,this.eventSourceList.push(n))},register:function(e){for(var t,n=this.eventSourceList.length,r=0;r<n&&(t=this.eventSourceList[r]);r++)t.register.call(t,e)},unregister:function(e){for(var t,n=this.eventSourceList.length,r=0;r<n&&(t=this.eventSourceList[r]);r++)t.unregister.call(t,e)},contains:function(e,t){try{return e.contains(t)}catch(e){return!1}},down:function(e){e.bubbles=!0,this.fireEvent("pointerdown",e)},move:function(e){e.bubbles=!0,this.fireEvent("pointermove",e)},up:function(e){e.bubbles=!0,this.fireEvent("pointerup",e)},enter:function(e){e.bubbles=!1,this.fireEvent("pointerenter",e)},leave:function(e){e.bubbles=!1,this.fireEvent("pointerleave",e)},over:function(e){e.bubbles=!0,this.fireEvent("pointerover",e)},out:function(e){e.bubbles=!0,this.fireEvent("pointerout",e)},cancel:function(e){e.bubbles=!0,this.fireEvent("pointercancel",e)},leaveOut:function(e){this.out(e),this.contains(e.target,e.relatedTarget)||this.leave(e)},enterOver:function(e){this.over(e),this.contains(e.target,e.relatedTarget)||this.enter(e)},eventHandler:function(e){var t;e._handledByPE||(t=e.type,(t=this.eventMap&&this.eventMap[t])&&t(e),e._handledByPE=!0)},listen:function(t,e){e.forEach(function(e){this.addEvent(t,e)},this)},unlisten:function(t,e){e.forEach(function(e){this.removeEvent(t,e)},this)},addEvent:function(e,t){e.addEventListener(t,this.boundHandler)},removeEvent:function(e,t){e.removeEventListener(t,this.boundHandler)},makeEvent:function(e,t){this.captureInfo[t.pointerId]&&(t.relatedTarget=null);e=new c(e,t);return t.preventDefault&&(e.preventDefault=t.preventDefault),e._target=e._target||t.target,e},fireEvent:function(e,t){e=this.makeEvent(e,t);return this.dispatchEvent(e)},cloneEvent:function(e){for(var t,n=Object.create(null),r=0;r<l.length;r++)n[t=l[r]]=e[t]||d[r],!p||"target"!==t&&"relatedTarget"!==t||n[t]instanceof SVGElementInstance&&(n[t]=n[t].correspondingUseElement);return e.preventDefault&&(n.preventDefault=function(){e.preventDefault()}),n},getTarget:function(e){var t=this.captureInfo[e.pointerId];return t?e._target!==t&&e.type in h?void 0:t:e._target},setCapture:function(e,t){this.captureInfo[e]&&this.releaseCapture(e),this.captureInfo[e]=t;var n=document.createEvent("Event");n.initEvent("gotpointercapture",!0,!1),n.pointerId=e,this.implicitRelease=this.releaseCapture.bind(this,e),document.addEventListener("pointerup",this.implicitRelease),document.addEventListener("pointercancel",this.implicitRelease),n._target=t,this.asyncDispatchEvent(n)},releaseCapture:function(e){var t,n=this.captureInfo[e];n&&((t=document.createEvent("Event")).initEvent("lostpointercapture",!0,!1),t.pointerId=e,this.captureInfo[e]=void 0,document.removeEventListener("pointerup",this.implicitRelease),document.removeEventListener("pointercancel",this.implicitRelease),t._target=n,this.asyncDispatchEvent(t))},dispatchEvent:function(e){var t=this.getTarget(e);return t?t.dispatchEvent(e):void 0},asyncDispatchEvent:function(e){requestAnimationFrame(this.dispatchEvent.bind(this,e))}},m=(f.boundHandler=f.eventHandler.bind(f),f),v={shadow:function(e){return e?e.shadowRoot||e.webkitShadowRoot:void 0},canTarget:function(e){return e&&Boolean(e.elementFromPoint)},targetingShadow:function(e){e=this.shadow(e);return this.canTarget(e)?e:void 0},olderShadow:function(e){var t=e.olderShadowRoot;return t||(e=e.querySelector("shadow"))&&(t=e.olderShadowRoot),t},allShadows:function(e){for(var t=[],n=this.shadow(e);n;)t.push(n),n=this.olderShadow(n);return t},searchRoot:function(e,t,n){if(e){for(var r,o,e=e.elementFromPoint(t,n),i=this.targetingShadow(e);i;){if(r=i.elementFromPoint(t,n))return o=this.targetingShadow(r),this.searchRoot(o,t,n)||r;i=this.olderShadow(i)}return e}},owner:function(e){for(var t=e;t.parentNode;)t=t.parentNode;return t=t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?document:t},findTarget:function(e){var t=e.clientX,n=e.clientY,e=this.owner(e.target);return e.elementFromPoint(t,n)||(e=document),this.searchRoot(e,t,n)}},g=Array.prototype.forEach.call.bind(Array.prototype.forEach),y=Array.prototype.map.call.bind(Array.prototype.map),b=Array.prototype.slice.call.bind(Array.prototype.slice),w=Array.prototype.filter.call.bind(Array.prototype.filter),_=window.MutationObserver||window.WebKitMutationObserver,R={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["touch-action"]},f=(t.prototype={watchSubtree:function(e){this.observer&&v.canTarget(e)&&this.observer.observe(e,R)},enableOnSubtree:function(e){this.watchSubtree(e),e===document&&"complete"!==document.readyState?this.installOnLoad():this.installNewSubtree(e)},installNewSubtree:function(e){g(this.findElements(e),this.addElement,this)},findElements:function(e){return e.querySelectorAll?e.querySelectorAll("[touch-action]"):[]},removeElement:function(e){this.removeCallback(e)},addElement:function(e){this.addCallback(e)},elementChanged:function(e,t){this.changedCallback(e,t)},concatLists:function(e,t){return e.concat(b(t))},installOnLoad:function(){document.addEventListener("readystatechange",function(){"complete"===document.readyState&&this.installNewSubtree(document)}.bind(this))},isElement:function(e){return e.nodeType===Node.ELEMENT_NODE},flattenMutationTree:function(e){var t=y(e,this.findElements,this);return t.push(w(e,this.isElement)),t.reduce(this.concatLists,[])},mutationWatcher:function(e){e.forEach(this.mutationHandler,this)},mutationHandler:function(e){"childList"===e.type?(this.flattenMutationTree(e.addedNodes).forEach(this.addElement,this),this.flattenMutationTree(e.removedNodes).forEach(this.removeElement,this)):"attributes"===e.type&&this.elementChanged(e.target,e.oldValue)}},t),E=["none","auto","pan-x","pan-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]}],T="",C=window.PointerEvent||window.MSPointerEvent,L=!window.ShadowDOMPolyfill&&document.head.createShadowRoot,M=m.pointermap,S=[1,4,2,8,16],O=!1;try{O=1===new MouseEvent("test",{buttons:1}).buttons}catch(e){}var N,P={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup","mouseover","mouseout"],register:function(e){m.listen(e,this.events)},unregister:function(e){m.unlisten(e,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(e){for(var t,n=this.lastTouches,r=e.clientX,o=e.clientY,i=0,a=n.length;i<a&&(t=n[i]);i++){var s=Math.abs(r-t.x),c=Math.abs(o-t.y);if(s<=25&&c<=25)return!0}},prepareEvent:function(e){var t=m.cloneEvent(e),n=t.preventDefault;return t.preventDefault=function(){e.preventDefault(),n()},t.pointerId=this.POINTER_ID,t.isPrimary=!0,t.pointerType=this.POINTER_TYPE,t},prepareButtonsForMove:function(e,t){var n=M.get(this.POINTER_ID);e.buttons=n?n.buttons:0,t.buttons=e.buttons},mousedown:function(e){var t,n;this.isEventSimulatedFromTouch(e)||(t=M.get(this.POINTER_ID),n=this.prepareEvent(e),O||(n.buttons=S[n.button],t&&(n.buttons|=t.buttons),e.buttons=n.buttons),M.set(this.POINTER_ID,e),t?m.move(n):m.down(n))},mousemove:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),m.move(t))},mouseup:function(e){var t,n,r;this.isEventSimulatedFromTouch(e)||(t=M.get(this.POINTER_ID),n=this.prepareEvent(e),O||(r=S[n.button],n.buttons=t?t.buttons&~r:0,e.buttons=n.buttons),M.set(this.POINTER_ID,e),0===n.buttons||n.buttons===S[n.button]?(this.cleanupMouse(),m.up(n)):m.move(n))},mouseover:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),m.enterOver(t))},mouseout:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),m.leaveOut(t))},cancel:function(e){e=this.prepareEvent(e);m.cancel(e),this.cleanupMouse()},cleanupMouse:function(){M.delete(this.POINTER_ID)}},H=m.captureInfo,q=v.findTarget.bind(v),I=v.allShadows.bind(v),k=m.pointermap,x="touch-action",D={events:["touchstart","touchmove","touchend","touchcancel"],register:function(e){j.enableOnSubtree(e)},unregister:function(e){},elementAdded:function(e){var t=e.getAttribute(x),n=this.touchActionToScrollType(t);n&&(e._scrollType=n,m.listen(e,this.events),I(e).forEach(function(e){e._scrollType=n,m.listen(e,this.events)},this))},elementRemoved:function(e){e._scrollType=void 0,m.unlisten(e,this.events),I(e).forEach(function(e){e._scrollType=void 0,m.unlisten(e,this.events)},this)},elementChanged:function(e,t){var n=e.getAttribute(x),r=this.touchActionToScrollType(n),n=this.touchActionToScrollType(t);r&&n?(e._scrollType=r,I(e).forEach(function(e){e._scrollType=r},this)):n?this.elementRemoved(e):r&&this.elementAdded(e)},scrollTypes:{EMITTER:"none",XSCROLLER:"pan-x",YSCROLLER:"pan-y",SCROLLER:/^(?:pan-x pan-y)|(?:pan-y pan-x)|auto$/},touchActionToScrollType:function(e){var t=this.scrollTypes;return"none"===e?"none":e===t.XSCROLLER?"X":e===t.YSCROLLER?"Y":t.SCROLLER.exec(e)?"XY":void 0},POINTER_TYPE:"touch",firstTouch:null,isPrimaryTouch:function(e){return this.firstTouch===e.identifier},setPrimaryTouch:function(e){(0===k.size||1===k.size&&k.has(1))&&(this.firstTouch=e.identifier,this.firstXY={X:e.clientX,Y:e.clientY},this.scrolling=!1,this.cancelResetClickCount())},removePrimaryPointer:function(e){e.isPrimary&&(this.firstTouch=null,this.firstXY=null,this.resetClickCount())},clickCount:0,resetId:null,resetClickCount:function(){var e=function(){this.clickCount=0,this.resetId=null}.bind(this);this.resetId=setTimeout(e,200)},cancelResetClickCount:function(){this.resetId&&clearTimeout(this.resetId)},typeToButtons:function(e){return"touchstart"!==e&&"touchmove"!==e?0:1},touchToPointer:function(e){var t=this.currentTouchEvent,n=m.cloneEvent(e),r=n.pointerId=e.identifier+2,o=(n.target=H[r]||q(n),n.bubbles=!0,n.cancelable=!0,n.detail=this.clickCount,n.button=0,n.buttons=this.typeToButtons(t.type),n.width=e.radiusX||e.webkitRadiusX||0,n.height=e.radiusY||e.webkitRadiusY||0,n.pressure=e.force||e.webkitForce||.5,n.isPrimary=this.isPrimaryTouch(e),n.pointerType=this.POINTER_TYPE,this);return n.preventDefault=function(){o.scrolling=!1,o.firstXY=null,t.preventDefault()},n},processTouches:function(e,t){var n=e.changedTouches;this.currentTouchEvent=e;for(var r,o=0;n.length>o;o++)r=n[o],t.call(this,this.touchToPointer(r))},shouldScroll:function(e){var t,n;if(this.firstXY)return e="none"!==(n=e.currentTarget._scrollType)&&("XY"===n||(e=e.changedTouches[0],t="Y"===n?"X":"Y",n=Math.abs(e["client"+n]-this.firstXY[n]),Math.abs(e["client"+t]-this.firstXY[t])<=n)),this.firstXY=null,e},findTouch:function(e,t){for(var n,r=0,o=e.length;r<o&&(n=e[r]);r++)if(n.identifier===t)return!0},vacuumTouches:function(e){var n,r=e.touches;k.size>=r.length&&(n=[],k.forEach(function(e,t){1===t||this.findTouch(r,t-2)||(t=e.out,n.push(t))},this),n.forEach(this.cancelOut,this))},touchstart:function(e){this.vacuumTouches(e),this.setPrimaryTouch(e.changedTouches[0]),this.dedupSynthMouse(e),this.scrolling||(this.clickCount++,this.processTouches(e,this.overDown))},overDown:function(e){k.set(e.pointerId,{target:e.target,out:e,outTarget:e.target}),m.over(e),m.enter(e),m.down(e)},touchmove:function(e){this.scrolling||(this.shouldScroll(e)?(this.scrolling=!0,this.touchcancel(e)):(e.preventDefault(),this.processTouches(e,this.moveOverOut)))},moveOverOut:function(e){var t,n,r=k.get(e.pointerId);r&&(t=r.out,n=r.outTarget,m.move(e),t&&n!==e.target&&(t.relatedTarget=e.target,e.relatedTarget=n,t.target=n,e.target?(m.leaveOut(t),m.enterOver(e)):(e.target=n,e.relatedTarget=null,this.cancelOut(e))),r.out=e,r.outTarget=e.target)},touchend:function(e){this.dedupSynthMouse(e),this.processTouches(e,this.upOut)},upOut:function(e){this.scrolling||(m.up(e),m.out(e),m.leave(e)),this.cleanUpPointer(e)},touchcancel:function(e){this.processTouches(e,this.cancelOut)},cancelOut:function(e){m.cancel(e),m.out(e),m.leave(e),this.cleanUpPointer(e)},cleanUpPointer:function(e){k.delete(e.pointerId),this.removePrimaryPointer(e)},dedupSynthMouse:function(e){var t=P.lastTouches,e=e.changedTouches[0];this.isPrimaryTouch(e)&&(e={x:e.clientX,y:e.clientY},t.push(e),t=function(e,t){t=e.indexOf(t);-1<t&&e.splice(t,1)}.bind(null,t,e),setTimeout(t,2500))}},j=new f(D.elementAdded,D.elementRemoved,D.elementChanged,D),A=m.pointermap,F=window.MSPointerEvent&&"number"==typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE,z={events:["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerOut","MSPointerOver","MSPointerCancel","MSGotPointerCapture","MSLostPointerCapture"],register:function(e){m.listen(e,this.events)},unregister:function(e){m.unlisten(e,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(e){var t=e;return F&&((t=m.cloneEvent(e)).pointerType=this.POINTER_TYPES[e.pointerType]),t},cleanup:function(e){A.delete(e)},MSPointerDown:function(e){A.set(e.pointerId,e);e=this.prepareEvent(e);m.down(e)},MSPointerMove:function(e){e=this.prepareEvent(e);m.move(e)},MSPointerUp:function(e){var t=this.prepareEvent(e);m.up(t),this.cleanup(e.pointerId)},MSPointerOut:function(e){e=this.prepareEvent(e);m.leaveOut(e)},MSPointerOver:function(e){e=this.prepareEvent(e);m.enterOver(e)},MSPointerCancel:function(e){var t=this.prepareEvent(e);m.cancel(t),this.cleanup(e.pointerId)},MSLostPointerCapture:function(e){e=m.makeEvent("lostpointercapture",e);m.dispatchEvent(e)},MSGotPointerCapture:function(e){e=m.makeEvent("gotpointercapture",e);m.dispatchEvent(e)}},U=window.navigator.msPointerEnabled?(N=function(e){i(e),this.msSetPointerCapture(e)},function(e){i(e),this.msReleasePointerCapture(e)}):(N=function(e){i(e),m.setCapture(e,this)},function(e){i(e),m.releaseCapture(e,this)});return C&&(E.forEach(function(e){e+""===e?(T+=r(e)+o(e)+"\n",L&&(T+=n(e)+o(e)+"\n")):(T+=e.selectors.map(r)+o(e.rule)+"\n",L&&(T+=e.selectors.map(n)+o(e.rule)+"\n"))}),(C=document.createElement("style")).textContent=T,document.head.appendChild(C)),window.PointerEvent||(window.PointerEvent=c,window.navigator.msPointerEnabled?(E=window.navigator.msMaxTouchPoints,Object.defineProperty(window.navigator,"maxTouchPoints",{value:E,enumerable:!0}),m.registerSource("ms",z)):(m.registerSource("mouse",P),void 0!==window.ontouchstart&&m.registerSource("touch",D)),m.register(document)),window.Element&&!Element.prototype.setPointerCapture&&Object.defineProperties(Element.prototype,{setPointerCapture:{value:N},releasePointerCapture:{value:U}}),{dispatcher:m,Installer:f,PointerEvent:c,PointerMap:u,targetFinding:v}}),function(){function s(e){e=P.call(e);return N[e]||(N[e]=e.match(I)[1].toLowerCase())}function o(e,t){t=o[t||s(e)];return t?t(e):e}function p(e){return R[s(e)]?[e]:Array.prototype.slice.call(e,0)}function c(e,t,n){var r=s(n);return"object"==r&&"object"==s(e[t])?A.merge(e[t],n):e[t]=o(n,r),e}function d(e,t,n){var r,o,i={};for(o in t)i[o.split(":")[0]]=o;for(o in n)r=i[o.split(":")[0]],"function"==typeof t[r]?(r.match(":mixins")||(t[r+":mixins"]=t[r],delete t[r],r+=":mixins"),t[r].__mixin__=A.applyPseudos(o+(o.match(":mixins")?"":":mixins"),n[o],e.pseudos,t[r].__mixin__)):(t[o]=n[o],delete t[r])}function f(l){return function e(t,n){for(var r=t.length;r--;)n.unshift(t[r]),A.mixins[t[r]].mixins&&e(A.mixins[t[r]].mixins,n);return n}(l.mixins,[]).forEach(function(e){var t,n=A.mixins[e];for(t in n){var r=n[t],o=l[t];if(o)switch(t){case"mixins":break;case"events":i=c=s=a=void 0;var i,a=l,s=o,c=r;for(i in c)s[i+":__mixin__("+H+++")"]=A.applyPseudos(i,c[i],a.pseudos);break;case"accessors":case"prototype":for(var u in r)o[u]?d(l,o[u],r[u]):o[u]=r[u];break;default:d(l,o,r)}else l[t]=r}}),l}function e(e){return 0===e.button}function i(e,t){var n,r,o,i,a,s=Object.getOwnPropertyDescriptor(e,"target");for(n in t)k[n]||(r=n,o=e,i=t,a=s,a?o[r]=i[r]:Object.defineProperty(o,r,{writable:!0,enumerable:!0,value:i[r]}));e.baseEvent=t}function m(e,t,n,r,o){a[o].call(e,n,t&&t.boolean?"":r)}function v(e,t,n,r,o){if(t&&(t.property||t.selector))for(var i=t.property?[e.xtag[t.property]]:t.selector?A.query(e,t.selector):[],a=i.length;a--;)i[a][o](n,r)}function g(e,t){e.prototype[t]={};var n,r,o,i=e.accessors[t],a=i.attribute;for(r in a&&(n=a.name=(a?a.name||t.replace(T,"$1-$2"):t).toLowerCase(),a.key=t,e.attributes[n]=a),i)!function(e,t,r,o,i,a){var n=r.split(":"),s=n[0];"get"==s?(n[0]=t,e.prototype[t].get=A.applyPseudos(n.join(":"),o[r],e.pseudos,o[r])):"set"==s?(n[0]=t,e.prototype[t].set=A.applyPseudos(n.join(":"),i?function(e){var t,n="setAttribute";i.boolean?(e=!!e,t=this.hasAttribute(a),e||(n="removeAttribute")):(e=i.validate?i.validate.call(this,e):e,t=this.getAttribute(a)),m(this,i,a,e,n),o[r].call(this,e,t),v(this,i,a,e,n)}:o[r]?function(e){o[r].call(this,e)}:null,e.pseudos,o[r]),i&&(i.setter=o[r])):e.prototype[t][r]=o[r]}(e,t,r,i,a,n);a&&(e.prototype[t].get||(o=(a.boolean?"has":"get")+"Attribute",e.prototype[t].get=function(){return this[o](n)}),e.prototype[t].set||(e.prototype[t].set=function(e){e=a.boolean?!!e:a.validate?a.validate.call(this,e):e;var t=!a.boolean||e?"setAttribute":"removeAttribute";m(this,a,n,e,t),v(this,a,n,e,t)}))}function y(e){return"function"==typeof e?q.exec(""+e)[1]:e}function h(){}function b(){return!0}var t,n,w=window,_=document,a={setAttribute:Element.prototype.setAttribute,removeAttribute:Element.prototype.removeAttribute},E=Element.prototype.createShadowRoot,u=_.createElement("div"),l=/,/g,T=/([a-z])([A-Z])/g,r=/\(|\)/g,C=/:(\w+)\u276A(.+?(?=\u276B))|:(\w+)/g,L=/(\d+)/g,M={action:function(e,t){return-1<e.value.match(L).indexOf(t.keyCode+"")==("keypass"==e.name)||null}},S={dom:"ms"==(t=((t=Object.keys(window).join()).match(/,(ms)/)||t.match(/,(moz)/)||t.match(/,(O)/)||[null,"webkit"])[1].toLowerCase())?"MS":t,lowercase:t,css:"-"+t+"-",js:"ms"==t?t:t.charAt(0).toUpperCase()+t.substring(1)},O=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype[S.lowercase+"MatchesSelector"],N={},P=N.toString,I=/\s([a-zA-Z]+)/,R=(o.object=function(e){var t,n={};for(t in e)n[t]=o(e[t]);return n},o.array=function(e){for(var t=e.length,n=Array(t);t--;)n[t]=o(e[t]);return n},{undefined:1,null:1,number:1,boolean:1,string:1,function:1}),H=0,k={};for(n in _.createEvent("CustomEvent"))k[n]=1;var x,D,q=/\/\*!?(?:\@preserve)?[ \t]*(?:\r\n|\n)([\s\S]*?)(?:\r\n|\n)\s*\*\//,A={tags:{},defaultOptions:{pseudos:[],mixins:[],events:{},methods:{},accessors:{},lifecycle:{},attributes:{},prototype:{xtag:{get:function(){return this.__xtag__||(this.__xtag__={data:{}})}}}},register:function(e,t){if("string"!=typeof e)throw"First argument must be a Custom Element string name";e=e.toLowerCase(),A.tags[e]=t||{};var n,o=t.prototype,a=(delete t.prototype,A.tags[e].compiled=f(A.merge({},A.defaultOptions,t))),i=a.prototype,r=a.lifecycle;for(n in a.events)a.events[n]=A.parseEvent(n,a.events[n]);for(n in r)r[n.split(":")[0]]=A.applyPseudos(n,r[n],a.pseudos,r[n]);for(n in a.methods)i[n.split(":")[0]]={value:A.applyPseudos(n,a.methods[n],a.pseudos,a.methods[n]),enumerable:!0};for(n in a.accessors)g(a,n);a.shadow&&(a.shadow=a.shadow.nodeName?a.shadow:A.createFragment(a.shadow)),a.content&&(a.content=a.content.nodeName?a.content.innerHTML:y(a.content));var s=r.created,c=r.finalized,u=(i.createdCallback={enumerable:!0,value:function(){var e,t=this,n=(a.shadow&&E&&this.createShadowRoot().appendChild(a.shadow.cloneNode(!0)),a.content&&(this.appendChild(document.createElement("div")).outerHTML=a.content),s?s.apply(this,arguments):null);for(e in A.addEvents(this,a.events),a.attributes){var r=a.attributes[e],o=this.hasAttribute(e),i=void 0!==r.def;(o||r.boolean||i)&&(this[r.key]=r.boolean?o:!o&&i?r.def:this.getAttribute(e))}return a.pseudos.forEach(function(e){e.onAdd.call(t,e)}),this.xtagComponentReady=!0,c&&c.apply(this,arguments),n}},r.inserted),l=r.removed,t=((u||l)&&(i.attachedCallback={value:function(){return l&&(this.xtag.__parentNode__=this.parentNode),u?u.apply(this,arguments):void 0},enumerable:!0}),l&&(i.detachedCallback={value:function(){var e=p(arguments),e=(e.unshift(this.xtag.__parentNode__),l.apply(this,e));return delete this.xtag.__parentNode__,e},enumerable:!0}),r.attributeChanged&&(i.attributeChangedCallback={value:r.attributeChanged,enumerable:!0}),i.setAttribute={writable:!0,enumerable:!0,value:function(e,t){var n,e=e.toLowerCase(),r=a.attributes[e];r&&(n=this.getAttribute(e),t=r.boolean?"":r.validate?r.validate.call(this,t):t),m(this,r,e,t,"setAttribute"),r&&(r.setter&&r.setter.call(this,!!r.boolean||t,n),v(this,r,e,t,"setAttribute"))}},i.removeAttribute={writable:!0,enumerable:!0,value:function(e){var e=e.toLowerCase(),t=a.attributes[e],n=this.hasAttribute(e);m(this,t,e,"","removeAttribute"),t&&(t.setter&&t.setter.call(this,!t.boolean&&void 0,n),v(this,t,e,"","removeAttribute"))}},{}),d=o instanceof w.HTMLElement,h=a.extends&&(t.extends=a.extends);return o&&Object.getOwnPropertyNames(o).forEach(function(e){var t=i[e],n=d?Object.getOwnPropertyDescriptor(o,e):o[e];if(t)for(var r in n)t[r]="function"==typeof n[r]&&t[r]?A.wrap(n[r],t[r]):n[r];i[e]=t||n}),t.prototype=Object.create((h?Object.create(_.createElement(h).constructor):w.HTMLElement).prototype,i),_.registerElement(e,t)},mixins:{},prefix:S,captureEvents:{focus:1,blur:1,scroll:1,DOMMouseScroll:1},customEvents:{animationstart:{attach:[S.dom+"AnimationStart"]},animationend:{attach:[S.dom+"AnimationEnd"]},transitionend:{attach:[S.dom+"TransitionEnd"]},move:{attach:["pointermove"]},enter:{attach:["pointerenter"]},leave:{attach:["pointerleave"]},scrollwheel:{attach:["DOMMouseScroll","mousewheel"],condition:function(e){return e.delta=e.wheelDelta?e.wheelDelta/40:Math.round(e.detail/3.5*-1),!0}},tap:{attach:["pointerdown","pointerup"],condition:function(e,t){if("pointerdown"==e.type)t.startX=e.clientX,t.startY=e.clientY;else if(0===e.button&&Math.abs(t.startX-e.clientX)<10&&Math.abs(t.startY-e.clientY)<10)return!0}},tapstart:{attach:["pointerdown"],condition:e},tapend:{attach:["pointerup"],condition:e},tapmove:{attach:["pointerdown"],condition:function(e,t){var n;return"pointerdown"==e.type?(n=t.listener.bind(this),t.tapmoveListeners||(t.tapmoveListeners=A.addEvents(document,{pointermove:n,pointerup:n,pointercancel:n}))):"pointerup"!=e.type&&"pointercancel"!=e.type||(A.removeEvents(document,t.tapmoveListeners),t.tapmoveListeners=null),!0}},taphold:{attach:["pointerdown","pointerup"],condition:function(e,t){if("pointerdown"==e.type)(t.pointers=t.pointers||{})[e.pointerId]=setTimeout(A.fireEvent.bind(null,this,"taphold"),t.duration||1e3);else{if("pointerup"!=e.type)return!0;t.pointers&&(clearTimeout(t.pointers[e.pointerId]),delete t.pointers[e.pointerId])}}}},pseudos:{__mixin__:{},mixins:{onCompiled:function(t,e){var n=e.source&&e.source.__mixin__||e.source;if(!n)return t;switch(e.value){case null:case"":case"before":return function(){return n.apply(this,arguments),t.apply(this,arguments)};case"after":return function(){var e=t.apply(this,arguments);return n.apply(this,arguments),e};case"none":return t}}},keypass:M,keyfail:M,delegate:{action:function(e,t){for(var n,r=t.target,o=t.currentTarget;!n&&r&&r!=o;)r.tagName&&O.call(r,e.value)&&(n=r),r=r.parentNode;return(n=!n&&o.tagName&&O.call(o,e.value)?o:n)?e.listener=e.listener.bind(n):null}},preventable:{action:function(e,t){return!t.defaultPrevented}},duration:{onAdd:function(e){e.source.duration=Number(e.value)}},capture:{onCompiled:function(e,t){t.source&&(t.source.capture=!0)}}},clone:o,typeOf:s,toArray:p,wrap:function(t,n){return function(){var e=t.apply(this,arguments);return n.apply(this,arguments),e}},merge:function(e,t,n){if("string"==s(t))return c(e,t,n);for(var r=1,o=arguments.length;r<o;r++){var i,a=arguments[r];for(i in a)c(e,i,a[i])}return e},uid:function(){return Math.random().toString(36).substr(2,10)},query:function(e,t){return(t||"").length?p(e.querySelectorAll(t)):[]},skipTransition:function(e,t,n){var r=S.js+"TransitionProperty",o=(e.style[r]=e.style.transitionProperty="none",t?t.call(n||e):null);return A.skipFrame(function(){e.style[r]=e.style.transitionProperty="",o&&o.call(n||e)})},requestFrame:(D=w.requestAnimationFrame||w[S.lowercase+"RequestAnimationFrame"]||function(e){return w.setTimeout(e,20)},function(e){return D(e)}),cancelFrame:(x=w.cancelAnimationFrame||w[S.lowercase+"CancelAnimationFrame"]||w.clearTimeout,function(e){return x(e)}),skipFrame:function(e){var t=A.requestFrame(function(){t=A.requestFrame(e)});return t},matchSelector:function(e,t){return O.call(e,t)},set:function(e,t,n){e[t]=n,window.CustomElements&&CustomElements.upgradeAll(e)},innerHTML:function(e,t){A.set(e,"innerHTML",t)},hasClass:function(e,t){return-1<e.className.split(" ").indexOf(t.trim())},addClass:function(e,t){var n=e.className.trim().split(" ");return t.trim().split(" ").forEach(function(e){~n.indexOf(e)||n.push(e)}),e.className=n.join(" ").trim(),e},removeClass:function(e,t){var n=t.trim().split(" ");return e.className=e.className.trim().split(" ").filter(function(e){return e&&!~n.indexOf(e)}).join(" "),e},toggleClass:function(e,t){return A[A.hasClass(e,t)?"removeClass":"addClass"].call(null,e,t)},queryChildren:function(e,t){var n=e.id,r="#"+(e.id=n||"x_"+A.uid())+" > ",o=e.parentNode||!u.appendChild(e),r=(t=r+(t+"").replace(l,","+r),e.parentNode.querySelectorAll(t));return n||e.removeAttribute("id"),o||u.removeChild(e),p(r)},createFragment:function(e){var t=document.createElement("template");return e&&(e.nodeName?p(arguments).forEach(function(e){t.content.appendChild(e)}):t.innerHTML=y(e)),document.importNode(t.content,!0)},manipulate:function(e,t){var n=e.nextSibling,r=e.parentNode,t=t.call(e)||e;n?r.insertBefore(t,n):r.appendChild(t)},applyPseudos:function(o,i,a,s){var e,c=i,u={};if(o.match(":")){var l=[],t=0;o.replace(r,function(e){return"("==e?1==++t?"❪":"(":--t?")":"❫"}).replace(C,function(e,t,n,r){l.push([t||r,n])});for(var d=l.length;d--;)!function(){var e=l[d][0],t=l[d][1];if(!A.pseudos[e])throw"pseudo not found: "+e+" "+t;var t=""===t||void 0===t?null:t,n=u[d]=Object.create(A.pseudos[e]),r=(n.key=o,n.name=e,n.value=t,n.arguments=(t||"").split(","),n.action=n.action||b,n.source=s,n.onAdd=n.onAdd||h,n.onRemove=n.onRemove||h,n.listener=c);c=function(){var e=n.action.apply(this,[n].concat(p(arguments)));return null===e||!1===e||(e=n.listener.apply(this,arguments),n.listener=r),e},a?a.push(n):n.onAdd.call(i,n)}()}for(e in u)u[e].onCompiled&&(c=u[e].onCompiled(c,u[e])||c);return c},removePseudos:function(t,e){e.forEach(function(e){e.onRemove.call(t,e)})},parseEvent:function(e,t){var e=e.split(":"),r=e.shift(),n=A.customEvents[r],o=A.merge({type:r,stack:h,condition:b,capture:A.captureEvents[r],attach:[],_attach:[],pseudos:"",_pseudos:[],onAdd:h,onRemove:h},n||{}),i=(o.attach=p(o.base||o.attach),o.chain=r+(o.pseudos.length?":"+o.pseudos:"")+(e.length?":"+e.join(":"):""),A.applyPseudos(o.chain,t,o._pseudos,o));return o.stack=function(e){e.currentTarget=e.currentTarget||this;var t=e.detail||{};return t.__stack__?t.__stack__==i?(e.stopPropagation(),e.cancelBubble=!0,i.apply(this,arguments)):void 0:i.apply(this,arguments)},o.listener=function(e){var t=p(arguments),n=o.condition.apply(this,t.concat([o]));return n&&(e.type!=r&&e.baseEvent&&e.type!=e.baseEvent.type?void A.fireEvent(e.target,r,{baseEvent:e,detail:!0!==n&&(n.__stack__=i)?n:{__stack__:i}}):o.stack.apply(this,t))},o.attach.forEach(function(e){o._attach.push(A.parseEvent(e,o.listener))}),o},addEvent:function(t,e,n,r){e="function"==typeof n?A.parseEvent(e,n):n;return e._pseudos.forEach(function(e){e.onAdd.call(t,e)}),e._attach.forEach(function(e){A.addEvent(t,e.type,e)}),e.onAdd.call(t,e,e.listener),t.addEventListener(e.type,e.stack,r||e.capture),e},addEvents:function(e,t){var n,r={};for(n in t)r[n]=A.addEvent(e,n,t[n]);return r},removeEvent:function(t,e,n){(n=n||e).onRemove.call(t,n,n.listener),A.removePseudos(t,n._pseudos),n._attach.forEach(function(e){A.removeEvent(t,e)}),t.removeEventListener(n.type,n.stack)},removeEvents:function(e,t){for(var n in t)A.removeEvent(e,t[n])},fireEvent:function(e,t,n){var r=_.createEvent("CustomEvent");r.initCustomEvent(t,!1!==(n=n||{}).bubbles,!1!==n.cancelable,n.detail),n.baseEvent&&i(r,n.baseEvent),e.dispatchEvent(r)}};"function"==typeof define&&define.amd?define(A):"undefined"!=typeof module&&module.exports?module.exports=A:w.xtag=A,_.addEventListener("WebComponentsReady",function(){A.fireEvent(_.body,"DOMComponentsLoaded")})}();
1
+ /*! quran-madina-html 21-07-2026 */
2
+ !function(){var I="quran-madina-html",d=/localhost/.test(document.location.hostname)?"../":`https://www.unpkg.com/${I}/`,x={content:"Loading .."},i=/[\u0621-\u064A\u0671-\u06D3]/,k="﷽";function D(t,e){return 1===e&&0!==t}var s={};var c={};function h(i,t,e,n){var a,r=!n&&function(t){if(s[t])return s[t];try{var e=sessionStorage.getItem("quran-madina-html:"+t);if(e)return s[t]=JSON.parse(e)}catch(t){}return null}(i);r?t&&setTimeout(function(){t(r)},0):c[i]?c[i].push({success:t,error:e}):(c[i]=[{success:t,error:e}],(a=new XMLHttpRequest).onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){var t=c[i];if(delete c[i],200===a.status){var e=JSON.parse(a.responseText),n=i,r=e,o=a.responseText;s[n]=r;try{sessionStorage.setItem("quran-madina-html:"+n,o)}catch(t){}t.forEach(function(t){t.success&&t.success(e)})}else t.forEach(function(t){t.error&&t.error(a)})}},a.open("GET",i,!0),a.send())}function A(t){console.log(I+"> "+t)}function R(t){return null!=t&&(""===(t=String(t).trim().toLowerCase())||"true"===t||"1"===t||"yes"===t)}function q(t){var e=(e=(e=getComputedStyle(t).color)&&e.match(/[\d.]+/g))?.2126*n(+e[0])+.7152*n(+e[1])+.0722*n(+e[2]):1;function n(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}t.setAttribute("data-qmh-text-scheme",.5<e?"dark":"light")}function H(t){return Array(2).fill(t.split("-")[0]-1)}function j(t){return 2==t.split("-").length?t.split("-").map(t=>parseInt(t)+1):Array(2).fill(parseInt(t.split("-")[0])+1)}function F(t){return null==t||2!=(t=1==(t=t.split(/[-:]/).map(t=>parseInt(t,10))).length?[t[0],t[0]]:t).length||isNaN(t[0])||isNaN(t[1])||t[0]<1||t[1]<t[0]?null:t}function z(t,e,n){return null==e?null:e[0]<n[0]||e[1]>n[1]?(A(`${t} range ${e[0]}-${e[1]} outside displayed words ${n[0]}-${n[1]}, ignoring`),null):e}function W(t,e){if(null!=t&&"auto"!==t){if("no"===t)return!0;A("yes"===t?'inline="yes" is not implemented yet; falling back to "auto"':"Bad inline parameter: "+t)}return e}function _(t){return i.test(t)}function U(t,e){return(0===t?2:1)<=e}function Y(t){var e=0;return t.t.split(/\s+/).forEach(function(t){_(t)&&(e+=1)}),e}function $(t){var e=0;return t.r.forEach(function(t){e+=Y(t)}),e}function G(t,e="class",n="lightgrey",r="transparent"){var o="tag"===e.toLowerCase()?document.getElementsByTagName(t):document.getElementsByClassName(t);Array.from(o).forEach(function(t){t.onmouseover=function(){Array.from(o).forEach(function(t){t.style.backgroundColor=n})},t.onmouseout=function(){Array.from(o).forEach(function(t){t.style.backgroundColor=r})}})}function K(t,e){var n=(t,e)=>String(t).padStart(e,"0"),n=[I+"-part",`${I}-${n(t,3)}-`+n(e,3)];return(-1==e||1==t&&0==e)&&n.push("quran-madina-html-sura-start"),n}function E(){var t=document.createElement("div");return t.innerHTML='<svg viewBox="0 0 24 24" class="quran-madina-html-icon" width="20px"><path d="M16.02 20.96H3.78c-.41 0-.75-.34-.75-.75V7.74c0-.41.34-.75.75-.75h7.87c.21 0 .39.08.53.22l4.37 4.37c.14.14.22.32.22.53v8.11c0 .4-.34.74-.75.74ZM4.53 19.47h10.75v-6.61h-3.62c-.41 0-.75-.34-.75-.75V8.48H4.53v10.99Z"></path><path d="m20.74 7.63-4.37-4.37c-.14-.14-.36-.2-.53-.22H8.01c-.41 0-.75.34-.75.75V5.5h1.49v-.97h6.34v3.62c0 .41.34.75.75.75h3.62v8.19h-1.2v1.49h1.95c.41 0 .75-.34.75-.75V8.16c0-.21-.08-.4-.22-.53Z"></path></svg>'.trim(),t.firstChild}function T(){var t=document.createElement("div");return t.innerHTML='<svg class="quran-madina-html-icon" viewBox="0 0 820 615" style="height:20px"><path d="M70 1.9C37.6 8.8 12.6 33.4 3.4 67.5c-1.8 6.6-1.9 11.9-1.9 98v91l2.3 8c5.1 17.8 17 36.4 29.9 46.7 10.8 8.6 25.4 15.4 38.1 17.8 3.1.6 15.2 1 26.8 1 17.7 0 21.3.2 21.7 1.4.4.9.6 17.1.7 36.1 0 32.4.2 34.9 2 38.5 6.4 12.5 21.4 17.4 33.3 10.8 2.3-1.3 7.5-6.4 12.1-11.9l63-74.1c.6-.4 16.3-.8 34.9-.8H300l-.2-18.3-.3-18.2-42.8.1-43.1.5c-.2.2-12.7 15.1-27.9 33.1-15.1 18-27.8 32.4-28.1 32.1-.3-.4-.6-15.3-.6-33.2v-32.6l-38.8-.1c-42.1-.2-43.9-.4-54.3-6-6.5-3.6-16.9-14.6-20.2-21.5-5.8-11.9-5.7-10-5.7-100.7 0-92-.2-89.4 6.3-101.7 3.9-7.3 13.5-17.1 20.3-20.7C76 36.7 66.1 37 244.5 37L412 38.1c18 4.1 33.5 20.5 37.5 39.6 2.2 10.2 2.1 164.6 0 174.8-3.9 18.3-16.4 32.7-33.5 38.5-3.2 1.1-7.8 2-10 2-3.1 0-4 .4-4 1.7 0 1-.2 8.8-.3 17.3-.2 8.5-.2 16.2 0 17 .9 3.3 21.7-.5 34.1-6 13.7-6.3 27.5-17.9 36.2-30.5 5-7.2 10.8-20.4 13.2-30.1l2.3-8.9V165 76.5l-2.3-9c-8.1-31.4-30.5-54.9-61.7-64.8l-7-2.2-169-.2C87.7.1 78 .2 70 1.9zm277.294 102.559q19.5-.5 28.25 24.5 2.5 7.25-3.75 19.75-5.75 11.75-9.75 16-19.5 21.5-67 25.25-27.75 2.25-50.25-2.25-5.25 38.25-16.5 50-26 26.75-66 29.5-27.75 2-42.5-11-20.25-17.75-16.5-48.5 3-23.75 14.25-42.5 2.75-4.5 4.75-7.5 2-3 3-4.25 2.25-2.75 4.75-1.25 2.75 1.5 0 6.25-12.75 24.5-10 45 4 30.5 44.5 30.5 30.25 0 53.25-15.5 12.5-8.25 14.75-14.25-2.25-20.75-13.75-35.75-3.5-4.25-1.75-8l9.5-23.5q3-7.5 8.25 1.25l8.75 14.75q7.75 4.25 28.25 5 16.75-19.25 39.25-36.25 22.5-16.75 36.25-17.25zm11.5 40.5q-12.5-9.5-31.75-5.75-19 3.75-41.25 19.5 50.75.5 73-13.75zm-71.5-89.75q1.5-2 4.25-1.25 5 1.75 9.5 4.5 4.75 2.75 8.75 6.25 2 2 .75 4.5l-12 19q-1.75 2.5-4.5.5-2.5-2-18-11.25-2.75-1.75-1-4.25zm278.784 232.623c-4.7.4-4.7.4-6.7 6.1-1.2 3.1-9.3 25.9-18 50.7l-36.6 102.7-3.5 9.8h17.9 17.8l5.7-17 5.7-17h31.7 31.8l5.6 17.2 5.6 17.3 17.9-.3 18-.3-6-17.2-15-43.2-13.3-38.5-14.1-41-9.9-28.7c-.3-.6-30.2-1.1-34.6-.6zm35.7 106c-.2.2-10 .2-21.9.1l-21.5-.3 9.8-29.5 11-32.5c1.2-2.9 1.8-1.4 12.1 29.4l10.5 32.8zm148.8 139.609c32.4-6.9 57.4-31.5 66.6-65.6 1.8-6.6 1.9-11.9 1.9-98v-91l-2.3-8c-5.1-17.8-17-36.4-29.9-46.7-10.8-8.6-25.4-15.4-38.1-17.8-3.1-.6-15.2-1-26.8-1-17.7 0-21.3-.2-21.7-1.4-.4-.9-.6-17.1-.7-36.1 0-32.4-.2-34.9-2-38.5-6.4-12.5-21.4-17.4-33.3-10.8-2.3 1.3-7.5 6.4-12.1 11.9l-63 74.1c-.6.4-16.3.8-34.9.8h-33.7l.2 18.3.3 18.2 42.8-.1 43.1-.5c.2-.2 12.7-15.1 27.9-33.1 15.1-18 27.8-32.4 28.1-32.1.3.4.6 15.3.6 33.2v32.6l38.8.1c42.1.2 43.9.4 54.3 6 6.5 3.6 16.9 14.6 20.2 21.5 5.8 11.9 5.7 10 5.7 100.7 0 92 .2 89.4-6.3 101.7-3.9 7.3-13.5 17.1-20.3 20.7-11.4 6.1-1.5 5.8-179.9 5.8-108.2 0-164.5-.4-167.5-1.1-18-4.1-33.5-20.5-37.5-39.6-2.2-10.2-2.1-164.6 0-174.8 3.9-18.3 16.4-32.7 33.5-38.5 3.2-1.1 7.8-2 10-2 3.1 0 4-.4 4-1.7 0-1 .2-8.8.3-17.3.2-8.5.2-16.2 0-17-.9-3.3-21.7.5-34.1 6-13.7 6.3-27.5 17.9-36.2 30.5-5 7.2-10.8 20.4-13.2 30.1l-2.3 8.9v88.5 88.5l2.3 9c8.1 31.4 30.5 54.9 61.7 64.8l7 2.2 169 .2 177.5-1.6z"/></svg>'.trim(),t.firstChild}function Z(t){var e=document.createElement("quran-madina-html-header"),t=(e.innerHTML=t,E()),n=(t.addEventListener("click",S),T());return n.addEventListener("click",O),e.appendChild(t),e.appendChild(n),e}var p=null;function B(){p&&(p.popup.classList.remove(I+"-open"),document.removeEventListener("click",p.outsideClick),document.removeEventListener("keydown",p.onEscape),p=null)}function a(e,t,n,r,o){B();function i(t){u.contains(t.target)||B()}function a(t){"Escape"===t.key&&B()}s=e,(c=document.querySelector(`body > ${I}-aya-popup`))||((c=document.createElement(I+"-aya-popup")).appendChild(E()),c.appendChild(T()),document.body.appendChild(c)),["--qmh-header","--qmh-background"].forEach(function(t){c.style.setProperty(t,getComputedStyle(s).getPropertyValue(t))});var s,c,u=c,l=u.children[0],d=u.children[1];l.onclick=function(t){t.stopPropagation();t="“"+Array.from(e.getElementsByClassName(n)).map(function(t){return t.textContent}).join(" ").replace(/\s+/g," ").trim()+"”\n\n"+x.suras[r-1].name;navigator.clipboard.writeText(t),alert("⎘ تم نسخ:\n\n"+t),B()},d.onclick=function(t){t.stopPropagation(),window.open(`https://quran.com/${r}/`+o,"_blank"),B()},l=u,d=(d=t).getBoundingClientRect(),l.style.left=Math.max(4,d.left)+"px",l.style.top=(0<d.top-34-6?d.top-34-6:d.bottom+6)+"px",u.classList.add(I+"-open");document.addEventListener("click",i),document.addEventListener("keydown",a),p={popup:u,outsideClick:i,onEscape:a}}function J(n,r,o,i){i<1||Array.from(n.getElementsByClassName(r)).forEach(function(e){e.style.cursor="pointer",e.onclick=function(t){t.stopPropagation(),a(n,e,r,o,i)}})}function Q(t,e){t.style="display:block;",t.style.setProperty("font-family",x.font_family,""),t.style.setProperty("font-size",x.font_size+"px",""),"me_quran"===x.font_family&&t.style.setProperty("line-height",2*x.font_size+"px",""),t.style.width=x.line_width+10+"px",t.style.setProperty("box-shadow","inset "+(e%2==1?"":"-")+"8px 0 7px -7px #333","")}function tt(t,e){0<=e?t.style.setProperty("transform",`scaleX(${e*(x.stretch_scale||1)})`,""):t.style.setProperty("text-align","center","")}function C(t,e,n,r){r&&e>=r[0]&&e<=r[1]?t.classList.add(I+"-word-error"):n&&e>=n[0]&&e<=n[1]&&t.classList.add(I+"-word-highlight")}function et(n,t,r,o,i,a){return t.split(/(\s+)/).forEach(function(t){var e;""!==t&&(/^\s+$/.test(t)?n.appendChild(document.createTextNode(t)):((e=document.createElement("span")).textContent=t,e.classList.add(I+"-word"),_(t)&&(o+=1),r&&(o<r[0]||o>r[1])&&e.classList.add(I+"-word-hidden"),C(e,o,i,a),n.appendChild(e)))}),o}function nt(e,n,t,r,o){function i(t){return!t||e+1>=t[0]&&e+n<=t[1]}function a(t){return t&&!i(t)&&e+n>=t[0]&&e+1<=t[1]}return!i(t)||a(r)||a(o)?{ligature:!1}:(t=null,o&&i(o)?t="error":r&&i(r)&&(t="highlight"),{ligature:!0,cls:t})}function L(t,e){for(var n=0;n<t.r.length;n++)if(t.r[n].l===e)return t.r[n];return null}function M(t,e,n){var r,t=x.suras[t].ayas;return e<=0||void 0===(r=t[e-1])||r.p!==t[e].p||null===L(r,n)}function X(t,e,n,r,o){for(var i=x.suras[t].ayas,a=[],s=r+o;0<=s&&s<i.length&&void 0!==i[s]&&i[s].p==e;s+=o){var c=L(i[s],n);if(null===c)break;if(o<0){if(a.unshift(c),M(t,s,n))break}else a.push(c)}return a}function V(t,e){for(var n=0;n<e.length;n++){var r=document.createElement("div");r.textContent=e[n].t,r.style.cssText="display:inline;visibility:hidden",t.appendChild(r)}}function S(){var t=this.parentElement.parentElement,e=t.querySelector("quran-madina-html-header"),n=(e=e?e.textContent.replace(/\s+/g," ").trim():null!=(e=t.getAttribute("sura"))?x.suras[e-1].name:"",(n=(t=(t=t).cloneNode(!0)).querySelector("quran-madina-html-header"))&&n.parentNode.removeChild(n),Array.from(t.querySelectorAll(`.${I}-word-hidden`)).forEach(function(t){t.parentNode.removeChild(t)}),Array.from(t.querySelectorAll("div,span")).forEach(function(t){/visibility:\s*hidden/.test(t.getAttribute("style")||"")&&t.parentNode.removeChild(t)}),t),t=n.querySelectorAll("quran-madina-html-line"),t=t.length?Array.from(t).map(function(t){return t.textContent.replace(/\s+/g," ").trim()}).filter(function(t){return""!==t}).join(" "):n.textContent.replace(/\s+/g," ").trim(),n="“"+t+"”\n\n"+e;navigator.clipboard.writeText(n),alert("⎘ تم نسخ:\n\n"+n)}function O(){var t=this.parentElement.parentElement;let e;e=null!=t.getAttribute("sura")&&null!=t.getAttribute("aya")?`https://quran.com/${t.getAttribute("sura")}/`+t.getAttribute("aya"):"https://quran.com/page/"+t.getAttribute("page"),window.open(e,"_blank")}function rt(s,t,e,c,n,r,o,u,l,d){(l||d)&&q(s);var t=function(t,e,n){for(var r=[],o=null,i=0,a=x.suras.length,s=2===e&&0<t?1:e,c=0;c<a;c++){for(var u=(t+c)%a,l=x.suras[u].ayas,d=!1,h=0===c?s:0;h<l.length;h++){var p=U(u,h),f=l[h];if(void 0===f)break;for(var m=0;m<f.r.length;m++){var v,g=f.r[m];""!==g.t&&(v=f.p+":"+g.l,o&&o.key===v||(o={key:v,stretch:g.s,parts:[]},r.push(o)),o.parts.push({sura:u,ayaIdx:h,part:g,countable:p}))}if(p&&(i+=$(f))>=n[1]){d=!0;break}}if(d)break}for(var y=0,b=(r.forEach(function(t){t.parts.forEach(function(t){t.countable&&(y+=Y(t.part))}),t.lastWord=y}),0);b<r.length-1&&r[b].lastWord<n[0];)b+=1;for(var w=b;w<r.length-1&&r[w].lastWord<n[1];)w+=1;return{groups:r.slice(b,w+1),counterStart:0<b?r[b-1].lastWord:0}}(t,e,c),i=t.groups,h=W(o,1<i.length),p=t.counterStart;B(),s.innerHTML="",s.removeAttribute("style"),s.classList.toggle(I+"-inline",!h&&!r),h&&(e=parseInt(i[0].key.split(":")[0],10),Q(s,e),n||s.appendChild(Z(x.suras[i[0].parts[0].sura].name))),i.forEach(function(t,e){var n,a=document.createElement("quran-madina-html-line");h?(a.style.setProperty("display","block",""),tt(a,t.stretch),M((n=t.parts[0]).sura,n.ayaIdx,n.part.l)||V(a,X(n.sura,x.suras[n.sura].ayas[n.ayaIdx].p,n.part.l,n.ayaIdx,-1))):(a.style.setProperty("font-family",x.font_family,""),a.style.setProperty("font-size",x.font_size+"px","")),s.appendChild(a),t.parts.forEach(function(t){var e,n,r,o=document.createElement("div"),i=K(t.sura+1,t.ayaIdx-1);DOMTokenList.prototype.add.apply(o.classList,i),t.countable?(r=0<(e=D(t.sura,t.ayaIdx)?Y(t.part):0)?nt(p,e,c,l,d):{ligature:!1}).ligature?((n=document.createElement("span")).classList.add(I+"-word",I+"-basmala"),r.cls&&n.classList.add(I+"-word-"+r.cls),n.textContent=k,o.appendChild(n),p+=e):p=et(o,t.part.t,c,p,l,d):u&&(0===t.ayaIdx||0===t.sura&&1===t.ayaIdx)?((r=document.createElement("span")).textContent=t.part.t,r.style.visibility="hidden",o.appendChild(r)):o.textContent=t.part.t,o.style.cssText="display:inline",a.appendChild(o),G(i.slice(-1)[0]),J(s,i.slice(-1)[0],t.sura+1,t.ayaIdx-1)}),h&&e===i.length-1&&(n=t.parts[t.parts.length-1],V(a,X(n.sura,x.suras[n.sura].ayas[n.ayaIdx].p,n.part.l,n.ayaIdx,1)))})}var t,N,u,e=16,n=[16,24],r=[6,100],o=document.currentScript||document.querySelector(`script[src*="${I}"]`),f=o.getAttribute("data-name")||"Madina05",m=(o.getAttribute("data-font")||"me_quran").replaceAll(" ","_"),v=parseFloat(o.getAttribute("data-font-size"))||e,r=((v<r[0]||r[1]<v)&&(A(`font-size ${v} outside ${r[0]}..${r[1]}, using `+e),v=e),o.getAttribute("data-cdn")),o=(r&&(d=r.replace(/\/?$/,"/")),A(f+` with font: ${m} size: `+v),d+"dist/"+I+".min.css?v=1.1");function g(t){u=d+`assets/db/${N=f+`-${m}-${v=t}px`}/`}document.getElementById(I)||(r=document.getElementsByTagName("head")[0],(t=document.createElement("link")).id=I,t.rel="stylesheet",t.type="text/css",t.href=o,t.media="all",r.appendChild(t)),g(v);var y=null;function P(){y&&(x.font_size=y.font_size,x.line_width=y.line_width,x.stretch_scale=y.stretch_scale)}var l={};function b(t,e){if(!x.juz)return-1;for(var n=Math.max(e,2),r=0,o=x.juz,i=0;i<o.length&&(o[i][0]<t||o[i][0]===t&&o[i][1]<=n);i++)r=i;return r}function ot(t,i){if(x.juz){for(var a,e=[],n=0;n<t.length;n++){var r=t[n];0<=r&&r<x.juz.length&&!l[r]&&e.indexOf(r)<0&&e.push(r)}0===e.length?i():(a=e.length,e.forEach(function(o){var t;h(u+"juz-"+((t=o+1)<10?"0":"")+t+".json",function(t){for(var e=t,n=0;n<e.d.length;n++){var r=e.d[n];x.suras[r[0]].ayas[r[1]]={p:r[2],r:r[3]}}l[o]=!0,0==--a&&i()},function(t){console.error(I+"> failed to load juz "+(o+1),t),l[o]=!0,0==--a&&i()})}))}else i()}function it(){const t=new FontFace(x.font_family,"url("+encodeURI(null==(e=x.font_url)||/^(https?:)?\/\//.test(e)?e:d+String(e).replace(/^\//,""))+")");t.load().then(()=>{document.fonts.add(t)});var e,n={};["page","page_param","aya","sura","words","highlight","error","headless","quotes","inline","notitle"].forEach(function(t){var e;n[t]=(e=t,{attribute:{},set:function(t){this.xtag.data[e]=t},get:function(){return this.getAttribute(e)}})}),xtag.register(I,{lifecycle:{created:function(){this.render(this)},inserted:function(){},removed:function(){},attributeChanged:function(){this.render(this)}},events:{},accessors:n,methods:{render:function(t){var e;this.xtag.data.rendering||ot(function(t){if(!x.juz)return[];var e,n=[];if(null!=t.getAttribute("sura")&&null!=t.getAttribute("aya")){var r,o=H(t.getAttribute("sura"))[0],i=j(t.getAttribute("aya"));if(null!=t.getAttribute("words"))return[r=b(o,i[0]),(r+1)%x.juz.length];for(e=b(o,i[0]);e<=b(o,i[1]);e++)n.push(e)}else{if(null==t.getAttribute("page"))return[];var a=x.pages[parseInt(t.getAttribute("page"),10)-1];if(!a)return[];for(e=b(a[0],a[1]);e<=b(a[2],a[3]);e++)n.push(e)}return n}(e=this),function(){if(!e.xtag.data.rendering){e.xtag.data.rendering=!0;try{e.doRender(t)}finally{e.xtag.data.rendering=!1}}})},doRender:function(e){var n,r,o,t=null,i=null!=this.highlight?F(this.highlight):null,a=(null!=this.highlight&&null==i&&A("Bad highlight parameter: "+this.highlight),null!=this.error?F(this.error):null),s=(null!=this.error&&null==a&&A("Bad error parameter: "+this.error),this.page),c=R(this.headless),u=R(this.notitle),l=null!=this.quotes&&!R(this.quotes),d=this.inline,h=null!=this.sura&&null!=this.aya;if(h)v=f=H(this.sura)[0],o=!1,[m,g]=j(this.aya),null!=this.page&&A("Ignoring page parameter!"),s=x.suras[f].ayas[m].p;else{if(null==this.page)return console.error(I+"> Bad arguments: Not rendering!"),1;if(x.pages)var p=x.pages[s-1],f=p[0],m=p[1],v=p[2],g=p[3];else{for(g=m=v=f=0;x.suras[f].ayas.slice(-1)[0].p<s;)f+=1;for(v=f;v<114&&x.suras[v].ayas[0].p<=s;)v+=1;for(v-=1;x.suras[f].ayas[m].p<s;)m+=1;for(g=x.suras[v].ayas.length-1;x.suras[v].ayas[g].p>s;)g-=1}o=!0,null!=this.inline&&A("Ignoring inline parameter with page!")}if(null!=this.words)if(h){if(null!=(t=F(this.words)))return g!==m&&A("Ignoring aya range end with words parameter!"),500<t[1]-t[0]+1&&(A("words selection capped at 500 words"),t[1]=t[0]+499),void rt(e,f,m,t,c,l,d,u,i=z("highlight",i,t),a=z("error",a,t));A("Bad words parameter: "+this.words)}else A("Ignoring words parameter with page!");var p=h?function(t,e,n){for(var r=x.suras[t].ayas,o=0,i=e;i<=n;i++)U(t,i)&&(o+=$(r[i]));return o}(f,m,g):function(t,e,n,r,o){for(var i=0,a=t;a<=n;a++)for(var s=x.suras[a].ayas,c=a===n?r:s.length-1,u=a===t?e:0;u<=c;u++){var l=s[u];void 0!==l&&l.p===o&&U(a,u)&&(i+=$(l))}return i}(f,m,v,g,parseInt(s,10)),i=z("highlight",i,[1,p]),a=z("error",a,[1,p]),y=null!=i||null!=a,b=(y&&q(e),B(),e.innerHTML="",e.removeAttribute("style"),o=W(d,o=(n=x.suras[f].ayas[m].r[0].l)!=(r=x.suras[v].ayas[g].r.slice(-1)[0].l)?!0:o),e.classList.toggle(I+"-inline",!o&&!l),o&&(Q(e,s),c||e.appendChild(Z(x.suras[f].name))),m),w=f,_=0;for(let t=n;t<=r;t++){const P=t;var E=document.createElement("quran-madina-html-line"),T=(e.appendChild(E),o?E.style.setProperty("display","block",""):(E.style.setProperty("font-family",x.font_family,""),E.style.setProperty("font-size",x.font_size+"px","")),o&&h&&t===n&&V(E,X(f,s,n,m,-1)),f==v?g:x.suras[w].ayas.length-1);for(let t=b;t<=Math.min(b+5,T);t++){var C,L,M,S,O,N=x.suras[w].ayas[t];void 0!==N&&N.p==s&&(N=N.r.filter(t=>t.l==P)).length&&(o&&tt(E,N[0].s),C=document.createElement("div"),L=K(w+1,t-1),DOMTokenList.prototype.add.apply(C.classList,L),y&&U(w,t)?(O=0<(M=D(w,t)?Y(N[0]):0)?nt(_,M,null,i,a):{ligature:!1}).ligature?((S=document.createElement("span")).classList.add(I+"-word",I+"-basmala"),O.cls&&S.classList.add(I+"-word-"+O.cls),S.textContent=k,C.appendChild(S),_+=M):_=et(C,N[0].t,null,_,i,a):C.textContent=D(w,t)&&""!==N[0].t?k:N[0].t,C.style.cssText="display:inline",E.appendChild(C),G(L.slice(-1)[0]),J(e,L.slice(-1)[0],w+1,t-1),b=t,O=w<113?x.suras[w+1].ayas[0]:void 0,T<=b)&&void 0!==O&&O.p==s&&O.r[0].l==P+1&&(w+=1,b=0)}o&&h&&t===r&&V(E,X(v,s,r,g,1))}}}})}function w(){h(u+"manifest.json",function(t){if(t.content_hash){var e="quran-madina-html:hash:"+u,n=null;try{n=sessionStorage.getItem(e)}catch(t){}if(null!==n&&n!==t.content_hash){var r=u;try{for(var o=sessionStorage.length-1;0<=o;o--){var i=sessionStorage.key(o);i&&0===i.indexOf("quran-madina-html:"+r)&&sessionStorage.removeItem(i)}}catch(t){}Object.keys(s).forEach(function(t){0===t.indexOf(r)&&delete s[t]})}try{sessionStorage.setItem(e,t.content_hash)}catch(t){}}x={title:t.title,published:t.published,font_family:t.font_family,font_url:t.font_url,font_size:t.font_size,line_width:t.line_width,suras:t.suras.map(function(t){return{name:t[0],ayas:new Array(t[1])}}),juz:t.juz,pages:t.pages},P(),it()},at,!0)}function at(){h(d+`assets/db/${N}.json`,function(t){x=t,P(),it()},function(t){v!=e?(A(`no DB for font: ${m} size: ${v}, falling back to size: `+e),y=null,g(e),w()):console.error(I+"> no manifest and no monolithic DB",t)})}function st(){function o(t){l||(l=!0,console.error(I+"> missing anchor DB for font-size interpolation",t),A("falling back to size: "+e),g(e),w())}var i=v,a=n[0],s=n[1],c=i-a<=s-i?a:s,u={},l=!1;n.forEach(function(e){var t,n,r;n=o,h(d+`assets/db/${r=f+`-${m}-${e}px`}/manifest.json`,t=function(t){u[e]=t,!l&&a in u&&s in u&&(t=Math.round(u[a].line_width+(u[s].line_width-u[a].line_width)*(i-a)/(s-a)),y={font_size:i,line_width:t,stretch_scale:t*c/(u[c].line_width*i)},A(`font-size ${i}px interpolated from ${a}px/${s}px anchors: line_width ${t}, render data from ${c}px`),g(c),w())},function(){h(d+`assets/db/${r}.json`,t,n)})})}(0<=n.indexOf(v)?w:st)()}(),function(){function t(t){if((this._element=t).className!=this._classCache&&(this._classCache=t.className,this._classCache))for(var e=this._classCache.replace(/^\s+|\s+$/g,"").split(/\s+/),n=0;e.length>n;n++)o.call(this,e[n])}function e(t,e){t.className=e.join(" ")}var n,r,o,i,a,s,c,u;void 0===window.Element||"classList"in document.documentElement||(s=Array.prototype,n=s.indexOf,r=s.slice,o=s.push,i=s.splice,a=s.join,t.prototype={add:function(t){this.contains(t)||(o.call(this,t),e(this._element,r.call(this,0)))},contains:function(t){return-1!==n.call(this,t)},item:function(t){return this[t]||null},remove:function(t){t=n.call(this,t);-1!==t&&(i.call(this,t,1),e(this._element,r.call(this,0)))},toString:function(){return a.call(this," ")},toggle:function(t){-1===n.call(this,t)?this.add(t):this.remove(t)}},window.DOMTokenList=t,s=Element.prototype,c="classList",u=function(){return new t(this)},Object.defineProperty?Object.defineProperty(s,c,{get:u}):s.__defineGetter__(c,u))}(),function(){window.WebComponents=window.WebComponents||{flags:{}};var t,e=document.querySelector('script[src*="webcomponents-lite.js"]'),n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var e,t=t.split("=");t[0]&&(e=t[0].match(/wc-(.+)/))&&(n[e[1]]=t[1]||!0)}),e)for(var r,o=0;r=e.attributes[o];o++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}n.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=n.register),WebComponents.flags=n}(),function(t){"use strict";function g(t){return void 0!==_[t]}function y(){r.call(this),this._isInvalid=!0}function b(t){return""==t&&y.call(this),t.toLowerCase()}function w(t){var e=t.charCodeAt(0);return 32<e&&e<127&&-1==[34,35,60,62,63,96].indexOf(e)?t:encodeURIComponent(t)}function n(t,e,n){function r(t){d.push(t)}var o,i,a=e||"scheme start",s=0,c="",u=!1,l=!1,d=[];t:for(;(t[s-1]!=T||0==s)&&!this._isInvalid;){var h=t[s];switch(a){case"scheme start":if(!h||!C.test(h)){if(e){r("Invalid scheme.");break t}c="",a="no scheme";continue}c+=h.toLowerCase(),a="scheme";break;case"scheme":if(h&&L.test(h))c+=h.toLowerCase();else{if(":"!=h){if(e){if(T==h)break t;r("Code point not allowed in scheme: "+h);break t}c="",s=0,a="no scheme";continue}if(this._scheme=c,c="",e)break t;g(this._scheme)&&(this._isRelative=!0),a="file"==this._scheme?"relative":this._isRelative&&n&&n._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==h?(this._query="?",a="query"):"#"==h?(this._fragment="#",a="fragment"):T!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._schemeData+=w(h));break;case"no scheme":if(n&&g(n._scheme)){a="relative";continue}r("Missing scheme."),y.call(this);break;case"relative or authority":if("/"!=h||"/"!=t[s+1]){r("Expected /, got: "+h),a="relative";continue}a="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=n._scheme),T==h){this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._username=n._username,this._password=n._password;break t}if("/"==h||"\\"==h)"\\"==h&&r("\\ is an invalid code point."),a="relative slash";else if("?"==h)this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query="?",this._username=n._username,this._password=n._password,a="query";else{if("#"!=h){var p=t[s+1],f=t[s+2];("file"!=this._scheme||!C.test(h)||":"!=p&&"|"!=p||T!=f&&"/"!=f&&"\\"!=f&&"?"!=f&&"#"!=f)&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password,this._path=n._path.slice(),this._path.pop()),a="relative path";continue}this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._fragment="#",this._username=n._username,this._password=n._password,a="fragment"}break;case"relative slash":if("/"!=h&&"\\"!=h){"file"!=this._scheme&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password),a="relative path";continue}"\\"==h&&r("\\ is an invalid code point."),a="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=h){r("Expected '/', got: "+h),a="authority ignore slashes";continue}a="authority second slash";break;case"authority second slash":if(a="authority ignore slashes","/"==h)break;r("Expected '/', got: "+h);continue;case"authority ignore slashes":if("/"!=h&&"\\"!=h){a="authority";continue}r("Expected authority, got: "+h);break;case"authority":if("@"==h){u&&(r("@ already seen."),c+="%40");for(var u=!0,m=0;c.length>m;m++){var v=c[m];"\t"!=v&&"\n"!=v&&"\r"!=v?":"!=v||null!==this._password?(v=w(v),null!==this._password?this._password+=v:this._username+=v):this._password="":r("Invalid whitespace in authority.")}c=""}else{if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h){s-=c.length,c="",a="host";continue}c+=h}break;case"file host":if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h){a=2!=c.length||!C.test(c[0])||":"!=c[1]&&"|"!=c[1]?(0==c.length||(this._host=b.call(this,c),c=""),"relative path start"):"relative path";continue}"\t"==h||"\n"==h||"\r"==h?r("Invalid whitespace in file host."):c+=h;break;case"host":case"hostname":if(":"!=h||l){if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h){if(this._host=b.call(this,c),c="",a="relative path start",e)break t;continue}"\t"!=h&&"\n"!=h&&"\r"!=h?("["==h?l=!0:"]"==h&&(l=!1),c+=h):r("Invalid code point in host/hostname: "+h)}else if(this._host=b.call(this,c),c="",a="port","hostname"==e)break t;break;case"port":if(/[0-9]/.test(h))c+=h;else{if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h||e){if(""!=c&&((p=parseInt(c,10))!=_[this._scheme]&&(this._port=p+""),c=""),e)break t;a="relative path start";continue}"\t"==h||"\n"==h||"\r"==h?r("Invalid code point in port: "+h):y.call(this)}break;case"relative path start":if("\\"==h&&r("'\\' not allowed in path."),a="relative path","/"!=h&&"\\"!=h)continue;break;case"relative path":T!=h&&"/"!=h&&"\\"!=h&&(e||"?"!=h&&"#"!=h)?"\t"!=h&&"\n"!=h&&"\r"!=h&&(c+=w(h)):("\\"==h&&r("\\ not allowed in relative path."),".."==(c=(f=E[c.toLowerCase()])?f:c)?(this._path.pop(),"/"!=h&&"\\"!=h&&this._path.push("")):"."==c&&"/"!=h&&"\\"!=h?this._path.push(""):"."!=c&&("file"==this._scheme&&0==this._path.length&&2==c.length&&C.test(c[0])&&"|"==c[1]&&(c=c[0]+":"),this._path.push(c)),c="","?"==h?(this._query="?",a="query"):"#"==h&&(this._fragment="#",a="fragment"));break;case"query":e||"#"!=h?T!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._query+=(i=void 0,32<(i=(o=h).charCodeAt(0))&&i<127&&-1==[34,35,60,62,96].indexOf(i)?o:encodeURIComponent(o))):(this._fragment="#",a="fragment");break;case"fragment":T!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._fragment+=h)}s++}}function r(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function o(t,e){void 0===e||e instanceof o||(e=new o(e+"")),this._url=t,r.call(this);t=t.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");n.call(this,t,null,e)}var _,E,T,C,L,e,i=!1;if(!t.forceJURL)try{var a=new URL("b","http://a");a.pathname="c%20d",i="http://a/c%20d"===a.href}catch(t){}i||((_=Object.create(null)).ftp=21,_.file=0,_.gopher=70,_.http=80,_.https=443,_.ws=80,_.wss=443,(E=Object.create(null))["%2e"]=".",E[".%2e"]="..",E["%2e."]="..",T=void(E["%2e%2e"]=".."),C=/[a-zA-Z]/,L=/[a-zA-Z0-9\+\-\.]/,o.prototype={toString:function(){return this.href},get href(){var t;return this._isInvalid?this._url:((t="")==this._username&&null==this._password||(t=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+t+this.host:"")+this.pathname+this._query+this._fragment)},set href(t){r.call(this),n.call(this,t)},get protocol(){return this._scheme+":"},set protocol(t){this._isInvalid||n.call(this,t+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(t){!this._isInvalid&&this._isRelative&&n.call(this,t,"host")},get hostname(){return this._host},set hostname(t){!this._isInvalid&&this._isRelative&&n.call(this,t,"hostname")},get port(){return this._port},set port(t){!this._isInvalid&&this._isRelative&&n.call(this,t,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(t){!this._isInvalid&&this._isRelative&&(this._path=[],n.call(this,t,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(t){!this._isInvalid&&this._isRelative&&((this._query="?")==t[0]&&(t=t.slice(1)),n.call(this,t,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(t){this._isInvalid||((this._fragment="#")==t[0]&&(t=t.slice(1)),n.call(this,t,"fragment"))},get origin(){var t;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return(t=this.host)?this._scheme+"://"+t:""}},(e=t.URL)&&(o.createObjectURL=function(){return e.createObjectURL.apply(e,arguments)},o.revokeObjectURL=function(t){e.revokeObjectURL(t)}),t.URL=o)}(self),"undefined"==typeof WeakMap&&function(){function t(){this.name="__st"+(1e9*Math.random()>>>0)+e+++"__"}var r=Object.defineProperty,e=Date.now()%1e9;t.prototype={set:function(t,e){var n=t[this.name];return n&&n[0]===t?n[1]=e:r(t,this.name,{value:[t,e],writable:!0}),this},get:function(t){var e;return(e=t[this.name])&&e[0]===t?e[1]:void 0},delete:function(t){var e=t[this.name];return!(!e||e[0]!==t||(e[0]=e[1]=void 0))},has:function(t){var e=t[this.name];return!!e&&e[0]===t}},window.WeakMap=t}(),function(t){function o(){p=!1;var t=f,r=(f=[],t.sort(function(t,e){return t.uid_-e.uid_}),!1);t.forEach(function(t){var e,n=t.takeRecords();(e=t).nodes_.forEach(function(t){t=s.get(t);t&&t.forEach(function(t){t.observer===e&&t.removeTransientObservers()})}),n.length&&(t.callback_(n,t),r=!0)}),r&&o()}function u(t,e){for(var n=t;n;n=n.parentNode){var r=s.get(n);if(r)for(var o=0;r.length>o;o++){var i=r[o],a=i.options;(n===t||a.subtree)&&(a=e(a))&&i.enqueue(a)}}}function e(t){this.callback_=t,this.nodes_=[],this.records_=[],this.uid_=++m}function r(t,e){this.type=t,this.target=e,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function l(t,e){return v=new r(t,e)}function d(t){return g||((n=new r((e=v).type,e.target)).addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,(g=n).oldValue=t,g);var e,n}function i(t,e){return t===e?t:g&&((e=t)===g||e===v)?g:null}function a(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}var s,n,c,h,p,f,m,v,g;t.JsMutationObserver||(s=new WeakMap,h=/Trident|Edge/.test(navigator.userAgent)?setTimeout:window.setImmediate||(n=[],c=Math.random()+"",window.addEventListener("message",function(t){t.data===c&&(t=n,n=[],t.forEach(function(t){t()}))}),function(t){n.push(t),window.postMessage(c,"*")}),p=!1,f=[],m=0,e.prototype={observe:function(t,e){if(n=t,t=window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(n)||n,!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n,r=s.get(t);r||s.set(t,r=[]);for(var o,i=0;r.length>i;i++)if(r[i].observer===this){(o=r[i]).removeListeners(),o.options=e;break}o||(o=new a(this,t,e),r.push(o),this.nodes_.push(t)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(t){for(var e=s.get(t),n=0;e.length>n;n++){var r=e[n];if(r.observer===this){r.removeListeners(),e.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var t=this.records_;return this.records_=[],t}},a.prototype={enqueue:function(t){var e=this.observer.records_,n=e.length;if(0<e.length){var r=i(e[n-1],t);if(r)return void(e[n-1]=r)}else r=this.observer,f.push(r),p||(p=!0,h(o));e[n]=t},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(t){var e=this.options;e.attributes&&t.addEventListener("DOMAttrModified",this,!0),e.characterData&&t.addEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.addEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(t){var e=this.options;e.attributes&&t.removeEventListener("DOMAttrModified",this,!0),e.characterData&&t.removeEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.removeEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(t){var e;t!==this.target&&(this.addListeners_(t),this.transientObservedNodes.push(t),(e=s.get(t))||s.set(t,e=[]),e.push(this))},removeTransientObservers:function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=s.get(t),n=0;e.length>n;n++)if(e[n]===this){e.splice(n,1);break}},this)},handleEvent:function(t){switch(t.stopImmediatePropagation(),t.type){case"DOMAttrModified":var e=t.attrName,n=t.relatedNode.namespaceURI,r=t.target,o=((i=new l("attributes",r)).attributeName=e,i.attributeNamespace=n,t.attrChange===MutationEvent.ADDITION?null:t.prevValue);u(r,function(t){return!t.attributes||t.attributeFilter&&t.attributeFilter.length&&-1===t.attributeFilter.indexOf(e)&&-1===t.attributeFilter.indexOf(n)?void 0:t.attributeOldValue?d(o):i});break;case"DOMCharacterDataModified":var i=l("characterData",r=t.target),o=t.prevValue;u(r,function(t){return t.characterData?t.characterDataOldValue?d(o):i:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(t.target);case"DOMNodeInserted":var a,r=t.target,s="DOMNodeInserted"===t.type?(a=[r],[]):(a=[],[r]),c=r.previousSibling,r=r.nextSibling;(i=l("childList",t.target.parentNode)).addedNodes=a,i.removedNodes=s,i.previousSibling=c,i.nextSibling=r,u(t.relatedNode,function(t){return t.childList?i:void 0})}v=g=void 0}},t.JsMutationObserver=e,t.MutationObserver)||((t.MutationObserver=e)._isPolyfilled=!0)}(self),"undefined"==typeof HTMLTemplateElement&&function(){function n(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}}var r=document.implementation.createHTMLDocument("template"),o=!0,e=((HTMLTemplateElement=function(){}).prototype=Object.create(HTMLElement.prototype),HTMLTemplateElement.decorate=function(t){if(!t.content){t.content=r.createDocumentFragment();for(var e;e=t.firstChild;)t.content.appendChild(e);if(o)try{Object.defineProperty(t,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(i,n);return t},set:function(t){for(r.body.innerHTML=t,HTMLTemplateElement.bootstrap(r);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;r.body.firstChild;)this.content.appendChild(r.body.firstChild)},configurable:!0})}catch(t){o=!1}HTMLTemplateElement.bootstrap(t.content)}},HTMLTemplateElement.bootstrap=function(t){for(var e,n=t.querySelectorAll("template"),r=0,o=n.length;r<o&&(e=n[r]);r++)HTMLTemplateElement.decorate(e)},document.addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)}),document.createElement),i=(document.createElement=function(){"use strict";var t=e.apply(document,arguments);return"template"==t.localName&&HTMLTemplateElement.decorate(t),t},/[&\u00A0<>]/g)}(),function(){"use strict";var t,e;window.performance||(t=Date.now(),window.performance={now:function(){return Date.now()-t}}),window.requestAnimationFrame||(window.requestAnimationFrame=(e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame)?function(t){return e(function(){t(performance.now())})}:function(t){return window.setTimeout(t,1e3/60)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}),(r=document.createEvent("Event")).initEvent("foo",!0,!0),r.preventDefault();r.defaultPrevented||(n=Event.prototype.preventDefault,Event.prototype.preventDefault=function(){this.cancelable&&(n.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))});var n,r=/Trident/.test(navigator.userAgent);(!window.CustomEvent||r&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,Boolean(e.bubbles),Boolean(e.cancelable),e.detail),n},window.CustomEvent.prototype=window.Event.prototype),(!window.Event||r&&"function"!=typeof window.Event)&&(r=window.Event,window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,Boolean(e.bubbles),Boolean(e.cancelable)),n},window.Event.prototype=r.prototype)}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(t){function e(t,e){(function t(e,n){{var r;o(n)?e&&e():(r=function(){"complete"!==n.readyState&&n.readyState!==s||(n.removeEventListener(c,r),t(e,n))},n.addEventListener(c,r))}})(function(){!function(t,e){function n(){a==s&&t&&t({allImports:i,loadedImports:c,errorImports:u})}function r(t){h(t),c.push(this),a++,n()}function o(){u.push(this),a++,n()}var i=e.querySelectorAll("link[rel=import]"),a=0,s=i.length,c=[],u=[];if(s)for(var l,d=0;d<s&&(l=i[d]);d++)!function(t){return p?t.__loaded||t.import&&"loading"!==t.import.readyState:t.__importParsed}(l)?(l.addEventListener("load",r),l.addEventListener("error",o)):(c.push(this),a++,n());else n()}(t,e)},e=e||i)}function o(t){return"complete"===t.readyState||t.readyState===s}function h(t){t.target.__loaded=!0}function u(t){t.import?h({target:t}):(t.addEventListener("load",h),t.addEventListener("error",h))}function n(t){return r?window.ShadowDOMPolyfill.wrapIfNeeded(t):t}var p=Boolean("import"in document.createElement("link")),r=Boolean(window.ShadowDOMPolyfill),i=n(document),a={get:function(){var t=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return n(t)},configurable:!0},a=(Object.defineProperty(document,"_currentScript",a),Object.defineProperty(i,"_currentScript",a),/Trident/.test(navigator.userAgent)),s=a?"complete":"interactive",c="readystatechange";if(p&&(new MutationObserver(function(t){for(var e,n=0,r=t.length;n<r&&(e=t[n]);n++)if(e.addedNodes){o=void 0;i=void 0;s=void 0;c=void 0;a=void 0;var o=e.addedNodes;for(var i,a,s=0,c=o.length;s<c&&(i=o[s]);s++)"link"===(a=i).localName&&"import"===a.rel&&u(i)}}).observe(document.head,{childList:!0}),"loading"===document.readyState))for(var l,d=document.querySelectorAll("link[rel=import]"),f=0,m=d.length;f<m&&(l=d[f]);f++)u(l);e(function(t){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var e=i.createEvent("CustomEvent");e.initCustomEvent("HTMLImportsLoaded",!0,!0,t),i.dispatchEvent(e)}),t.IMPORT_LINK_TYPE="import",t.useNative=p,t.rootDocument=i,t.whenReady=e,t.isIE=a}(window.HTMLImports),function(e){var n=[];e.addModule=function(t){n.push(t)},e.initializeModules=function(){n.forEach(function(t){t(e)})}}(window.HTMLImports),window.HTMLImports.addModule(function(t){var r=/(url\()([^)]*)(\))/g,o=/(@import[\s]+(?!url\())([^;]*)(;)/g;t.path={resolveUrlsInStyle:function(t,e){var n=t.ownerDocument.createElement("a");return t.textContent=this.resolveUrlsInCssText(t.textContent,e,n),t},resolveUrlsInCssText:function(t,e,n){t=this.replaceUrls(t,n,e,r);return this.replaceUrls(t,n,e,o)},replaceUrls:function(t,o,i,e){return t.replace(e,function(t,e,n,r){n=n.replace(/["']/g,"");return i&&(n=new URL(n,i).href),o.href=n,e+"'"+(n=o.href)+"'"+r})}}}),window.HTMLImports.addModule(function(e){var a={async:!0,ok:function(t){return 200<=t.status&&t.status<300||304===t.status||0===t.status},load:function(t,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(t+="?"+Math.random()),i.open("GET",t,a.async),i.addEventListener("readystatechange",function(t){if(4===i.readyState){var e=null;try{var n=i.getResponseHeader("Location");n&&(e="/"===n.substr(0,1)?location.origin+n:n)}catch(t){console.error(t.message)}r.call(o,!a.ok(i)&&i,i.response||i.responseText,e)}}),i.send(),i},loadDocument:function(t,e,n){this.load(t,e,n).responseType="document"}};e.xhr=a}),window.HTMLImports.addModule(function(t){function e(t,e){this.cache={},this.onload=t,this.oncomplete=e,this.inflight=0,this.pending={}}var i=t.xhr,a=t.flags;e.prototype={addNodes:function(t){this.inflight+=t.length;for(var e,n=0,r=t.length;n<r&&(e=t[n]);n++)this.require(e);this.checkDone()},addNode:function(t){this.inflight++,this.require(t),this.checkDone()},require:function(t){var e=t.src||t.href;t.__nodeUrl=e,this.dedupe(e,t)||this.fetch(e,t)},dedupe:function(t,e){return this.pending[t]?(this.pending[t].push(e),!0):this.cache[t]?(this.onload(t,e,this.cache[t]),this.tail(),!0):!(this.pending[t]=[e])},fetch:function(r,o){var t,e,n;a.load&&console.log("fetch",r,o),r?r.match(/^data:/)?(t=(n=r.split(","))[0],e=n[1],e=(-1<t.indexOf(";base64")?atob:decodeURIComponent)(e),setTimeout(function(){this.receive(r,o,null,e)}.bind(this),0)):(n=function(t,e,n){this.receive(r,o,t,e,n)}.bind(this),i.load(r,n)):setTimeout(function(){this.receive(r,o,{error:"href must be specified"},null)}.bind(this),0)},receive:function(t,e,n,r,o){this.cache[t]=r;for(var i,a=this.pending[t],s=0,c=a.length;s<c&&(i=a[s]);s++)this.onload(t,i,r,n,o),this.tail();this.pending[t]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},t.Loader=e}),window.HTMLImports.addModule(function(t){function e(t){this.addCallback=t,this.mo=new MutationObserver(this.handler.bind(this))}e.prototype={handler:function(t){for(var e,n=0,r=t.length;n<r&&(e=t[n]);n++)"childList"===e.type&&e.addedNodes.length&&this.addedNodes(e.addedNodes)},addedNodes:function(t){this.addCallback&&this.addCallback(t);for(var e,n=0,r=t.length;n<r&&(e=t[n]);n++)e.children&&e.children.length&&this.addedNodes(e.children)},observe:function(t){this.mo.observe(t,{childList:!0,subtree:!0})}},t.Observer=e}),window.HTMLImports.addModule(function(n){function a(t){return"link"===t.localName&&t.rel===s}function r(t){t=t.textContent+function(t){var e=t.ownerDocument,t=(e.__importedScripts=e.__importedScripts||0,t.ownerDocument.baseURI),n=e.__importedScripts?"-"+e.__importedScripts:"";return e.__importedScripts++,"\n//# sourceURL="+t+n+".js\n"}(t);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}var o=n.path,e=n.rootDocument,i=n.flags,u=n.isIE,s=n.IMPORT_LINK_TYPE,t="link[rel="+s+"]",c={documentSelectors:t,importsSelectors:[t,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var t=this.nextToParse();t&&this.parse(t)},parse:function(t){var e;this.isParsed(t)?i.parse&&console.log("[%s] is already parsed",t.localName):(e=this[this.map[t.localName]])&&(this.markParsing(t),e.call(this,t))},parseDynamic:function(t,e){this.dynamicElements.push(t),e||this.parseNext()},markParsing:function(t){i.parse&&console.log("parsing",t),this.parsingElement=t},markParsingComplete:function(t){t.__importParsed=!0,this.markDynamicParsingComplete(t),t.__importElement&&(t.__importElement.__importParsed=!0,this.markDynamicParsingComplete(t.__importElement)),this.parsingElement=null,i.parse&&console.log("completed",t)},markDynamicParsingComplete:function(t){t=this.dynamicElements.indexOf(t);0<=t&&this.dynamicElements.splice(t,1)},parseImport:function(t){if(t.import=t.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(t),t.import&&(t.import.__importParsed=!0),this.markParsingComplete(t),t.__resource&&!t.__error?t.dispatchEvent(new CustomEvent("load",{bubbles:!1})):t.dispatchEvent(new CustomEvent("error",{bubbles:!1})),t.__pending)for(var e;t.__pending.length;)(e=t.__pending.shift())&&e({target:t});this.parseNext()},parseLink:function(t){a(t)?this.parseImport(t):(t.href=t.href,this.parseGeneric(t))},parseStyle:function(t){var e,n,r=t;(n=(e=t).ownerDocument.createElement("style")).textContent=e.textContent,o.resolveUrlsInStyle(n),t=n,(r.__appliedElement=t).__importElement=r,this.parseGeneric(t)},parseGeneric:function(t){this.trackElement(t),this.addElementToDocument(t)},rootImportForElement:function(t){for(var e=t;e.ownerDocument.__importLink;)e=e.ownerDocument.__importLink;return e},addElementToDocument:function(t){var e=this.rootImportForElement(t.__importElement||t);e.parentNode.insertBefore(t,e)},trackElement:function(e,n){function r(t){e.removeEventListener("load",r),e.removeEventListener("error",r),n&&n(t),o.markParsingComplete(e),o.parseNext()}var o=this;if(e.addEventListener("load",r),e.addEventListener("error",r),u&&"style"===e.localName){var t=!1;if(-1==e.textContent.indexOf("@import"))t=!0;else if(e.sheet)for(var i,t=!0,a=e.sheet.cssRules,s=a?a.length:0,c=0;c<s&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(t=t&&Boolean(i.styleSheet));t&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var e=document.createElement("script");e.__importElement=t,e.src=t.src||r(t),n.currentScript=t,this.trackElement(e,function(){e.parentNode&&e.parentNode.removeChild(e),n.currentScript=null}),this.addElementToDocument(e)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(e)||this.nextToParseDynamic())},nextToParseInDoc:function(t,e){if(t&&this._mayParse.indexOf(t)<0){this._mayParse.push(t);for(var n,r=t.querySelectorAll(this.parseSelectorsForNode(t)),o=0,i=r.length;o<i&&(n=r[o]);o++)if(!this.isParsed(n))return this.hasResource(n)?a(n)?this.nextToParseInDoc(n.__doc,n):n:void 0}return e},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(t){return(t.ownerDocument||t)===e?this.documentSelectors:this.importsSelectors},isParsed:function(t){return t.__importParsed},needsDynamicParsing:function(t){return 0<=this.dynamicElements.indexOf(t)},hasResource:function(t){return!a(t)||void 0!==t.__doc}};n.parser=c,n.IMPORT_SELECTOR=t}),window.HTMLImports.addModule(function(t){function s(t,e){var n=document.implementation.createHTMLDocument(u),r=(n._URL=e,n.createElement("base")),e=(r.setAttribute("href",e),n.baseURI||Object.getOwnPropertyDescriptor(n,"baseURI")||Object.defineProperty(n,"baseURI",{value:e}),n.createElement("meta"));return e.setAttribute("charset","utf-8"),n.head.appendChild(e),n.head.appendChild(r),n.body.innerHTML=t,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var c=t.flags,u=t.IMPORT_LINK_TYPE,e=t.IMPORT_SELECTOR,n=t.rootDocument,r=t.Loader,o=t.Observer,l=t.parser,e={documents:{},documentPreloadSelectors:e,importsPreloadSelectors:[e].join(","),loadNode:function(t){i.addNode(t)},loadSubtree:function(t){t=this.marshalNodes(t);i.addNodes(t)},marshalNodes:function(t){return t.querySelectorAll(this.loadSelectorsForNode(t))},loadSelectorsForNode:function(t){return(t.ownerDocument||t)===n?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(t,e,n,r,o){var i,a;c.load&&console.log("loaded",t,e),e.__resource=n,e.__error=r,a=u,"link"===(i=i=e).localName&&i.getAttribute("rel")===a&&(void 0===(i=this.documents[t])&&((i=r?null:s(n,o||t))&&(i.__importLink=e,this.bootDocument(i)),this.documents[t]=i),e.__doc=i),l.parseNext()},bootDocument:function(t){this.loadSubtree(t),this.observer.observe(t),l.parseNext()},loadedAll:function(){l.parseNext()}},i=new r(e.loaded.bind(e),e.loadedAll.bind(e));e.observer=new o,document.baseURI||(r={get:function(){var t=document.querySelector("base");return(t||window.location).href},configurable:!0},Object.defineProperty(document,"baseURI",r),Object.defineProperty(n,"baseURI",r)),t.importer=e,t.importLoader=i}),window.HTMLImports.addModule(function(t){var s=t.parser,c=t.importer,t={added:function(t){for(var e,n,r,o,i=0,a=t.length;i<a&&(o=t[i]);i++)e||(e=o.ownerDocument,n=s.isParsed(e)),(r=this.shouldLoadNode(o))&&c.loadNode(o),this.shouldParseNode(o)&&n&&s.parseDynamic(o,r)},shouldLoadNode:function(t){return 1===t.nodeType&&e.call(t,c.loadSelectorsForNode(t))},shouldParseNode:function(t){return 1===t.nodeType&&e.call(t,s.parseSelectorsForNode(t))}},e=(c.observer.addCallback=t.added.bind(t),HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector)}),function(t){function e(){window.HTMLImports.importer.bootDocument(n)}var n,r=t.initializeModules;t.isIE,t.useNative||(r(),n=t.rootDocument,"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?e():document.addEventListener("DOMContentLoaded",e))}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[];e.addModule=function(t){n.push(t)},e.initializeModules=function(){n.forEach(function(t){t(e)})},e.hasNative=Boolean(document.registerElement),e.isIE=/Trident/.test(navigator.userAgent),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(t){function r(t,e){(function t(e,n,r){var o=e.firstElementChild;if(!o)for(o=e.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)!0!==n(o,r)&&t(o,n,r),o=o.nextElementSibling;return null})(t,function(t){return!!e(t)||void n(t,e)}),n(t,e)}function n(t,e){for(var n=t.shadowRoot;n;)r(n,e),n=n.olderShadowRoot}var c=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";t.forDocumentTree=function(t,e){!function t(e,n,r){if(e=window.wrap(e),!(0<=r.indexOf(e))){r.push(e);for(var o,i=e.querySelectorAll("link[rel="+c+"]"),a=0,s=i.length;a<s&&(o=i[a]);a++)o.import&&t(o.import,n,r);n(e)}}(t,e,[])},t.forSubtree=r}),window.CustomElements.addModule(function(n){function a(t,e){return r(t,e)||o(t,e)}function r(t,e){return!!n.upgrade(t,e)||void(e&&s(t))}function o(t,e){m(t,function(t){return!!r(t,e)||void 0})}function e(t){b.push(t),y||(y=!0,setTimeout(i))}function i(){y=!1;for(var t,e=b,n=0,r=e.length;n<r&&(t=e[n]);n++)t();b=[]}function s(t){g?e(function(){c(t)}):c(t)}function c(t){t.__upgraded__&&!t.__attached&&(t.__attached=!0,t.attachedCallback)&&t.attachedCallback()}function u(t){g?e(function(){l(t)}):l(t)}function l(t){t.__upgraded__&&t.__attached&&(t.__attached=!1,t.detachedCallback)&&t.detachedCallback()}function d(t,e){if(f.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=(o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"").split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,o||"")}var i=function(t){for(var e=t,n=window.wrap(document);e;){if(e==n)return!0;e=e.parentNode||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host}}(t);e.forEach(function(t){"childList"===t.type&&(w(t.addedNodes,function(t){t.localName&&a(t,i)}),w(t.removedNodes,function(t){t.localName&&(u(t=t),m(t,function(t){u(t)}))}))}),f.dom&&console.groupEnd()}function h(t){var e;t.__observer||((e=new MutationObserver(d.bind(this,t))).observe(t,{childList:!0,subtree:!0}),t.__observer=e)}function p(t){t=window.wrap(t),f.dom&&console.group("upgradeDocument: ",t.baseURI.split("/").pop()),a(t,t===window.wrap(document)),h(t),f.dom&&console.groupEnd()}var f=n.flags,m=n.forSubtree,v=n.forDocumentTree,g=window.MutationObserver._isPolyfilled&&f["throttle-attached"],y=(n.hasPolyfillMutations=g,n.hasThrottledAttached=g,!1),b=[],w=Array.prototype.forEach.call.bind(Array.prototype.forEach),_=Element.prototype.createShadowRoot;_&&(Element.prototype.createShadowRoot=function(){var t=_.call(this);return window.CustomElements.watchShadow(this),t}),n.watchShadow=function(t){if(t.shadowRoot&&!t.shadowRoot.__watched){f.dom&&console.log("watching shadow-root for: ",t.localName);for(var e=t.shadowRoot;e;)h(e),e=e.olderShadowRoot}},n.upgradeDocumentTree=function(t){v(t,p)},n.upgradeDocument=p,n.upgradeSubtree=o,n.upgradeAll=a,n.attached=s,n.takeRecords=function(t){for(t=(t=window.wrap(t))||window.wrap(document);t.parentNode;)t=t.parentNode;var e=t.__observer;e&&(d(t,e.takeRecords()),i())}}),window.CustomElements.addModule(function(o){function i(t,e,n){return a.upgrade&&console.group("upgrade:",t.localName),e.is&&t.setAttribute("is",e.is),r(t,e),t.__upgraded__=!0,(e=t).createdCallback&&e.createdCallback(),n&&o.attached(t),o.upgradeSubtree(t,n),a.upgrade&&console.groupEnd(),t}function r(t,e){if(!Object.__proto__)for(var n=t,r=e.prototype,o=e.native,i={},a=r;a!==o&&a!==HTMLElement.prototype;){for(var s,c=Object.getOwnPropertyNames(a),u=0;s=c[u];u++)i[s]||(Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(a,s)),i[s]=1);a=Object.getPrototypeOf(a)}t.__proto__=e.prototype}var a=o.flags;o.upgrade=function(t,e){if("template"===t.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t),!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var n=t.getAttribute("is"),r=o.getRegisteredDefinition(t.localName)||o.getRegisteredDefinition(n);if(r&&(n&&r.tag==t.localName||!n&&!r.extends))return i(t,r,e)}},o.upgradeWithDefinition=i,o.implementPrototype=r}),window.CustomElements.addModule(function(f){function m(t,e,n){t=t.toLowerCase();var r=this.getAttribute(t),o=(n.apply(this,arguments),this.getAttribute(t));this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(t,r,o)}function v(t){return t?w[t.toLowerCase()]:void 0}function o(t,e){t=t&&t.toLowerCase();var n,r=v((e=e&&e.toLowerCase())||t);if(r){if(t==r.tag&&e==r.is)return new r.ctor;if(!e&&!r.is)return new r.ctor}return e?(n=o(t)).setAttribute("is",e):(n=_(t),0<=t.indexOf("-")&&i(n,HTMLElement)),n}function t(t,e){var n=t[e];t[e]=function(){var t=n.apply(this,arguments);return r(t),t}}var n,e=f.isIE,g=f.upgradeDocumentTree,r=f.upgradeAll,y=f.upgradeWithDefinition,i=f.implementPrototype,a=f.useNative,b=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],w={},_=document.createElement.bind(document),s=document.createElementNS.bind(document),a=Object.__proto__||a?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;for(var n=t;n;){if(n===e.prototype)return!0;n=n.__proto__}return!1};t(Node.prototype,"cloneNode"),t(document,"importNode"),e&&(n=document.importNode,document.importNode=function(){var t,e=n.apply(document,arguments);return e.nodeType==e.DOCUMENT_FRAGMENT_NODE?((t=document.createDocumentFragment()).appendChild(e),t):e}),document.registerElement=function(t,e){var n,r,o,e=e||{};if(!t)throw Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+t+"'.");if(function(t){for(var e=0;b.length>e;e++)if(t===b[e])return 1}(t))throw Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+t+"'. The type name is invalid.");if(v(t))throw Error("DuplicateDefinitionError: a type with name '"+t+"' is already registered");e.prototype||(e.prototype=Object.create(HTMLElement.prototype)),e.__name=t.toLowerCase(),e.lifecycle=e.lifecycle||{},e.ancestry=function t(e){e=v(e);return e?t(e.extends).concat([e]):[]}(e.extends);for(var i,a=e,s=a.extends,c=0;i=a.ancestry[c];c++)s=i.is&&i.tag;a.tag=s||a.__name,s&&(a.is=a.__name);var t=e;if(!Object.__proto__){var u=HTMLElement.prototype;t.is&&(p=document.createElement(t.tag),u=Object.getPrototypeOf(p));for(var l,d=t.prototype,h=!1;d;)d==u&&(h=!0),(l=Object.getPrototypeOf(d))&&(d.__proto__=l),d=l;h||console.warn(t.tag+" prototype not found in prototype chain for "+t.is),t.native=u}var p=e.prototype;return p.setAttribute._polyfilled||(n=p.setAttribute,p.setAttribute=function(t,e){m.call(this,t,e,n)},r=p.removeAttribute,p.removeAttribute=function(t){m.call(this,t,null,r)},p.setAttribute._polyfilled=!0),t=e.__name,(w[t]=e).ctor=(o=e,function(){return y(_((t=o).tag),t);var t}),e.ctor.prototype=e.prototype,e.prototype.constructor=e.ctor,f.ready&&g(document),e.ctor},document.createElement=o,document.createElementNS=function(t,e,n){return"http://www.w3.org/1999/xhtml"===t?o(e,n):s(t,e)},f.registry=w,f.instanceof=a,f.reservedTagList=b,f.getRegisteredDefinition=v,document.register=document.registerElement}),function(t){function e(){o(window.wrap(document)),window.CustomElements.ready=!0,(window.requestAnimationFrame||function(t){setTimeout(t,16)})(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=t.useNative,r=t.initializeModules,o=(t.isIE,n?(t.watchShadow=n=function(){},t.upgrade=n,t.upgradeAll=n,t.upgradeDocumentTree=n,t.upgradeSubtree=n,t.takeRecords=n,t.instanceof=function(t,e){return t instanceof e}):r(),t.upgradeDocumentTree),i=t.upgradeDocument;window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(t){return t}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(t){t.import&&i(wrap(t.import))}),"complete"!==document.readyState&&!t.flags.eager&&("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready)?(n=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded",window.addEventListener(n,e)):e()}(window.CustomElements),function(){var t=document.createElement("style"),e=(t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n",document.querySelector("head"));e.insertBefore(t,e.firstChild)}(window.WebComponents),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.PointerEventsPolyfill=e()}(this,function(){"use strict";function t(){this.array=[],this.size=0}function e(t,e,n,r){this.addCallback=t.bind(r),this.removeCallback=e.bind(r),this.changedCallback=n.bind(r),_&&(this.observer=new _(this.mutationWatcher.bind(this)))}function n(t){return"body /shadow-deep/ "+r(t)}function r(t){return'[touch-action="'+t+'"]'}function o(t){return"{ -ms-touch-action: "+t+"; touch-action: "+t+"; touch-action-delay: none; }"}function i(t){if(!m.pointermap.has(t))throw Error("InvalidPointerId")}var a=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","pageX","pageY"],s=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0],c=function(t,e){e=e||Object.create(null);var n=document.createEvent("Event");n.initEvent(t,e.bubbles||!1,e.cancelable||!1);for(var r,o=2;o<a.length;o++)n[r=a[o]]=e[r]||s[o];return n.buttons=e.buttons||0,t=e.pressure||(n.buttons?.5:0),n.x=n.clientX,n.y=n.clientY,n.pointerId=e.pointerId||0,n.width=e.width||0,n.height=e.height||0,n.pressure=t,n.tiltX=e.tiltX||0,n.tiltY=e.tiltY||0,n.pointerType=e.pointerType||"",n.hwTimestamp=e.hwTimestamp||0,n.isPrimary=e.isPrimary||!1,n},u=window.Map&&window.Map.prototype.forEach?Map:t,l=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","buttons","pointerId","width","height","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","type","target","currentTarget","which","pageX","pageY","timeStamp"],d=[!(t.prototype={set:function(t,e){return void 0===e?this.delete(t):(this.has(t)||this.size++,void(this.array[t]=e))},has:function(t){return void 0!==this.array[t]},delete:function(t){this.has(t)&&(delete this.array[t],this.size--)},get:function(t){return this.array[t]},clear:function(){this.array.length=0,this.size=0},forEach:function(n,r){return this.array.forEach(function(t,e){n.call(r,t,e,this)},this)}}),!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0,0,0,0,0,0,"",0,!1,"",null,null,0,0,0,0],h={pointerover:1,pointerout:1,pointerenter:1,pointerleave:1},p="undefined"!=typeof SVGElementInstance,f={pointermap:new u,eventMap:Object.create(null),captureInfo:Object.create(null),eventSources:Object.create(null),eventSourceList:[],registerSource:function(t,e){var n=e,e=n.events;e&&(e.forEach(function(t){n[t]&&(this.eventMap[t]=n[t].bind(n))},this),this.eventSources[t]=n,this.eventSourceList.push(n))},register:function(t){for(var e,n=this.eventSourceList.length,r=0;r<n&&(e=this.eventSourceList[r]);r++)e.register.call(e,t)},unregister:function(t){for(var e,n=this.eventSourceList.length,r=0;r<n&&(e=this.eventSourceList[r]);r++)e.unregister.call(e,t)},contains:function(t,e){try{return t.contains(e)}catch(t){return!1}},down:function(t){t.bubbles=!0,this.fireEvent("pointerdown",t)},move:function(t){t.bubbles=!0,this.fireEvent("pointermove",t)},up:function(t){t.bubbles=!0,this.fireEvent("pointerup",t)},enter:function(t){t.bubbles=!1,this.fireEvent("pointerenter",t)},leave:function(t){t.bubbles=!1,this.fireEvent("pointerleave",t)},over:function(t){t.bubbles=!0,this.fireEvent("pointerover",t)},out:function(t){t.bubbles=!0,this.fireEvent("pointerout",t)},cancel:function(t){t.bubbles=!0,this.fireEvent("pointercancel",t)},leaveOut:function(t){this.out(t),this.contains(t.target,t.relatedTarget)||this.leave(t)},enterOver:function(t){this.over(t),this.contains(t.target,t.relatedTarget)||this.enter(t)},eventHandler:function(t){var e;t._handledByPE||(e=t.type,(e=this.eventMap&&this.eventMap[e])&&e(t),t._handledByPE=!0)},listen:function(e,t){t.forEach(function(t){this.addEvent(e,t)},this)},unlisten:function(e,t){t.forEach(function(t){this.removeEvent(e,t)},this)},addEvent:function(t,e){t.addEventListener(e,this.boundHandler)},removeEvent:function(t,e){t.removeEventListener(e,this.boundHandler)},makeEvent:function(t,e){this.captureInfo[e.pointerId]&&(e.relatedTarget=null);t=new c(t,e);return e.preventDefault&&(t.preventDefault=e.preventDefault),t._target=t._target||e.target,t},fireEvent:function(t,e){t=this.makeEvent(t,e);return this.dispatchEvent(t)},cloneEvent:function(t){for(var e,n=Object.create(null),r=0;r<l.length;r++)n[e=l[r]]=t[e]||d[r],!p||"target"!==e&&"relatedTarget"!==e||n[e]instanceof SVGElementInstance&&(n[e]=n[e].correspondingUseElement);return t.preventDefault&&(n.preventDefault=function(){t.preventDefault()}),n},getTarget:function(t){var e=this.captureInfo[t.pointerId];return e?t._target!==e&&t.type in h?void 0:e:t._target},setCapture:function(t,e){this.captureInfo[t]&&this.releaseCapture(t),this.captureInfo[t]=e;var n=document.createEvent("Event");n.initEvent("gotpointercapture",!0,!1),n.pointerId=t,this.implicitRelease=this.releaseCapture.bind(this,t),document.addEventListener("pointerup",this.implicitRelease),document.addEventListener("pointercancel",this.implicitRelease),n._target=e,this.asyncDispatchEvent(n)},releaseCapture:function(t){var e,n=this.captureInfo[t];n&&((e=document.createEvent("Event")).initEvent("lostpointercapture",!0,!1),e.pointerId=t,this.captureInfo[t]=void 0,document.removeEventListener("pointerup",this.implicitRelease),document.removeEventListener("pointercancel",this.implicitRelease),e._target=n,this.asyncDispatchEvent(e))},dispatchEvent:function(t){var e=this.getTarget(t);return e?e.dispatchEvent(t):void 0},asyncDispatchEvent:function(t){requestAnimationFrame(this.dispatchEvent.bind(this,t))}},m=(f.boundHandler=f.eventHandler.bind(f),f),v={shadow:function(t){return t?t.shadowRoot||t.webkitShadowRoot:void 0},canTarget:function(t){return t&&Boolean(t.elementFromPoint)},targetingShadow:function(t){t=this.shadow(t);return this.canTarget(t)?t:void 0},olderShadow:function(t){var e=t.olderShadowRoot;return e||(t=t.querySelector("shadow"))&&(e=t.olderShadowRoot),e},allShadows:function(t){for(var e=[],n=this.shadow(t);n;)e.push(n),n=this.olderShadow(n);return e},searchRoot:function(t,e,n){if(t){for(var r,o,t=t.elementFromPoint(e,n),i=this.targetingShadow(t);i;){if(r=i.elementFromPoint(e,n))return o=this.targetingShadow(r),this.searchRoot(o,e,n)||r;i=this.olderShadow(i)}return t}},owner:function(t){for(var e=t;e.parentNode;)e=e.parentNode;return e=e.nodeType!==Node.DOCUMENT_NODE&&e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?document:e},findTarget:function(t){var e=t.clientX,n=t.clientY,t=this.owner(t.target);return t.elementFromPoint(e,n)||(t=document),this.searchRoot(t,e,n)}},g=Array.prototype.forEach.call.bind(Array.prototype.forEach),y=Array.prototype.map.call.bind(Array.prototype.map),b=Array.prototype.slice.call.bind(Array.prototype.slice),w=Array.prototype.filter.call.bind(Array.prototype.filter),_=window.MutationObserver||window.WebKitMutationObserver,R={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["touch-action"]},f=(e.prototype={watchSubtree:function(t){this.observer&&v.canTarget(t)&&this.observer.observe(t,R)},enableOnSubtree:function(t){this.watchSubtree(t),t===document&&"complete"!==document.readyState?this.installOnLoad():this.installNewSubtree(t)},installNewSubtree:function(t){g(this.findElements(t),this.addElement,this)},findElements:function(t){return t.querySelectorAll?t.querySelectorAll("[touch-action]"):[]},removeElement:function(t){this.removeCallback(t)},addElement:function(t){this.addCallback(t)},elementChanged:function(t,e){this.changedCallback(t,e)},concatLists:function(t,e){return t.concat(b(e))},installOnLoad:function(){document.addEventListener("readystatechange",function(){"complete"===document.readyState&&this.installNewSubtree(document)}.bind(this))},isElement:function(t){return t.nodeType===Node.ELEMENT_NODE},flattenMutationTree:function(t){var e=y(t,this.findElements,this);return e.push(w(t,this.isElement)),e.reduce(this.concatLists,[])},mutationWatcher:function(t){t.forEach(this.mutationHandler,this)},mutationHandler:function(t){"childList"===t.type?(this.flattenMutationTree(t.addedNodes).forEach(this.addElement,this),this.flattenMutationTree(t.removedNodes).forEach(this.removeElement,this)):"attributes"===t.type&&this.elementChanged(t.target,t.oldValue)}},e),E=["none","auto","pan-x","pan-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]}],T="",C=window.PointerEvent||window.MSPointerEvent,L=!window.ShadowDOMPolyfill&&document.head.createShadowRoot,M=m.pointermap,S=[1,4,2,8,16],O=!1;try{O=1===new MouseEvent("test",{buttons:1}).buttons}catch(t){}var N,P={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup","mouseover","mouseout"],register:function(t){m.listen(t,this.events)},unregister:function(t){m.unlisten(t,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(t){for(var e,n=this.lastTouches,r=t.clientX,o=t.clientY,i=0,a=n.length;i<a&&(e=n[i]);i++){var s=Math.abs(r-e.x),c=Math.abs(o-e.y);if(s<=25&&c<=25)return!0}},prepareEvent:function(t){var e=m.cloneEvent(t),n=e.preventDefault;return e.preventDefault=function(){t.preventDefault(),n()},e.pointerId=this.POINTER_ID,e.isPrimary=!0,e.pointerType=this.POINTER_TYPE,e},prepareButtonsForMove:function(t,e){var n=M.get(this.POINTER_ID);t.buttons=n?n.buttons:0,e.buttons=t.buttons},mousedown:function(t){var e,n;this.isEventSimulatedFromTouch(t)||(e=M.get(this.POINTER_ID),n=this.prepareEvent(t),O||(n.buttons=S[n.button],e&&(n.buttons|=e.buttons),t.buttons=n.buttons),M.set(this.POINTER_ID,t),e?m.move(n):m.down(n))},mousemove:function(t){var e;this.isEventSimulatedFromTouch(t)||(e=this.prepareEvent(t),O||this.prepareButtonsForMove(e,t),m.move(e))},mouseup:function(t){var e,n,r;this.isEventSimulatedFromTouch(t)||(e=M.get(this.POINTER_ID),n=this.prepareEvent(t),O||(r=S[n.button],n.buttons=e?e.buttons&~r:0,t.buttons=n.buttons),M.set(this.POINTER_ID,t),0===n.buttons||n.buttons===S[n.button]?(this.cleanupMouse(),m.up(n)):m.move(n))},mouseover:function(t){var e;this.isEventSimulatedFromTouch(t)||(e=this.prepareEvent(t),O||this.prepareButtonsForMove(e,t),m.enterOver(e))},mouseout:function(t){var e;this.isEventSimulatedFromTouch(t)||(e=this.prepareEvent(t),O||this.prepareButtonsForMove(e,t),m.leaveOut(e))},cancel:function(t){t=this.prepareEvent(t);m.cancel(t),this.cleanupMouse()},cleanupMouse:function(){M.delete(this.POINTER_ID)}},q=m.captureInfo,H=v.findTarget.bind(v),I=v.allShadows.bind(v),x=m.pointermap,k="touch-action",D={events:["touchstart","touchmove","touchend","touchcancel"],register:function(t){j.enableOnSubtree(t)},unregister:function(t){},elementAdded:function(t){var e=t.getAttribute(k),n=this.touchActionToScrollType(e);n&&(t._scrollType=n,m.listen(t,this.events),I(t).forEach(function(t){t._scrollType=n,m.listen(t,this.events)},this))},elementRemoved:function(t){t._scrollType=void 0,m.unlisten(t,this.events),I(t).forEach(function(t){t._scrollType=void 0,m.unlisten(t,this.events)},this)},elementChanged:function(t,e){var n=t.getAttribute(k),r=this.touchActionToScrollType(n),n=this.touchActionToScrollType(e);r&&n?(t._scrollType=r,I(t).forEach(function(t){t._scrollType=r},this)):n?this.elementRemoved(t):r&&this.elementAdded(t)},scrollTypes:{EMITTER:"none",XSCROLLER:"pan-x",YSCROLLER:"pan-y",SCROLLER:/^(?:pan-x pan-y)|(?:pan-y pan-x)|auto$/},touchActionToScrollType:function(t){var e=this.scrollTypes;return"none"===t?"none":t===e.XSCROLLER?"X":t===e.YSCROLLER?"Y":e.SCROLLER.exec(t)?"XY":void 0},POINTER_TYPE:"touch",firstTouch:null,isPrimaryTouch:function(t){return this.firstTouch===t.identifier},setPrimaryTouch:function(t){(0===x.size||1===x.size&&x.has(1))&&(this.firstTouch=t.identifier,this.firstXY={X:t.clientX,Y:t.clientY},this.scrolling=!1,this.cancelResetClickCount())},removePrimaryPointer:function(t){t.isPrimary&&(this.firstTouch=null,this.firstXY=null,this.resetClickCount())},clickCount:0,resetId:null,resetClickCount:function(){var t=function(){this.clickCount=0,this.resetId=null}.bind(this);this.resetId=setTimeout(t,200)},cancelResetClickCount:function(){this.resetId&&clearTimeout(this.resetId)},typeToButtons:function(t){return"touchstart"!==t&&"touchmove"!==t?0:1},touchToPointer:function(t){var e=this.currentTouchEvent,n=m.cloneEvent(t),r=n.pointerId=t.identifier+2,o=(n.target=q[r]||H(n),n.bubbles=!0,n.cancelable=!0,n.detail=this.clickCount,n.button=0,n.buttons=this.typeToButtons(e.type),n.width=t.radiusX||t.webkitRadiusX||0,n.height=t.radiusY||t.webkitRadiusY||0,n.pressure=t.force||t.webkitForce||.5,n.isPrimary=this.isPrimaryTouch(t),n.pointerType=this.POINTER_TYPE,this);return n.preventDefault=function(){o.scrolling=!1,o.firstXY=null,e.preventDefault()},n},processTouches:function(t,e){var n=t.changedTouches;this.currentTouchEvent=t;for(var r,o=0;n.length>o;o++)r=n[o],e.call(this,this.touchToPointer(r))},shouldScroll:function(t){var e,n;if(this.firstXY)return t="none"!==(n=t.currentTarget._scrollType)&&("XY"===n||(t=t.changedTouches[0],e="Y"===n?"X":"Y",n=Math.abs(t["client"+n]-this.firstXY[n]),Math.abs(t["client"+e]-this.firstXY[e])<=n)),this.firstXY=null,t},findTouch:function(t,e){for(var n,r=0,o=t.length;r<o&&(n=t[r]);r++)if(n.identifier===e)return!0},vacuumTouches:function(t){var n,r=t.touches;x.size>=r.length&&(n=[],x.forEach(function(t,e){1===e||this.findTouch(r,e-2)||(e=t.out,n.push(e))},this),n.forEach(this.cancelOut,this))},touchstart:function(t){this.vacuumTouches(t),this.setPrimaryTouch(t.changedTouches[0]),this.dedupSynthMouse(t),this.scrolling||(this.clickCount++,this.processTouches(t,this.overDown))},overDown:function(t){x.set(t.pointerId,{target:t.target,out:t,outTarget:t.target}),m.over(t),m.enter(t),m.down(t)},touchmove:function(t){this.scrolling||(this.shouldScroll(t)?(this.scrolling=!0,this.touchcancel(t)):(t.preventDefault(),this.processTouches(t,this.moveOverOut)))},moveOverOut:function(t){var e,n,r=x.get(t.pointerId);r&&(e=r.out,n=r.outTarget,m.move(t),e&&n!==t.target&&(e.relatedTarget=t.target,t.relatedTarget=n,e.target=n,t.target?(m.leaveOut(e),m.enterOver(t)):(t.target=n,t.relatedTarget=null,this.cancelOut(t))),r.out=t,r.outTarget=t.target)},touchend:function(t){this.dedupSynthMouse(t),this.processTouches(t,this.upOut)},upOut:function(t){this.scrolling||(m.up(t),m.out(t),m.leave(t)),this.cleanUpPointer(t)},touchcancel:function(t){this.processTouches(t,this.cancelOut)},cancelOut:function(t){m.cancel(t),m.out(t),m.leave(t),this.cleanUpPointer(t)},cleanUpPointer:function(t){x.delete(t.pointerId),this.removePrimaryPointer(t)},dedupSynthMouse:function(t){var e=P.lastTouches,t=t.changedTouches[0];this.isPrimaryTouch(t)&&(t={x:t.clientX,y:t.clientY},e.push(t),e=function(t,e){e=t.indexOf(e);-1<e&&t.splice(e,1)}.bind(null,e,t),setTimeout(e,2500))}},j=new f(D.elementAdded,D.elementRemoved,D.elementChanged,D),A=m.pointermap,F=window.MSPointerEvent&&"number"==typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE,z={events:["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerOut","MSPointerOver","MSPointerCancel","MSGotPointerCapture","MSLostPointerCapture"],register:function(t){m.listen(t,this.events)},unregister:function(t){m.unlisten(t,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(t){var e=t;return F&&((e=m.cloneEvent(t)).pointerType=this.POINTER_TYPES[t.pointerType]),e},cleanup:function(t){A.delete(t)},MSPointerDown:function(t){A.set(t.pointerId,t);t=this.prepareEvent(t);m.down(t)},MSPointerMove:function(t){t=this.prepareEvent(t);m.move(t)},MSPointerUp:function(t){var e=this.prepareEvent(t);m.up(e),this.cleanup(t.pointerId)},MSPointerOut:function(t){t=this.prepareEvent(t);m.leaveOut(t)},MSPointerOver:function(t){t=this.prepareEvent(t);m.enterOver(t)},MSPointerCancel:function(t){var e=this.prepareEvent(t);m.cancel(e),this.cleanup(t.pointerId)},MSLostPointerCapture:function(t){t=m.makeEvent("lostpointercapture",t);m.dispatchEvent(t)},MSGotPointerCapture:function(t){t=m.makeEvent("gotpointercapture",t);m.dispatchEvent(t)}},U=window.navigator.msPointerEnabled?(N=function(t){i(t),this.msSetPointerCapture(t)},function(t){i(t),this.msReleasePointerCapture(t)}):(N=function(t){i(t),m.setCapture(t,this)},function(t){i(t),m.releaseCapture(t,this)});return C&&(E.forEach(function(t){t+""===t?(T+=r(t)+o(t)+"\n",L&&(T+=n(t)+o(t)+"\n")):(T+=t.selectors.map(r)+o(t.rule)+"\n",L&&(T+=t.selectors.map(n)+o(t.rule)+"\n"))}),(C=document.createElement("style")).textContent=T,document.head.appendChild(C)),window.PointerEvent||(window.PointerEvent=c,window.navigator.msPointerEnabled?(E=window.navigator.msMaxTouchPoints,Object.defineProperty(window.navigator,"maxTouchPoints",{value:E,enumerable:!0}),m.registerSource("ms",z)):(m.registerSource("mouse",P),void 0!==window.ontouchstart&&m.registerSource("touch",D)),m.register(document)),window.Element&&!Element.prototype.setPointerCapture&&Object.defineProperties(Element.prototype,{setPointerCapture:{value:N},releasePointerCapture:{value:U}}),{dispatcher:m,Installer:f,PointerEvent:c,PointerMap:u,targetFinding:v}}),function(){function s(t){t=P.call(t);return N[t]||(N[t]=t.match(I)[1].toLowerCase())}function o(t,e){e=o[e||s(t)];return e?e(t):t}function p(t){return R[s(t)]?[t]:Array.prototype.slice.call(t,0)}function c(t,e,n){var r=s(n);return"object"==r&&"object"==s(t[e])?A.merge(t[e],n):t[e]=o(n,r),t}function d(t,e,n){var r,o,i={};for(o in e)i[o.split(":")[0]]=o;for(o in n)r=i[o.split(":")[0]],"function"==typeof e[r]?(r.match(":mixins")||(e[r+":mixins"]=e[r],delete e[r],r+=":mixins"),e[r].__mixin__=A.applyPseudos(o+(o.match(":mixins")?"":":mixins"),n[o],t.pseudos,e[r].__mixin__)):(e[o]=n[o],delete e[r])}function f(l){return function t(e,n){for(var r=e.length;r--;)n.unshift(e[r]),A.mixins[e[r]].mixins&&t(A.mixins[e[r]].mixins,n);return n}(l.mixins,[]).forEach(function(t){var e,n=A.mixins[t];for(e in n){var r=n[e],o=l[e];if(o)switch(e){case"mixins":break;case"events":i=c=s=a=void 0;var i,a=l,s=o,c=r;for(i in c)s[i+":__mixin__("+q+++")"]=A.applyPseudos(i,c[i],a.pseudos);break;case"accessors":case"prototype":for(var u in r)o[u]?d(l,o[u],r[u]):o[u]=r[u];break;default:d(l,o,r)}else l[e]=r}}),l}function t(t){return 0===t.button}function i(t,e){var n,r,o,i,a,s=Object.getOwnPropertyDescriptor(t,"target");for(n in e)x[n]||(r=n,o=t,i=e,a=s,a?o[r]=i[r]:Object.defineProperty(o,r,{writable:!0,enumerable:!0,value:i[r]}));t.baseEvent=e}function m(t,e,n,r,o){a[o].call(t,n,e&&e.boolean?"":r)}function v(t,e,n,r,o){if(e&&(e.property||e.selector))for(var i=e.property?[t.xtag[e.property]]:e.selector?A.query(t,e.selector):[],a=i.length;a--;)i[a][o](n,r)}function g(t,e){t.prototype[e]={};var n,r,o,i=t.accessors[e],a=i.attribute;for(r in a&&(n=a.name=(a?a.name||e.replace(T,"$1-$2"):e).toLowerCase(),a.key=e,t.attributes[n]=a),i)!function(t,e,r,o,i,a){var n=r.split(":"),s=n[0];"get"==s?(n[0]=e,t.prototype[e].get=A.applyPseudos(n.join(":"),o[r],t.pseudos,o[r])):"set"==s?(n[0]=e,t.prototype[e].set=A.applyPseudos(n.join(":"),i?function(t){var e,n="setAttribute";i.boolean?(t=!!t,e=this.hasAttribute(a),t||(n="removeAttribute")):(t=i.validate?i.validate.call(this,t):t,e=this.getAttribute(a)),m(this,i,a,t,n),o[r].call(this,t,e),v(this,i,a,t,n)}:o[r]?function(t){o[r].call(this,t)}:null,t.pseudos,o[r]),i&&(i.setter=o[r])):t.prototype[e][r]=o[r]}(t,e,r,i,a,n);a&&(t.prototype[e].get||(o=(a.boolean?"has":"get")+"Attribute",t.prototype[e].get=function(){return this[o](n)}),t.prototype[e].set||(t.prototype[e].set=function(t){t=a.boolean?!!t:a.validate?a.validate.call(this,t):t;var e=!a.boolean||t?"setAttribute":"removeAttribute";m(this,a,n,t,e),v(this,a,n,t,e)}))}function y(t){return"function"==typeof t?H.exec(""+t)[1]:t}function h(){}function b(){return!0}var e,n,w=window,_=document,a={setAttribute:Element.prototype.setAttribute,removeAttribute:Element.prototype.removeAttribute},E=Element.prototype.createShadowRoot,u=_.createElement("div"),l=/,/g,T=/([a-z])([A-Z])/g,r=/\(|\)/g,C=/:(\w+)\u276A(.+?(?=\u276B))|:(\w+)/g,L=/(\d+)/g,M={action:function(t,e){return-1<t.value.match(L).indexOf(e.keyCode+"")==("keypass"==t.name)||null}},S={dom:"ms"==(e=((e=Object.keys(window).join()).match(/,(ms)/)||e.match(/,(moz)/)||e.match(/,(O)/)||[null,"webkit"])[1].toLowerCase())?"MS":e,lowercase:e,css:"-"+e+"-",js:"ms"==e?e:e.charAt(0).toUpperCase()+e.substring(1)},O=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype[S.lowercase+"MatchesSelector"],N={},P=N.toString,I=/\s([a-zA-Z]+)/,R=(o.object=function(t){var e,n={};for(e in t)n[e]=o(t[e]);return n},o.array=function(t){for(var e=t.length,n=Array(e);e--;)n[e]=o(t[e]);return n},{undefined:1,null:1,number:1,boolean:1,string:1,function:1}),q=0,x={};for(n in _.createEvent("CustomEvent"))x[n]=1;var k,D,H=/\/\*!?(?:\@preserve)?[ \t]*(?:\r\n|\n)([\s\S]*?)(?:\r\n|\n)\s*\*\//,A={tags:{},defaultOptions:{pseudos:[],mixins:[],events:{},methods:{},accessors:{},lifecycle:{},attributes:{},prototype:{xtag:{get:function(){return this.__xtag__||(this.__xtag__={data:{}})}}}},register:function(t,e){if("string"!=typeof t)throw"First argument must be a Custom Element string name";t=t.toLowerCase(),A.tags[t]=e||{};var n,o=e.prototype,a=(delete e.prototype,A.tags[t].compiled=f(A.merge({},A.defaultOptions,e))),i=a.prototype,r=a.lifecycle;for(n in a.events)a.events[n]=A.parseEvent(n,a.events[n]);for(n in r)r[n.split(":")[0]]=A.applyPseudos(n,r[n],a.pseudos,r[n]);for(n in a.methods)i[n.split(":")[0]]={value:A.applyPseudos(n,a.methods[n],a.pseudos,a.methods[n]),enumerable:!0};for(n in a.accessors)g(a,n);a.shadow&&(a.shadow=a.shadow.nodeName?a.shadow:A.createFragment(a.shadow)),a.content&&(a.content=a.content.nodeName?a.content.innerHTML:y(a.content));var s=r.created,c=r.finalized,u=(i.createdCallback={enumerable:!0,value:function(){var t,e=this,n=(a.shadow&&E&&this.createShadowRoot().appendChild(a.shadow.cloneNode(!0)),a.content&&(this.appendChild(document.createElement("div")).outerHTML=a.content),s?s.apply(this,arguments):null);for(t in A.addEvents(this,a.events),a.attributes){var r=a.attributes[t],o=this.hasAttribute(t),i=void 0!==r.def;(o||r.boolean||i)&&(this[r.key]=r.boolean?o:!o&&i?r.def:this.getAttribute(t))}return a.pseudos.forEach(function(t){t.onAdd.call(e,t)}),this.xtagComponentReady=!0,c&&c.apply(this,arguments),n}},r.inserted),l=r.removed,e=((u||l)&&(i.attachedCallback={value:function(){return l&&(this.xtag.__parentNode__=this.parentNode),u?u.apply(this,arguments):void 0},enumerable:!0}),l&&(i.detachedCallback={value:function(){var t=p(arguments),t=(t.unshift(this.xtag.__parentNode__),l.apply(this,t));return delete this.xtag.__parentNode__,t},enumerable:!0}),r.attributeChanged&&(i.attributeChangedCallback={value:r.attributeChanged,enumerable:!0}),i.setAttribute={writable:!0,enumerable:!0,value:function(t,e){var n,t=t.toLowerCase(),r=a.attributes[t];r&&(n=this.getAttribute(t),e=r.boolean?"":r.validate?r.validate.call(this,e):e),m(this,r,t,e,"setAttribute"),r&&(r.setter&&r.setter.call(this,!!r.boolean||e,n),v(this,r,t,e,"setAttribute"))}},i.removeAttribute={writable:!0,enumerable:!0,value:function(t){var t=t.toLowerCase(),e=a.attributes[t],n=this.hasAttribute(t);m(this,e,t,"","removeAttribute"),e&&(e.setter&&e.setter.call(this,!e.boolean&&void 0,n),v(this,e,t,"","removeAttribute"))}},{}),d=o instanceof w.HTMLElement,h=a.extends&&(e.extends=a.extends);return o&&Object.getOwnPropertyNames(o).forEach(function(t){var e=i[t],n=d?Object.getOwnPropertyDescriptor(o,t):o[t];if(e)for(var r in n)e[r]="function"==typeof n[r]&&e[r]?A.wrap(n[r],e[r]):n[r];i[t]=e||n}),e.prototype=Object.create((h?Object.create(_.createElement(h).constructor):w.HTMLElement).prototype,i),_.registerElement(t,e)},mixins:{},prefix:S,captureEvents:{focus:1,blur:1,scroll:1,DOMMouseScroll:1},customEvents:{animationstart:{attach:[S.dom+"AnimationStart"]},animationend:{attach:[S.dom+"AnimationEnd"]},transitionend:{attach:[S.dom+"TransitionEnd"]},move:{attach:["pointermove"]},enter:{attach:["pointerenter"]},leave:{attach:["pointerleave"]},scrollwheel:{attach:["DOMMouseScroll","mousewheel"],condition:function(t){return t.delta=t.wheelDelta?t.wheelDelta/40:Math.round(t.detail/3.5*-1),!0}},tap:{attach:["pointerdown","pointerup"],condition:function(t,e){if("pointerdown"==t.type)e.startX=t.clientX,e.startY=t.clientY;else if(0===t.button&&Math.abs(e.startX-t.clientX)<10&&Math.abs(e.startY-t.clientY)<10)return!0}},tapstart:{attach:["pointerdown"],condition:t},tapend:{attach:["pointerup"],condition:t},tapmove:{attach:["pointerdown"],condition:function(t,e){var n;return"pointerdown"==t.type?(n=e.listener.bind(this),e.tapmoveListeners||(e.tapmoveListeners=A.addEvents(document,{pointermove:n,pointerup:n,pointercancel:n}))):"pointerup"!=t.type&&"pointercancel"!=t.type||(A.removeEvents(document,e.tapmoveListeners),e.tapmoveListeners=null),!0}},taphold:{attach:["pointerdown","pointerup"],condition:function(t,e){if("pointerdown"==t.type)(e.pointers=e.pointers||{})[t.pointerId]=setTimeout(A.fireEvent.bind(null,this,"taphold"),e.duration||1e3);else{if("pointerup"!=t.type)return!0;e.pointers&&(clearTimeout(e.pointers[t.pointerId]),delete e.pointers[t.pointerId])}}}},pseudos:{__mixin__:{},mixins:{onCompiled:function(e,t){var n=t.source&&t.source.__mixin__||t.source;if(!n)return e;switch(t.value){case null:case"":case"before":return function(){return n.apply(this,arguments),e.apply(this,arguments)};case"after":return function(){var t=e.apply(this,arguments);return n.apply(this,arguments),t};case"none":return e}}},keypass:M,keyfail:M,delegate:{action:function(t,e){for(var n,r=e.target,o=e.currentTarget;!n&&r&&r!=o;)r.tagName&&O.call(r,t.value)&&(n=r),r=r.parentNode;return(n=!n&&o.tagName&&O.call(o,t.value)?o:n)?t.listener=t.listener.bind(n):null}},preventable:{action:function(t,e){return!e.defaultPrevented}},duration:{onAdd:function(t){t.source.duration=Number(t.value)}},capture:{onCompiled:function(t,e){e.source&&(e.source.capture=!0)}}},clone:o,typeOf:s,toArray:p,wrap:function(e,n){return function(){var t=e.apply(this,arguments);return n.apply(this,arguments),t}},merge:function(t,e,n){if("string"==s(e))return c(t,e,n);for(var r=1,o=arguments.length;r<o;r++){var i,a=arguments[r];for(i in a)c(t,i,a[i])}return t},uid:function(){return Math.random().toString(36).substr(2,10)},query:function(t,e){return(e||"").length?p(t.querySelectorAll(e)):[]},skipTransition:function(t,e,n){var r=S.js+"TransitionProperty",o=(t.style[r]=t.style.transitionProperty="none",e?e.call(n||t):null);return A.skipFrame(function(){t.style[r]=t.style.transitionProperty="",o&&o.call(n||t)})},requestFrame:(D=w.requestAnimationFrame||w[S.lowercase+"RequestAnimationFrame"]||function(t){return w.setTimeout(t,20)},function(t){return D(t)}),cancelFrame:(k=w.cancelAnimationFrame||w[S.lowercase+"CancelAnimationFrame"]||w.clearTimeout,function(t){return k(t)}),skipFrame:function(t){var e=A.requestFrame(function(){e=A.requestFrame(t)});return e},matchSelector:function(t,e){return O.call(t,e)},set:function(t,e,n){t[e]=n,window.CustomElements&&CustomElements.upgradeAll(t)},innerHTML:function(t,e){A.set(t,"innerHTML",e)},hasClass:function(t,e){return-1<t.className.split(" ").indexOf(e.trim())},addClass:function(t,e){var n=t.className.trim().split(" ");return e.trim().split(" ").forEach(function(t){~n.indexOf(t)||n.push(t)}),t.className=n.join(" ").trim(),t},removeClass:function(t,e){var n=e.trim().split(" ");return t.className=t.className.trim().split(" ").filter(function(t){return t&&!~n.indexOf(t)}).join(" "),t},toggleClass:function(t,e){return A[A.hasClass(t,e)?"removeClass":"addClass"].call(null,t,e)},queryChildren:function(t,e){var n=t.id,r="#"+(t.id=n||"x_"+A.uid())+" > ",o=t.parentNode||!u.appendChild(t),r=(e=r+(e+"").replace(l,","+r),t.parentNode.querySelectorAll(e));return n||t.removeAttribute("id"),o||u.removeChild(t),p(r)},createFragment:function(t){var e=document.createElement("template");return t&&(t.nodeName?p(arguments).forEach(function(t){e.content.appendChild(t)}):e.innerHTML=y(t)),document.importNode(e.content,!0)},manipulate:function(t,e){var n=t.nextSibling,r=t.parentNode,e=e.call(t)||t;n?r.insertBefore(e,n):r.appendChild(e)},applyPseudos:function(o,i,a,s){var t,c=i,u={};if(o.match(":")){var l=[],e=0;o.replace(r,function(t){return"("==t?1==++e?"❪":"(":--e?")":"❫"}).replace(C,function(t,e,n,r){l.push([e||r,n])});for(var d=l.length;d--;)!function(){var t=l[d][0],e=l[d][1];if(!A.pseudos[t])throw"pseudo not found: "+t+" "+e;var e=""===e||void 0===e?null:e,n=u[d]=Object.create(A.pseudos[t]),r=(n.key=o,n.name=t,n.value=e,n.arguments=(e||"").split(","),n.action=n.action||b,n.source=s,n.onAdd=n.onAdd||h,n.onRemove=n.onRemove||h,n.listener=c);c=function(){var t=n.action.apply(this,[n].concat(p(arguments)));return null===t||!1===t||(t=n.listener.apply(this,arguments),n.listener=r),t},a?a.push(n):n.onAdd.call(i,n)}()}for(t in u)u[t].onCompiled&&(c=u[t].onCompiled(c,u[t])||c);return c},removePseudos:function(e,t){t.forEach(function(t){t.onRemove.call(e,t)})},parseEvent:function(t,e){var t=t.split(":"),r=t.shift(),n=A.customEvents[r],o=A.merge({type:r,stack:h,condition:b,capture:A.captureEvents[r],attach:[],_attach:[],pseudos:"",_pseudos:[],onAdd:h,onRemove:h},n||{}),i=(o.attach=p(o.base||o.attach),o.chain=r+(o.pseudos.length?":"+o.pseudos:"")+(t.length?":"+t.join(":"):""),A.applyPseudos(o.chain,e,o._pseudos,o));return o.stack=function(t){t.currentTarget=t.currentTarget||this;var e=t.detail||{};return e.__stack__?e.__stack__==i?(t.stopPropagation(),t.cancelBubble=!0,i.apply(this,arguments)):void 0:i.apply(this,arguments)},o.listener=function(t){var e=p(arguments),n=o.condition.apply(this,e.concat([o]));return n&&(t.type!=r&&t.baseEvent&&t.type!=t.baseEvent.type?void A.fireEvent(t.target,r,{baseEvent:t,detail:!0!==n&&(n.__stack__=i)?n:{__stack__:i}}):o.stack.apply(this,e))},o.attach.forEach(function(t){o._attach.push(A.parseEvent(t,o.listener))}),o},addEvent:function(e,t,n,r){t="function"==typeof n?A.parseEvent(t,n):n;return t._pseudos.forEach(function(t){t.onAdd.call(e,t)}),t._attach.forEach(function(t){A.addEvent(e,t.type,t)}),t.onAdd.call(e,t,t.listener),e.addEventListener(t.type,t.stack,r||t.capture),t},addEvents:function(t,e){var n,r={};for(n in e)r[n]=A.addEvent(t,n,e[n]);return r},removeEvent:function(e,t,n){(n=n||t).onRemove.call(e,n,n.listener),A.removePseudos(e,n._pseudos),n._attach.forEach(function(t){A.removeEvent(e,t)}),e.removeEventListener(n.type,n.stack)},removeEvents:function(t,e){for(var n in e)A.removeEvent(t,e[n])},fireEvent:function(t,e,n){var r=_.createEvent("CustomEvent");r.initCustomEvent(e,!1!==(n=n||{}).bubbles,!1!==n.cancelable,n.detail),n.baseEvent&&i(r,n.baseEvent),t.dispatchEvent(r)}};"function"==typeof define&&define.amd?define(A):"undefined"!=typeof module&&module.exports?module.exports=A:w.xtag=A,_.addEventListener("WebComponentsReady",function(){A.fireEvent(_.body,"DOMComponentsLoaded")})}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quran-madina-html",
3
- "version": "0.9.7",
3
+ "version": "0.11.0",
4
4
  "devDependencies": {
5
5
  "grunt": "^1.6.2",
6
6
  "grunt-contrib-clean": "^2.0.1",