diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..007aa4e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pdf +*.vfc \ No newline at end of file diff --git a/README.md b/README.md index 0c277c2..9c3dea8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 傳承字形推薦形體表——網頁排版源文件 -本倉庫用於存放和托管《傳承字形推薦形體表》的網頁排版源文件。訪問本倉庫對應的 [GitHub Pages 網頁]()可以在瀏覽器內排版渲染《傳承字形推薦形體表》的 PDF 文件。 +本倉庫用於存放和託管《傳承字形推薦形體表》的網頁排版源文件。訪問本倉庫對應的 [GitHub Pages 網頁](https://ichitenfont.github.io/recom)可以在瀏覽器內排版渲染《傳承字形推薦形體表》的 PDF 文件。 本文檔使用 [Paged.js](https://pagedjs.org) 排版。使用 Chrome 123+ 版的排版效果最佳,因爲 Chrome 123 版起開始默認啓用 CSS 標點擠壓,較爲貼近舊版《傳承字形推薦形體表》1.04 版使用 Microsoft Word 排版的效果。 @@ -9,7 +9,7 @@ 此處的 `本地` 指的是當前使用的電腦終端。 * `index.html`:排版顯示的網頁。固定文本(如前言、作者、各表標題等)都在這個文件編寫。也負責導入其他文件。 -* `index.css`:定義網頁顯示效果,例如頁眉頁脚、字表格式等。 +* `index.css`:定義網頁顯示效果,例如頁眉頁腳、字表格式等。 * `index.js`:排版邏輯,引入純文本的 JSON 文件來進行排版。 * `recommended-char-list.json`:字表的純文本 JSON 文件。格式如下節所述。 * `variant-forms.json`:〈附錄一:變體部件表〉的純文本 JSON 文件。格式如下節所述。 @@ -32,7 +32,7 @@ ## 字表格式:`recommended-char-list.json` -此表用於排版〈表一:一級漢字區〉、〈表二:二級漢字區〉和〈表三:添補漢字區〉,使用 [JSON 格式](https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/Objects/JSON),屬於純文本格式。使用的格式大致如下: +此表用於排版〈表一:一級漢字區〉、〈表二:二級漢字區〉和〈表三:添補漢字區〉,使用 [JSON 格式](https://developer.mozilla.org/zh-TW/docs/Learn/JavaScript/Objects/JSON),屬於純文本格式。使用的格式大致如下: ```json { @@ -189,10 +189,10 @@ 本倉庫源文件(除了 `webfont/` 內的字型文件)和其衍生品《傳承字形推薦形體表》 PDF 皆以 [共享創意-署名4.0授權協議](https://creativecommons.org/licenses/by/4.0/) 授權。 -`webfont/` 內的字型文件以各自的字型授權使用。`I.Iosevka` 及 `Inter` 以 SIL OFL 授權,`I.MingWebVar` 以 IPA開放字型授權協議 1.0版授權。 +`webfont/` 內的字型文件以各自的字型授權使用。`I.Iosevka` 及 `Inter` 以 SIL OFL 1.1 版授權,`I.MingWebVar` 及 `I.MingWebWriting` 以 IPA開放字型授權協議 1.0 版授權。 [`pagedjs` 0.4.3](https://www.npmjs.com/package/pagedjs) 及 [`browser-dtector` 4.1.0](https://www.npmjs.com/package/browser-dtector) 爲冷凍的引用模塊,以 MIT 授權使用。 ## 致謝 -感謝 [@rwxguo](https://github.com/rwxguo) 初期協助進行數據校驗。 \ No newline at end of file +感謝 [@rwxguo](https://github.com/rwxguo) 初期協助進行數據校驗。 diff --git a/index.css b/index.css new file mode 100644 index 0000000..e5d2ce4 --- /dev/null +++ b/index.css @@ -0,0 +1,328 @@ +/* 預覽網頁(非排版) */ +body { + padding: 2em; +} + +/* 單元格填色 */ +.not-suggested { + border: 0.01em solid black; + background-color: #eee; + color: #C0504D; +} +.repeated { + border: 0.01em solid black; + background-color: #eee; + color: #00B050; +} +span.not-suggested, span.repeated { + /* 前言的填色 */ + border: none; +} + +/* 附錄 部件填色 */ +.recommended-form {color: #002060;} +.orthography-form {color: #00B0F0;} +.aesthetic-form {color: #538135;} + +/* 内容字體設置 */ +h1 { + text-align: center; + margin-bottom: 1em; + font-size: 1.5em; + font-family: var(--page-header-font); + bookmark-level: 1; + bookmark-label: content(); +} +h2 { + text-align: center; + margin-bottom: 1em; + font-size: 1.2em; + font-family: var(--serif-header-font); + page-break-after: avoid; + bookmark-level: 2; + bookmark-label: content(); +} +h3, h4 { + font-family: var(--serif-header-font); + font-size: 1em; + text-align: left; + margin-block: 0.5em; + page-break-after: avoid; +} +h3 { + bookmark-level: 3; + bookmark-label: content(); +} +h4 { + bookmark-level: 4; + bookmark-label: content(); +} +/* SVG圖片 */ +.picture-char { + display: inline; + height: 1em; + width: 1em; + line-height: 1em; + /* 根據西文基綫對齊底部,然後往下壓 */ + vertical-align: baseline; + position: relative; + bottom: -0.12em; +} + +/* 頁面内容設置 */ +section.content { + page-break-after: always; +} +section.content p { + line-height: 1.5em; + margin-bottom: 1em; + text-align: justify; /* 左右對齊 */ + hanging-punctuation: end; /* 標點懸挂(chrome暫不支持) */ +} + +/* 前言 */ +section#intro p { + margin-bottom: 1.2em; /* 段落之間空行 */ +} +section#intro span.handwriting-form { + font-family: var(--intro-handwriting); /* 其他字形 */ +} +section#intro ol#intro-collect-char-rules { + list-style-type: cjk-decimal; + line-height: 1.5em; + margin-bottom: 1.2em; + padding-left: 2em; +} + +/* 目錄 */ +#toc-list { + list-style-type: none; + padding-left: 0; +} +#toc-list li a { + color: black; +} +#toc-list li[data-title-level="h1"] { + font-family: var(--serif-header-font); + margin-top: 0.5em; +} +#toc-list li[data-title-level="h2"] { + font-family: var(--text-font); + margin-left: 2em; +} +#toc-list li a::after { /* 章節頁碼自動替換 */ + content: target-counter(attr(href), page); + float: right; +} + +/* 表格 */ +table { + border-collapse: collapse; + width: 100%; +} +table tr, table td { + border: 0.01em solid black; +} +/* 表格單元格的分類標題(表三分級用) */ +table.charlist tr th.part-header { + background-color: #ffc; + color: #e26c09; + width: 12.5%; + border: 0.01em solid black; + font-weight: normal; + font-size: 2em; +} +/* 表格單元格 */ +table.charlist tr td { + text-align: center; + width: 12.5%; + height: 1.6in; + vertical-align: top; + padding: 6px 4px; + position: relative; /* 用於裏面的註釋號碼固定在右下角*/ +} +table.charlist tr td span {display: block;} +table.charlist tr td span.big5 { + font-family: var(--big5-value-font); /* Big5 碼用代碼字體 */ +} +table.charlist tr td span.big5 span.hkscs{ + font-size: 0.6em; /* HKSCS 的 H- 標簽縮小*/ + display: inline; +} +table.charlist tr td span.sample-char{ + font-size: 3em; + line-height: 1.4; + margin-bottom: -2px; +} +table.charlist tr td span.unicode{ + margin-bottom: 3px; + font-family: var(--unicode-value-font); + font-feature-settings: "tnum"; +} + + +/* 注釋引用標簽 */ +a.ref-tag-in-table { /* 需要上一級是 position:relative */ + font-family: var(--reference-tag-font); + font-feature-settings: 'jp90'; /* 註斜點 */ + position: absolute; + right: 4px; + bottom: 4px; + font-size: 0.75em; +} + +/* 注釋列表設置 */ +ol.endnotes li { + margin-bottom: 0.5em; +} +ol.endnotes li a.endnote-refer-back { + padding-inline-end: 0.25em; + line-height: 0.9em; + white-space: nowrap; +} + + +/* 附錄表格 */ +section#appendix1 table td { + position: relative; /* 用於裏面的註釋號碼固定在右下角*/ + padding: 4px 6px; +} +section#appendix1 table#appendix1-similar-component th { + width: 3em; /* 組合部件標題 */ + font-size: 1.5em; + font-weight: normal; + background-color: #ffc; + color: #e26c09; + border: 0.01em solid black; +} +section#appendix1 table#appendix1-individual-component td { + width: 25%; /* 單獨部件4個一行,25% */ +} +section#appendix1 table p.header-component { + margin: 0; +} +section#appendix1 table p.shown-char { + font-size: 2em; + line-height: 1.08em; + margin: 0; +} +section#appendix1 table .sample-variant-char { + font-family: var(--variant-font); +} + + +/* 章節分類 */ +section#chap1 { + page: chap1; +} +section#chap2 { + page: chap2; +} +section#chap3 { + page: chap3; +} +section#appendix1 { + page: appx1; +} +section#endcover { + page: endcover; + position: relative; + height: 100%; + width: 100%; +} + +@media print { + body { + padding: 0; + } + + @page { + size: A4; + margin: 1in 1.214in; /* 左右盡量使漢字網格可以在12pt對齊35字 */ + + @bottom-center { + content: "頁 " counter(page); + vertical-align: top; + } + + .pagedjs_margin.pagedjs_margin-top-left, .pagedjs_margin.pagedjs_margin-top-right, .pagedjs_margin.pagedjs_margin-bottom-center { + font: 500 10pt var(--page-header-font); + } + + /* dot-dot-dash https://stackoverflow.com/questions/54378607/how-to-create-dash-dot-and-dash-dot-dot-lines-and-rectanges-in-css */ + .pagedjs_margin-top { + padding-bottom: 0.51em; + background: + repeating-linear-gradient(to right,#000,#000 1px,transparent 1px,transparent 2px) 0 calc(100% - 0.38em)/100% 0.05em no-repeat; + } + .pagedjs_margin-bottom { + padding-top: 0.4em; + background: + repeating-linear-gradient(to right,#000,#000 1px,transparent 1px,transparent 2px) 0 0.2em/100% 0.05em no-repeat; + } + } + @page { + @top-left { + content: "傳承字形推薦形體表"; + vertical-align: bottom; + } + } + @page { + @top-right { + content: "版本:" var(--version-number, '加載資料失敗,請刷新頁面'); + vertical-align: bottom; + } + } + + /* 不同章節的不同header */ + @page chap1 { + @top-left { + content: "傳承字形推薦形體表(表一)"; + vertical-align: bottom; + } + } + @page chap2 { + @top-left { + content: "傳承字形推薦形體表(表二)"; + vertical-align: bottom; + } + } + @page chap3 { + @top-left { + content: "傳承字形推薦形體表(表三)"; + vertical-align: bottom; + } + } + @page appx1 { + @top-left { + content: "傳承字形推薦形體表(附錄一)"; + vertical-align: bottom; + } + } + + @page endcover { + @top-left { + content: none; + } + @top-right { + content: none; + } + @bottom-center { + content: none; + } + .pagedjs_margin-top { + background: none; + } + .pagedjs_margin-bottom { + background: none; + } + } + + + tr, th, td { + page-break-inside: avoid; + } + th, td { + page-break-before: avoid; + } +} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..d7d2ef2 --- /dev/null +++ b/index.html @@ -0,0 +1,236 @@ + + + + + + + + + +
+

《傳承字形推薦形體表》

+

+ 不論是中國大陸還是臺灣,都曾調整印刷漢字字形,使它變成趨近楷體的筆形。大家把整形後的寫法稱爲「新字形」。有人詬病這樣做令印刷字形「認楷作母」,破壞美感,強改漢字生境。而相對的「傳承字形」或「傳承印刷字形」,通稱作「舊字形」,則指未向手寫體靠攏、未被整形之寫法。這些字形,與《康熙字典》、《說文解字》等傳統字形規範吻合,一方面較能保存漢字字源或字理,另一方面也比較美觀、比較適合版面排印的需求,兩者可謂相得益彰。即使大陸地區有「語言文字法」,把「新字形」奉爲圭臬,坊間仍有不少傳承字形愛好者。臺灣、香港、澳門及海外華僑地區,更有大量出版物、視像媒體字幕、招牌路牌等等,都以傳承字形的字型排印。傳承字形就像陽光和水般,在日常生活裏無處不在。 +

+

+ 傳承字形向來有文字學學者硏訂的字樣作標準,例如《康熙字典》的字頭字樣是一個重要標準;《大漢和辭典》的字頭字樣也是。不幸的是,今天處理漢字編碼的國際組織,只盲目地着重政權或政權相關組織頒佈的官式字形,冷待過往學界心血。結果,一些政權不尊重傳統,動輒改造傳承印刷字形,它們頒佈的所謂「標準」字形就輕易橫行。不論其形體有沒錯訛、問題或自相矛盾處,都可以不費吹灰之力就列進編碼文件中,供字型製作者「遵從」製成字型。至於學人的心血結晶和刻字工匠多年的美學傳承,就慘遭一些人丟棄、攻擊、嘲弄。有些人甚至公然散佈「傳承字形沒有標準」等謊言,指鹿爲馬。 +

+

+ 爲保護和發揚傳承字形,推動傳承字形推薦形體的現代標準化,我們「I.字坊編輯部」上下同寅經多年功夫,仔細對比、整理多個傳承字形的重要學界標準,先後推出《傳承字形部件檢校表》(後稱《檢校表》)、《傳承字形筆畫表》等順應現今字型製作者需求的傳承字形標準化文件。如今,我們再推出《傳承字形推薦形體表》,明列相關推薦字形對應的電腦編碼,既希望讓字型製作者使用時感到更便利、更貼心,也希望徹底堵住攻擊者的任何話柄。 +

+

+ 漢字數量龐大,以我們的人力物力,難以編訂無所不包的字表。然而我們既然已推出《檢校表》,以部件爲單位,根據字理分拆部件,應當已可處理各種漢字字形問題。我們製作本表,目的是方便字型製作者直接査得推薦字形。它只要包含日常生活裏的常用字和次常用字,已經很足夠。 +

+

+ 目前世界上有多個常用漢字子集,其中好些漢字子集均收錄了大批大陸簡化字。傳承印刷字形雖然也有用於大陸簡化字的實例,但簡化字本身就是人爲地大量及大規模改變漢字形體而成,因此,大家對一般漢字的傳承字形需求明顯比對簡化字的需求大。本表從實用角度出發,暫不收錄大陸簡化字。同理,本表亦暫不收錄日本的新字體略字。可是有些簡化字或略字,跟傳統漢字環境裏的正常漢字或常見異體同形,如「个、仆、医、双、叶、吁、宝、种、糸、缶、胜、芸、达」等,本表也會收錄。 +

+

+ 經權衡後,編者今以臺灣Big5碼所收錄之常用字及次常用字爲基礎,修訂個別有問題的字,補上內木一郎編製的《常用香港外字表》第 1.8 版裏的部份漢字(撇除以推薦形體統一者)及個別的附加字例,作爲本表的收字範圍,相信能滿足絕大部份使用傳統中文場合的漢字需求。 +

+

+ 同時,本表收字主要遵從這些規則: +

+
    +
  1. 完全同形字只收錄一次。例如「好」既指美善、喜愛,亦爲「婦好」之「好」;「份」既指整體裏的一部份、量詞等,也是「彬」字的古代異體。本表不會收錄兩個「好」字或兩個「份」字。
  2. +
  3. 有不同音義的形近字分別收錄,絕不相混。例如「刊」和「刋」、「券」和「劵」、「胄」和「冑」、「苟」和「茍」、「苜」和「𥄕」、「萑」和「雈」、「栝」和「桰」、「銛」和「銽」、「朏」和「胐」等組合,前者與後者音義有別,是不同的字,本表皆分列。
  4. +
  5. 異體字之間,若構形或抽象字形相似,只是當中的構件有少許形近之差異,皆以傳承字形推薦形體統一之。例如「眞」和「真󠄃」、「直」和「直󠄄」、「青」和「」、「俞」和「」、「爲」和「」、「敎」和「」、「査」和「」、「姸」和「」、「令」和「令󠄂」、「犮」和「犮󠄂」、「吿」和「」、「丟」和「丢」等組合,前後兩者皆同音同義,字的構形或抽象字形也相似,只是某些地方的筆畫或寫法相異。其中,前者是傳承字形,字理佔優。後者卻只是手寫時變異而成的形體,有違傳承字形原則。因此我們俱以前者統一之。
  6. +
  7. 異體字之間,若構形明顯相異,但皆能立足於字理,則並收之。如「峰」和「峯」、「群」和「羣」、「煙」和「烟」、「麪」和「麵」、「𠝹」和「鎅」、「焰」和「燄」、「線」和「綫」、「糉」和「粽」、「雙」和「双」、「釁」和「衅」等。
  8. +
  9. 異體字之間,若構形明顯相異,但部份形體字理較薄弱,或另有原因,以致不宜取該異體,則以灰底暗紅色標示,並以註釋說明。例如「么」宜作「幺」,「匆」宜作「怱」或「悤」,「裡」宜作「裏」等。
  10. +
  11. 非全同異體字之間,即使該形體的字理較薄弱,但有已獲約定俗成的義項分化作用,我們會承認該分化。如「着、両」等字,皆有其專指義項並廣爲世人接受,我們並不主張以「著、兩」等字取代之。
  12. +
+

+ 上述規則與Unicode「中日韓統一表意文字」收字原則相似。然而Unicode在實際收字時,不時基於「原字集分離原則」而自打嘴巴,把本應整併收錄的字,分作兩個或多個碼位。Unicode 設立「原字集分離原則」,爲的是呼應當時的技術限制,解決與既有通用字集的對應問題。但自從Unicode的漢字收錄進入擴展 A 區後,Unicode 官方已放棄「原字集分離原則」。而且今天已有異體字選擇器(Variation Sequence)、 CID 字型等技術解決對應問題,「原字集分離原則」已經過時。科技以人爲本,我們絕不應本末倒置,因爲遷就過時的技術、錯誤的碼位區分,而強行收進不符傳承字形的形體。應以字理佔優形體來整併的漢字,還是必須整併。因此本表會遵守上述規則,不會盲目依從「原字集分離原則」。 +

+

+ 我們強烈呼籲字型製作者以字理爲本,在製作傳承字形的字型時,不要盲從「原字集分離原則」這違反傳承字形原則的過時技術副產品。否則,若製作者只把「値」、「靑」、「爲」等傳承字形,放在 5024、9751、7232 這些正體(繁體)中文「事實標準」裏少用的碼位;至於正體(繁體)中文「事實標準」裏常用的碼位503C、9752、70BA,卻放置着違反傳承字形規定的「值」、「 青」、「為」等字形,只會令用戶容易踩中陷阱,誤用非傳承字形。這種做法顯然違反選擇傳承字形用戶之意願,絕不可取。 +

+

+ 在本表,我們把過往Big5碼(參考事實標準的微軟CP950代碼頁,包含倚天Big5延伸中獲大眾接納的部份)以等寬字型標於漢字上方,把Unicode碼以無襯綫字型標於漢字下方。若字之上方標示減號「-」,表示該字沒有Big5碼;若字之Big5碼標示前面帶有「H-」,表示該字的Big5碼源於HKSCS;若一字下方有超過一個編碼,即Unicode 在多於一個碼位上收錄了本應整併起來的字。製作傳承字形的字型時,製作者在這些碼位上都應該放置傳承字形,不應以「原字集分離原則」爲藉口安放非傳承字形。而序跋註釋裏的字碼,若無特別說明,皆指Unicode碼。此外,Unicode 擴展B區起的漢字,至今仍有不少程式不支援,或者尚未與基本區、擴展A區的漢字取齊。因此若非必要,本表盡可能不取擴展B區及其後區域的編碼。 +

+

+ 本表所收錄的形體,皆爲我們廣泛採樣後,整理出既盡力符合字理,也獲大眾約定俗成的寫法,即傳承字形推薦形體。大家可直接以本表字形爲準繩。爲節省篇幅,本表每字只收一形,理論上即《檢校表》的深藍色者。爲了方便字型製作者查閲,編者也在本表附錄了《檢校表》中所推薦的其他異體字形,例如《檢校表》的淺藍色或綠色字形。詳細的部件原則解說可參考《檢校表》的說明。若字型製作者按這些字形製字,我們認爲亦絕無問題,只要統一相同部件的字形處理即可。至於本表尚未收錄的字,只要在本表中翻査其所從部件的字形,並按照《檢校表》的規定,即可知悉該字的傳承字形推薦形體。 +

+

+ 本文檔以 Paged.js 排版,未知 版瀏覽器渲染。 +

+
+ +
+

目錄

+ +
+ +
+

表一:一級漢字區

+

+ 本區以 Big5 碼常用字區所收錄的漢字爲基礎,表後添上用來取代原 Big5 碼常用字區不恰當收字的推薦替換字。至於那些不恰當收字,考慮到 Big5 碼已是正體(繁體)中文地區的「事實標準」編碼,爲免令字型出現空窗,我們仍列於此表一中,但會以灰底暗紅色標示。 +

+
+

表一註釋:

+
    +
    + +
    +

    表二:二級漢字區

    +

    + 本區以 Big5 碼次常用字區所收錄的漢字爲基礎,表後添上用來取代原 Big5 碼次常用字區不恰當收字的推薦替換字。考慮到 Big5 碼已是正體(繁體)中文地區的「事實標準」編碼,爲免令字型出現空窗,我們仍將不恰當收字列於此表二中,但會以灰底暗紅色標示。重出的字則以灰底綠色標示。 +

    +
    +

    表二註釋:

    +
      +
      + +
      +

      表三:添補漢字區

      +

      + 有些漢字原Big5碼並無收錄,香港中諮會頒佈了HKSCS增補區,卻收字太雜亂,含有許多錯訛字,不宜全收。同時它仍缺收一些頗有用的字。今參考內木一郎編製的《常用香港外字表》第1.8版,選出當中部份漢字,撇除宜以推薦形體統一者,並另外添上個別的附加字例,列於此表三中。 +

      +
      +

      表三註釋:

      +
        +
        + +
        +

        附錄一:變體部件表

        +

        + 本附錄列出《檢校表》所接受的其他異體字形。本附錄標記使用的顏色意義如下:本《推薦形體表》所使用的字形且爲《檢校表》首選的字形,以黑色標示;符合字理且廣受今天大眾約定俗成的寫法,以海色(深藍色)標示;符合字理但在今天未必是最約定俗成的寫法,以天色(淺藍色)標示;稍爲遷就美觀需要的常見寫法,則以地色(草葉綠色)標示。詳細的部件解說請參考《檢校表》內文。 +

        + +

        形似部件

        +

        + 本表僅按照形似的變體部件歸類在一起。部份部件在更換爲其他異體後可能會導致字源混淆,但是如果字型製作者有合適的原因考量使用異體,編者認爲亦可接受,只要同一部件皆作相同處理即可。 +

        +
        + +

        單獨部件

        +
        + +

        註釋

        +
          +
          + +
          +
          +

          《傳承字形推薦形體表》

          + 主編撰:內木一郎
          + 字表製作:夜煞之樂、陳輝恒
          + 聯合編撰:陳輝恒、李爾樅、鍾啟堯
          + 編務協助:陳志泓、佟藍歌、伍梓豪
          + 版本:
          + 初版日期:2019 年 7 月 18 日
          + 修訂日期:
          +
          + 本作品以 共享創意-署名4.0授權協議 授權。 +
          +
          + + + + + + + \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..bf2b9c1 --- /dev/null +++ b/index.js @@ -0,0 +1,523 @@ +/************ 內容表 *************/ +const char_per_row = 8; + +function generateNormalTable(list, tableNode, refEndnotesNode, uniqueTag) { + // 儲存注釋資料 + let parsedRefs = []; + // 裏面的 object 資料格式: + // refObj = { + // refTag: 引用標簽,如果沒有會自動生成(文檔内看不到), + // comment: 註釋内容, + // cellRefNodes: [一堆表格内單獨格子 td 裏面 “[註1]” 的超鏈接 a 元素], + // }; + + let newRow = document.createElement("tr") + tableNode.appendChild(newRow); + for (let [index, item] of list.entries()){ + // 檢査是不是隱藏的注釋 + if (item.hidden && item.comment) { + + // 添加新引用object,提取ref tag + parsedRefs.push({ + refTag: item.ref, + comment: item.comment, + cellRefNodes: [] + }); + + // 跳過此格 + continue; + } + + // 創建格子 + let newCell = createHanziCell(item, parsedRefs); + + //在行内添加當前格子 + newRow.appendChild(newCell) + if (newRow.childElementCount === char_per_row) { + // 第8格開始新的一行 + newRow = document.createElement("tr"); + tableNode.appendChild(newRow); + } + } + // 加上一个空白格,避免換頁時沒有寬度補充 + if (newRow.childElementCount !== char_per_row && newRow.childElementCount !== 0) { + let fitCell = document.createElement("td"); + fitCell.colSpan = char_per_row - newRow.childElementCount; + fitCell.style.width = 'auto'; + newRow.appendChild(fitCell); + } + + generateFootnotes(parsedRefs, refEndnotesNode, uniqueTag) +} + +function generateSectionedTable(sectionList, tableNode, refEndnotesNode, uniqueTag) { + // 儲存注釋資料 + let parsedRefs = []; + // 裏面的 object 資料格式: + // refObj = { + // refTag: 引用標簽,如果沒有會自動生成(文檔内看不到), + // comment: 註釋内容, + // cellRefNodes: [一堆表格内單獨格子 td 裏面 “[註1]” 的超鏈接 a 元素], + // }; + + // 目錄添加分級標題的位置 + let tocAppendBeforeLocation = document.querySelector("#toc-table3-endnote"); + + for (let [keyname, list] of Object.entries(sectionList)){ + // 爲每個分級循環 + + // 先加上新的一行 + let newRow = document.createElement("tr");3 + tableNode.appendChild(newRow) + + // 這個分級的標題 + let headerCell = document.createElement("th"); + headerCell.classList.add('part-header'); + headerCell.innerText = keyname; + let headerCellID = [uniqueTag, 'sectioned', 'header', keyname].join('-') + headerCell.id = headerCellID; + newRow.appendChild(headerCell) + + // 目錄添加分級標題 + let newTOC = document.createElement("li"); + let newTOCaHref = document.createElement("a"); + newTOCaHref.innerText = keyname; + newTOCaHref.href = '#' + headerCellID; + newTOC.appendChild(newTOCaHref); + newTOC.setAttribute('data-title-level', 'h2'); + tocAppendBeforeLocation.parentNode.insertBefore(newTOC, tocAppendBeforeLocation); + + // 然後才循環裏面的漢字 + for (let [index, item] of list.entries()){ + // 檢査是不是隱藏的注釋 + if (item.hidden && item.comment) { + // 添加新引用object,提取ref tag + parsedRefs.push({ + refTag: item.ref, + comment: item.comment, + cellRefNodes: [] + }); + + // 跳過此格 + continue; + } + + // 創建格子 + let newCell = createHanziCell(item, parsedRefs); + + //在行内添加當前格子 + newRow.appendChild(newCell) + if (newRow.childElementCount === char_per_row) { + // 第8格后插入一行,開始新的一行 + newRow = document.createElement("tr"); + tableNode.appendChild(newRow); + } + } + + // 加上一个空白格,避免換頁時沒有寬度補充 + if (newRow.childElementCount !== char_per_row && newRow.childElementCount !== 0) { + let fitCell = document.createElement("td"); + fitCell.colSpan = char_per_row - newRow.childElementCount; + fitCell.style.width = 'auto'; + newRow.appendChild(fitCell); + } + } + + generateFootnotes(parsedRefs, refEndnotesNode, uniqueTag) +} + +// 處理單個漢字資料並返回可以加入 HTMl 的 element +function createHanziCell(item, parsedRefs) { + let newCell = document.createElement("td"); + + // 植入資料 + let big5 = document.createElement("span"); + big5.classList.add('big5'); + if (item.big5 === undefined || item.big5.trim().length === 0){ + big5.innerHTML = "-"; // 沒有big5碼 + } else { + if (item.hkscs) { // HKSCS 標簽 + let hkTag = document.createElement("span"); + hkTag.classList.add('hkscs'); + hkTag.innerText = "H-"; + big5.appendChild(hkTag); + } + big5.innerHTML += item.big5; // big5碼 + } + newCell.appendChild(big5); + + let char = document.createElement("span"); + char.classList.add('sample-char'); + char.innerText = item.char; // 預覽漢字 + newCell.appendChild(char); + + let uni = document.createElement("span"); + uni.classList.add('unicode'); + uni.innerText = item.unicode; // unicode + newCell.appendChild(uni); + + if ('unicode2' in item) { // 第二個unicode + let uni2 = document.createElement("span"); + uni2.classList.add('unicode'); + uni2.innerText = item.unicode2; + newCell.appendChild(uni2); + } + + // 特別漢字上色 + if ('shouldRemove' in item && item.shouldRemove) { + newCell.classList.add('not-suggested'); + } else if ('repeated' in item && item.repeated){ + newCell.classList.add('repeated'); + } + + //註釋/註釋引用 + if ('comment' in item || 'ref' in item) { + refTag = parseEndnote(item, parsedRefs); + newCell.appendChild(refTag); + } + + return newCell; +} + +function parseEndnote(item, parsedRefs) { + let refTag = null; + + // 檢查註釋/註釋引用 + if ('comment' in item) { // 有註釋 + if ('ref' in item) { + // 註釋有引用 ref tag + // 找是否已經遇過同樣的tag + let refObj = parsedRefs.find(x => x.refTag === item.ref); + + if (refObj === undefined) { + // 創建新的註釋 object + refObj = { + refTag: item.ref, + comment: item.comment, + cellRefNodes: [] + }; + parsedRefs.push(refObj); + } else { + // 已經有同樣tag的註釋 + if (refObj.comment === undefined){ + // 沒有註釋文本 + refObj.comment = item.comment; + } else { + // 有註釋文本,出錯了 + console.log(refObj) + alert('同樣標簽但在不同字符内可能有不同註釋,請只保留一個:' + item.ref); + } + } + + // 預留當前格子的註釋號碼 + refTag = document.createElement("a"); + refTag.innerText = "[註 ]"; + refTag.classList.add('ref-tag-in-table'); + + // 引用object裏面 添加指向當前格子的註釋號碼 + refObj.cellRefNodes.push(refTag); + } else { + // 註釋沒有引用 ref tag,默認不會在其他漢字重複引用 + + // 預留當前格子的註釋號碼 + refTag = document.createElement("a"); + refTag.innerText = "[註 ]"; + refTag.classList.add('ref-tag-in-table'); + + // 添加新引用object,默認不用refTag + parsedRefs.push({ + comment: item.comment, + cellRefNodes: [refTag] + }); + } + } else if ('ref' in item) { + // 找是否已經遇過同樣的tag + let refObj = parsedRefs.find(x => x.refTag === item.ref); + + if (refObj === undefined) { + // 還沒看見相同的註釋引用,創建新的記錄 + + refObj = { + refTag: item.ref, + comment: item.comment, + cellRefNodes: [] + } + // 添加新引用object + parsedRefs.push(refObj); + } + + // 預留當前格子的註釋號碼 + refTag = document.createElement("a"); + refTag.innerText = "[註 ]"; + refTag.classList.add('ref-tag-in-table'); + + // 引用object裏面 添加指向當前格子的註釋號碼 + refObj.cellRefNodes.push(refTag); + } + + return refTag +} + +function generateFootnotes(parsedRefs, refEndnotesNode, uniqueTag, addTagBehindComment=true) { + // 完畢后填入引用資料 + for (let [index, refObj] of parsedRefs.entries()) { + // 為每一個註釋資料 + + let refNumber = index + 1; // 註釋列表顯示的序號 + // 創建新的 HTML 列表條目並加入列表 + let newCommentItem = document.createElement("li"); + refEndnotesNode.appendChild(newCommentItem); + + // 添加註釋列表裏面註釋的 HTML ID,定位用 + let commentNodeID = [uniqueTag, "endnote", "comment", refNumber].join("-"); + newCommentItem.id = commentNodeID; + + // 添加格子裏面引用的 HTML ID,並且超鏈接連上註釋列表 + let cellNodeIDs = []; // 存每個漢字格子的 HTMl ID + if (refObj.cellRefNodes.length === 1) { + // 表格内只有一個漢字引用 + let cellNodeID = [uniqueTag, "inline", "cell", refNumber].join("-"); // 定位用的 ID + refObj.cellRefNodes[0].innerText = "[註 " + refNumber + "]"; // 註釋編號 + refObj.cellRefNodes[0].href = "#" + commentNodeID; // 跳轉去的位置 + + refObj.cellRefNodes[0].parentNode.id = cellNodeID; // 定位去對應上一層的格子(td),不是去href + cellNodeIDs.push([cellNodeID, null]); + } else { + // 表格内有多個漢字引用,每一個都要生成 + for (let cellNode of refObj.cellRefNodes){ + let parentChar = cellNode.parentNode.querySelector("span.sample-char").innerText; //按順序加字母 + let cellNodeID = [ + uniqueTag, "inline", "cell", refNumber, parentChar + ].join("-"); // 定位用的 ID + cellNode.innerText = "[註 " + refNumber + "]"; // 註釋編號(帶字母) + cellNode.href = "#" + commentNodeID; // 跳轉去的位置 + + cellNode.parentNode.id = cellNodeID;// 定位去對應上一層的格子(td),不是去href + cellNodeIDs.push([cellNodeID, parentChar]); + } + } + + // 添加註釋列表裏面註釋的文本 + // 先加上註釋内容 + let commentText = document.createElement("span"); + commentText.innerHTML = refObj.comment; // 註釋文本 + newCommentItem.appendChild(commentText); + + // 可選擇是否在後面加返回前面的鏈接 + if (addTagBehindComment) { + // 然後加上跳轉回去漢字格子的返回鏈接 + for (let [cellNodeID, parentChar] of cellNodeIDs) { + let jumpBackHyperlink = document.createElement("a"); + // 超鏈接顯示的文本 + if (parentChar){ + jumpBackHyperlink.innerHTML = `^${parentChar}`; + } else { + jumpBackHyperlink.innerText = "^"; + } + jumpBackHyperlink.href = "#" + cellNodeID; // 超鏈接跳轉回去的位置 + jumpBackHyperlink.classList.add("endnote-refer-back") + newCommentItem.appendChild(jumpBackHyperlink); + } + } + if (refObj.comment === undefined) { + console.log(refObj) + alert('以下ref標簽沒有提供註釋内容文本(comment):' + refObj.refTag); + } + } +} + +function setImageCSS(node){ + picturesInText = node.querySelectorAll("img"); + // 將註釋裏面的圖片加上 CSS class 進行格式定義 + picturesInText.forEach(element => { + element.classList.add('picture-char') + }); +} + +function parseContentData(data){ + // 更新文檔meta信息版本 + document.querySelector('meta[name="version"]').setAttribute("content", data["版本"]); + document.querySelector('meta[name="description"]').setAttribute( + "content", + document.querySelector('meta[name="description"]').getAttribute('content') + data["版本"] + "版" + ); + document.documentElement.style.setProperty('--version-number', JSON.stringify(data["版本"])); + // 尾頁版本和日期 + document.querySelector('section#endcover span#version').innerText += data["版本"]; + document.querySelector('section#endcover span#edit-date').innerText += data["日期"]; + + // 處理表一 + table1 = document.getElementById("chap1-charlist"); + refEndnotes1 = document.getElementById("chap1-endnotes"); + generateNormalTable(data["表一"], table1, refEndnotes1, 'table1'); + setImageCSS(refEndnotes1) + + // 處理表二 + table2 = document.getElementById("chap2-charlist"); + refEndnotes2 = document.getElementById("chap2-endnotes"); + generateNormalTable(data["表二"], table2, refEndnotes2, 'table2'); + setImageCSS(refEndnotes2) + + // 處理表三,不同格式 + table3 = document.getElementById("chap3-charlist"); + refEndnotes3 = document.getElementById("chap3-endnotes"); + generateSectionedTable(data["表三"], table3, refEndnotes3, 'table3'); + setImageCSS(refEndnotes3) +} + + + +/************ 附錄 *************/ +const variant_component_per_row = 4; + +function parseAppendixData(data) { + generateAppendixSharedTable(data["形類"]); + generateAppendixIndividualTable(data["單獨"]); +} + +function generateAppendixSharedTable(componentGroups) { + let table = document.getElementById("appendix1-similar-component"); + + for (let groupItem of componentGroups) { + let newRow = document.createElement('tr'); + table.appendChild(newRow) + + // 左邊的標題欄 + let headerCell = document.createElement('th'); + headerCell.innerHTML = groupItem["group-title"]; + newRow.appendChild(headerCell); + + // 右邊的內容欄 + let contentCell = document.createElement('td'); + newRow.appendChild(contentCell); + + // 部件名 + let componentRow = document.createElement('p'); + componentRow.classList.add('header-component'); + contentCell.appendChild(componentRow); + + // 預覽部件漢字 + let sampleCharRow = document.createElement('p'); + sampleCharRow.classList.add('shown-char'); + contentCell.appendChild(sampleCharRow); + sampleCharRow.appendChild(document.createTextNode(groupItem["display-char"])); // 正體漢字 + sampleCharRow.appendChild(document.createTextNode('\u3000')); //分隔空格 + + for (let [key, component] of Object.entries(groupItem["components"])) { + if (componentRow.textContent.trim().length !== 0) { + //如果不是空白,在部件列表前面加頓號 + componentRow.appendChild(document.createTextNode("、")) + } + // 部件名 + componentRow.appendChild(document.createTextNode(key)) + + // 異體部件預覽 + let sampleChar = document.createElement('span'); + sampleChar.classList.add('sample-variant-char'); + sampleCharRow.appendChild(sampleChar); + if (Object.keys(component).includes("display-char")) { + // 預覽文字 + if (Array.isArray(component["display-char"])) { + component["display-char"].forEach(text => sampleChar.innerText += text); + } else { + sampleChar.innerText = component["display-char"]; + } + } else if (Object.keys(component).includes("display-pic")) { + // 預覽圖片 + if (Array.isArray(component["display-pic"])) { + component["display-pic"].forEach(pic => sampleChar.innerHTML += pic);1 + } else { + sampleChar.innerHTML += component["display-pic"]; + } + } + //添加顏色 + switch (component["type"]) { + case "海": + sampleChar.classList.add('recommended-form'); break; + case "天": + sampleChar.classList.add('orthography-form'); break; + case "地": + sampleChar.classList.add('aesthetic-form'); break; + } + } + } + setImageCSS(table); +} + +function generateAppendixIndividualTable(componentList) { + let tableNode = document.getElementById("appendix1-individual-component"); + let refEndnotesNode = document.getElementById("appendix1-individual-component-endnotes"); + + // 儲存注釋資料 + let parsedRefs = []; + + let newRow = document.createElement("tr") + tableNode.appendChild(newRow); + for (let component of componentList) { + // 添加新格子 + let newCell = document.createElement("td"); + newRow.appendChild(newCell); + + // 部件名 + let componentRow = document.createElement('p'); + componentRow.classList.add('header-component'); + componentRow.innerText = component["name"]; + newCell.appendChild(componentRow); + + // 預覽部件漢字 + let sampleCharRow = document.createElement('p'); + sampleCharRow.classList.add('shown-char'); + newCell.appendChild(sampleCharRow); + + let standardChar = document.createElement("span"); // 用於注釋生成漢字使用的 + standardChar.classList.add('sample-char'); + standardChar.innerText = component["display-char"]; + sampleCharRow.appendChild(standardChar); // 正體漢字 + + // 異體漢字 + let sampleChar = document.createElement('span'); + sampleChar.classList.add('sample-variant-char'); + sampleCharRow.appendChild(sampleChar); + // 同時允許,主要給(齋) + if (Object.keys(component).includes("display-char")) { + // 預覽文字 + sampleChar.innerText = component["display-char"]; + } + if (Object.keys(component).includes("display-pic")) { + // 預覽圖片 + sampleChar.innerHTML += component["display-pic"]; + } + //添加顏色 + switch (component["type"]) { + case "海": + sampleChar.classList.add('recommended-form'); break; + case "天": + sampleChar.classList.add('orthography-form'); break; + case "地": + sampleChar.classList.add('aesthetic-form'); break; + } + + //註釋/註釋引用 + if ('comment' in component || 'ref' in component) { + refTag = parseEndnote(component, parsedRefs); + newCell.appendChild(refTag); + } + + if (newRow.childElementCount === variant_component_per_row) { + // 第8格開始新的一行 + newRow = document.createElement("tr"); + tableNode.appendChild(newRow); + } + } + // 加上一个空白格,避免換頁時沒有寬度補充 + if (newRow.childElementCount !== variant_component_per_row && newRow.childElementCount !== 0) { + let fitCell = document.createElement("td"); + fitCell.colSpan = variant_component_per_row - newRow.childElementCount; + fitCell.style.width = 'auto'; + newRow.appendChild(fitCell); + } + + generateFootnotes(parsedRefs, refEndnotesNode, 'appendix1', addTagBehindComment=false) + setImageCSS(tableNode); + setImageCSS(refEndnotesNode); +} \ No newline at end of file diff --git a/js/browser-dtector.js b/js/browser-dtector.js new file mode 100644 index 0000000..fda3467 --- /dev/null +++ b/js/browser-dtector.js @@ -0,0 +1,2 @@ +var l={chrome:"Google Chrome",brave:"Brave",crios:"Google Chrome",edge:"Microsoft Edge",edg:"Microsoft Edge",edgios:"Microsoft Edge",fennec:"Mozilla Firefox",jsdom:"JsDOM",mozilla:"Mozilla Firefox",fxios:"Mozilla Firefox",msie:"Microsoft Internet Explorer",opera:"Opera",opios:"Opera",opr:"Opera",opt:"Opera",rv:"Microsoft Internet Explorer",safari:"Safari",samsungbrowser:"Samsung Browser",electron:"Electron"},p={android:"Android",androidTablet:"Android Tablet",cros:"Chrome OS",fennec:"Android Tablet",ipad:"IPad",ipod:"IPod",iphone:"IPhone",jsdom:"JsDOM",linux:"Linux",mac:"Macintosh",tablet:"Android Tablet",win:"Windows","windows phone":"Windows Phone",xbox:"Microsoft Xbox"};var k=(d,r=-1)=>{let e=new RegExp(`^-?\\d+(?:.\\d{0,${r}})?`),s=Number(d).toString().match(e);return s?s[0]:null},w={toFixed:k};var m="4.1.0";var u=()=>typeof window<"u"?window.navigator:null,c=class{userAgent;constructor(r){this.userAgent=r||u()?.userAgent||null}static get VERSION(){return m}parseUserAgent(r){let e={},s=r||this.userAgent||"",o=s.toLowerCase().replace(/\s\s+/g," "),t=/(edge)\/([\w.]+)/.exec(o)||/(edg)[/]([\w.]+)/.exec(o)||/(opr)[/]([\w.]+)/.exec(o)||/(opt)[/]([\w.]+)/.exec(o)||/(fxios)[/]([\w.]+)/.exec(o)||/(edgios)[/]([\w.]+)/.exec(o)||/(jsdom)[/]([\w.]+)/.exec(o)||/(samsungbrowser)[/]([\w.]+)/.exec(o)||/(electron)[/]([\w.]+)/.exec(o)||/(chrome)[/]([\w.]+)/.exec(o)||/(crios)[/]([\w.]+)/.exec(o)||/(opios)[/]([\w.]+)/.exec(o)||/(version)(applewebkit)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(o)||/(webkit)[/]([\w.]+).*(version)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(o)||/(applewebkit)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(o)||/(webkit)[/]([\w.]+)/.exec(o)||/(opera)(?:.*version|)[/]([\w.]+)/.exec(o)||/(msie) ([\w.]+)/.exec(o)||/(fennec)[/]([\w.]+)/.exec(o)||o.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(o)||o.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(o)||[],b=/(ipad)/.exec(o)||/(ipod)/.exec(o)||/(iphone)/.exec(o)||/(jsdom)/.exec(o)||/(windows phone)/.exec(o)||/(xbox)/.exec(o)||/(win)/.exec(o)||/(tablet)/.exec(o)||/(android)/.test(o)&&/(mobile)/.test(o)===!1&&["androidTablet"]||/(android)/.exec(o)||/(mac)/.exec(o)||/(linux)/.exec(o)||/(cros)/.exec(o)||[],i=t[5]||t[3]||t[1]||null,n=b[0]||null,a=t[4]||t[2]||null,g=u();i==="chrome"&&typeof g?.brave?.isBrave=="function"&&(i="brave"),i&&(e[i]=!0),n&&(e[n]=!0);let x=!!(e.tablet||e.android||e.androidTablet),f=!!(e.ipad||e.tablet||e.androidTablet),h=!!(e.android||e.androidTablet||e.tablet||e.ipad||e.ipod||e.iphone||e["windows phone"]),v=!!(e.cros||e.mac||e.linux||e.win),y=!!(e.brave||e.chrome||e.crios||e.opr||e.safari||e.edg||e.electron),B=!!(e.msie||e.rv),M=!!(e.chrome||e.crios),j=!!(e.fxios||e.fennec||e.mozilla),E=!!e.safari,K=!!(e.opera||e.opios||e.opr||e.opt),A=!!(e.edg||e.edge||e.edgios);return{name:l[i]??null,platform:p[n]??null,userAgent:s,version:a,shortVersion:a?w.toFixed(parseFloat(a),2):null,isAndroid:x,isTablet:f,isMobile:h,isDesktop:v,isWebkit:y,isIE:B,isChrome:M,isFireFox:j,isSafari:E,isOpera:K,isEdge:A}}getBrowserInfo(){let r=this.parseUserAgent();return{name:r.name,platform:r.platform,userAgent:r.userAgent,version:r.version,shortVersion:r.shortVersion}}};var C=c;export{c as BrowserDetector,l as KnownBrowsers,p as KnownPlatforms,C as default}; +//# sourceMappingURL=browser-dtector.js.map \ No newline at end of file diff --git a/js/paged.polyfill.min.js b/js/paged.polyfill.min.js new file mode 100644 index 0000000..2cccc2f --- /dev/null +++ b/js/paged.polyfill.min.js @@ -0,0 +1,4 @@ +/** + * @license Paged.js v0.4.3 | MIT | https://gitlab.coko.foundation/pagedjs/pagedjs + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).PagedPolyfill=t()}(this,(function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t,n,r={exports:{}},a={exports:{}};var i,o,s,l,d=function(){},p=d(),c=function(e){return e!==p&&null!==e};function u(){return l||(l=1,s=(n?t:(n=1,t=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(o)return i;o=1;var e=c,t=Object.keys;return i=function(n){return t(e(n)?Object(n):n)}}()),s}var m,h,g=c,f=function(e){if(!g(e))throw new TypeError("Cannot use null or undefined");return e};var y,b,S=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}()?Object.assign:function(){if(h)return m;h=1;var e=u(),t=f,n=Math.max;return m=function(r,a){var i,o,s,l=n(arguments.length,2);for(r=Object(t(r)),s=function(e){try{r[e]=a[e]}catch(e){i||(i=e)}},o=1;o-1},y}(),_=S,z=function(e){var t=k(null);return x.call(arguments,(function(e){v(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)})),t},O=function(e){return"function"==typeof e},A=T;C=a.exports=function(e,t){var n,r,a,i,o;return arguments.length<2||"string"!=typeof e?(i=t,t=e,e=null):i=arguments[2],null==e?(n=a=!0,r=!1):(n=A.call(e,"c"),r=A.call(e,"e"),a=A.call(e,"w")),o={value:t,configurable:n,enumerable:r,writable:a},i?_(z(i),o):o},C.gs=function(e,t,n){var r,a,i,o;return"string"!=typeof e?(i=n,n=t,t=e,e=null):i=arguments[3],null==t?t=void 0:O(t)?null==n?n=void 0:O(n)||(i=n,n=void 0):(i=t,t=n=void 0),null==e?(r=!0,a=!1):(r=A.call(e,"c"),a=A.call(e,"e")),o={get:t,set:n,configurable:r,enumerable:a},i?_(z(i),o):o};var E=a.exports,j=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e};!function(e,t){var n,r,a,i,o,s,l,d=E,p=j,c=Function.prototype.apply,u=Function.prototype.call,m=Object.create,h=Object.defineProperty,g=Object.defineProperties,f=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n;return p(t),f.call(this,"__ee__")?n=this.__ee__:(n=y.value=m(null),h(this,"__ee__",y),y.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},r=function(e,t){var r,i;return p(t),i=this,n.call(this,e,r=function(){a.call(i,e,r),c.call(t,this,arguments)}),r.__eeOnceListener__=t,this},a=function(e,t){var n,r,a,i;if(p(t),!f.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(i=0;a=r[i];++i)a!==t&&a.__eeOnceListener__!==t||(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},i=function(e){var t,n,r,a,i;if(f.call(this,"__ee__")&&(a=this.__ee__[e]))if("object"==typeof a){for(n=arguments.length,i=new Array(n-1),t=1;t{e(a)})))})),Promise.all(n)}triggerSync(){var e=arguments,t=this.context,n=[];return this.hooks.forEach((function(r){var a=r.apply(t,e);n.push(a)})),n}list(){return this.hooks}clear(){return this.hooks=[]}}function P(e){if(!e)return;let t;if(void 0!==e.getBoundingClientRect)t=e.getBoundingClientRect();else{let n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}return t}function q(e){if(!e)return;let t;if(void 0!==e.getClientRects)t=e.getClientRects();else{let n=document.createRange();n.selectNode(e),t=n.getClientRects()}return t}function M(){var e=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))}function I(e,t){for(var n=0;n=1&&t<=31||127==t||0==a&&t>=48&&t<=57||1==a&&t>=48&&t<=57&&45==o?i+="\\"+t.toString(16)+" ":0!=a||1!=r||45!=t?46!=t||"#"!=n.charAt(0)?i+=t>=128||45==t||95==t||35==t||46==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?n.charAt(a):"\\"+n.charAt(a):i+="\\.":i+="\\"+n.charAt(a):i+="�";return i}function R(){this.resolve=null,this.reject=null,this.id=M(),this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),Object.freeze(this)}const N="undefined"!=typeof window&&("requestIdleCallback"in window?window.requestIdleCallback:window.requestAnimationFrame);function G(e){return e.value+(e.unit||"")}function F(e){return e&&1===e.nodeType}function V(e){return e&&3===e.nodeType}function*U(e,t){let n=e;for(;n;)if(yield n,n.childNodes.length)n=n.firstChild;else if(n.nextSibling){if(t&&n===t){n=void 0;break}n=n.nextSibling}else for(;n;){if(n=n.parentNode,t&&n===t){n=void 0;break}if(n&&n.nextSibling){n=n.nextSibling;break}}}function H(e,t){if(t&&e===t)return;let n=he(e);if(n)return n;if(e.parentNode)for(;e=e.parentNode;){if(t&&e===t)return;if(n=he(e),n)return n}}function $(e,t){if(t&&e===t)return;let n=pe(e);if(n)return n;if(e.parentNode)for(;e=e.parentNode;){if(t&&e===t)return;if(n=pe(e),n)return n}}function Y(e,t){let n=H(e,t);for(;n&&1!==n.nodeType;)n=H(n,t);return n}function K(e,t){let n=$(e,t);for(;n&&1!==n.nodeType;)n=$(n,t);return n}function Z(e,t){let n=Y(e,t);for(;n&&n.dataset.undisplayed;)n=Y(n,t);return n}function Q(e,t){let n=K(e,t);for(;n&&n.dataset.undisplayed;)n=K(n,t);return n}function J(e){let t,n,r=[],a=[],i=document.createDocumentFragment();if("TR"===e.nodeName){let t=e.previousElementSibling,n=1;for(;t;){if(t.childElementCount>e.childElementCount){const r=Array.from(e.children);for(;e.firstChild;)e.firstChild.remove();let a=0;for(let i=0;in){const t=o.cloneNode(!0);t.rowSpan=o.rowSpan-n,e.appendChild(t)}else{const t=r[a++];t&&e.appendChild(t)}}}t=t.previousElementSibling,n++}}let o=e;for(;o.parentNode&&1===o.parentNode.nodeType;)r.unshift(o.parentNode),o=o.parentNode;for(var s=0;s=this.maxChars){this.hooks&&this.hooks.layout.trigger(e,this);let n=e.querySelectorAll("img");if(n.length&&await this.waitForImages(n),l=this.findBreakToken(e,t,r,m),l&&(u=0,this.rebuildTableFromBreakToken(l,e)),l&&l.equals(m)){console.warn("Unable to layout item: ",a);let t=l.node&&H(l.node);if(!t)return this.hooks&&this.hooks.beforeRenderResult.trigger(void 0,e,this),new ye(void 0,new be("Unable to layout item",[a]));l=new fe(t)}}}return this.hooks&&this.hooks.beforeRenderResult.trigger(l,e,this),new ye(l)}breakAt(e,t=0){let n=new fe(e,t);return this.hooks.onBreakToken.triggerSync(n,void 0,e,this).forEach((e=>{void 0!==e&&(n=e)})),n}shouldBreak(e,t){let n,r=$(e,t),a=e.parentNode;return X(e)&&a&&!r&&X(a)&&(n=e.dataset.breakBefore===a.dataset.breakBefore),!n&&X(e)||function(e){return void 0!==e&&void 0!==e.dataset&&void 0!==e.dataset.previousBreakAfter&&("always"===e.dataset.previousBreakAfter||"page"===e.dataset.previousBreakAfter||"left"===e.dataset.previousBreakAfter||"right"===e.dataset.previousBreakAfter||"recto"===e.dataset.previousBreakAfter||"verso"===e.dataset.previousBreakAfter)}(e)||ee(e,r)}forceBreak(){this.forceRenderBreak=!0}getStart(e,t){let n,r=t&&t.node;return n=r||e.firstChild,n}append(e,t,n,r=!0,a=!0){let i=function(e,t=!1){return e.cloneNode(t)}(e,!r);if(e.parentNode&&F(e.parentNode)){let r=re(e.parentNode,t);if(r)r.appendChild(i);else if(a){let a=J(e);r=re(e.parentNode,a),r?n&&V(n.node)&&n.offset>0?(i.textContent=i.textContent.substring(n.offset),r.appendChild(i)):r.appendChild(i):t.appendChild(i),t.appendChild(a)}else t.appendChild(i)}else t.appendChild(i);return i.dataset&&i.dataset.ref&&(t.indexOfRefs||(t.indexOfRefs={}),t.indexOfRefs[i.dataset.ref]=i),this.hooks.renderNode.triggerSync(i,e,this).forEach((e=>{void 0!==e&&(i=e)})),i}rebuildTableFromBreakToken(e,t){if(!e||!e.node)return;let n=e.node,r=F(n)?n.closest("td"):n.parentElement.closest("td");if(r){if(!re(r,t,!0))return;for(;r=r.nextElementSibling;)this.append(r,t,null,!0)}}async waitForImages(e){let t=Array.from(e).map((async e=>this.awaitImageLoaded(e)));await Promise.all(t)}async awaitImageLoaded(e){return new Promise((t=>{if(!0!==e.complete)e.onload=function(){let{width:n,height:r}=window.getComputedStyle(e);t(n,r)},e.onerror=function(n){let{width:r,height:a}=window.getComputedStyle(e);t(r,a,n)};else{let{width:n,height:r}=window.getComputedStyle(e);t(n,r)}}))}avoidBreakInside(e,t){let n;if(e!==t){for(;e.parentNode&&(e=e.parentNode)!==t;)if("avoid"===window.getComputedStyle(e)["break-inside"]){n=e;break}return n}}createBreakToken(e,t,n){let r,a,i,o,s,l=e.startContainer,d=e.startOffset;if(F(l))if(s=oe(l,d),F(s))if(a=re(s,t),a)r=re(a,n),d=0;else{let e=ie(s);if(F(e)||(e=e.parentElement),a=re(e,t),!s.nextSibling){const e=re(a,n);if(!re(document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT).lastChild(),t))return}r=re(a,n).nextSibling,d=0}else a=re(l,t),a||(a=re(ie(l),t)),i=re(a,n),o=le(s,i),0===o?(r=i,d=0):(r=oe(i,o),d=0);else{if(a=re(l.parentNode,t),a||(a=re(ie(l.parentNode),t)),i=re(a,n),o=le(l,i),-1===o)return;r=oe(i,o),d+=r.textContent.indexOf(l.textContent)}if(r)return new fe(r,d)}findBreakToken(e,t,n=this.bounds,r,a=!0){let i,o,s=this.findOverflow(e,n);if(this.hooks.onOverflow.triggerSync(s,e,n,this).forEach((e=>{void 0!==e&&(s=e)})),s){if(i=this.createBreakToken(s,e,t),this.hooks.onBreakToken.triggerSync(i,s,e,this).forEach((e=>{void 0!==e&&(i=e)})),i&&i.equals(r))return i;if(o=i&&i.node&&i.offset&&i.node.textContent?i.node.textContent.charAt(i.offset):void 0,i&&i.node&&a){let t=this.removeOverflow(s,o);this.hooks&&this.hooks.afterOverflowRemoved.trigger(t,e,this)}}return i}hasOverflow(e,t=this.bounds){let n=e&&e.parentNode,{width:r,height:a}=e.getBoundingClientRect(),i=n?n.scrollWidth:0,o=n?n.scrollHeight:0;return Math.max(Math.floor(r),i)>Math.round(t.width)||Math.max(Math.floor(a),o)>Math.round(t.height)}findOverflow(e,t=this.bounds,n=this.gap){if(!this.hasOverflow(e,t))return;let r,a,i,o,s,l,d,p,c,u=Math.floor(t.left),m=Math.round(t.right+n),h=Math.round(t.top),g=Math.round(t.bottom),f=U(e.firstChild,e);for(;!i;)if(a=f.next(),i=a.done,o=a.value,l=!1,d=!1,p=void 0,c=void 0,o){let t=P(o),n=Math.round(t.left),i=Math.floor(t.right),b=Math.round(t.top),S=Math.floor(t.bottom);if(!r&&(n>=m||b>=g)){let t=!1;const n=me(o,"TD",e);if(n&&"avoid"===window.getComputedStyle(n)["break-inside"])p=n.parentElement;else if(F(o)){let n=window.getComputedStyle(o);t="none"!==n.getPropertyValue("float"),l="avoid"===n.getPropertyValue("break-inside"),d="avoid"===o.dataset.breakBefore||"avoid"===o.dataset.previousBreakAfter,p=d&&$(o,e),c="BR"===o.tagName||"WBR"===o.tagName}let a;if(a="TR"===o.nodeName?o:me(o,"TR",e),a){let t=a.parentElement;if(["TBODY","THEAD"].includes(t.nodeName)){"avoid"===window.getComputedStyle(t).getPropertyValue("break-inside")&&(p=t)}const n=me(a,"TABLE",e),r=n.querySelector("[colspan]");if(n&&r){let e=0;for(const t of Array.from(n.rows[0].cells))e+=parseInt(t.getAttribute("colspan")||"1");if(a.cells.length!==e){let t,n=a.previousElementSibling;for(;null!==n;){t=0;for(const e of Array.from(n.cells))t+=parseInt(e.getAttribute("colspan")||"1");if(t===e)break;n=n.previousElementSibling}t===e&&(p=n)}}}if(p){r=document.createRange(),r.selectNode(p);break}if(!c&&!t&&F(o)){r=document.createRange(),r.selectNode(o);break}if(V(o)&&o.textContent.trim().length){r=document.createRange(),r.selectNode(o);break}}if(!r&&V(o)&&o.textContent.trim().length&&!ue(o.parentNode)){let e,t=q(o);n=0,b=0;for(var y=0;y!=t.length;y++)e=t[y],e.width>0&&(!n||e.left>n)&&(n=e.left),e.height>0&&(!b||e.top>b)&&(b=e.top);if(n>=m||b>=g){r=document.createRange(),s=this.textBreak(o,u,m,h,g),s?r.setStart(o,s):r=void 0;break}}(l||i<=m&&S<=g)&&(a=H(o,e),a&&(f=U(a,e)))}return r?(r.setEndAfter(e.lastChild),r):void 0}findEndToken(e,t){if(0===e.childNodes.length)return;let n,r=e.lastChild;for(;r&&r.lastChild;)if(ae(r)){if(!ae(r.lastChild)){r=ie(r.lastChild);break}r=r.lastChild}else r=r.previousSibling;V(r)&&(r.parentNode.dataset.ref?(n=function(e){let t=e.parentNode;return t?Array.prototype.indexOf.call(t.childNodes,e):0}(r),r=r.parentNode):r=r.previousSibling);let a=re(r,t);n&&(a=a.childNodes[n]);let i=H(a);return this.breakAt(i)}textBreak(e,t,n,r,a){let i,o,s,l,d,p=function*(e){let t,n,r=e.nodeValue,a=r.length,i=0;const o=e.parentElement&&"PRE"===e.parentElement.nodeName;for(;i=n||m>=a){d=i.startOffset;break}if(u>n||h>a){let e,t,r,o=te(i);for(;!r&&(t=o.next(),e=t.value,r=t.done,e);)if(l=P(e),c=Math.floor(l.left),m=Math.floor(l.top),c>=n||m>=a){d=e.startOffset,s=!0;break}}}return d}removeOverflow(e,t){let{startContainer:n}=e,r=e.extractContents();return this.hyphenateAtBreak(n,t),r}hyphenateAtBreak(e,t){if(V(e)){let n=e.textContent,r=n[n.length-1];(t&&/^\w|\u00AD$/.test(r)&&/^\w|\u00AD$/.test(t)||!t&&/^\w|\u00AD$/.test(r))&&(e.parentNode.classList.add("pagedjs_hyphen"),e.textContent+=this.settings.hyphenGlyph||"‑")}}equalTokens(e,t){return!(!e||!t)&&((!e.node||!t.node||e.node===t.node)&&(!e.offset||!t.offset||e.offset===t.offset))}}L(Se.prototype);class ve{constructor(e,t,n,r,a){this.pagesArea=e,this.pageTemplate=t,this.blank=n,this.width=void 0,this.height=void 0,this.hooks=r,this.settings=a||{}}create(e,t){let n,r,a=document.importNode(this.pageTemplate.content,!0);t?(this.pagesArea.insertBefore(a,t.nextElementSibling),r=Array.prototype.indexOf.call(this.pagesArea.children,t.nextElementSibling),n=this.pagesArea.children[r]):(this.pagesArea.appendChild(a),n=this.pagesArea.lastChild);let i=n.querySelector(".pagedjs_pagebox"),o=n.querySelector(".pagedjs_page_content"),s=n.querySelector(".pagedjs_footnote_area"),l=o.getBoundingClientRect();return o.style.columnWidth=Math.round(l.width)+"px",o.style.columnGap="calc(var(--pagedjs-margin-right) + var(--pagedjs-margin-left) + var(--pagedjs-bleed-right) + var(--pagedjs-bleed-left) + var(--pagedjs-column-gap-offset))",this.width=Math.round(l.width),this.height=Math.round(l.height),this.element=n,this.pagebox=i,this.area=o,this.footnotesArea=s,n}createWrapper(){let e=document.createElement("div");return this.area.appendChild(e),this.wrapper=e,e}index(e){this.position=e;let t=this.element,n=e+1,r=`page-${n}`;this.id=r,t.dataset.pageNumber=n,t.setAttribute("id",r),this.name&&t.classList.add("pagedjs_"+this.name+"_page"),this.blank&&t.classList.add("pagedjs_blank_page"),0===e&&t.classList.add("pagedjs_first_page"),e%2!=1?(t.classList.remove("pagedjs_left_page"),t.classList.add("pagedjs_right_page")):(t.classList.remove("pagedjs_right_page"),t.classList.add("pagedjs_left_page"))}async layout(e,t,n){this.clear(),this.startToken=t;let r=this.settings;!r.maxChars&&n&&(r.maxChars=n),this.layoutMethod=new Se(this.area,this.hooks,r);let a=(await this.layoutMethod.renderTo(this.wrapper,e,t)).breakToken;return this.addListeners(e),this.endToken=a,a}async append(e,t){if(!this.layoutMethod)return this.layout(e,t);let n=(await this.layoutMethod.renderTo(this.wrapper,e,t)).breakToken;return this.endToken=n,n}getByParent(e,t){let n;for(var r=0;r{this.listening&&requestAnimationFrame((()=>{for(let a of r){const r=a.contentRect;r.height>n?(this.checkOverflowAfterResize(e),n=t.getBoundingClientRect().height):r.height{this._q.length?this.dequeue().then(function(){this.run()}.bind(this)):(this.defered.resolve(),this.running=void 0)})),1==this.paused&&(this.paused=!1),this.defered.promise}flush(){return this.running?this.running:this._q.length?(this.running=this.dequeue().then(function(){return this.running=void 0,this.flush()}.bind(this)),this.running):void 0}clear(){this._q=[]}length(){return this._q.length}pause(){this.paused=!0}stop(){this._q=[],this.running=!1,this.paused=!0}}class we{constructor(e,t,n){this.settings=n||{},this.hooks={},this.hooks.beforeParsed=new B(this),this.hooks.filter=new B(this),this.hooks.afterParsed=new B(this),this.hooks.beforePageLayout=new B(this),this.hooks.onPageLayout=new B(this),this.hooks.layout=new B(this),this.hooks.renderNode=new B(this),this.hooks.layoutNode=new B(this),this.hooks.onOverflow=new B(this),this.hooks.afterOverflowRemoved=new B(this),this.hooks.onBreakToken=new B,this.hooks.beforeRenderResult=new B(this),this.hooks.afterPageLayout=new B(this),this.hooks.finalizePage=new B(this),this.hooks.afterRendered=new B(this),this.pages=[],this.total=0,this.q=new ke(this),this.stopped=!1,this.rendered=!1,this.content=e,this.charsPerBreak=[],this.maxChars,e&&this.flow(e,t)}setup(e){this.pagesArea=document.createElement("div"),this.pagesArea.classList.add("pagedjs_pages"),e?e.appendChild(this.pagesArea):document.querySelector("body").appendChild(this.pagesArea),this.pageTemplate=document.createElement("template"),this.pageTemplate.innerHTML='\n
          \n\t
          \n\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t
          \n\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t\t\t
          \n\t\t\t
          \t\t
          \n\t\t
          \n\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t\t\t
          \n\t\t\t
          \t\t
          \n\t\t
          \n\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t
          \n\t\t
          \n\t\t\t
          \n\t\t\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t\t\t
          \n\t\t\t\t
          \n\t\t\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t\t\t
          \n\t\t\t\t
          \n\t\t\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t\t\t
          \n\t\t\t\t
          \n\t\t\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t\t\t
          \n\t\t\t\t
          \n\t\t\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t\t\t
          \n\t\t\t
          \n\t\t\t
          \n\t\t\t\t
          \n\t\t\t\t
          \n\t\t\t\t\t
          \n\t\t\t\t\t\t
          \n\t\t\t\t\t
          \n\t\t\t\t
          \n\t\t\t
          \n\t\t
          \n\t
          \n
          '}async flow(e,t){let n;await this.hooks.beforeParsed.trigger(e,this),n=new xe(e),this.hooks.filter.triggerSync(n),this.source=n,this.breakToken=void 0,this.pagesArea&&this.pageTemplate?(this.q.clear(),this.removePages()):this.setup(t),this.emit("rendering",n),await this.hooks.afterParsed.trigger(n,this),await this.loadFonts();let r=await this.render(n,this.breakToken);for(;r.canceled;)this.start(),r=await this.render(n,this.breakToken);return this.rendered=!0,this.pagesArea.style.setProperty("--pagedjs-page-count",this.total),await this.hooks.afterRendered.trigger(this.pages,this),this.emit("rendered",this.pages),this}async render(e,t){let n,r=this.layout(e,t),a=!1;for(;!a;)n=await this.q.enqueue((()=>this.renderAsync(r))),a=n.done;return n}start(){this.rendered=!1,this.stopped=!1}stop(){this.stopped=!0}renderOnIdle(e){return new Promise((t=>{N((async()=>{if(this.stopped)return t({done:!0,canceled:!0});let n=await e.next();this.stopped?t({done:!0,canceled:!0}):t(n)}))}))}async renderAsync(e){if(this.stopped)return{done:!0,canceled:!0};let t=await e.next();return this.stopped?{done:!0,canceled:!0}:t}async handleBreaks(e,t){let n,r,a,i=this.total+1,o=i%2==0?"left":"right",s=i%2==0?"verso":"recto";1!==i&&(e&&void 0!==e.dataset&&void 0!==e.dataset.previousBreakAfter&&(n=e.dataset.previousBreakAfter),e&&void 0!==e.dataset&&void 0!==e.dataset.breakBefore&&(r=e.dataset.breakBefore),t?a=this.addPage(!0):(!n||"left"!==n&&"right"!==n||n===o)&&(!n||"verso"!==n&&"recto"!==n||n===s)&&(!r||"left"!==r&&"right"!==r||r===o)&&(!r||"verso"!==r&&"recto"!==r||r===s)||(a=this.addPage(!0)),a&&(await this.hooks.beforePageLayout.trigger(a,void 0,void 0,this),this.emit("page",a),await this.hooks.afterPageLayout.trigger(a.element,a,void 0,this),await this.hooks.finalizePage.trigger(a.element,a,void 0,this),this.emit("renderedPage",a)))}async*layout(e,t){let n=t||!1,r=[];for(;void 0!==n;){n&&n.node?await this.handleBreaks(n.node):await this.handleBreaks(e.firstChild);let t=this.addPage();if(await this.hooks.beforePageLayout.trigger(t,e,n,this),this.emit("page",t),n=await t.layout(e,n,this.maxChars),n){let e=n.toJSON(!0);if(r.lastIndexOf(e)>-1){let e=new be("Layout repeated",[n.node]);return console.error("Layout repeated at: ",n.node),e}r.push(e)}await this.hooks.afterPageLayout.trigger(t.element,t,n,this),await this.hooks.finalizePage.trigger(t.element,t,void 0,this),this.emit("renderedPage",t),this.recoredCharLength(t.wrapper.textContent.length),yield n}}recoredCharLength(e){0!==e&&(this.charsPerBreak.push(e),this.charsPerBreak.length>4&&this.charsPerBreak.shift(),this.maxChars=this.charsPerBreak.reduce(((e,t)=>e+t),0)/this.charsPerBreak.length)}removePages(e=0){if(!(e>=this.pages.length)){for(let t=e;t0?this.pages.splice(e):this.pages=[],this.total=this.pages.length}}addPage(e){let t=this.pages[this.pages.length-1],n=new ve(this.pagesArea,this.pageTemplate,e,this.hooks,this.settings);return this.pages.push(n),n.create(void 0,t&&t.element),n.index(this.total),e||(n.onOverflow((e=>{if(console.warn("overflow on",n.id,e),this.rendered)return;let t=this.pages.indexOf(n)+1;this.stop(),this.breakToken=e,this.removePages(t),!0===this.rendered&&(this.rendered=!1,this.q.enqueue((async()=>{this.start(),await this.render(this.source,this.breakToken),this.rendered=!0})))})),n.onUnderflow((e=>{}))),this.total=this.pages.length,n}async clonePage(e){let t=this.pages[this.pages.length-1],n=new ve(this.pagesArea,this.pageTemplate,!1,this.hooks);this.pages.push(n),n.create(void 0,t&&t.element),n.index(this.total),await this.hooks.beforePageLayout.trigger(n,void 0,void 0,this),this.emit("page",n);for(const t of e.element.classList)"pagedjs_left_page"!==t&&"pagedjs_right_page"!==t&&n.element.classList.add(t);await this.hooks.afterPageLayout.trigger(n.element,n,void 0,this),await this.hooks.finalizePage.trigger(n.element,n,void 0,this),this.emit("renderedPage",n)}loadFonts(){let e=[];return(document.fonts||[]).forEach((t=>{if("loaded"!==t.status){let n=t.load().then((e=>t.family),(e=>(console.warn("Failed to preload font-family:",t.family),t.family)));e.push(n)}})),Promise.all(e).catch((e=>{console.warn(e)}))}destroy(){this.pagesArea.remove(),this.pageTemplate.remove()}}L(we.prototype);var Ce={exports:{}},Te={};function _e(e){return{prev:null,next:null,data:e}}function ze(e,t,n){var r;return null!==Ae?(r=Ae,Ae=Ae.cursor,r.prev=t,r.next=n,r.cursor=e.cursor):r={prev:t,next:n,cursor:e.cursor},e.cursor=r,r}function Oe(e){var t=e.cursor;e.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=Ae,Ae=t}var Ae=null,Ee=function(){this.cursor=null,this.head=null,this.tail=null};Ee.createItem=_e,Ee.prototype.createItem=_e,Ee.prototype.updateCursors=function(e,t,n,r){for(var a=this.cursor;null!==a;)a.prev===e&&(a.prev=t),a.next===n&&(a.next=r),a=a.cursor},Ee.prototype.getSize=function(){for(var e=0,t=this.head;t;)e++,t=t.next;return e},Ee.prototype.fromArray=function(e){var t=null;this.head=null;for(var n=0;nBe&&(d=i-Pe+3,i=Pe-2);for(var p=o;p<=s;p++)p>=0&&p0&&r[p].length>d?"…":"")+r[p].substr(d,Be-2)+(r[p].length>d+Be-1?"…":""));return[n(o,a),new Array(i+l+2).join("-")+"^",n(a,s)].filter(Boolean).join("\n")}var Ie=function(e,t,n,r,a){var i=Le("SyntaxError",e);return i.source=t,i.offset=n,i.line=r,i.column=a,i.sourceFragment=function(e){return Me(i,isNaN(e)?0:e)},Object.defineProperty(i,"formattedMessage",{get:function(){return"Parse error: "+i.message+"\n"+Me(i,2)}}),i.parseError={offset:n,line:r,column:a},i},De={EOF:0,Ident:1,Function:2,AtKeyword:3,Hash:4,String:5,BadString:6,Url:7,BadUrl:8,Delim:9,Number:10,Percentage:11,Dimension:12,WhiteSpace:13,CDO:14,CDC:15,Colon:16,Semicolon:17,Comma:18,LeftSquareBracket:19,RightSquareBracket:20,LeftParenthesis:21,RightParenthesis:22,LeftCurlyBracket:23,RightCurlyBracket:24,Comment:25},Re=Object.keys(De).reduce((function(e,t){return e[De[t]]=t,e}),{}),Ne={TYPE:De,NAME:Re},Ge=0;function Fe(e){return e>=48&&e<=57}function Ve(e){return e>=65&&e<=90}function Ue(e){return e>=97&&e<=122}function He(e){return Ve(e)||Ue(e)}function $e(e){return e>=128}function Ye(e){return He(e)||$e(e)||95===e}function Ke(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function Ze(e){return 10===e||13===e||12===e}function Qe(e){return Ze(e)||32===e||9===e}function Je(e,t){return 92===e&&(!Ze(t)&&t!==Ge)}var Xe=new Array(128);tt.Eof=128,tt.WhiteSpace=130,tt.Digit=131,tt.NameStart=132,tt.NonPrintable=133;for(var et=0;et=65&&e<=70||e>=97&&e<=102},isUppercaseLetter:Ve,isLowercaseLetter:Ue,isLetter:He,isNonAscii:$e,isNameStart:Ye,isName:function(e){return Ye(e)||Fe(e)||45===e},isNonPrintable:Ke,isNewline:Ze,isWhiteSpace:Qe,isValidEscape:Je,isIdentifierStart:function(e,t,n){return 45===e?Ye(t)||45===t||Je(t,n):!!Ye(e)||92===e&&Je(e,t)},isNumberStart:function(e,t,n){return 43===e||45===e?Fe(t)?2:46===t&&Fe(n)?3:0:46===e?Fe(t)?2:0:Fe(e)?1:0},isBOM:function(e){return 65279===e||65534===e?1:0},charCodeCategory:tt},rt=nt.isDigit,at=nt.isHexDigit,it=nt.isUppercaseLetter,ot=nt.isName,st=nt.isWhiteSpace,lt=nt.isValidEscape;function dt(e,t){return te.length)return!1;for(var a=t;a=0&&st(e.charCodeAt(t));t--);return t+1},findWhiteSpaceEnd:function(e,t){for(;t>kt:bt},lookupOffset:function(e){return(e+=this.tokenIndex)0?e>kt,this.source,a)){case 1:break e;case 2:r++;break e;default:this.balance[n]===r&&(r=n),a=this.offsetAndType[r]&xt}return r-this.tokenIndex},isBalanceEdge:function(e){return this.balance[this.tokenIndex]>kt===St;e++,t++);t>0&&this.skip(t)},skipSC:function(){for(;this.tokenType===St||this.tokenType===vt;)this.next()},skip:function(e){var t=this.tokenIndex+e;t>kt,this.tokenEnd=t&xt):(this.tokenIndex=this.tokenCount,this.next())},next:function(){var e=this.tokenIndex+1;e>kt,this.tokenEnd=e&xt):(this.tokenIndex=this.tokenCount,this.eof=!0,this.tokenType=bt,this.tokenStart=this.tokenEnd=this.source.length)},forEachToken(e){for(var t=0,n=this.firstCharOffset;t>kt,r,i,t)}},dump(){var e=new Array(this.tokenCount);return this.forEachToken(((t,n,r,a)=>{e[a]={idx:a,type:ft[t],chunk:this.source.substring(n,r),balance:this.balance[a]}})),e}};var Ct=wt;function Tt(e){return e}function _t(e,t,n,r){var a,i;switch(e.type){case"Group":a=function(e,t,n,r){var a=" "===e.combinator||r?e.combinator:" "+e.combinator+" ",i=e.terms.map((function(e){return _t(e,t,n,r)})).join(a);return(e.explicit||n)&&(i=(r||","===i[0]?"[":"[ ")+i+(r?"]":" ]")),i}(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return _t(e.term,t,n,r)+t(0===(i=e).min&&0===i.max?"*":0===i.min&&1===i.max?"?":1===i.min&&0===i.max?i.comma?"#":"+":1===i.min&&1===i.max?"":(i.comma?"#":"")+(i.min===i.max?"{"+i.min+"}":"{"+i.min+","+(0!==i.max?i.max:"")+"}"),e);case"Type":a="<"+e.name+(e.opts?t(function(e){if("Range"===e.type)return" ["+(null===e.min?"-∞":e.min)+","+(null===e.max?"∞":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}(e.opts),e.opts):"")+">";break;case"Property":a="<'"+e.name+"'>";break;case"Keyword":a=e.name;break;case"AtKeyword":a="@"+e.name;break;case"Function":a=e.name+"(";break;case"String":case"Token":a=e.value;break;case"Comma":a=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(a,e)}var zt=function(e,t){var n=Tt,r=!1,a=!1;return"function"==typeof t?n=t:t&&(r=Boolean(t.forceBraces),a=Boolean(t.compact),"function"==typeof t.decorate&&(n=t.decorate)),_t(e,n,r,a)};const Ot=We,At=zt,Et={offset:0,line:1,column:1};function jt(e,t){const n=e&&e.loc&&e.loc[t];return n?"line"in n?Wt(n):n:null}function Wt({offset:e,line:t,column:n},r){const a={offset:e,line:t,column:n};if(r){const e=r.split(/\n|\r\n?|\f/);a.offset+=r.length,a.line+=e.length-1,a.column=1===e.length?a.column+r.length:e.pop().length+1}return a}var Lt=function(e,t){const n=Ot("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},Bt=function(e,t,n,r){const a=Ot("SyntaxMatchError",e),{css:i,mismatchOffset:o,mismatchLength:s,start:l,end:d}=function(e,t){const n=e.tokens,r=e.longestMatch,a=r1?(o=jt(i||t,"end")||Wt(Et,c),s=Wt(o)):(o=jt(i,"start")||Wt(jt(t,"start")||Et,c.slice(0,l)),s=jt(i,"end")||Wt(o,c.substr(l,d))),{css:c,mismatchOffset:l,mismatchLength:d,start:o,end:s}}(r,n);return a.rawMessage=e,a.syntax=t?At(t):"",a.css=i,a.mismatchOffset=o,a.mismatchLength=s,a.message=e+"\n syntax: "+a.syntax+"\n value: "+(i||"")+"\n --------"+new Array(a.mismatchOffset+1).join("-")+"^",Object.assign(a,l),a.loc={source:n&&n.loc&&n.loc.source||"",start:l,end:d},a},Pt=Object.prototype.hasOwnProperty,qt=Object.create(null),Mt=Object.create(null),It=45;function Dt(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===It&&e.charCodeAt(t+1)===It}function Rt(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===It&&e.charCodeAt(t+1)!==It){var n=e.indexOf("-",t+2);if(-1!==n)return e.substring(t,n+1)}return""}var Nt={keyword:function(e){if(Pt.call(qt,e))return qt[e];var t=e.toLowerCase();if(Pt.call(qt,t))return qt[e]=qt[t];var n=Dt(t,0),r=n?"":Rt(t,0);return qt[e]=Object.freeze({basename:t.substr(r.length),name:t,vendor:r,prefix:r,custom:n})},property:function(e){if(Pt.call(Mt,e))return Mt[e];var t=e,n=e[0];"/"===n?n="/"===e[1]?"//":"/":"_"!==n&&"*"!==n&&"$"!==n&&"#"!==n&&"+"!==n&&"&"!==n&&(n="");var r=Dt(t,n.length);if(!r&&(t=t.toLowerCase(),Pt.call(Mt,t)))return Mt[e]=Mt[t];var a=r?"":Rt(t,n.length),i=t.substr(0,n.length+a.length);return Mt[e]=Object.freeze({basename:t.substr(i.length),name:t.substr(n.length),hack:n,vendor:a,prefix:i,custom:r})},isCustomProperty:Dt,vendorPrefix:Rt},Gt="undefined"!=typeof Uint32Array?Uint32Array:Array,Ft=function(e,t){return null===e||e.length=e.length?void(c>un,l[d]=h,l[h++]=d;h0?6:0;if(!jn(i))return 0;if(++a>6)return 0}return a}function Fn(e,t,n){if(!e)return 0;for(;Rn(n(t),Dn);){if(++e>6)return 0;t++}return t}var Vn=hn,Un=Vn.isIdentifierStart,Hn=Vn.isHexDigit,$n=Vn.isDigit,Yn=Vn.cmpStr,Kn=Vn.consumeNumber,Zn=Vn.TYPE,Qn=function(e,t){var n=0;if(!e)return 0;if(e.type===kn)return An(e,0,false,n);if(e.type===xn&&e.value.charCodeAt(0)===Tn){if(!fn(e.value,1,110))return 0;switch(e.value.length){case 2:return En(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==Tn?0:(n=On(t(++n),n,t),An(e=t(n),0,_n,n));default:return e.value.charCodeAt(2)!==Tn?0:An(e,3,_n,n)}}else if(e.type===xn||zn(e,Cn)&&t(n+1).type===xn){if(e.type!==xn&&(e=t(++n)),null===e||!fn(e.value,0,110))return 0;switch(e.value.length){case 1:return En(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==Tn?0:(n=On(t(++n),n,t),An(e=t(n),0,_n,n));default:return e.value.charCodeAt(1)!==Tn?0:An(e,2,_n,n)}}else if(e.type===wn){for(var r=e.value.charCodeAt(0),a=r===Cn||r===Tn?1:0,i=a;ie.max)return!0}return!1}function or(e,t){var n=e.index,r=0;do{if(r++,e.balance<=n)break}while(e=t(r));return r}function sr(e){return function(t,n,r){return null===t?0:t.type===Zn.Function&&rr(t.value,er)?or(t,n):e(t,n,r)}}function lr(e){return function(t){return null===t||t.type!==e?0:1}}function dr(e){return function(t,n,r){if(null===t||t.type!==Zn.Dimension)return 0;var a=Kn(t.value,0);if(null!==e){var i=t.value.indexOf("\\",a),o=-1!==i&&ar(t.value,i)?t.value.substring(a,i):t.value.substr(a);if(!1===e.hasOwnProperty(o.toLowerCase()))return 0}return ir(r,t.value,a)?0:1}}function pr(e){return"function"!=typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&t.type===Zn.Number&&0===Number(t.value)?1:e(t,n,r)}}var cr={"ident-token":lr(Zn.Ident),"function-token":lr(Zn.Function),"at-keyword-token":lr(Zn.AtKeyword),"hash-token":lr(Zn.Hash),"string-token":lr(Zn.String),"bad-string-token":lr(Zn.BadString),"url-token":lr(Zn.Url),"bad-url-token":lr(Zn.BadUrl),"delim-token":lr(Zn.Delim),"number-token":lr(Zn.Number),"percentage-token":lr(Zn.Percentage),"dimension-token":lr(Zn.Dimension),"whitespace-token":lr(Zn.WhiteSpace),"CDO-token":lr(Zn.CDO),"CDC-token":lr(Zn.CDC),"colon-token":lr(Zn.Colon),"semicolon-token":lr(Zn.Semicolon),"comma-token":lr(Zn.Comma),"[-token":lr(Zn.LeftSquareBracket),"]-token":lr(Zn.RightSquareBracket),"(-token":lr(Zn.LeftParenthesis),")-token":lr(Zn.RightParenthesis),"{-token":lr(Zn.LeftCurlyBracket),"}-token":lr(Zn.RightCurlyBracket),string:lr(Zn.String),ident:lr(Zn.Ident),"custom-ident":function(e){if(null===e||e.type!==Zn.Ident)return 0;var t=e.value.toLowerCase();return rr(t,Xn)||nr(t,"default")?0:1},"custom-property-name":function(e){return null===e||e.type!==Zn.Ident||45!==tr(e.value,0)||45!==tr(e.value,1)?0:1},"hex-color":function(e){if(null===e||e.type!==Zn.Hash)return 0;var t=e.value.length;if(4!==t&&5!==t&&7!==t&&9!==t)return 0;for(var n=1;ne.index||e.balancee.index||e.balance=128||0===Gr[n])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function Hr(e){for(var t=e.pos;t57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function $r(e){var t=e.str.indexOf("'",e.pos+1);return-1===t&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function Yr(e){var t,n=null;return e.eat(Ir),t=Hr(e),e.charCode()===Er?(e.pos++,e.charCode()!==Rr&&(n=Hr(e))):n=t,e.eat(Rr),{min:Number(t),max:n?Number(n):0}}function Kr(e,t){var n=function(e){var t=null,n=!1;switch(e.charCode()){case Or:e.pos++,t={min:0,max:0};break;case Ar:e.pos++,t={min:1,max:0};break;case Br:e.pos++,t={min:0,max:1};break;case wr:e.pos++,n=!0,t=e.charCode()===Ir?Yr(e):{min:1,max:0};break;case Ir:t=Yr(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}(e);return null!==n?(n.term=t,n):t}function Zr(e){var t=e.peek();return""===t?null:{type:"Token",value:t}}function Qr(e){var t,n=null;return e.eat(Wr),t=Ur(e),e.charCode()===_r&&e.nextCharCode()===zr&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===qr&&(Vr(e),n=function(e){var t=null,n=null,r=1;return e.eat(qr),e.charCode()===jr&&(e.peek(),r=-1),-1==r&&e.charCode()===Nr?e.peek():t=r*Number(Hr(e)),Vr(e),e.eat(Er),Vr(e),e.charCode()===Nr?e.peek():(r=1,e.charCode()===jr&&(e.peek(),r=-1),n=r*Number(Hr(e))),e.eat(Mr),null===t&&null===n?null:{type:"Range",min:t,max:n}}(e)),e.eat(Lr),Kr(e,{type:"Type",name:t,opts:n})}function Jr(e,t){function n(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}for(t=Object.keys(t).sort((function(e,t){return Fr[e]-Fr[t]}));t.length>0;){for(var r=t.shift(),a=0,i=0;a1&&(e.splice(i,a-i,n(e.slice(i,a),r)),a=i+1),i=-1))}-1!==i&&t.length&&e.splice(i,a-i,n(e.slice(i,a),r))}return r}function Xr(e){for(var t,n=[],r={},a=null,i=e.pos;t=ea(e);)"Spaces"!==t.type&&("Combinator"===t.type?(null!==a&&"Combinator"!==a.type||(e.pos=i,e.error("Unexpected combinator")),r[t.value]=!0):null!==a&&"Combinator"!==a.type&&(r[" "]=!0,n.push({type:"Combinator",value:" "})),n.push(t),a=t,i=e.pos);return null!==a&&"Combinator"===a.type&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:n,combinator:Jr(n,r)||" ",disallowEmpty:!1,explicit:!1}}function ea(e){var t=e.charCode();if(t<128&&1===Gr[t])return function(e){var t;return t=Ur(e),e.charCode()===_r?(e.pos++,{type:"Function",name:t}):Kr(e,{type:"Keyword",name:t})}(e);switch(t){case Mr:break;case qr:return Kr(e,function(e){var t;return e.eat(qr),t=Xr(e),e.eat(Mr),t.explicit=!0,e.charCode()===kr&&(e.pos++,t.disallowEmpty=!0),t}(e));case Wr:return e.nextCharCode()===Tr?function(e){var t;return e.eat(Wr),e.eat(Tr),t=Ur(e),e.eat(Tr),e.eat(Lr),Kr(e,{type:"Property",name:t})}(e):Qr(e);case Dr:return{type:"Combinator",value:e.substringToPos(e.nextCharCode()===Dr?e.pos+2:e.pos+1)};case Cr:return e.pos++,e.eat(Cr),{type:"Combinator",value:"&&"};case Er:return e.pos++,{type:"Comma"};case Tr:return Kr(e,{type:"String",value:$r(e)});case xr:case yr:case br:case vr:case Sr:return{type:"Spaces",value:Vr(e)};case Pr:return(t=e.nextCharCode())<128&&1===Gr[t]?(e.pos++,{type:"AtKeyword",name:Ur(e)}):Zr(e);case Or:case Ar:case Br:case wr:case kr:break;case Ir:if((t=e.nextCharCode())<48||t>57)return Zr(e);break;default:return Zr(e)}}function ta(e){var t=new fr(e),n=Xr(t);return t.pos!==e.length&&t.error("Unexpected input"),1===n.terms.length&&"Group"===n.terms[0].type&&(n=n.terms[0]),n}ta("[a&&#|<'c'>*||e() f{2} /,(% g#{1,2} h{2,})]!");var na=ta,ra=function(){};function aa(e){return"function"==typeof e?e:ra}var ia=function(e,t,n){var r=ra,a=ra;if("function"==typeof t?r=t:t&&(r=aa(t.enter),a=aa(t.leave)),r===ra&&a===ra)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function e(t){switch(r.call(n,t),t.type){case"Group":t.terms.forEach(e);break;case"Multiplier":e(t.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+t.type)}a.call(n,t)}(e)},oa=hn,sa=new Ct,la={decorator:function(e){var t=null,n={len:0,node:null},r=[n],a="";return{children:e.children,node:function(n){var r=t;t=n,e.node.call(this,n),t=r},chunk:function(e){a+=e,n.node!==t?r.push({len:e.length,node:t}):n.len+=e.length},result:function(){return da(a,r)}}}};function da(e,t){var n=[],r=0,a=0,i=t?t[a].node:null;for(oa(e,sa);!sa.eof;){if(t)for(;a2&&e.charCodeAt(e.length-2)===ha&&e.charCodeAt(e.length-1)===ga}function ba(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&ya(e.name)}function Sa(e,t,n){switch(e){case" ":for(var r=ca,a=t.length-1;a>=0;a--){r=fa(s=t[a],r,ua)}return r;case"|":r=ua;var i=null;for(a=t.length-1;a>=0;a--){if(ba(s=t[a])&&(null===i&&a>0&&ba(t[a-1])&&(r=fa({type:"Enum",map:i=Object.create(null)},ca,r)),null!==i)){var o=(ya(s.name)?s.name.slice(0,-1):s.name).toLowerCase();if(o in i==!1){i[o]=s;continue}}i=null,r=fa(s,ca,r)}return r;case"&&":if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};for(r=ua,a=t.length-1;a>=0;a--){var s=t[a];l=t.length>1?Sa(e,t.filter((function(e){return e!==s})),!1):ca,r=fa(s,l,r)}return r;case"||":if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};for(r=n?ca:ua,a=t.length-1;a>=0;a--){var l;s=t[a];l=t.length>1?Sa(e,t.filter((function(e){return e!==s})),!0):ca,r=fa(s,l,r)}return r}}function va(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":var t=Sa(e.combinator,e.terms.map(va),!1);return e.disallowEmpty&&(t=fa(t,ma,ua)),t;case"Multiplier":return function(e){var t=ca,n=va(e.term);if(0===e.max)n=fa(n,ma,ua),(t=fa(n,null,ua)).then=fa(ca,ca,t),e.comma&&(t.then.else=fa({type:"Comma",syntax:e},t,ua));else for(var r=e.min||1;r<=e.max;r++)e.comma&&t!==ca&&(t=fa({type:"Comma",syntax:e},t,ua)),t=fa(n,fa(ca,ca,t),ua);if(0===e.min)t=fa(ca,ca,t);else for(r=0;r=65&&r<=90&&(r|=32),r!==t.charCodeAt(n))return!1}return!0}function Ma(e){return null===e||(e.type===_a.Comma||e.type===_a.Function||e.type===_a.LeftParenthesis||e.type===_a.LeftSquareBracket||e.type===_a.LeftCurlyBracket||function(e){return e.type===_a.Delim&&"?"!==e.value}(e))}function Ia(e){return null===e||(e.type===_a.RightParenthesis||e.type===_a.RightSquareBracket||e.type===_a.RightCurlyBracket||e.type===_a.Delim)}function Da(e,t,n){function r(){do{y++,f=yb&&(b=y)}function d(){S=S.type===Aa?S.prev:{type:Ea,syntax:p.syntax,token:S.token,prev:S},p=p.prev}var p=null,c=null,u=null,m=null,h=0,g=null,f=null,y=-1,b=0,S={type:za,syntax:null,token:null,prev:null};for(r();null===g&&++hu.tokenIndex)&&(u=m,m=!1);else if(null===u){g=Wa;break}t=u.nextState,c=u.thenStack,p=u.syntaxStack,S=u.matchStack,y=u.tokenIndex,f=yy){for(;y":"<'"+t.name+"'>"));if(!1!==m&&null!==f&&"Type"===t.type)if("custom-ident"===t.name&&f.type===_a.Ident||"length"===t.name&&"0"===f.value){null===m&&(m=i(t,u)),t=Ca;break}p={syntax:t.syntax,opts:t.syntax.opts||null!==p&&p.opts||null,prev:p},S={type:Aa,syntax:t.syntax,token:S.token,prev:S},t=T.match;break;case"Keyword":var _=t.name;if(null!==f){var z=f.value;if(-1!==z.indexOf("\\")&&(z=z.replace(/\\[09].*$/,"")),qa(z,_)){l(),t=wa;break}}t=Ca;break;case"AtKeyword":case"Function":if(null!==f&&qa(f.value,t.name)){l(),t=wa;break}t=Ca;break;case"Token":if(null!==f&&f.value===t.value){l(),t=wa;break}t=Ca;break;case"Comma":null!==f&&f.type===_a.Comma?Ma(S.token)?t=Ca:(l(),t=Ia(f)?Ca:wa):t=Ma(S.token)||Ia(f)?wa:Ca;break;case"String":var O="";for(w=y;w=0}function Qa(e){return Boolean(e)&&Za(e.offset)&&Za(e.line)&&Za(e.column)}function Ja(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(var a in n){var i=!0;if(!1!==Ka.call(n,a)){if("type"===a)n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if("loc"===a){if(null===n.loc)continue;if(n.loc&&n.loc.constructor===Object)if("string"!=typeof n.loc.source)a+=".source";else if(Qa(n.loc.start)){if(Qa(n.loc.end))continue;a+=".end"}else a+=".start";i=!1}else if(t.hasOwnProperty(a)){var o=0;for(i=!1;!i&&o");else{if(!Array.isArray(d))throw new Error("Wrong value `"+d+"` in `"+e+"."+i+"` structure definition");o.push("List")}}a[i]=o.join(" | ")}return{docs:a,check:Ja(e,r)}}var ei=function(e){var t={};if(e.node)for(var n in e.node)if(Ka.call(e.node,n)){var r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=Xa(n,r)}return t},ti=Lt,ni=Bt,ri=Nt,ai=cr,ii=na,oi=zt,si=ia,li=function(e,t){return"string"==typeof e?da(e,null):t.generate(e,la)},di=xa.buildMatchGraph,pi=Ra,ci=Fa,ui=$a,mi=ei,hi=di("inherit | initial | unset"),gi=di("inherit | initial | unset | <-ms-legacy-expression>");function fi(e,t,n){var r={};for(var a in e)e[a].syntax&&(r[a]=n?e[a].syntax:oi(e[a].syntax,{compact:t}));return r}function yi(e,t,n){const r={};for(const[a,i]of Object.entries(e))r[a]={prelude:i.prelude&&(n?i.prelude.syntax:oi(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&fi(i.descriptors,t,n)};return r}function bi(e,t,n){return{matched:e,iterations:n,error:t,getTrace:ci.getTrace,isType:ci.isType,isProperty:ci.isProperty,isKeyword:ci.isKeyword}}function Si(e,t,n,r){var a,i=li(n,e.syntax);return function(e){for(var t=0;t(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n)),{}):null})},addProperty_:function(e,t){t&&(this.properties[e]=this.createDescriptor(t,"Property",e))},addType_:function(e,t){t&&(this.types[e]=this.createDescriptor(t,"Type",e),t===ai["-ms-legacy-expression"]&&(this.valueCommonSyntax=gi))},checkAtruleName:function(e){if(!this.getAtrule(e))return new ti("Unknown at-rule","@"+e)},checkAtrulePrelude:function(e,t){let n=this.checkAtruleName(e);if(n)return n;var r=this.getAtrule(e);return!r.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):r.prelude&&!t?new SyntaxError("At-rule `@"+e+"` should contain a prelude"):void 0},checkAtruleDescriptorName:function(e,t){let n=this.checkAtruleName(e);if(n)return n;var r=this.getAtrule(e),a=ri.keyword(t);return r.descriptors?r.descriptors[a.name]||r.descriptors[a.basename]?void 0:new ti("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")},checkPropertyName:function(e){return ri.property(e).custom?new Error("Lexer matching doesn't applicable for custom properties"):this.getProperty(e)?void 0:new ti("Unknown property",e)},matchAtrulePrelude:function(e,t){var n=this.checkAtrulePrelude(e,t);return n?bi(null,n):t?Si(this,this.getAtrule(e).prelude,t,!1):bi(null,null)},matchAtruleDescriptor:function(e,t,n){var r=this.checkAtruleDescriptorName(e,t);if(r)return bi(null,r);var a=this.getAtrule(e),i=ri.keyword(t);return Si(this,a.descriptors[i.name]||a.descriptors[i.basename],n,!1)},matchDeclaration:function(e){return"Declaration"!==e.type?bi(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)},matchProperty:function(e,t){var n=this.checkPropertyName(e);return n?bi(null,n):Si(this,this.getProperty(e),t,!0)},matchType:function(e,t){var n=this.getType(e);return n?Si(this,n,t,!1):bi(null,new ti("Unknown type",e))},match:function(e,t){return"string"==typeof e||e&&e.type?("string"!=typeof e&&e.match||(e=this.createDescriptor(e,"Type","anonymous")),Si(this,e,t,!1)):bi(null,new ti("Bad syntax"))},findValueFragments:function(e,t,n,r){return ui.matchFragments(this,t,this.matchProperty(e,t),n,r)},findDeclarationValueFragments:function(e,t,n){return ui.matchFragments(this,e.value,this.matchDeclaration(e),t,n)},findAllFragments:function(e,t,n){var r=[];return this.syntax.walk(e,{visit:"Declaration",enter:function(e){r.push.apply(r,this.findDeclarationValueFragments(e,t,n))}.bind(this)}),r},getAtrule:function(e,t=!0){var n=ri.keyword(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null},getAtrulePrelude:function(e,t=!0){const n=this.getAtrule(e,t);return n&&n.prelude||null},getAtruleDescriptor:function(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null},getProperty:function(e,t=!0){var n=ri.property(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null},getType:function(e){return this.types.hasOwnProperty(e)?this.types[e]:null},validate:function(){function e(r,a,i,o){if(i.hasOwnProperty(a))return i[a];i[a]=!1,null!==o.syntax&&si(o.syntax,(function(o){if("Type"===o.type||"Property"===o.type){var s="Type"===o.type?r.types:r.properties,l="Type"===o.type?t:n;s.hasOwnProperty(o.name)&&!e(r,o.name,l,s[o.name])||(i[a]=!0)}}),this)}var t={},n={};for(var r in this.types)e(this,r,t,this.types[r]);for(var r in this.properties)e(this,r,n,this.properties[r]);return t=Object.keys(t).filter((function(e){return t[e]})),n=Object.keys(n).filter((function(e){return n[e]})),t.length||n.length?{types:t,properties:n}:null},dump:function(e,t){return{generic:this.generic,types:fi(this.types,!t,e),properties:fi(this.properties,!t,e),atrules:yi(this.atrules,!t,e)}},toString:function(){return JSON.stringify(this.dump())}};var xi=vi,ki={SyntaxError:mr,parse:na,generate:zt,walk:ia},wi=Ft,Ci=hn.isBOM,Ti=10,_i=12,zi=13;var Oi=function(){this.lines=null,this.columns=null,this.linesAndColumnsComputed=!1};Oi.prototype={setSource:function(e,t,n,r){this.source=e,this.startOffset=void 0===t?0:t,this.startLine=void 0===n?1:n,this.startColumn=void 0===r?1:r,this.linesAndColumnsComputed=!1},ensureLinesAndColumnsComputed:function(){this.linesAndColumnsComputed||(!function(e,t){for(var n=t.length,r=wi(e.lines,n),a=e.startLine,i=wi(e.columns,n),o=e.startColumn,s=t.length>0?Ci(t.charCodeAt(0)):0;s>>=5)>0&&(t|=32),n+=ao.encode(t)}while(r>0);return n},to.decode=function(e,t,n){var r,a,i,o,s=e.length,l=0,d=0;do{if(t>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(a=ao.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));r=!!(32&a),l+=(a&=31)<>1,1==(1&i)?-o:o),n.rest=t};var io={};!function(e){e.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function r(e){var n=e.match(t);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function i(t){var n=t,i=r(t);if(i){if(!i.path)return t;n=i.path}for(var o,s=e.isAbsolute(n),l=n.split(/\/+/),d=0,p=l.length-1;p>=0;p--)"."===(o=l[p])?l.splice(p,1):".."===o?d++:d>0&&(""===o?(l.splice(p+1,d),d=0):(l.splice(p,2),d--));return""===(n=l.join("/"))&&(n=s?"/":"."),i?(i.path=n,a(i)):n}function o(e,t){""===e&&(e="."),""===t&&(t=".");var o=r(t),s=r(e);if(s&&(e=s.path||"/"),o&&!o.scheme)return s&&(o.scheme=s.scheme),a(o);if(o||t.match(n))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var l="/"===t.charAt(0)?t:i(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=l,a(s)):l}e.urlParse=r,e.urlGenerate=a,e.normalize=i,e.join=o,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var s=!("__proto__"in Object.create(null));function l(e){return e}function d(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function p(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=s?l:function(e){return d(e)?"$"+e:e},e.fromSetString=s?l:function(e){return d(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,n){var r=p(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)||n||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:p(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=p(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:p(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=p(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:p(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var s=r(n);if(!s)throw new Error("sourceMapURL could not be parsed");if(s.path){var l=s.path.lastIndexOf("/");l>=0&&(s.path=s.path.substring(0,l+1))}t=o(a(s),t)}return i(t)}}(io);var oo={},so=io,lo=Object.prototype.hasOwnProperty,po="undefined"!=typeof Map;function co(){this._array=[],this._set=po?new Map:Object.create(null)}co.fromArray=function(e,t){for(var n=new co,r=0,a=e.length;r=0)return t}else{var n=so.toSetString(e);if(lo.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},co.prototype.at=function(e){if(e>=0&&er||a==r&&o>=i||mo.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},ho.prototype.toArray=function(){return this._sorted||(this._array.sort(mo.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},uo.MappingList=ho;var go=to,fo=io,yo=oo.ArraySet,bo=uo.MappingList;function So(e){e||(e={}),this._file=fo.getArg(e,"file",null),this._sourceRoot=fo.getArg(e,"sourceRoot",null),this._skipValidation=fo.getArg(e,"skipValidation",!1),this._sources=new yo,this._names=new yo,this._mappings=new bo,this._sourcesContents=null}So.prototype._version=3,So.fromSourceMap=function(e){var t=e.sourceRoot,n=new So({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=fo.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(r){var a=r;null!==t&&(a=fo.relative(t,r)),n._sources.has(a)||n._sources.add(a);var i=e.sourceContentFor(r);null!=i&&n.setSourceContent(r,i)})),n},So.prototype.addMapping=function(e){var t=fo.getArg(e,"generated"),n=fo.getArg(e,"original",null),r=fo.getArg(e,"source",null),a=fo.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,a),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=a&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:a})},So.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=fo.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[fo.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[fo.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},So.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var a=this._sourceRoot;null!=a&&(r=fo.relative(a,r));var i=new yo,o=new yo;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=n&&(t.source=fo.join(n,t.source)),null!=a&&(t.source=fo.relative(a,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&(t.name=s.name))}var l=t.source;null==l||i.has(l)||i.add(l);var d=t.name;null==d||o.has(d)||o.add(d)}),this),this._sources=i,this._names=o,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=fo.join(n,t)),null!=a&&(t=fo.relative(a,t)),this.setSourceContent(t,r))}),this)},So.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},So.prototype._serializeMappings=function(){for(var e,t,n,r,a=0,i=1,o=0,s=0,l=0,d=0,p="",c=this._mappings.toArray(),u=0,m=c.length;u0){if(!fo.compareByGeneratedPositionsInflated(t,c[u-1]))continue;e+=","}e+=go.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=go.encode(r-d),d=r,e+=go.encode(t.originalLine-1-s),s=t.originalLine-1,e+=go.encode(t.originalColumn-o),o=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=go.encode(n-l),l=n)),p+=e}return p},So.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=fo.relative(t,e));var n=fo.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},So.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},So.prototype.toString=function(){return JSON.stringify(this.toJSON())},eo.SourceMapGenerator=So;var vo=eo.SourceMapGenerator,xo={Atrule:!0,Selector:!0,Declaration:!0},ko=function(e){var t=new vo,n=1,r=0,a={line:1,column:0},i={line:0,column:0},o=!1,s={line:1,column:0},l={generated:s},d=e.node;e.node=function(e){if(e.loc&&e.loc.start&&xo.hasOwnProperty(e.type)){var p=e.loc.start.line,c=e.loc.start.column-1;i.line===p&&i.column===c||(i.line=p,i.column=c,a.line=n,a.column=r,o&&(o=!1,a.line===s.line&&a.column===s.column||t.addMapping(l)),o=!0,t.addMapping({source:e.loc.source,original:i,generated:a}))}d.call(this,e),o&&xo.hasOwnProperty(e.type)&&(s.line=n,s.column=r)};var p=e.chunk;e.chunk=function(e){for(var t=0;t",needPositions:!1,onParseError:Gi,onParseErrorThrow:!1,parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Ni,createList:function(){return new qi},createSingleNodeList:function(e){return(new qi).appendData(e)},getFirstListNode:function(e){return e&&e.first()},getLastListNode:function(e){return e.last()},parseWithFallback:function(e,t){var n=this.scanner.tokenIndex;try{return e.call(this)}catch(e){if(this.onParseErrorThrow)throw e;var r=t.call(this,n);return this.onParseErrorThrow=!0,this.onParseError(e,r),this.onParseErrorThrow=!1,r}},lookupNonWSType:function(e){do{var t=this.scanner.lookupType(e++);if(t!==Ui)return t}while(0!==t);return 0},eat:function(e){if(this.scanner.tokenType!==e){var t=this.scanner.tokenStart,n=Vi[e]+" is expected";switch(e){case $i:this.scanner.tokenType===Yi||this.scanner.tokenType===Ki?(t=this.scanner.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case Zi:this.scanner.isDelim(35)&&(this.scanner.next(),t++,n="Name is expected");break;case Qi:this.scanner.tokenType===Ji&&(t=this.scanner.tokenEnd,n="Percent sign is expected");break;default:this.scanner.source.charCodeAt(this.scanner.tokenStart)===e&&(t+=1)}this.error(n,t)}this.scanner.next()},consume:function(e){var t=this.scanner.getTokenValue();return this.eat(e),t},consumeFunctionName:function(){var e=this.scanner.source.substring(this.scanner.tokenStart,this.scanner.tokenEnd-1);return this.eat(Yi),e},getLocation:function(e,t){return this.needPositions?this.locationMap.getLocationRange(e,t,this.filename):null},getLocationFromList:function(e){if(this.needPositions){var t=this.getFirstListNode(e),n=this.getLastListNode(e);return this.locationMap.getLocationRange(null!==t?t.loc.start.offset-this.locationMap.startOffset:this.scanner.tokenStart,null!==n?n.loc.end.offset-this.locationMap.startOffset:this.scanner.tokenStart,this.filename)}return null},error:function(e,t){var n=void 0!==t&&t",t.needPositions=Boolean(n.positions),t.onParseError="function"==typeof n.onParseError?n.onParseError:Gi,t.onParseErrorThrow=!1,t.parseAtrulePrelude=!("parseAtrulePrelude"in n)||Boolean(n.parseAtrulePrelude),t.parseRulePrelude=!("parseRulePrelude"in n)||Boolean(n.parseRulePrelude),t.parseValue=!("parseValue"in n)||Boolean(n.parseValue),t.parseCustomProperty="parseCustomProperty"in n&&Boolean(n.parseCustomProperty),!t.context.hasOwnProperty(a))throw new Error("Unknown context `"+a+"`");return"function"==typeof i&&t.scanner.forEachToken(((n,r,a)=>{if(n===Hi){const n=t.getLocation(r,a),o=Ri(e,a-2,a,"*/")?e.slice(r+2,a-2):e.slice(r+2,a);i(o,n)}})),r=t.context[a].call(t,n),t.scanner.eof||t.error(),r}},Ko=function(e){function t(e){if(!wo.call(n,e.type))throw new Error("Unknown node type: "+e.type);n[e.type].call(this,e)}var n={};if(e.node)for(var r in e.node)n[r]=e.node[r].generate;return function(e,n){var r="",a={children:Co,node:t,chunk:function(e){r+=e},result:function(){return r}};return n&&("function"==typeof n.decorator&&(a=n.decorator(a)),n.sourceMap&&(a=ko(a))),a.node(e),a.result()}},Zo=function(e){return{fromPlainObject:function(t){return e(t,{enter:function(e){e.children&&e.children instanceof To==!1&&(e.children=(new To).fromArray(e.children))}}),t},toPlainObject:function(t){return e(t,{leave:function(e){e.children&&e.children instanceof To&&(e.children=e.children.toArray())}}),t}}},Qo=function(e){var t=function(e){var t={};for(var n in e.node)if(_o.call(e.node,n)){var r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=Eo(0,r)}return t}(e),n={},r={},a=Symbol("break-walk"),i=Symbol("skip-node");for(var o in t)_o.call(t,o)&&null!==t[o]&&(n[o]=jo(t[o],!1),r[o]=jo(t[o],!0));var s=Wo(n),l=Wo(r),d=function(e,o){function d(e,t,n){var r=c.call(h,e,t,n);return r===a||r!==i&&(!(!m.hasOwnProperty(e.type)||!m[e.type](e,h,d,p))||u.call(h,e,t,n)===a)}var p=(e,t,n,r)=>e||d(t,n,r),c=zo,u=zo,m=n,h={break:a,skip:i,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof o)c=o;else if(o&&(c=Oo(o.enter),u=Oo(o.leave),o.reverse&&(m=r),o.visit)){if(s.hasOwnProperty(o.visit))m=o.reverse?l[o.visit]:s[o.visit];else if(!t.hasOwnProperty(o.visit))throw new Error("Bad value `"+o.visit+"` for `visit` option (should be: "+Object.keys(t).join(", ")+")");c=Ao(c,o.visit),u=Ao(u,o.visit)}if(c===zo&&u===zo)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");d(e)};return d.break=a,d.skip=i,d.find=function(e,t){var n=null;return d(e,(function(e,r,i){if(t.call(this,e,r,i))return n=e,a})),n},d.findLast=function(e,t){var n=null;return d(e,{reverse:!0,enter:function(e,r,i){if(t.call(this,e,r,i))return n=e,a}}),n},d.findAll=function(e,t){var n=[];return d(e,(function(e,r,a){t.call(this,e,r,a)&&n.push(e)})),n},d},Jo=function e(t){var n={};for(var r in t){var a=t[r];a&&(Array.isArray(a)||a instanceof Lo?a=a.map(e):a.constructor===Object&&(a=e(a))),n[r]=a}return n},Xo=Nt,es=(e,t)=>No(e,t,Po);function ts(e){var t=Yo(e),n=Qo(e),r=Ko(e),a=Zo(n),i={List:Go,SyntaxError:Fo,TokenStream:Vo,Lexer:Uo,vendorPrefix:Xo.vendorPrefix,keyword:Xo.keyword,property:Xo.property,isCustomProperty:Xo.isCustomProperty,definitionSyntax:Ho,lexer:null,createLexer:function(e){return new Uo(e,i,i.lexer.structure)},tokenize:$o,parse:t,walk:n,generate:r,find:n.find,findLast:n.findLast,findAll:n.findAll,clone:Jo,fromPlainObject:a.fromPlainObject,toPlainObject:a.toPlainObject,createSyntax:function(e){return ts(es({},e))},fork:function(t){var n=es({},e);return ts("function"==typeof t?t(n,Object.assign):es(n,t))}};return i.lexer=new Uo({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},i),i}Te.create=function(e){return ts(es({},e))};const ns={"@charset":{syntax:'@charset "";',groups:["CSS Charsets"],status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/@charset"},"@counter-style":{syntax:"@counter-style {\n [ system: ; ] ||\n [ symbols: ; ] ||\n [ additive-symbols: ; ] ||\n [ negative: ; ] ||\n [ prefix: ; ] ||\n [ suffix: ; ] ||\n [ range: ; ] ||\n [ pad: ; ] ||\n [ speak-as: ; ] ||\n [ fallback: ; ]\n}",interfaces:["CSSCounterStyleRule"],groups:["CSS Counter Styles"],descriptors:{"additive-symbols":{syntax:"[ && ]#",media:"all",initial:"n/a (required)",percentages:"no",computed:"asSpecified",order:"orderOfAppearance",status:"standard"},fallback:{syntax:"",media:"all",initial:"decimal",percentages:"no",computed:"asSpecified",order:"uniqueOrder",status:"standard"},negative:{syntax:" ?",media:"all",initial:'"-" hyphen-minus',percentages:"no",computed:"asSpecified",order:"orderOfAppearance",status:"standard"},pad:{syntax:" && ",media:"all",initial:'0 ""',percentages:"no",computed:"asSpecified",order:"uniqueOrder",status:"standard"},prefix:{syntax:"",media:"all",initial:'""',percentages:"no",computed:"asSpecified",order:"uniqueOrder",status:"standard"},range:{syntax:"[ [ | infinite ]{2} ]# | auto",media:"all",initial:"auto",percentages:"no",computed:"asSpecified",order:"orderOfAppearance",status:"standard"},"speak-as":{syntax:"auto | bullets | numbers | words | spell-out | ",media:"all",initial:"auto",percentages:"no",computed:"asSpecified",order:"uniqueOrder",status:"standard"},suffix:{syntax:"",media:"all",initial:'". "',percentages:"no",computed:"asSpecified",order:"uniqueOrder",status:"standard"},symbols:{syntax:"+",media:"all",initial:"n/a (required)",percentages:"no",computed:"asSpecified",order:"orderOfAppearance",status:"standard"},system:{syntax:"cyclic | numeric | alphabetic | symbolic | additive | [ fixed ? ] | [ extends ]",media:"all",initial:"symbolic",percentages:"no",computed:"asSpecified",order:"uniqueOrder",status:"standard"}},status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/@counter-style"},"@document":{syntax:"@document [ | url-prefix() | domain() | media-document() | regexp() ]# {\n \n}",interfaces:["CSSGroupingRule","CSSConditionRule"],groups:["CSS Conditional Rules"],status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/@document"},"@font-face":{syntax:"@font-face {\n [ font-family: ; ] ||\n [ src: ; ] ||\n [ unicode-range: ; ] ||\n [ font-variant: ; ] ||\n [ font-feature-settings: ; ] ||\n [ font-variation-settings: ; ] ||\n [ font-stretch: ; ] ||\n [ font-weight: ; ] ||\n [ font-style: ; ]\n}",interfaces:["CSSFontFaceRule"],groups:["CSS Fonts"],descriptors:{"font-display":{syntax:"[ auto | block | swap | fallback | optional ]",media:"visual",percentages:"no",initial:"auto",computed:"asSpecified",order:"uniqueOrder",status:"experimental"},"font-family":{syntax:"",media:"all",initial:"n/a (required)",percentages:"no",computed:"asSpecified",order:"uniqueOrder",status:"standard"},"font-feature-settings":{syntax:"normal | #",media:"all",initial:"normal",percentages:"no",computed:"asSpecified",order:"orderOfAppearance",status:"standard"},"font-variation-settings":{syntax:"normal | [ ]#",media:"all",initial:"normal",percentages:"no",computed:"asSpecified",order:"orderOfAppearance",status:"standard"},"font-stretch":{syntax:"{1,2}",media:"all",initial:"normal",percentages:"no",computed:"asSpecified",order:"uniqueOrder",status:"standard"},"font-style":{syntax:"normal | italic | oblique {0,2}",media:"all",initial:"normal",percentages:"no",computed:"asSpecified",order:"uniqueOrder",status:"standard"},"font-weight":{syntax:"{1,2}",media:"all",initial:"normal",percentages:"no",computed:"asSpecified",order:"uniqueOrder",status:"standard"},"font-variant":{syntax:"normal | none | [ || || || || stylistic() || historical-forms || styleset(#) || character-variant(#) || swash() || ornaments() || annotation() || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || || || || ordinal || slashed-zero || || || ruby ]",media:"all",initial:"normal",percentages:"no",computed:"asSpecified",order:"orderOfAppearance",status:"standard"},src:{syntax:"[ [ format( # ) ]? | local( ) ]#",media:"all",initial:"n/a (required)",percentages:"no",computed:"asSpecified",order:"orderOfAppearance",status:"standard"},"unicode-range":{syntax:"#",media:"all",initial:"U+0-10FFFF",percentages:"no",computed:"asSpecified",order:"orderOfAppearance",status:"standard"}},status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/@font-face"},"@font-feature-values":{syntax:"@font-feature-values # {\n \n}",interfaces:["CSSFontFeatureValuesRule"],groups:["CSS Fonts"],status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/@font-feature-values"},"@import":{syntax:"@import [ | ] [ ]?;",groups:["Media Queries"],status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/@import"},"@keyframes":{syntax:"@keyframes {\n \n}",interfaces:["CSSKeyframeRule","CSSKeyframesRule"],groups:["CSS Animations"],status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/@keyframes"},"@media":{syntax:"@media {\n \n}",interfaces:["CSSGroupingRule","CSSConditionRule","CSSMediaRule","CSSCustomMediaRule"],groups:["CSS Conditional Rules","Media Queries"],status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/@media"},"@namespace":{syntax:"@namespace ? [ | ];",groups:["CSS Namespaces"],status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/@namespace"},"@page":{syntax:"@page {\n \n}",interfaces:["CSSPageRule"],groups:["CSS Pages"],descriptors:{bleed:{syntax:"auto | ",media:["visual","paged"],initial:"auto",percentages:"no",computed:"asSpecified",order:"uniqueOrder",status:"standard"},marks:{syntax:"none | [ crop || cross ]",media:["visual","paged"],initial:"none",percentages:"no",computed:"asSpecified",order:"orderOfAppearance",status:"standard"},size:{syntax:"{1,2} | auto | [ || [ portrait | landscape ] ]",media:["visual","paged"],initial:"auto",percentages:"no",computed:"asSpecifiedRelativeToAbsoluteLengths",order:"orderOfAppearance",status:"standard"}},status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/@page"},"@property":{syntax:"@property {\n \n}",interfaces:["CSS","CSSPropertyRule"],groups:["CSS Houdini"],descriptors:{syntax:{syntax:"",media:"all",percentages:"no",initial:"n/a (required)",computed:"asSpecified",order:"uniqueOrder",status:"experimental"},inherits:{syntax:"true | false",media:"all",percentages:"no",initial:"auto",computed:"asSpecified",order:"uniqueOrder",status:"experimental"},"initial-value":{syntax:"",media:"all",initial:"n/a (required)",percentages:"no",computed:"asSpecified",order:"uniqueOrder",status:"experimental"}},status:"experimental",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/@property"},"@supports":{syntax:"@supports {\n \n}",interfaces:["CSSGroupingRule","CSSConditionRule","CSSSupportsRule"],groups:["CSS Conditional Rules"],status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/@supports"},"@viewport":{syntax:"@viewport {\n \n}",interfaces:["CSSViewportRule"],groups:["CSS Device Adaptation"],descriptors:{height:{syntax:"{1,2}",media:["visual","continuous"],initial:["min-height","max-height"],percentages:["min-height","max-height"],computed:["min-height","max-height"],order:"orderOfAppearance",status:"standard"},"max-height":{syntax:"",media:["visual","continuous"],initial:"auto",percentages:"referToHeightOfInitialViewport",computed:"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",order:"uniqueOrder",status:"standard"},"max-width":{syntax:"",media:["visual","continuous"],initial:"auto",percentages:"referToWidthOfInitialViewport",computed:"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",order:"uniqueOrder",status:"standard"},"max-zoom":{syntax:"auto | | ",media:["visual","continuous"],initial:"auto",percentages:"the zoom factor itself",computed:"autoNonNegativeOrPercentage",order:"uniqueOrder",status:"standard"},"min-height":{syntax:"",media:["visual","continuous"],initial:"auto",percentages:"referToHeightOfInitialViewport",computed:"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",order:"uniqueOrder",status:"standard"},"min-width":{syntax:"",media:["visual","continuous"],initial:"auto",percentages:"referToWidthOfInitialViewport",computed:"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",order:"uniqueOrder",status:"standard"},"min-zoom":{syntax:"auto | | ",media:["visual","continuous"],initial:"auto",percentages:"the zoom factor itself",computed:"autoNonNegativeOrPercentage",order:"uniqueOrder",status:"standard"},orientation:{syntax:"auto | portrait | landscape",media:["visual","continuous"],initial:"auto",percentages:"referToSizeOfBoundingBox",computed:"asSpecified",order:"uniqueOrder",status:"standard"},"user-zoom":{syntax:"zoom | fixed",media:["visual","continuous"],initial:"zoom",percentages:"referToSizeOfBoundingBox",computed:"asSpecified",order:"uniqueOrder",status:"standard"},"viewport-fit":{syntax:"auto | contain | cover",media:["visual","continuous"],initial:"auto",percentages:"no",computed:"asSpecified",order:"uniqueOrder",status:"standard"},width:{syntax:"{1,2}",media:["visual","continuous"],initial:["min-width","max-width"],percentages:["min-width","max-width"],computed:["min-width","max-width"],order:"orderOfAppearance",status:"standard"},zoom:{syntax:"auto | | ",media:["visual","continuous"],initial:"auto",percentages:"the zoom factor itself",computed:"autoNonNegativeOrPercentage",order:"uniqueOrder",status:"standard"}},status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/@viewport"}},rs={"--*":{syntax:"",media:"all",inherited:!0,animationType:"discrete",percentages:"no",groups:["CSS Variables"],initial:"seeProse",appliesto:"allElements",computed:"asSpecifiedWithVarsSubstituted",order:"perGrammar",status:"experimental",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/--*"},"-ms-accelerator":{syntax:"false | true",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"false",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-accelerator"},"-ms-block-progression":{syntax:"tb | rl | bt | lr",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"tb",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-block-progression"},"-ms-content-zoom-chaining":{syntax:"none | chained",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"none",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-chaining"},"-ms-content-zooming":{syntax:"none | zoom",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"zoomForTheTopLevelNoneForTheRest",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zooming"},"-ms-content-zoom-limit":{syntax:"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>",media:"interactive",inherited:!1,animationType:"discrete",percentages:["-ms-content-zoom-limit-max","-ms-content-zoom-limit-min"],groups:["Microsoft Extensions"],initial:["-ms-content-zoom-limit-max","-ms-content-zoom-limit-min"],appliesto:"nonReplacedBlockAndInlineBlockElements",computed:["-ms-content-zoom-limit-max","-ms-content-zoom-limit-min"],order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit"},"-ms-content-zoom-limit-max":{syntax:"",media:"interactive",inherited:!1,animationType:"discrete",percentages:"maxZoomFactor",groups:["Microsoft Extensions"],initial:"400%",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit-max"},"-ms-content-zoom-limit-min":{syntax:"",media:"interactive",inherited:!1,animationType:"discrete",percentages:"minZoomFactor",groups:["Microsoft Extensions"],initial:"100%",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit-min"},"-ms-content-zoom-snap":{syntax:"<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:["-ms-content-zoom-snap-type","-ms-content-zoom-snap-points"],appliesto:"nonReplacedBlockAndInlineBlockElements",computed:["-ms-content-zoom-snap-type","-ms-content-zoom-snap-points"],order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap"},"-ms-content-zoom-snap-points":{syntax:"snapInterval( , ) | snapList( # )",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"snapInterval(0%, 100%)",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap-points"},"-ms-content-zoom-snap-type":{syntax:"none | proximity | mandatory",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"none",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap-type"},"-ms-filter":{syntax:"",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:'""',appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-filter"},"-ms-flow-from":{syntax:"[ none | ]#",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"none",appliesto:"nonReplacedElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-flow-from"},"-ms-flow-into":{syntax:"[ none | ]#",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"none",appliesto:"iframeElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-flow-into"},"-ms-grid-columns":{syntax:"none | | ",media:"visual",inherited:!1,animationType:"simpleListOfLpcDifferenceLpc",percentages:"referToDimensionOfContentArea",groups:["CSS Grid Layout"],initial:"none",appliesto:"gridContainers",computed:"asSpecifiedRelativeToAbsoluteLengths",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-grid-columns"},"-ms-grid-rows":{syntax:"none | | ",media:"visual",inherited:!1,animationType:"simpleListOfLpcDifferenceLpc",percentages:"referToDimensionOfContentArea",groups:["CSS Grid Layout"],initial:"none",appliesto:"gridContainers",computed:"asSpecifiedRelativeToAbsoluteLengths",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-grid-rows"},"-ms-high-contrast-adjust":{syntax:"auto | none",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"auto",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-high-contrast-adjust"},"-ms-hyphenate-limit-chars":{syntax:"auto | {1,3}",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"auto",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-chars"},"-ms-hyphenate-limit-lines":{syntax:"no-limit | ",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"no-limit",appliesto:"blockContainerElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-lines"},"-ms-hyphenate-limit-zone":{syntax:" | ",media:"visual",inherited:!0,animationType:"discrete",percentages:"referToLineBoxWidth",groups:["Microsoft Extensions"],initial:"0",appliesto:"blockContainerElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-zone"},"-ms-ime-align":{syntax:"auto | after",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"auto",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-ime-align"},"-ms-overflow-style":{syntax:"auto | none | scrollbar | -ms-autohiding-scrollbar",media:"interactive",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"auto",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-overflow-style"},"-ms-scrollbar-3dlight-color":{syntax:"",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"dependsOnUserAgent",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-3dlight-color"},"-ms-scrollbar-arrow-color":{syntax:"",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"ButtonText",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-arrow-color"},"-ms-scrollbar-base-color":{syntax:"",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"dependsOnUserAgent",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-base-color"},"-ms-scrollbar-darkshadow-color":{syntax:"",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"ThreeDDarkShadow",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-darkshadow-color"},"-ms-scrollbar-face-color":{syntax:"",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"ThreeDFace",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-face-color"},"-ms-scrollbar-highlight-color":{syntax:"",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"ThreeDHighlight",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-highlight-color"},"-ms-scrollbar-shadow-color":{syntax:"",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"ThreeDDarkShadow",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-shadow-color"},"-ms-scrollbar-track-color":{syntax:"",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"Scrollbar",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-track-color"},"-ms-scroll-chaining":{syntax:"chained | none",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"chained",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-chaining"},"-ms-scroll-limit":{syntax:"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:["-ms-scroll-limit-x-min","-ms-scroll-limit-y-min","-ms-scroll-limit-x-max","-ms-scroll-limit-y-max"],appliesto:"nonReplacedBlockAndInlineBlockElements",computed:["-ms-scroll-limit-x-min","-ms-scroll-limit-y-min","-ms-scroll-limit-x-max","-ms-scroll-limit-y-max"],order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit"},"-ms-scroll-limit-x-max":{syntax:"auto | ",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"auto",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-x-max"},"-ms-scroll-limit-x-min":{syntax:"",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"0",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-x-min"},"-ms-scroll-limit-y-max":{syntax:"auto | ",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"auto",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-y-max"},"-ms-scroll-limit-y-min":{syntax:"",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"0",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-y-min"},"-ms-scroll-rails":{syntax:"none | railed",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"railed",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-rails"},"-ms-scroll-snap-points-x":{syntax:"snapInterval( , ) | snapList( # )",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"snapInterval(0px, 100%)",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-points-x"},"-ms-scroll-snap-points-y":{syntax:"snapInterval( , ) | snapList( # )",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"snapInterval(0px, 100%)",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-points-y"},"-ms-scroll-snap-type":{syntax:"none | proximity | mandatory",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"none",appliesto:"nonReplacedBlockAndInlineBlockElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-type"},"-ms-scroll-snap-x":{syntax:"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:["-ms-scroll-snap-type","-ms-scroll-snap-points-x"],appliesto:"nonReplacedBlockAndInlineBlockElements",computed:["-ms-scroll-snap-type","-ms-scroll-snap-points-x"],order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-x"},"-ms-scroll-snap-y":{syntax:"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:["-ms-scroll-snap-type","-ms-scroll-snap-points-y"],appliesto:"nonReplacedBlockAndInlineBlockElements",computed:["-ms-scroll-snap-type","-ms-scroll-snap-points-y"],order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-y"},"-ms-scroll-translation":{syntax:"none | vertical-to-horizontal",media:"interactive",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"none",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-translation"},"-ms-text-autospace":{syntax:"none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"none",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-text-autospace"},"-ms-touch-select":{syntax:"grippers | none",media:"interactive",inherited:!0,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"grippers",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-touch-select"},"-ms-user-select":{syntax:"none | element | text",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"text",appliesto:"nonReplacedElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-user-select"},"-ms-wrap-flow":{syntax:"auto | both | start | end | maximum | clear",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"auto",appliesto:"blockLevelElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-flow"},"-ms-wrap-margin":{syntax:"",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"0",appliesto:"exclusionElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-margin"},"-ms-wrap-through":{syntax:"wrap | none",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Microsoft Extensions"],initial:"wrap",appliesto:"blockLevelElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-through"},"-moz-appearance":{syntax:"none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions","WebKit Extensions"],initial:"noneButOverriddenInUserAgentCSS",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/appearance"},"-moz-binding":{syntax:" | none",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"none",appliesto:"allElementsExceptGeneratedContentOrPseudoElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-binding"},"-moz-border-bottom-colors":{syntax:"+ | none",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"none",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-border-bottom-colors"},"-moz-border-left-colors":{syntax:"+ | none",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"none",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-border-left-colors"},"-moz-border-right-colors":{syntax:"+ | none",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"none",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-border-right-colors"},"-moz-border-top-colors":{syntax:"+ | none",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"none",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-border-top-colors"},"-moz-context-properties":{syntax:"none | [ fill | fill-opacity | stroke | stroke-opacity ]#",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"none",appliesto:"allElementsThatCanReferenceImages",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-context-properties"},"-moz-float-edge":{syntax:"border-box | content-box | margin-box | padding-box",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"content-box",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-float-edge"},"-moz-force-broken-image-icon":{syntax:"",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"0",appliesto:"images",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-force-broken-image-icon"},"-moz-image-region":{syntax:" | auto",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"auto",appliesto:"xulImageElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-image-region"},"-moz-orient":{syntax:"inline | block | horizontal | vertical",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"inline",appliesto:"anyElementEffectOnProgressAndMeter",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-orient"},"-moz-outline-radius":{syntax:"{1,4} [ / {1,4} ]?",media:"visual",inherited:!1,animationType:["-moz-outline-radius-topleft","-moz-outline-radius-topright","-moz-outline-radius-bottomright","-moz-outline-radius-bottomleft"],percentages:["-moz-outline-radius-topleft","-moz-outline-radius-topright","-moz-outline-radius-bottomright","-moz-outline-radius-bottomleft"],groups:["Mozilla Extensions"],initial:["-moz-outline-radius-topleft","-moz-outline-radius-topright","-moz-outline-radius-bottomright","-moz-outline-radius-bottomleft"],appliesto:"allElements",computed:["-moz-outline-radius-topleft","-moz-outline-radius-topright","-moz-outline-radius-bottomright","-moz-outline-radius-bottomleft"],order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius"},"-moz-outline-radius-bottomleft":{syntax:"",media:"visual",inherited:!1,animationType:"lpc",percentages:"referToDimensionOfBorderBox",groups:["Mozilla Extensions"],initial:"0",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomleft"},"-moz-outline-radius-bottomright":{syntax:"",media:"visual",inherited:!1,animationType:"lpc",percentages:"referToDimensionOfBorderBox",groups:["Mozilla Extensions"],initial:"0",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomright"},"-moz-outline-radius-topleft":{syntax:"",media:"visual",inherited:!1,animationType:"lpc",percentages:"referToDimensionOfBorderBox",groups:["Mozilla Extensions"],initial:"0",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topleft"},"-moz-outline-radius-topright":{syntax:"",media:"visual",inherited:!1,animationType:"lpc",percentages:"referToDimensionOfBorderBox",groups:["Mozilla Extensions"],initial:"0",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topright"},"-moz-stack-sizing":{syntax:"ignore | stretch-to-fit",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"stretch-to-fit",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-stack-sizing"},"-moz-text-blink":{syntax:"none | blink",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"none",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-text-blink"},"-moz-user-focus":{syntax:"ignore | normal | select-after | select-before | select-menu | select-same | select-all | none",media:"interactive",inherited:!1,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"none",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-user-focus"},"-moz-user-input":{syntax:"auto | none | enabled | disabled",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"auto",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-user-input"},"-moz-user-modify":{syntax:"read-only | read-write | write-only",media:"interactive",inherited:!0,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"read-only",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-user-modify"},"-moz-window-dragging":{syntax:"drag | no-drag",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"drag",appliesto:"allElementsCreatingNativeWindows",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-window-dragging"},"-moz-window-shadow":{syntax:"default | menu | tooltip | sheet | none",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["Mozilla Extensions"],initial:"default",appliesto:"allElementsCreatingNativeWindows",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-moz-window-shadow"},"-webkit-appearance":{syntax:"none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"noneButOverriddenInUserAgentCSS",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/appearance"},"-webkit-border-before":{syntax:"<'border-width'> || <'border-style'> || <'color'>",media:"visual",inherited:!0,animationType:"discrete",percentages:["-webkit-border-before-width"],groups:["WebKit Extensions"],initial:["border-width","border-style","color"],appliesto:"allElements",computed:["border-width","border-style","color"],order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-border-before"},"-webkit-border-before-color":{syntax:"<'color'>",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"currentcolor",appliesto:"allElements",computed:"computedColor",order:"uniqueOrder",status:"nonstandard"},"-webkit-border-before-style":{syntax:"<'border-style'>",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"none",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard"},"-webkit-border-before-width":{syntax:"<'border-width'>",media:"visual",inherited:!0,animationType:"discrete",percentages:"logicalWidthOfContainingBlock",groups:["WebKit Extensions"],initial:"medium",appliesto:"allElements",computed:"absoluteLengthZeroIfBorderStyleNoneOrHidden",order:"uniqueOrder",status:"nonstandard"},"-webkit-box-reflect":{syntax:"[ above | below | right | left ]? ? ?",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"none",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-box-reflect"},"-webkit-line-clamp":{syntax:"none | ",media:"visual",inherited:!1,animationType:"byComputedValueType",percentages:"no",groups:["WebKit Extensions","CSS Overflow"],initial:"none",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp"},"-webkit-mask":{syntax:"[ || [ / ]? || || [ | border | padding | content | text ] || [ | border | padding | content ] ]#",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:["-webkit-mask-image","-webkit-mask-repeat","-webkit-mask-attachment","-webkit-mask-position","-webkit-mask-origin","-webkit-mask-clip"],appliesto:"allElements",computed:["-webkit-mask-image","-webkit-mask-repeat","-webkit-mask-attachment","-webkit-mask-position","-webkit-mask-origin","-webkit-mask-clip"],order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/mask"},"-webkit-mask-attachment":{syntax:"#",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"scroll",appliesto:"allElements",computed:"asSpecified",order:"orderOfAppearance",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-attachment"},"-webkit-mask-clip":{syntax:"[ | border | padding | content | text ]#",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"border",appliesto:"allElements",computed:"asSpecified",order:"orderOfAppearance",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/mask-clip"},"-webkit-mask-composite":{syntax:"#",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"source-over",appliesto:"allElements",computed:"asSpecified",order:"orderOfAppearance",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-composite"},"-webkit-mask-image":{syntax:"#",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"none",appliesto:"allElements",computed:"absoluteURIOrNone",order:"orderOfAppearance",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/mask-image"},"-webkit-mask-origin":{syntax:"[ | border | padding | content ]#",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"padding",appliesto:"allElements",computed:"asSpecified",order:"orderOfAppearance",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/mask-origin"},"-webkit-mask-position":{syntax:"#",media:"visual",inherited:!1,animationType:"discrete",percentages:"referToSizeOfElement",groups:["WebKit Extensions"],initial:"0% 0%",appliesto:"allElements",computed:"absoluteLengthOrPercentage",order:"orderOfAppearance",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/mask-position"},"-webkit-mask-position-x":{syntax:"[ | left | center | right ]#",media:"visual",inherited:!1,animationType:"discrete",percentages:"referToSizeOfElement",groups:["WebKit Extensions"],initial:"0%",appliesto:"allElements",computed:"absoluteLengthOrPercentage",order:"orderOfAppearance",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-x"},"-webkit-mask-position-y":{syntax:"[ | top | center | bottom ]#",media:"visual",inherited:!1,animationType:"discrete",percentages:"referToSizeOfElement",groups:["WebKit Extensions"],initial:"0%",appliesto:"allElements",computed:"absoluteLengthOrPercentage",order:"orderOfAppearance",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-y"},"-webkit-mask-repeat":{syntax:"#",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"repeat",appliesto:"allElements",computed:"asSpecified",order:"orderOfAppearance",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/mask-repeat"},"-webkit-mask-repeat-x":{syntax:"repeat | no-repeat | space | round",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"repeat",appliesto:"allElements",computed:"asSpecified",order:"orderOfAppearance",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-x"},"-webkit-mask-repeat-y":{syntax:"repeat | no-repeat | space | round",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"repeat",appliesto:"allElements",computed:"absoluteLengthOrPercentage",order:"orderOfAppearance",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-y"},"-webkit-mask-size":{syntax:"#",media:"visual",inherited:!1,animationType:"discrete",percentages:"relativeToBackgroundPositioningArea",groups:["WebKit Extensions"],initial:"auto auto",appliesto:"allElements",computed:"asSpecified",order:"orderOfAppearance",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/mask-size"},"-webkit-overflow-scrolling":{syntax:"auto | touch",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"auto",appliesto:"scrollingBoxes",computed:"asSpecified",order:"orderOfAppearance",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-overflow-scrolling"},"-webkit-tap-highlight-color":{syntax:"",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"black",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-tap-highlight-color"},"-webkit-text-fill-color":{syntax:"",media:"visual",inherited:!0,animationType:"color",percentages:"no",groups:["WebKit Extensions"],initial:"currentcolor",appliesto:"allElements",computed:"computedColor",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color"},"-webkit-text-stroke":{syntax:" || ",media:"visual",inherited:!0,animationType:["-webkit-text-stroke-width","-webkit-text-stroke-color"],percentages:"no",groups:["WebKit Extensions"],initial:["-webkit-text-stroke-width","-webkit-text-stroke-color"],appliesto:"allElements",computed:["-webkit-text-stroke-width","-webkit-text-stroke-color"],order:"canonicalOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke"},"-webkit-text-stroke-color":{syntax:"",media:"visual",inherited:!0,animationType:"color",percentages:"no",groups:["WebKit Extensions"],initial:"currentcolor",appliesto:"allElements",computed:"computedColor",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color"},"-webkit-text-stroke-width":{syntax:"",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"0",appliesto:"allElements",computed:"absoluteLength",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width"},"-webkit-touch-callout":{syntax:"default | none",media:"visual",inherited:!0,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"default",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/-webkit-touch-callout"},"-webkit-user-modify":{syntax:"read-only | read-write | read-write-plaintext-only",media:"interactive",inherited:!0,animationType:"discrete",percentages:"no",groups:["WebKit Extensions"],initial:"read-only",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"nonstandard"},"align-content":{syntax:"normal | | | ? ",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["CSS Box Alignment"],initial:"normal",appliesto:"multilineFlexContainers",computed:"asSpecified",order:"uniqueOrder",status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/align-content"},"align-items":{syntax:"normal | stretch | | [ ? ]",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["CSS Box Alignment"],initial:"normal",appliesto:"allElements",computed:"asSpecified",order:"uniqueOrder",status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/align-items"},"align-self":{syntax:"auto | normal | stretch | | ? ",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["CSS Box Alignment"],initial:"auto",appliesto:"flexItemsGridItemsAndAbsolutelyPositionedBoxes",computed:"autoOnAbsolutelyPositionedElementsValueOfAlignItemsOnParent",order:"uniqueOrder",status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/align-self"},"align-tracks":{syntax:"[ normal | | | ? ]#",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["CSS Grid Layout"],initial:"normal",appliesto:"gridContainersWithMasonryLayoutInTheirBlockAxis",computed:"asSpecified",order:"uniqueOrder",status:"experimental",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/align-tracks"},all:{syntax:"initial | inherit | unset | revert",media:"noPracticalMedia",inherited:!1,animationType:"eachOfShorthandPropertiesExceptUnicodeBiDiAndDirection",percentages:"no",groups:["CSS Miscellaneous"],initial:"noPracticalInitialValue",appliesto:"allElements",computed:"asSpecifiedAppliesToEachProperty",order:"uniqueOrder",status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/all"},animation:{syntax:"#",media:"visual",inherited:!1,animationType:"discrete",percentages:"no",groups:["CSS Animations"],initial:["animation-name","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state"],appliesto:"allElementsAndPseudos",computed:["animation-name","animation-duration","animation-timing-function","animation-delay","animation-direction","animation-iteration-count","animation-fill-mode","animation-play-state"],order:"orderOfAppearance",status:"standard",mdn_url:"https://developer.mozilla.org/docs/Web/CSS/animation"},"animation-delay":{syntax:"