file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
index_files/libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/fontawesome.css
CSS
/*! * Font Awesome Free 5.1.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ .fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:a 2s infinite linear}.fa-pulse{animation:a 1s infinite steps(8)}@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blind:before{content:"\f29d"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-open:before{content:"\f518"}.fa-bookmark:before{content:"\f02e"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-certificate:before{content:"\f0a3"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-concierge-bell:before{content:"\f562"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-credit-card:before{content:"\f09d"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-deviantart:before{content:"\f1bd"}.fa-diagnoses:before{content:"\f470"}.fa-dice:before{content:"\f522"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-gift:before{content:"\f06b"}.fa-git:before{content:"\f1d3"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hashtag:before{content:"\f292"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hot-tub:before{content:"\f593"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-houzz:before{content:"\f27c"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-internet-explorer:before{content:"\f26b"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mercury:before{content:"\f223"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-motorcycle:before{content:"\f21c"}.fa-mouse-pointer:before{content:"\f245"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-old-republic:before{content:"\f510"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-people-carry:before{content:"\f4ce"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poo:before{content:"\f2fe"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-r-project:before{content:"\f4f7"}.fa-random:before{content:"\f074"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-rendact:before{content:"\f3e4"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-retweet:before{content:"\f079"}.fa-ribbon:before{content:"\f4d6"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-rupee-sign:before{content:"\f156"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-sass:before{content:"\f41e"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-search:before{content:"\f002"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skull:before{content:"\f54c"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowflake:before{content:"\f2dc"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-swatchbook:before{content:"\f5c3"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toolbox:before{content:"\f552"}.fa-tooth:before{content:"\f5c9"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-train:before{content:"\f238"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-moving:before{content:"\f4df"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/regular.css
CSS
/*! * Font Awesome Free 5.1.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-family:"Font Awesome 5 Free";font-weight:400}
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/solid.css
CSS
/*! * Font Awesome Free 5.1.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.fas{font-family:"Font Awesome 5 Free";font-weight:900}
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/svg-with-js.css
CSS
/*! * Font Awesome Free 5.1.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ .svg-inline--fa,svg:not(:root).svg-inline--fa{overflow:visible}.svg-inline--fa{display:inline-block;font-size:inherit;height:1em;vertical-align:-.125em}.svg-inline--fa.fa-lg{vertical-align:-.225em}.svg-inline--fa.fa-w-1{width:.0625em}.svg-inline--fa.fa-w-2{width:.125em}.svg-inline--fa.fa-w-3{width:.1875em}.svg-inline--fa.fa-w-4{width:.25em}.svg-inline--fa.fa-w-5{width:.3125em}.svg-inline--fa.fa-w-6{width:.375em}.svg-inline--fa.fa-w-7{width:.4375em}.svg-inline--fa.fa-w-8{width:.5em}.svg-inline--fa.fa-w-9{width:.5625em}.svg-inline--fa.fa-w-10{width:.625em}.svg-inline--fa.fa-w-11{width:.6875em}.svg-inline--fa.fa-w-12{width:.75em}.svg-inline--fa.fa-w-13{width:.8125em}.svg-inline--fa.fa-w-14{width:.875em}.svg-inline--fa.fa-w-15{width:.9375em}.svg-inline--fa.fa-w-16{width:1em}.svg-inline--fa.fa-w-17{width:1.0625em}.svg-inline--fa.fa-w-18{width:1.125em}.svg-inline--fa.fa-w-19{width:1.1875em}.svg-inline--fa.fa-w-20{width:1.25em}.svg-inline--fa.fa-pull-left{margin-right:.3em;width:auto}.svg-inline--fa.fa-pull-right{margin-left:.3em;width:auto}.svg-inline--fa.fa-border{height:1.5em}.svg-inline--fa.fa-li{width:2em}.svg-inline--fa.fa-fw{width:1.25em}.fa-layers svg.svg-inline--fa{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers svg.svg-inline--fa{transform-origin:center center}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.fa-layers-text{left:50%;top:50%;transform:translate(-50%,-50%);transform-origin:center center}.fa-layers-counter{background-color:#ff253a;border-radius:1em;box-sizing:border-box;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:0;text-overflow:ellipsis;top:0;transform:scale(.25);transform-origin:top right}.fa-layers-bottom-right{bottom:0;right:0;top:auto;transform:scale(.25);transform-origin:bottom right}.fa-layers-bottom-left{bottom:0;left:0;right:auto;top:auto;transform:scale(.25);transform-origin:bottom left}.fa-layers-top-right{right:0;top:0;transform:scale(.25);transform-origin:top right}.fa-layers-top-left{left:0;right:auto;top:0;transform:scale(.25);transform-origin:top left}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:a 2s infinite linear}.fa-pulse{animation:a 1s infinite steps(8)}@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;position:relative;width:2em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x{height:1em;width:1em}.svg-inline--fa.fa-stack-2x{height:2em;width:2em}.fa-inverse{color:#fff}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/v4-shims.css
CSS
/*! * Font Awesome Free 5.1.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ .fa.fa-glass:before { content: "\f000"; } .fa.fa-meetup { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-star-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-star-o:before { content: "\f005"; } .fa.fa-remove:before { content: "\f00d"; } .fa.fa-close:before { content: "\f00d"; } .fa.fa-gear:before { content: "\f013"; } .fa.fa-trash-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-trash-o:before { content: "\f2ed"; } .fa.fa-file-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-o:before { content: "\f15b"; } .fa.fa-clock-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-clock-o:before { content: "\f017"; } .fa.fa-arrow-circle-o-down { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-arrow-circle-o-down:before { content: "\f358"; } .fa.fa-arrow-circle-o-up { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-arrow-circle-o-up:before { content: "\f35b"; } .fa.fa-play-circle-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-play-circle-o:before { content: "\f144"; } .fa.fa-repeat:before { content: "\f01e"; } .fa.fa-rotate-right:before { content: "\f01e"; } .fa.fa-refresh:before { content: "\f021"; } .fa.fa-list-alt { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-dedent:before { content: "\f03b"; } .fa.fa-video-camera:before { content: "\f03d"; } .fa.fa-picture-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-picture-o:before { content: "\f03e"; } .fa.fa-photo { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-photo:before { content: "\f03e"; } .fa.fa-image { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-image:before { content: "\f03e"; } .fa.fa-pencil:before { content: "\f303"; } .fa.fa-map-marker:before { content: "\f3c5"; } .fa.fa-pencil-square-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-pencil-square-o:before { content: "\f044"; } .fa.fa-share-square-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-share-square-o:before { content: "\f14d"; } .fa.fa-check-square-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-check-square-o:before { content: "\f14a"; } .fa.fa-arrows:before { content: "\f0b2"; } .fa.fa-times-circle-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-times-circle-o:before { content: "\f057"; } .fa.fa-check-circle-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-check-circle-o:before { content: "\f058"; } .fa.fa-mail-forward:before { content: "\f064"; } .fa.fa-eye { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-eye-slash { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-warning:before { content: "\f071"; } .fa.fa-calendar:before { content: "\f073"; } .fa.fa-arrows-v:before { content: "\f338"; } .fa.fa-arrows-h:before { content: "\f337"; } .fa.fa-bar-chart { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-bar-chart:before { content: "\f080"; } .fa.fa-bar-chart-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-bar-chart-o:before { content: "\f080"; } .fa.fa-twitter-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-facebook-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-gears:before { content: "\f085"; } .fa.fa-thumbs-o-up { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-thumbs-o-up:before { content: "\f164"; } .fa.fa-thumbs-o-down { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-thumbs-o-down:before { content: "\f165"; } .fa.fa-heart-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-heart-o:before { content: "\f004"; } .fa.fa-sign-out:before { content: "\f2f5"; } .fa.fa-linkedin-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-linkedin-square:before { content: "\f08c"; } .fa.fa-thumb-tack:before { content: "\f08d"; } .fa.fa-external-link:before { content: "\f35d"; } .fa.fa-sign-in:before { content: "\f2f6"; } .fa.fa-github-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-lemon-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-lemon-o:before { content: "\f094"; } .fa.fa-square-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-square-o:before { content: "\f0c8"; } .fa.fa-bookmark-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-bookmark-o:before { content: "\f02e"; } .fa.fa-twitter { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-facebook { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-facebook:before { content: "\f39e"; } .fa.fa-facebook-f { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-facebook-f:before { content: "\f39e"; } .fa.fa-github { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-credit-card { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-feed:before { content: "\f09e"; } .fa.fa-hdd-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hdd-o:before { content: "\f0a0"; } .fa.fa-hand-o-right { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hand-o-right:before { content: "\f0a4"; } .fa.fa-hand-o-left { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hand-o-left:before { content: "\f0a5"; } .fa.fa-hand-o-up { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hand-o-up:before { content: "\f0a6"; } .fa.fa-hand-o-down { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hand-o-down:before { content: "\f0a7"; } .fa.fa-arrows-alt:before { content: "\f31e"; } .fa.fa-group:before { content: "\f0c0"; } .fa.fa-chain:before { content: "\f0c1"; } .fa.fa-scissors:before { content: "\f0c4"; } .fa.fa-files-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-files-o:before { content: "\f0c5"; } .fa.fa-floppy-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-floppy-o:before { content: "\f0c7"; } .fa.fa-navicon:before { content: "\f0c9"; } .fa.fa-reorder:before { content: "\f0c9"; } .fa.fa-pinterest { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-pinterest-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-google-plus-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-google-plus { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-google-plus:before { content: "\f0d5"; } .fa.fa-money { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-money:before { content: "\f3d1"; } .fa.fa-unsorted:before { content: "\f0dc"; } .fa.fa-sort-desc:before { content: "\f0dd"; } .fa.fa-sort-asc:before { content: "\f0de"; } .fa.fa-linkedin { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-linkedin:before { content: "\f0e1"; } .fa.fa-rotate-left:before { content: "\f0e2"; } .fa.fa-legal:before { content: "\f0e3"; } .fa.fa-tachometer:before { content: "\f3fd"; } .fa.fa-dashboard:before { content: "\f3fd"; } .fa.fa-comment-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-comment-o:before { content: "\f075"; } .fa.fa-comments-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-comments-o:before { content: "\f086"; } .fa.fa-flash:before { content: "\f0e7"; } .fa.fa-clipboard { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-paste { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-paste:before { content: "\f328"; } .fa.fa-lightbulb-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-lightbulb-o:before { content: "\f0eb"; } .fa.fa-exchange:before { content: "\f362"; } .fa.fa-cloud-download:before { content: "\f381"; } .fa.fa-cloud-upload:before { content: "\f382"; } .fa.fa-bell-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-bell-o:before { content: "\f0f3"; } .fa.fa-cutlery:before { content: "\f2e7"; } .fa.fa-file-text-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-text-o:before { content: "\f15c"; } .fa.fa-building-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-building-o:before { content: "\f1ad"; } .fa.fa-hospital-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hospital-o:before { content: "\f0f8"; } .fa.fa-tablet:before { content: "\f3fa"; } .fa.fa-mobile:before { content: "\f3cd"; } .fa.fa-mobile-phone:before { content: "\f3cd"; } .fa.fa-circle-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-circle-o:before { content: "\f111"; } .fa.fa-mail-reply:before { content: "\f3e5"; } .fa.fa-github-alt { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-folder-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-folder-o:before { content: "\f07b"; } .fa.fa-folder-open-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-folder-open-o:before { content: "\f07c"; } .fa.fa-smile-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-smile-o:before { content: "\f118"; } .fa.fa-frown-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-frown-o:before { content: "\f119"; } .fa.fa-meh-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-meh-o:before { content: "\f11a"; } .fa.fa-keyboard-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-keyboard-o:before { content: "\f11c"; } .fa.fa-flag-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-flag-o:before { content: "\f024"; } .fa.fa-mail-reply-all:before { content: "\f122"; } .fa.fa-star-half-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-star-half-o:before { content: "\f089"; } .fa.fa-star-half-empty { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-star-half-empty:before { content: "\f089"; } .fa.fa-star-half-full { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-star-half-full:before { content: "\f089"; } .fa.fa-code-fork:before { content: "\f126"; } .fa.fa-chain-broken:before { content: "\f127"; } .fa.fa-shield:before { content: "\f3ed"; } .fa.fa-calendar-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-calendar-o:before { content: "\f133"; } .fa.fa-maxcdn { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-html5 { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-css3 { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-ticket:before { content: "\f3ff"; } .fa.fa-minus-square-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-minus-square-o:before { content: "\f146"; } .fa.fa-level-up:before { content: "\f3bf"; } .fa.fa-level-down:before { content: "\f3be"; } .fa.fa-pencil-square:before { content: "\f14b"; } .fa.fa-external-link-square:before { content: "\f360"; } .fa.fa-compass { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-caret-square-o-down { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-caret-square-o-down:before { content: "\f150"; } .fa.fa-toggle-down { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-toggle-down:before { content: "\f150"; } .fa.fa-caret-square-o-up { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-caret-square-o-up:before { content: "\f151"; } .fa.fa-toggle-up { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-toggle-up:before { content: "\f151"; } .fa.fa-caret-square-o-right { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-caret-square-o-right:before { content: "\f152"; } .fa.fa-toggle-right { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-toggle-right:before { content: "\f152"; } .fa.fa-eur:before { content: "\f153"; } .fa.fa-euro:before { content: "\f153"; } .fa.fa-gbp:before { content: "\f154"; } .fa.fa-usd:before { content: "\f155"; } .fa.fa-dollar:before { content: "\f155"; } .fa.fa-inr:before { content: "\f156"; } .fa.fa-rupee:before { content: "\f156"; } .fa.fa-jpy:before { content: "\f157"; } .fa.fa-cny:before { content: "\f157"; } .fa.fa-rmb:before { content: "\f157"; } .fa.fa-yen:before { content: "\f157"; } .fa.fa-rub:before { content: "\f158"; } .fa.fa-ruble:before { content: "\f158"; } .fa.fa-rouble:before { content: "\f158"; } .fa.fa-krw:before { content: "\f159"; } .fa.fa-won:before { content: "\f159"; } .fa.fa-btc { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-bitcoin { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-bitcoin:before { content: "\f15a"; } .fa.fa-file-text:before { content: "\f15c"; } .fa.fa-sort-alpha-asc:before { content: "\f15d"; } .fa.fa-sort-alpha-desc:before { content: "\f15e"; } .fa.fa-sort-amount-asc:before { content: "\f160"; } .fa.fa-sort-amount-desc:before { content: "\f161"; } .fa.fa-sort-numeric-asc:before { content: "\f162"; } .fa.fa-sort-numeric-desc:before { content: "\f163"; } .fa.fa-youtube-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-youtube { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-xing { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-xing-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-youtube-play { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-youtube-play:before { content: "\f167"; } .fa.fa-dropbox { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-stack-overflow { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-instagram { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-flickr { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-adn { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-bitbucket { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-bitbucket-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-bitbucket-square:before { content: "\f171"; } .fa.fa-tumblr { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-tumblr-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-long-arrow-down:before { content: "\f309"; } .fa.fa-long-arrow-up:before { content: "\f30c"; } .fa.fa-long-arrow-left:before { content: "\f30a"; } .fa.fa-long-arrow-right:before { content: "\f30b"; } .fa.fa-apple { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-windows { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-android { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-linux { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-dribbble { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-skype { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-foursquare { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-trello { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-gratipay { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-gittip { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-gittip:before { content: "\f184"; } .fa.fa-sun-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-sun-o:before { content: "\f185"; } .fa.fa-moon-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-moon-o:before { content: "\f186"; } .fa.fa-vk { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-weibo { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-renren { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-pagelines { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-stack-exchange { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-arrow-circle-o-right { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-arrow-circle-o-right:before { content: "\f35a"; } .fa.fa-arrow-circle-o-left { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-arrow-circle-o-left:before { content: "\f359"; } .fa.fa-caret-square-o-left { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-caret-square-o-left:before { content: "\f191"; } .fa.fa-toggle-left { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-toggle-left:before { content: "\f191"; } .fa.fa-dot-circle-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-dot-circle-o:before { content: "\f192"; } .fa.fa-vimeo-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-try:before { content: "\f195"; } .fa.fa-turkish-lira:before { content: "\f195"; } .fa.fa-plus-square-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-plus-square-o:before { content: "\f0fe"; } .fa.fa-slack { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-wordpress { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-openid { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-institution:before { content: "\f19c"; } .fa.fa-bank:before { content: "\f19c"; } .fa.fa-mortar-board:before { content: "\f19d"; } .fa.fa-yahoo { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-google { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-reddit { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-reddit-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-stumbleupon-circle { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-stumbleupon { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-delicious { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-digg { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-pied-piper-pp { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-pied-piper-alt { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-drupal { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-joomla { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-spoon:before { content: "\f2e5"; } .fa.fa-behance { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-behance-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-steam { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-steam-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-automobile:before { content: "\f1b9"; } .fa.fa-cab:before { content: "\f1ba"; } .fa.fa-envelope-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-envelope-o:before { content: "\f0e0"; } .fa.fa-deviantart { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-soundcloud { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-file-pdf-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-pdf-o:before { content: "\f1c1"; } .fa.fa-file-word-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-word-o:before { content: "\f1c2"; } .fa.fa-file-excel-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-excel-o:before { content: "\f1c3"; } .fa.fa-file-powerpoint-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-powerpoint-o:before { content: "\f1c4"; } .fa.fa-file-image-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-image-o:before { content: "\f1c5"; } .fa.fa-file-photo-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-photo-o:before { content: "\f1c5"; } .fa.fa-file-picture-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-picture-o:before { content: "\f1c5"; } .fa.fa-file-archive-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-archive-o:before { content: "\f1c6"; } .fa.fa-file-zip-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-zip-o:before { content: "\f1c6"; } .fa.fa-file-audio-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-audio-o:before { content: "\f1c7"; } .fa.fa-file-sound-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-sound-o:before { content: "\f1c7"; } .fa.fa-file-video-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-video-o:before { content: "\f1c8"; } .fa.fa-file-movie-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-movie-o:before { content: "\f1c8"; } .fa.fa-file-code-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-file-code-o:before { content: "\f1c9"; } .fa.fa-vine { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-codepen { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-jsfiddle { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-life-ring { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-life-bouy { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-life-bouy:before { content: "\f1cd"; } .fa.fa-life-buoy { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-life-buoy:before { content: "\f1cd"; } .fa.fa-life-saver { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-life-saver:before { content: "\f1cd"; } .fa.fa-support { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-support:before { content: "\f1cd"; } .fa.fa-circle-o-notch:before { content: "\f1ce"; } .fa.fa-rebel { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-ra { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-ra:before { content: "\f1d0"; } .fa.fa-resistance { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-resistance:before { content: "\f1d0"; } .fa.fa-empire { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-ge { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-ge:before { content: "\f1d1"; } .fa.fa-git-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-git { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-hacker-news { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-y-combinator-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-y-combinator-square:before { content: "\f1d4"; } .fa.fa-yc-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-yc-square:before { content: "\f1d4"; } .fa.fa-tencent-weibo { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-qq { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-weixin { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-wechat { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-wechat:before { content: "\f1d7"; } .fa.fa-send:before { content: "\f1d8"; } .fa.fa-paper-plane-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-paper-plane-o:before { content: "\f1d8"; } .fa.fa-send-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-send-o:before { content: "\f1d8"; } .fa.fa-circle-thin { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-circle-thin:before { content: "\f111"; } .fa.fa-header:before { content: "\f1dc"; } .fa.fa-sliders:before { content: "\f1de"; } .fa.fa-futbol-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-futbol-o:before { content: "\f1e3"; } .fa.fa-soccer-ball-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-soccer-ball-o:before { content: "\f1e3"; } .fa.fa-slideshare { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-twitch { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-yelp { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-newspaper-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-newspaper-o:before { content: "\f1ea"; } .fa.fa-paypal { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-google-wallet { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-cc-visa { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-cc-mastercard { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-cc-discover { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-cc-amex { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-cc-paypal { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-cc-stripe { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-bell-slash-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-bell-slash-o:before { content: "\f1f6"; } .fa.fa-trash:before { content: "\f2ed"; } .fa.fa-copyright { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-eyedropper:before { content: "\f1fb"; } .fa.fa-area-chart:before { content: "\f1fe"; } .fa.fa-pie-chart:before { content: "\f200"; } .fa.fa-line-chart:before { content: "\f201"; } .fa.fa-lastfm { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-lastfm-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-ioxhost { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-angellist { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-cc { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-cc:before { content: "\f20a"; } .fa.fa-ils:before { content: "\f20b"; } .fa.fa-shekel:before { content: "\f20b"; } .fa.fa-sheqel:before { content: "\f20b"; } .fa.fa-meanpath { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-meanpath:before { content: "\f2b4"; } .fa.fa-buysellads { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-connectdevelop { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-dashcube { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-forumbee { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-leanpub { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-sellsy { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-shirtsinbulk { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-simplybuilt { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-skyatlas { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-diamond { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-diamond:before { content: "\f3a5"; } .fa.fa-intersex:before { content: "\f224"; } .fa.fa-facebook-official { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-facebook-official:before { content: "\f09a"; } .fa.fa-pinterest-p { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-whatsapp { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-hotel:before { content: "\f236"; } .fa.fa-viacoin { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-medium { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-y-combinator { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-yc { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-yc:before { content: "\f23b"; } .fa.fa-optin-monster { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-opencart { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-expeditedssl { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-battery-4:before { content: "\f240"; } .fa.fa-battery:before { content: "\f240"; } .fa.fa-battery-3:before { content: "\f241"; } .fa.fa-battery-2:before { content: "\f242"; } .fa.fa-battery-1:before { content: "\f243"; } .fa.fa-battery-0:before { content: "\f244"; } .fa.fa-object-group { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-object-ungroup { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-sticky-note-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-sticky-note-o:before { content: "\f249"; } .fa.fa-cc-jcb { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-cc-diners-club { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-clone { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hourglass-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hourglass-o:before { content: "\f254"; } .fa.fa-hourglass-1:before { content: "\f251"; } .fa.fa-hourglass-2:before { content: "\f252"; } .fa.fa-hourglass-3:before { content: "\f253"; } .fa.fa-hand-rock-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hand-rock-o:before { content: "\f255"; } .fa.fa-hand-grab-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hand-grab-o:before { content: "\f255"; } .fa.fa-hand-paper-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hand-paper-o:before { content: "\f256"; } .fa.fa-hand-stop-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hand-stop-o:before { content: "\f256"; } .fa.fa-hand-scissors-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hand-scissors-o:before { content: "\f257"; } .fa.fa-hand-lizard-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hand-lizard-o:before { content: "\f258"; } .fa.fa-hand-spock-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hand-spock-o:before { content: "\f259"; } .fa.fa-hand-pointer-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hand-pointer-o:before { content: "\f25a"; } .fa.fa-hand-peace-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-hand-peace-o:before { content: "\f25b"; } .fa.fa-registered { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-creative-commons { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-gg { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-gg-circle { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-tripadvisor { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-odnoklassniki { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-odnoklassniki-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-get-pocket { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-wikipedia-w { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-safari { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-chrome { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-firefox { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-opera { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-internet-explorer { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-television:before { content: "\f26c"; } .fa.fa-contao { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-500px { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-amazon { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-calendar-plus-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-calendar-plus-o:before { content: "\f271"; } .fa.fa-calendar-minus-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-calendar-minus-o:before { content: "\f272"; } .fa.fa-calendar-times-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-calendar-times-o:before { content: "\f273"; } .fa.fa-calendar-check-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-calendar-check-o:before { content: "\f274"; } .fa.fa-map-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-map-o:before { content: "\f279"; } .fa.fa-commenting { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-commenting:before { content: "\f4ad"; } .fa.fa-commenting-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-commenting-o:before { content: "\f4ad"; } .fa.fa-houzz { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-vimeo { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-vimeo:before { content: "\f27d"; } .fa.fa-black-tie { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-fonticons { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-reddit-alien { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-edge { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-credit-card-alt:before { content: "\f09d"; } .fa.fa-codiepie { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-modx { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-fort-awesome { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-usb { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-product-hunt { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-mixcloud { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-scribd { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-pause-circle-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-pause-circle-o:before { content: "\f28b"; } .fa.fa-stop-circle-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-stop-circle-o:before { content: "\f28d"; } .fa.fa-bluetooth { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-bluetooth-b { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-gitlab { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-wpbeginner { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-wpforms { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-envira { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-wheelchair-alt { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-wheelchair-alt:before { content: "\f368"; } .fa.fa-question-circle-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-question-circle-o:before { content: "\f059"; } .fa.fa-volume-control-phone:before { content: "\f2a0"; } .fa.fa-asl-interpreting:before { content: "\f2a3"; } .fa.fa-deafness:before { content: "\f2a4"; } .fa.fa-hard-of-hearing:before { content: "\f2a4"; } .fa.fa-glide { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-glide-g { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-signing:before { content: "\f2a7"; } .fa.fa-viadeo { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-viadeo-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-snapchat { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-snapchat-ghost { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-snapchat-square { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-pied-piper { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-first-order { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-yoast { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-themeisle { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-google-plus-official { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-google-plus-official:before { content: "\f2b3"; } .fa.fa-google-plus-circle { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-google-plus-circle:before { content: "\f2b3"; } .fa.fa-font-awesome { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-fa { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-fa:before { content: "\f2b4"; } .fa.fa-handshake-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-handshake-o:before { content: "\f2b5"; } .fa.fa-envelope-open-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-envelope-open-o:before { content: "\f2b6"; } .fa.fa-linode { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-address-book-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-address-book-o:before { content: "\f2b9"; } .fa.fa-vcard:before { content: "\f2bb"; } .fa.fa-address-card-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-address-card-o:before { content: "\f2bb"; } .fa.fa-vcard-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-vcard-o:before { content: "\f2bb"; } .fa.fa-user-circle-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-user-circle-o:before { content: "\f2bd"; } .fa.fa-user-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-user-o:before { content: "\f007"; } .fa.fa-id-badge { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-drivers-license:before { content: "\f2c2"; } .fa.fa-id-card-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-id-card-o:before { content: "\f2c2"; } .fa.fa-drivers-license-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-drivers-license-o:before { content: "\f2c2"; } .fa.fa-quora { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-free-code-camp { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-telegram { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-thermometer-4:before { content: "\f2c7"; } .fa.fa-thermometer:before { content: "\f2c7"; } .fa.fa-thermometer-3:before { content: "\f2c8"; } .fa.fa-thermometer-2:before { content: "\f2c9"; } .fa.fa-thermometer-1:before { content: "\f2ca"; } .fa.fa-thermometer-0:before { content: "\f2cb"; } .fa.fa-bathtub:before { content: "\f2cd"; } .fa.fa-s15:before { content: "\f2cd"; } .fa.fa-window-maximize { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-window-restore { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-times-rectangle:before { content: "\f410"; } .fa.fa-window-close-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-window-close-o:before { content: "\f410"; } .fa.fa-times-rectangle-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-times-rectangle-o:before { content: "\f410"; } .fa.fa-bandcamp { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-grav { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-etsy { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-imdb { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-ravelry { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-eercast { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-eercast:before { content: "\f2da"; } .fa.fa-snowflake-o { font-family: 'Font Awesome 5 Free'; font-weight: 400; } .fa.fa-snowflake-o:before { content: "\f2dc"; } .fa.fa-superpowers { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-wpexplorer { font-family: 'Font Awesome 5 Brands'; font-weight: 400; } .fa.fa-spotify { font-family: 'Font Awesome 5 Brands'; font-weight: 400; }
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/v4-shims.min.css
CSS
/*! * Font Awesome Free 5.1.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ .fa.fa-glass:before{content:"\f000"}.fa.fa-meetup{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-star-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-o:before{content:"\f005"}.fa.fa-close:before,.fa.fa-remove:before{content:"\f00d"}.fa.fa-gear:before{content:"\f013"}.fa.fa-trash-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-trash-o:before{content:"\f2ed"}.fa.fa-file-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-o:before{content:"\f15b"}.fa.fa-clock-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-clock-o:before{content:"\f017"}.fa.fa-arrow-circle-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-down:before{content:"\f358"}.fa.fa-arrow-circle-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-up:before{content:"\f35b"}.fa.fa-play-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-play-circle-o:before{content:"\f144"}.fa.fa-repeat:before,.fa.fa-rotate-right:before{content:"\f01e"}.fa.fa-refresh:before{content:"\f021"}.fa.fa-list-alt{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-dedent:before{content:"\f03b"}.fa.fa-video-camera:before{content:"\f03d"}.fa.fa-picture-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-picture-o:before{content:"\f03e"}.fa.fa-photo{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-photo:before{content:"\f03e"}.fa.fa-image{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-image:before{content:"\f03e"}.fa.fa-pencil:before{content:"\f303"}.fa.fa-map-marker:before{content:"\f3c5"}.fa.fa-pencil-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-pencil-square-o:before{content:"\f044"}.fa.fa-share-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-share-square-o:before{content:"\f14d"}.fa.fa-check-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-check-square-o:before{content:"\f14a"}.fa.fa-arrows:before{content:"\f0b2"}.fa.fa-times-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-times-circle-o:before{content:"\f057"}.fa.fa-check-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-check-circle-o:before{content:"\f058"}.fa.fa-mail-forward:before{content:"\f064"}.fa.fa-eye,.fa.fa-eye-slash{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-warning:before{content:"\f071"}.fa.fa-calendar:before{content:"\f073"}.fa.fa-arrows-v:before{content:"\f338"}.fa.fa-arrows-h:before{content:"\f337"}.fa.fa-bar-chart{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bar-chart:before{content:"\f080"}.fa.fa-bar-chart-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bar-chart-o:before{content:"\f080"}.fa.fa-facebook-square,.fa.fa-twitter-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-gears:before{content:"\f085"}.fa.fa-thumbs-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-thumbs-o-up:before{content:"\f164"}.fa.fa-thumbs-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-thumbs-o-down:before{content:"\f165"}.fa.fa-heart-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-heart-o:before{content:"\f004"}.fa.fa-sign-out:before{content:"\f2f5"}.fa.fa-linkedin-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-linkedin-square:before{content:"\f08c"}.fa.fa-thumb-tack:before{content:"\f08d"}.fa.fa-external-link:before{content:"\f35d"}.fa.fa-sign-in:before{content:"\f2f6"}.fa.fa-github-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-lemon-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-lemon-o:before{content:"\f094"}.fa.fa-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-square-o:before{content:"\f0c8"}.fa.fa-bookmark-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bookmark-o:before{content:"\f02e"}.fa.fa-facebook,.fa.fa-twitter{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-facebook:before{content:"\f39e"}.fa.fa-facebook-f{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-facebook-f:before{content:"\f39e"}.fa.fa-github{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-credit-card{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-feed:before{content:"\f09e"}.fa.fa-hdd-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hdd-o:before{content:"\f0a0"}.fa.fa-hand-o-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-right:before{content:"\f0a4"}.fa.fa-hand-o-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-left:before{content:"\f0a5"}.fa.fa-hand-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-up:before{content:"\f0a6"}.fa.fa-hand-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-down:before{content:"\f0a7"}.fa.fa-arrows-alt:before{content:"\f31e"}.fa.fa-group:before{content:"\f0c0"}.fa.fa-chain:before{content:"\f0c1"}.fa.fa-scissors:before{content:"\f0c4"}.fa.fa-files-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-files-o:before{content:"\f0c5"}.fa.fa-floppy-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-floppy-o:before{content:"\f0c7"}.fa.fa-navicon:before,.fa.fa-reorder:before{content:"\f0c9"}.fa.fa-google-plus,.fa.fa-google-plus-square,.fa.fa-pinterest,.fa.fa-pinterest-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-google-plus:before{content:"\f0d5"}.fa.fa-money{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-money:before{content:"\f3d1"}.fa.fa-unsorted:before{content:"\f0dc"}.fa.fa-sort-desc:before{content:"\f0dd"}.fa.fa-sort-asc:before{content:"\f0de"}.fa.fa-linkedin{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-linkedin:before{content:"\f0e1"}.fa.fa-rotate-left:before{content:"\f0e2"}.fa.fa-legal:before{content:"\f0e3"}.fa.fa-dashboard:before,.fa.fa-tachometer:before{content:"\f3fd"}.fa.fa-comment-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-comment-o:before{content:"\f075"}.fa.fa-comments-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-comments-o:before{content:"\f086"}.fa.fa-flash:before{content:"\f0e7"}.fa.fa-clipboard,.fa.fa-paste{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-paste:before{content:"\f328"}.fa.fa-lightbulb-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-lightbulb-o:before{content:"\f0eb"}.fa.fa-exchange:before{content:"\f362"}.fa.fa-cloud-download:before{content:"\f381"}.fa.fa-cloud-upload:before{content:"\f382"}.fa.fa-bell-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bell-o:before{content:"\f0f3"}.fa.fa-cutlery:before{content:"\f2e7"}.fa.fa-file-text-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-text-o:before{content:"\f15c"}.fa.fa-building-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-building-o:before{content:"\f1ad"}.fa.fa-hospital-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hospital-o:before{content:"\f0f8"}.fa.fa-tablet:before{content:"\f3fa"}.fa.fa-mobile-phone:before,.fa.fa-mobile:before{content:"\f3cd"}.fa.fa-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-circle-o:before{content:"\f111"}.fa.fa-mail-reply:before{content:"\f3e5"}.fa.fa-github-alt{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-folder-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-folder-o:before{content:"\f07b"}.fa.fa-folder-open-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-folder-open-o:before{content:"\f07c"}.fa.fa-smile-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-smile-o:before{content:"\f118"}.fa.fa-frown-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-frown-o:before{content:"\f119"}.fa.fa-meh-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-meh-o:before{content:"\f11a"}.fa.fa-keyboard-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-keyboard-o:before{content:"\f11c"}.fa.fa-flag-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-flag-o:before{content:"\f024"}.fa.fa-mail-reply-all:before{content:"\f122"}.fa.fa-star-half-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-half-o:before{content:"\f089"}.fa.fa-star-half-empty{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-half-empty:before{content:"\f089"}.fa.fa-star-half-full{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-half-full:before{content:"\f089"}.fa.fa-code-fork:before{content:"\f126"}.fa.fa-chain-broken:before{content:"\f127"}.fa.fa-shield:before{content:"\f3ed"}.fa.fa-calendar-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-o:before{content:"\f133"}.fa.fa-css3,.fa.fa-html5,.fa.fa-maxcdn{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-ticket:before{content:"\f3ff"}.fa.fa-minus-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-minus-square-o:before{content:"\f146"}.fa.fa-level-up:before{content:"\f3bf"}.fa.fa-level-down:before{content:"\f3be"}.fa.fa-pencil-square:before{content:"\f14b"}.fa.fa-external-link-square:before{content:"\f360"}.fa.fa-compass{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-down:before{content:"\f150"}.fa.fa-toggle-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-down:before{content:"\f150"}.fa.fa-caret-square-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-up:before{content:"\f151"}.fa.fa-toggle-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-up:before{content:"\f151"}.fa.fa-caret-square-o-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-right:before{content:"\f152"}.fa.fa-toggle-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-right:before{content:"\f152"}.fa.fa-eur:before,.fa.fa-euro:before{content:"\f153"}.fa.fa-gbp:before{content:"\f154"}.fa.fa-dollar:before,.fa.fa-usd:before{content:"\f155"}.fa.fa-inr:before,.fa.fa-rupee:before{content:"\f156"}.fa.fa-cny:before,.fa.fa-jpy:before,.fa.fa-rmb:before,.fa.fa-yen:before{content:"\f157"}.fa.fa-rouble:before,.fa.fa-rub:before,.fa.fa-ruble:before{content:"\f158"}.fa.fa-krw:before,.fa.fa-won:before{content:"\f159"}.fa.fa-bitcoin,.fa.fa-btc{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bitcoin:before{content:"\f15a"}.fa.fa-file-text:before{content:"\f15c"}.fa.fa-sort-alpha-asc:before{content:"\f15d"}.fa.fa-sort-alpha-desc:before{content:"\f15e"}.fa.fa-sort-amount-asc:before{content:"\f160"}.fa.fa-sort-amount-desc:before{content:"\f161"}.fa.fa-sort-numeric-asc:before{content:"\f162"}.fa.fa-sort-numeric-desc:before{content:"\f163"}.fa.fa-xing,.fa.fa-xing-square,.fa.fa-youtube,.fa.fa-youtube-play,.fa.fa-youtube-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-youtube-play:before{content:"\f167"}.fa.fa-adn,.fa.fa-bitbucket,.fa.fa-bitbucket-square,.fa.fa-dropbox,.fa.fa-flickr,.fa.fa-instagram,.fa.fa-stack-overflow{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bitbucket-square:before{content:"\f171"}.fa.fa-tumblr,.fa.fa-tumblr-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-long-arrow-down:before{content:"\f309"}.fa.fa-long-arrow-up:before{content:"\f30c"}.fa.fa-long-arrow-left:before{content:"\f30a"}.fa.fa-long-arrow-right:before{content:"\f30b"}.fa.fa-android,.fa.fa-apple,.fa.fa-dribbble,.fa.fa-foursquare,.fa.fa-gittip,.fa.fa-gratipay,.fa.fa-linux,.fa.fa-skype,.fa.fa-trello,.fa.fa-windows{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-gittip:before{content:"\f184"}.fa.fa-sun-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-sun-o:before{content:"\f185"}.fa.fa-moon-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-moon-o:before{content:"\f186"}.fa.fa-pagelines,.fa.fa-renren,.fa.fa-stack-exchange,.fa.fa-vk,.fa.fa-weibo{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-arrow-circle-o-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-right:before{content:"\f35a"}.fa.fa-arrow-circle-o-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-left:before{content:"\f359"}.fa.fa-caret-square-o-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-left:before{content:"\f191"}.fa.fa-toggle-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-left:before{content:"\f191"}.fa.fa-dot-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-dot-circle-o:before{content:"\f192"}.fa.fa-vimeo-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-try:before,.fa.fa-turkish-lira:before{content:"\f195"}.fa.fa-plus-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-plus-square-o:before{content:"\f0fe"}.fa.fa-openid,.fa.fa-slack,.fa.fa-wordpress{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bank:before,.fa.fa-institution:before{content:"\f19c"}.fa.fa-mortar-board:before{content:"\f19d"}.fa.fa-delicious,.fa.fa-digg,.fa.fa-drupal,.fa.fa-google,.fa.fa-joomla,.fa.fa-pied-piper-alt,.fa.fa-pied-piper-pp,.fa.fa-reddit,.fa.fa-reddit-square,.fa.fa-stumbleupon,.fa.fa-stumbleupon-circle,.fa.fa-yahoo{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-spoon:before{content:"\f2e5"}.fa.fa-behance,.fa.fa-behance-square,.fa.fa-steam,.fa.fa-steam-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-automobile:before{content:"\f1b9"}.fa.fa-cab:before{content:"\f1ba"}.fa.fa-envelope-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-envelope-o:before{content:"\f0e0"}.fa.fa-deviantart,.fa.fa-soundcloud{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-file-pdf-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-pdf-o:before{content:"\f1c1"}.fa.fa-file-word-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-word-o:before{content:"\f1c2"}.fa.fa-file-excel-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-excel-o:before{content:"\f1c3"}.fa.fa-file-powerpoint-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-powerpoint-o:before{content:"\f1c4"}.fa.fa-file-image-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-image-o:before{content:"\f1c5"}.fa.fa-file-photo-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-photo-o:before{content:"\f1c5"}.fa.fa-file-picture-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-picture-o:before{content:"\f1c5"}.fa.fa-file-archive-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-archive-o:before{content:"\f1c6"}.fa.fa-file-zip-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-zip-o:before{content:"\f1c6"}.fa.fa-file-audio-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-audio-o:before{content:"\f1c7"}.fa.fa-file-sound-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-sound-o:before{content:"\f1c7"}.fa.fa-file-video-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-video-o:before{content:"\f1c8"}.fa.fa-file-movie-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-movie-o:before{content:"\f1c8"}.fa.fa-file-code-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-code-o:before{content:"\f1c9"}.fa.fa-codepen,.fa.fa-jsfiddle,.fa.fa-vine{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-life-bouy,.fa.fa-life-ring{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-life-bouy:before{content:"\f1cd"}.fa.fa-life-buoy{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-life-buoy:before{content:"\f1cd"}.fa.fa-life-saver{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-life-saver:before{content:"\f1cd"}.fa.fa-support{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-support:before{content:"\f1cd"}.fa.fa-circle-o-notch:before{content:"\f1ce"}.fa.fa-ra,.fa.fa-rebel{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-ra:before{content:"\f1d0"}.fa.fa-resistance{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-resistance:before{content:"\f1d0"}.fa.fa-empire,.fa.fa-ge{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-ge:before{content:"\f1d1"}.fa.fa-git,.fa.fa-git-square,.fa.fa-hacker-news,.fa.fa-y-combinator-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-y-combinator-square:before{content:"\f1d4"}.fa.fa-yc-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-yc-square:before{content:"\f1d4"}.fa.fa-qq,.fa.fa-tencent-weibo,.fa.fa-wechat,.fa.fa-weixin{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-wechat:before{content:"\f1d7"}.fa.fa-send:before{content:"\f1d8"}.fa.fa-paper-plane-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-paper-plane-o:before{content:"\f1d8"}.fa.fa-send-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-send-o:before{content:"\f1d8"}.fa.fa-circle-thin{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-circle-thin:before{content:"\f111"}.fa.fa-header:before{content:"\f1dc"}.fa.fa-sliders:before{content:"\f1de"}.fa.fa-futbol-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-futbol-o:before{content:"\f1e3"}.fa.fa-soccer-ball-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-soccer-ball-o:before{content:"\f1e3"}.fa.fa-slideshare,.fa.fa-twitch,.fa.fa-yelp{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-newspaper-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-newspaper-o:before{content:"\f1ea"}.fa.fa-cc-amex,.fa.fa-cc-discover,.fa.fa-cc-mastercard,.fa.fa-cc-paypal,.fa.fa-cc-stripe,.fa.fa-cc-visa,.fa.fa-google-wallet,.fa.fa-paypal{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bell-slash-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bell-slash-o:before{content:"\f1f6"}.fa.fa-trash:before{content:"\f2ed"}.fa.fa-copyright{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-eyedropper:before{content:"\f1fb"}.fa.fa-area-chart:before{content:"\f1fe"}.fa.fa-pie-chart:before{content:"\f200"}.fa.fa-line-chart:before{content:"\f201"}.fa.fa-angellist,.fa.fa-ioxhost,.fa.fa-lastfm,.fa.fa-lastfm-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-cc{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-cc:before{content:"\f20a"}.fa.fa-ils:before,.fa.fa-shekel:before,.fa.fa-sheqel:before{content:"\f20b"}.fa.fa-meanpath{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-meanpath:before{content:"\f2b4"}.fa.fa-buysellads,.fa.fa-connectdevelop,.fa.fa-dashcube,.fa.fa-forumbee,.fa.fa-leanpub,.fa.fa-sellsy,.fa.fa-shirtsinbulk,.fa.fa-simplybuilt,.fa.fa-skyatlas{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-diamond{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-diamond:before{content:"\f3a5"}.fa.fa-intersex:before{content:"\f224"}.fa.fa-facebook-official{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-facebook-official:before{content:"\f09a"}.fa.fa-pinterest-p,.fa.fa-whatsapp{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-hotel:before{content:"\f236"}.fa.fa-medium,.fa.fa-viacoin,.fa.fa-y-combinator,.fa.fa-yc{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-yc:before{content:"\f23b"}.fa.fa-expeditedssl,.fa.fa-opencart,.fa.fa-optin-monster{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-battery-4:before,.fa.fa-battery:before{content:"\f240"}.fa.fa-battery-3:before{content:"\f241"}.fa.fa-battery-2:before{content:"\f242"}.fa.fa-battery-1:before{content:"\f243"}.fa.fa-battery-0:before{content:"\f244"}.fa.fa-object-group,.fa.fa-object-ungroup,.fa.fa-sticky-note-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-sticky-note-o:before{content:"\f249"}.fa.fa-cc-diners-club,.fa.fa-cc-jcb{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-clone,.fa.fa-hourglass-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hourglass-o:before{content:"\f254"}.fa.fa-hourglass-1:before{content:"\f251"}.fa.fa-hourglass-2:before{content:"\f252"}.fa.fa-hourglass-3:before{content:"\f253"}.fa.fa-hand-rock-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-rock-o:before{content:"\f255"}.fa.fa-hand-grab-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-grab-o:before{content:"\f255"}.fa.fa-hand-paper-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-paper-o:before{content:"\f256"}.fa.fa-hand-stop-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-stop-o:before{content:"\f256"}.fa.fa-hand-scissors-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-scissors-o:before{content:"\f257"}.fa.fa-hand-lizard-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-lizard-o:before{content:"\f258"}.fa.fa-hand-spock-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-spock-o:before{content:"\f259"}.fa.fa-hand-pointer-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-pointer-o:before{content:"\f25a"}.fa.fa-hand-peace-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-peace-o:before{content:"\f25b"}.fa.fa-registered{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-chrome,.fa.fa-creative-commons,.fa.fa-firefox,.fa.fa-get-pocket,.fa.fa-gg,.fa.fa-gg-circle,.fa.fa-internet-explorer,.fa.fa-odnoklassniki,.fa.fa-odnoklassniki-square,.fa.fa-opera,.fa.fa-safari,.fa.fa-tripadvisor,.fa.fa-wikipedia-w{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-television:before{content:"\f26c"}.fa.fa-500px,.fa.fa-amazon,.fa.fa-contao{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-calendar-plus-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-plus-o:before{content:"\f271"}.fa.fa-calendar-minus-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-minus-o:before{content:"\f272"}.fa.fa-calendar-times-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-times-o:before{content:"\f273"}.fa.fa-calendar-check-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-check-o:before{content:"\f274"}.fa.fa-map-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-map-o:before{content:"\f279"}.fa.fa-commenting{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-commenting:before{content:"\f4ad"}.fa.fa-commenting-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-commenting-o:before{content:"\f4ad"}.fa.fa-houzz,.fa.fa-vimeo{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-vimeo:before{content:"\f27d"}.fa.fa-black-tie,.fa.fa-edge,.fa.fa-fonticons,.fa.fa-reddit-alien{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-credit-card-alt:before{content:"\f09d"}.fa.fa-codiepie,.fa.fa-fort-awesome,.fa.fa-mixcloud,.fa.fa-modx,.fa.fa-product-hunt,.fa.fa-scribd,.fa.fa-usb{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-pause-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-pause-circle-o:before{content:"\f28b"}.fa.fa-stop-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-stop-circle-o:before{content:"\f28d"}.fa.fa-bluetooth,.fa.fa-bluetooth-b,.fa.fa-envira,.fa.fa-gitlab,.fa.fa-wheelchair-alt,.fa.fa-wpbeginner,.fa.fa-wpforms{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-wheelchair-alt:before{content:"\f368"}.fa.fa-question-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-question-circle-o:before{content:"\f059"}.fa.fa-volume-control-phone:before{content:"\f2a0"}.fa.fa-asl-interpreting:before{content:"\f2a3"}.fa.fa-deafness:before,.fa.fa-hard-of-hearing:before{content:"\f2a4"}.fa.fa-glide,.fa.fa-glide-g{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-signing:before{content:"\f2a7"}.fa.fa-first-order,.fa.fa-google-plus-official,.fa.fa-pied-piper,.fa.fa-snapchat,.fa.fa-snapchat-ghost,.fa.fa-snapchat-square,.fa.fa-themeisle,.fa.fa-viadeo,.fa.fa-viadeo-square,.fa.fa-yoast{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-google-plus-official:before{content:"\f2b3"}.fa.fa-google-plus-circle{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-google-plus-circle:before{content:"\f2b3"}.fa.fa-fa,.fa.fa-font-awesome{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-fa:before{content:"\f2b4"}.fa.fa-handshake-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-handshake-o:before{content:"\f2b5"}.fa.fa-envelope-open-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-envelope-open-o:before{content:"\f2b6"}.fa.fa-linode{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-address-book-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-address-book-o:before{content:"\f2b9"}.fa.fa-vcard:before{content:"\f2bb"}.fa.fa-address-card-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-address-card-o:before{content:"\f2bb"}.fa.fa-vcard-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-vcard-o:before{content:"\f2bb"}.fa.fa-user-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-user-circle-o:before{content:"\f2bd"}.fa.fa-user-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-user-o:before{content:"\f007"}.fa.fa-id-badge{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-drivers-license:before{content:"\f2c2"}.fa.fa-id-card-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-id-card-o:before{content:"\f2c2"}.fa.fa-drivers-license-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-drivers-license-o:before{content:"\f2c2"}.fa.fa-free-code-camp,.fa.fa-quora,.fa.fa-telegram{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-thermometer-4:before,.fa.fa-thermometer:before{content:"\f2c7"}.fa.fa-thermometer-3:before{content:"\f2c8"}.fa.fa-thermometer-2:before{content:"\f2c9"}.fa.fa-thermometer-1:before{content:"\f2ca"}.fa.fa-thermometer-0:before{content:"\f2cb"}.fa.fa-bathtub:before,.fa.fa-s15:before{content:"\f2cd"}.fa.fa-window-maximize,.fa.fa-window-restore{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-times-rectangle:before{content:"\f410"}.fa.fa-window-close-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-window-close-o:before{content:"\f410"}.fa.fa-times-rectangle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-times-rectangle-o:before{content:"\f410"}.fa.fa-bandcamp,.fa.fa-eercast,.fa.fa-etsy,.fa.fa-grav,.fa.fa-imdb,.fa.fa-ravelry{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-eercast:before{content:"\f2da"}.fa.fa-snowflake-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-snowflake-o:before{content:"\f2dc"}.fa.fa-spotify,.fa.fa-superpowers,.fa.fa-wpexplorer{font-family:"Font Awesome 5 Brands";font-weight:400}
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/reveal-chalkboard/plugin.js
JavaScript
/***************************************************************** ** Author: Asvin Goel, goel@telematique.eu ** ** A plugin for reveal.js adding a chalkboard. ** ** Version: 2.1.0 ** ** License: MIT license (see LICENSE.md) ** ** Credits: ** Chalkboard effect by Mohamed Moustafa https://github.com/mmoustafa/Chalkboard ** Multi color support initially added by Kurt Rinnert https://github.com/rinnert ** Compatibility with reveal.js v4 by Hakim El Hattab https://github.com/hakimel ******************************************************************/ window.RevealChalkboard = window.RevealChalkboard || { id: 'RevealChalkboard', init: function ( deck ) { initChalkboard( deck ); }, configure: function ( config ) { configure( config ); }, toggleNotesCanvas: function () { toggleNotesCanvas(); }, toggleChalkboard: function () { toggleChalkboard(); }, colorIndex: function () { colorIndex(); }, colorNext: function () { colorNext(); }, colorPrev: function () { colorPrev(); }, clear: function () { clear(); }, reset: function () { reset(); }, resetAll: function () { resetAll(); }, updateStorage: function () { updateStorage(); }, getData: function () { return getData(); }, download: function () { download(); }, }; function scriptPath() { // obtain plugin path from the script element var src; if ( document.currentScript ) { src = document.currentScript.src; } else { var sel = document.querySelector( 'script[src$="/chalkboard/plugin.js"]' ) if ( sel ) { src = sel.src; } } var path = ( src === undefined ) ? "" : src.slice( 0, src.lastIndexOf( "/" ) + 1 ); //console.log("Path: " + path); return path; } var path = scriptPath(); const initChalkboard = function ( Reveal ) { //console.warn(path); /* Feature detection for passive event handling*/ var passiveSupported = false; try { window.addEventListener( 'test', null, Object.defineProperty( {}, 'passive', { get: function () { passiveSupported = true; } } ) ); } catch ( err ) {} /***************************************************************** ** Configuration ******************************************************************/ var background, pen, draw, color; var grid = false; var boardmarkerWidth = 3; var chalkWidth = 7; var chalkEffect = 1.0; var rememberColor = [ true, false ]; var eraser = { src: path + 'img/sponge.png', radius: 20 }; var boardmarkers = [ { color: 'rgba(100,100,100,1)', cursor: 'url(' + path + 'img/boardmarker-black.png), auto' }, { color: 'rgba(30,144,255, 1)', cursor: 'url(' + path + 'img/boardmarker-blue.png), auto' }, { color: 'rgba(220,20,60,1)', cursor: 'url(' + path + 'img/boardmarker-red.png), auto' }, { color: 'rgba(50,205,50,1)', cursor: 'url(' + path + 'img/boardmarker-green.png), auto' }, { color: 'rgba(255,140,0,1)', cursor: 'url(' + path + 'img/boardmarker-orange.png), auto' }, { color: 'rgba(150,0,20150,1)', cursor: 'url(' + path + 'img/boardmarker-purple.png), auto' }, { color: 'rgba(255,220,0,1)', cursor: 'url(' + path + 'img/boardmarker-yellow.png), auto' } ]; var chalks = [ { color: 'rgba(255,255,255,0.5)', cursor: 'url(' + path + 'img/chalk-white.png), auto' }, { color: 'rgba(96, 154, 244, 0.5)', cursor: 'url(' + path + 'img/chalk-blue.png), auto' }, { color: 'rgba(237, 20, 28, 0.5)', cursor: 'url(' + path + 'img/chalk-red.png), auto' }, { color: 'rgba(20, 237, 28, 0.5)', cursor: 'url(' + path + 'img/chalk-green.png), auto' }, { color: 'rgba(220, 133, 41, 0.5)', cursor: 'url(' + path + 'img/chalk-orange.png), auto' }, { color: 'rgba(220,0,220,0.5)', cursor: 'url(' + path + 'img/chalk-purple.png), auto' }, { color: 'rgba(255,220,0,0.5)', cursor: 'url(' + path + 'img/chalk-yellow.png), auto' } ]; var keyBindings = { toggleNotesCanvas: { keyCode: 67, key: 'C', description: 'Toggle notes canvas' }, toggleChalkboard: { keyCode: 66, key: 'B', description: 'Toggle chalkboard' }, clear: { keyCode: 46, key: 'DEL', description: 'Clear drawings on slide' }, /* reset: { keyCode: 173, key: '-', description: 'Reset drawings on slide' }, */ resetAll: { keyCode: 8, key: 'BACKSPACE', description: 'Reset all drawings' }, colorNext: { keyCode: 88, key: 'X', description: 'Next color' }, colorPrev: { keyCode: 89, key: 'Y', description: 'Previous color' }, download: { keyCode: 68, key: 'D', description: 'Download drawings' } }; var theme = 'chalkboard'; var color = [ 0, 0 ]; var toggleChalkboardButton = false; var toggleNotesButton = false; var colorButtons = true; var boardHandle = true; var transition = 800; var readOnly = false; var messageType = 'broadcast'; var config = configure( Reveal.getConfig().chalkboard || {} ); if ( config.keyBindings ) { for ( var key in config.keyBindings ) { keyBindings[ key ] = config.keyBindings[ key ]; }; } function configure( config ) { if ( config.boardmarkerWidth || config.penWidth ) boardmarkerWidth = config.boardmarkerWidth || config.penWidth; if ( config.chalkWidth ) chalkWidth = config.chalkWidth; if ( config.chalkEffect ) chalkEffect = config.chalkEffect; if ( config.rememberColor ) rememberColor = config.rememberColor; if ( config.eraser ) eraser = config.eraser; if ( config.boardmarkers ) boardmarkers = config.boardmarkers; if ( config.chalks ) chalks = config.chalks; if ( config.theme ) theme = config.theme; switch ( theme ) { case 'whiteboard': background = [ 'rgba(127,127,127,.1)', path + 'img/whiteboard.png' ]; draw = [ drawWithBoardmarker, drawWithBoardmarker ]; pens = [ boardmarkers, boardmarkers ]; grid = { color: 'rgb(127,127,255,0.1)', distance: 40, width: 2 }; break; case 'chalkboard': default: background = [ 'rgba(127,127,127,.1)', path + 'img/blackboard.png' ]; draw = [ drawWithBoardmarker, drawWithChalk ]; pens = [ boardmarkers, chalks ]; grid = { color: 'rgb(50,50,10,0.5)', distance: 80, width: 2 }; } if ( config.background ) background = config.background; if ( config.grid != undefined ) grid = config.grid; if ( config.toggleChalkboardButton != undefined ) toggleChalkboardButton = config.toggleChalkboardButton; if ( config.toggleNotesButton != undefined ) toggleNotesButton = config.toggleNotesButton; if ( config.colorButtons != undefined ) colorButtons = config.colorButtons; if ( config.boardHandle != undefined ) boardHandle = config.boardHandle; if ( config.transition ) transition = config.transition; if ( config.readOnly != undefined ) readOnly = config.readOnly; if ( config.messageType ) messageType = config.messageType; if ( drawingCanvas && ( config.theme || config.background || config.grid ) ) { var canvas = document.getElementById( drawingCanvas[ 1 ].id ); canvas.style.background = 'url("' + background[ 1 ] + '") repeat'; clearCanvas( 1 ); drawGrid(); } return config; } /***************************************************************** ** Setup ******************************************************************/ function whenReady( callback ) { // wait for markdown to be parsed and code to be highlighted if ( !document.querySelector( 'section[data-markdown]:not([data-markdown-parsed])' ) && !document.querySelector( 'code[data-line-numbers*="|"]') ) { callback(); } else { console.log( "Wait for markdown to be parsed and code to be highlighted" ); setTimeout( whenReady, 500, callback ) } } function whenLoaded( callback ) { // wait for drawings to be loaded and markdown to be parsed if ( loaded !== null ) { callback(); } else { console.log( "Wait for drawings to be loaded" ); setTimeout( whenLoaded, 500, callback ) } } if ( toggleChalkboardButton ) { console.warn( "toggleChalkboardButton is deprecated, use customcontrols plugin instead!" ); //console.log("toggleChalkboardButton") var button = document.createElement( 'div' ); button.className = "chalkboard-button"; button.id = "toggle-chalkboard"; button.style.visibility = "visible"; button.style.position = "absolute"; button.style.zIndex = 30; button.style.fontSize = "24px"; button.style.left = toggleChalkboardButton.left || "30px"; button.style.bottom = toggleChalkboardButton.bottom || "30px"; button.style.top = toggleChalkboardButton.top || "auto"; button.style.right = toggleChalkboardButton.right || "auto"; button.innerHTML = '<a href="#" title="Toggle chalkboard (' + keyBindings.toggleChalkboard.key + ')" onclick="RevealChalkboard.toggleChalkboard(); return false;"><i class="fa fa-pen-square"></i></a>' document.querySelector( ".reveal" ).appendChild( button ); } if ( toggleNotesButton ) { console.warn( "toggleNotesButton is deprecated, use customcontrols plugin instead!" ); //console.log("toggleNotesButton") var button = document.createElement( 'div' ); button.className = "chalkboard-button"; button.id = "toggle-notes"; button.style.position = "absolute"; button.style.zIndex = 30; button.style.fontSize = "24px"; button.style.left = toggleNotesButton.left || "70px"; button.style.bottom = toggleNotesButton.bottom || "30px"; button.style.top = toggleNotesButton.top || "auto"; button.style.right = toggleNotesButton.right || "auto"; button.innerHTML = '<a href="#" title="Toggle slide annotation (' + keyBindings.toggleNotesCanvas.key + ')" onclick="RevealChalkboard.toggleNotesCanvas(); return false;"><i class="fa fa-pen"></i></a>' document.querySelector( ".reveal" ).appendChild( button ); } var drawingCanvas = [ { id: 'notescanvas' }, { id: 'chalkboard' } ]; setupDrawingCanvas( 0 ); setupDrawingCanvas( 1 ); var mode = 0; // 0: notes canvas, 1: chalkboard var board = 0; // board index (only for chalkboard) var mouseX = 0; var mouseY = 0; var lastX = null; var lastY = null; var drawing = false; var erasing = false; var slideStart = Date.now(); var slideIndices = { h: 0, v: 0 }; var timeouts = [ [], [] ]; var touchTimeout = null; var slidechangeTimeout = null; var updateStorageTimeout = null; var playback = false; function createPalette( colors, length ) { if ( length === true || length > colors.length ) { length = colors.length; } var palette = document.createElement( 'div' ); palette.classList.add( 'palette' ); var list = document.createElement( 'ul' ); // color pickers for ( var i = 0; i < length; i++ ) { var colorButton = document.createElement( 'li' ); colorButton.setAttribute( 'data-color', i ); colorButton.innerHTML = '<i class="fa fa-square"></i>'; colorButton.style.color = colors[ i ].color; colorButton.addEventListener( 'click', function ( e ) { var element = e.target; while ( !element.hasAttribute( 'data-color' ) ) { element = element.parentElement; } colorIndex( parseInt( element.getAttribute( 'data-color' ) ) ); } ); colorButton.addEventListener( 'touchstart', function ( e ) { var element = e.target; while ( !element.hasAttribute( 'data-color' ) ) { element = element.parentElement; } colorIndex( parseInt( element.getAttribute( 'data-color' ) ) ); } ); list.appendChild( colorButton ); } palette.appendChild( list ); return palette; }; function switchBoard( boardIdx ) { selectBoard( boardIdx, true ); // broadcast var message = new CustomEvent( messageType ); message.content = { sender: 'chalkboard-plugin', type: 'selectboard', timestamp: Date.now() - slideStart, mode, board }; document.dispatchEvent( message ); } function setupDrawingCanvas( id ) { var container = document.createElement( 'div' ); container.id = drawingCanvas[ id ].id; container.classList.add( 'overlay' ); container.setAttribute( 'data-prevent-swipe', 'true' ); container.oncontextmenu = function () { return false; } container.style.cursor = pens[ id ][ color[ id ] ].cursor; drawingCanvas[ id ].width = window.innerWidth; drawingCanvas[ id ].height = window.innerHeight; drawingCanvas[ id ].scale = 1; drawingCanvas[ id ].xOffset = 0; drawingCanvas[ id ].yOffset = 0; if ( id == "0" ) { container.style.background = 'rgba(0,0,0,0)'; container.style.zIndex = 24; container.style.opacity = 1; container.style.visibility = 'visible'; container.style.pointerEvents = 'none'; var slides = document.querySelector( '.slides' ); var aspectRatio = Reveal.getConfig().width / Reveal.getConfig().height; if ( drawingCanvas[ id ].width > drawingCanvas[ id ].height * aspectRatio ) { drawingCanvas[ id ].xOffset = ( drawingCanvas[ id ].width - drawingCanvas[ id ].height * aspectRatio ) / 2; } else if ( drawingCanvas[ id ].height > drawingCanvas[ id ].width / aspectRatio ) { drawingCanvas[ id ].yOffset = ( drawingCanvas[ id ].height - drawingCanvas[ id ].width / aspectRatio ) / 2; } if ( colorButtons ) { var palette = createPalette( boardmarkers, colorButtons ); palette.style.visibility = 'hidden'; // only show palette in drawing mode container.appendChild( palette ); } } else { container.style.background = 'url("' + background[ id ] + '") repeat'; container.style.zIndex = 26; container.style.opacity = 0; container.style.visibility = 'hidden'; if ( colorButtons ) { var palette = createPalette( chalks, colorButtons ); container.appendChild( palette ); } if ( boardHandle ) { var handle = document.createElement( 'div' ); handle.classList.add( 'boardhandle' ); handle.innerHTML = '<ul><li><a id="previousboard" href="#" title="Previous board"><i class="fas fa-chevron-up"></i></a></li><li><a id="nextboard" href="#" title="Next board"><i class="fas fa-chevron-down"></i></a></li></ul>'; handle.querySelector( '#previousboard' ).addEventListener( 'click', function ( e ) { e.preventDefault(); switchBoard( board - 1 ); } ); handle.querySelector( '#nextboard' ).addEventListener( 'click', function ( e ) { e.preventDefault(); switchBoard( board + 1 ); } ); handle.querySelector( '#previousboard' ).addEventListener( 'touchstart', function ( e ) { e.preventDefault(); switchBoard( board - 1 ); } ); handle.querySelector( '#nextboard' ).addEventListener( 'touchstart', function ( e ) { e.preventDefault(); switchBoard( board + 1 ); } ); container.appendChild( handle ); } } var sponge = document.createElement( 'img' ); sponge.src = eraser.src; sponge.id = 'sponge'; sponge.style.visibility = 'hidden'; sponge.style.position = 'absolute'; container.appendChild( sponge ); drawingCanvas[ id ].sponge = sponge; var canvas = document.createElement( 'canvas' ); canvas.width = drawingCanvas[ id ].width; canvas.height = drawingCanvas[ id ].height; canvas.setAttribute( 'data-chalkboard', id ); canvas.style.cursor = pens[ id ][ color[ id ] ].cursor; container.appendChild( canvas ); drawingCanvas[ id ].canvas = canvas; drawingCanvas[ id ].context = canvas.getContext( '2d' ); setupCanvasEvents( container ); document.querySelector( '.reveal' ).appendChild( container ); drawingCanvas[ id ].container = container; } /***************************************************************** ** Storage ******************************************************************/ var storage = [ { width: Reveal.getConfig().width, height: Reveal.getConfig().height, data: [] }, { width: Reveal.getConfig().width, height: Reveal.getConfig().height, data: [] } ]; var loaded = null; if ( config.storage ) { // Get chalkboard drawings from session storage loaded = initStorage( sessionStorage.getItem( config.storage ) ); } if ( !loaded && config.src != null ) { // Get chalkboard drawings from the given file loadData( config.src ); } /** * Initialize storage. */ function initStorage( json ) { var success = false; try { var data = JSON.parse( json ); for ( var id = 0; id < data.length; id++ ) { if ( drawingCanvas[ id ].width != data[ id ].width || drawingCanvas[ id ].height != data[ id ].height ) { drawingCanvas[ id ].scale = Math.min( drawingCanvas[ id ].width / data[ id ].width, drawingCanvas[ id ].height / data[ id ].height ); drawingCanvas[ id ].xOffset = ( drawingCanvas[ id ].width - data[ id ].width * drawingCanvas[ id ].scale ) / 2; drawingCanvas[ id ].yOffset = ( drawingCanvas[ id ].height - data[ id ].height * drawingCanvas[ id ].scale ) / 2; } if ( config.readOnly ) { drawingCanvas[ id ].container.style.cursor = 'default'; drawingCanvas[ id ].canvas.style.cursor = 'default'; } } success = true; storage = data; } catch ( err ) { console.warn( "Cannot initialise storage!" ); } return success; } /** * Load data. */ function loadData( filename ) { var xhr = new XMLHttpRequest(); xhr.onload = function () { if ( xhr.readyState === 4 && xhr.status != 404 ) { loaded = initStorage( xhr.responseText ); updateStorage(); console.log( "Drawings loaded from file" ); } else { config.readOnly = undefined; readOnly = undefined; console.warn( 'Failed to get file ' + filename + '. ReadyState: ' + xhr.readyState + ', Status: ' + xhr.status ); loaded = false; } }; xhr.open( 'GET', filename, true ); try { xhr.send(); } catch ( error ) { config.readOnly = undefined; readOnly = undefined; console.warn( 'Failed to get file ' + filename + '. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. ' + error ); loaded = false; } } function storageChanged( now ) { if ( !now ) { // create or update timer if ( updateStorageTimeout ) { clearTimeout( updateStorageTimeout ); } updateStorageTimeout = setTimeout( storageChanged, 1000, true); } else { // console.log("Update storage", updateStorageTimeout, Date.now()); updateStorage(); updateStorageTimeout = null; } } function updateStorage() { var json = JSON.stringify( storage ) if ( config.storage ) { sessionStorage.setItem( config.storage, json ) } return json; } function recordEvent( event ) { //console.log(event); event.time = Date.now() - slideStart; if ( mode == 1 ) event.board = board; var slideData = getSlideData(); var i = slideData.events.length; while ( i > 0 && event.time < slideData.events[ i - 1 ].time ) { i--; } slideData.events.splice( i, 0, event ); slideData.duration = Math.max( slideData.duration, Date.now() - slideStart ) + 1; storageChanged(); } /** * Get data as json string. */ function getData() { // cleanup slide data without events for ( var id = 0; id < 2; id++ ) { for ( var i = storage[ id ].data.length - 1; i >= 0; i-- ) { if ( storage[ id ].data[ i ].events.length == 0 ) { storage[ id ].data.splice( i, 1 ); } } } return updateStorage(); } /** * Download data. */ function downloadData() { var a = document.createElement( 'a' ); document.body.appendChild( a ); try { a.download = 'chalkboard.json'; var blob = new Blob( [ getData() ], { type: 'application/json' } ); a.href = window.URL.createObjectURL( blob ); } catch ( error ) { a.innerHTML += ' (' + error + ')'; } a.click(); document.body.removeChild( a ); } /** * Returns data object for the slide with the given indices. */ function getSlideData( indices, id ) { if ( id == undefined ) id = mode; if ( !indices ) indices = slideIndices; var data; for ( var i = 0; i < storage[ id ].data.length; i++ ) { if ( storage[ id ].data[ i ].slide.h === indices.h && storage[ id ].data[ i ].slide.v === indices.v && storage[ id ].data[ i ].slide.f === indices.f ) { data = storage[ id ].data[ i ]; return data; } } var page = Number( Reveal.getCurrentSlide().getAttribute('data-pdf-page-number') ); //console.log( indices, Reveal.getCurrentSlide() ); storage[ id ].data.push( { slide: indices, page, events: [], duration: 0 } ); data = storage[ id ].data[ storage[ id ].data.length - 1 ]; return data; } /** * Returns maximum duration of slide playback for both modes */ function getSlideDuration( indices ) { if ( !indices ) indices = slideIndices; var duration = 0; for ( var id = 0; id < 2; id++ ) { for ( var i = 0; i < storage[ id ].data.length; i++ ) { if ( storage[ id ].data[ i ].slide.h === indices.h && storage[ id ].data[ i ].slide.v === indices.v && storage[ id ].data[ i ].slide.f === indices.f ) { duration = Math.max( duration, storage[ id ].data[ i ].duration ); break; } } } //console.log( duration ); return duration; } /***************************************************************** ** Print ******************************************************************/ var printMode = ( /print-pdf/gi ).test( window.location.search ); //console.log("createPrintout" + printMode) function addPageNumbers() { // determine page number for printouts with fragments serialised var slides = Reveal.getSlides(); var page = 0; for ( var i=0; i < slides.length; i++) { slides[i].setAttribute('data-pdf-page-number',page.toString()); // add number of fragments without fragment indices var count = slides[i].querySelectorAll('.fragment:not([data-fragment-index])').length; var fragments = slides[i].querySelectorAll('.fragment[data-fragment-index]'); for ( var j=0; j < fragments.length; j++) { // increasenumber of fragments by highest fragment index (which start at 0) if ( Number(fragments[j].getAttribute('data-fragment-index')) + 1 > count ) { count = Number(fragments[j].getAttribute('data-fragment-index')) + 1; } } //console.log(count,fragments.length,( slides[i].querySelector('h1,h2,h3,h4')||{}).innerHTML, page); page += count + 1; } } function createPrintout() { //console.warn(Reveal.getTotalSlides(),Reveal.getSlidesElement()); if ( storage[ 1 ].data.length == 0 ) return; console.log( 'Create printout(s) for ' + storage[ 1 ].data.length + " slides" ); drawingCanvas[ 0 ].container.style.opacity = 0; // do not print notes canvas drawingCanvas[ 0 ].container.style.visibility = 'hidden'; var patImg = new Image(); patImg.onload = function () { var slides = Reveal.getSlides(); //console.log(slides); for ( var i = storage[ 1 ].data.length - 1; i >= 0; i-- ) { console.log( 'Create printout for slide ' + storage[ 1 ].data[ i ].slide.h + '.' + storage[ 1 ].data[ i ].slide.v ); var slideData = getSlideData( storage[ 1 ].data[ i ].slide, 1 ); var drawings = createDrawings( slideData, patImg ); //console.log("Page:", storage[ 1 ].data[ i ].page ); //console.log("Slide:", slides[storage[ 1 ].data[ i ].page] ); addDrawings( slides[storage[ 1 ].data[ i ].page], drawings ); } // Reveal.sync(); }; patImg.src = background[ 1 ]; } function cloneCanvas( oldCanvas ) { //create a new canvas var newCanvas = document.createElement( 'canvas' ); var context = newCanvas.getContext( '2d' ); //set dimensions newCanvas.width = oldCanvas.width; newCanvas.height = oldCanvas.height; //apply the old canvas to the new one context.drawImage( oldCanvas, 0, 0 ); //return the new canvas return newCanvas; } function getCanvas( template, container, board ) { var idx = container.findIndex( element => element.board === board ); if ( idx === -1 ) { var canvas = cloneCanvas( template ); if ( !container.length ) { idx = 0; container.push( { board, canvas } ); } else if ( board < container[ 0 ].board ) { idx = 0; container.unshift( { board, canvas } ); } else if ( board > container[ container.length - 1 ].board ) { idx = container.length; container.push( { board, canvas } ); } } return container[ idx ].canvas; } function createDrawings( slideData, patImg ) { var width = Reveal.getConfig().width; var height = Reveal.getConfig().height; var scale = 1; var xOffset = 0; var yOffset = 0; if ( width != storage[ 1 ].width || height != storage[ 1 ].height ) { scale = Math.min( width / storage[ 1 ].width, height / storage[ 1 ].height ); xOffset = ( width - storage[ 1 ].width * scale ) / 2; yOffset = ( height - storage[ 1 ].height * scale ) / 2; } mode = 1; board = 0; // console.log( 'Create printout(s) for slide ', slideData ); var drawings = []; var template = document.createElement( 'canvas' ); template.width = width; template.height = height; var imgCtx = template.getContext( '2d' ); imgCtx.fillStyle = imgCtx.createPattern( patImg, 'repeat' ); imgCtx.rect( 0, 0, width, height ); imgCtx.fill(); for ( var j = 0; j < slideData.events.length; j++ ) { switch ( slideData.events[ j ].type ) { case 'draw': draw[ 1 ]( getCanvas( template, drawings, board ).getContext( '2d' ), xOffset + slideData.events[ j ].x1 * scale, yOffset + slideData.events[ j ].y1 * scale, xOffset + slideData.events[ j ].x2 * scale, yOffset + slideData.events[ j ].y2 * scale, yOffset + slideData.events[ j ].color ); break; case 'erase': eraseWithSponge( getCanvas( template, drawings, board ).getContext( '2d' ), xOffset + slideData.events[ j ].x * scale, yOffset + slideData.events[ j ].y * scale ); break; case 'selectboard': selectBoard( slideData.events[ j ].board ); break; case 'clear': getCanvas( template, drawings, board ).getContext( '2d' ).clearRect( 0, 0, width, height ); getCanvas( template, drawings, board ).getContext( '2d' ).fill(); break; default: break; } } drawings = drawings.sort( ( a, b ) => a.board > b.board && 1 || -1 ); mode = 0; return drawings; } function addDrawings( slide, drawings ) { var parent = slide.parentElement.parentElement; var nextSlide = slide.parentElement.nextElementSibling; for ( var i = 0; i < drawings.length; i++ ) { var newPDFPage = document.createElement( 'div' ); newPDFPage.classList.add( 'pdf-page' ); newPDFPage.style.height = Reveal.getConfig().height; newPDFPage.append( drawings[ i ].canvas ); //console.log("Add drawing", newPDFPage); if ( nextSlide != null ) { parent.insertBefore( newPDFPage, nextSlide ); } else { parent.append( newPDFPage ); } } } /***************************************************************** ** Drawings ******************************************************************/ function drawWithBoardmarker( context, fromX, fromY, toX, toY, colorIdx ) { if ( colorIdx == undefined ) colorIdx = color[ mode ]; context.lineWidth = boardmarkerWidth; context.lineCap = 'round'; context.strokeStyle = boardmarkers[ colorIdx ].color; context.beginPath(); context.moveTo( fromX, fromY ); context.lineTo( toX, toY ); context.stroke(); } function drawWithChalk( context, fromX, fromY, toX, toY, colorIdx ) { if ( colorIdx == undefined ) colorIdx = color[ mode ]; var brushDiameter = chalkWidth; context.lineWidth = brushDiameter; context.lineCap = 'round'; context.fillStyle = chalks[ colorIdx ].color; // 'rgba(255,255,255,0.5)'; context.strokeStyle = chalks[ colorIdx ].color; /*var opacity = Math.min(0.8, Math.max(0,color[1].replace(/^.*,(.+)\)/,'$1') - 0.1)) + Math.random()*0.2;*/ var opacity = 1.0; context.strokeStyle = context.strokeStyle.replace( /[\d\.]+\)$/g, opacity + ')' ); context.beginPath(); context.moveTo( fromX, fromY ); context.lineTo( toX, toY ); context.stroke(); // Chalk Effect var length = Math.round( Math.sqrt( Math.pow( toX - fromX, 2 ) + Math.pow( toY - fromY, 2 ) ) / ( 5 / brushDiameter ) ); var xUnit = ( toX - fromX ) / length; var yUnit = ( toY - fromY ) / length; for ( var i = 0; i < length; i++ ) { if ( chalkEffect > ( Math.random() * 0.9 ) ) { var xCurrent = fromX + ( i * xUnit ); var yCurrent = fromY + ( i * yUnit ); var xRandom = xCurrent + ( Math.random() - 0.5 ) * brushDiameter * 1.2; var yRandom = yCurrent + ( Math.random() - 0.5 ) * brushDiameter * 1.2; context.clearRect( xRandom, yRandom, Math.random() * 2 + 2, Math.random() + 1 ); } } } function eraseWithSponge( context, x, y ) { context.save(); context.beginPath(); context.arc( x, y, eraser.radius, 0, 2 * Math.PI, false ); context.clip(); context.clearRect( x - eraser.radius - 1, y - eraser.radius - 1, eraser.radius * 2 + 2, eraser.radius * 2 + 2 ); context.restore(); if ( mode == 1 && grid ) { redrawGrid( x, y, eraser.radius ); } } /** * Show an overlay for the chalkboard. */ function showChalkboard() { //console.log("showChalkboard"); clearTimeout( touchTimeout ); touchTimeout = null; drawingCanvas[ 0 ].sponge.style.visibility = 'hidden'; // make sure that the sponge from touch events is hidden drawingCanvas[ 1 ].sponge.style.visibility = 'hidden'; // make sure that the sponge from touch events is hidden drawingCanvas[ 1 ].container.style.opacity = 1; drawingCanvas[ 1 ].container.style.visibility = 'visible'; mode = 1; } /** * Closes open chalkboard. */ function closeChalkboard() { clearTimeout( touchTimeout ); touchTimeout = null; drawingCanvas[ 0 ].sponge.style.visibility = 'hidden'; // make sure that the sponge from touch events is hidden drawingCanvas[ 1 ].sponge.style.visibility = 'hidden'; // make sure that the sponge from touch events is hidden drawingCanvas[ 1 ].container.style.opacity = 0; drawingCanvas[ 1 ].container.style.visibility = 'hidden'; lastX = null; lastY = null; mode = 0; } /** * Clear current canvas. */ function clearCanvas( id ) { if ( id == 0 ) clearTimeout( slidechangeTimeout ); drawingCanvas[ id ].context.clearRect( 0, 0, drawingCanvas[ id ].width, drawingCanvas[ id ].height ); if ( id == 1 && grid ) drawGrid(); } /** * Draw grid on background */ function drawGrid() { var context = drawingCanvas[ 1 ].context; drawingCanvas[ 1 ].scale = Math.min( drawingCanvas[ 1 ].width / storage[ 1 ].width, drawingCanvas[ 1 ].height / storage[ 1 ].height ); drawingCanvas[ 1 ].xOffset = ( drawingCanvas[ 1 ].width - storage[ 1 ].width * drawingCanvas[ 1 ].scale ) / 2; drawingCanvas[ 1 ].yOffset = ( drawingCanvas[ 1 ].height - storage[ 1 ].height * drawingCanvas[ 1 ].scale ) / 2; var scale = drawingCanvas[ 1 ].scale; var xOffset = drawingCanvas[ 1 ].xOffset; var yOffset = drawingCanvas[ 1 ].yOffset; var distance = grid.distance * scale; var fromX = drawingCanvas[ 1 ].width / 2 - distance / 2 - Math.floor( ( drawingCanvas[ 1 ].width - distance ) / 2 / distance ) * distance; for ( var x = fromX; x < drawingCanvas[ 1 ].width; x += distance ) { context.beginPath(); context.lineWidth = grid.width * scale; context.lineCap = 'round'; context.fillStyle = grid.color; context.strokeStyle = grid.color; context.moveTo( x, 0 ); context.lineTo( x, drawingCanvas[ 1 ].height ); context.stroke(); } var fromY = drawingCanvas[ 1 ].height / 2 - distance / 2 - Math.floor( ( drawingCanvas[ 1 ].height - distance ) / 2 / distance ) * distance; for ( var y = fromY; y < drawingCanvas[ 1 ].height; y += distance ) { context.beginPath(); context.lineWidth = grid.width * scale; context.lineCap = 'round'; context.fillStyle = grid.color; context.strokeStyle = grid.color; context.moveTo( 0, y ); context.lineTo( drawingCanvas[ 1 ].width, y ); context.stroke(); } } function redrawGrid( centerX, centerY, diameter ) { var context = drawingCanvas[ 1 ].context; drawingCanvas[ 1 ].scale = Math.min( drawingCanvas[ 1 ].width / storage[ 1 ].width, drawingCanvas[ 1 ].height / storage[ 1 ].height ); drawingCanvas[ 1 ].xOffset = ( drawingCanvas[ 1 ].width - storage[ 1 ].width * drawingCanvas[ 1 ].scale ) / 2; drawingCanvas[ 1 ].yOffset = ( drawingCanvas[ 1 ].height - storage[ 1 ].height * drawingCanvas[ 1 ].scale ) / 2; var scale = drawingCanvas[ 1 ].scale; var xOffset = drawingCanvas[ 1 ].xOffset; var yOffset = drawingCanvas[ 1 ].yOffset; var distance = grid.distance * scale; var fromX = drawingCanvas[ 1 ].width / 2 - distance / 2 - Math.floor( ( drawingCanvas[ 1 ].width - distance ) / 2 / distance ) * distance; for ( var x = fromX + distance * Math.ceil( ( centerX - diameter - fromX ) / distance ); x <= fromX + distance * Math.floor( ( centerX + diameter - fromX ) / distance ); x += distance ) { context.beginPath(); context.lineWidth = grid.width * scale; context.lineCap = 'round'; context.fillStyle = grid.color; context.strokeStyle = grid.color; context.moveTo( x, centerY - Math.sqrt( diameter * diameter - ( centerX - x ) * ( centerX - x ) ) ); context.lineTo( x, centerY + Math.sqrt( diameter * diameter - ( centerX - x ) * ( centerX - x ) ) ); context.stroke(); } var fromY = drawingCanvas[ 1 ].height / 2 - distance / 2 - Math.floor( ( drawingCanvas[ 1 ].height - distance ) / 2 / distance ) * distance; for ( var y = fromY + distance * Math.ceil( ( centerY - diameter - fromY ) / distance ); y <= fromY + distance * Math.floor( ( centerY + diameter - fromY ) / distance ); y += distance ) { context.beginPath(); context.lineWidth = grid.width * scale; context.lineCap = 'round'; context.fillStyle = grid.color; context.strokeStyle = grid.color; context.moveTo( centerX - Math.sqrt( diameter * diameter - ( centerY - y ) * ( centerY - y ) ), y ); context.lineTo( centerX + Math.sqrt( diameter * diameter - ( centerY - y ) * ( centerY - y ) ), y ); context.stroke(); } } /** * Set the color */ function setColor( index, record ) { // protect against out of bounds (this could happen when // replaying events recorded with different color settings). if ( index >= pens[ mode ].length ) index = 0; color[ mode ] = index; drawingCanvas[ mode ].canvas.style.cursor = pens[ mode ][ color[ mode ] ].cursor; } /** * Set the board */ function selectBoard( boardIdx, record ) { //console.log("Set board",boardIdx); if ( board == boardIdx ) return; board = boardIdx; redrawChalkboard( boardIdx ); if ( record ) { recordEvent( { type: 'selectboard' } ); } } function redrawChalkboard( boardIdx ) { clearCanvas( 1 ); var slideData = getSlideData( slideIndices, 1 ); var index = 0; var play = ( boardIdx == 0 ); while ( index < slideData.events.length && slideData.events[ index ].time < Date.now() - slideStart ) { if ( boardIdx == slideData.events[ index ].board ) { playEvent( 1, slideData.events[ index ], Date.now() - slideStart ); } index++; } } /** * Forward cycle color */ function cycleColorNext() { color[ mode ] = ( color[ mode ] + 1 ) % pens[ mode ].length; return color[ mode ]; } /** * Backward cycle color */ function cycleColorPrev() { color[ mode ] = ( color[ mode ] + ( pens[ mode ].length - 1 ) ) % pens[ mode ].length; return color[ mode ]; } /***************************************************************** ** Broadcast ******************************************************************/ var eventQueue = []; document.addEventListener( 'received', function ( message ) { if ( message.content && message.content.sender == 'chalkboard-plugin' ) { // add message to queue eventQueue.push( message ); console.log( JSON.stringify( message ) ); } if ( eventQueue.length == 1 ) processQueue(); } ); function processQueue() { // take first message from queue var message = eventQueue.shift(); // synchronize time with seminar host slideStart = Date.now() - message.content.timestamp; // set status if ( mode < message.content.mode ) { // open chalkboard showChalkboard(); } else if ( mode > message.content.mode ) { // close chalkboard closeChalkboard(); } if ( board != message.content.board ) { board = message.content.board; redrawChalkboard( board ); }; switch ( message.content.type ) { case 'showChalkboard': showChalkboard(); break; case 'closeChalkboard': closeChalkboard(); break; case 'erase': erasePoint( message.content.x, message.content.y ); break; case 'draw': drawSegment( message.content.fromX, message.content.fromY, message.content.toX, message.content.toY, message.content.color ); break; case 'clear': clearSlide(); break; case 'selectboard': selectBoard( message.content.board, true ); break; case 'resetSlide': resetSlideDrawings(); break; case 'init': storage = message.content.storage; for ( var id = 0; id < 2; id++ ) { drawingCanvas[ id ].scale = Math.min( drawingCanvas[ id ].width / storage[ id ].width, drawingCanvas[ id ].height / storage[ id ].height ); drawingCanvas[ id ].xOffset = ( drawingCanvas[ id ].width - storage[ id ].width * drawingCanvas[ id ].scale ) / 2; drawingCanvas[ id ].yOffset = ( drawingCanvas[ id ].height - storage[ id ].height * drawingCanvas[ id ].scale ) / 2; } clearCanvas( 0 ); clearCanvas( 1 ); if ( !playback ) { slidechangeTimeout = setTimeout( startPlayback, transition, getSlideDuration(), 0 ); } if ( mode == 1 && message.content.mode == 0 ) { setTimeout( closeChalkboard, transition + 50 ); } if ( mode == 0 && message.content.mode == 1 ) { setTimeout( showChalkboard, transition + 50 ); } mode = message.content.mode; board = message.content.board; break; default: break; } // continue with next message if queued if ( eventQueue.length > 0 ) { processQueue(); } else { storageChanged(); } } document.addEventListener( 'welcome', function ( user ) { // broadcast storage var message = new CustomEvent( messageType ); message.content = { sender: 'chalkboard-plugin', recipient: user.id, type: 'init', timestamp: Date.now() - slideStart, storage: storage, mode, board }; document.dispatchEvent( message ); } ); /***************************************************************** ** Playback ******************************************************************/ document.addEventListener( 'seekplayback', function ( event ) { //console.log('event seekplayback ' + event.timestamp); stopPlayback(); if ( !playback || event.timestamp == 0 ) { // in other cases startplayback fires after seeked startPlayback( event.timestamp ); } //console.log('seeked'); } ); document.addEventListener( 'startplayback', function ( event ) { //console.log('event startplayback ' + event.timestamp); stopPlayback(); playback = true; startPlayback( event.timestamp ); } ); document.addEventListener( 'stopplayback', function ( event ) { //console.log('event stopplayback ' + (Date.now() - slideStart) ); playback = false; stopPlayback(); } ); document.addEventListener( 'startrecording', function ( event ) { //console.log('event startrecording ' + event.timestamp); startRecording(); } ); function startRecording() { resetSlide( true ); slideStart = Date.now(); } function startPlayback( timestamp, finalMode ) { //console.log("playback " + timestamp ); slideStart = Date.now() - timestamp; closeChalkboard(); mode = 0; board = 0; for ( var id = 0; id < 2; id++ ) { clearCanvas( id ); var slideData = getSlideData( slideIndices, id ); //console.log( timestamp +" / " + JSON.stringify(slideData)); var index = 0; while ( index < slideData.events.length && slideData.events[ index ].time < ( Date.now() - slideStart ) ) { playEvent( id, slideData.events[ index ], timestamp ); index++; } while ( playback && index < slideData.events.length ) { timeouts[ id ].push( setTimeout( playEvent, slideData.events[ index ].time - ( Date.now() - slideStart ), id, slideData.events[ index ], timestamp ) ); index++; } } //console.log("Mode: " + finalMode + "/" + mode ); if ( finalMode != undefined ) { mode = finalMode; } if ( mode == 1 ) showChalkboard(); //console.log("playback (ok)"); }; function stopPlayback() { //console.log("stopPlayback"); //console.log("Timeouts: " + timeouts[0].length + "/"+ timeouts[1].length); for ( var id = 0; id < 2; id++ ) { for ( var i = 0; i < timeouts[ id ].length; i++ ) { clearTimeout( timeouts[ id ][ i ] ); } timeouts[ id ] = []; } }; function playEvent( id, event, timestamp ) { //console.log( timestamp +" / " + JSON.stringify(event)); //console.log( id + ": " + timestamp +" / " + event.time +" / " + event.type +" / " + mode ); switch ( event.type ) { case 'open': if ( timestamp <= event.time ) { showChalkboard(); } else { mode = 1; } break; case 'close': if ( timestamp < event.time ) { closeChalkboard(); } else { mode = 0; } break; case 'clear': clearCanvas( id ); break; case 'selectboard': selectBoard( event.board ); break; case 'draw': drawLine( id, event, timestamp ); break; case 'erase': eraseCircle( id, event, timestamp ); break; } }; function drawLine( id, event, timestamp ) { var ctx = drawingCanvas[ id ].context; var scale = drawingCanvas[ id ].scale; var xOffset = drawingCanvas[ id ].xOffset; var yOffset = drawingCanvas[ id ].yOffset; draw[ id ]( ctx, xOffset + event.x1 * scale, yOffset + event.y1 * scale, xOffset + event.x2 * scale, yOffset + event.y2 * scale, event.color ); }; function eraseCircle( id, event, timestamp ) { var ctx = drawingCanvas[ id ].context; var scale = drawingCanvas[ id ].scale; var xOffset = drawingCanvas[ id ].xOffset; var yOffset = drawingCanvas[ id ].yOffset; eraseWithSponge( ctx, xOffset + event.x * scale, yOffset + event.y * scale ); }; function startErasing( x, y ) { drawing = false; erasing = true; drawingCanvas[ mode ].sponge.style.visibility = 'visible'; erasePoint( x, y ); } function erasePoint( x, y ) { var ctx = drawingCanvas[ mode ].context; var scale = drawingCanvas[ mode ].scale; var xOffset = drawingCanvas[ mode ].xOffset; var yOffset = drawingCanvas[ mode ].yOffset; // move sponge image drawingCanvas[ mode ].sponge.style.left = ( x * scale + xOffset - eraser.radius ) + 'px'; drawingCanvas[ mode ].sponge.style.top = ( y * scale + yOffset - 2 * eraser.radius ) + 'px'; recordEvent( { type: 'erase', x, y } ); if ( x * scale + xOffset > 0 && y * scale + yOffset > 0 && x * scale + xOffset < drawingCanvas[ mode ].width && y * scale + yOffset < drawingCanvas[ mode ].height ) { eraseWithSponge( ctx, x * scale + xOffset, y * scale + yOffset ); } } function stopErasing() { erasing = false; // hide sponge drawingCanvas[ mode ].sponge.style.visibility = 'hidden'; } function startDrawing( x, y ) { drawing = true; var ctx = drawingCanvas[ mode ].context; var scale = drawingCanvas[ mode ].scale; var xOffset = drawingCanvas[ mode ].xOffset; var yOffset = drawingCanvas[ mode ].yOffset; lastX = x * scale + xOffset; lastY = y * scale + yOffset; } function drawSegment( fromX, fromY, toX, toY, colorIdx ) { var ctx = drawingCanvas[ mode ].context; var scale = drawingCanvas[ mode ].scale; var xOffset = drawingCanvas[ mode ].xOffset; var yOffset = drawingCanvas[ mode ].yOffset; recordEvent( { type: 'draw', color: colorIdx, x1: fromX, y1: fromY, x2: toX, y2: toY } ); if ( fromX * scale + xOffset > 0 && fromY * scale + yOffset > 0 && fromX * scale + xOffset < drawingCanvas[ mode ].width && fromY * scale + yOffset < drawingCanvas[ mode ].height && toX * scale + xOffset > 0 && toY * scale + yOffset > 0 && toX * scale + xOffset < drawingCanvas[ mode ].width && toY * scale + yOffset < drawingCanvas[ mode ].height ) { draw[ mode ]( ctx, fromX * scale + xOffset, fromY * scale + yOffset, toX * scale + xOffset, toY * scale + yOffset, colorIdx ); } } function stopDrawing() { drawing = false; } /***************************************************************** ** User interface ******************************************************************/ function setupCanvasEvents( canvas ) { // TODO: check all touchevents canvas.addEventListener( 'touchstart', function ( evt ) { evt.preventDefault(); //console.log("Touch start"); if ( !readOnly && evt.target.getAttribute( 'data-chalkboard' ) == mode ) { var scale = drawingCanvas[ mode ].scale; var xOffset = drawingCanvas[ mode ].xOffset; var yOffset = drawingCanvas[ mode ].yOffset; var touch = evt.touches[ 0 ]; mouseX = touch.pageX; mouseY = touch.pageY; startDrawing( ( mouseX - xOffset ) / scale, ( mouseY - yOffset ) / scale ); touchTimeout = setTimeout( startErasing, 500, ( mouseX - xOffset ) / scale, ( mouseY - yOffset ) / scale ); } }, passiveSupported ? { passive: false } : false ); canvas.addEventListener( 'touchmove', function ( evt ) { evt.preventDefault(); //console.log("Touch move"); clearTimeout( touchTimeout ); touchTimeout = null; if ( drawing || erasing ) { var scale = drawingCanvas[ mode ].scale; var xOffset = drawingCanvas[ mode ].xOffset; var yOffset = drawingCanvas[ mode ].yOffset; var touch = evt.touches[ 0 ]; mouseX = touch.pageX; mouseY = touch.pageY; if ( mouseY < drawingCanvas[ mode ].height && mouseX < drawingCanvas[ mode ].width ) { // move sponge if ( event.type == 'erase' ) { drawingCanvas[ mode ].sponge.style.left = ( mouseX - eraser.radius ) + 'px'; drawingCanvas[ mode ].sponge.style.top = ( mouseY - eraser.radius ) + 'px'; } } if ( drawing ) { drawSegment( ( lastX - xOffset ) / scale, ( lastY - yOffset ) / scale, ( mouseX - xOffset ) / scale, ( mouseY - yOffset ) / scale, color[ mode ] ); // broadcast var message = new CustomEvent( messageType ); message.content = { sender: 'chalkboard-plugin', type: 'draw', timestamp: Date.now() - slideStart, mode, board, fromX: ( lastX - xOffset ) / scale, fromY: ( lastY - yOffset ) / scale, toX: ( mouseX - xOffset ) / scale, toY: ( mouseY - yOffset ) / scale, color: color[ mode ] }; document.dispatchEvent( message ); lastX = mouseX; lastY = mouseY; } else { erasePoint( ( mouseX - xOffset ) / scale, ( mouseY - yOffset ) / scale ); // broadcast var message = new CustomEvent( messageType ); message.content = { sender: 'chalkboard-plugin', type: 'erase', timestamp: Date.now() - slideStart, mode, board, x: ( mouseX - xOffset ) / scale, y: ( mouseY - yOffset ) / scale }; document.dispatchEvent( message ); } } }, false ); canvas.addEventListener( 'touchend', function ( evt ) { evt.preventDefault(); clearTimeout( touchTimeout ); touchTimeout = null; // hide sponge image drawingCanvas[ mode ].sponge.style.visibility = 'hidden'; stopDrawing(); }, false ); canvas.addEventListener( 'mousedown', function ( evt ) { evt.preventDefault(); if ( !readOnly && evt.target.getAttribute( 'data-chalkboard' ) == mode ) { //console.log( "mousedown: " + evt.button ); var scale = drawingCanvas[ mode ].scale; var xOffset = drawingCanvas[ mode ].xOffset; var yOffset = drawingCanvas[ mode ].yOffset; mouseX = evt.pageX; mouseY = evt.pageY; if ( evt.button == 2 || evt.button == 1 ) { startErasing( ( mouseX - xOffset ) / scale, ( mouseY - yOffset ) / scale ); // broadcast var message = new CustomEvent( messageType ); message.content = { sender: 'chalkboard-plugin', type: 'erase', timestamp: Date.now() - slideStart, mode, board, x: ( mouseX - xOffset ) / scale, y: ( mouseY - yOffset ) / scale }; document.dispatchEvent( message ); } else { startDrawing( ( mouseX - xOffset ) / scale, ( mouseY - yOffset ) / scale ); } } } ); canvas.addEventListener( 'mousemove', function ( evt ) { evt.preventDefault(); //console.log("Mouse move"); if ( drawing || erasing ) { var scale = drawingCanvas[ mode ].scale; var xOffset = drawingCanvas[ mode ].xOffset; var yOffset = drawingCanvas[ mode ].yOffset; mouseX = evt.pageX; mouseY = evt.pageY; if ( drawing ) { drawSegment( ( lastX - xOffset ) / scale, ( lastY - yOffset ) / scale, ( mouseX - xOffset ) / scale, ( mouseY - yOffset ) / scale, color[ mode ] ); // broadcast var message = new CustomEvent( messageType ); message.content = { sender: 'chalkboard-plugin', type: 'draw', timestamp: Date.now() - slideStart, mode, board, fromX: ( lastX - xOffset ) / scale, fromY: ( lastY - yOffset ) / scale, toX: ( mouseX - xOffset ) / scale, toY: ( mouseY - yOffset ) / scale, color: color[ mode ] }; document.dispatchEvent( message ); lastX = mouseX; lastY = mouseY; } else { erasePoint( ( mouseX - xOffset ) / scale, ( mouseY - yOffset ) / scale ); // broadcast var message = new CustomEvent( messageType ); message.content = { sender: 'chalkboard-plugin', type: 'erase', timestamp: Date.now() - slideStart, mode, board, x: ( mouseX - xOffset ) / scale, y: ( mouseY - yOffset ) / scale }; document.dispatchEvent( message ); } } } ); canvas.addEventListener( 'mouseup', function ( evt ) { evt.preventDefault(); drawingCanvas[ mode ].canvas.style.cursor = pens[ mode ][ color[ mode ] ].cursor; if ( drawing || erasing ) { stopDrawing(); stopErasing(); } } ); } function resize() { //console.log("resize"); // Resize the canvas and draw everything again var timestamp = Date.now() - slideStart; if ( !playback ) { timestamp = getSlideDuration(); } //console.log( drawingCanvas[0].scale + "/" + drawingCanvas[0].xOffset + "/" +drawingCanvas[0].yOffset ); for ( var id = 0; id < 2; id++ ) { drawingCanvas[ id ].width = window.innerWidth; drawingCanvas[ id ].height = window.innerHeight; drawingCanvas[ id ].canvas.width = drawingCanvas[ id ].width; drawingCanvas[ id ].canvas.height = drawingCanvas[ id ].height; drawingCanvas[ id ].context.canvas.width = drawingCanvas[ id ].width; drawingCanvas[ id ].context.canvas.height = drawingCanvas[ id ].height; drawingCanvas[ id ].scale = Math.min( drawingCanvas[ id ].width / storage[ id ].width, drawingCanvas[ id ].height / storage[ id ].height ); drawingCanvas[ id ].xOffset = ( drawingCanvas[ id ].width - storage[ id ].width * drawingCanvas[ id ].scale ) / 2; drawingCanvas[ id ].yOffset = ( drawingCanvas[ id ].height - storage[ id ].height * drawingCanvas[ id ].scale ) / 2; //console.log( drawingCanvas[id].scale + "/" + drawingCanvas[id].xOffset + "/" +drawingCanvas[id].yOffset ); } //console.log( window.innerWidth + "/" + window.innerHeight); startPlayback( timestamp, mode, true ); } Reveal.addEventListener( 'pdf-ready', function ( evt ) { // console.log( "Create printouts when ready" ); whenLoaded( createPrintout ); }); Reveal.addEventListener( 'ready', function ( evt ) { //console.log('ready'); if ( !printMode ) { window.addEventListener( 'resize', resize ); slideStart = Date.now() - getSlideDuration(); slideIndices = Reveal.getIndices(); if ( !playback ) { startPlayback( getSlideDuration(), 0 ); } if ( Reveal.isAutoSliding() ) { var event = new CustomEvent( 'startplayback' ); event.timestamp = 0; document.dispatchEvent( event ); } updateStorage(); whenReady( addPageNumbers ); } } ); Reveal.addEventListener( 'slidechanged', function ( evt ) { // clearTimeout( slidechangeTimeout ); //console.log('slidechanged'); if ( !printMode ) { slideStart = Date.now() - getSlideDuration(); slideIndices = Reveal.getIndices(); closeChalkboard(); board = 0; clearCanvas( 0 ); clearCanvas( 1 ); if ( !playback ) { slidechangeTimeout = setTimeout( startPlayback, transition, getSlideDuration(), 0 ); } if ( Reveal.isAutoSliding() ) { var event = new CustomEvent( 'startplayback' ); event.timestamp = 0; document.dispatchEvent( event ); } } } ); Reveal.addEventListener( 'fragmentshown', function ( evt ) { // clearTimeout( slidechangeTimeout ); //console.log('fragmentshown'); if ( !printMode ) { slideStart = Date.now() - getSlideDuration(); slideIndices = Reveal.getIndices(); closeChalkboard(); board = 0; clearCanvas( 0 ); clearCanvas( 1 ); if ( Reveal.isAutoSliding() ) { var event = new CustomEvent( 'startplayback' ); event.timestamp = 0; document.dispatchEvent( event ); } else if ( !playback ) { startPlayback( getSlideDuration(), 0 ); // closeChalkboard(); } } } ); Reveal.addEventListener( 'fragmenthidden', function ( evt ) { // clearTimeout( slidechangeTimeout ); //console.log('fragmenthidden'); if ( !printMode ) { slideStart = Date.now() - getSlideDuration(); slideIndices = Reveal.getIndices(); closeChalkboard(); board = 0; clearCanvas( 0 ); clearCanvas( 1 ); if ( Reveal.isAutoSliding() ) { document.dispatchEvent( new CustomEvent( 'stopplayback' ) ); } else if ( !playback ) { startPlayback( getSlideDuration() ); closeChalkboard(); } } } ); Reveal.addEventListener( 'autoslideresumed', function ( evt ) { //console.log('autoslideresumed'); var event = new CustomEvent( 'startplayback' ); event.timestamp = 0; document.dispatchEvent( event ); } ); Reveal.addEventListener( 'autoslidepaused', function ( evt ) { //console.log('autoslidepaused'); document.dispatchEvent( new CustomEvent( 'stopplayback' ) ); // advance to end of slide // closeChalkboard(); startPlayback( getSlideDuration(), 0 ); } ); function toggleNotesCanvas() { if ( !readOnly ) { if ( mode == 1 ) { toggleChalkboard(); notescanvas.style.background = background[ 0 ]; //'rgba(255,0,0,0.5)'; notescanvas.style.pointerEvents = 'auto'; } else { if ( notescanvas.style.pointerEvents != 'none' ) { // hide notes canvas if ( colorButtons ) { notescanvas.querySelector( '.palette' ).style.visibility = 'hidden'; } notescanvas.style.background = 'rgba(0,0,0,0)'; notescanvas.style.pointerEvents = 'none'; } else { // show notes canvas if ( colorButtons ) { notescanvas.querySelector( '.palette' ).style.visibility = 'visible'; } notescanvas.style.background = background[ 0 ]; //'rgba(255,0,0,0.5)'; notescanvas.style.pointerEvents = 'auto'; var idx = 0; if ( color[ mode ] ) { idx = color[ mode ]; } setColor( idx, true ); } } } }; function toggleChalkboard() { //console.log("toggleChalkboard " + mode); if ( mode == 1 ) { if ( !readOnly ) { recordEvent( { type: 'close' } ); } closeChalkboard(); // broadcast var message = new CustomEvent( messageType ); message.content = { sender: 'chalkboard-plugin', type: 'closeChalkboard', timestamp: Date.now() - slideStart, mode: 0, board }; document.dispatchEvent( message ); } else { showChalkboard(); if ( !readOnly ) { recordEvent( { type: 'open' } ); // broadcast var message = new CustomEvent( messageType ); message.content = { sender: 'chalkboard-plugin', type: 'showChalkboard', timestamp: Date.now() - slideStart, mode: 1, board }; document.dispatchEvent( message ); var idx = 0; if ( rememberColor[ mode ] ) { idx = color[ mode ]; } setColor( idx, true ); } } }; function clearSlide() { recordEvent( { type: 'clear' } ); clearCanvas( mode ); } function clear() { if ( !readOnly ) { clearSlide(); // broadcast var message = new CustomEvent( messageType ); message.content = { sender: 'chalkboard-plugin', type: 'clear', timestamp: Date.now() - slideStart, mode, board }; document.dispatchEvent( message ); } }; function colorIndex( idx ) { if ( !readOnly ) { setColor( idx, true ); } } function colorNext() { if ( !readOnly ) { let idx = cycleColorNext(); setColor( idx, true ); } } function colorPrev() { if ( !readOnly ) { let idx = cycleColorPrev(); setColor( idx, true ); } } function resetSlideDrawings() { slideStart = Date.now(); closeChalkboard(); clearCanvas( 0 ); clearCanvas( 1 ); mode = 1; var slideData = getSlideData(); slideData.duration = 0; slideData.events = []; mode = 0; var slideData = getSlideData(); slideData.duration = 0; slideData.events = []; updateStorage(); } function resetSlide( force ) { var ok = force || confirm( "Please confirm to delete chalkboard drawings on this slide!" ); if ( ok ) { //console.log("resetSlide "); stopPlayback(); resetSlideDrawings(); // broadcast var message = new CustomEvent( messageType ); message.content = { sender: 'chalkboard-plugin', type: 'resetSlide', timestamp: Date.now() - slideStart, mode, board }; document.dispatchEvent( message ); } }; function resetStorage( force ) { var ok = force || confirm( "Please confirm to delete all chalkboard drawings!" ); if ( ok ) { stopPlayback(); slideStart = Date.now(); clearCanvas( 0 ); clearCanvas( 1 ); if ( mode == 1 ) { closeChalkboard(); } storage = [ { width: Reveal.getConfig().width, height: Reveal.getConfig().height, data: [] }, { width: Reveal.getConfig().width, height: Reveal.getConfig().height, data: [] } ]; if ( config.storage ) { sessionStorage.setItem( config.storage, null ) } // broadcast var message = new CustomEvent( messageType ); message.content = { sender: 'chalkboard-plugin', type: 'init', timestamp: Date.now() - slideStart, storage, mode, board }; document.dispatchEvent( message ); } }; this.toggleNotesCanvas = toggleNotesCanvas; this.toggleChalkboard = toggleChalkboard; this.colorIndex = colorIndex; this.colorNext = colorNext; this.colorPrev = colorPrev; this.clear = clear; this.reset = resetSlide; this.resetAll = resetStorage; this.download = downloadData; this.updateStorage = updateStorage; this.getData = getData; this.configure = configure; for ( var key in keyBindings ) { if ( keyBindings[ key ] ) { Reveal.addKeyBinding( keyBindings[ key ], RevealChalkboard[ key ] ); } }; return this; };
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/reveal-chalkboard/style.css
CSS
div.palette, div.boardhandle { position: absolute; /* height: 260px; margin: -130px 0 0 0px; */ top: 50%; transform: translateY(-50%); font-size: 24px; border-radius: 10px; border-top: 4px solid #222; border-right: 4px solid #222; border-bottom: 4px solid #222; background: black; transition: transform 0.3s; } div.palette { left: -10px; padding-left:10px; } div.boardhandle { right: -10px; padding-right:10px; } div.palette > ul, div.boardhandle > ul { list-style-type: none; margin: 0; padding: 0; } div.palette > ul > li, div.boardhandle > ul > li { margin: 10px; } @media print { div.palette, div.boardhandle, .chalkboard-button { display: none!important; } }
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/reveal-menu/menu.css
CSS
.slide-menu-wrapper { font-family: 'Source Sans Pro', Helvetica, sans-serif; } .slide-menu-wrapper .slide-menu { background-color: #333; z-index: 200; position: fixed; top: 0; width: 300px; height: 100%; /*overflow-y: scroll;*/ transition: transform 0.3s; font-size: 16px; font-weight: normal; } .slide-menu-wrapper .slide-menu.slide-menu--wide { width: 500px; } .slide-menu-wrapper .slide-menu.slide-menu--third { width: 33%; } .slide-menu-wrapper .slide-menu.slide-menu--half { width: 50%; } .slide-menu-wrapper .slide-menu.slide-menu--full { width: 95%; } /* * Slides menu */ .slide-menu-wrapper .slide-menu-items { margin: 0; padding: 0; width: 100%; border-bottom: solid 1px #555; } .slide-menu-wrapper .slide-menu-item, .slide-menu-wrapper .slide-menu-item-vertical { display: block; text-align: left; padding: 10px 18px; color: #aaa; cursor: pointer; } .slide-menu-wrapper .slide-menu-item-vertical { padding-left: 30px; } .slide-menu-wrapper .slide-menu--wide .slide-menu-item-vertical, .slide-menu-wrapper .slide-menu--third .slide-menu-item-vertical, .slide-menu-wrapper .slide-menu--half .slide-menu-item-vertical, .slide-menu-wrapper .slide-menu--full .slide-menu-item-vertical, .slide-menu-wrapper .slide-menu--custom .slide-menu-item-vertical { padding-left: 50px; } .slide-menu-wrapper .slide-menu-item { border-top: solid 1px #555; } .slide-menu-wrapper .active-menu-panel li.selected { background-color: #222; color: white; } .slide-menu-wrapper .active-menu-panel li.active { color: #eee; } .slide-menu-wrapper .slide-menu-item.no-title .slide-menu-item-title, .slide-menu-wrapper .slide-menu-item-vertical.no-title .slide-menu-item-title { font-style: italic; } .slide-menu-wrapper .slide-menu-item-number { color: #999; padding-right: 6px; } .slide-menu-wrapper .slide-menu-item i.far, .slide-menu-wrapper .slide-menu-item i.fas, .slide-menu-wrapper .slide-menu-item-vertical i.far, .slide-menu-wrapper .slide-menu-item-vertical i.fas, .slide-menu-wrapper .slide-menu-item svg.svg-inline--fa, .slide-menu-wrapper .slide-menu-item-vertical svg.svg-inline--fa { padding-right: 12px; display: none; } .slide-menu-wrapper .slide-menu-item.past i.fas.past, .slide-menu-wrapper .slide-menu-item-vertical.past i.fas.past, .slide-menu-wrapper .slide-menu-item.active i.fas.active, .slide-menu-wrapper .slide-menu-item-vertical.active i.fas.active, .slide-menu-wrapper .slide-menu-item.future i.far.future, .slide-menu-wrapper .slide-menu-item-vertical.future i.far.future, .slide-menu-wrapper .slide-menu-item.past svg.svg-inline--fa.past, .slide-menu-wrapper .slide-menu-item-vertical.past svg.svg-inline--fa.past, .slide-menu-wrapper .slide-menu-item.active svg.svg-inline--fa.active, .slide-menu-wrapper .slide-menu-item-vertical.active svg.svg-inline--fa.active, .slide-menu-wrapper .slide-menu-item.future svg.svg-inline--fa.future, .slide-menu-wrapper .slide-menu-item-vertical.future svg.svg-inline--fa.future { display: inline-block; } .slide-menu-wrapper .slide-menu-item.past i.fas.past, .slide-menu-wrapper .slide-menu-item-vertical.past i.fas.past, .slide-menu-wrapper .slide-menu-item.future i.far.future, .slide-menu-wrapper .slide-menu-item-vertical.future i.far.future, .slide-menu-wrapper .slide-menu-item.past svg.svg-inline--fa.past, .slide-menu-wrapper .slide-menu-item-vertical.past svg.svg-inline--fa.past, .slide-menu-wrapper .slide-menu-item.future svg.svg-inline--fa.future, .slide-menu-wrapper .slide-menu-item-vertical.future svg.svg-inline--fa.future { opacity: 0.4; } .slide-menu-wrapper .slide-menu-item.active i.fas.active, .slide-menu-wrapper .slide-menu-item-vertical.active i.fas.active, .slide-menu-wrapper .slide-menu-item.active svg.svg-inline--fa.active, .slide-menu-wrapper .slide-menu-item-vertical.active svg.svg-inline--fa.active { opacity: 0.8; } .slide-menu-wrapper .slide-menu--left { left: 0; -webkit-transform: translateX(-100%); -ms-transform: translateX(-100%); transform: translateX(-100%); } .slide-menu-wrapper .slide-menu--left.active { -webkit-transform: translateX(0); -ms-transform: translateX(0); transform: translateX(0); } .slide-menu-wrapper .slide-menu--right { right: 0; -webkit-transform: translateX(100%); -ms-transform: translateX(100%); transform: translateX(100%); } .slide-menu-wrapper .slide-menu--right.active { -webkit-transform: translateX(0); -ms-transform: translateX(0); transform: translateX(0); } .slide-menu-wrapper { transition: transform 0.3s; } /* * Toolbar */ .slide-menu-wrapper .slide-menu-toolbar { height: 60px; width: 100%; font-size: 12px; display: table; table-layout: fixed; /* ensures equal width */ margin: 0; padding: 0; border-bottom: solid 2px #666; } .slide-menu-wrapper .slide-menu-toolbar > li { display: table-cell; line-height: 150%; text-align: center; vertical-align: middle; cursor: pointer; color: #aaa; border-radius: 3px; } .slide-menu-wrapper .slide-menu-toolbar > li.toolbar-panel-button i, .slide-menu-wrapper .slide-menu-toolbar > li.toolbar-panel-button svg.svg-inline--fa { font-size: 1.7em; } .slide-menu-wrapper .slide-menu-toolbar > li.active-toolbar-button { color: white; text-shadow: 0 1px black; text-decoration: underline; } .slide-menu-toolbar > li.toolbar-panel-button:hover { color: white; } .slide-menu-toolbar > li.toolbar-panel-button:hover span.slide-menu-toolbar-label, .slide-menu-wrapper .slide-menu-toolbar > li.active-toolbar-button span.slide-menu-toolbar-label { visibility: visible; } /* * Panels */ .slide-menu-wrapper .slide-menu-panel { position: absolute; width: 100%; visibility: hidden; height: calc(100% - 60px); overflow-x: hidden; overflow-y: auto; color: #aaa; } .slide-menu-wrapper .slide-menu-panel.active-menu-panel { visibility: visible; } .slide-menu-wrapper .slide-menu-panel h1, .slide-menu-wrapper .slide-menu-panel h2, .slide-menu-wrapper .slide-menu-panel h3, .slide-menu-wrapper .slide-menu-panel h4, .slide-menu-wrapper .slide-menu-panel h5, .slide-menu-wrapper .slide-menu-panel h6 { margin: 20px 0 10px 0; color: #fff; line-height: 1.2; letter-spacing: normal; text-shadow: none; } .slide-menu-wrapper .slide-menu-panel h1 { font-size: 1.6em; } .slide-menu-wrapper .slide-menu-panel h2 { font-size: 1.4em; } .slide-menu-wrapper .slide-menu-panel h3 { font-size: 1.3em; } .slide-menu-wrapper .slide-menu-panel h4 { font-size: 1.1em; } .slide-menu-wrapper .slide-menu-panel h5 { font-size: 1em; } .slide-menu-wrapper .slide-menu-panel h6 { font-size: 0.9em; } .slide-menu-wrapper .slide-menu-panel p { margin: 10px 0 5px 0; } .slide-menu-wrapper .slide-menu-panel a { color: #ccc; text-decoration: underline; } .slide-menu-wrapper .slide-menu-panel a:hover { color: white; } .slide-menu-wrapper .slide-menu-item a { text-decoration: none; } .slide-menu-wrapper .slide-menu-custom-panel { width: calc(100% - 20px); padding-left: 10px; padding-right: 10px; } .slide-menu-wrapper .slide-menu-custom-panel .slide-menu-items { width: calc(100% + 20px); margin-left: -10px; margin-right: 10px; } /* * Theme and Transitions buttons */ .slide-menu-wrapper div[data-panel='Themes'] li, .slide-menu-wrapper div[data-panel='Transitions'] li { display: block; text-align: left; cursor: pointer; color: #848484; } /* * Menu controls */ .reveal .slide-menu-button { position: fixed; left: 30px; bottom: 30px; z-index: 30; font-size: 24px; } /* * Menu overlay */ .slide-menu-wrapper .slide-menu-overlay { position: fixed; z-index: 199; top: 0; left: 0; overflow: hidden; width: 0; height: 0; background-color: #000; opacity: 0; transition: opacity 0.3s, width 0s 0.3s, height 0s 0.3s; } .slide-menu-wrapper .slide-menu-overlay.active { width: 100%; height: 100%; opacity: 0.7; transition: opacity 0.3s; } /* * Hide menu for pdf printing */ body.print-pdf .slide-menu-wrapper .slide-menu, body.print-pdf .reveal .slide-menu-button, body.print-pdf .slide-menu-wrapper .slide-menu-overlay { display: none; }
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/reveal-menu/menu.js
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).RevealMenu=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var n=function(e){return e&&e.Math==Math&&e},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")(),i=function(e){try{return!!e()}catch(e){return!0}},a=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,l={f:s&&!o.call({1:2},1)?function(e){var t=s(this,e);return!!t&&t.enumerable}:o},c=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},u={}.toString,f=function(e){return u.call(e).slice(8,-1)},d="".split,p=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==f(e)?d.call(e,""):Object(e)}:Object,h=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},m=function(e){return p(h(e))},v=function(e){return"object"==typeof e?null!==e:"function"==typeof e},g=function(e,t){if(!v(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!v(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!v(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!v(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,b=function(e,t){return y.call(e,t)},S=r.document,E=v(S)&&v(S.createElement),x=!a&&!i((function(){return 7!=Object.defineProperty((e="div",E?S.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),w=Object.getOwnPropertyDescriptor,L={f:a?w:function(e,t){if(e=m(e),t=g(t,!0),x)try{return w(e,t)}catch(e){}if(b(e,t))return c(!l.f.call(e,t),e[t])}},T=function(e){if(!v(e))throw TypeError(String(e)+" is not an object");return e},C=Object.defineProperty,O={f:a?C:function(e,t,n){if(T(e),t=g(t,!0),T(n),x)try{return C(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},A=a?function(e,t,n){return O.f(e,t,c(1,n))}:function(e,t,n){return e[t]=n,e},k=function(e,t){try{A(r,e,t)}catch(n){r[e]=t}return t},I=r["__core-js_shared__"]||k("__core-js_shared__",{}),P=Function.toString;"function"!=typeof I.inspectSource&&(I.inspectSource=function(e){return P.call(e)});var M,R,j,N,_=I.inspectSource,F=r.WeakMap,W="function"==typeof F&&/native code/.test(_(F)),H=t((function(e){(e.exports=function(e,t){return I[e]||(I[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),U=0,$=Math.random(),D=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++U+$).toString(36)},q=H("keys"),B={},G=r.WeakMap;if(W){var V=new G,K=V.get,z=V.has,X=V.set;M=function(e,t){return X.call(V,e,t),t},R=function(e){return K.call(V,e)||{}},j=function(e){return z.call(V,e)}}else{var Y=q[N="state"]||(q[N]=D(N));B[Y]=!0,M=function(e,t){return A(e,Y,t),t},R=function(e){return b(e,Y)?e[Y]:{}},j=function(e){return b(e,Y)}}var J={set:M,get:R,has:j,enforce:function(e){return j(e)?R(e):M(e,{})},getterFor:function(e){return function(t){var n;if(!v(t)||(n=R(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Z=t((function(e){var t=J.get,n=J.enforce,i=String(String).split("String");(e.exports=function(e,t,a,o){var s=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof a&&("string"!=typeof t||b(a,"name")||A(a,"name",t),n(a).source=i.join("string"==typeof t?t:"")),e!==r?(s?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=a:A(e,t,a)):l?e[t]=a:k(t,a)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||_(this)}))})),Q=r,ee=function(e){return"function"==typeof e?e:void 0},te=function(e,t){return arguments.length<2?ee(Q[e])||ee(r[e]):Q[e]&&Q[e][t]||r[e]&&r[e][t]},ne=Math.ceil,re=Math.floor,ie=function(e){return isNaN(e=+e)?0:(e>0?re:ne)(e)},ae=Math.min,oe=function(e){return e>0?ae(ie(e),9007199254740991):0},se=Math.max,le=Math.min,ce=function(e,t){var n=ie(e);return n<0?se(n+t,0):le(n,t)},ue=function(e){return function(t,n,r){var i,a=m(t),o=oe(a.length),s=ce(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},fe={includes:ue(!0),indexOf:ue(!1)},de=fe.indexOf,pe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),he={f:Object.getOwnPropertyNames||function(e){return function(e,t){var n,r=m(e),i=0,a=[];for(n in r)!b(B,n)&&b(r,n)&&a.push(n);for(;t.length>i;)b(r,n=t[i++])&&(~de(a,n)||a.push(n));return a}(e,pe)}},me={f:Object.getOwnPropertySymbols},ve=te("Reflect","ownKeys")||function(e){var t=he.f(T(e)),n=me.f;return n?t.concat(n(e)):t},ge=function(e,t){for(var n=ve(t),r=O.f,i=L.f,a=0;a<n.length;a++){var o=n[a];b(e,o)||r(e,o,i(t,o))}},ye=/#|\.prototype\./,be=function(e,t){var n=Ee[Se(e)];return n==we||n!=xe&&("function"==typeof t?i(t):!!t)},Se=be.normalize=function(e){return String(e).replace(ye,".").toLowerCase()},Ee=be.data={},xe=be.NATIVE="N",we=be.POLYFILL="P",Le=be,Te=L.f,Ce=function(e,t){var n,i,a,o,s,l=e.target,c=e.global,u=e.stat;if(n=c?r:u?r[l]||k(l,{}):(r[l]||{}).prototype)for(i in t){if(o=t[i],a=e.noTargetGet?(s=Te(n,i))&&s.value:n[i],!Le(c?i:l+(u?".":"#")+i,e.forced)&&void 0!==a){if(typeof o==typeof a)continue;ge(o,a)}(e.sham||a&&a.sham)&&A(o,"sham",!0),Z(n,i,o,e)}},Oe=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},Ae=function(e){return Object(h(e))},ke=Array.isArray||function(e){return"Array"==f(e)},Ie=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),Pe=Ie&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Me=H("wks"),Re=r.Symbol,je=Pe?Re:Re&&Re.withoutSetter||D,Ne=function(e){return b(Me,e)||(Ie&&b(Re,e)?Me[e]=Re[e]:Me[e]=je("Symbol."+e)),Me[e]},_e=Ne("species"),Fe=function(e,t){var n;return ke(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!ke(n.prototype)?v(n)&&null===(n=n[_e])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},We=[].push,He=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,o=5==e||a;return function(s,l,c,u){for(var f,d,h=Ae(s),m=p(h),v=function(e,t,n){if(Oe(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}(l,c,3),g=oe(m.length),y=0,b=u||Fe,S=t?b(s,g):n?b(s,0):void 0;g>y;y++)if((o||y in m)&&(d=v(f=m[y],y,h),e))if(t)S[y]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:We.call(S,f)}else if(i)return!1;return a?-1:r||i?i:S}},Ue={forEach:He(0),map:He(1),filter:He(2),some:He(3),every:He(4),find:He(5),findIndex:He(6)},$e=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))},De=Object.defineProperty,qe={},Be=function(e){throw e},Ge=function(e,t){if(b(qe,e))return qe[e];t||(t={});var n=[][e],r=!!b(t,"ACCESSORS")&&t.ACCESSORS,o=b(t,0)?t[0]:Be,s=b(t,1)?t[1]:void 0;return qe[e]=!!n&&!i((function(){if(r&&!a)return!0;var e={length:-1};r?De(e,1,{enumerable:!0,get:Be}):e[1]=1,n.call(e,o,s)}))},Ve=Ue.every,Ke=$e("every"),ze=Ge("every");Ce({target:"Array",proto:!0,forced:!Ke||!ze},{every:function(e){return Ve(this,e,arguments.length>1?arguments[1]:void 0)}});var Xe,Ye,Je=te("navigator","userAgent")||"",Ze=r.process,Qe=Ze&&Ze.versions,et=Qe&&Qe.v8;et?Ye=(Xe=et.split("."))[0]+Xe[1]:Je&&(!(Xe=Je.match(/Edge\/(\d+)/))||Xe[1]>=74)&&(Xe=Je.match(/Chrome\/(\d+)/))&&(Ye=Xe[1]);var tt=Ye&&+Ye,nt=Ne("species"),rt=function(e){return tt>=51||!i((function(){var t=[];return(t.constructor={})[nt]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},it=Ue.filter,at=rt("filter"),ot=Ge("filter");Ce({target:"Array",proto:!0,forced:!at||!ot},{filter:function(e){return it(this,e,arguments.length>1?arguments[1]:void 0)}});var st=Ue.forEach,lt=$e("forEach"),ct=Ge("forEach"),ut=lt&&ct?[].forEach:function(e){return st(this,e,arguments.length>1?arguments[1]:void 0)};Ce({target:"Array",proto:!0,forced:[].forEach!=ut},{forEach:ut});var ft=fe.indexOf,dt=[].indexOf,pt=!!dt&&1/[1].indexOf(1,-0)<0,ht=$e("indexOf"),mt=Ge("indexOf",{ACCESSORS:!0,1:0});Ce({target:"Array",proto:!0,forced:pt||!ht||!mt},{indexOf:function(e){return pt?dt.apply(this,arguments)||0:ft(this,e,arguments.length>1?arguments[1]:void 0)}}),Ce({target:"Array",stat:!0},{isArray:ke});var vt=[].join,gt=p!=Object,yt=$e("join",",");Ce({target:"Array",proto:!0,forced:gt||!yt},{join:function(e){return vt.call(m(this),void 0===e?",":e)}});var bt=Math.min,St=[].lastIndexOf,Et=!!St&&1/[1].lastIndexOf(1,-0)<0,xt=$e("lastIndexOf"),wt=Ge("indexOf",{ACCESSORS:!0,1:0}),Lt=Et||!xt||!wt?function(e){if(Et)return St.apply(this,arguments)||0;var t=m(this),n=oe(t.length),r=n-1;for(arguments.length>1&&(r=bt(r,ie(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:St;Ce({target:"Array",proto:!0,forced:Lt!==[].lastIndexOf},{lastIndexOf:Lt});var Tt=Ue.map,Ct=rt("map"),Ot=Ge("map");Ce({target:"Array",proto:!0,forced:!Ct||!Ot},{map:function(e){return Tt(this,e,arguments.length>1?arguments[1]:void 0)}});var At=function(e,t,n){var r=g(t);r in e?O.f(e,r,c(0,n)):e[r]=n},kt=rt("slice"),It=Ge("slice",{ACCESSORS:!0,0:0,1:2}),Pt=Ne("species"),Mt=[].slice,Rt=Math.max;Ce({target:"Array",proto:!0,forced:!kt||!It},{slice:function(e,t){var n,r,i,a=m(this),o=oe(a.length),s=ce(e,o),l=ce(void 0===t?o:t,o);if(ke(a)&&("function"!=typeof(n=a.constructor)||n!==Array&&!ke(n.prototype)?v(n)&&null===(n=n[Pt])&&(n=void 0):n=void 0,n===Array||void 0===n))return Mt.call(a,s,l);for(r=new(void 0===n?Array:n)(Rt(l-s,0)),i=0;s<l;s++,i++)s in a&&At(r,i,a[s]);return r.length=i,r}});var jt=O.f,Nt=Function.prototype,_t=Nt.toString,Ft=/^\s*function ([^ (]*)/;a&&!("name"in Nt)&&jt(Nt,"name",{configurable:!0,get:function(){try{return _t.call(this).match(Ft)[1]}catch(e){return""}}});var Wt=he.f,Ht={}.toString,Ut="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],$t=function(e){return Ut&&"[object Window]"==Ht.call(e)?function(e){try{return Wt(e)}catch(e){return Ut.slice()}}(e):Wt(m(e))};Ce({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:$t});var Dt="\t\n\v\f\r                 \u2028\u2029\ufeff",qt="["+Dt+"]",Bt=RegExp("^"+qt+qt+"*"),Gt=RegExp(qt+qt+"*$"),Vt=function(e){return function(t){var n=String(h(t));return 1&e&&(n=n.replace(Bt,"")),2&e&&(n=n.replace(Gt,"")),n}},Kt={start:Vt(1),end:Vt(2),trim:Vt(3)},zt=Kt.trim,Xt=r.parseFloat,Yt=1/Xt(Dt+"-0")!=-1/0?function(e){var t=zt(String(e)),n=Xt(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Xt;Ce({global:!0,forced:parseFloat!=Yt},{parseFloat:Yt});var Jt=Kt.trim,Zt=r.parseInt,Qt=/^[+-]?0[Xx]/,en=8!==Zt(Dt+"08")||22!==Zt(Dt+"0x16")?function(e,t){var n=Jt(String(e));return Zt(n,t>>>0||(Qt.test(n)?16:10))}:Zt;Ce({global:!0,forced:parseInt!=en},{parseInt:en});var tn=function(){var e=T(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function nn(e,t){return RegExp(e,t)}var rn,an,on={UNSUPPORTED_Y:i((function(){var e=nn("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:i((function(){var e=nn("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},sn=RegExp.prototype.exec,ln=String.prototype.replace,cn=sn,un=(rn=/a/,an=/b*/g,sn.call(rn,"a"),sn.call(an,"a"),0!==rn.lastIndex||0!==an.lastIndex),fn=on.UNSUPPORTED_Y||on.BROKEN_CARET,dn=void 0!==/()??/.exec("")[1];(un||dn||fn)&&(cn=function(e){var t,n,r,i,a=this,o=fn&&a.sticky,s=tn.call(a),l=a.source,c=0,u=e;return o&&(-1===(s=s.replace("y","")).indexOf("g")&&(s+="g"),u=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(l="(?: "+l+")",u=" "+u,c++),n=new RegExp("^(?:"+l+")",s)),dn&&(n=new RegExp("^"+l+"$(?!\\s)",s)),un&&(t=a.lastIndex),r=sn.call(o?n:a,u),o?r?(r.input=r.input.slice(c),r[0]=r[0].slice(c),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:un&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),dn&&r&&r.length>1&&ln.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r});var pn=cn;Ce({target:"RegExp",proto:!0,forced:/./.exec!==pn},{exec:pn});var hn,mn=Ne("match"),vn=function(e){var t;return v(e)&&(void 0!==(t=e[mn])?!!t:"RegExp"==f(e))},gn=function(e){if(vn(e))throw TypeError("The method doesn't accept regular expressions");return e},yn=Ne("match"),bn=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[yn]=!1,"/./"[e](t)}catch(e){}}return!1},Sn=L.f,En="".endsWith,xn=Math.min,wn=bn("endsWith");Ce({target:"String",proto:!0,forced:!!(wn||(hn=Sn(String.prototype,"endsWith"),!hn||hn.writable))&&!wn},{endsWith:function(e){var t=String(h(this));gn(e);var n=arguments.length>1?arguments[1]:void 0,r=oe(t.length),i=void 0===n?r:xn(oe(n),r),a=String(e);return En?En.call(t,a,i):t.slice(i-a.length,i)===a}});var Ln=Ne("species"),Tn=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Cn="$0"==="a".replace(/./,"$0"),On=Ne("replace"),An=!!/./[On]&&""===/./[On]("a","$0"),kn=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),In=function(e,t,n,r){var a=Ne(e),o=!i((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=o&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Ln]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!o||!s||"replace"===e&&(!Tn||!Cn||An)||"split"===e&&!kn){var l=/./[a],c=n(a,""[e],(function(e,t,n,r,i){return t.exec===pn?o&&!i?{done:!0,value:l.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Cn,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:An}),u=c[0],f=c[1];Z(String.prototype,e,u),Z(RegExp.prototype,a,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}r&&A(RegExp.prototype[a],"sham",!0)},Pn=function(e){return function(t,n){var r,i,a=String(h(t)),o=ie(n),s=a.length;return o<0||o>=s?e?"":void 0:(r=a.charCodeAt(o))<55296||r>56319||o+1===s||(i=a.charCodeAt(o+1))<56320||i>57343?e?a.charAt(o):r:e?a.slice(o,o+2):i-56320+(r-55296<<10)+65536}},Mn={codeAt:Pn(!1),charAt:Pn(!0)}.charAt,Rn=function(e,t,n){return t+(n?Mn(e,t).length:1)},jn=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==f(e))throw TypeError("RegExp#exec called on incompatible receiver");return pn.call(e,t)},Nn=Math.max,_n=Math.min,Fn=Math.floor,Wn=/\$([$&'`]|\d\d?|<[^>]*>)/g,Hn=/\$([$&'`]|\d\d?)/g;In("replace",2,(function(e,t,n,r){var i=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,a=r.REPLACE_KEEPS_$0,o=i?"$":"$0";return[function(n,r){var i=h(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!i&&a||"string"==typeof r&&-1===r.indexOf(o)){var l=n(t,e,this,r);if(l.done)return l.value}var c=T(e),u=String(this),f="function"==typeof r;f||(r=String(r));var d=c.global;if(d){var p=c.unicode;c.lastIndex=0}for(var h=[];;){var m=jn(c,u);if(null===m)break;if(h.push(m),!d)break;""===String(m[0])&&(c.lastIndex=Rn(u,oe(c.lastIndex),p))}for(var v,g="",y=0,b=0;b<h.length;b++){m=h[b];for(var S=String(m[0]),E=Nn(_n(ie(m.index),u.length),0),x=[],w=1;w<m.length;w++)x.push(void 0===(v=m[w])?v:String(v));var L=m.groups;if(f){var C=[S].concat(x,E,u);void 0!==L&&C.push(L);var O=String(r.apply(void 0,C))}else O=s(S,u,E,x,L,r);E>=y&&(g+=u.slice(y,E)+O,y=E+S.length)}return g+u.slice(y)}];function s(e,n,r,i,a,o){var s=r+e.length,l=i.length,c=Hn;return void 0!==a&&(a=Ae(a),c=Wn),t.call(o,c,(function(t,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(s);case"<":c=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return t;if(u>l){var f=Fn(u/10);return 0===f?t:f<=l?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):t}c=i[u-1]}return void 0===c?"":c}))}}));var Un=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};In("search",1,(function(e,t,n){return[function(t){var n=h(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var i=T(e),a=String(this),o=i.lastIndex;Un(o,0)||(i.lastIndex=0);var s=jn(i,a);return Un(i.lastIndex,o)||(i.lastIndex=o),null===s?-1:s.index}]}));var $n=Ne("species"),Dn=[].push,qn=Math.min,Bn=!i((function(){return!RegExp(4294967295,"y")}));In("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(h(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!vn(e))return t.call(r,e,i);for(var a,o,s,l=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),u=0,f=new RegExp(e.source,c+"g");(a=pn.call(f,r))&&!((o=f.lastIndex)>u&&(l.push(r.slice(u,a.index)),a.length>1&&a.index<r.length&&Dn.apply(l,a.slice(1)),s=a[0].length,u=o,l.length>=i));)f.lastIndex===a.index&&f.lastIndex++;return u===r.length?!s&&f.test("")||l.push(""):l.push(r.slice(u)),l.length>i?l.slice(0,i):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=h(this),a=null==t?void 0:t[e];return void 0!==a?a.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var o=T(e),s=String(this),l=function(e,t){var n,r=T(e).constructor;return void 0===r||null==(n=T(r)[$n])?t:Oe(n)}(o,RegExp),c=o.unicode,u=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Bn?"y":"g"),f=new l(Bn?o:"^(?:"+o.source+")",u),d=void 0===i?4294967295:i>>>0;if(0===d)return[];if(0===s.length)return null===jn(f,s)?[s]:[];for(var p=0,h=0,m=[];h<s.length;){f.lastIndex=Bn?h:0;var v,g=jn(f,Bn?s:s.slice(h));if(null===g||(v=qn(oe(f.lastIndex+(Bn?0:h)),s.length))===p)h=Rn(s,h,c);else{if(m.push(s.slice(p,h)),m.length===d)return m;for(var y=1;y<=g.length-1;y++)if(m.push(g[y]),m.length===d)return m;h=p=v}}return m.push(s.slice(p)),m}]}),!Bn);var Gn=L.f,Vn="".startsWith,Kn=Math.min,zn=bn("startsWith");Ce({target:"String",proto:!0,forced:!(!zn&&!!function(){var e=Gn(String.prototype,"startsWith");return e&&!e.writable}())&&!zn},{startsWith:function(e){var t=String(h(this));gn(e);var n=oe(Kn(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return Vn?Vn.call(t,r,n):t.slice(n,n+r.length)===r}});var Xn,Yn=Kt.trim;Ce({target:"String",proto:!0,forced:(Xn="trim",i((function(){return!!Dt[Xn]()||"​…᠎"!="​…᠎"[Xn]()||Dt[Xn].name!==Xn})))},{trim:function(){return Yn(this)}});for(var Jn in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Zn=r[Jn],Qn=Zn&&Zn.prototype;if(Qn&&Qn.forEach!==ut)try{A(Qn,"forEach",ut)}catch(e){Qn.forEach=ut}}var er=[].slice,tr=function(e){return function(t,n){var r=arguments.length>2,i=r?er.call(arguments,2):void 0;return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};Ce({global:!0,bind:!0,forced:/MSIE .\./.test(Je)},{setTimeout:tr(r.setTimeout),setInterval:tr(r.setInterval)});return String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return this.substr(t||0,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return(void 0===t||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e}),function(){var e,t,n,r,i=(e=/(msie) ([\w.]+)/.exec(window.navigator.userAgent.toLowerCase()))&&"msie"===e[1]?parseFloat(e[2]):null,a=!1;function o(e){(r=e.menu||{}).path=r.path||function(){var e;if(document.querySelector('script[src$="menu.js"]')){var t=document.querySelector('script[src$="menu.js"]');t&&(e=t.src.slice(0,-7))}else e=("undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("menu.js",document.baseURI).href).slice(0,("undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("menu.js",document.baseURI).href).lastIndexOf("/")+1);return e}()||"plugin/menu/",r.path.endsWith("/")||(r.path+="/"),void 0===r.side&&(r.side="left"),void 0===r.numbers&&(r.numbers=!1),"string"!=typeof r.titleSelector&&(r.titleSelector="h1, h2, h3, h4, h5"),void 0===r.hideMissingTitles&&(r.hideMissingTitles=!1),void 0===r.useTextContentForMissingTitles&&(r.useTextContentForMissingTitles=!1),void 0===r.markers&&(r.markers=!0),"string"!=typeof r.themesPath&&(r.themesPath="dist/theme/"),r.themesPath.endsWith("/")||(r.themesPath+="/"),O("link#theme")||(r.themes=!1),!0===r.themes?r.themes=[{name:"Black",theme:r.themesPath+"black.css"},{name:"White",theme:r.themesPath+"white.css"},{name:"League",theme:r.themesPath+"league.css"},{name:"Sky",theme:r.themesPath+"sky.css"},{name:"Beige",theme:r.themesPath+"beige.css"},{name:"Simple",theme:r.themesPath+"simple.css"},{name:"Serif",theme:r.themesPath+"serif.css"},{name:"Blood",theme:r.themesPath+"blood.css"},{name:"Night",theme:r.themesPath+"night.css"},{name:"Moon",theme:r.themesPath+"moon.css"},{name:"Solarized",theme:r.themesPath+"solarized.css"}]:Array.isArray(r.themes)||(r.themes=!1),void 0===r.transitions&&(r.transitions=!1),!0===r.transitions?r.transitions=["None","Fade","Slide","Convex","Concave","Zoom"]:!1===r.transitions||Array.isArray(r.transitions)&&r.transitions.every((function(e){return"string"==typeof e}))||(console.error("reveal.js-menu error: transitions config value must be 'true' or an array of strings, eg ['None', 'Fade', 'Slide')"),r.transitions=!1),i&&i<=9&&(r.transitions=!1),void 0===r.openButton&&(r.openButton=!0),void 0===r.openSlideNumber&&(r.openSlideNumber=!1),void 0===r.keyboard&&(r.keyboard=!0),void 0===r.sticky&&(r.sticky=!1),void 0===r.autoOpen&&(r.autoOpen=!0),void 0===r.delayInit&&(r.delayInit=!1),void 0===r.openOnInit&&(r.openOnInit=!1)}var s=!0;function l(){s=!1}function c(){O("nav.slide-menu").addEventListener("mousemove",(function e(t){O("nav.slide-menu").removeEventListener("mousemove",e),s=!0}))}function u(e){var t=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-e.scrollLeft,n+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{top:n,left:t}}(e).top-e.offsetParent.offsetTop;if(t<0)return-t;var n=e.offsetParent.offsetHeight-(e.offsetTop-e.offsetParent.scrollTop+e.offsetHeight);return n<0?n:0}function f(e){var t=u(e);t&&(l(),e.scrollIntoView(t>0),c())}function d(e){l(),e.offsetParent.scrollTop=e.offsetTop,c()}function p(e){l(),e.offsetParent.scrollTop=e.offsetTop-e.offsetParent.offsetHeight+e.offsetHeight,c()}function h(e){e.classList.add("selected"),f(e),r.sticky&&r.autoOpen&&E(e)}function m(e){if(b())switch(e.stopImmediatePropagation(),e.keyCode){case 72:case 37:!function(){var e=parseInt(O(".active-toolbar-button").getAttribute("data-button"))-1;e<0&&(e=T-1);S(null,O('.toolbar-panel-button[data-button="'+e+'"]').getAttribute("data-panel"))}();break;case 76:case 39:l=(parseInt(O(".active-toolbar-button").getAttribute("data-button"))+1)%T,S(null,O('.toolbar-panel-button[data-button="'+l+'"]').getAttribute("data-panel"));break;case 75:case 38:if(s=O(".active-menu-panel .slide-menu-items li.selected")||O(".active-menu-panel .slide-menu-items li.active"))A(".active-menu-panel .slide-menu-items li").forEach((function(e){e.classList.remove("selected")})),h(O('.active-menu-panel .slide-menu-items li[data-item="'+(parseInt(s.getAttribute("data-item"))-1)+'"]')||s);else(o=O(".active-menu-panel .slide-menu-items li.slide-menu-item"))&&h(o);break;case 74:case 40:if(s=O(".active-menu-panel .slide-menu-items li.selected")||O(".active-menu-panel .slide-menu-items li.active"))A(".active-menu-panel .slide-menu-items li").forEach((function(e){e.classList.remove("selected")})),h(O('.active-menu-panel .slide-menu-items li[data-item="'+(parseInt(s.getAttribute("data-item"))+1)+'"]')||s);else(o=O(".active-menu-panel .slide-menu-items li.slide-menu-item"))&&h(o);break;case 33:case 85:var t=A(".active-menu-panel .slide-menu-items li").filter((function(e){return u(e)>0})),n=A(".active-menu-panel .slide-menu-items li").filter((function(e){return 0==u(e)})),r=t.length>0&&Math.abs(u(t[t.length-1]))<t[t.length-1].clientHeight?t[t.length-1]:n[0];r&&(r.classList.contains("selected")&&t.length>0&&(p(r),r=(n=A(".active-menu-panel .slide-menu-items li").filter((function(e){return 0==u(e)})))[0]==r?t[t.length-1]:n[0]),A(".active-menu-panel .slide-menu-items li").forEach((function(e){e.classList.remove("selected")})),h(r),d(r));break;case 34:case 68:n=A(".active-menu-panel .slide-menu-items li").filter((function(e){return 0==u(e)}));var i=A(".active-menu-panel .slide-menu-items li").filter((function(e){return u(e)<0})),a=i.length>0&&Math.abs(u(i[0]))<i[0].clientHeight?i[0]:n[n.length-1];a&&(a.classList.contains("selected")&&i.length>0&&(d(a),a=(n=A(".active-menu-panel .slide-menu-items li").filter((function(e){return 0==u(e)})))[n.length-1]==a?i[0]:n[n.length-1]),A(".active-menu-panel .slide-menu-items li").forEach((function(e){e.classList.remove("selected")})),h(a),p(a));break;case 36:A(".active-menu-panel .slide-menu-items li").forEach((function(e){e.classList.remove("selected")})),(o=O(".active-menu-panel .slide-menu-items li:first-of-type"))&&(o.classList.add("selected"),f(o));break;case 35:var o;A(".active-menu-panel .slide-menu-items li").forEach((function(e){e.classList.remove("selected")})),(o=O(".active-menu-panel .slide-menu-items:last-of-type li:last-of-type"))&&(o.classList.add("selected"),f(o));break;case 32:case 13:var s;(s=O(".active-menu-panel .slide-menu-items li.selected"))&&E(s,!0);break;case 27:g(null,!0)}var l}function v(e){(e&&e.preventDefault(),b())||(O("body").classList.add("slide-menu-active"),O(".reveal").classList.add("has-"+r.effect+"-"+r.side),O(".slide-menu").classList.add("active"),O(".slide-menu-overlay").classList.add("active"),r.themes&&(A('div[data-panel="Themes"] li').forEach((function(e){e.classList.remove("active")})),A('li[data-theme="'+O("link#theme").getAttribute("href")+'"]').forEach((function(e){e.classList.add("active")}))),r.transitions&&(A('div[data-panel="Transitions"] li').forEach((function(e){e.classList.remove("active")})),A('li[data-transition="'+n.transition+'"]').forEach((function(e){e.classList.add("active")}))),A(".slide-menu-panel li.active").forEach((function(e){e.classList.add("selected"),f(e)})))}function g(e,t){e&&e.preventDefault(),r.sticky&&!t||(O("body").classList.remove("slide-menu-active"),O(".reveal").classList.remove("has-"+r.effect+"-"+r.side),O(".slide-menu").classList.remove("active"),O(".slide-menu-overlay").classList.remove("active"),A(".slide-menu-panel li.selected").forEach((function(e){e.classList.remove("selected")})))}function y(e){b()?g(e,!0):v(e)}function b(){return O("body").classList.contains("slide-menu-active")}function S(e,t){v(e);var n=t;"string"!=typeof t&&(n=e.currentTarget.getAttribute("data-panel")),O(".slide-menu-toolbar > li.active-toolbar-button").classList.remove("active-toolbar-button"),O('li[data-panel="'+n+'"]').classList.add("active-toolbar-button"),O(".slide-menu-panel.active-menu-panel").classList.remove("active-menu-panel"),O('div[data-panel="'+n+'"]').classList.add("active-menu-panel")}function E(e,n){var i=parseInt(e.getAttribute("data-slide-h")),a=parseInt(e.getAttribute("data-slide-v")),o=e.getAttribute("data-theme"),s=e.getAttribute("data-highlight-theme"),l=e.getAttribute("data-transition");isNaN(i)||isNaN(a)||t.slide(i,a),o&&I("theme",o),s&&I("highlight-theme",s),l&&t.configure({transition:l});var c=O("a",e);c&&(n||!r.sticky||r.autoOpen&&c.href.startsWith("#")||c.href.startsWith(window.location.origin+window.location.pathname+"#"))&&c.click(),g()}function x(e){"A"!==e.target.nodeName&&e.preventDefault(),E(e.currentTarget)}function w(){var e=t.getState();A("li.slide-menu-item, li.slide-menu-item-vertical").forEach((function(t){t.classList.remove("past"),t.classList.remove("active"),t.classList.remove("future");var n=parseInt(t.getAttribute("data-slide-h")),r=parseInt(t.getAttribute("data-slide-v"));n<e.indexh||n===e.indexh&&r<e.indexv?t.classList.add("past"):n===e.indexh&&r===e.indexv?t.classList.add("active"):t.classList.add("future")}))}function L(){var e=window.getComputedStyle(O(".reveal"));O(".slide-menu").style.fontFamily=e.fontFamily}var T=0;function C(){if(!a){var e=function(e,t,n,r,i,a){var o={"data-button":""+T++,class:"toolbar-panel-button"+(a?" active-toolbar-button":"")};t&&(o["data-panel"]=t);var s=k("li",o);return n.startsWith("fa-")?s.appendChild(k("i",{class:r+" "+n})):s.innerHTML=n+"</i>",s.appendChild(k("br"),O("i",s)),s.appendChild(k("span",{class:"slide-menu-toolbar-label"},e),O("i",s)),s.onclick=i,d.appendChild(s),s},i=function(e,i,a,o,s){function l(e,t){if(""===e)return null;var n=t?O(e,i):O(e);return n?n.textContent:null}var c=i.getAttribute("data-menu-title")||l(".menu-title",i)||l(r.titleSelector,i);if(!c&&r.useTextContentForMissingTitles&&(c=i.textContent.trim())&&(c=c.split("\n").map((function(e){return e.trim()})).join(" ").trim().replace(/^(.{16}[^\s]*).*/,"$1").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")+"..."),!c){if(r.hideMissingTitles)return"";e+=" no-title",c="Slide "+(a+1)}var u=k("li",{class:e,"data-item":a,"data-slide-h":o,"data-slide-v":void 0===s?0:s});if(r.markers&&(u.appendChild(k("i",{class:"fas fa-check-circle fa-fw past"})),u.appendChild(k("i",{class:"fas fa-arrow-alt-circle-right fa-fw active"})),u.appendChild(k("i",{class:"far fa-circle fa-fw future"}))),r.numbers){var f=[],d="h.v";switch("string"==typeof r.numbers?d=r.numbers:"string"==typeof n.slideNumber&&(d=n.slideNumber),d){case"c":f.push(a+1);break;case"c/t":f.push(a+1,"/",t.getTotalSlides());break;case"h/v":f.push(o+1),"number"!=typeof s||isNaN(s)||f.push("/",s+1);break;default:f.push(o+1),"number"!=typeof s||isNaN(s)||f.push(".",s+1)}u.appendChild(k("span",{class:"slide-menu-item-number"},f.join("")+". "))}return u.appendChild(k("span",{class:"slide-menu-item-title"},c)),u},o=function(e){s&&(A(".active-menu-panel .slide-menu-items li.selected").forEach((function(e){e.classList.remove("selected")})),e.currentTarget.classList.add("selected"))},l=O(".reveal").parentElement,c=k("div",{class:"slide-menu-wrapper"});l.appendChild(c);var u=k("nav",{class:"slide-menu slide-menu--"+r.side});"string"==typeof r.width&&(-1!=["normal","wide","third","half","full"].indexOf(r.width)?u.classList.add("slide-menu--"+r.width):(u.classList.add("slide-menu--custom"),u.style.width=r.width)),c.appendChild(u),L();var f=k("div",{class:"slide-menu-overlay"});c.appendChild(f),f.onclick=function(){g(null,!0)};var d=k("ol",{class:"slide-menu-toolbar"});O(".slide-menu").appendChild(d),e("Slides","Slides","fa-images","fas",S,!0),r.custom&&r.custom.forEach((function(t,n,r){e(t.title,"Custom"+n,t.icon,null,S)})),r.themes&&e("Themes","Themes","fa-adjust","fas",S),r.transitions&&e("Transitions","Transitions","fa-sticky-note","fas",S);var p=k("li",{id:"close",class:"toolbar-panel-button"});if(p.appendChild(k("i",{class:"fas fa-times"})),p.appendChild(k("br")),p.appendChild(k("span",{class:"slide-menu-toolbar-label"},"Close")),p.onclick=function(){g(null,!0)},d.appendChild(p),function e(){if(document.querySelector("section[data-markdown]:not([data-markdown-parsed])"))setTimeout(e,100);else{var t=k("div",{"data-panel":"Slides",class:"slide-menu-panel active-menu-panel"});t.appendChild(k("ul",{class:"slide-menu-items"})),u.appendChild(t);var n=O('.slide-menu-panel[data-panel="Slides"] > .slide-menu-items'),r=0;A(".slides > section").forEach((function(e,t){var a=A("section",e);if(a.length>0)a.forEach((function(e,a){var o=i(0===a?"slide-menu-item":"slide-menu-item-vertical",e,r,t,a);o&&n.appendChild(o),r++}));else{var o=i("slide-menu-item",e,r,t);o&&n.appendChild(o),r++}})),A(".slide-menu-item, .slide-menu-item-vertical").forEach((function(e){e.onclick=x})),w()}}(),t.addEventListener("slidechanged",w),r.custom){var h=function(){this.status>=200&&this.status<300?(this.panel.innerHTML=this.responseText,C(this.panel)):I(this)},E=function(){I(this)},C=function(e){A("ul.slide-menu-items li.slide-menu-item",e).forEach((function(e,t){e.setAttribute("data-item",t+1),e.onclick=x,e.addEventListener("mouseenter",o)}))},I=function(e){var t="<p>ERROR: The attempt to fetch "+e.responseURL+" failed with HTTP status "+e.status+" ("+e.statusText+").</p><p>Remember that you need to serve the presentation HTML from a HTTP server.</p>";e.panel.innerHTML=t};r.custom.forEach((function(e,t,n){var r=k("div",{"data-panel":"Custom"+t,class:"slide-menu-panel slide-menu-custom-panel"});e.content?(r.innerHTML=e.content,C(r)):e.src&&function(e,t){var n=new XMLHttpRequest;n.panel=e,n.arguments=Array.prototype.slice.call(arguments,2),n.onload=h,n.onerror=E,n.open("get",t,!0),n.send(null)}(r,e.src),u.appendChild(r)}))}if(r.themes){var P=k("div",{class:"slide-menu-panel","data-panel":"Themes"});u.appendChild(P);var M=k("ul",{class:"slide-menu-items"});P.appendChild(M),r.themes.forEach((function(e,t){var n={class:"slide-menu-item","data-item":""+(t+1)};e.theme&&(n["data-theme"]=e.theme),e.highlightTheme&&(n["data-highlight-theme"]=e.highlightTheme);var r=k("li",n,e.name);M.appendChild(r),r.onclick=x}))}if(r.transitions){P=k("div",{class:"slide-menu-panel","data-panel":"Transitions"});u.appendChild(P);M=k("ul",{class:"slide-menu-items"});P.appendChild(M),r.transitions.forEach((function(e,t){var n=k("li",{class:"slide-menu-item","data-transition":e.toLowerCase(),"data-item":""+(t+1)},e);M.appendChild(n),n.onclick=x}))}if(r.openButton){var R=k("div",{class:"slide-menu-button"}),j=k("a",{href:"#"});j.appendChild(k("i",{class:"fas fa-bars"})),R.appendChild(j),O(".reveal").appendChild(R),R.onclick=v}if(r.openSlideNumber)O("div.slide-number").onclick=v;A(".slide-menu-panel .slide-menu-items li").forEach((function(e){e.addEventListener("mouseenter",o)}))}if(r.keyboard){if(document.addEventListener("keydown",m,!1),window.addEventListener("message",(function(e){var t;try{t=JSON.parse(e.data)}catch(e){}t&&"triggerKey"===t.method&&m({keyCode:t.args[0],stopImmediatePropagation:function(){}})})),n.keyboardCondition&&"function"==typeof n.keyboardCondition){var N=n.keyboardCondition;n.keyboardCondition=function(e){return N(e)&&(!b()||77==e.keyCode)}}else n.keyboardCondition=function(e){return!b()||77==e.keyCode};t.addKeyBinding({keyCode:77,key:"M",description:"Toggle menu"},y)}r.openOnInit&&v(),a=!0}function O(e,t){return t||(t=document),t.querySelector(e)}function A(e,t){return t||(t=document),Array.prototype.slice.call(t.querySelectorAll(e))}function k(e,t,n){var r=document.createElement(e);return t&&Object.getOwnPropertyNames(t).forEach((function(e){r.setAttribute(e,t[e])})),n&&(r.innerHTML=n),r}function I(e,t){var n=O("link#"+e),r=n.parentElement,i=n.nextElementSibling;n.remove();var a=n.cloneNode();a.setAttribute("href",t),a.onload=function(){L()},r.insertBefore(a,i)}function P(e,t,n){n.call()}function M(){var e,a,o,s=!i||i>=9;t.isSpeakerNotes()&&window.location.search.endsWith("controls=false")&&(s=!1),s&&(r.delayInit||C(),e="menu-ready",(o=document.createEvent("HTMLEvents",1,2)).initEvent(e,!0,!0),function(e,t){for(var n in t)e[n]=t[n]}(o,a),document.querySelector(".reveal").dispatchEvent(o),n.postMessageEvents&&window.parent!==window.self&&window.parent.postMessage(JSON.stringify({namespace:"reveal",eventName:e,state:t.getState()}),"*"))}return{id:"menu",init:function(e){o(n=(t=e).getConfig()),P(r.path+"menu.css","stylesheet",(function(){void 0===r.loadIcons||r.loadIcons?P(r.path+"font-awesome/css/all.css","stylesheet",M):M()}))},toggle:y,openMenu:v,closeMenu:g,openPanel:S,isOpen:b,initialiseMenu:C,isMenuInitialised:function(){return a}}}}));
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/reveal-menu/quarto-menu.css
CSS
.slide-menu-wrapper .slide-tool-item { display: block; text-align: left; padding: 10px 18px; color: #aaa; cursor: pointer; border-top: solid 1px #555; } .slide-menu-wrapper .slide-tool-item a { text-decoration: none; } .slide-menu-wrapper .slide-tool-item kbd { font-family: monospace; margin-right: 10px; padding: 3px 8px; color: inherit; border: 1px solid; border-radius: 5px; border-color: #555; } .slide-menu-wrapper .slide-menu-toolbar > li.active-toolbar-button { text-decoration: none; } .reveal .slide-menu-button { left: 8px; bottom: 8px; } .reveal .slide-menu-button .fas::before, .reveal .slide-chalkboard-buttons .fas::before, .slide-menu-wrapper .slide-menu-toolbar .fas::before { display: inline-block; height: 2.2rem; width: 2.2rem; content: ""; vertical-align: -0.125em; background-repeat: no-repeat; background-size: 2.2rem 2.2rem; } .reveal .slide-chalkboard-buttons .fas::before { height: 1.45rem; width: 1.45rem; background-size: 1.45rem 1.45rem; vertical-align: 0.1em; } .slide-menu-wrapper .slide-menu-toolbar .fas::before { height: 1.8rem; width: 1.8rem; background-size: 1.8rem 1.8rem; } .slide-menu-wrapper .slide-menu-toolbar .fa-images::before { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-images" viewBox="0 0 16 16"><path d="M4.502 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z"/><path d="M14.002 13a2 2 0 0 1-2 2h-10a2 2 0 0 1-2-2V5A2 2 0 0 1 2 3a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v8a2 2 0 0 1-1.998 2zM14 2H4a1 1 0 0 0-1 1h9.002a2 2 0 0 1 2 2v7A1 1 0 0 0 15 11V3a1 1 0 0 0-1-1zM2.002 4a1 1 0 0 0-1 1v8l2.646-2.354a.5.5 0 0 1 .63-.062l2.66 1.773 3.71-3.71a.5.5 0 0 1 .577-.094l1.777 1.947V5a1 1 0 0 0-1-1h-10z"/></svg>'); } .slide-menu-wrapper .slide-menu-toolbar .fa-gear::before { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-gear" viewBox="0 0 16 16"><path d="M8 4.754a3.246 3.246 0 1 0 0 6.492 3.246 3.246 0 0 0 0-6.492zM5.754 8a2.246 2.246 0 1 1 4.492 0 2.246 2.246 0 0 1-4.492 0z"/><path d="M9.796 1.343c-.527-1.79-3.065-1.79-3.592 0l-.094.319a.873.873 0 0 1-1.255.52l-.292-.16c-1.64-.892-3.433.902-2.54 2.541l.159.292a.873.873 0 0 1-.52 1.255l-.319.094c-1.79.527-1.79 3.065 0 3.592l.319.094a.873.873 0 0 1 .52 1.255l-.16.292c-.892 1.64.901 3.434 2.541 2.54l.292-.159a.873.873 0 0 1 1.255.52l.094.319c.527 1.79 3.065 1.79 3.592 0l.094-.319a.873.873 0 0 1 1.255-.52l.292.16c1.64.893 3.434-.902 2.54-2.541l-.159-.292a.873.873 0 0 1 .52-1.255l.319-.094c1.79-.527 1.79-3.065 0-3.592l-.319-.094a.873.873 0 0 1-.52-1.255l.16-.292c.893-1.64-.902-3.433-2.541-2.54l-.292.159a.873.873 0 0 1-1.255-.52l-.094-.319zm-2.633.283c.246-.835 1.428-.835 1.674 0l.094.319a1.873 1.873 0 0 0 2.693 1.115l.291-.16c.764-.415 1.6.42 1.184 1.185l-.159.292a1.873 1.873 0 0 0 1.116 2.692l.318.094c.835.246.835 1.428 0 1.674l-.319.094a1.873 1.873 0 0 0-1.115 2.693l.16.291c.415.764-.42 1.6-1.185 1.184l-.291-.159a1.873 1.873 0 0 0-2.693 1.116l-.094.318c-.246.835-1.428.835-1.674 0l-.094-.319a1.873 1.873 0 0 0-2.692-1.115l-.292.16c-.764.415-1.6-.42-1.184-1.185l.159-.291A1.873 1.873 0 0 0 1.945 8.93l-.319-.094c-.835-.246-.835-1.428 0-1.674l.319-.094A1.873 1.873 0 0 0 3.06 4.377l-.16-.292c-.415-.764.42-1.6 1.185-1.184l.292.159a1.873 1.873 0 0 0 2.692-1.115l.094-.319z"/></svg>'); } .slide-menu-wrapper .slide-menu-toolbar .fa-times::before { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-x" viewBox="0 0 16 16"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/></svg>'); }
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js
JavaScript
window.revealMenuToolHandler = function (handler) { return function (event) { event.preventDefault(); handler(); Reveal.getPlugin("menu").closeMenu(); }; }; window.RevealMenuToolHandlers = { fullscreen: revealMenuToolHandler(function () { const element = document.documentElement; const requestMethod = element.requestFullscreen || element.webkitRequestFullscreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen; if (requestMethod) { requestMethod.apply(element); } }), speakerMode: revealMenuToolHandler(function () { Reveal.getPlugin("notes").open(); }), keyboardHelp: revealMenuToolHandler(function () { Reveal.toggleHelp(true); }), overview: revealMenuToolHandler(function () { Reveal.toggleOverview(true); }), toggleChalkboard: revealMenuToolHandler(function () { RevealChalkboard.toggleChalkboard(); }), toggleNotesCanvas: revealMenuToolHandler(function () { RevealChalkboard.toggleNotesCanvas(); }), downloadDrawings: revealMenuToolHandler(function () { RevealChalkboard.download(); }), togglePdfExport: revealMenuToolHandler(function () { PdfExport.togglePdfExport(); }), };
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/search/plugin.js
JavaScript
/*! * Handles finding a text string anywhere in the slides and showing the next occurrence to the user * by navigatating to that slide and highlighting it. * * @author Jon Snyder <snyder.jon@gmail.com>, February 2013 */ const Plugin = () => { // The reveal.js instance this plugin is attached to let deck; let searchElement; let searchButton; let searchInput; let matchedSlides; let currentMatchedIndex; let searchboxDirty; let hilitor; function render() { searchElement = document.createElement( 'div' ); searchElement.classList.add( 'searchbox' ); searchElement.style.position = 'absolute'; searchElement.style.top = '10px'; searchElement.style.right = '10px'; searchElement.style.zIndex = 10; //embedded base64 search icon Designed by Sketchdock - http://www.sketchdock.com/: searchElement.innerHTML = `<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/> </span>`; searchInput = searchElement.querySelector( '.searchinput' ); searchInput.style.width = '240px'; searchInput.style.fontSize = '14px'; searchInput.style.padding = '4px 6px'; searchInput.style.color = '#000'; searchInput.style.background = '#fff'; searchInput.style.borderRadius = '2px'; searchInput.style.border = '0'; searchInput.style.outline = '0'; searchInput.style.boxShadow = '0 2px 18px rgba(0, 0, 0, 0.2)'; searchInput.style['-webkit-appearance'] = 'none'; deck.getRevealElement().appendChild( searchElement ); // searchButton.addEventListener( 'click', function(event) { // doSearch(); // }, false ); searchInput.addEventListener( 'keyup', function( event ) { switch (event.keyCode) { case 13: event.preventDefault(); doSearch(); searchboxDirty = false; break; default: searchboxDirty = true; } }, false ); closeSearch(); } function openSearch() { if( !searchElement ) render(); searchElement.style.display = 'inline'; searchInput.focus(); searchInput.select(); } function closeSearch() { if( !searchElement ) render(); searchElement.style.display = 'none'; if(hilitor) hilitor.remove(); } function toggleSearch() { if( !searchElement ) render(); if (searchElement.style.display !== 'inline') { openSearch(); } else { closeSearch(); } } function doSearch() { //if there's been a change in the search term, perform a new search: if (searchboxDirty) { var searchstring = searchInput.value; if (searchstring === '') { if(hilitor) hilitor.remove(); matchedSlides = null; } else { //find the keyword amongst the slides hilitor = new Hilitor("slidecontent"); matchedSlides = hilitor.apply(searchstring); currentMatchedIndex = 0; } } if (matchedSlides) { //navigate to the next slide that has the keyword, wrapping to the first if necessary if (matchedSlides.length && (matchedSlides.length <= currentMatchedIndex)) { currentMatchedIndex = 0; } if (matchedSlides.length > currentMatchedIndex) { deck.slide(matchedSlides[currentMatchedIndex].h, matchedSlides[currentMatchedIndex].v); currentMatchedIndex++; } } } // Original JavaScript code by Chirp Internet: www.chirp.com.au // Please acknowledge use of this code by including this header. // 2/2013 jon: modified regex to display any match, not restricted to word boundaries. function Hilitor(id, tag) { var targetNode = document.getElementById(id) || document.body; var hiliteTag = tag || "EM"; var skipTags = new RegExp("^(?:" + hiliteTag + "|SCRIPT|FORM)$"); var colors = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"]; var wordColor = []; var colorIdx = 0; var matchRegex = ""; var matchingSlides = []; this.setRegex = function(input) { input = input.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\w'-]+/g, "|"); matchRegex = new RegExp("(" + input + ")","i"); } this.getRegex = function() { return matchRegex.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " "); } // recursively apply word highlighting this.hiliteWords = function(node) { if(node == undefined || !node) return; if(!matchRegex) return; if(skipTags.test(node.nodeName)) return; if(node.hasChildNodes()) { for(var i=0; i < node.childNodes.length; i++) this.hiliteWords(node.childNodes[i]); } if(node.nodeType == 3) { // NODE_TEXT var nv, regs; if((nv = node.nodeValue) && (regs = matchRegex.exec(nv))) { //find the slide's section element and save it in our list of matching slides var secnode = node; while (secnode != null && secnode.nodeName != 'SECTION') { secnode = secnode.parentNode; } var slideIndex = deck.getIndices(secnode); var slidelen = matchingSlides.length; var alreadyAdded = false; for (var i=0; i < slidelen; i++) { if ( (matchingSlides[i].h === slideIndex.h) && (matchingSlides[i].v === slideIndex.v) ) { alreadyAdded = true; } } if (! alreadyAdded) { matchingSlides.push(slideIndex); } if(!wordColor[regs[0].toLowerCase()]) { wordColor[regs[0].toLowerCase()] = colors[colorIdx++ % colors.length]; } var match = document.createElement(hiliteTag); match.appendChild(document.createTextNode(regs[0])); match.style.backgroundColor = wordColor[regs[0].toLowerCase()]; match.style.fontStyle = "inherit"; match.style.color = "#000"; var after = node.splitText(regs.index); after.nodeValue = after.nodeValue.substring(regs[0].length); node.parentNode.insertBefore(match, after); } } }; // remove highlighting this.remove = function() { var arr = document.getElementsByTagName(hiliteTag); var el; while(arr.length && (el = arr[0])) { el.parentNode.replaceChild(el.firstChild, el); } }; // start highlighting at target node this.apply = function(input) { if(input == undefined || !input) return; this.remove(); this.setRegex(input); this.hiliteWords(targetNode); return matchingSlides; }; } return { id: 'search', init: reveal => { deck = reveal; deck.registerKeyboardShortcut( 'CTRL + Shift + F', 'Search' ); document.addEventListener( 'keydown', function( event ) { if( event.key == "F" && (event.ctrlKey || event.metaKey) ) { //Control+Shift+f event.preventDefault(); toggleSearch(); } }, false ); }, open: openSearch } }; export default Plugin;
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/search/search.esm.js
JavaScript
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e){try{return!!e()}catch(e){return!0}},n=!t((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),r=function(e){return e&&e.Math==Math&&e},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")(),i=t,c=/#|\.prototype\./,a=function(e,t){var n=l[u(e)];return n==s||n!=f&&("function"==typeof t?i(t):!!t)},u=a.normalize=function(e){return String(e).replace(c,".").toLowerCase()},l=a.data={},f=a.NATIVE="N",s=a.POLYFILL="P",p=a,g=function(e){return"object"==typeof e?null!==e:"function"==typeof e},d=g,h=function(e){if(!d(e))throw TypeError(String(e)+" is not an object");return e},y=g,v=h,x=function(e){if(!y(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},b=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return v(n),x(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),E=g,m=b,S={},w=g,O=o.document,R=w(O)&&w(O.createElement),T=function(e){return R?O.createElement(e):{}},_=!n&&!t((function(){return 7!=Object.defineProperty(T("div"),"a",{get:function(){return 7}}).a})),j=g,P=function(e,t){if(!j(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!j(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!j(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!j(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},I=n,C=_,N=h,A=P,k=Object.defineProperty;S.f=I?k:function(e,t,n){if(N(e),t=A(t,!0),N(n),C)try{return k(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var $={},L=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},M=L,U=function(e){return Object(M(e))},D=U,F={}.hasOwnProperty,z=function(e,t){return F.call(D(e),t)},K={}.toString,B=function(e){return K.call(e).slice(8,-1)},W=B,G="".split,V=t((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==W(e)?G.call(e,""):Object(e)}:Object,Y=L,q=function(e){return V(Y(e))},X=Math.ceil,H=Math.floor,J=function(e){return isNaN(e=+e)?0:(e>0?H:X)(e)},Q=J,Z=Math.min,ee=function(e){return e>0?Z(Q(e),9007199254740991):0},te=J,ne=Math.max,re=Math.min,oe=q,ie=ee,ce=function(e,t){var n=te(e);return n<0?ne(n+t,0):re(n,t)},ae=function(e){return function(t,n,r){var o,i=oe(t),c=ie(i.length),a=ce(r,c);if(e&&n!=n){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},ue={includes:ae(!0),indexOf:ae(!1)},le={},fe=z,se=q,pe=ue.indexOf,ge=le,de=function(e,t){var n,r=se(e),o=0,i=[];for(n in r)!fe(ge,n)&&fe(r,n)&&i.push(n);for(;t.length>o;)fe(r,n=t[o++])&&(~pe(i,n)||i.push(n));return i},he=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");$.f=Object.getOwnPropertyNames||function(e){return de(e,he)};var ye={exports:{}},ve=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},xe=S,be=ve,Ee=n?function(e,t,n){return xe.f(e,t,be(1,n))}:function(e,t,n){return e[t]=n,e},me=o,Se=Ee,we=function(e,t){try{Se(me,e,t)}catch(n){me[e]=t}return t},Oe=we,Re=o["__core-js_shared__"]||Oe("__core-js_shared__",{}),Te=Re;(ye.exports=function(e,t){return Te[e]||(Te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.12.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var _e,je,Pe=0,Ie=Math.random(),Ce=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Pe+Ie).toString(36)},Ne=o,Ae=o,ke=function(e){return"function"==typeof e?e:void 0},$e=function(e,t){return arguments.length<2?ke(Ne[e])||ke(Ae[e]):Ne[e]&&Ne[e][t]||Ae[e]&&Ae[e][t]},Le=$e("navigator","userAgent")||"",Me=o.process,Ue=Me&&Me.versions,De=Ue&&Ue.v8;De?je=(_e=De.split("."))[0]<4?1:_e[0]+_e[1]:Le&&(!(_e=Le.match(/Edge\/(\d+)/))||_e[1]>=74)&&(_e=Le.match(/Chrome\/(\d+)/))&&(je=_e[1]);var Fe=je&&+je,ze=t,Ke=!!Object.getOwnPropertySymbols&&!ze((function(){return!String(Symbol())||!Symbol.sham&&Fe&&Fe<41})),Be=Ke&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,We=o,Ge=ye.exports,Ve=z,Ye=Ce,qe=Ke,Xe=Be,He=Ge("wks"),Je=We.Symbol,Qe=Xe?Je:Je&&Je.withoutSetter||Ye,Ze=function(e){return Ve(He,e)&&(qe||"string"==typeof He[e])||(qe&&Ve(Je,e)?He[e]=Je[e]:He[e]=Qe("Symbol."+e)),He[e]},et=g,tt=B,nt=Ze("match"),rt=h,ot=function(){var e=rt(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},it={},ct=t;function at(e,t){return RegExp(e,t)}it.UNSUPPORTED_Y=ct((function(){var e=at("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),it.BROKEN_CARET=ct((function(){var e=at("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var ut={exports:{}},lt=Re,ft=Function.toString;"function"!=typeof lt.inspectSource&&(lt.inspectSource=function(e){return ft.call(e)});var st,pt,gt,dt=lt.inspectSource,ht=dt,yt=o.WeakMap,vt="function"==typeof yt&&/native code/.test(ht(yt)),xt=ye.exports,bt=Ce,Et=xt("keys"),mt=vt,St=g,wt=Ee,Ot=z,Rt=Re,Tt=function(e){return Et[e]||(Et[e]=bt(e))},_t=le,jt=o.WeakMap;if(mt||Rt.state){var Pt=Rt.state||(Rt.state=new jt),It=Pt.get,Ct=Pt.has,Nt=Pt.set;st=function(e,t){if(Ct.call(Pt,e))throw new TypeError("Object already initialized");return t.facade=e,Nt.call(Pt,e,t),t},pt=function(e){return It.call(Pt,e)||{}},gt=function(e){return Ct.call(Pt,e)}}else{var At=Tt("state");_t[At]=!0,st=function(e,t){if(Ot(e,At))throw new TypeError("Object already initialized");return t.facade=e,wt(e,At,t),t},pt=function(e){return Ot(e,At)?e[At]:{}},gt=function(e){return Ot(e,At)}}var kt={set:st,get:pt,has:gt,enforce:function(e){return gt(e)?pt(e):st(e,{})},getterFor:function(e){return function(t){var n;if(!St(t)||(n=pt(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},$t=o,Lt=Ee,Mt=z,Ut=we,Dt=dt,Ft=kt.get,zt=kt.enforce,Kt=String(String).split("String");(ut.exports=function(e,t,n,r){var o,i=!!r&&!!r.unsafe,c=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||Mt(n,"name")||Lt(n,"name",t),(o=zt(n)).source||(o.source=Kt.join("string"==typeof t?t:""))),e!==$t?(i?!a&&e[t]&&(c=!0):delete e[t],c?e[t]=n:Lt(e,t,n)):c?e[t]=n:Ut(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Ft(this).source||Dt(this)}));var Bt=$e,Wt=S,Gt=n,Vt=Ze("species"),Yt=n,qt=o,Xt=p,Ht=function(e,t,n){var r,o;return m&&"function"==typeof(r=t.constructor)&&r!==n&&E(o=r.prototype)&&o!==n.prototype&&m(e,o),e},Jt=S.f,Qt=$.f,Zt=function(e){var t;return et(e)&&(void 0!==(t=e[nt])?!!t:"RegExp"==tt(e))},en=ot,tn=it,nn=ut.exports,rn=t,on=kt.enforce,cn=function(e){var t=Bt(e),n=Wt.f;Gt&&t&&!t[Vt]&&n(t,Vt,{configurable:!0,get:function(){return this}})},an=Ze("match"),un=qt.RegExp,ln=un.prototype,fn=/a/g,sn=/a/g,pn=new un(fn)!==fn,gn=tn.UNSUPPORTED_Y;if(Yt&&Xt("RegExp",!pn||gn||rn((function(){return sn[an]=!1,un(fn)!=fn||un(sn)==sn||"/a/i"!=un(fn,"i")})))){for(var dn=function(e,t){var n,r=this instanceof dn,o=Zt(e),i=void 0===t;if(!r&&o&&e.constructor===dn&&i)return e;pn?o&&!i&&(e=e.source):e instanceof dn&&(i&&(t=en.call(e)),e=e.source),gn&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var c=Ht(pn?new un(e,t):un(e,t),r?this:ln,dn);gn&&n&&(on(c).sticky=!0);return c},hn=function(e){e in dn||Jt(dn,e,{configurable:!0,get:function(){return un[e]},set:function(t){un[e]=t}})},yn=Qt(un),vn=0;yn.length>vn;)hn(yn[vn++]);ln.constructor=dn,dn.prototype=ln,nn(qt,"RegExp",dn)}cn("RegExp");var xn={},bn={},En={}.propertyIsEnumerable,mn=Object.getOwnPropertyDescriptor,Sn=mn&&!En.call({1:2},1);bn.f=Sn?function(e){var t=mn(this,e);return!!t&&t.enumerable}:En;var wn=n,On=bn,Rn=ve,Tn=q,_n=P,jn=z,Pn=_,In=Object.getOwnPropertyDescriptor;xn.f=wn?In:function(e,t){if(e=Tn(e),t=_n(t,!0),Pn)try{return In(e,t)}catch(e){}if(jn(e,t))return Rn(!On.f.call(e,t),e[t])};var Cn={};Cn.f=Object.getOwnPropertySymbols;var Nn=$,An=Cn,kn=h,$n=$e("Reflect","ownKeys")||function(e){var t=Nn.f(kn(e)),n=An.f;return n?t.concat(n(e)):t},Ln=z,Mn=$n,Un=xn,Dn=S,Fn=o,zn=xn.f,Kn=Ee,Bn=ut.exports,Wn=we,Gn=function(e,t){for(var n=Mn(t),r=Dn.f,o=Un.f,i=0;i<n.length;i++){var c=n[i];Ln(e,c)||r(e,c,o(t,c))}},Vn=p,Yn=ot,qn=it,Xn=ye.exports,Hn=RegExp.prototype.exec,Jn=Xn("native-string-replace",String.prototype.replace),Qn=Hn,Zn=function(){var e=/a/,t=/b*/g;return Hn.call(e,"a"),Hn.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),er=qn.UNSUPPORTED_Y||qn.BROKEN_CARET,tr=void 0!==/()??/.exec("")[1];(Zn||tr||er)&&(Qn=function(e){var t,n,r,o,i=this,c=er&&i.sticky,a=Yn.call(i),u=i.source,l=0,f=e;return c&&(-1===(a=a.replace("y","")).indexOf("g")&&(a+="g"),f=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(u="(?: "+u+")",f=" "+f,l++),n=new RegExp("^(?:"+u+")",a)),tr&&(n=new RegExp("^"+u+"$(?!\\s)",a)),Zn&&(t=i.lastIndex),r=Hn.call(c?n:i,f),c?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Zn&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),tr&&r&&r.length>1&&Jn.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var nr=Qn;(function(e,t){var n,r,o,i,c,a=e.target,u=e.global,l=e.stat;if(n=u?Fn:l?Fn[a]||Wn(a,{}):(Fn[a]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(c=zn(n,r))&&c.value:n[r],!Vn(u?r:a+(l?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Gn(i,o)}(e.sham||o&&o.sham)&&Kn(i,"sham",!0),Bn(n,r,i,e)}})({target:"RegExp",proto:!0,forced:/./.exec!==nr},{exec:nr});var rr=ut.exports,or=h,ir=t,cr=ot,ar=RegExp.prototype,ur=ar.toString,lr=ir((function(){return"/a/b"!=ur.call({source:"a",flags:"b"})})),fr="toString"!=ur.name;(lr||fr)&&rr(RegExp.prototype,"toString",(function(){var e=or(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in ar)?cr.call(e):n)}),{unsafe:!0});var sr=ut.exports,pr=nr,gr=t,dr=Ze,hr=Ee,yr=dr("species"),vr=RegExp.prototype,xr=!gr((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),br="$0"==="a".replace(/./,"$0"),Er=dr("replace"),mr=!!/./[Er]&&""===/./[Er]("a","$0"),Sr=!gr((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),wr=J,Or=L,Rr=function(e){return function(t,n){var r,o,i=String(Or(t)),c=wr(n),a=i.length;return c<0||c>=a?e?"":void 0:(r=i.charCodeAt(c))<55296||r>56319||c+1===a||(o=i.charCodeAt(c+1))<56320||o>57343?e?i.charAt(c):r:e?i.slice(c,c+2):o-56320+(r-55296<<10)+65536}},Tr={codeAt:Rr(!1),charAt:Rr(!0)}.charAt,_r=U,jr=Math.floor,Pr="".replace,Ir=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Cr=/\$([$&'`]|\d{1,2})/g,Nr=B,Ar=nr,kr=function(e,t,n,r){var o=dr(e),i=!gr((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),c=i&&!gr((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[yr]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!c||"replace"===e&&(!xr||!br||mr)||"split"===e&&!Sr){var a=/./[o],u=n(o,""[e],(function(e,t,n,r,o){var c=t.exec;return c===pr||c===vr.exec?i&&!o?{done:!0,value:a.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:br,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:mr}),l=u[0],f=u[1];sr(String.prototype,e,l),sr(vr,o,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}r&&hr(vr[o],"sham",!0)},$r=h,Lr=ee,Mr=J,Ur=L,Dr=function(e,t,n){return t+(n?Tr(e,t).length:1)},Fr=function(e,t,n,r,o,i){var c=n+e.length,a=r.length,u=Cr;return void 0!==o&&(o=_r(o),u=Ir),Pr.call(i,u,(function(i,u){var l;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(c);case"<":l=o[u.slice(1,-1)];break;default:var f=+u;if(0===f)return i;if(f>a){var s=jr(f/10);return 0===s?i:s<=a?void 0===r[s-1]?u.charAt(1):r[s-1]+u.charAt(1):i}l=r[f-1]}return void 0===l?"":l}))},zr=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==Nr(e))throw TypeError("RegExp#exec called on incompatible receiver");return Ar.call(e,t)},Kr=Math.max,Br=Math.min;kr("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,c=o?"$":"$0";return[function(n,r){var o=Ur(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(c)){var a=n(t,e,this,r);if(a.done)return a.value}var u=$r(e),l=String(this),f="function"==typeof r;f||(r=String(r));var s=u.global;if(s){var p=u.unicode;u.lastIndex=0}for(var g=[];;){var d=zr(u,l);if(null===d)break;if(g.push(d),!s)break;""===String(d[0])&&(u.lastIndex=Dr(l,Lr(u.lastIndex),p))}for(var h,y="",v=0,x=0;x<g.length;x++){d=g[x];for(var b=String(d[0]),E=Kr(Br(Mr(d.index),l.length),0),m=[],S=1;S<d.length;S++)m.push(void 0===(h=d[S])?h:String(h));var w=d.groups;if(f){var O=[b].concat(m,E,l);void 0!==w&&O.push(w);var R=String(r.apply(void 0,O))}else R=Fr(b,l,E,m,w,r);E>=v&&(y+=l.slice(v,E)+R,v=E+b.length)}return y+l.slice(v)}]}));var Wr={};Wr[Ze("toStringTag")]="z";var Gr="[object z]"===String(Wr),Vr=Gr,Yr=B,qr=Ze("toStringTag"),Xr="Arguments"==Yr(function(){return arguments}()),Hr=Vr?Yr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),qr))?n:Xr?Yr(t):"Object"==(r=Yr(t))&&"function"==typeof t.callee?"Arguments":r},Jr=Gr?{}.toString:function(){return"[object "+Hr(this)+"]"},Qr=Gr,Zr=ut.exports,eo=Jr;Qr||Zr(Object.prototype,"toString",eo,{unsafe:!0}) /*! * Handles finding a text string anywhere in the slides and showing the next occurrence to the user * by navigatating to that slide and highlighting it. * * @author Jon Snyder <snyder.jon@gmail.com>, February 2013 */;export default function(){var e,t,n,r,o,i,c;function a(){(t=document.createElement("div")).classList.add("searchbox"),t.style.position="absolute",t.style.top="10px",t.style.right="10px",t.style.zIndex=10,t.innerHTML='<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/>\n\t\t</span>',(n=t.querySelector(".searchinput")).style.width="240px",n.style.fontSize="14px",n.style.padding="4px 6px",n.style.color="#000",n.style.background="#fff",n.style.borderRadius="2px",n.style.border="0",n.style.outline="0",n.style.boxShadow="0 2px 18px rgba(0, 0, 0, 0.2)",n.style["-webkit-appearance"]="none",e.getRevealElement().appendChild(t),n.addEventListener("keyup",(function(t){switch(t.keyCode){case 13:t.preventDefault(),function(){if(i){var t=n.value;""===t?(c&&c.remove(),r=null):(c=new f("slidecontent"),r=c.apply(t),o=0)}r&&(r.length&&r.length<=o&&(o=0),r.length>o&&(e.slide(r[o].h,r[o].v),o++))}(),i=!1;break;default:i=!0}}),!1),l()}function u(){t||a(),t.style.display="inline",n.focus(),n.select()}function l(){t||a(),t.style.display="none",c&&c.remove()}function f(t,n){var r=document.getElementById(t)||document.body,o=n||"EM",i=new RegExp("^(?:"+o+"|SCRIPT|FORM)$"),c=["#ff6","#a0ffff","#9f9","#f99","#f6f"],a=[],u=0,l="",f=[];this.setRegex=function(e){e=e.replace(/^[^\w]+|[^\w]+$/g,"").replace(/[^\w'-]+/g,"|"),l=new RegExp("("+e+")","i")},this.getRegex=function(){return l.toString().replace(/^\/\\b\(|\)\\b\/i$/g,"").replace(/\|/g," ")},this.hiliteWords=function(t){if(null!=t&&t&&l&&!i.test(t.nodeName)){if(t.hasChildNodes())for(var n=0;n<t.childNodes.length;n++)this.hiliteWords(t.childNodes[n]);var r,s;if(3==t.nodeType)if((r=t.nodeValue)&&(s=l.exec(r))){for(var p=t;null!=p&&"SECTION"!=p.nodeName;)p=p.parentNode;var g=e.getIndices(p),d=f.length,h=!1;for(n=0;n<d;n++)f[n].h===g.h&&f[n].v===g.v&&(h=!0);h||f.push(g),a[s[0].toLowerCase()]||(a[s[0].toLowerCase()]=c[u++%c.length]);var y=document.createElement(o);y.appendChild(document.createTextNode(s[0])),y.style.backgroundColor=a[s[0].toLowerCase()],y.style.fontStyle="inherit",y.style.color="#000";var v=t.splitText(s.index);v.nodeValue=v.nodeValue.substring(s[0].length),t.parentNode.insertBefore(y,v)}}},this.remove=function(){for(var e,t=document.getElementsByTagName(o);t.length&&(e=t[0]);)e.parentNode.replaceChild(e.firstChild,e)},this.apply=function(e){if(null!=e&&e)return this.remove(),this.setRegex(e),this.hiliteWords(r),f}}return{id:"search",init:function(n){(e=n).registerKeyboardShortcut("CTRL + Shift + F","Search"),document.addEventListener("keydown",(function(e){"F"==e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),t||a(),"inline"!==t.style.display?u():l())}),!1)},open:u}}
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/search/search.js
JavaScript
!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).RevealSearch=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e){try{return!!e()}catch(e){return!0}},n=!t((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),r=function(e){return e&&e.Math==Math&&e},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")(),i=t,c=/#|\.prototype\./,a=function(e,t){var n=l[u(e)];return n==s||n!=f&&("function"==typeof t?i(t):!!t)},u=a.normalize=function(e){return String(e).replace(c,".").toLowerCase()},l=a.data={},f=a.NATIVE="N",s=a.POLYFILL="P",p=a,d=function(e){return"object"==typeof e?null!==e:"function"==typeof e},g=d,h=function(e){if(!g(e))throw TypeError(String(e)+" is not an object");return e},y=d,v=h,x=function(e){if(!y(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},b=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return v(n),x(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),m=d,E=b,S={},w=d,O=o.document,R=w(O)&&w(O.createElement),T=function(e){return R?O.createElement(e):{}},_=!n&&!t((function(){return 7!=Object.defineProperty(T("div"),"a",{get:function(){return 7}}).a})),j=d,P=function(e,t){if(!j(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!j(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!j(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!j(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},I=n,C=_,N=h,A=P,k=Object.defineProperty;S.f=I?k:function(e,t,n){if(N(e),t=A(t,!0),N(n),C)try{return k(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var $={},L=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},M=L,U=function(e){return Object(M(e))},D=U,F={}.hasOwnProperty,z=function(e,t){return F.call(D(e),t)},K={}.toString,B=function(e){return K.call(e).slice(8,-1)},W=B,G="".split,V=t((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==W(e)?G.call(e,""):Object(e)}:Object,Y=L,q=function(e){return V(Y(e))},X=Math.ceil,H=Math.floor,J=function(e){return isNaN(e=+e)?0:(e>0?H:X)(e)},Q=J,Z=Math.min,ee=function(e){return e>0?Z(Q(e),9007199254740991):0},te=J,ne=Math.max,re=Math.min,oe=q,ie=ee,ce=function(e,t){var n=te(e);return n<0?ne(n+t,0):re(n,t)},ae=function(e){return function(t,n,r){var o,i=oe(t),c=ie(i.length),a=ce(r,c);if(e&&n!=n){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},ue={includes:ae(!0),indexOf:ae(!1)},le={},fe=z,se=q,pe=ue.indexOf,de=le,ge=function(e,t){var n,r=se(e),o=0,i=[];for(n in r)!fe(de,n)&&fe(r,n)&&i.push(n);for(;t.length>o;)fe(r,n=t[o++])&&(~pe(i,n)||i.push(n));return i},he=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");$.f=Object.getOwnPropertyNames||function(e){return ge(e,he)};var ye={exports:{}},ve=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},xe=S,be=ve,me=n?function(e,t,n){return xe.f(e,t,be(1,n))}:function(e,t,n){return e[t]=n,e},Ee=o,Se=me,we=function(e,t){try{Se(Ee,e,t)}catch(n){Ee[e]=t}return t},Oe=we,Re="__core-js_shared__",Te=o[Re]||Oe(Re,{}),_e=Te;(ye.exports=function(e,t){return _e[e]||(_e[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.12.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var je,Pe,Ie=0,Ce=Math.random(),Ne=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Ie+Ce).toString(36)},Ae=o,ke=o,$e=function(e){return"function"==typeof e?e:void 0},Le=function(e,t){return arguments.length<2?$e(Ae[e])||$e(ke[e]):Ae[e]&&Ae[e][t]||ke[e]&&ke[e][t]},Me=Le("navigator","userAgent")||"",Ue=o.process,De=Ue&&Ue.versions,Fe=De&&De.v8;Fe?Pe=(je=Fe.split("."))[0]<4?1:je[0]+je[1]:Me&&(!(je=Me.match(/Edge\/(\d+)/))||je[1]>=74)&&(je=Me.match(/Chrome\/(\d+)/))&&(Pe=je[1]);var ze=Pe&&+Pe,Ke=t,Be=!!Object.getOwnPropertySymbols&&!Ke((function(){return!String(Symbol())||!Symbol.sham&&ze&&ze<41})),We=Be&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ge=o,Ve=ye.exports,Ye=z,qe=Ne,Xe=Be,He=We,Je=Ve("wks"),Qe=Ge.Symbol,Ze=He?Qe:Qe&&Qe.withoutSetter||qe,et=function(e){return Ye(Je,e)&&(Xe||"string"==typeof Je[e])||(Xe&&Ye(Qe,e)?Je[e]=Qe[e]:Je[e]=Ze("Symbol."+e)),Je[e]},tt=d,nt=B,rt=et("match"),ot=h,it=function(){var e=ot(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},ct={},at=t;function ut(e,t){return RegExp(e,t)}ct.UNSUPPORTED_Y=at((function(){var e=ut("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),ct.BROKEN_CARET=at((function(){var e=ut("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var lt={exports:{}},ft=Te,st=Function.toString;"function"!=typeof ft.inspectSource&&(ft.inspectSource=function(e){return st.call(e)});var pt,dt,gt,ht=ft.inspectSource,yt=ht,vt=o.WeakMap,xt="function"==typeof vt&&/native code/.test(yt(vt)),bt=ye.exports,mt=Ne,Et=bt("keys"),St=xt,wt=d,Ot=me,Rt=z,Tt=Te,_t=function(e){return Et[e]||(Et[e]=mt(e))},jt=le,Pt="Object already initialized",It=o.WeakMap;if(St||Tt.state){var Ct=Tt.state||(Tt.state=new It),Nt=Ct.get,At=Ct.has,kt=Ct.set;pt=function(e,t){if(At.call(Ct,e))throw new TypeError(Pt);return t.facade=e,kt.call(Ct,e,t),t},dt=function(e){return Nt.call(Ct,e)||{}},gt=function(e){return At.call(Ct,e)}}else{var $t=_t("state");jt[$t]=!0,pt=function(e,t){if(Rt(e,$t))throw new TypeError(Pt);return t.facade=e,Ot(e,$t,t),t},dt=function(e){return Rt(e,$t)?e[$t]:{}},gt=function(e){return Rt(e,$t)}}var Lt={set:pt,get:dt,has:gt,enforce:function(e){return gt(e)?dt(e):pt(e,{})},getterFor:function(e){return function(t){var n;if(!wt(t)||(n=dt(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Mt=o,Ut=me,Dt=z,Ft=we,zt=ht,Kt=Lt.get,Bt=Lt.enforce,Wt=String(String).split("String");(lt.exports=function(e,t,n,r){var o,i=!!r&&!!r.unsafe,c=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||Dt(n,"name")||Ut(n,"name",t),(o=Bt(n)).source||(o.source=Wt.join("string"==typeof t?t:""))),e!==Mt?(i?!a&&e[t]&&(c=!0):delete e[t],c?e[t]=n:Ut(e,t,n)):c?e[t]=n:Ft(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Kt(this).source||zt(this)}));var Gt=Le,Vt=S,Yt=n,qt=et("species"),Xt=n,Ht=o,Jt=p,Qt=function(e,t,n){var r,o;return E&&"function"==typeof(r=t.constructor)&&r!==n&&m(o=r.prototype)&&o!==n.prototype&&E(e,o),e},Zt=S.f,en=$.f,tn=function(e){var t;return tt(e)&&(void 0!==(t=e[rt])?!!t:"RegExp"==nt(e))},nn=it,rn=ct,on=lt.exports,cn=t,an=Lt.enforce,un=function(e){var t=Gt(e),n=Vt.f;Yt&&t&&!t[qt]&&n(t,qt,{configurable:!0,get:function(){return this}})},ln=et("match"),fn=Ht.RegExp,sn=fn.prototype,pn=/a/g,dn=/a/g,gn=new fn(pn)!==pn,hn=rn.UNSUPPORTED_Y;if(Xt&&Jt("RegExp",!gn||hn||cn((function(){return dn[ln]=!1,fn(pn)!=pn||fn(dn)==dn||"/a/i"!=fn(pn,"i")})))){for(var yn=function(e,t){var n,r=this instanceof yn,o=tn(e),i=void 0===t;if(!r&&o&&e.constructor===yn&&i)return e;gn?o&&!i&&(e=e.source):e instanceof yn&&(i&&(t=nn.call(e)),e=e.source),hn&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var c=Qt(gn?new fn(e,t):fn(e,t),r?this:sn,yn);hn&&n&&(an(c).sticky=!0);return c},vn=function(e){e in yn||Zt(yn,e,{configurable:!0,get:function(){return fn[e]},set:function(t){fn[e]=t}})},xn=en(fn),bn=0;xn.length>bn;)vn(xn[bn++]);sn.constructor=yn,yn.prototype=sn,on(Ht,"RegExp",yn)}un("RegExp");var mn={},En={},Sn={}.propertyIsEnumerable,wn=Object.getOwnPropertyDescriptor,On=wn&&!Sn.call({1:2},1);En.f=On?function(e){var t=wn(this,e);return!!t&&t.enumerable}:Sn;var Rn=n,Tn=En,_n=ve,jn=q,Pn=P,In=z,Cn=_,Nn=Object.getOwnPropertyDescriptor;mn.f=Rn?Nn:function(e,t){if(e=jn(e),t=Pn(t,!0),Cn)try{return Nn(e,t)}catch(e){}if(In(e,t))return _n(!Tn.f.call(e,t),e[t])};var An={};An.f=Object.getOwnPropertySymbols;var kn=$,$n=An,Ln=h,Mn=Le("Reflect","ownKeys")||function(e){var t=kn.f(Ln(e)),n=$n.f;return n?t.concat(n(e)):t},Un=z,Dn=Mn,Fn=mn,zn=S,Kn=o,Bn=mn.f,Wn=me,Gn=lt.exports,Vn=we,Yn=function(e,t){for(var n=Dn(t),r=zn.f,o=Fn.f,i=0;i<n.length;i++){var c=n[i];Un(e,c)||r(e,c,o(t,c))}},qn=p,Xn=it,Hn=ct,Jn=ye.exports,Qn=RegExp.prototype.exec,Zn=Jn("native-string-replace",String.prototype.replace),er=Qn,tr=function(){var e=/a/,t=/b*/g;return Qn.call(e,"a"),Qn.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),nr=Hn.UNSUPPORTED_Y||Hn.BROKEN_CARET,rr=void 0!==/()??/.exec("")[1];(tr||rr||nr)&&(er=function(e){var t,n,r,o,i=this,c=nr&&i.sticky,a=Xn.call(i),u=i.source,l=0,f=e;return c&&(-1===(a=a.replace("y","")).indexOf("g")&&(a+="g"),f=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(u="(?: "+u+")",f=" "+f,l++),n=new RegExp("^(?:"+u+")",a)),rr&&(n=new RegExp("^"+u+"$(?!\\s)",a)),tr&&(t=i.lastIndex),r=Qn.call(c?n:i,f),c?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:tr&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),rr&&r&&r.length>1&&Zn.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var or=er;(function(e,t){var n,r,o,i,c,a=e.target,u=e.global,l=e.stat;if(n=u?Kn:l?Kn[a]||Vn(a,{}):(Kn[a]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(c=Bn(n,r))&&c.value:n[r],!qn(u?r:a+(l?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Yn(i,o)}(e.sham||o&&o.sham)&&Wn(i,"sham",!0),Gn(n,r,i,e)}})({target:"RegExp",proto:!0,forced:/./.exec!==or},{exec:or});var ir=lt.exports,cr=h,ar=t,ur=it,lr="toString",fr=RegExp.prototype,sr=fr.toString,pr=ar((function(){return"/a/b"!=sr.call({source:"a",flags:"b"})})),dr=sr.name!=lr;(pr||dr)&&ir(RegExp.prototype,lr,(function(){var e=cr(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in fr)?ur.call(e):n)}),{unsafe:!0});var gr=lt.exports,hr=or,yr=t,vr=et,xr=me,br=vr("species"),mr=RegExp.prototype,Er=!yr((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Sr="$0"==="a".replace(/./,"$0"),wr=vr("replace"),Or=!!/./[wr]&&""===/./[wr]("a","$0"),Rr=!yr((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Tr=J,_r=L,jr=function(e){return function(t,n){var r,o,i=String(_r(t)),c=Tr(n),a=i.length;return c<0||c>=a?e?"":void 0:(r=i.charCodeAt(c))<55296||r>56319||c+1===a||(o=i.charCodeAt(c+1))<56320||o>57343?e?i.charAt(c):r:e?i.slice(c,c+2):o-56320+(r-55296<<10)+65536}},Pr={codeAt:jr(!1),charAt:jr(!0)}.charAt,Ir=U,Cr=Math.floor,Nr="".replace,Ar=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,kr=/\$([$&'`]|\d{1,2})/g,$r=B,Lr=or,Mr=function(e,t,n,r){var o=vr(e),i=!yr((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),c=i&&!yr((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[br]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!c||"replace"===e&&(!Er||!Sr||Or)||"split"===e&&!Rr){var a=/./[o],u=n(o,""[e],(function(e,t,n,r,o){var c=t.exec;return c===hr||c===mr.exec?i&&!o?{done:!0,value:a.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Sr,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Or}),l=u[0],f=u[1];gr(String.prototype,e,l),gr(mr,o,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}r&&xr(mr[o],"sham",!0)},Ur=h,Dr=ee,Fr=J,zr=L,Kr=function(e,t,n){return t+(n?Pr(e,t).length:1)},Br=function(e,t,n,r,o,i){var c=n+e.length,a=r.length,u=kr;return void 0!==o&&(o=Ir(o),u=Ar),Nr.call(i,u,(function(i,u){var l;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(c);case"<":l=o[u.slice(1,-1)];break;default:var f=+u;if(0===f)return i;if(f>a){var s=Cr(f/10);return 0===s?i:s<=a?void 0===r[s-1]?u.charAt(1):r[s-1]+u.charAt(1):i}l=r[f-1]}return void 0===l?"":l}))},Wr=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==$r(e))throw TypeError("RegExp#exec called on incompatible receiver");return Lr.call(e,t)},Gr=Math.max,Vr=Math.min;Mr("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,c=o?"$":"$0";return[function(n,r){var o=zr(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(c)){var a=n(t,e,this,r);if(a.done)return a.value}var u=Ur(e),l=String(this),f="function"==typeof r;f||(r=String(r));var s=u.global;if(s){var p=u.unicode;u.lastIndex=0}for(var d=[];;){var g=Wr(u,l);if(null===g)break;if(d.push(g),!s)break;""===String(g[0])&&(u.lastIndex=Kr(l,Dr(u.lastIndex),p))}for(var h,y="",v=0,x=0;x<d.length;x++){g=d[x];for(var b=String(g[0]),m=Gr(Vr(Fr(g.index),l.length),0),E=[],S=1;S<g.length;S++)E.push(void 0===(h=g[S])?h:String(h));var w=g.groups;if(f){var O=[b].concat(E,m,l);void 0!==w&&O.push(w);var R=String(r.apply(void 0,O))}else R=Br(b,l,m,E,w,r);m>=v&&(y+=l.slice(v,m)+R,v=m+b.length)}return y+l.slice(v)}]}));var Yr={};Yr[et("toStringTag")]="z";var qr="[object z]"===String(Yr),Xr=qr,Hr=B,Jr=et("toStringTag"),Qr="Arguments"==Hr(function(){return arguments}()),Zr=Xr?Hr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Jr))?n:Qr?Hr(t):"Object"==(r=Hr(t))&&"function"==typeof t.callee?"Arguments":r},eo=qr?{}.toString:function(){return"[object "+Zr(this)+"]"},to=qr,no=lt.exports,ro=eo;to||no(Object.prototype,"toString",ro,{unsafe:!0}) /*! * Handles finding a text string anywhere in the slides and showing the next occurrence to the user * by navigatating to that slide and highlighting it. * * @author Jon Snyder <snyder.jon@gmail.com>, February 2013 */;return function(){var e,t,n,r,o,i,c;function a(){(t=document.createElement("div")).classList.add("searchbox"),t.style.position="absolute",t.style.top="10px",t.style.right="10px",t.style.zIndex=10,t.innerHTML='<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/>\n\t\t</span>',(n=t.querySelector(".searchinput")).style.width="240px",n.style.fontSize="14px",n.style.padding="4px 6px",n.style.color="#000",n.style.background="#fff",n.style.borderRadius="2px",n.style.border="0",n.style.outline="0",n.style.boxShadow="0 2px 18px rgba(0, 0, 0, 0.2)",n.style["-webkit-appearance"]="none",e.getRevealElement().appendChild(t),n.addEventListener("keyup",(function(t){switch(t.keyCode){case 13:t.preventDefault(),function(){if(i){var t=n.value;""===t?(c&&c.remove(),r=null):(c=new f("slidecontent"),r=c.apply(t),o=0)}r&&(r.length&&r.length<=o&&(o=0),r.length>o&&(e.slide(r[o].h,r[o].v),o++))}(),i=!1;break;default:i=!0}}),!1),l()}function u(){t||a(),t.style.display="inline",n.focus(),n.select()}function l(){t||a(),t.style.display="none",c&&c.remove()}function f(t,n){var r=document.getElementById(t)||document.body,o=n||"EM",i=new RegExp("^(?:"+o+"|SCRIPT|FORM)$"),c=["#ff6","#a0ffff","#9f9","#f99","#f6f"],a=[],u=0,l="",f=[];this.setRegex=function(e){e=e.replace(/^[^\w]+|[^\w]+$/g,"").replace(/[^\w'-]+/g,"|"),l=new RegExp("("+e+")","i")},this.getRegex=function(){return l.toString().replace(/^\/\\b\(|\)\\b\/i$/g,"").replace(/\|/g," ")},this.hiliteWords=function(t){if(null!=t&&t&&l&&!i.test(t.nodeName)){if(t.hasChildNodes())for(var n=0;n<t.childNodes.length;n++)this.hiliteWords(t.childNodes[n]);var r,s;if(3==t.nodeType)if((r=t.nodeValue)&&(s=l.exec(r))){for(var p=t;null!=p&&"SECTION"!=p.nodeName;)p=p.parentNode;var d=e.getIndices(p),g=f.length,h=!1;for(n=0;n<g;n++)f[n].h===d.h&&f[n].v===d.v&&(h=!0);h||f.push(d),a[s[0].toLowerCase()]||(a[s[0].toLowerCase()]=c[u++%c.length]);var y=document.createElement(o);y.appendChild(document.createTextNode(s[0])),y.style.backgroundColor=a[s[0].toLowerCase()],y.style.fontStyle="inherit",y.style.color="#000";var v=t.splitText(s.index);v.nodeValue=v.nodeValue.substring(s[0].length),t.parentNode.insertBefore(y,v)}}},this.remove=function(){for(var e,t=document.getElementsByTagName(o);t.length&&(e=t[0]);)e.parentNode.replaceChild(e.firstChild,e)},this.apply=function(e){if(null!=e&&e)return this.remove(),this.setRegex(e),this.hiliteWords(r),f}}return{id:"search",init:function(n){(e=n).registerKeyboardShortcut("CTRL + Shift + F","Search"),document.addEventListener("keydown",(function(e){"F"==e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),t||a(),"inline"!==t.style.display?u():l())}),!1)},open:u}}}));
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/zoom/plugin.js
JavaScript
/*! * reveal.js Zoom plugin */ const Plugin = { id: 'zoom', init: function( reveal ) { reveal.getRevealElement().addEventListener( 'mousedown', function( event ) { var defaultModifier = /Linux/.test( window.navigator.platform ) ? 'ctrl' : 'alt'; var modifier = ( reveal.getConfig().zoomKey ? reveal.getConfig().zoomKey : defaultModifier ) + 'Key'; var zoomLevel = ( reveal.getConfig().zoomLevel ? reveal.getConfig().zoomLevel : 2 ); if( event[ modifier ] && !reveal.isOverview() ) { event.preventDefault(); zoom.to({ x: event.clientX, y: event.clientY, scale: zoomLevel, pan: false }); } } ); }, destroy: () => { zoom.reset(); } }; export default () => Plugin; /*! * zoom.js 0.3 (modified for use with reveal.js) * http://lab.hakim.se/zoom-js * MIT licensed * * Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se */ var zoom = (function(){ // The current zoom level (scale) var level = 1; // The current mouse position, used for panning var mouseX = 0, mouseY = 0; // Timeout before pan is activated var panEngageTimeout = -1, panUpdateInterval = -1; // Check for transform support so that we can fallback otherwise var supportsTransforms = 'transform' in document.body.style; if( supportsTransforms ) { // The easing that will be applied when we zoom in/out document.body.style.transition = 'transform 0.8s ease'; } // Zoom out if the user hits escape document.addEventListener( 'keyup', function( event ) { if( level !== 1 && event.keyCode === 27 ) { zoom.out(); } } ); // Monitor mouse movement for panning document.addEventListener( 'mousemove', function( event ) { if( level !== 1 ) { mouseX = event.clientX; mouseY = event.clientY; } } ); /** * Applies the CSS required to zoom in, prefers the use of CSS3 * transforms but falls back on zoom for IE. * * @param {Object} rect * @param {Number} scale */ function magnify( rect, scale ) { var scrollOffset = getScrollOffset(); // Ensure a width/height is set rect.width = rect.width || 1; rect.height = rect.height || 1; // Center the rect within the zoomed viewport rect.x -= ( window.innerWidth - ( rect.width * scale ) ) / 2; rect.y -= ( window.innerHeight - ( rect.height * scale ) ) / 2; if( supportsTransforms ) { // Reset if( scale === 1 ) { document.body.style.transform = ''; } // Scale else { var origin = scrollOffset.x +'px '+ scrollOffset.y +'px', transform = 'translate('+ -rect.x +'px,'+ -rect.y +'px) scale('+ scale +')'; document.body.style.transformOrigin = origin; document.body.style.transform = transform; } } else { // Reset if( scale === 1 ) { document.body.style.position = ''; document.body.style.left = ''; document.body.style.top = ''; document.body.style.width = ''; document.body.style.height = ''; document.body.style.zoom = ''; } // Scale else { document.body.style.position = 'relative'; document.body.style.left = ( - ( scrollOffset.x + rect.x ) / scale ) + 'px'; document.body.style.top = ( - ( scrollOffset.y + rect.y ) / scale ) + 'px'; document.body.style.width = ( scale * 100 ) + '%'; document.body.style.height = ( scale * 100 ) + '%'; document.body.style.zoom = scale; } } level = scale; if( document.documentElement.classList ) { if( level !== 1 ) { document.documentElement.classList.add( 'zoomed' ); } else { document.documentElement.classList.remove( 'zoomed' ); } } } /** * Pan the document when the mosue cursor approaches the edges * of the window. */ function pan() { var range = 0.12, rangeX = window.innerWidth * range, rangeY = window.innerHeight * range, scrollOffset = getScrollOffset(); // Up if( mouseY < rangeY ) { window.scroll( scrollOffset.x, scrollOffset.y - ( 1 - ( mouseY / rangeY ) ) * ( 14 / level ) ); } // Down else if( mouseY > window.innerHeight - rangeY ) { window.scroll( scrollOffset.x, scrollOffset.y + ( 1 - ( window.innerHeight - mouseY ) / rangeY ) * ( 14 / level ) ); } // Left if( mouseX < rangeX ) { window.scroll( scrollOffset.x - ( 1 - ( mouseX / rangeX ) ) * ( 14 / level ), scrollOffset.y ); } // Right else if( mouseX > window.innerWidth - rangeX ) { window.scroll( scrollOffset.x + ( 1 - ( window.innerWidth - mouseX ) / rangeX ) * ( 14 / level ), scrollOffset.y ); } } function getScrollOffset() { return { x: window.scrollX !== undefined ? window.scrollX : window.pageXOffset, y: window.scrollY !== undefined ? window.scrollY : window.pageYOffset } } return { /** * Zooms in on either a rectangle or HTML element. * * @param {Object} options * - element: HTML element to zoom in on * OR * - x/y: coordinates in non-transformed space to zoom in on * - width/height: the portion of the screen to zoom in on * - scale: can be used instead of width/height to explicitly set scale */ to: function( options ) { // Due to an implementation limitation we can't zoom in // to another element without zooming out first if( level !== 1 ) { zoom.out(); } else { options.x = options.x || 0; options.y = options.y || 0; // If an element is set, that takes precedence if( !!options.element ) { // Space around the zoomed in element to leave on screen var padding = 20; var bounds = options.element.getBoundingClientRect(); options.x = bounds.left - padding; options.y = bounds.top - padding; options.width = bounds.width + ( padding * 2 ); options.height = bounds.height + ( padding * 2 ); } // If width/height values are set, calculate scale from those values if( options.width !== undefined && options.height !== undefined ) { options.scale = Math.max( Math.min( window.innerWidth / options.width, window.innerHeight / options.height ), 1 ); } if( options.scale > 1 ) { options.x *= options.scale; options.y *= options.scale; magnify( options, options.scale ); if( options.pan !== false ) { // Wait with engaging panning as it may conflict with the // zoom transition panEngageTimeout = setTimeout( function() { panUpdateInterval = setInterval( pan, 1000 / 60 ); }, 800 ); } } } }, /** * Resets the document zoom state to its default. */ out: function() { clearTimeout( panEngageTimeout ); clearInterval( panUpdateInterval ); magnify( { x: 0, y: 0 }, 1 ); level = 1; }, // Alias magnify: function( options ) { this.to( options ) }, reset: function() { this.out() }, zoomLevel: function() { return level; } } })();
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/zoom/zoom.esm.js
JavaScript
/*! * reveal.js Zoom plugin */ var e={id:"zoom",init:function(e){e.getRevealElement().addEventListener("mousedown",(function(n){var o=/Linux/.test(window.navigator.platform)?"ctrl":"alt",i=(e.getConfig().zoomKey?e.getConfig().zoomKey:o)+"Key",d=e.getConfig().zoomLevel?e.getConfig().zoomLevel:2;n[i]&&!e.isOverview()&&(n.preventDefault(),t.to({x:n.clientX,y:n.clientY,scale:d,pan:!1}))}))},destroy:function(){t.reset()}},t=function(){var e=1,n=0,o=0,i=-1,d=-1,l="transform"in document.body.style;function s(t,n){var o=r();if(t.width=t.width||1,t.height=t.height||1,t.x-=(window.innerWidth-t.width*n)/2,t.y-=(window.innerHeight-t.height*n)/2,l)if(1===n)document.body.style.transform="";else{var i=o.x+"px "+o.y+"px",d="translate("+-t.x+"px,"+-t.y+"px) scale("+n+")";document.body.style.transformOrigin=i,document.body.style.transform=d}else 1===n?(document.body.style.position="",document.body.style.left="",document.body.style.top="",document.body.style.width="",document.body.style.height="",document.body.style.zoom=""):(document.body.style.position="relative",document.body.style.left=-(o.x+t.x)/n+"px",document.body.style.top=-(o.y+t.y)/n+"px",document.body.style.width=100*n+"%",document.body.style.height=100*n+"%",document.body.style.zoom=n);e=n,document.documentElement.classList&&(1!==e?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function c(){var t=.12*window.innerWidth,i=.12*window.innerHeight,d=r();o<i?window.scroll(d.x,d.y-14/e*(1-o/i)):o>window.innerHeight-i&&window.scroll(d.x,d.y+(1-(window.innerHeight-o)/i)*(14/e)),n<t?window.scroll(d.x-14/e*(1-n/t),d.y):n>window.innerWidth-t&&window.scroll(d.x+(1-(window.innerWidth-n)/t)*(14/e),d.y)}function r(){return{x:void 0!==window.scrollX?window.scrollX:window.pageXOffset,y:void 0!==window.scrollY?window.scrollY:window.pageYOffset}}return l&&(document.body.style.transition="transform 0.8s ease"),document.addEventListener("keyup",(function(n){1!==e&&27===n.keyCode&&t.out()})),document.addEventListener("mousemove",(function(t){1!==e&&(n=t.clientX,o=t.clientY)})),{to:function(n){if(1!==e)t.out();else{if(n.x=n.x||0,n.y=n.y||0,n.element){var o=n.element.getBoundingClientRect();n.x=o.left-20,n.y=o.top-20,n.width=o.width+40,n.height=o.height+40}void 0!==n.width&&void 0!==n.height&&(n.scale=Math.max(Math.min(window.innerWidth/n.width,window.innerHeight/n.height),1)),n.scale>1&&(n.x*=n.scale,n.y*=n.scale,s(n,n.scale),!1!==n.pan&&(i=setTimeout((function(){d=setInterval(c,1e3/60)}),800)))}},out:function(){clearTimeout(i),clearInterval(d),s({x:0,y:0},1),e=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return e}}}();export default function(){return e}
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
index_files/libs/revealjs/plugin/zoom/zoom.js
JavaScript
!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).RevealZoom=t()}(this,(function(){"use strict"; /*! * reveal.js Zoom plugin */var e={id:"zoom",init:function(e){e.getRevealElement().addEventListener("mousedown",(function(o){var n=/Linux/.test(window.navigator.platform)?"ctrl":"alt",i=(e.getConfig().zoomKey?e.getConfig().zoomKey:n)+"Key",d=e.getConfig().zoomLevel?e.getConfig().zoomLevel:2;o[i]&&!e.isOverview()&&(o.preventDefault(),t.to({x:o.clientX,y:o.clientY,scale:d,pan:!1}))}))},destroy:function(){t.reset()}},t=function(){var e=1,o=0,n=0,i=-1,d=-1,l="transform"in document.body.style;function s(t,o){var n=r();if(t.width=t.width||1,t.height=t.height||1,t.x-=(window.innerWidth-t.width*o)/2,t.y-=(window.innerHeight-t.height*o)/2,l)if(1===o)document.body.style.transform="";else{var i=n.x+"px "+n.y+"px",d="translate("+-t.x+"px,"+-t.y+"px) scale("+o+")";document.body.style.transformOrigin=i,document.body.style.transform=d}else 1===o?(document.body.style.position="",document.body.style.left="",document.body.style.top="",document.body.style.width="",document.body.style.height="",document.body.style.zoom=""):(document.body.style.position="relative",document.body.style.left=-(n.x+t.x)/o+"px",document.body.style.top=-(n.y+t.y)/o+"px",document.body.style.width=100*o+"%",document.body.style.height=100*o+"%",document.body.style.zoom=o);e=o,document.documentElement.classList&&(1!==e?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function c(){var t=.12*window.innerWidth,i=.12*window.innerHeight,d=r();n<i?window.scroll(d.x,d.y-14/e*(1-n/i)):n>window.innerHeight-i&&window.scroll(d.x,d.y+(1-(window.innerHeight-n)/i)*(14/e)),o<t?window.scroll(d.x-14/e*(1-o/t),d.y):o>window.innerWidth-t&&window.scroll(d.x+(1-(window.innerWidth-o)/t)*(14/e),d.y)}function r(){return{x:void 0!==window.scrollX?window.scrollX:window.pageXOffset,y:void 0!==window.scrollY?window.scrollY:window.pageYOffset}}return l&&(document.body.style.transition="transform 0.8s ease"),document.addEventListener("keyup",(function(o){1!==e&&27===o.keyCode&&t.out()})),document.addEventListener("mousemove",(function(t){1!==e&&(o=t.clientX,n=t.clientY)})),{to:function(o){if(1!==e)t.out();else{if(o.x=o.x||0,o.y=o.y||0,o.element){var n=o.element.getBoundingClientRect();o.x=n.left-20,o.y=n.top-20,o.width=n.width+40,o.height=n.height+40}void 0!==o.width&&void 0!==o.height&&(o.scale=Math.max(Math.min(window.innerWidth/o.width,window.innerHeight/o.height),1)),o.scale>1&&(o.x*=o.scale,o.y*=o.scale,s(o,o.scale),!1!==o.pan&&(i=setTimeout((function(){d=setInterval(c,1e3/60)}),800)))}},out:function(){clearTimeout(i),clearInterval(d),s({x:0,y:0},1),e=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return e}}}();return function(){return e}}));
yabellini/CSVConfv7
0
Talk at CSV Conf V7
JavaScript
yabellini
Yanina Bellini Saibene
ropensci
styles.css
CSS
/* css styles */
yabellini/gestiondedatos
0
Materiales del curso de gestión de datos de la licenciatura en Ciencia de Datos de la UNAB.
CSS
yabellini
Yanina Bellini Saibene
ropensci
styles.css
CSS
/* css styles */
yabellini/t3es
1
Material del curso Enseñar Tecnologia en Comunidad en Español
CSS
yabellini
Yanina Bellini Saibene
ropensci
src/position.js
JavaScript
/** * positions a DOM element next to a certain position * @param {HTMLElement} target DOM element node * @param {Object} ref node reference for positioning or just {x,y} coordinates * @param {String} placement [above/below/center & left/right/center] or mix of two (only works if "ref" is an HTML Element) * @param {Array} prevPlacement used when calculated new position overflows * @param {Array} offset distance (in pixels) from original placement position ("10px 20px" or just "10px" for both horizontal & vertical) */ const position = props => { var {target, ref, offset, placement, prevPlacement, useRaf = true, track} = props, pos = {x:ref.x, y:ref.y, h:0, w:0}, refRect = (ref && ref.x) ? {...ref} : {}, refWindow, docElm = document.documentElement, vpSize = { w: docElm.clientWidth, h: docElm.clientHeight }, targetSize = { w: target.clientWidth, h: target.clientHeight }; raf = useRaf ? raf : cb => cb(); prevPlacement = prevPlacement || []; placement = (placement||' ').split(' ').map((a,i) => a ? a : ['center', 'below'][i]) // [horizontal, vertical] offset = offset ? [offset[0] || 0, offset[1] || offset[0] || 0] : [0,0]; // [horizontal, vertical] // if "ref" is a DOM element, get [x,y] coordinates and adjust according to desired placement if( ref.parentNode ){ refWindow = ref.ownerDocument.defaultView; refRect = ref.getBoundingClientRect() // [x,y] are top-left coordinates pos.x = refRect.x pos.y = refRect.y pos.w = refRect.width pos.h = refRect.height // if ref element is within an iframe, get it's position relative to the viewport and not its local window if( refWindow != refWindow.parent ){ for (let frameElement of refWindow.parent.document.getElementsByTagName('iframe')) { if (frameElement.contentWindow === refWindow) { let iframeRect = frameElement.getBoundingClientRect(); pos.x += iframeRect.x pos.y += iframeRect.y } } } } // horizontal if( placement[0] == 'left' ) pos.x -= targetSize.w + offset[0]; else if( placement[0] == 'right' ) pos.x += pos.w + offset[0]; else pos.x -= targetSize.w/2 - pos.w/2; // vertical if( placement[1] == 'above' ) pos.y -= targetSize.h + offset[1]; else if( placement[1] == 'below' ) pos.y += pos.h + offset[1]; else pos.y -= targetSize.h/2 - pos.h/2; const overflow = { top : pos.y < 0, bottom: pos.y + targetSize.h > vpSize.h, left : pos.x < 0, right : pos.x + targetSize.w > vpSize.w } const reposition = p => position({...props, placement:p.join(' '), prevPlacement:placement}) // horizontal fix for overflows if( overflow.left && prevPlacement[0] != 'right' ) return reposition(['right', placement[1]]) if( overflow.right && prevPlacement[0] != 'left' ) return reposition(['left', placement[1]]) // vertical fix for overflows if( overflow.bottom && prevPlacement[1] != 'above' ) return reposition([placement[0], 'above']) if( overflow.top && prevPlacement[1] != 'below' ) return reposition([placement[0], 'below']) // update target's position raf(() => { target.setAttribute('positioned', true); target.setAttribute('data-placement', placement.join(' ')); target.setAttribute('data-pos-overflow', Object.entries(overflow).reduce((acc, [k,v]) => v ? `${acc} ${k}` : acc , '').trim()); [ ['pos-left', overflow.right ? vpSize.w - targetSize.w : pos.x], ['pos-top', pos.y], // pos.y > offset[1] ? pos.y : 0 ['pos-target-width', targetSize.w], ['pos-target-height', targetSize.h], ['pos-ref-width', refRect.width || 0], ['pos-ref-height', refRect.height || 0], ['pos-ref-left', refRect.x], ['pos-ref-top', refRect.y], ['window-scroll-y', window.scrollY], ['window-scroll-x', window.scrollX] ].forEach(([k,v]) => target.style.setProperty('--'+k, Math.round(v))) }) // auto-reposition on any ancestor scroll if( track?.scroll && !target.position__trackedScroll ){ // mark the node as tracked target.position__trackedScroll = true; // if any ancestor of refElement was scrolled, re-position the target window.addEventListener('scroll', onScroll, true) function onScroll(e){ // make sure the scrolled element contains the ref element if( e.target.contains(refElement) ) position(props) } } return {pos, placement} } let raf = requestAnimationFrame || (cb => setTimeout(cb, 1000/60)) export default position
yairEO/position
7
Position a DOM element at a certain X,Y or next to another element
JavaScript
yairEO
Yair Even Or
react-bouncer.js
JavaScript
/** * @yaireo/react-bouncer - Wrap components with a debounce, throttle, or any other delayed-rendering method, to stop them from re-rendering often when their props change * * @version v1.0.3 * @homepage https://github.com/yairEO/react-bouncer * @author Yair Even-Or <vsync.design@gmail.com> */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = require("react"); var _lodash = _interopRequireDefault(require("lodash.debounce")); var _jsxRuntime = require("react/jsx-runtime"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const bouncer = function (Comp) { let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300; let method = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _lodash.default; return props => { // https://reactjs.org/docs/hooks-faq.html#is-there-something-like-forceupdate const [dep, forceUpdate] = (0, _react.useReducer)(x => ++x, 0); const updater = (0, _react.useCallback)(method(forceUpdate, duration), []); // call the delayed function when props change (or was re-rendered without any props) (0, _react.useEffect)(updater, [props]); return (0, _react.useMemo)(() => /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, { ...props }), [dep]); }; }; var _default = bouncer; exports.default = _default; //# sourceMappingURL=react-bouncer.js.map
yairEO/react-bouncer
10
Delay rendering of a React component with Debounce, Throttle, or any custom method
yairEO
Yair Even Or
src/react-bouncer.js
JavaScript
import {useEffect, useCallback, useMemo, useReducer} from 'react' import debounce from 'lodash.debounce' const bouncer = (Comp, duration = 300, method = debounce) => props => { // https://reactjs.org/docs/hooks-faq.html#is-there-something-like-forceupdate const [dep, forceUpdate] = useReducer(x => ++x, 0) const updater = useCallback(method(forceUpdate, duration), []) // call the delayed function when props change (or was re-rendered without any props) useEffect(updater, [props]) return useMemo(() => <Comp {...props}/>, [dep]) } export default bouncer
yairEO/react-bouncer
10
Delay rendering of a React component with Debounce, Throttle, or any custom method
yairEO
Yair Even Or
demo/public/index.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="theme-color" content="#000000"> <!-- manifest.json provides metadata used when your web app is added to the homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/ --> <link rel="manifest" href="%PUBLIC_URL%/manifest.json"> <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> <!-- Notice the use of %PUBLIC_URL% in the tags above. It will be replaced with the URL of the `public` folder during the build. Only files inside the `public` folder can be referenced from the HTML. Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> <title>React Ref Watcher - Demo</title> </head> <body> <noscript> You need to enable JavaScript to run this app. </noscript> <!-- <p> This POC intends to solve the problem where refs are used on the "main" component, to store different state values, because if <code>"useState"</code> were used, when changed, the main component (<code>List</code>) will re-render, along with all its sub-components 😢 </p> <p> A <code>context</code> is used to pass all sub-components those refs, so each sub-component can chose to register a listener to a specific ref or, if the ref's <code>"current"</code> property is an Object, listen to changes in that Object. </p> <p> When toggling a list item (checkbox), only it will render, and not any of its siblings. </p> <p> <em>(Open the console below and watch which component renders)</em> </p> --> <div id="root"></div> <!-- This HTML file is a template. If you open it directly in the browser, you will see an empty page. You can add webfonts, meta tags, or analytics to this file. The build step will place the bundled scripts into the <body> tag. To begin the development, run `npm start` or `yarn start`. To create a production bundle, use `npm run build` or `yarn build`. --> </body> </html>
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
demo/src/Checkbox.jsx
JavaScript (JSX)
const Checkbox = ({label, checked = false, onChange}) => { return ( <label> <input type='checkbox' checked={checked} onChange={onChange}/> {label} </label> ) } export default Checkbox
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
demo/src/List.context.js
JavaScript
import {createContext} from 'react' export default createContext()
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
demo/src/List.js
JavaScript
import {useRef} from 'react' import {useWatchableRef, propWatcher} from '@yaireo/react-ref-watcher' import ListItem from './ListItem' import SelectAll from './SelectAll' import ListContext from './List.context' import "./styles.scss" // Mock data const DATA = [...Array(3)].map((_, i) => ({name: `item-${i+1}`, label: `Item ${i+1}`})) // The idea is that the main component, this one, defines the state at its // level and shares using "context" with whoever wants to listen to state changes. // Since "useState" cannot be used (it triggers a re-render) then refs are used. const List = () => { console.log('"List" component rendered (only once)') // A Boolean ref, indicating all list items are selected. // "useWatchableRef" makes the "current" property watchable // when it changes (by any child component registering to it) const allSelectedRef = useWatchableRef(false) // Initialize the "current" property as a watchable-object const selectedRef = useRef(propWatcher({})) const contextValue = { data: DATA, selectedRef, allSelectedRef } return ( <ListContext.Provider value={contextValue}> <div className='list-wrapper'> <header> <SelectAll label='Select All'/> </header> {DATA.map(({ name, label }) => <ListItem key={name} {...{name, label}}/> )} </div> </ListContext.Provider> ) } export default List
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
demo/src/ListItem.jsx
JavaScript (JSX)
import {useContext} from 'react' import {useWatchableListener} from '@yaireo/react-ref-watcher' import ListContext from './List.context' import Checkbox from './Checkbox' const ListItem = ({name, label}) => { // get the smart ref from the context (or props, which ever is better in a certain situation) const {selectedRef} = useContext(ListContext) // listen to changes for that ref in a specific property ("name") useWatchableListener(selectedRef.current, name) const toggle = e => { // "selectedRef.current" only contains keys for SELECTED items if( e.target.checked ) { selectedRef.current[name] = true } else { delete selectedRef.current[name] // remove the property } } console.log(name, "component rendered") return ( <div className='list-item'> <Checkbox label={label} checked={selectedRef.current[name]} onChange={toggle}/> </div> ) } export default ListItem
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
demo/src/SelectAll.jsx
JavaScript (JSX)
import {useContext} from 'react' import {useWatchableListener, useWatchableEffect} from '@yaireo/react-ref-watcher' import ListContext from './List.context' import Checkbox from './Checkbox' const SelectAll = ({name, label}) => { console.log('"SelectAll" component rendered') // get the smart ref from the context (or props, which ever is better in a certain situation) const {data, selectedRef, allSelectedRef} = useContext(ListContext) // listen to changes in "allSelectedRef" (boolean) and re-render const unlisten = useWatchableListener(allSelectedRef) // unlisten() // listen to changes in "selectedRef" to track if all have been selected or not. // does not re-render because the 3rd parameter is a custom function. useWatchableEffect(() => { const selectedCount = Object.keys(selectedRef.current).length allSelectedRef.current = selectedCount === data.length }, [selectedRef.current]) const toggle = e => { allSelectedRef.current = e.target.checked // (de)select all items data.forEach(({name}) => { if( e.target.checked ) selectedRef.current[name] = true else delete selectedRef.current[name] }) } return ( <div className='list-item'> <Checkbox label={label} checked={allSelectedRef.current} onChange={toggle}/> </div> ) } export default SelectAll
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
demo/src/index.js
JavaScript
import { createRoot } from "react-dom/client"; import List from "./List"; const rootElement = document.getElementById("root"); const root = createRoot(rootElement); root.render(<List />)
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
demo/src/styles.scss
SCSS
body { font: 16px Arial; padding: 1em; max-width: 600px; margin: auto; } #root { font-size: 20px; border: 2px dashed salmon; margin: 2em 0; padding: 1em; border-radius: 10px; } .list-wrapper { > header { margin-bottom: 1em; } } label { display: inline-flex; gap: 5px; cursor: pointer; user-select: none; input { transform: scale(1.3); } &:hover { color: royalblue; } }
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
src/index.js
JavaScript
export {default as useWatchableRef} from './useWatchableRef' export {default as useWatchableListener} from './useWatchableListener' export {default as useWatchableEffect} from './useWatchableEffect' export {default as propWatcher} from './propWatcher'
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
src/propWatcher.js
JavaScript
/** * Watches for changes of an object (property set/deleted) * @param {Object} obj the object to listen to for changes */ const propWatcher = obj => { // add a special property for the change listeners callbacks to register on !obj.__WATCHERS && Object.defineProperty(obj, '__WATCHERS', { enumerable : false, writeable: true, value : {} }); // update watchers (when prop gets set/deleted) function runWatchers(target, prop, value) { if( prop !== '__WATCHERS' ) { Object.values(target?.__WATCHERS || []).forEach(cb => cb(prop, value)) } } return new Proxy(obj, { // watch when a property is set set(target, prop, value) { // do nothing if value hasn't changed, to avoid a possible re-render when the same value is set again if( target[prop] === value) return true // set the value target[prop] = value; runWatchers(target, prop, value) return true }, // watch when a prop is deleted deleteProperty(target, prop) { if (prop in target) { delete target[prop] runWatchers(target, prop) } return true }, }) } export const setWatcher = (obj, id, callback) => { if( !obj.__WATCHERS ) { console.warn('Object is not watchable. Did you pass the correct Object?') return } if( !callback || typeof callback != 'function' ) { console.warn('Invalid callback') return } // register a listener for that namespace obj.__WATCHERS[id] = callback } export const removeWatcher = (obj, id) => { delete obj.__WATCHERS[id] } export default propWatcher
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
src/useWatchableEffect.js
JavaScript
import {useEffect} from 'react' import {useId} from './utils' import {setWatcher, removeWatcher} from './propWatcher' /** * Similar to "useWatchableListener" but just listens without automatically re-rendering (no 'useState') * @param {*} callback fires when a ref change detetced * @param {*} dependencies array of watchable refs */ const useWatchableEffect = (callback, dependencies) => { const id = useId() useEffect(() => { // bind the callback to all dependencies dependencies.forEach(ref => { setWatcher(ref, id.current, callback) }) // remove callback if component unmounted return () => { dependencies.forEach(ref => removeWatcher(ref, id.current)) } }, dependencies) } export default useWatchableEffect
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
src/useWatchableListener.js
JavaScript
import {useState, useCallback, useEffect} from 'react' import {useId} from './utils' import {setWatcher, removeWatcher} from './propWatcher' /** * Listens to refs changes. * By default will trigger a re-render in the component which is using this hook if * a change in the ref itself or specific property is detected. * @param {Object} ref an object to listen to * @param {String} propName (optional) specific property name to watch within the `ref` * @param {function} watcher (optional) the logic which decides if the component should be re-rendered */ const useWatchableListener = ( ref, propName, watcher = (propName, prop, value, setState) => prop === propName // if "propName" is not defined, listen to all changes at any prop ? setState(value) : !propName && setState(Math.random()) // if no "propName" supplied, assume any change to any prop should be watched, hence the value is not important and to trigger a re-render a new state must be uniquly generated ) => { const [state, setState] = useState() const id = useId() const unlisten = useCallback(() => removeWatcher(ref, id), [ref, id]) // register a listener for that namespace setWatcher(ref, id, (prop, value) => watcher(propName, prop, value, setState)) // remove callback if component unmounted useEffect(() => unlisten, []) return unlisten } export default useWatchableListener
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
src/useWatchableRef.js
JavaScript
import {useMemo} from 'react' import propWatcher from './propWatcher' /** * Create a ref-like object that listens to any change in the "current" property * and fires all registered callbacks when a change happens to the "current" property. */ const useWatchableRef = (initialValue) => useMemo(() => propWatcher({ current: initialValue }), []) export default useWatchableRef
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
src/utils.js
JavaScript
import {useRef} from 'react' // https://stackoverflow.com/a/7061193/104380 export const UUIDv4 = function b(a){return a?(a^Math.random()*16>>a/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,b)}; // Native is preferable but only for React v18+, so for backward-compatibility, use this: export const useId = () => useRef(UUIDv4()).current;
yairEO/react-ref-watcher
6
Watchable refs changes with conditional re-renders
JavaScript
yairEO
Yair Even Or
relative-time.d.ts
TypeScript
// Definitions by: Ben Grynhaus <https://github.com/bengry> type DateInput = Date | string | number; interface Settings { /** * @default browser locale * @example 'es' */ locale?: string; /** * @default { numeric: 'auto' } */ options?: Intl.RelativeTimeFormatOptions; } declare class RelativeTime { /** * Creates a new RelativeTime instance with specified settings * @param settings Configuration object for locale and formatting options */ constructor(settings?: Settings); /** * Returns a relative time string comparing two dates * @param d1 The date to format (target date) * @param d2 The reference date (defaults to current time) * @returns Formatted relative time string (e.g., "2 days ago", "in 3 hours") */ from(d1: DateInput, d2?: DateInput): string; /** * Static method for convenience - creates instance per call * @param d1 The date to format (target date) * @param d2 The reference date (defaults to current time) * @param locale Optional locale string (e.g., 'es', 'fr') * @returns Formatted relative time string (e.g., "2 days ago", "in 3 hours") */ static from(d1: DateInput, d2?: DateInput, locale?: string): string; } export = RelativeTime; export as namespace RelativeTime;
yairEO/relative-time
42
javascript function to transform timestamp or date to local relative-time
JavaScript
yairEO
Yair Even Or
relative-time.js
JavaScript
;(function(root, factory){ var define = define || {}; if( typeof define === 'function' && define.amd ) define([], factory); else if( typeof exports === 'object' && typeof module === 'object' ) module.exports = factory(); else if(typeof exports === 'object') exports["RelativeTime"] = factory() else root.RelativeTime = factory() }(this, function(){ // in miliseconds const UNITS = { year : 24 * 60 * 60 * 1000 * 365, month : 24 * 60 * 60 * 1000 * 365/12, day : 24 * 60 * 60 * 1000, hour : 60 * 60 * 1000, minute: 60 * 1000, second: 1000 } const DEFAULTS = { locale: 'en', options: { numeric: 'auto' } } function RelativeTime( settings ){ settings = settings || {} settings = { locale: settings.locale || DEFAULTS.locale, options: {...DEFAULTS.options, ...settings.options} } this.rtf = new Intl.RelativeTimeFormat(settings.locale, settings.options) } RelativeTime.prototype = { // returns d1 relative to d2 time string in locale format from(d1, d2){ const elapsed = d1 - (d2 || new Date()) // "Math.abs" accounts for both "past" & "future" scenarios for (let u in UNITS) if (Math.abs(elapsed) > UNITS[u] || u == 'second') return this.rtf.format(Math.round(elapsed/UNITS[u]), u) } } // Static method for convenience - creates instance per call RelativeTime.from = function(d1, d2, locale) { const instance = new RelativeTime(locale ? { locale } : {}) return instance.from(d1, d2) } return RelativeTime }));
yairEO/relative-time
42
javascript function to transform timestamp or date to local relative-time
JavaScript
yairEO
Yair Even Or
relative-time.min.js
JavaScript
/** * @yaireo/relative-time - javascript function to transform timestamp or date to local relative-time * * @version v1.1.0 * @author Yair Even-Or <vsync.design@gmail.com> * @homepage https://github.com/yairEO/relative-time */ !function(e,o){var t=t||{};"function"==typeof t&&t.amd?t([],o):"object"==typeof exports&&"object"==typeof module?module.exports=o():"object"==typeof exports?exports.RelativeTime=o():e.RelativeTime=o()}(this,function(){const e={year:31536e6,month:2628e6,day:864e5,hour:36e5,minute:6e4,second:1e3},o="en",t={numeric:"auto"};function n(e){e={locale:(e=e||{}).locale||o,options:{...t,...e.options}},this.rtf=new Intl.RelativeTimeFormat(e.locale,e.options)}return n.prototype={from(o,t){const n=o-(t||new Date);for(let o in e)if(Math.abs(n)>e[o]||"second"==o)return this.rtf.format(Math.round(n/e[o]),o)}},n.from=function(e,o,t){return new n(t?{locale:t}:{}).from(e,o)},n});
yairEO/relative-time
42
javascript function to transform timestamp or date to local relative-time
JavaScript
yairEO
Yair Even Or
relative-time.test.js
JavaScript
const { test, describe } = require('node:test'); const assert = require('node:assert'); const RelativeTime = require('./relative-time.js'); describe('RelativeTime Library Tests', () => { describe('Constructor Tests', () => { test('should create instance with default settings', () => { const rt = new RelativeTime(); assert.ok(rt instanceof RelativeTime); assert.ok(rt.rtf instanceof Intl.RelativeTimeFormat); }); test('should create instance with custom locale', () => { const rt = new RelativeTime({ locale: 'es' }); assert.ok(rt instanceof RelativeTime); assert.ok(rt.rtf instanceof Intl.RelativeTimeFormat); // Test with a known date to verify Spanish formatting const pastDate = new Date(Date.now() - 2 * 24 * 60 * 60 * 1000); // 2 days ago const result = rt.from(pastDate); assert.ok(typeof result === 'string'); }); test('should create instance with custom options', () => { const rt = new RelativeTime({ options: { numeric: 'always' } }); assert.ok(rt instanceof RelativeTime); assert.ok(rt.rtf instanceof Intl.RelativeTimeFormat); }); test('should create instance with both locale and options', () => { const rt = new RelativeTime({ locale: 'fr', options: { numeric: 'auto' } }); assert.ok(rt instanceof RelativeTime); assert.ok(rt.rtf instanceof Intl.RelativeTimeFormat); }); test('should handle invalid locale gracefully', () => { // Most implementations will fall back to default locale for invalid locales const rt = new RelativeTime({ locale: 'invalid-locale' }); assert.ok(rt instanceof RelativeTime); assert.ok(rt.rtf instanceof Intl.RelativeTimeFormat); }); }); describe('Instance Method Tests - relativeTime.from()', () => { describe('Past Dates', () => { test('should format seconds ago', () => { const rt = new RelativeTime(); const fiveSecondsAgo = new Date(Date.now() - 5 * 1000); const result = rt.from(fiveSecondsAgo); assert.ok(result.includes('second')); assert.ok(result.includes('ago') || result.includes('5')); }); test('should format minutes ago', () => { const rt = new RelativeTime(); const threeMinutesAgo = new Date(Date.now() - 3 * 60 * 1000); const result = rt.from(threeMinutesAgo); assert.ok(result.includes('minute')); assert.ok(result.includes('ago') || result.includes('3')); }); test('should format hours ago', () => { const rt = new RelativeTime(); const twoHoursAgo = new Date(Date.now() - 2 * 60 * 60 * 1000); const result = rt.from(twoHoursAgo); assert.ok(result.includes('hour')); assert.ok(result.includes('ago') || result.includes('2')); }); test('should format days ago', () => { const rt = new RelativeTime(); const fourDaysAgo = new Date(Date.now() - 4 * 24 * 60 * 60 * 1000); const result = rt.from(fourDaysAgo); assert.ok(result.includes('day')); assert.ok(result.includes('ago') || result.includes('4')); }); test('should format months ago', () => { const rt = new RelativeTime(); const sixMonthsAgo = new Date(Date.now() - 6 * 30 * 24 * 60 * 60 * 1000); const result = rt.from(sixMonthsAgo); assert.ok(result.includes('month')); assert.ok(result.includes('ago') || result.includes('6')); }); test('should format years ago', () => { const rt = new RelativeTime(); const twoYearsAgo = new Date(Date.now() - 2 * 365 * 24 * 60 * 60 * 1000); const result = rt.from(twoYearsAgo); assert.ok(result.includes('year')); assert.ok(result.includes('ago') || result.includes('2')); }); }); describe('Future Dates', () => { test('should format in seconds', () => { const rt = new RelativeTime(); const tenSecondsFromNow = new Date(Date.now() + 10 * 1000); const result = rt.from(tenSecondsFromNow); assert.ok(result.includes('second')); assert.ok(result.includes('in') || result.includes('10')); }); test('should format in minutes', () => { const rt = new RelativeTime(); const fifteenMinutesFromNow = new Date(Date.now() + 15 * 60 * 1000); const result = rt.from(fifteenMinutesFromNow); assert.ok(result.includes('minute')); assert.ok(result.includes('in') || result.includes('15')); }); test('should format in hours', () => { const rt = new RelativeTime(); const threeHoursFromNow = new Date(Date.now() + 3 * 60 * 60 * 1000); const result = rt.from(threeHoursFromNow); assert.ok(result.includes('hour')); assert.ok(result.includes('in') || result.includes('3')); }); test('should format in days', () => { const rt = new RelativeTime(); const fiveDaysFromNow = new Date(Date.now() + 5 * 24 * 60 * 60 * 1000); const result = rt.from(fiveDaysFromNow); assert.ok(result.includes('day')); assert.ok(result.includes('in') || result.includes('5')); }); test('should format in months', () => { const rt = new RelativeTime(); const eightMonthsFromNow = new Date(Date.now() + 8 * 30 * 24 * 60 * 60 * 1000); const result = rt.from(eightMonthsFromNow); assert.ok(result.includes('month')); assert.ok(result.includes('in') || result.includes('8')); }); test('should format in years', () => { const rt = new RelativeTime(); const threeYearsFromNow = new Date(Date.now() + 3 * 365 * 24 * 60 * 60 * 1000); const result = rt.from(threeYearsFromNow); assert.ok(result.includes('year')); assert.ok(result.includes('in') || result.includes('3')); }); }); describe('Edge Cases', () => { test('should handle same date/time', () => { const rt = new RelativeTime(); const now = new Date(); const result = rt.from(now, now); assert.ok(result.includes('second') || result.includes('now') || result.includes('0')); }); test('should handle very small differences', () => { const rt = new RelativeTime(); const now = new Date(); const slightlyLater = new Date(now.getTime() + 100); // 100ms later const result = rt.from(slightlyLater, now); // Small differences fall back to seconds unit assert.ok(result.includes('second') || result.includes('now') || result.includes('0')); }); test('should handle very large differences', () => { const rt = new RelativeTime(); const now = new Date(); const fiftyYearsAgo = new Date(now.getTime() - 50 * 365 * 24 * 60 * 60 * 1000); const result = rt.from(fiftyYearsAgo, now); assert.ok(result.includes('year')); assert.ok(result.includes('ago') || result.includes('50') || parseInt(result) >= 50); }); test('should work with custom reference date', () => { const rt = new RelativeTime(); const date1 = new Date('2023-01-01'); const date2 = new Date('2023-01-02'); const result = rt.from(date1, date2); assert.ok(typeof result === 'string'); assert.ok(result.includes('day') || result.includes('hour')); }); }); describe('Date Input Types', () => { test('should accept Date objects', () => { const rt = new RelativeTime(); const pastDate = new Date(Date.now() - 2 * 60 * 60 * 1000); // 2 hours ago const result = rt.from(pastDate); assert.ok(typeof result === 'string'); assert.ok(result.includes('hour')); }); test('should accept ISO date strings', () => { const rt = new RelativeTime(); const isoString = new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString(); // 1 day ago const result = rt.from(new Date(isoString)); // Convert ISO string to Date object assert.ok(typeof result === 'string'); assert.ok(result.includes('day') || result.includes('hour')); }); test('should accept timestamps', () => { const rt = new RelativeTime(); const timestamp = Date.now() - 30 * 60 * 1000; // 30 minutes ago const result = rt.from(new Date(timestamp)); // Convert timestamp to Date object assert.ok(typeof result === 'string'); assert.ok(result.includes('minute')); }); }); }); describe('Static Method Tests - RelativeTime.from()', () => { test('should work without locale parameter', () => { const pastDate = new Date(Date.now() - 2 * 60 * 60 * 1000); // 2 hours ago const result = RelativeTime.from(pastDate); assert.ok(typeof result === 'string'); assert.ok(result.includes('hour')); }); test('should work with locale parameter', () => { const pastDate = new Date(Date.now() - 2 * 24 * 60 * 60 * 1000); // 2 days ago const result = RelativeTime.from(pastDate, new Date(), 'es'); assert.ok(typeof result === 'string'); assert.ok(result.length > 0); // Just verify it returns a valid string }); test('should create new instance per call (no caching)', () => { const date1 = new Date(Date.now() - 1000); const date2 = new Date(Date.now() - 2000); const result1 = RelativeTime.from(date1); const result2 = RelativeTime.from(date2); // Both calls should work independently assert.ok(typeof result1 === 'string'); assert.ok(typeof result2 === 'string'); // Verify no shared state by checking different results assert.notStrictEqual(result1, result2); }); test('should handle all date input types', () => { const dateObj = new Date(Date.now() - 60 * 1000); // 1 minute ago const result = RelativeTime.from(dateObj); assert.ok(typeof result === 'string'); assert.ok(result.includes('minute') || result.includes('second')); }); }); });
yairEO/relative-time
42
javascript function to transform timestamp or date to local relative-time
JavaScript
yairEO
Yair Even Or
title-tooltip.css
CSS
#titleTtip{ --radius: 6px; --trans-duration: .2s; max-width: 220px; position: fixed; z-index: max; box-sizing: border-box; pointer-events: none; opacity: 0; transition: 0s; } #titleTtip .titleTtip__text{ padding: 6px 11px; border-radius: var(--radius); color: white; transform: scale(.75); transform-origin: 50% top; background: black; backdrop-filter: blur(3px); } #titleTtip::after { --size: 8px; content: ""; bottom: calc(100% - 1px); /* very odd 1px gap */ /* 1. limit minimum left value to the radius of the tooltip so it starts just when thr radius curves 2. place the arrow exactly where the mouse pointer is 3. limit the right position (maximum left) to fit exactly */ left: Clamp(var(--radius)/2, var(--mouse-pos, 0) * 1px - var(--size)/2, 100% - var(--size)*2 - var(--radius)/2 - 1px); right: 0; border: solid transparent; height: 0; width: 0; position: absolute; pointer-events: none; border-bottom-color: black; border-width: var(--size); } [data-over]{ --x: calc(var(--pos-left) + var(--window-scroll-x)); --y: calc(var(--pos-top) + var(--window-scroll-y)); position: absolute; z-index: 999999; top: 0; left: 0; transform: translate(calc(var(--x) * 1px), calc(var(--y) * 1px)); } /* Only tooltips which are positiond have "style" attribute */ #titleTtip[data-over] > *{ transform: none; transition: var(--trans-duration); } #titleTtip[data-over]{ opacity: 1; transition: opacity var(--trans-duration); }
yairEO/title-tooltip
16
Automatically converts HTML title attributes to nicer better tooltips
JavaScript
yairEO
Yair Even Or
title-tooltip.js
JavaScript
/** * By Yair Even Or * https://github.com/yairEO/title-tooltip */ ;(function(root, factory){ var define = define || {}; if( typeof define === 'function' && define.amd ) define([], factory); else if( typeof exports === 'object' && typeof module === 'object' ) module.exports = factory(); else if(typeof exports === 'object') exports["titleTooltip"] = factory() else root.titleTooltip = factory() }(this, function(){ function titleTooltip( opts ){ opts = Object.assign({ delay: 400, id: 'titleTtip', onShow(){}, onHide(){} }, opts||{}) // do not continue if already exists if( opts.id in window ) return var hoverTimeout, titledElm, mousePos = {}; // bind global event listeners document.addEventListener('mouseover', onOver) document.addEventListener('mouseout', onOut) // create & inject custom tooltip var tipElm = document.createElement('div') tipElm.id = opts.id document.body.append(tipElm) // event handlers function onOver(e){ titledElm = e.target.closest('[title]') document.removeEventListener('mousemove', onMove) if( titledElm && titledElm.title ){ document.addEventListener('mousemove', onMove) hoverTimeout = setTimeout(() => { opts.onShow(titledElm, tipElm) tipElm.setAttribute('data-over', true) setMousePos(e) }, opts.delay) tipElm.innerHTML = "<div class='"+ opts.id + "__text" +"'>" + titledElm.title + "</div>" // save current title and empty the attribute. restore on mouse-out titledElm._entitled = titledElm.title titledElm.title = '' } else onOut() } /** * On mouse out, revert back everything as it was beofre mouse over */ function onOut(e){ clearTimeout(hoverTimeout) document.removeEventListener('mousemove', onMove) tipElm.removeAttribute('style') tipElm.removeAttribute('data-over') if( titledElm && titledElm._entitled ) titledElm.title = titledElm._entitled opts.onHide(titledElm, tipElm) titledElm = null } function onMove(e){ mousePos.x = e.clientX requestAnimationFrame(() => setMousePos(e) ) } function setMousePos(){ var rect = tipElm.getBoundingClientRect() tipElm.style.setProperty('--mouse-pos', mousePos.x - rect.left) } function destroy(){ document.removeEventListener('mouseover', onOver) document.removeEventListener('mouseout', onOut) document.removeEventListener('mousemove', onMove) document.body.removeChild(tipElm) } return { onOver, onOut, tipElm, destroy } } return titleTooltip }))
yairEO/title-tooltip
16
Automatically converts HTML title attributes to nicer better tooltips
JavaScript
yairEO
Yair Even Or
gif.js
JavaScript
// gif.js 0.2.0 - https://github.com/jnordberg/gif.js (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.GIF=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}else{var err=new Error('Uncaught, unspecified "error" event. ('+er+")");err.context=er;throw err}}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1);handler.apply(this,args)}}else if(isObject(handler)){args=Array.prototype.slice.call(arguments,1);listeners=handler.slice();len=listeners.length;for(i=0;i<len;i++)listeners[i].apply(this,args)}return true};EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events)this._events={};if(this._events.newListener)this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener);if(!this._events[type])this._events[type]=listener;else if(isObject(this._events[type]))this._events[type].push(listener);else this._events[type]=[this._events[type],listener];if(isObject(this._events[type])&&!this._events[type].warned){if(!isUndefined(this._maxListeners)){m=this._maxListeners}else{m=EventEmitter.defaultMaxListeners}if(m&&m>0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace()}}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-- >0;){if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else{list.splice(position,1)}if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners)}else if(listeners){while(listeners.length)this.removeListener(type,listeners[listeners.length-1])}delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;else if(evlistener)return evlistener.length}return 0};EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],2:[function(require,module,exports){var UA,browser,mode,platform,ua;ua=navigator.userAgent.toLowerCase();platform=navigator.platform.toLowerCase();UA=ua.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,"unknown",0];mode=UA[1]==="ie"&&document.documentMode;browser={name:UA[1]==="version"?UA[3]:UA[1],version:mode||parseFloat(UA[1]==="opera"&&UA[4]?UA[4]:UA[2]),platform:{name:ua.match(/ip(?:ad|od|hone)/)?"ios":(ua.match(/(?:webos|android)/)||platform.match(/mac|win|linux/)||["other"])[0]}};browser[browser.name]=true;browser[browser.name+parseInt(browser.version,10)]=true;browser.platform[browser.platform.name]=true;module.exports=browser},{}],3:[function(require,module,exports){var EventEmitter,GIF,browser,extend=function(child,parent){for(var key in parent){if(hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child},hasProp={}.hasOwnProperty,indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i<l;i++){if(i in this&&this[i]===item)return i}return-1},slice=[].slice;EventEmitter=require("events").EventEmitter;browser=require("./browser.coffee");GIF=function(superClass){var defaults,frameDefaults;extend(GIF,superClass);defaults={workerScript:"gif.worker.js",workers:2,repeat:0,background:"#fff",quality:10,width:null,height:null,transparent:null,debug:false,dither:false};frameDefaults={delay:500,copy:false};function GIF(options){var base,key,value;this.running=false;this.options={};this.frames=[];this.freeWorkers=[];this.activeWorkers=[];this.setOptions(options);for(key in defaults){value=defaults[key];if((base=this.options)[key]==null){base[key]=value}}}GIF.prototype.setOption=function(key,value){this.options[key]=value;if(this._canvas!=null&&(key==="width"||key==="height")){return this._canvas[key]=value}};GIF.prototype.setOptions=function(options){var key,results,value;results=[];for(key in options){if(!hasProp.call(options,key))continue;value=options[key];results.push(this.setOption(key,value))}return results};GIF.prototype.addFrame=function(image,options){var frame,key;if(options==null){options={}}frame={};frame.transparent=this.options.transparent;for(key in frameDefaults){frame[key]=options[key]||frameDefaults[key]}if(this.options.width==null){this.setOption("width",image.width)}if(this.options.height==null){this.setOption("height",image.height)}if(typeof ImageData!=="undefined"&&ImageData!==null&&image instanceof ImageData){frame.data=image.data}else if(typeof CanvasRenderingContext2D!=="undefined"&&CanvasRenderingContext2D!==null&&image instanceof CanvasRenderingContext2D||typeof WebGLRenderingContext!=="undefined"&&WebGLRenderingContext!==null&&image instanceof WebGLRenderingContext){if(options.copy){frame.data=this.getContextData(image)}else{frame.context=image}}else if(image.childNodes!=null){if(options.copy){frame.data=this.getImageData(image)}else{frame.image=image}}else{throw new Error("Invalid image")}return this.frames.push(frame)};GIF.prototype.render=function(){var i,j,numWorkers,ref;if(this.running){throw new Error("Already running")}if(this.options.width==null||this.options.height==null){throw new Error("Width and height must be set prior to rendering")}this.running=true;this.nextFrame=0;this.finishedFrames=0;this.imageParts=function(){var j,ref,results;results=[];for(i=j=0,ref=this.frames.length;0<=ref?j<ref:j>ref;i=0<=ref?++j:--j){results.push(null)}return results}.call(this);numWorkers=this.spawnWorkers();if(this.options.globalPalette===true){this.renderNextFrame()}else{for(i=j=0,ref=numWorkers;0<=ref?j<ref:j>ref;i=0<=ref?++j:--j){this.renderNextFrame()}}this.emit("start");return this.emit("progress",0)};GIF.prototype.abort=function(){var worker;while(true){worker=this.activeWorkers.shift();if(worker==null){break}this.log("killing active worker");worker.terminate()}this.running=false;return this.emit("abort")};GIF.prototype.spawnWorkers=function(){var j,numWorkers,ref,results;numWorkers=Math.min(this.options.workers,this.frames.length);(function(){results=[];for(var j=ref=this.freeWorkers.length;ref<=numWorkers?j<numWorkers:j>numWorkers;ref<=numWorkers?j++:j--){results.push(j)}return results}).apply(this).forEach(function(_this){return function(i){var worker;_this.log("spawning worker "+i);worker=new Worker(_this.options.workerScript);worker.onmessage=function(event){_this.activeWorkers.splice(_this.activeWorkers.indexOf(worker),1);_this.freeWorkers.push(worker);return _this.frameFinished(event.data)};return _this.freeWorkers.push(worker)}}(this));return numWorkers};GIF.prototype.frameFinished=function(frame){var i,j,ref;this.log("frame "+frame.index+" finished - "+this.activeWorkers.length+" active");this.finishedFrames++;this.emit("progress",this.finishedFrames/this.frames.length);this.imageParts[frame.index]=frame;if(this.options.globalPalette===true){this.options.globalPalette=frame.globalPalette;this.log("global palette analyzed");if(this.frames.length>2){for(i=j=1,ref=this.freeWorkers.length;1<=ref?j<ref:j>ref;i=1<=ref?++j:--j){this.renderNextFrame()}}}if(indexOf.call(this.imageParts,null)>=0){return this.renderNextFrame()}else{return this.finishRendering()}};GIF.prototype.finishRendering=function(){var data,frame,i,image,j,k,l,len,len1,len2,len3,offset,page,ref,ref1,ref2;len=0;ref=this.imageParts;for(j=0,len1=ref.length;j<len1;j++){frame=ref[j];len+=(frame.data.length-1)*frame.pageSize+frame.cursor}len+=frame.pageSize-frame.cursor;this.log("rendering finished - filesize "+Math.round(len/1e3)+"kb");data=new Uint8Array(len);offset=0;ref1=this.imageParts;for(k=0,len2=ref1.length;k<len2;k++){frame=ref1[k];ref2=frame.data;for(i=l=0,len3=ref2.length;l<len3;i=++l){page=ref2[i];data.set(page,offset);if(i===frame.data.length-1){offset+=frame.cursor}else{offset+=frame.pageSize}}}image=new Blob([data],{type:"image/gif"});return this.emit("finished",image,data)};GIF.prototype.renderNextFrame=function(){var frame,task,worker;if(this.freeWorkers.length===0){throw new Error("No free workers")}if(this.nextFrame>=this.frames.length){return}frame=this.frames[this.nextFrame++];worker=this.freeWorkers.shift();task=this.getTask(frame);this.log("starting frame "+(task.index+1)+" of "+this.frames.length);this.activeWorkers.push(worker);return worker.postMessage(task)};GIF.prototype.getContextData=function(ctx){return ctx.getImageData(0,0,this.options.width,this.options.height).data};GIF.prototype.getImageData=function(image){var ctx;if(this._canvas==null){this._canvas=document.createElement("canvas");this._canvas.width=this.options.width;this._canvas.height=this.options.height}ctx=this._canvas.getContext("2d");ctx.setFill=this.options.background;ctx.fillRect(0,0,this.options.width,this.options.height);ctx.drawImage(image,0,0);return this.getContextData(ctx)};GIF.prototype.getTask=function(frame){var index,task;index=this.frames.indexOf(frame);task={index:index,last:index===this.frames.length-1,delay:frame.delay,transparent:frame.transparent,width:this.options.width,height:this.options.height,quality:this.options.quality,dither:this.options.dither,globalPalette:this.options.globalPalette,repeat:this.options.repeat,canTransfer:browser.name==="chrome"};if(frame.data!=null){task.data=frame.data}else if(frame.context!=null){task.data=this.getContextData(frame.context)}else if(frame.image!=null){task.data=this.getImageData(frame.image)}else{throw new Error("Invalid frame")}return task};GIF.prototype.log=function(){var args;args=1<=arguments.length?slice.call(arguments,0):[];if(!this.options.debug){return}return console.log.apply(console,args)};return GIF}(EventEmitter);module.exports=GIF},{"./browser.coffee":2,events:1}]},{},[3])(3)}); //# sourceMappingURL=gif.js.map
yairm210/Mermaid-gif-maker
13
A small webpage for making GIFs of mermaid graphs
JavaScript
yairm210
Yair Morgenstern
gif.worker.js
JavaScript
// gif.worker.js 0.2.0 - https://github.com/jnordberg/gif.js (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var NeuQuant=require("./TypedNeuQuant.js");var LZWEncoder=require("./LZWEncoder.js");function ByteArray(){this.page=-1;this.pages=[];this.newPage()}ByteArray.pageSize=4096;ByteArray.charMap={};for(var i=0;i<256;i++)ByteArray.charMap[i]=String.fromCharCode(i);ByteArray.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(ByteArray.pageSize);this.cursor=0};ByteArray.prototype.getData=function(){var rv="";for(var p=0;p<this.pages.length;p++){for(var i=0;i<ByteArray.pageSize;i++){rv+=ByteArray.charMap[this.pages[p][i]]}}return rv};ByteArray.prototype.writeByte=function(val){if(this.cursor>=ByteArray.pageSize)this.newPage();this.pages[this.page][this.cursor++]=val};ByteArray.prototype.writeUTFBytes=function(string){for(var l=string.length,i=0;i<l;i++)this.writeByte(string.charCodeAt(i))};ByteArray.prototype.writeBytes=function(array,offset,length){for(var l=length||array.length,i=offset||0;i<l;i++)this.writeByte(array[i])};function GIFEncoder(width,height){this.width=~~width;this.height=~~height;this.transparent=null;this.transIndex=0;this.repeat=-1;this.delay=0;this.image=null;this.pixels=null;this.indexedPixels=null;this.colorDepth=null;this.colorTab=null;this.neuQuant=null;this.usedEntry=new Array;this.palSize=7;this.dispose=-1;this.firstFrame=true;this.sample=10;this.dither=false;this.globalPalette=false;this.out=new ByteArray}GIFEncoder.prototype.setDelay=function(milliseconds){this.delay=Math.round(milliseconds/10)};GIFEncoder.prototype.setFrameRate=function(fps){this.delay=Math.round(100/fps)};GIFEncoder.prototype.setDispose=function(disposalCode){if(disposalCode>=0)this.dispose=disposalCode};GIFEncoder.prototype.setRepeat=function(repeat){this.repeat=repeat};GIFEncoder.prototype.setTransparent=function(color){this.transparent=color};GIFEncoder.prototype.addFrame=function(imageData){this.image=imageData;this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null;this.getImagePixels();this.analyzePixels();if(this.globalPalette===true)this.globalPalette=this.colorTab;if(this.firstFrame){this.writeLSD();this.writePalette();if(this.repeat>=0){this.writeNetscapeExt()}}this.writeGraphicCtrlExt();this.writeImageDesc();if(!this.firstFrame&&!this.globalPalette)this.writePalette();this.writePixels();this.firstFrame=false};GIFEncoder.prototype.finish=function(){this.out.writeByte(59)};GIFEncoder.prototype.setQuality=function(quality){if(quality<1)quality=1;this.sample=quality};GIFEncoder.prototype.setDither=function(dither){if(dither===true)dither="FloydSteinberg";this.dither=dither};GIFEncoder.prototype.setGlobalPalette=function(palette){this.globalPalette=palette};GIFEncoder.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette};GIFEncoder.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")};GIFEncoder.prototype.analyzePixels=function(){if(!this.colorTab){this.neuQuant=new NeuQuant(this.pixels,this.sample);this.neuQuant.buildColormap();this.colorTab=this.neuQuant.getColormap()}if(this.dither){this.ditherPixels(this.dither.replace("-serpentine",""),this.dither.match(/-serpentine/)!==null)}else{this.indexPixels()}this.pixels=null;this.colorDepth=8;this.palSize=7;if(this.transparent!==null){this.transIndex=this.findClosest(this.transparent,true)}};GIFEncoder.prototype.indexPixels=function(imgq){var nPix=this.pixels.length/3;this.indexedPixels=new Uint8Array(nPix);var k=0;for(var j=0;j<nPix;j++){var index=this.findClosestRGB(this.pixels[k++]&255,this.pixels[k++]&255,this.pixels[k++]&255);this.usedEntry[index]=true;this.indexedPixels[j]=index}};GIFEncoder.prototype.ditherPixels=function(kernel,serpentine){var kernels={FalseFloydSteinberg:[[3/8,1,0],[3/8,0,1],[2/8,1,1]],FloydSteinberg:[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]],Stucki:[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]],Atkinson:[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]]};if(!kernel||!kernels[kernel]){throw"Unknown dithering kernel: "+kernel}var ds=kernels[kernel];var index=0,height=this.height,width=this.width,data=this.pixels;var direction=serpentine?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var y=0;y<height;y++){if(serpentine)direction=direction*-1;for(var x=direction==1?0:width-1,xend=direction==1?width:0;x!==xend;x+=direction){index=y*width+x;var idx=index*3;var r1=data[idx];var g1=data[idx+1];var b1=data[idx+2];idx=this.findClosestRGB(r1,g1,b1);this.usedEntry[idx]=true;this.indexedPixels[index]=idx;idx*=3;var r2=this.colorTab[idx];var g2=this.colorTab[idx+1];var b2=this.colorTab[idx+2];var er=r1-r2;var eg=g1-g2;var eb=b1-b2;for(var i=direction==1?0:ds.length-1,end=direction==1?ds.length:0;i!==end;i+=direction){var x1=ds[i][1];var y1=ds[i][2];if(x1+x>=0&&x1+x<width&&y1+y>=0&&y1+y<height){var d=ds[i][0];idx=index+x1+y1*width;idx*=3;data[idx]=Math.max(0,Math.min(255,data[idx]+er*d));data[idx+1]=Math.max(0,Math.min(255,data[idx+1]+eg*d));data[idx+2]=Math.max(0,Math.min(255,data[idx+2]+eb*d))}}}}};GIFEncoder.prototype.findClosest=function(c,used){return this.findClosestRGB((c&16711680)>>16,(c&65280)>>8,c&255,used)};GIFEncoder.prototype.findClosestRGB=function(r,g,b,used){if(this.colorTab===null)return-1;if(this.neuQuant&&!used){return this.neuQuant.lookupRGB(r,g,b)}var c=b|g<<8|r<<16;var minpos=0;var dmin=256*256*256;var len=this.colorTab.length;for(var i=0,index=0;i<len;index++){var dr=r-(this.colorTab[i++]&255);var dg=g-(this.colorTab[i++]&255);var db=b-(this.colorTab[i++]&255);var d=dr*dr+dg*dg+db*db;if((!used||this.usedEntry[index])&&d<dmin){dmin=d;minpos=index}}return minpos};GIFEncoder.prototype.getImagePixels=function(){var w=this.width;var h=this.height;this.pixels=new Uint8Array(w*h*3);var data=this.image;var srcPos=0;var count=0;for(var i=0;i<h;i++){for(var j=0;j<w;j++){this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];srcPos++}}};GIFEncoder.prototype.writeGraphicCtrlExt=function(){this.out.writeByte(33);this.out.writeByte(249);this.out.writeByte(4);var transp,disp;if(this.transparent===null){transp=0;disp=0}else{transp=1;disp=2}if(this.dispose>=0){disp=dispose&7}disp<<=2;this.out.writeByte(0|disp|0|transp);this.writeShort(this.delay);this.out.writeByte(this.transIndex);this.out.writeByte(0)};GIFEncoder.prototype.writeImageDesc=function(){this.out.writeByte(44);this.writeShort(0);this.writeShort(0);this.writeShort(this.width);this.writeShort(this.height);if(this.firstFrame||this.globalPalette){this.out.writeByte(0)}else{this.out.writeByte(128|0|0|0|this.palSize)}};GIFEncoder.prototype.writeLSD=function(){this.writeShort(this.width);this.writeShort(this.height);this.out.writeByte(128|112|0|this.palSize);this.out.writeByte(0);this.out.writeByte(0)};GIFEncoder.prototype.writeNetscapeExt=function(){this.out.writeByte(33);this.out.writeByte(255);this.out.writeByte(11);this.out.writeUTFBytes("NETSCAPE2.0");this.out.writeByte(3);this.out.writeByte(1);this.writeShort(this.repeat);this.out.writeByte(0)};GIFEncoder.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var n=3*256-this.colorTab.length;for(var i=0;i<n;i++)this.out.writeByte(0)};GIFEncoder.prototype.writeShort=function(pValue){this.out.writeByte(pValue&255);this.out.writeByte(pValue>>8&255)};GIFEncoder.prototype.writePixels=function(){var enc=new LZWEncoder(this.width,this.height,this.indexedPixels,this.colorDepth);enc.encode(this.out)};GIFEncoder.prototype.stream=function(){return this.out};module.exports=GIFEncoder},{"./LZWEncoder.js":2,"./TypedNeuQuant.js":3}],2:[function(require,module,exports){var EOF=-1;var BITS=12;var HSIZE=5003;var masks=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function LZWEncoder(width,height,pixels,colorDepth){var initCodeSize=Math.max(2,colorDepth);var accum=new Uint8Array(256);var htab=new Int32Array(HSIZE);var codetab=new Int32Array(HSIZE);var cur_accum,cur_bits=0;var a_count;var free_ent=0;var maxcode;var clear_flg=false;var g_init_bits,ClearCode,EOFCode;function char_out(c,outs){accum[a_count++]=c;if(a_count>=254)flush_char(outs)}function cl_block(outs){cl_hash(HSIZE);free_ent=ClearCode+2;clear_flg=true;output(ClearCode,outs)}function cl_hash(hsize){for(var i=0;i<hsize;++i)htab[i]=-1}function compress(init_bits,outs){var fcode,c,i,ent,disp,hsize_reg,hshift;g_init_bits=init_bits;clear_flg=false;n_bits=g_init_bits;maxcode=MAXCODE(n_bits);ClearCode=1<<init_bits-1;EOFCode=ClearCode+1;free_ent=ClearCode+2;a_count=0;ent=nextPixel();hshift=0;for(fcode=HSIZE;fcode<65536;fcode*=2)++hshift;hshift=8-hshift;hsize_reg=HSIZE;cl_hash(hsize_reg);output(ClearCode,outs);outer_loop:while((c=nextPixel())!=EOF){fcode=(c<<BITS)+ent;i=c<<hshift^ent;if(htab[i]===fcode){ent=codetab[i];continue}else if(htab[i]>=0){disp=hsize_reg-i;if(i===0)disp=1;do{if((i-=disp)<0)i+=hsize_reg;if(htab[i]===fcode){ent=codetab[i];continue outer_loop}}while(htab[i]>=0)}output(ent,outs);ent=c;if(free_ent<1<<BITS){codetab[i]=free_ent++;htab[i]=fcode}else{cl_block(outs)}}output(ent,outs);output(EOFCode,outs)}function encode(outs){outs.writeByte(initCodeSize);remaining=width*height;curPixel=0;compress(initCodeSize+1,outs);outs.writeByte(0)}function flush_char(outs){if(a_count>0){outs.writeByte(a_count);outs.writeBytes(accum,0,a_count);a_count=0}}function MAXCODE(n_bits){return(1<<n_bits)-1}function nextPixel(){if(remaining===0)return EOF;--remaining;var pix=pixels[curPixel++];return pix&255}function output(code,outs){cur_accum&=masks[cur_bits];if(cur_bits>0)cur_accum|=code<<cur_bits;else cur_accum=code;cur_bits+=n_bits;while(cur_bits>=8){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}if(free_ent>maxcode||clear_flg){if(clear_flg){maxcode=MAXCODE(n_bits=g_init_bits);clear_flg=false}else{++n_bits;if(n_bits==BITS)maxcode=1<<BITS;else maxcode=MAXCODE(n_bits)}}if(code==EOFCode){while(cur_bits>0){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}flush_char(outs)}}this.encode=encode}module.exports=LZWEncoder},{}],3:[function(require,module,exports){var ncycles=100;var netsize=256;var maxnetpos=netsize-1;var netbiasshift=4;var intbiasshift=16;var intbias=1<<intbiasshift;var gammashift=10;var gamma=1<<gammashift;var betashift=10;var beta=intbias>>betashift;var betagamma=intbias<<gammashift-betashift;var initrad=netsize>>3;var radiusbiasshift=6;var radiusbias=1<<radiusbiasshift;var initradius=initrad*radiusbias;var radiusdec=30;var alphabiasshift=10;var initalpha=1<<alphabiasshift;var alphadec;var radbiasshift=8;var radbias=1<<radbiasshift;var alpharadbshift=alphabiasshift+radbiasshift;var alpharadbias=1<<alpharadbshift;var prime1=499;var prime2=491;var prime3=487;var prime4=503;var minpicturebytes=3*prime4;function NeuQuant(pixels,samplefac){var network;var netindex;var bias;var freq;var radpower;function init(){network=[];netindex=new Int32Array(256);bias=new Int32Array(netsize);freq=new Int32Array(netsize);radpower=new Int32Array(netsize>>3);var i,v;for(i=0;i<netsize;i++){v=(i<<netbiasshift+8)/netsize;network[i]=new Float64Array([v,v,v,0]);freq[i]=intbias/netsize;bias[i]=0}}function unbiasnet(){for(var i=0;i<netsize;i++){network[i][0]>>=netbiasshift;network[i][1]>>=netbiasshift;network[i][2]>>=netbiasshift;network[i][3]=i}}function altersingle(alpha,i,b,g,r){network[i][0]-=alpha*(network[i][0]-b)/initalpha;network[i][1]-=alpha*(network[i][1]-g)/initalpha;network[i][2]-=alpha*(network[i][2]-r)/initalpha}function alterneigh(radius,i,b,g,r){var lo=Math.abs(i-radius);var hi=Math.min(i+radius,netsize);var j=i+1;var k=i-1;var m=1;var p,a;while(j<hi||k>lo){a=radpower[m++];if(j<hi){p=network[j++];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}if(k>lo){p=network[k--];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}}}function contest(b,g,r){var bestd=~(1<<31);var bestbiasd=bestd;var bestpos=-1;var bestbiaspos=bestpos;var i,n,dist,biasdist,betafreq;for(i=0;i<netsize;i++){n=network[i];dist=Math.abs(n[0]-b)+Math.abs(n[1]-g)+Math.abs(n[2]-r);if(dist<bestd){bestd=dist;bestpos=i}biasdist=dist-(bias[i]>>intbiasshift-netbiasshift);if(biasdist<bestbiasd){bestbiasd=biasdist;bestbiaspos=i}betafreq=freq[i]>>betashift;freq[i]-=betafreq;bias[i]+=betafreq<<gammashift}freq[bestpos]+=beta;bias[bestpos]-=betagamma;return bestbiaspos}function inxbuild(){var i,j,p,q,smallpos,smallval,previouscol=0,startpos=0;for(i=0;i<netsize;i++){p=network[i];smallpos=i;smallval=p[1];for(j=i+1;j<netsize;j++){q=network[j];if(q[1]<smallval){smallpos=j;smallval=q[1]}}q=network[smallpos];if(i!=smallpos){j=q[0];q[0]=p[0];p[0]=j;j=q[1];q[1]=p[1];p[1]=j;j=q[2];q[2]=p[2];p[2]=j;j=q[3];q[3]=p[3];p[3]=j}if(smallval!=previouscol){netindex[previouscol]=startpos+i>>1;for(j=previouscol+1;j<smallval;j++)netindex[j]=i;previouscol=smallval;startpos=i}}netindex[previouscol]=startpos+maxnetpos>>1;for(j=previouscol+1;j<256;j++)netindex[j]=maxnetpos}function inxsearch(b,g,r){var a,p,dist;var bestd=1e3;var best=-1;var i=netindex[g];var j=i-1;while(i<netsize||j>=0){if(i<netsize){p=network[i];dist=p[1]-g;if(dist>=bestd)i=netsize;else{i++;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}if(j>=0){p=network[j];dist=g-p[1];if(dist>=bestd)j=-1;else{j--;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}}return best}function learn(){var i;var lengthcount=pixels.length;var alphadec=30+(samplefac-1)/3;var samplepixels=lengthcount/(3*samplefac);var delta=~~(samplepixels/ncycles);var alpha=initalpha;var radius=initradius;var rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(i=0;i<rad;i++)radpower[i]=alpha*((rad*rad-i*i)*radbias/(rad*rad));var step;if(lengthcount<minpicturebytes){samplefac=1;step=3}else if(lengthcount%prime1!==0){step=3*prime1}else if(lengthcount%prime2!==0){step=3*prime2}else if(lengthcount%prime3!==0){step=3*prime3}else{step=3*prime4}var b,g,r,j;var pix=0;i=0;while(i<samplepixels){b=(pixels[pix]&255)<<netbiasshift;g=(pixels[pix+1]&255)<<netbiasshift;r=(pixels[pix+2]&255)<<netbiasshift;j=contest(b,g,r);altersingle(alpha,j,b,g,r);if(rad!==0)alterneigh(rad,j,b,g,r);pix+=step;if(pix>=lengthcount)pix-=lengthcount;i++;if(delta===0)delta=1;if(i%delta===0){alpha-=alpha/alphadec;radius-=radius/radiusdec;rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(j=0;j<rad;j++)radpower[j]=alpha*((rad*rad-j*j)*radbias/(rad*rad))}}}function buildColormap(){init();learn();unbiasnet();inxbuild()}this.buildColormap=buildColormap;function getColormap(){var map=[];var index=[];for(var i=0;i<netsize;i++)index[network[i][3]]=i;var k=0;for(var l=0;l<netsize;l++){var j=index[l];map[k++]=network[j][0];map[k++]=network[j][1];map[k++]=network[j][2]}return map}this.getColormap=getColormap;this.lookupRGB=inxsearch}module.exports=NeuQuant},{}],4:[function(require,module,exports){var GIFEncoder,renderFrame;GIFEncoder=require("./GIFEncoder.js");renderFrame=function(frame){var encoder,page,stream,transfer;encoder=new GIFEncoder(frame.width,frame.height);if(frame.index===0){encoder.writeHeader()}else{encoder.firstFrame=false}encoder.setTransparent(frame.transparent);encoder.setRepeat(frame.repeat);encoder.setDelay(frame.delay);encoder.setQuality(frame.quality);encoder.setDither(frame.dither);encoder.setGlobalPalette(frame.globalPalette);encoder.addFrame(frame.data);if(frame.last){encoder.finish()}if(frame.globalPalette===true){frame.globalPalette=encoder.getGlobalPalette()}stream=encoder.stream();frame.data=stream.pages;frame.cursor=stream.cursor;frame.pageSize=stream.constructor.pageSize;if(frame.canTransfer){transfer=function(){var i,len,ref,results;ref=frame.data;results=[];for(i=0,len=ref.length;i<len;i++){page=ref[i];results.push(page.buffer)}return results}();return self.postMessage(frame,transfer)}else{return self.postMessage(frame)}};self.onmessage=function(event){return renderFrame(event.data)}},{"./GIFEncoder.js":1}]},{},[4]); //# sourceMappingURL=gif.worker.js.map
yairm210/Mermaid-gif-maker
13
A small webpage for making GIFs of mermaid graphs
JavaScript
yairm210
Yair Morgenstern
html2canvas.js
JavaScript
/*! * html2canvas 1.4.1 <https://html2canvas.hertzen.com> * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com> * Released under MIT License */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.html2canvas = factory()); }(this, (function () { 'use strict'; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || from); } var Bounds = /** @class */ (function () { function Bounds(left, top, width, height) { this.left = left; this.top = top; this.width = width; this.height = height; } Bounds.prototype.add = function (x, y, w, h) { return new Bounds(this.left + x, this.top + y, this.width + w, this.height + h); }; Bounds.fromClientRect = function (context, clientRect) { return new Bounds(clientRect.left + context.windowBounds.left, clientRect.top + context.windowBounds.top, clientRect.width, clientRect.height); }; Bounds.fromDOMRectList = function (context, domRectList) { var domRect = Array.from(domRectList).find(function (rect) { return rect.width !== 0; }); return domRect ? new Bounds(domRect.left + context.windowBounds.left, domRect.top + context.windowBounds.top, domRect.width, domRect.height) : Bounds.EMPTY; }; Bounds.EMPTY = new Bounds(0, 0, 0, 0); return Bounds; }()); var parseBounds = function (context, node) { return Bounds.fromClientRect(context, node.getBoundingClientRect()); }; var parseDocumentSize = function (document) { var body = document.body; var documentElement = document.documentElement; if (!body || !documentElement) { throw new Error("Unable to get document size"); } var width = Math.max(Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), Math.max(body.clientWidth, documentElement.clientWidth)); var height = Math.max(Math.max(body.scrollHeight, documentElement.scrollHeight), Math.max(body.offsetHeight, documentElement.offsetHeight), Math.max(body.clientHeight, documentElement.clientHeight)); return new Bounds(0, 0, width, height); }; /* * css-line-break 2.1.0 <https://github.com/niklasvh/css-line-break#readme> * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com> * Released under MIT License */ var toCodePoints$1 = function (str) { var codePoints = []; var i = 0; var length = str.length; while (i < length) { var value = str.charCodeAt(i++); if (value >= 0xd800 && value <= 0xdbff && i < length) { var extra = str.charCodeAt(i++); if ((extra & 0xfc00) === 0xdc00) { codePoints.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000); } else { codePoints.push(value); i--; } } else { codePoints.push(value); } } return codePoints; }; var fromCodePoint$1 = function () { var codePoints = []; for (var _i = 0; _i < arguments.length; _i++) { codePoints[_i] = arguments[_i]; } if (String.fromCodePoint) { return String.fromCodePoint.apply(String, codePoints); } var length = codePoints.length; if (!length) { return ''; } var codeUnits = []; var index = -1; var result = ''; while (++index < length) { var codePoint = codePoints[index]; if (codePoint <= 0xffff) { codeUnits.push(codePoint); } else { codePoint -= 0x10000; codeUnits.push((codePoint >> 10) + 0xd800, (codePoint % 0x400) + 0xdc00); } if (index + 1 === length || codeUnits.length > 0x4000) { result += String.fromCharCode.apply(String, codeUnits); codeUnits.length = 0; } } return result; }; var chars$2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; // Use a lookup table to find the index. var lookup$2 = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256); for (var i$2 = 0; i$2 < chars$2.length; i$2++) { lookup$2[chars$2.charCodeAt(i$2)] = i$2; } /* * utrie 1.0.2 <https://github.com/niklasvh/utrie> * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com> * Released under MIT License */ var chars$1$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; // Use a lookup table to find the index. var lookup$1$1 = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256); for (var i$1$1 = 0; i$1$1 < chars$1$1.length; i$1$1++) { lookup$1$1[chars$1$1.charCodeAt(i$1$1)] = i$1$1; } var decode$1 = function (base64) { var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4; if (base64[base64.length - 1] === '=') { bufferLength--; if (base64[base64.length - 2] === '=') { bufferLength--; } } var buffer = typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint8Array.prototype.slice !== 'undefined' ? new ArrayBuffer(bufferLength) : new Array(bufferLength); var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer); for (i = 0; i < len; i += 4) { encoded1 = lookup$1$1[base64.charCodeAt(i)]; encoded2 = lookup$1$1[base64.charCodeAt(i + 1)]; encoded3 = lookup$1$1[base64.charCodeAt(i + 2)]; encoded4 = lookup$1$1[base64.charCodeAt(i + 3)]; bytes[p++] = (encoded1 << 2) | (encoded2 >> 4); bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2); bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63); } return buffer; }; var polyUint16Array$1 = function (buffer) { var length = buffer.length; var bytes = []; for (var i = 0; i < length; i += 2) { bytes.push((buffer[i + 1] << 8) | buffer[i]); } return bytes; }; var polyUint32Array$1 = function (buffer) { var length = buffer.length; var bytes = []; for (var i = 0; i < length; i += 4) { bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]); } return bytes; }; /** Shift size for getting the index-2 table offset. */ var UTRIE2_SHIFT_2$1 = 5; /** Shift size for getting the index-1 table offset. */ var UTRIE2_SHIFT_1$1 = 6 + 5; /** * Shift size for shifting left the index array values. * Increases possible data size with 16-bit index values at the cost * of compactability. * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY. */ var UTRIE2_INDEX_SHIFT$1 = 2; /** * Difference between the two shift sizes, * for getting an index-1 offset from an index-2 offset. 6=11-5 */ var UTRIE2_SHIFT_1_2$1 = UTRIE2_SHIFT_1$1 - UTRIE2_SHIFT_2$1; /** * The part of the index-2 table for U+D800..U+DBFF stores values for * lead surrogate code _units_ not code _points_. * Values for lead surrogate code _points_ are indexed with this portion of the table. * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.) */ var UTRIE2_LSCP_INDEX_2_OFFSET$1 = 0x10000 >> UTRIE2_SHIFT_2$1; /** Number of entries in a data block. 32=0x20 */ var UTRIE2_DATA_BLOCK_LENGTH$1 = 1 << UTRIE2_SHIFT_2$1; /** Mask for getting the lower bits for the in-data-block offset. */ var UTRIE2_DATA_MASK$1 = UTRIE2_DATA_BLOCK_LENGTH$1 - 1; var UTRIE2_LSCP_INDEX_2_LENGTH$1 = 0x400 >> UTRIE2_SHIFT_2$1; /** Count the lengths of both BMP pieces. 2080=0x820 */ var UTRIE2_INDEX_2_BMP_LENGTH$1 = UTRIE2_LSCP_INDEX_2_OFFSET$1 + UTRIE2_LSCP_INDEX_2_LENGTH$1; /** * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820. * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2. */ var UTRIE2_UTF8_2B_INDEX_2_OFFSET$1 = UTRIE2_INDEX_2_BMP_LENGTH$1; var UTRIE2_UTF8_2B_INDEX_2_LENGTH$1 = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */ /** * The index-1 table, only used for supplementary code points, at offset 2112=0x840. * Variable length, for code points up to highStart, where the last single-value range starts. * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1. * (For 0x100000 supplementary code points U+10000..U+10ffff.) * * The part of the index-2 table for supplementary code points starts * after this index-1 table. * * Both the index-1 table and the following part of the index-2 table * are omitted completely if there is only BMP data. */ var UTRIE2_INDEX_1_OFFSET$1 = UTRIE2_UTF8_2B_INDEX_2_OFFSET$1 + UTRIE2_UTF8_2B_INDEX_2_LENGTH$1; /** * Number of index-1 entries for the BMP. 32=0x20 * This part of the index-1 table is omitted from the serialized form. */ var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1 = 0x10000 >> UTRIE2_SHIFT_1$1; /** Number of entries in an index-2 block. 64=0x40 */ var UTRIE2_INDEX_2_BLOCK_LENGTH$1 = 1 << UTRIE2_SHIFT_1_2$1; /** Mask for getting the lower bits for the in-index-2-block offset. */ var UTRIE2_INDEX_2_MASK$1 = UTRIE2_INDEX_2_BLOCK_LENGTH$1 - 1; var slice16$1 = function (view, start, end) { if (view.slice) { return view.slice(start, end); } return new Uint16Array(Array.prototype.slice.call(view, start, end)); }; var slice32$1 = function (view, start, end) { if (view.slice) { return view.slice(start, end); } return new Uint32Array(Array.prototype.slice.call(view, start, end)); }; var createTrieFromBase64$1 = function (base64, _byteLength) { var buffer = decode$1(base64); var view32 = Array.isArray(buffer) ? polyUint32Array$1(buffer) : new Uint32Array(buffer); var view16 = Array.isArray(buffer) ? polyUint16Array$1(buffer) : new Uint16Array(buffer); var headerLength = 24; var index = slice16$1(view16, headerLength / 2, view32[4] / 2); var data = view32[5] === 2 ? slice16$1(view16, (headerLength + view32[4]) / 2) : slice32$1(view32, Math.ceil((headerLength + view32[4]) / 4)); return new Trie$1(view32[0], view32[1], view32[2], view32[3], index, data); }; var Trie$1 = /** @class */ (function () { function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) { this.initialValue = initialValue; this.errorValue = errorValue; this.highStart = highStart; this.highValueIndex = highValueIndex; this.index = index; this.data = data; } /** * Get the value for a code point as stored in the Trie. * * @param codePoint the code point * @return the value */ Trie.prototype.get = function (codePoint) { var ix; if (codePoint >= 0) { if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) { // Ordinary BMP code point, excluding leading surrogates. // BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index. // 16 bit data is stored in the index array itself. ix = this.index[codePoint >> UTRIE2_SHIFT_2$1]; ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1); return this.data[ix]; } if (codePoint <= 0xffff) { // Lead Surrogate Code Point. A Separate index section is stored for // lead surrogate code units and code points. // The main index has the code unit data. // For this function, we need the code point data. // Note: this expression could be refactored for slightly improved efficiency, but // surrogate code points will be so rare in practice that it's not worth it. ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET$1 + ((codePoint - 0xd800) >> UTRIE2_SHIFT_2$1)]; ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1); return this.data[ix]; } if (codePoint < this.highStart) { // Supplemental code point, use two-level lookup. ix = UTRIE2_INDEX_1_OFFSET$1 - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1 + (codePoint >> UTRIE2_SHIFT_1$1); ix = this.index[ix]; ix += (codePoint >> UTRIE2_SHIFT_2$1) & UTRIE2_INDEX_2_MASK$1; ix = this.index[ix]; ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1); return this.data[ix]; } if (codePoint <= 0x10ffff) { return this.data[this.highValueIndex]; } } // Fall through. The code point is outside of the legal range of 0..0x10ffff. return this.errorValue; }; return Trie; }()); /* * base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer> * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com> * Released under MIT License */ var chars$3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; // Use a lookup table to find the index. var lookup$3 = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256); for (var i$3 = 0; i$3 < chars$3.length; i$3++) { lookup$3[chars$3.charCodeAt(i$3)] = i$3; } var base64$1 = 'KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=='; var LETTER_NUMBER_MODIFIER = 50; // Non-tailorable Line Breaking Classes var BK = 1; // Cause a line break (after) var CR$1 = 2; // Cause a line break (after), except between CR and LF var LF$1 = 3; // Cause a line break (after) var CM = 4; // Prohibit a line break between the character and the preceding character var NL = 5; // Cause a line break (after) var WJ = 7; // Prohibit line breaks before and after var ZW = 8; // Provide a break opportunity var GL = 9; // Prohibit line breaks before and after var SP = 10; // Enable indirect line breaks var ZWJ$1 = 11; // Prohibit line breaks within joiner sequences // Break Opportunities var B2 = 12; // Provide a line break opportunity before and after the character var BA = 13; // Generally provide a line break opportunity after the character var BB = 14; // Generally provide a line break opportunity before the character var HY = 15; // Provide a line break opportunity after the character, except in numeric context var CB = 16; // Provide a line break opportunity contingent on additional information // Characters Prohibiting Certain Breaks var CL = 17; // Prohibit line breaks before var CP = 18; // Prohibit line breaks before var EX = 19; // Prohibit line breaks before var IN = 20; // Allow only indirect line breaks between pairs var NS = 21; // Allow only indirect line breaks before var OP = 22; // Prohibit line breaks after var QU = 23; // Act like they are both opening and closing // Numeric Context var IS = 24; // Prevent breaks after any and before numeric var NU = 25; // Form numeric expressions for line breaking purposes var PO = 26; // Do not break following a numeric expression var PR = 27; // Do not break in front of a numeric expression var SY = 28; // Prevent a break before; and allow a break after // Other Characters var AI = 29; // Act like AL when the resolvedEAW is N; otherwise; act as ID var AL = 30; // Are alphabetic characters or symbols that are used with alphabetic characters var CJ = 31; // Treat as NS or ID for strict or normal breaking. var EB = 32; // Do not break from following Emoji Modifier var EM = 33; // Do not break from preceding Emoji Base var H2 = 34; // Form Korean syllable blocks var H3 = 35; // Form Korean syllable blocks var HL = 36; // Do not break around a following hyphen; otherwise act as Alphabetic var ID = 37; // Break before or after; except in some numeric context var JL = 38; // Form Korean syllable blocks var JV = 39; // Form Korean syllable blocks var JT = 40; // Form Korean syllable blocks var RI$1 = 41; // Keep pairs together. For pairs; break before and after other classes var SA = 42; // Provide a line break opportunity contingent on additional, language-specific context analysis var XX = 43; // Have as yet unknown line breaking behavior or unassigned code positions var ea_OP = [0x2329, 0xff08]; var BREAK_MANDATORY = '!'; var BREAK_NOT_ALLOWED$1 = '×'; var BREAK_ALLOWED$1 = '÷'; var UnicodeTrie$1 = createTrieFromBase64$1(base64$1); var ALPHABETICS = [AL, HL]; var HARD_LINE_BREAKS = [BK, CR$1, LF$1, NL]; var SPACE$1 = [SP, ZW]; var PREFIX_POSTFIX = [PR, PO]; var LINE_BREAKS = HARD_LINE_BREAKS.concat(SPACE$1); var KOREAN_SYLLABLE_BLOCK = [JL, JV, JT, H2, H3]; var HYPHEN = [HY, BA]; var codePointsToCharacterClasses = function (codePoints, lineBreak) { if (lineBreak === void 0) { lineBreak = 'strict'; } var types = []; var indices = []; var categories = []; codePoints.forEach(function (codePoint, index) { var classType = UnicodeTrie$1.get(codePoint); if (classType > LETTER_NUMBER_MODIFIER) { categories.push(true); classType -= LETTER_NUMBER_MODIFIER; } else { categories.push(false); } if (['normal', 'auto', 'loose'].indexOf(lineBreak) !== -1) { // U+2010, – U+2013, 〜 U+301C, ゠ U+30A0 if ([0x2010, 0x2013, 0x301c, 0x30a0].indexOf(codePoint) !== -1) { indices.push(index); return types.push(CB); } } if (classType === CM || classType === ZWJ$1) { // LB10 Treat any remaining combining mark or ZWJ as AL. if (index === 0) { indices.push(index); return types.push(AL); } // LB9 Do not break a combining character sequence; treat it as if it has the line breaking class of // the base character in all of the following rules. Treat ZWJ as if it were CM. var prev = types[index - 1]; if (LINE_BREAKS.indexOf(prev) === -1) { indices.push(indices[index - 1]); return types.push(prev); } indices.push(index); return types.push(AL); } indices.push(index); if (classType === CJ) { return types.push(lineBreak === 'strict' ? NS : ID); } if (classType === SA) { return types.push(AL); } if (classType === AI) { return types.push(AL); } // For supplementary characters, a useful default is to treat characters in the range 10000..1FFFD as AL // and characters in the ranges 20000..2FFFD and 30000..3FFFD as ID, until the implementation can be revised // to take into account the actual line breaking properties for these characters. if (classType === XX) { if ((codePoint >= 0x20000 && codePoint <= 0x2fffd) || (codePoint >= 0x30000 && codePoint <= 0x3fffd)) { return types.push(ID); } else { return types.push(AL); } } types.push(classType); }); return [indices, types, categories]; }; var isAdjacentWithSpaceIgnored = function (a, b, currentIndex, classTypes) { var current = classTypes[currentIndex]; if (Array.isArray(a) ? a.indexOf(current) !== -1 : a === current) { var i = currentIndex; while (i <= classTypes.length) { i++; var next = classTypes[i]; if (next === b) { return true; } if (next !== SP) { break; } } } if (current === SP) { var i = currentIndex; while (i > 0) { i--; var prev = classTypes[i]; if (Array.isArray(a) ? a.indexOf(prev) !== -1 : a === prev) { var n = currentIndex; while (n <= classTypes.length) { n++; var next = classTypes[n]; if (next === b) { return true; } if (next !== SP) { break; } } } if (prev !== SP) { break; } } } return false; }; var previousNonSpaceClassType = function (currentIndex, classTypes) { var i = currentIndex; while (i >= 0) { var type = classTypes[i]; if (type === SP) { i--; } else { return type; } } return 0; }; var _lineBreakAtIndex = function (codePoints, classTypes, indicies, index, forbiddenBreaks) { if (indicies[index] === 0) { return BREAK_NOT_ALLOWED$1; } var currentIndex = index - 1; if (Array.isArray(forbiddenBreaks) && forbiddenBreaks[currentIndex] === true) { return BREAK_NOT_ALLOWED$1; } var beforeIndex = currentIndex - 1; var afterIndex = currentIndex + 1; var current = classTypes[currentIndex]; // LB4 Always break after hard line breaks. // LB5 Treat CR followed by LF, as well as CR, LF, and NL as hard line breaks. var before = beforeIndex >= 0 ? classTypes[beforeIndex] : 0; var next = classTypes[afterIndex]; if (current === CR$1 && next === LF$1) { return BREAK_NOT_ALLOWED$1; } if (HARD_LINE_BREAKS.indexOf(current) !== -1) { return BREAK_MANDATORY; } // LB6 Do not break before hard line breaks. if (HARD_LINE_BREAKS.indexOf(next) !== -1) { return BREAK_NOT_ALLOWED$1; } // LB7 Do not break before spaces or zero width space. if (SPACE$1.indexOf(next) !== -1) { return BREAK_NOT_ALLOWED$1; } // LB8 Break before any character following a zero-width space, even if one or more spaces intervene. if (previousNonSpaceClassType(currentIndex, classTypes) === ZW) { return BREAK_ALLOWED$1; } // LB8a Do not break after a zero width joiner. if (UnicodeTrie$1.get(codePoints[currentIndex]) === ZWJ$1) { return BREAK_NOT_ALLOWED$1; } // zwj emojis if ((current === EB || current === EM) && UnicodeTrie$1.get(codePoints[afterIndex]) === ZWJ$1) { return BREAK_NOT_ALLOWED$1; } // LB11 Do not break before or after Word joiner and related characters. if (current === WJ || next === WJ) { return BREAK_NOT_ALLOWED$1; } // LB12 Do not break after NBSP and related characters. if (current === GL) { return BREAK_NOT_ALLOWED$1; } // LB12a Do not break before NBSP and related characters, except after spaces and hyphens. if ([SP, BA, HY].indexOf(current) === -1 && next === GL) { return BREAK_NOT_ALLOWED$1; } // LB13 Do not break before ‘]’ or ‘!’ or ‘;’ or ‘/’, even after spaces. if ([CL, CP, EX, IS, SY].indexOf(next) !== -1) { return BREAK_NOT_ALLOWED$1; } // LB14 Do not break after ‘[’, even after spaces. if (previousNonSpaceClassType(currentIndex, classTypes) === OP) { return BREAK_NOT_ALLOWED$1; } // LB15 Do not break within ‘”[’, even with intervening spaces. if (isAdjacentWithSpaceIgnored(QU, OP, currentIndex, classTypes)) { return BREAK_NOT_ALLOWED$1; } // LB16 Do not break between closing punctuation and a nonstarter (lb=NS), even with intervening spaces. if (isAdjacentWithSpaceIgnored([CL, CP], NS, currentIndex, classTypes)) { return BREAK_NOT_ALLOWED$1; } // LB17 Do not break within ‘——’, even with intervening spaces. if (isAdjacentWithSpaceIgnored(B2, B2, currentIndex, classTypes)) { return BREAK_NOT_ALLOWED$1; } // LB18 Break after spaces. if (current === SP) { return BREAK_ALLOWED$1; } // LB19 Do not break before or after quotation marks, such as ‘ ” ’. if (current === QU || next === QU) { return BREAK_NOT_ALLOWED$1; } // LB20 Break before and after unresolved CB. if (next === CB || current === CB) { return BREAK_ALLOWED$1; } // LB21 Do not break before hyphen-minus, other hyphens, fixed-width spaces, small kana, and other non-starters, or after acute accents. if ([BA, HY, NS].indexOf(next) !== -1 || current === BB) { return BREAK_NOT_ALLOWED$1; } // LB21a Don't break after Hebrew + Hyphen. if (before === HL && HYPHEN.indexOf(current) !== -1) { return BREAK_NOT_ALLOWED$1; } // LB21b Don’t break between Solidus and Hebrew letters. if (current === SY && next === HL) { return BREAK_NOT_ALLOWED$1; } // LB22 Do not break before ellipsis. if (next === IN) { return BREAK_NOT_ALLOWED$1; } // LB23 Do not break between digits and letters. if ((ALPHABETICS.indexOf(next) !== -1 && current === NU) || (ALPHABETICS.indexOf(current) !== -1 && next === NU)) { return BREAK_NOT_ALLOWED$1; } // LB23a Do not break between numeric prefixes and ideographs, or between ideographs and numeric postfixes. if ((current === PR && [ID, EB, EM].indexOf(next) !== -1) || ([ID, EB, EM].indexOf(current) !== -1 && next === PO)) { return BREAK_NOT_ALLOWED$1; } // LB24 Do not break between numeric prefix/postfix and letters, or between letters and prefix/postfix. if ((ALPHABETICS.indexOf(current) !== -1 && PREFIX_POSTFIX.indexOf(next) !== -1) || (PREFIX_POSTFIX.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1)) { return BREAK_NOT_ALLOWED$1; } // LB25 Do not break between the following pairs of classes relevant to numbers: if ( // (PR | PO) × ( OP | HY )? NU ([PR, PO].indexOf(current) !== -1 && (next === NU || ([OP, HY].indexOf(next) !== -1 && classTypes[afterIndex + 1] === NU))) || // ( OP | HY ) × NU ([OP, HY].indexOf(current) !== -1 && next === NU) || // NU × (NU | SY | IS) (current === NU && [NU, SY, IS].indexOf(next) !== -1)) { return BREAK_NOT_ALLOWED$1; } // NU (NU | SY | IS)* × (NU | SY | IS | CL | CP) if ([NU, SY, IS, CL, CP].indexOf(next) !== -1) { var prevIndex = currentIndex; while (prevIndex >= 0) { var type = classTypes[prevIndex]; if (type === NU) { return BREAK_NOT_ALLOWED$1; } else if ([SY, IS].indexOf(type) !== -1) { prevIndex--; } else { break; } } } // NU (NU | SY | IS)* (CL | CP)? × (PO | PR)) if ([PR, PO].indexOf(next) !== -1) { var prevIndex = [CL, CP].indexOf(current) !== -1 ? beforeIndex : currentIndex; while (prevIndex >= 0) { var type = classTypes[prevIndex]; if (type === NU) { return BREAK_NOT_ALLOWED$1; } else if ([SY, IS].indexOf(type) !== -1) { prevIndex--; } else { break; } } } // LB26 Do not break a Korean syllable. if ((JL === current && [JL, JV, H2, H3].indexOf(next) !== -1) || ([JV, H2].indexOf(current) !== -1 && [JV, JT].indexOf(next) !== -1) || ([JT, H3].indexOf(current) !== -1 && next === JT)) { return BREAK_NOT_ALLOWED$1; } // LB27 Treat a Korean Syllable Block the same as ID. if ((KOREAN_SYLLABLE_BLOCK.indexOf(current) !== -1 && [IN, PO].indexOf(next) !== -1) || (KOREAN_SYLLABLE_BLOCK.indexOf(next) !== -1 && current === PR)) { return BREAK_NOT_ALLOWED$1; } // LB28 Do not break between alphabetics (“at”). if (ALPHABETICS.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) { return BREAK_NOT_ALLOWED$1; } // LB29 Do not break between numeric punctuation and alphabetics (“e.g.”). if (current === IS && ALPHABETICS.indexOf(next) !== -1) { return BREAK_NOT_ALLOWED$1; } // LB30 Do not break between letters, numbers, or ordinary symbols and opening or closing parentheses. if ((ALPHABETICS.concat(NU).indexOf(current) !== -1 && next === OP && ea_OP.indexOf(codePoints[afterIndex]) === -1) || (ALPHABETICS.concat(NU).indexOf(next) !== -1 && current === CP)) { return BREAK_NOT_ALLOWED$1; } // LB30a Break between two regional indicator symbols if and only if there are an even number of regional // indicators preceding the position of the break. if (current === RI$1 && next === RI$1) { var i = indicies[currentIndex]; var count = 1; while (i > 0) { i--; if (classTypes[i] === RI$1) { count++; } else { break; } } if (count % 2 !== 0) { return BREAK_NOT_ALLOWED$1; } } // LB30b Do not break between an emoji base and an emoji modifier. if (current === EB && next === EM) { return BREAK_NOT_ALLOWED$1; } return BREAK_ALLOWED$1; }; var cssFormattedClasses = function (codePoints, options) { if (!options) { options = { lineBreak: 'normal', wordBreak: 'normal' }; } var _a = codePointsToCharacterClasses(codePoints, options.lineBreak), indicies = _a[0], classTypes = _a[1], isLetterNumber = _a[2]; if (options.wordBreak === 'break-all' || options.wordBreak === 'break-word') { classTypes = classTypes.map(function (type) { return ([NU, AL, SA].indexOf(type) !== -1 ? ID : type); }); } var forbiddenBreakpoints = options.wordBreak === 'keep-all' ? isLetterNumber.map(function (letterNumber, i) { return letterNumber && codePoints[i] >= 0x4e00 && codePoints[i] <= 0x9fff; }) : undefined; return [indicies, classTypes, forbiddenBreakpoints]; }; var Break = /** @class */ (function () { function Break(codePoints, lineBreak, start, end) { this.codePoints = codePoints; this.required = lineBreak === BREAK_MANDATORY; this.start = start; this.end = end; } Break.prototype.slice = function () { return fromCodePoint$1.apply(void 0, this.codePoints.slice(this.start, this.end)); }; return Break; }()); var LineBreaker = function (str, options) { var codePoints = toCodePoints$1(str); var _a = cssFormattedClasses(codePoints, options), indicies = _a[0], classTypes = _a[1], forbiddenBreakpoints = _a[2]; var length = codePoints.length; var lastEnd = 0; var nextIndex = 0; return { next: function () { if (nextIndex >= length) { return { done: true, value: null }; } var lineBreak = BREAK_NOT_ALLOWED$1; while (nextIndex < length && (lineBreak = _lineBreakAtIndex(codePoints, classTypes, indicies, ++nextIndex, forbiddenBreakpoints)) === BREAK_NOT_ALLOWED$1) { } if (lineBreak !== BREAK_NOT_ALLOWED$1 || nextIndex === length) { var value = new Break(codePoints, lineBreak, lastEnd, nextIndex); lastEnd = nextIndex; return { value: value, done: false }; } return { done: true, value: null }; }, }; }; // https://www.w3.org/TR/css-syntax-3 var FLAG_UNRESTRICTED = 1 << 0; var FLAG_ID = 1 << 1; var FLAG_INTEGER = 1 << 2; var FLAG_NUMBER = 1 << 3; var LINE_FEED = 0x000a; var SOLIDUS = 0x002f; var REVERSE_SOLIDUS = 0x005c; var CHARACTER_TABULATION = 0x0009; var SPACE = 0x0020; var QUOTATION_MARK = 0x0022; var EQUALS_SIGN = 0x003d; var NUMBER_SIGN = 0x0023; var DOLLAR_SIGN = 0x0024; var PERCENTAGE_SIGN = 0x0025; var APOSTROPHE = 0x0027; var LEFT_PARENTHESIS = 0x0028; var RIGHT_PARENTHESIS = 0x0029; var LOW_LINE = 0x005f; var HYPHEN_MINUS = 0x002d; var EXCLAMATION_MARK = 0x0021; var LESS_THAN_SIGN = 0x003c; var GREATER_THAN_SIGN = 0x003e; var COMMERCIAL_AT = 0x0040; var LEFT_SQUARE_BRACKET = 0x005b; var RIGHT_SQUARE_BRACKET = 0x005d; var CIRCUMFLEX_ACCENT = 0x003d; var LEFT_CURLY_BRACKET = 0x007b; var QUESTION_MARK = 0x003f; var RIGHT_CURLY_BRACKET = 0x007d; var VERTICAL_LINE = 0x007c; var TILDE = 0x007e; var CONTROL = 0x0080; var REPLACEMENT_CHARACTER = 0xfffd; var ASTERISK = 0x002a; var PLUS_SIGN = 0x002b; var COMMA = 0x002c; var COLON = 0x003a; var SEMICOLON = 0x003b; var FULL_STOP = 0x002e; var NULL = 0x0000; var BACKSPACE = 0x0008; var LINE_TABULATION = 0x000b; var SHIFT_OUT = 0x000e; var INFORMATION_SEPARATOR_ONE = 0x001f; var DELETE = 0x007f; var EOF = -1; var ZERO = 0x0030; var a = 0x0061; var e = 0x0065; var f = 0x0066; var u = 0x0075; var z = 0x007a; var A = 0x0041; var E = 0x0045; var F = 0x0046; var U = 0x0055; var Z = 0x005a; var isDigit = function (codePoint) { return codePoint >= ZERO && codePoint <= 0x0039; }; var isSurrogateCodePoint = function (codePoint) { return codePoint >= 0xd800 && codePoint <= 0xdfff; }; var isHex = function (codePoint) { return isDigit(codePoint) || (codePoint >= A && codePoint <= F) || (codePoint >= a && codePoint <= f); }; var isLowerCaseLetter = function (codePoint) { return codePoint >= a && codePoint <= z; }; var isUpperCaseLetter = function (codePoint) { return codePoint >= A && codePoint <= Z; }; var isLetter = function (codePoint) { return isLowerCaseLetter(codePoint) || isUpperCaseLetter(codePoint); }; var isNonASCIICodePoint = function (codePoint) { return codePoint >= CONTROL; }; var isWhiteSpace = function (codePoint) { return codePoint === LINE_FEED || codePoint === CHARACTER_TABULATION || codePoint === SPACE; }; var isNameStartCodePoint = function (codePoint) { return isLetter(codePoint) || isNonASCIICodePoint(codePoint) || codePoint === LOW_LINE; }; var isNameCodePoint = function (codePoint) { return isNameStartCodePoint(codePoint) || isDigit(codePoint) || codePoint === HYPHEN_MINUS; }; var isNonPrintableCodePoint = function (codePoint) { return ((codePoint >= NULL && codePoint <= BACKSPACE) || codePoint === LINE_TABULATION || (codePoint >= SHIFT_OUT && codePoint <= INFORMATION_SEPARATOR_ONE) || codePoint === DELETE); }; var isValidEscape = function (c1, c2) { if (c1 !== REVERSE_SOLIDUS) { return false; } return c2 !== LINE_FEED; }; var isIdentifierStart = function (c1, c2, c3) { if (c1 === HYPHEN_MINUS) { return isNameStartCodePoint(c2) || isValidEscape(c2, c3); } else if (isNameStartCodePoint(c1)) { return true; } else if (c1 === REVERSE_SOLIDUS && isValidEscape(c1, c2)) { return true; } return false; }; var isNumberStart = function (c1, c2, c3) { if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) { if (isDigit(c2)) { return true; } return c2 === FULL_STOP && isDigit(c3); } if (c1 === FULL_STOP) { return isDigit(c2); } return isDigit(c1); }; var stringToNumber = function (codePoints) { var c = 0; var sign = 1; if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) { if (codePoints[c] === HYPHEN_MINUS) { sign = -1; } c++; } var integers = []; while (isDigit(codePoints[c])) { integers.push(codePoints[c++]); } var int = integers.length ? parseInt(fromCodePoint$1.apply(void 0, integers), 10) : 0; if (codePoints[c] === FULL_STOP) { c++; } var fraction = []; while (isDigit(codePoints[c])) { fraction.push(codePoints[c++]); } var fracd = fraction.length; var frac = fracd ? parseInt(fromCodePoint$1.apply(void 0, fraction), 10) : 0; if (codePoints[c] === E || codePoints[c] === e) { c++; } var expsign = 1; if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) { if (codePoints[c] === HYPHEN_MINUS) { expsign = -1; } c++; } var exponent = []; while (isDigit(codePoints[c])) { exponent.push(codePoints[c++]); } var exp = exponent.length ? parseInt(fromCodePoint$1.apply(void 0, exponent), 10) : 0; return sign * (int + frac * Math.pow(10, -fracd)) * Math.pow(10, expsign * exp); }; var LEFT_PARENTHESIS_TOKEN = { type: 2 /* LEFT_PARENTHESIS_TOKEN */ }; var RIGHT_PARENTHESIS_TOKEN = { type: 3 /* RIGHT_PARENTHESIS_TOKEN */ }; var COMMA_TOKEN = { type: 4 /* COMMA_TOKEN */ }; var SUFFIX_MATCH_TOKEN = { type: 13 /* SUFFIX_MATCH_TOKEN */ }; var PREFIX_MATCH_TOKEN = { type: 8 /* PREFIX_MATCH_TOKEN */ }; var COLUMN_TOKEN = { type: 21 /* COLUMN_TOKEN */ }; var DASH_MATCH_TOKEN = { type: 9 /* DASH_MATCH_TOKEN */ }; var INCLUDE_MATCH_TOKEN = { type: 10 /* INCLUDE_MATCH_TOKEN */ }; var LEFT_CURLY_BRACKET_TOKEN = { type: 11 /* LEFT_CURLY_BRACKET_TOKEN */ }; var RIGHT_CURLY_BRACKET_TOKEN = { type: 12 /* RIGHT_CURLY_BRACKET_TOKEN */ }; var SUBSTRING_MATCH_TOKEN = { type: 14 /* SUBSTRING_MATCH_TOKEN */ }; var BAD_URL_TOKEN = { type: 23 /* BAD_URL_TOKEN */ }; var BAD_STRING_TOKEN = { type: 1 /* BAD_STRING_TOKEN */ }; var CDO_TOKEN = { type: 25 /* CDO_TOKEN */ }; var CDC_TOKEN = { type: 24 /* CDC_TOKEN */ }; var COLON_TOKEN = { type: 26 /* COLON_TOKEN */ }; var SEMICOLON_TOKEN = { type: 27 /* SEMICOLON_TOKEN */ }; var LEFT_SQUARE_BRACKET_TOKEN = { type: 28 /* LEFT_SQUARE_BRACKET_TOKEN */ }; var RIGHT_SQUARE_BRACKET_TOKEN = { type: 29 /* RIGHT_SQUARE_BRACKET_TOKEN */ }; var WHITESPACE_TOKEN = { type: 31 /* WHITESPACE_TOKEN */ }; var EOF_TOKEN = { type: 32 /* EOF_TOKEN */ }; var Tokenizer = /** @class */ (function () { function Tokenizer() { this._value = []; } Tokenizer.prototype.write = function (chunk) { this._value = this._value.concat(toCodePoints$1(chunk)); }; Tokenizer.prototype.read = function () { var tokens = []; var token = this.consumeToken(); while (token !== EOF_TOKEN) { tokens.push(token); token = this.consumeToken(); } return tokens; }; Tokenizer.prototype.consumeToken = function () { var codePoint = this.consumeCodePoint(); switch (codePoint) { case QUOTATION_MARK: return this.consumeStringToken(QUOTATION_MARK); case NUMBER_SIGN: var c1 = this.peekCodePoint(0); var c2 = this.peekCodePoint(1); var c3 = this.peekCodePoint(2); if (isNameCodePoint(c1) || isValidEscape(c2, c3)) { var flags = isIdentifierStart(c1, c2, c3) ? FLAG_ID : FLAG_UNRESTRICTED; var value = this.consumeName(); return { type: 5 /* HASH_TOKEN */, value: value, flags: flags }; } break; case DOLLAR_SIGN: if (this.peekCodePoint(0) === EQUALS_SIGN) { this.consumeCodePoint(); return SUFFIX_MATCH_TOKEN; } break; case APOSTROPHE: return this.consumeStringToken(APOSTROPHE); case LEFT_PARENTHESIS: return LEFT_PARENTHESIS_TOKEN; case RIGHT_PARENTHESIS: return RIGHT_PARENTHESIS_TOKEN; case ASTERISK: if (this.peekCodePoint(0) === EQUALS_SIGN) { this.consumeCodePoint(); return SUBSTRING_MATCH_TOKEN; } break; case PLUS_SIGN: if (isNumberStart(codePoint, this.peekCodePoint(0), this.peekCodePoint(1))) { this.reconsumeCodePoint(codePoint); return this.consumeNumericToken(); } break; case COMMA: return COMMA_TOKEN; case HYPHEN_MINUS: var e1 = codePoint; var e2 = this.peekCodePoint(0); var e3 = this.peekCodePoint(1); if (isNumberStart(e1, e2, e3)) { this.reconsumeCodePoint(codePoint); return this.consumeNumericToken(); } if (isIdentifierStart(e1, e2, e3)) { this.reconsumeCodePoint(codePoint); return this.consumeIdentLikeToken(); } if (e2 === HYPHEN_MINUS && e3 === GREATER_THAN_SIGN) { this.consumeCodePoint(); this.consumeCodePoint(); return CDC_TOKEN; } break; case FULL_STOP: if (isNumberStart(codePoint, this.peekCodePoint(0), this.peekCodePoint(1))) { this.reconsumeCodePoint(codePoint); return this.consumeNumericToken(); } break; case SOLIDUS: if (this.peekCodePoint(0) === ASTERISK) { this.consumeCodePoint(); while (true) { var c = this.consumeCodePoint(); if (c === ASTERISK) { c = this.consumeCodePoint(); if (c === SOLIDUS) { return this.consumeToken(); } } if (c === EOF) { return this.consumeToken(); } } } break; case COLON: return COLON_TOKEN; case SEMICOLON: return SEMICOLON_TOKEN; case LESS_THAN_SIGN: if (this.peekCodePoint(0) === EXCLAMATION_MARK && this.peekCodePoint(1) === HYPHEN_MINUS && this.peekCodePoint(2) === HYPHEN_MINUS) { this.consumeCodePoint(); this.consumeCodePoint(); return CDO_TOKEN; } break; case COMMERCIAL_AT: var a1 = this.peekCodePoint(0); var a2 = this.peekCodePoint(1); var a3 = this.peekCodePoint(2); if (isIdentifierStart(a1, a2, a3)) { var value = this.consumeName(); return { type: 7 /* AT_KEYWORD_TOKEN */, value: value }; } break; case LEFT_SQUARE_BRACKET: return LEFT_SQUARE_BRACKET_TOKEN; case REVERSE_SOLIDUS: if (isValidEscape(codePoint, this.peekCodePoint(0))) { this.reconsumeCodePoint(codePoint); return this.consumeIdentLikeToken(); } break; case RIGHT_SQUARE_BRACKET: return RIGHT_SQUARE_BRACKET_TOKEN; case CIRCUMFLEX_ACCENT: if (this.peekCodePoint(0) === EQUALS_SIGN) { this.consumeCodePoint(); return PREFIX_MATCH_TOKEN; } break; case LEFT_CURLY_BRACKET: return LEFT_CURLY_BRACKET_TOKEN; case RIGHT_CURLY_BRACKET: return RIGHT_CURLY_BRACKET_TOKEN; case u: case U: var u1 = this.peekCodePoint(0); var u2 = this.peekCodePoint(1); if (u1 === PLUS_SIGN && (isHex(u2) || u2 === QUESTION_MARK)) { this.consumeCodePoint(); this.consumeUnicodeRangeToken(); } this.reconsumeCodePoint(codePoint); return this.consumeIdentLikeToken(); case VERTICAL_LINE: if (this.peekCodePoint(0) === EQUALS_SIGN) { this.consumeCodePoint(); return DASH_MATCH_TOKEN; } if (this.peekCodePoint(0) === VERTICAL_LINE) { this.consumeCodePoint(); return COLUMN_TOKEN; } break; case TILDE: if (this.peekCodePoint(0) === EQUALS_SIGN) { this.consumeCodePoint(); return INCLUDE_MATCH_TOKEN; } break; case EOF: return EOF_TOKEN; } if (isWhiteSpace(codePoint)) { this.consumeWhiteSpace(); return WHITESPACE_TOKEN; } if (isDigit(codePoint)) { this.reconsumeCodePoint(codePoint); return this.consumeNumericToken(); } if (isNameStartCodePoint(codePoint)) { this.reconsumeCodePoint(codePoint); return this.consumeIdentLikeToken(); } return { type: 6 /* DELIM_TOKEN */, value: fromCodePoint$1(codePoint) }; }; Tokenizer.prototype.consumeCodePoint = function () { var value = this._value.shift(); return typeof value === 'undefined' ? -1 : value; }; Tokenizer.prototype.reconsumeCodePoint = function (codePoint) { this._value.unshift(codePoint); }; Tokenizer.prototype.peekCodePoint = function (delta) { if (delta >= this._value.length) { return -1; } return this._value[delta]; }; Tokenizer.prototype.consumeUnicodeRangeToken = function () { var digits = []; var codePoint = this.consumeCodePoint(); while (isHex(codePoint) && digits.length < 6) { digits.push(codePoint); codePoint = this.consumeCodePoint(); } var questionMarks = false; while (codePoint === QUESTION_MARK && digits.length < 6) { digits.push(codePoint); codePoint = this.consumeCodePoint(); questionMarks = true; } if (questionMarks) { var start_1 = parseInt(fromCodePoint$1.apply(void 0, digits.map(function (digit) { return (digit === QUESTION_MARK ? ZERO : digit); })), 16); var end = parseInt(fromCodePoint$1.apply(void 0, digits.map(function (digit) { return (digit === QUESTION_MARK ? F : digit); })), 16); return { type: 30 /* UNICODE_RANGE_TOKEN */, start: start_1, end: end }; } var start = parseInt(fromCodePoint$1.apply(void 0, digits), 16); if (this.peekCodePoint(0) === HYPHEN_MINUS && isHex(this.peekCodePoint(1))) { this.consumeCodePoint(); codePoint = this.consumeCodePoint(); var endDigits = []; while (isHex(codePoint) && endDigits.length < 6) { endDigits.push(codePoint); codePoint = this.consumeCodePoint(); } var end = parseInt(fromCodePoint$1.apply(void 0, endDigits), 16); return { type: 30 /* UNICODE_RANGE_TOKEN */, start: start, end: end }; } else { return { type: 30 /* UNICODE_RANGE_TOKEN */, start: start, end: start }; } }; Tokenizer.prototype.consumeIdentLikeToken = function () { var value = this.consumeName(); if (value.toLowerCase() === 'url' && this.peekCodePoint(0) === LEFT_PARENTHESIS) { this.consumeCodePoint(); return this.consumeUrlToken(); } else if (this.peekCodePoint(0) === LEFT_PARENTHESIS) { this.consumeCodePoint(); return { type: 19 /* FUNCTION_TOKEN */, value: value }; } return { type: 20 /* IDENT_TOKEN */, value: value }; }; Tokenizer.prototype.consumeUrlToken = function () { var value = []; this.consumeWhiteSpace(); if (this.peekCodePoint(0) === EOF) { return { type: 22 /* URL_TOKEN */, value: '' }; } var next = this.peekCodePoint(0); if (next === APOSTROPHE || next === QUOTATION_MARK) { var stringToken = this.consumeStringToken(this.consumeCodePoint()); if (stringToken.type === 0 /* STRING_TOKEN */) { this.consumeWhiteSpace(); if (this.peekCodePoint(0) === EOF || this.peekCodePoint(0) === RIGHT_PARENTHESIS) { this.consumeCodePoint(); return { type: 22 /* URL_TOKEN */, value: stringToken.value }; } } this.consumeBadUrlRemnants(); return BAD_URL_TOKEN; } while (true) { var codePoint = this.consumeCodePoint(); if (codePoint === EOF || codePoint === RIGHT_PARENTHESIS) { return { type: 22 /* URL_TOKEN */, value: fromCodePoint$1.apply(void 0, value) }; } else if (isWhiteSpace(codePoint)) { this.consumeWhiteSpace(); if (this.peekCodePoint(0) === EOF || this.peekCodePoint(0) === RIGHT_PARENTHESIS) { this.consumeCodePoint(); return { type: 22 /* URL_TOKEN */, value: fromCodePoint$1.apply(void 0, value) }; } this.consumeBadUrlRemnants(); return BAD_URL_TOKEN; } else if (codePoint === QUOTATION_MARK || codePoint === APOSTROPHE || codePoint === LEFT_PARENTHESIS || isNonPrintableCodePoint(codePoint)) { this.consumeBadUrlRemnants(); return BAD_URL_TOKEN; } else if (codePoint === REVERSE_SOLIDUS) { if (isValidEscape(codePoint, this.peekCodePoint(0))) { value.push(this.consumeEscapedCodePoint()); } else { this.consumeBadUrlRemnants(); return BAD_URL_TOKEN; } } else { value.push(codePoint); } } }; Tokenizer.prototype.consumeWhiteSpace = function () { while (isWhiteSpace(this.peekCodePoint(0))) { this.consumeCodePoint(); } }; Tokenizer.prototype.consumeBadUrlRemnants = function () { while (true) { var codePoint = this.consumeCodePoint(); if (codePoint === RIGHT_PARENTHESIS || codePoint === EOF) { return; } if (isValidEscape(codePoint, this.peekCodePoint(0))) { this.consumeEscapedCodePoint(); } } }; Tokenizer.prototype.consumeStringSlice = function (count) { var SLICE_STACK_SIZE = 50000; var value = ''; while (count > 0) { var amount = Math.min(SLICE_STACK_SIZE, count); value += fromCodePoint$1.apply(void 0, this._value.splice(0, amount)); count -= amount; } this._value.shift(); return value; }; Tokenizer.prototype.consumeStringToken = function (endingCodePoint) { var value = ''; var i = 0; do { var codePoint = this._value[i]; if (codePoint === EOF || codePoint === undefined || codePoint === endingCodePoint) { value += this.consumeStringSlice(i); return { type: 0 /* STRING_TOKEN */, value: value }; } if (codePoint === LINE_FEED) { this._value.splice(0, i); return BAD_STRING_TOKEN; } if (codePoint === REVERSE_SOLIDUS) { var next = this._value[i + 1]; if (next !== EOF && next !== undefined) { if (next === LINE_FEED) { value += this.consumeStringSlice(i); i = -1; this._value.shift(); } else if (isValidEscape(codePoint, next)) { value += this.consumeStringSlice(i); value += fromCodePoint$1(this.consumeEscapedCodePoint()); i = -1; } } } i++; } while (true); }; Tokenizer.prototype.consumeNumber = function () { var repr = []; var type = FLAG_INTEGER; var c1 = this.peekCodePoint(0); if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) { repr.push(this.consumeCodePoint()); } while (isDigit(this.peekCodePoint(0))) { repr.push(this.consumeCodePoint()); } c1 = this.peekCodePoint(0); var c2 = this.peekCodePoint(1); if (c1 === FULL_STOP && isDigit(c2)) { repr.push(this.consumeCodePoint(), this.consumeCodePoint()); type = FLAG_NUMBER; while (isDigit(this.peekCodePoint(0))) { repr.push(this.consumeCodePoint()); } } c1 = this.peekCodePoint(0); c2 = this.peekCodePoint(1); var c3 = this.peekCodePoint(2); if ((c1 === E || c1 === e) && (((c2 === PLUS_SIGN || c2 === HYPHEN_MINUS) && isDigit(c3)) || isDigit(c2))) { repr.push(this.consumeCodePoint(), this.consumeCodePoint()); type = FLAG_NUMBER; while (isDigit(this.peekCodePoint(0))) { repr.push(this.consumeCodePoint()); } } return [stringToNumber(repr), type]; }; Tokenizer.prototype.consumeNumericToken = function () { var _a = this.consumeNumber(), number = _a[0], flags = _a[1]; var c1 = this.peekCodePoint(0); var c2 = this.peekCodePoint(1); var c3 = this.peekCodePoint(2); if (isIdentifierStart(c1, c2, c3)) { var unit = this.consumeName(); return { type: 15 /* DIMENSION_TOKEN */, number: number, flags: flags, unit: unit }; } if (c1 === PERCENTAGE_SIGN) { this.consumeCodePoint(); return { type: 16 /* PERCENTAGE_TOKEN */, number: number, flags: flags }; } return { type: 17 /* NUMBER_TOKEN */, number: number, flags: flags }; }; Tokenizer.prototype.consumeEscapedCodePoint = function () { var codePoint = this.consumeCodePoint(); if (isHex(codePoint)) { var hex = fromCodePoint$1(codePoint); while (isHex(this.peekCodePoint(0)) && hex.length < 6) { hex += fromCodePoint$1(this.consumeCodePoint()); } if (isWhiteSpace(this.peekCodePoint(0))) { this.consumeCodePoint(); } var hexCodePoint = parseInt(hex, 16); if (hexCodePoint === 0 || isSurrogateCodePoint(hexCodePoint) || hexCodePoint > 0x10ffff) { return REPLACEMENT_CHARACTER; } return hexCodePoint; } if (codePoint === EOF) { return REPLACEMENT_CHARACTER; } return codePoint; }; Tokenizer.prototype.consumeName = function () { var result = ''; while (true) { var codePoint = this.consumeCodePoint(); if (isNameCodePoint(codePoint)) { result += fromCodePoint$1(codePoint); } else if (isValidEscape(codePoint, this.peekCodePoint(0))) { result += fromCodePoint$1(this.consumeEscapedCodePoint()); } else { this.reconsumeCodePoint(codePoint); return result; } } }; return Tokenizer; }()); var Parser = /** @class */ (function () { function Parser(tokens) { this._tokens = tokens; } Parser.create = function (value) { var tokenizer = new Tokenizer(); tokenizer.write(value); return new Parser(tokenizer.read()); }; Parser.parseValue = function (value) { return Parser.create(value).parseComponentValue(); }; Parser.parseValues = function (value) { return Parser.create(value).parseComponentValues(); }; Parser.prototype.parseComponentValue = function () { var token = this.consumeToken(); while (token.type === 31 /* WHITESPACE_TOKEN */) { token = this.consumeToken(); } if (token.type === 32 /* EOF_TOKEN */) { throw new SyntaxError("Error parsing CSS component value, unexpected EOF"); } this.reconsumeToken(token); var value = this.consumeComponentValue(); do { token = this.consumeToken(); } while (token.type === 31 /* WHITESPACE_TOKEN */); if (token.type === 32 /* EOF_TOKEN */) { return value; } throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one"); }; Parser.prototype.parseComponentValues = function () { var values = []; while (true) { var value = this.consumeComponentValue(); if (value.type === 32 /* EOF_TOKEN */) { return values; } values.push(value); values.push(); } }; Parser.prototype.consumeComponentValue = function () { var token = this.consumeToken(); switch (token.type) { case 11 /* LEFT_CURLY_BRACKET_TOKEN */: case 28 /* LEFT_SQUARE_BRACKET_TOKEN */: case 2 /* LEFT_PARENTHESIS_TOKEN */: return this.consumeSimpleBlock(token.type); case 19 /* FUNCTION_TOKEN */: return this.consumeFunction(token); } return token; }; Parser.prototype.consumeSimpleBlock = function (type) { var block = { type: type, values: [] }; var token = this.consumeToken(); while (true) { if (token.type === 32 /* EOF_TOKEN */ || isEndingTokenFor(token, type)) { return block; } this.reconsumeToken(token); block.values.push(this.consumeComponentValue()); token = this.consumeToken(); } }; Parser.prototype.consumeFunction = function (functionToken) { var cssFunction = { name: functionToken.value, values: [], type: 18 /* FUNCTION */ }; while (true) { var token = this.consumeToken(); if (token.type === 32 /* EOF_TOKEN */ || token.type === 3 /* RIGHT_PARENTHESIS_TOKEN */) { return cssFunction; } this.reconsumeToken(token); cssFunction.values.push(this.consumeComponentValue()); } }; Parser.prototype.consumeToken = function () { var token = this._tokens.shift(); return typeof token === 'undefined' ? EOF_TOKEN : token; }; Parser.prototype.reconsumeToken = function (token) { this._tokens.unshift(token); }; return Parser; }()); var isDimensionToken = function (token) { return token.type === 15 /* DIMENSION_TOKEN */; }; var isNumberToken = function (token) { return token.type === 17 /* NUMBER_TOKEN */; }; var isIdentToken = function (token) { return token.type === 20 /* IDENT_TOKEN */; }; var isStringToken = function (token) { return token.type === 0 /* STRING_TOKEN */; }; var isIdentWithValue = function (token, value) { return isIdentToken(token) && token.value === value; }; var nonWhiteSpace = function (token) { return token.type !== 31 /* WHITESPACE_TOKEN */; }; var nonFunctionArgSeparator = function (token) { return token.type !== 31 /* WHITESPACE_TOKEN */ && token.type !== 4 /* COMMA_TOKEN */; }; var parseFunctionArgs = function (tokens) { var args = []; var arg = []; tokens.forEach(function (token) { if (token.type === 4 /* COMMA_TOKEN */) { if (arg.length === 0) { throw new Error("Error parsing function args, zero tokens for arg"); } args.push(arg); arg = []; return; } if (token.type !== 31 /* WHITESPACE_TOKEN */) { arg.push(token); } }); if (arg.length) { args.push(arg); } return args; }; var isEndingTokenFor = function (token, type) { if (type === 11 /* LEFT_CURLY_BRACKET_TOKEN */ && token.type === 12 /* RIGHT_CURLY_BRACKET_TOKEN */) { return true; } if (type === 28 /* LEFT_SQUARE_BRACKET_TOKEN */ && token.type === 29 /* RIGHT_SQUARE_BRACKET_TOKEN */) { return true; } return type === 2 /* LEFT_PARENTHESIS_TOKEN */ && token.type === 3 /* RIGHT_PARENTHESIS_TOKEN */; }; var isLength = function (token) { return token.type === 17 /* NUMBER_TOKEN */ || token.type === 15 /* DIMENSION_TOKEN */; }; var isLengthPercentage = function (token) { return token.type === 16 /* PERCENTAGE_TOKEN */ || isLength(token); }; var parseLengthPercentageTuple = function (tokens) { return tokens.length > 1 ? [tokens[0], tokens[1]] : [tokens[0]]; }; var ZERO_LENGTH = { type: 17 /* NUMBER_TOKEN */, number: 0, flags: FLAG_INTEGER }; var FIFTY_PERCENT = { type: 16 /* PERCENTAGE_TOKEN */, number: 50, flags: FLAG_INTEGER }; var HUNDRED_PERCENT = { type: 16 /* PERCENTAGE_TOKEN */, number: 100, flags: FLAG_INTEGER }; var getAbsoluteValueForTuple = function (tuple, width, height) { var x = tuple[0], y = tuple[1]; return [getAbsoluteValue(x, width), getAbsoluteValue(typeof y !== 'undefined' ? y : x, height)]; }; var getAbsoluteValue = function (token, parent) { if (token.type === 16 /* PERCENTAGE_TOKEN */) { return (token.number / 100) * parent; } if (isDimensionToken(token)) { switch (token.unit) { case 'rem': case 'em': return 16 * token.number; // TODO use correct font-size case 'px': default: return token.number; } } return token.number; }; var DEG = 'deg'; var GRAD = 'grad'; var RAD = 'rad'; var TURN = 'turn'; var angle = { name: 'angle', parse: function (_context, value) { if (value.type === 15 /* DIMENSION_TOKEN */) { switch (value.unit) { case DEG: return (Math.PI * value.number) / 180; case GRAD: return (Math.PI / 200) * value.number; case RAD: return value.number; case TURN: return Math.PI * 2 * value.number; } } throw new Error("Unsupported angle type"); } }; var isAngle = function (value) { if (value.type === 15 /* DIMENSION_TOKEN */) { if (value.unit === DEG || value.unit === GRAD || value.unit === RAD || value.unit === TURN) { return true; } } return false; }; var parseNamedSide = function (tokens) { var sideOrCorner = tokens .filter(isIdentToken) .map(function (ident) { return ident.value; }) .join(' '); switch (sideOrCorner) { case 'to bottom right': case 'to right bottom': case 'left top': case 'top left': return [ZERO_LENGTH, ZERO_LENGTH]; case 'to top': case 'bottom': return deg(0); case 'to bottom left': case 'to left bottom': case 'right top': case 'top right': return [ZERO_LENGTH, HUNDRED_PERCENT]; case 'to right': case 'left': return deg(90); case 'to top left': case 'to left top': case 'right bottom': case 'bottom right': return [HUNDRED_PERCENT, HUNDRED_PERCENT]; case 'to bottom': case 'top': return deg(180); case 'to top right': case 'to right top': case 'left bottom': case 'bottom left': return [HUNDRED_PERCENT, ZERO_LENGTH]; case 'to left': case 'right': return deg(270); } return 0; }; var deg = function (deg) { return (Math.PI * deg) / 180; }; var color$1 = { name: 'color', parse: function (context, value) { if (value.type === 18 /* FUNCTION */) { var colorFunction = SUPPORTED_COLOR_FUNCTIONS[value.name]; if (typeof colorFunction === 'undefined') { throw new Error("Attempting to parse an unsupported color function \"" + value.name + "\""); } return colorFunction(context, value.values); } if (value.type === 5 /* HASH_TOKEN */) { if (value.value.length === 3) { var r = value.value.substring(0, 1); var g = value.value.substring(1, 2); var b = value.value.substring(2, 3); return pack(parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), 1); } if (value.value.length === 4) { var r = value.value.substring(0, 1); var g = value.value.substring(1, 2); var b = value.value.substring(2, 3); var a = value.value.substring(3, 4); return pack(parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), parseInt(a + a, 16) / 255); } if (value.value.length === 6) { var r = value.value.substring(0, 2); var g = value.value.substring(2, 4); var b = value.value.substring(4, 6); return pack(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), 1); } if (value.value.length === 8) { var r = value.value.substring(0, 2); var g = value.value.substring(2, 4); var b = value.value.substring(4, 6); var a = value.value.substring(6, 8); return pack(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), parseInt(a, 16) / 255); } } if (value.type === 20 /* IDENT_TOKEN */) { var namedColor = COLORS[value.value.toUpperCase()]; if (typeof namedColor !== 'undefined') { return namedColor; } } return COLORS.TRANSPARENT; } }; var isTransparent = function (color) { return (0xff & color) === 0; }; var asString = function (color) { var alpha = 0xff & color; var blue = 0xff & (color >> 8); var green = 0xff & (color >> 16); var red = 0xff & (color >> 24); return alpha < 255 ? "rgba(" + red + "," + green + "," + blue + "," + alpha / 255 + ")" : "rgb(" + red + "," + green + "," + blue + ")"; }; var pack = function (r, g, b, a) { return ((r << 24) | (g << 16) | (b << 8) | (Math.round(a * 255) << 0)) >>> 0; }; var getTokenColorValue = function (token, i) { if (token.type === 17 /* NUMBER_TOKEN */) { return token.number; } if (token.type === 16 /* PERCENTAGE_TOKEN */) { var max = i === 3 ? 1 : 255; return i === 3 ? (token.number / 100) * max : Math.round((token.number / 100) * max); } return 0; }; var rgb = function (_context, args) { var tokens = args.filter(nonFunctionArgSeparator); if (tokens.length === 3) { var _a = tokens.map(getTokenColorValue), r = _a[0], g = _a[1], b = _a[2]; return pack(r, g, b, 1); } if (tokens.length === 4) { var _b = tokens.map(getTokenColorValue), r = _b[0], g = _b[1], b = _b[2], a = _b[3]; return pack(r, g, b, a); } return 0; }; function hue2rgb(t1, t2, hue) { if (hue < 0) { hue += 1; } if (hue >= 1) { hue -= 1; } if (hue < 1 / 6) { return (t2 - t1) * hue * 6 + t1; } else if (hue < 1 / 2) { return t2; } else if (hue < 2 / 3) { return (t2 - t1) * 6 * (2 / 3 - hue) + t1; } else { return t1; } } var hsl = function (context, args) { var tokens = args.filter(nonFunctionArgSeparator); var hue = tokens[0], saturation = tokens[1], lightness = tokens[2], alpha = tokens[3]; var h = (hue.type === 17 /* NUMBER_TOKEN */ ? deg(hue.number) : angle.parse(context, hue)) / (Math.PI * 2); var s = isLengthPercentage(saturation) ? saturation.number / 100 : 0; var l = isLengthPercentage(lightness) ? lightness.number / 100 : 0; var a = typeof alpha !== 'undefined' && isLengthPercentage(alpha) ? getAbsoluteValue(alpha, 1) : 1; if (s === 0) { return pack(l * 255, l * 255, l * 255, 1); } var t2 = l <= 0.5 ? l * (s + 1) : l + s - l * s; var t1 = l * 2 - t2; var r = hue2rgb(t1, t2, h + 1 / 3); var g = hue2rgb(t1, t2, h); var b = hue2rgb(t1, t2, h - 1 / 3); return pack(r * 255, g * 255, b * 255, a); }; var SUPPORTED_COLOR_FUNCTIONS = { hsl: hsl, hsla: hsl, rgb: rgb, rgba: rgb }; var parseColor = function (context, value) { return color$1.parse(context, Parser.create(value).parseComponentValue()); }; var COLORS = { ALICEBLUE: 0xf0f8ffff, ANTIQUEWHITE: 0xfaebd7ff, AQUA: 0x00ffffff, AQUAMARINE: 0x7fffd4ff, AZURE: 0xf0ffffff, BEIGE: 0xf5f5dcff, BISQUE: 0xffe4c4ff, BLACK: 0x000000ff, BLANCHEDALMOND: 0xffebcdff, BLUE: 0x0000ffff, BLUEVIOLET: 0x8a2be2ff, BROWN: 0xa52a2aff, BURLYWOOD: 0xdeb887ff, CADETBLUE: 0x5f9ea0ff, CHARTREUSE: 0x7fff00ff, CHOCOLATE: 0xd2691eff, CORAL: 0xff7f50ff, CORNFLOWERBLUE: 0x6495edff, CORNSILK: 0xfff8dcff, CRIMSON: 0xdc143cff, CYAN: 0x00ffffff, DARKBLUE: 0x00008bff, DARKCYAN: 0x008b8bff, DARKGOLDENROD: 0xb886bbff, DARKGRAY: 0xa9a9a9ff, DARKGREEN: 0x006400ff, DARKGREY: 0xa9a9a9ff, DARKKHAKI: 0xbdb76bff, DARKMAGENTA: 0x8b008bff, DARKOLIVEGREEN: 0x556b2fff, DARKORANGE: 0xff8c00ff, DARKORCHID: 0x9932ccff, DARKRED: 0x8b0000ff, DARKSALMON: 0xe9967aff, DARKSEAGREEN: 0x8fbc8fff, DARKSLATEBLUE: 0x483d8bff, DARKSLATEGRAY: 0x2f4f4fff, DARKSLATEGREY: 0x2f4f4fff, DARKTURQUOISE: 0x00ced1ff, DARKVIOLET: 0x9400d3ff, DEEPPINK: 0xff1493ff, DEEPSKYBLUE: 0x00bfffff, DIMGRAY: 0x696969ff, DIMGREY: 0x696969ff, DODGERBLUE: 0x1e90ffff, FIREBRICK: 0xb22222ff, FLORALWHITE: 0xfffaf0ff, FORESTGREEN: 0x228b22ff, FUCHSIA: 0xff00ffff, GAINSBORO: 0xdcdcdcff, GHOSTWHITE: 0xf8f8ffff, GOLD: 0xffd700ff, GOLDENROD: 0xdaa520ff, GRAY: 0x808080ff, GREEN: 0x008000ff, GREENYELLOW: 0xadff2fff, GREY: 0x808080ff, HONEYDEW: 0xf0fff0ff, HOTPINK: 0xff69b4ff, INDIANRED: 0xcd5c5cff, INDIGO: 0x4b0082ff, IVORY: 0xfffff0ff, KHAKI: 0xf0e68cff, LAVENDER: 0xe6e6faff, LAVENDERBLUSH: 0xfff0f5ff, LAWNGREEN: 0x7cfc00ff, LEMONCHIFFON: 0xfffacdff, LIGHTBLUE: 0xadd8e6ff, LIGHTCORAL: 0xf08080ff, LIGHTCYAN: 0xe0ffffff, LIGHTGOLDENRODYELLOW: 0xfafad2ff, LIGHTGRAY: 0xd3d3d3ff, LIGHTGREEN: 0x90ee90ff, LIGHTGREY: 0xd3d3d3ff, LIGHTPINK: 0xffb6c1ff, LIGHTSALMON: 0xffa07aff, LIGHTSEAGREEN: 0x20b2aaff, LIGHTSKYBLUE: 0x87cefaff, LIGHTSLATEGRAY: 0x778899ff, LIGHTSLATEGREY: 0x778899ff, LIGHTSTEELBLUE: 0xb0c4deff, LIGHTYELLOW: 0xffffe0ff, LIME: 0x00ff00ff, LIMEGREEN: 0x32cd32ff, LINEN: 0xfaf0e6ff, MAGENTA: 0xff00ffff, MAROON: 0x800000ff, MEDIUMAQUAMARINE: 0x66cdaaff, MEDIUMBLUE: 0x0000cdff, MEDIUMORCHID: 0xba55d3ff, MEDIUMPURPLE: 0x9370dbff, MEDIUMSEAGREEN: 0x3cb371ff, MEDIUMSLATEBLUE: 0x7b68eeff, MEDIUMSPRINGGREEN: 0x00fa9aff, MEDIUMTURQUOISE: 0x48d1ccff, MEDIUMVIOLETRED: 0xc71585ff, MIDNIGHTBLUE: 0x191970ff, MINTCREAM: 0xf5fffaff, MISTYROSE: 0xffe4e1ff, MOCCASIN: 0xffe4b5ff, NAVAJOWHITE: 0xffdeadff, NAVY: 0x000080ff, OLDLACE: 0xfdf5e6ff, OLIVE: 0x808000ff, OLIVEDRAB: 0x6b8e23ff, ORANGE: 0xffa500ff, ORANGERED: 0xff4500ff, ORCHID: 0xda70d6ff, PALEGOLDENROD: 0xeee8aaff, PALEGREEN: 0x98fb98ff, PALETURQUOISE: 0xafeeeeff, PALEVIOLETRED: 0xdb7093ff, PAPAYAWHIP: 0xffefd5ff, PEACHPUFF: 0xffdab9ff, PERU: 0xcd853fff, PINK: 0xffc0cbff, PLUM: 0xdda0ddff, POWDERBLUE: 0xb0e0e6ff, PURPLE: 0x800080ff, REBECCAPURPLE: 0x663399ff, RED: 0xff0000ff, ROSYBROWN: 0xbc8f8fff, ROYALBLUE: 0x4169e1ff, SADDLEBROWN: 0x8b4513ff, SALMON: 0xfa8072ff, SANDYBROWN: 0xf4a460ff, SEAGREEN: 0x2e8b57ff, SEASHELL: 0xfff5eeff, SIENNA: 0xa0522dff, SILVER: 0xc0c0c0ff, SKYBLUE: 0x87ceebff, SLATEBLUE: 0x6a5acdff, SLATEGRAY: 0x708090ff, SLATEGREY: 0x708090ff, SNOW: 0xfffafaff, SPRINGGREEN: 0x00ff7fff, STEELBLUE: 0x4682b4ff, TAN: 0xd2b48cff, TEAL: 0x008080ff, THISTLE: 0xd8bfd8ff, TOMATO: 0xff6347ff, TRANSPARENT: 0x00000000, TURQUOISE: 0x40e0d0ff, VIOLET: 0xee82eeff, WHEAT: 0xf5deb3ff, WHITE: 0xffffffff, WHITESMOKE: 0xf5f5f5ff, YELLOW: 0xffff00ff, YELLOWGREEN: 0x9acd32ff }; var backgroundClip = { name: 'background-clip', initialValue: 'border-box', prefix: false, type: 1 /* LIST */, parse: function (_context, tokens) { return tokens.map(function (token) { if (isIdentToken(token)) { switch (token.value) { case 'padding-box': return 1 /* PADDING_BOX */; case 'content-box': return 2 /* CONTENT_BOX */; } } return 0 /* BORDER_BOX */; }); } }; var backgroundColor = { name: "background-color", initialValue: 'transparent', prefix: false, type: 3 /* TYPE_VALUE */, format: 'color' }; var parseColorStop = function (context, args) { var color = color$1.parse(context, args[0]); var stop = args[1]; return stop && isLengthPercentage(stop) ? { color: color, stop: stop } : { color: color, stop: null }; }; var processColorStops = function (stops, lineLength) { var first = stops[0]; var last = stops[stops.length - 1]; if (first.stop === null) { first.stop = ZERO_LENGTH; } if (last.stop === null) { last.stop = HUNDRED_PERCENT; } var processStops = []; var previous = 0; for (var i = 0; i < stops.length; i++) { var stop_1 = stops[i].stop; if (stop_1 !== null) { var absoluteValue = getAbsoluteValue(stop_1, lineLength); if (absoluteValue > previous) { processStops.push(absoluteValue); } else { processStops.push(previous); } previous = absoluteValue; } else { processStops.push(null); } } var gapBegin = null; for (var i = 0; i < processStops.length; i++) { var stop_2 = processStops[i]; if (stop_2 === null) { if (gapBegin === null) { gapBegin = i; } } else if (gapBegin !== null) { var gapLength = i - gapBegin; var beforeGap = processStops[gapBegin - 1]; var gapValue = (stop_2 - beforeGap) / (gapLength + 1); for (var g = 1; g <= gapLength; g++) { processStops[gapBegin + g - 1] = gapValue * g; } gapBegin = null; } } return stops.map(function (_a, i) { var color = _a.color; return { color: color, stop: Math.max(Math.min(1, processStops[i] / lineLength), 0) }; }); }; var getAngleFromCorner = function (corner, width, height) { var centerX = width / 2; var centerY = height / 2; var x = getAbsoluteValue(corner[0], width) - centerX; var y = centerY - getAbsoluteValue(corner[1], height); return (Math.atan2(y, x) + Math.PI * 2) % (Math.PI * 2); }; var calculateGradientDirection = function (angle, width, height) { var radian = typeof angle === 'number' ? angle : getAngleFromCorner(angle, width, height); var lineLength = Math.abs(width * Math.sin(radian)) + Math.abs(height * Math.cos(radian)); var halfWidth = width / 2; var halfHeight = height / 2; var halfLineLength = lineLength / 2; var yDiff = Math.sin(radian - Math.PI / 2) * halfLineLength; var xDiff = Math.cos(radian - Math.PI / 2) * halfLineLength; return [lineLength, halfWidth - xDiff, halfWidth + xDiff, halfHeight - yDiff, halfHeight + yDiff]; }; var distance = function (a, b) { return Math.sqrt(a * a + b * b); }; var findCorner = function (width, height, x, y, closest) { var corners = [ [0, 0], [0, height], [width, 0], [width, height] ]; return corners.reduce(function (stat, corner) { var cx = corner[0], cy = corner[1]; var d = distance(x - cx, y - cy); if (closest ? d < stat.optimumDistance : d > stat.optimumDistance) { return { optimumCorner: corner, optimumDistance: d }; } return stat; }, { optimumDistance: closest ? Infinity : -Infinity, optimumCorner: null }).optimumCorner; }; var calculateRadius = function (gradient, x, y, width, height) { var rx = 0; var ry = 0; switch (gradient.size) { case 0 /* CLOSEST_SIDE */: // The ending shape is sized so that that it exactly meets the side of the gradient box closest to the gradient’s center. // If the shape is an ellipse, it exactly meets the closest side in each dimension. if (gradient.shape === 0 /* CIRCLE */) { rx = ry = Math.min(Math.abs(x), Math.abs(x - width), Math.abs(y), Math.abs(y - height)); } else if (gradient.shape === 1 /* ELLIPSE */) { rx = Math.min(Math.abs(x), Math.abs(x - width)); ry = Math.min(Math.abs(y), Math.abs(y - height)); } break; case 2 /* CLOSEST_CORNER */: // The ending shape is sized so that that it passes through the corner of the gradient box closest to the gradient’s center. // If the shape is an ellipse, the ending shape is given the same aspect-ratio it would have if closest-side were specified. if (gradient.shape === 0 /* CIRCLE */) { rx = ry = Math.min(distance(x, y), distance(x, y - height), distance(x - width, y), distance(x - width, y - height)); } else if (gradient.shape === 1 /* ELLIPSE */) { // Compute the ratio ry/rx (which is to be the same as for "closest-side") var c = Math.min(Math.abs(y), Math.abs(y - height)) / Math.min(Math.abs(x), Math.abs(x - width)); var _a = findCorner(width, height, x, y, true), cx = _a[0], cy = _a[1]; rx = distance(cx - x, (cy - y) / c); ry = c * rx; } break; case 1 /* FARTHEST_SIDE */: // Same as closest-side, except the ending shape is sized based on the farthest side(s) if (gradient.shape === 0 /* CIRCLE */) { rx = ry = Math.max(Math.abs(x), Math.abs(x - width), Math.abs(y), Math.abs(y - height)); } else if (gradient.shape === 1 /* ELLIPSE */) { rx = Math.max(Math.abs(x), Math.abs(x - width)); ry = Math.max(Math.abs(y), Math.abs(y - height)); } break; case 3 /* FARTHEST_CORNER */: // Same as closest-corner, except the ending shape is sized based on the farthest corner. // If the shape is an ellipse, the ending shape is given the same aspect ratio it would have if farthest-side were specified. if (gradient.shape === 0 /* CIRCLE */) { rx = ry = Math.max(distance(x, y), distance(x, y - height), distance(x - width, y), distance(x - width, y - height)); } else if (gradient.shape === 1 /* ELLIPSE */) { // Compute the ratio ry/rx (which is to be the same as for "farthest-side") var c = Math.max(Math.abs(y), Math.abs(y - height)) / Math.max(Math.abs(x), Math.abs(x - width)); var _b = findCorner(width, height, x, y, false), cx = _b[0], cy = _b[1]; rx = distance(cx - x, (cy - y) / c); ry = c * rx; } break; } if (Array.isArray(gradient.size)) { rx = getAbsoluteValue(gradient.size[0], width); ry = gradient.size.length === 2 ? getAbsoluteValue(gradient.size[1], height) : rx; } return [rx, ry]; }; var linearGradient = function (context, tokens) { var angle$1 = deg(180); var stops = []; parseFunctionArgs(tokens).forEach(function (arg, i) { if (i === 0) { var firstToken = arg[0]; if (firstToken.type === 20 /* IDENT_TOKEN */ && firstToken.value === 'to') { angle$1 = parseNamedSide(arg); return; } else if (isAngle(firstToken)) { angle$1 = angle.parse(context, firstToken); return; } } var colorStop = parseColorStop(context, arg); stops.push(colorStop); }); return { angle: angle$1, stops: stops, type: 1 /* LINEAR_GRADIENT */ }; }; var prefixLinearGradient = function (context, tokens) { var angle$1 = deg(180); var stops = []; parseFunctionArgs(tokens).forEach(function (arg, i) { if (i === 0) { var firstToken = arg[0]; if (firstToken.type === 20 /* IDENT_TOKEN */ && ['top', 'left', 'right', 'bottom'].indexOf(firstToken.value) !== -1) { angle$1 = parseNamedSide(arg); return; } else if (isAngle(firstToken)) { angle$1 = (angle.parse(context, firstToken) + deg(270)) % deg(360); return; } } var colorStop = parseColorStop(context, arg); stops.push(colorStop); }); return { angle: angle$1, stops: stops, type: 1 /* LINEAR_GRADIENT */ }; }; var webkitGradient = function (context, tokens) { var angle = deg(180); var stops = []; var type = 1 /* LINEAR_GRADIENT */; var shape = 0 /* CIRCLE */; var size = 3 /* FARTHEST_CORNER */; var position = []; parseFunctionArgs(tokens).forEach(function (arg, i) { var firstToken = arg[0]; if (i === 0) { if (isIdentToken(firstToken) && firstToken.value === 'linear') { type = 1 /* LINEAR_GRADIENT */; return; } else if (isIdentToken(firstToken) && firstToken.value === 'radial') { type = 2 /* RADIAL_GRADIENT */; return; } } if (firstToken.type === 18 /* FUNCTION */) { if (firstToken.name === 'from') { var color = color$1.parse(context, firstToken.values[0]); stops.push({ stop: ZERO_LENGTH, color: color }); } else if (firstToken.name === 'to') { var color = color$1.parse(context, firstToken.values[0]); stops.push({ stop: HUNDRED_PERCENT, color: color }); } else if (firstToken.name === 'color-stop') { var values = firstToken.values.filter(nonFunctionArgSeparator); if (values.length === 2) { var color = color$1.parse(context, values[1]); var stop_1 = values[0]; if (isNumberToken(stop_1)) { stops.push({ stop: { type: 16 /* PERCENTAGE_TOKEN */, number: stop_1.number * 100, flags: stop_1.flags }, color: color }); } } } } }); return type === 1 /* LINEAR_GRADIENT */ ? { angle: (angle + deg(180)) % deg(360), stops: stops, type: type } : { size: size, shape: shape, stops: stops, position: position, type: type }; }; var CLOSEST_SIDE = 'closest-side'; var FARTHEST_SIDE = 'farthest-side'; var CLOSEST_CORNER = 'closest-corner'; var FARTHEST_CORNER = 'farthest-corner'; var CIRCLE = 'circle'; var ELLIPSE = 'ellipse'; var COVER = 'cover'; var CONTAIN = 'contain'; var radialGradient = function (context, tokens) { var shape = 0 /* CIRCLE */; var size = 3 /* FARTHEST_CORNER */; var stops = []; var position = []; parseFunctionArgs(tokens).forEach(function (arg, i) { var isColorStop = true; if (i === 0) { var isAtPosition_1 = false; isColorStop = arg.reduce(function (acc, token) { if (isAtPosition_1) { if (isIdentToken(token)) { switch (token.value) { case 'center': position.push(FIFTY_PERCENT); return acc; case 'top': case 'left': position.push(ZERO_LENGTH); return acc; case 'right': case 'bottom': position.push(HUNDRED_PERCENT); return acc; } } else if (isLengthPercentage(token) || isLength(token)) { position.push(token); } } else if (isIdentToken(token)) { switch (token.value) { case CIRCLE: shape = 0 /* CIRCLE */; return false; case ELLIPSE: shape = 1 /* ELLIPSE */; return false; case 'at': isAtPosition_1 = true; return false; case CLOSEST_SIDE: size = 0 /* CLOSEST_SIDE */; return false; case COVER: case FARTHEST_SIDE: size = 1 /* FARTHEST_SIDE */; return false; case CONTAIN: case CLOSEST_CORNER: size = 2 /* CLOSEST_CORNER */; return false; case FARTHEST_CORNER: size = 3 /* FARTHEST_CORNER */; return false; } } else if (isLength(token) || isLengthPercentage(token)) { if (!Array.isArray(size)) { size = []; } size.push(token); return false; } return acc; }, isColorStop); } if (isColorStop) { var colorStop = parseColorStop(context, arg); stops.push(colorStop); } }); return { size: size, shape: shape, stops: stops, position: position, type: 2 /* RADIAL_GRADIENT */ }; }; var prefixRadialGradient = function (context, tokens) { var shape = 0 /* CIRCLE */; var size = 3 /* FARTHEST_CORNER */; var stops = []; var position = []; parseFunctionArgs(tokens).forEach(function (arg, i) { var isColorStop = true; if (i === 0) { isColorStop = arg.reduce(function (acc, token) { if (isIdentToken(token)) { switch (token.value) { case 'center': position.push(FIFTY_PERCENT); return false; case 'top': case 'left': position.push(ZERO_LENGTH); return false; case 'right': case 'bottom': position.push(HUNDRED_PERCENT); return false; } } else if (isLengthPercentage(token) || isLength(token)) { position.push(token); return false; } return acc; }, isColorStop); } else if (i === 1) { isColorStop = arg.reduce(function (acc, token) { if (isIdentToken(token)) { switch (token.value) { case CIRCLE: shape = 0 /* CIRCLE */; return false; case ELLIPSE: shape = 1 /* ELLIPSE */; return false; case CONTAIN: case CLOSEST_SIDE: size = 0 /* CLOSEST_SIDE */; return false; case FARTHEST_SIDE: size = 1 /* FARTHEST_SIDE */; return false; case CLOSEST_CORNER: size = 2 /* CLOSEST_CORNER */; return false; case COVER: case FARTHEST_CORNER: size = 3 /* FARTHEST_CORNER */; return false; } } else if (isLength(token) || isLengthPercentage(token)) { if (!Array.isArray(size)) { size = []; } size.push(token); return false; } return acc; }, isColorStop); } if (isColorStop) { var colorStop = parseColorStop(context, arg); stops.push(colorStop); } }); return { size: size, shape: shape, stops: stops, position: position, type: 2 /* RADIAL_GRADIENT */ }; }; var isLinearGradient = function (background) { return background.type === 1 /* LINEAR_GRADIENT */; }; var isRadialGradient = function (background) { return background.type === 2 /* RADIAL_GRADIENT */; }; var image = { name: 'image', parse: function (context, value) { if (value.type === 22 /* URL_TOKEN */) { var image_1 = { url: value.value, type: 0 /* URL */ }; context.cache.addImage(value.value); return image_1; } if (value.type === 18 /* FUNCTION */) { var imageFunction = SUPPORTED_IMAGE_FUNCTIONS[value.name]; if (typeof imageFunction === 'undefined') { throw new Error("Attempting to parse an unsupported image function \"" + value.name + "\""); } return imageFunction(context, value.values); } throw new Error("Unsupported image type " + value.type); } }; function isSupportedImage(value) { return (!(value.type === 20 /* IDENT_TOKEN */ && value.value === 'none') && (value.type !== 18 /* FUNCTION */ || !!SUPPORTED_IMAGE_FUNCTIONS[value.name])); } var SUPPORTED_IMAGE_FUNCTIONS = { 'linear-gradient': linearGradient, '-moz-linear-gradient': prefixLinearGradient, '-ms-linear-gradient': prefixLinearGradient, '-o-linear-gradient': prefixLinearGradient, '-webkit-linear-gradient': prefixLinearGradient, 'radial-gradient': radialGradient, '-moz-radial-gradient': prefixRadialGradient, '-ms-radial-gradient': prefixRadialGradient, '-o-radial-gradient': prefixRadialGradient, '-webkit-radial-gradient': prefixRadialGradient, '-webkit-gradient': webkitGradient }; var backgroundImage = { name: 'background-image', initialValue: 'none', type: 1 /* LIST */, prefix: false, parse: function (context, tokens) { if (tokens.length === 0) { return []; } var first = tokens[0]; if (first.type === 20 /* IDENT_TOKEN */ && first.value === 'none') { return []; } return tokens .filter(function (value) { return nonFunctionArgSeparator(value) && isSupportedImage(value); }) .map(function (value) { return image.parse(context, value); }); } }; var backgroundOrigin = { name: 'background-origin', initialValue: 'border-box', prefix: false, type: 1 /* LIST */, parse: function (_context, tokens) { return tokens.map(function (token) { if (isIdentToken(token)) { switch (token.value) { case 'padding-box': return 1 /* PADDING_BOX */; case 'content-box': return 2 /* CONTENT_BOX */; } } return 0 /* BORDER_BOX */; }); } }; var backgroundPosition = { name: 'background-position', initialValue: '0% 0%', type: 1 /* LIST */, prefix: false, parse: function (_context, tokens) { return parseFunctionArgs(tokens) .map(function (values) { return values.filter(isLengthPercentage); }) .map(parseLengthPercentageTuple); } }; var backgroundRepeat = { name: 'background-repeat', initialValue: 'repeat', prefix: false, type: 1 /* LIST */, parse: function (_context, tokens) { return parseFunctionArgs(tokens) .map(function (values) { return values .filter(isIdentToken) .map(function (token) { return token.value; }) .join(' '); }) .map(parseBackgroundRepeat); } }; var parseBackgroundRepeat = function (value) { switch (value) { case 'no-repeat': return 1 /* NO_REPEAT */; case 'repeat-x': case 'repeat no-repeat': return 2 /* REPEAT_X */; case 'repeat-y': case 'no-repeat repeat': return 3 /* REPEAT_Y */; case 'repeat': default: return 0 /* REPEAT */; } }; var BACKGROUND_SIZE; (function (BACKGROUND_SIZE) { BACKGROUND_SIZE["AUTO"] = "auto"; BACKGROUND_SIZE["CONTAIN"] = "contain"; BACKGROUND_SIZE["COVER"] = "cover"; })(BACKGROUND_SIZE || (BACKGROUND_SIZE = {})); var backgroundSize = { name: 'background-size', initialValue: '0', prefix: false, type: 1 /* LIST */, parse: function (_context, tokens) { return parseFunctionArgs(tokens).map(function (values) { return values.filter(isBackgroundSizeInfoToken); }); } }; var isBackgroundSizeInfoToken = function (value) { return isIdentToken(value) || isLengthPercentage(value); }; var borderColorForSide = function (side) { return ({ name: "border-" + side + "-color", initialValue: 'transparent', prefix: false, type: 3 /* TYPE_VALUE */, format: 'color' }); }; var borderTopColor = borderColorForSide('top'); var borderRightColor = borderColorForSide('right'); var borderBottomColor = borderColorForSide('bottom'); var borderLeftColor = borderColorForSide('left'); var borderRadiusForSide = function (side) { return ({ name: "border-radius-" + side, initialValue: '0 0', prefix: false, type: 1 /* LIST */, parse: function (_context, tokens) { return parseLengthPercentageTuple(tokens.filter(isLengthPercentage)); } }); }; var borderTopLeftRadius = borderRadiusForSide('top-left'); var borderTopRightRadius = borderRadiusForSide('top-right'); var borderBottomRightRadius = borderRadiusForSide('bottom-right'); var borderBottomLeftRadius = borderRadiusForSide('bottom-left'); var borderStyleForSide = function (side) { return ({ name: "border-" + side + "-style", initialValue: 'solid', prefix: false, type: 2 /* IDENT_VALUE */, parse: function (_context, style) { switch (style) { case 'none': return 0 /* NONE */; case 'dashed': return 2 /* DASHED */; case 'dotted': return 3 /* DOTTED */; case 'double': return 4 /* DOUBLE */; } return 1 /* SOLID */; } }); }; var borderTopStyle = borderStyleForSide('top'); var borderRightStyle = borderStyleForSide('right'); var borderBottomStyle = borderStyleForSide('bottom'); var borderLeftStyle = borderStyleForSide('left'); var borderWidthForSide = function (side) { return ({ name: "border-" + side + "-width", initialValue: '0', type: 0 /* VALUE */, prefix: false, parse: function (_context, token) { if (isDimensionToken(token)) { return token.number; } return 0; } }); }; var borderTopWidth = borderWidthForSide('top'); var borderRightWidth = borderWidthForSide('right'); var borderBottomWidth = borderWidthForSide('bottom'); var borderLeftWidth = borderWidthForSide('left'); var color = { name: "color", initialValue: 'transparent', prefix: false, type: 3 /* TYPE_VALUE */, format: 'color' }; var direction = { name: 'direction', initialValue: 'ltr', prefix: false, type: 2 /* IDENT_VALUE */, parse: function (_context, direction) { switch (direction) { case 'rtl': return 1 /* RTL */; case 'ltr': default: return 0 /* LTR */; } } }; var display = { name: 'display', initialValue: 'inline-block', prefix: false, type: 1 /* LIST */, parse: function (_context, tokens) { return tokens.filter(isIdentToken).reduce(function (bit, token) { return bit | parseDisplayValue(token.value); }, 0 /* NONE */); } }; var parseDisplayValue = function (display) { switch (display) { case 'block': case '-webkit-box': return 2 /* BLOCK */; case 'inline': return 4 /* INLINE */; case 'run-in': return 8 /* RUN_IN */; case 'flow': return 16 /* FLOW */; case 'flow-root': return 32 /* FLOW_ROOT */; case 'table': return 64 /* TABLE */; case 'flex': case '-webkit-flex': return 128 /* FLEX */; case 'grid': case '-ms-grid': return 256 /* GRID */; case 'ruby': return 512 /* RUBY */; case 'subgrid': return 1024 /* SUBGRID */; case 'list-item': return 2048 /* LIST_ITEM */; case 'table-row-group': return 4096 /* TABLE_ROW_GROUP */; case 'table-header-group': return 8192 /* TABLE_HEADER_GROUP */; case 'table-footer-group': return 16384 /* TABLE_FOOTER_GROUP */; case 'table-row': return 32768 /* TABLE_ROW */; case 'table-cell': return 65536 /* TABLE_CELL */; case 'table-column-group': return 131072 /* TABLE_COLUMN_GROUP */; case 'table-column': return 262144 /* TABLE_COLUMN */; case 'table-caption': return 524288 /* TABLE_CAPTION */; case 'ruby-base': return 1048576 /* RUBY_BASE */; case 'ruby-text': return 2097152 /* RUBY_TEXT */; case 'ruby-base-container': return 4194304 /* RUBY_BASE_CONTAINER */; case 'ruby-text-container': return 8388608 /* RUBY_TEXT_CONTAINER */; case 'contents': return 16777216 /* CONTENTS */; case 'inline-block': return 33554432 /* INLINE_BLOCK */; case 'inline-list-item': return 67108864 /* INLINE_LIST_ITEM */; case 'inline-table': return 134217728 /* INLINE_TABLE */; case 'inline-flex': return 268435456 /* INLINE_FLEX */; case 'inline-grid': return 536870912 /* INLINE_GRID */; } return 0 /* NONE */; }; var float = { name: 'float', initialValue: 'none', prefix: false, type: 2 /* IDENT_VALUE */, parse: function (_context, float) { switch (float) { case 'left': return 1 /* LEFT */; case 'right': return 2 /* RIGHT */; case 'inline-start': return 3 /* INLINE_START */; case 'inline-end': return 4 /* INLINE_END */; } return 0 /* NONE */; } }; var letterSpacing = { name: 'letter-spacing', initialValue: '0', prefix: false, type: 0 /* VALUE */, parse: function (_context, token) { if (token.type === 20 /* IDENT_TOKEN */ && token.value === 'normal') { return 0; } if (token.type === 17 /* NUMBER_TOKEN */) { return token.number; } if (token.type === 15 /* DIMENSION_TOKEN */) { return token.number; } return 0; } }; var LINE_BREAK; (function (LINE_BREAK) { LINE_BREAK["NORMAL"] = "normal"; LINE_BREAK["STRICT"] = "strict"; })(LINE_BREAK || (LINE_BREAK = {})); var lineBreak = { name: 'line-break', initialValue: 'normal', prefix: false, type: 2 /* IDENT_VALUE */, parse: function (_context, lineBreak) { switch (lineBreak) { case 'strict': return LINE_BREAK.STRICT; case 'normal': default: return LINE_BREAK.NORMAL; } } }; var lineHeight = { name: 'line-height', initialValue: 'normal', prefix: false, type: 4 /* TOKEN_VALUE */ }; var computeLineHeight = function (token, fontSize) { if (isIdentToken(token) && token.value === 'normal') { return 1.2 * fontSize; } else if (token.type === 17 /* NUMBER_TOKEN */) { return fontSize * token.number; } else if (isLengthPercentage(token)) { return getAbsoluteValue(token, fontSize); } return fontSize; }; var listStyleImage = { name: 'list-style-image', initialValue: 'none', type: 0 /* VALUE */, prefix: false, parse: function (context, token) { if (token.type === 20 /* IDENT_TOKEN */ && token.value === 'none') { return null; } return image.parse(context, token); } }; var listStylePosition = { name: 'list-style-position', initialValue: 'outside', prefix: false, type: 2 /* IDENT_VALUE */, parse: function (_context, position) { switch (position) { case 'inside': return 0 /* INSIDE */; case 'outside': default: return 1 /* OUTSIDE */; } } }; var listStyleType = { name: 'list-style-type', initialValue: 'none', prefix: false, type: 2 /* IDENT_VALUE */, parse: function (_context, type) { switch (type) { case 'disc': return 0 /* DISC */; case 'circle': return 1 /* CIRCLE */; case 'square': return 2 /* SQUARE */; case 'decimal': return 3 /* DECIMAL */; case 'cjk-decimal': return 4 /* CJK_DECIMAL */; case 'decimal-leading-zero': return 5 /* DECIMAL_LEADING_ZERO */; case 'lower-roman': return 6 /* LOWER_ROMAN */; case 'upper-roman': return 7 /* UPPER_ROMAN */; case 'lower-greek': return 8 /* LOWER_GREEK */; case 'lower-alpha': return 9 /* LOWER_ALPHA */; case 'upper-alpha': return 10 /* UPPER_ALPHA */; case 'arabic-indic': return 11 /* ARABIC_INDIC */; case 'armenian': return 12 /* ARMENIAN */; case 'bengali': return 13 /* BENGALI */; case 'cambodian': return 14 /* CAMBODIAN */; case 'cjk-earthly-branch': return 15 /* CJK_EARTHLY_BRANCH */; case 'cjk-heavenly-stem': return 16 /* CJK_HEAVENLY_STEM */; case 'cjk-ideographic': return 17 /* CJK_IDEOGRAPHIC */; case 'devanagari': return 18 /* DEVANAGARI */; case 'ethiopic-numeric': return 19 /* ETHIOPIC_NUMERIC */; case 'georgian': return 20 /* GEORGIAN */; case 'gujarati': return 21 /* GUJARATI */; case 'gurmukhi': return 22 /* GURMUKHI */; case 'hebrew': return 22 /* HEBREW */; case 'hiragana': return 23 /* HIRAGANA */; case 'hiragana-iroha': return 24 /* HIRAGANA_IROHA */; case 'japanese-formal': return 25 /* JAPANESE_FORMAL */; case 'japanese-informal': return 26 /* JAPANESE_INFORMAL */; case 'kannada': return 27 /* KANNADA */; case 'katakana': return 28 /* KATAKANA */; case 'katakana-iroha': return 29 /* KATAKANA_IROHA */; case 'khmer': return 30 /* KHMER */; case 'korean-hangul-formal': return 31 /* KOREAN_HANGUL_FORMAL */; case 'korean-hanja-formal': return 32 /* KOREAN_HANJA_FORMAL */; case 'korean-hanja-informal': return 33 /* KOREAN_HANJA_INFORMAL */; case 'lao': return 34 /* LAO */; case 'lower-armenian': return 35 /* LOWER_ARMENIAN */; case 'malayalam': return 36 /* MALAYALAM */; case 'mongolian': return 37 /* MONGOLIAN */; case 'myanmar': return 38 /* MYANMAR */; case 'oriya': return 39 /* ORIYA */; case 'persian': return 40 /* PERSIAN */; case 'simp-chinese-formal': return 41 /* SIMP_CHINESE_FORMAL */; case 'simp-chinese-informal': return 42 /* SIMP_CHINESE_INFORMAL */; case 'tamil': return 43 /* TAMIL */; case 'telugu': return 44 /* TELUGU */; case 'thai': return 45 /* THAI */; case 'tibetan': return 46 /* TIBETAN */; case 'trad-chinese-formal': return 47 /* TRAD_CHINESE_FORMAL */; case 'trad-chinese-informal': return 48 /* TRAD_CHINESE_INFORMAL */; case 'upper-armenian': return 49 /* UPPER_ARMENIAN */; case 'disclosure-open': return 50 /* DISCLOSURE_OPEN */; case 'disclosure-closed': return 51 /* DISCLOSURE_CLOSED */; case 'none': default: return -1 /* NONE */; } } }; var marginForSide = function (side) { return ({ name: "margin-" + side, initialValue: '0', prefix: false, type: 4 /* TOKEN_VALUE */ }); }; var marginTop = marginForSide('top'); var marginRight = marginForSide('right'); var marginBottom = marginForSide('bottom'); var marginLeft = marginForSide('left'); var overflow = { name: 'overflow', initialValue: 'visible', prefix: false, type: 1 /* LIST */, parse: function (_context, tokens) { return tokens.filter(isIdentToken).map(function (overflow) { switch (overflow.value) { case 'hidden': return 1 /* HIDDEN */; case 'scroll': return 2 /* SCROLL */; case 'clip': return 3 /* CLIP */; case 'auto': return 4 /* AUTO */; case 'visible': default: return 0 /* VISIBLE */; } }); } }; var overflowWrap = { name: 'overflow-wrap', initialValue: 'normal', prefix: false, type: 2 /* IDENT_VALUE */, parse: function (_context, overflow) { switch (overflow) { case 'break-word': return "break-word" /* BREAK_WORD */; case 'normal': default: return "normal" /* NORMAL */; } } }; var paddingForSide = function (side) { return ({ name: "padding-" + side, initialValue: '0', prefix: false, type: 3 /* TYPE_VALUE */, format: 'length-percentage' }); }; var paddingTop = paddingForSide('top'); var paddingRight = paddingForSide('right'); var paddingBottom = paddingForSide('bottom'); var paddingLeft = paddingForSide('left'); var textAlign = { name: 'text-align', initialValue: 'left', prefix: false, type: 2 /* IDENT_VALUE */, parse: function (_context, textAlign) { switch (textAlign) { case 'right': return 2 /* RIGHT */; case 'center': case 'justify': return 1 /* CENTER */; case 'left': default: return 0 /* LEFT */; } } }; var position = { name: 'position', initialValue: 'static', prefix: false, type: 2 /* IDENT_VALUE */, parse: function (_context, position) { switch (position) { case 'relative': return 1 /* RELATIVE */; case 'absolute': return 2 /* ABSOLUTE */; case 'fixed': return 3 /* FIXED */; case 'sticky': return 4 /* STICKY */; } return 0 /* STATIC */; } }; var textShadow = { name: 'text-shadow', initialValue: 'none', type: 1 /* LIST */, prefix: false, parse: function (context, tokens) { if (tokens.length === 1 && isIdentWithValue(tokens[0], 'none')) { return []; } return parseFunctionArgs(tokens).map(function (values) { var shadow = { color: COLORS.TRANSPARENT, offsetX: ZERO_LENGTH, offsetY: ZERO_LENGTH, blur: ZERO_LENGTH }; var c = 0; for (var i = 0; i < values.length; i++) { var token = values[i]; if (isLength(token)) { if (c === 0) { shadow.offsetX = token; } else if (c === 1) { shadow.offsetY = token; } else { shadow.blur = token; } c++; } else { shadow.color = color$1.parse(context, token); } } return shadow; }); } }; var textTransform = { name: 'text-transform', initialValue: 'none', prefix: false, type: 2 /* IDENT_VALUE */, parse: function (_context, textTransform) { switch (textTransform) { case 'uppercase': return 2 /* UPPERCASE */; case 'lowercase': return 1 /* LOWERCASE */; case 'capitalize': return 3 /* CAPITALIZE */; } return 0 /* NONE */; } }; var transform$1 = { name: 'transform', initialValue: 'none', prefix: true, type: 0 /* VALUE */, parse: function (_context, token) { if (token.type === 20 /* IDENT_TOKEN */ && token.value === 'none') { return null; } if (token.type === 18 /* FUNCTION */) { var transformFunction = SUPPORTED_TRANSFORM_FUNCTIONS[token.name]; if (typeof transformFunction === 'undefined') { throw new Error("Attempting to parse an unsupported transform function \"" + token.name + "\""); } return transformFunction(token.values); } return null; } }; var matrix = function (args) { var values = args.filter(function (arg) { return arg.type === 17 /* NUMBER_TOKEN */; }).map(function (arg) { return arg.number; }); return values.length === 6 ? values : null; }; // doesn't support 3D transforms at the moment var matrix3d = function (args) { var values = args.filter(function (arg) { return arg.type === 17 /* NUMBER_TOKEN */; }).map(function (arg) { return arg.number; }); var a1 = values[0], b1 = values[1]; values[2]; values[3]; var a2 = values[4], b2 = values[5]; values[6]; values[7]; values[8]; values[9]; values[10]; values[11]; var a4 = values[12], b4 = values[13]; values[14]; values[15]; return values.length === 16 ? [a1, b1, a2, b2, a4, b4] : null; }; var SUPPORTED_TRANSFORM_FUNCTIONS = { matrix: matrix, matrix3d: matrix3d }; var DEFAULT_VALUE = { type: 16 /* PERCENTAGE_TOKEN */, number: 50, flags: FLAG_INTEGER }; var DEFAULT = [DEFAULT_VALUE, DEFAULT_VALUE]; var transformOrigin = { name: 'transform-origin', initialValue: '50% 50%', prefix: true, type: 1 /* LIST */, parse: function (_context, tokens) { var origins = tokens.filter(isLengthPercentage); if (origins.length !== 2) { return DEFAULT; } return [origins[0], origins[1]]; } }; var visibility = { name: 'visible', initialValue: 'none', prefix: false, type: 2 /* IDENT_VALUE */, parse: function (_context, visibility) { switch (visibility) { case 'hidden': return 1 /* HIDDEN */; case 'collapse': return 2 /* COLLAPSE */; case 'visible': default: return 0 /* VISIBLE */; } } }; var WORD_BREAK; (function (WORD_BREAK) { WORD_BREAK["NORMAL"] = "normal"; WORD_BREAK["BREAK_ALL"] = "break-all"; WORD_BREAK["KEEP_ALL"] = "keep-all"; })(WORD_BREAK || (WORD_BREAK = {})); var wordBreak = { name: 'word-break', initialValue: 'normal', prefix: false, type: 2 /* IDENT_VALUE */, parse: function (_context, wordBreak) { switch (wordBreak) { case 'break-all': return WORD_BREAK.BREAK_ALL; case 'keep-all': return WORD_BREAK.KEEP_ALL; case 'normal': default: return WORD_BREAK.NORMAL; } } }; var zIndex = { name: 'z-index', initialValue: 'auto', prefix: false, type: 0 /* VALUE */, parse: function (_context, token) { if (token.type === 20 /* IDENT_TOKEN */) { return { auto: true, order: 0 }; } if (isNumberToken(token)) { return { auto: false, order: token.number }; } throw new Error("Invalid z-index number parsed"); } }; var time = { name: 'time', parse: function (_context, value) { if (value.type === 15 /* DIMENSION_TOKEN */) { switch (value.unit.toLowerCase()) { case 's': return 1000 * value.number; case 'ms': return value.number; } } throw new Error("Unsupported time type"); } }; var opacity = { name: 'opacity', initialValue: '1', type: 0 /* VALUE */, prefix: false, parse: function (_context, token) { if (isNumberToken(token)) { return token.number; } return 1; } }; var textDecorationColor = { name: "text-decoration-color", initialValue: 'transparent', prefix: false, type: 3 /* TYPE_VALUE */, format: 'color' }; var textDecorationLine = { name: 'text-decoration-line', initialValue: 'none', prefix: false, type: 1 /* LIST */, parse: function (_context, tokens) { return tokens .filter(isIdentToken) .map(function (token) { switch (token.value) { case 'underline': return 1 /* UNDERLINE */; case 'overline': return 2 /* OVERLINE */; case 'line-through': return 3 /* LINE_THROUGH */; case 'none': return 4 /* BLINK */; } return 0 /* NONE */; }) .filter(function (line) { return line !== 0 /* NONE */; }); } }; var fontFamily = { name: "font-family", initialValue: '', prefix: false, type: 1 /* LIST */, parse: function (_context, tokens) { var accumulator = []; var results = []; tokens.forEach(function (token) { switch (token.type) { case 20 /* IDENT_TOKEN */: case 0 /* STRING_TOKEN */: accumulator.push(token.value); break; case 17 /* NUMBER_TOKEN */: accumulator.push(token.number.toString()); break; case 4 /* COMMA_TOKEN */: results.push(accumulator.join(' ')); accumulator.length = 0; break; } }); if (accumulator.length) { results.push(accumulator.join(' ')); } return results.map(function (result) { return (result.indexOf(' ') === -1 ? result : "'" + result + "'"); }); } }; var fontSize = { name: "font-size", initialValue: '0', prefix: false, type: 3 /* TYPE_VALUE */, format: 'length' }; var fontWeight = { name: 'font-weight', initialValue: 'normal', type: 0 /* VALUE */, prefix: false, parse: function (_context, token) { if (isNumberToken(token)) { return token.number; } if (isIdentToken(token)) { switch (token.value) { case 'bold': return 700; case 'normal': default: return 400; } } return 400; } }; var fontVariant = { name: 'font-variant', initialValue: 'none', type: 1 /* LIST */, prefix: false, parse: function (_context, tokens) { return tokens.filter(isIdentToken).map(function (token) { return token.value; }); } }; var fontStyle = { name: 'font-style', initialValue: 'normal', prefix: false, type: 2 /* IDENT_VALUE */, parse: function (_context, overflow) { switch (overflow) { case 'oblique': return "oblique" /* OBLIQUE */; case 'italic': return "italic" /* ITALIC */; case 'normal': default: return "normal" /* NORMAL */; } } }; var contains = function (bit, value) { return (bit & value) !== 0; }; var content = { name: 'content', initialValue: 'none', type: 1 /* LIST */, prefix: false, parse: function (_context, tokens) { if (tokens.length === 0) { return []; } var first = tokens[0]; if (first.type === 20 /* IDENT_TOKEN */ && first.value === 'none') { return []; } return tokens; } }; var counterIncrement = { name: 'counter-increment', initialValue: 'none', prefix: true, type: 1 /* LIST */, parse: function (_context, tokens) { if (tokens.length === 0) { return null; } var first = tokens[0]; if (first.type === 20 /* IDENT_TOKEN */ && first.value === 'none') { return null; } var increments = []; var filtered = tokens.filter(nonWhiteSpace); for (var i = 0; i < filtered.length; i++) { var counter = filtered[i]; var next = filtered[i + 1]; if (counter.type === 20 /* IDENT_TOKEN */) { var increment = next && isNumberToken(next) ? next.number : 1; increments.push({ counter: counter.value, increment: increment }); } } return increments; } }; var counterReset = { name: 'counter-reset', initialValue: 'none', prefix: true, type: 1 /* LIST */, parse: function (_context, tokens) { if (tokens.length === 0) { return []; } var resets = []; var filtered = tokens.filter(nonWhiteSpace); for (var i = 0; i < filtered.length; i++) { var counter = filtered[i]; var next = filtered[i + 1]; if (isIdentToken(counter) && counter.value !== 'none') { var reset = next && isNumberToken(next) ? next.number : 0; resets.push({ counter: counter.value, reset: reset }); } } return resets; } }; var duration = { name: 'duration', initialValue: '0s', prefix: false, type: 1 /* LIST */, parse: function (context, tokens) { return tokens.filter(isDimensionToken).map(function (token) { return time.parse(context, token); }); } }; var quotes = { name: 'quotes', initialValue: 'none', prefix: true, type: 1 /* LIST */, parse: function (_context, tokens) { if (tokens.length === 0) { return null; } var first = tokens[0]; if (first.type === 20 /* IDENT_TOKEN */ && first.value === 'none') { return null; } var quotes = []; var filtered = tokens.filter(isStringToken); if (filtered.length % 2 !== 0) { return null; } for (var i = 0; i < filtered.length; i += 2) { var open_1 = filtered[i].value; var close_1 = filtered[i + 1].value; quotes.push({ open: open_1, close: close_1 }); } return quotes; } }; var getQuote = function (quotes, depth, open) { if (!quotes) { return ''; } var quote = quotes[Math.min(depth, quotes.length - 1)]; if (!quote) { return ''; } return open ? quote.open : quote.close; }; var boxShadow = { name: 'box-shadow', initialValue: 'none', type: 1 /* LIST */, prefix: false, parse: function (context, tokens) { if (tokens.length === 1 && isIdentWithValue(tokens[0], 'none')) { return []; } return parseFunctionArgs(tokens).map(function (values) { var shadow = { color: 0x000000ff, offsetX: ZERO_LENGTH, offsetY: ZERO_LENGTH, blur: ZERO_LENGTH, spread: ZERO_LENGTH, inset: false }; var c = 0; for (var i = 0; i < values.length; i++) { var token = values[i]; if (isIdentWithValue(token, 'inset')) { shadow.inset = true; } else if (isLength(token)) { if (c === 0) { shadow.offsetX = token; } else if (c === 1) { shadow.offsetY = token; } else if (c === 2) { shadow.blur = token; } else { shadow.spread = token; } c++; } else { shadow.color = color$1.parse(context, token); } } return shadow; }); } }; var paintOrder = { name: 'paint-order', initialValue: 'normal', prefix: false, type: 1 /* LIST */, parse: function (_context, tokens) { var DEFAULT_VALUE = [0 /* FILL */, 1 /* STROKE */, 2 /* MARKERS */]; var layers = []; tokens.filter(isIdentToken).forEach(function (token) { switch (token.value) { case 'stroke': layers.push(1 /* STROKE */); break; case 'fill': layers.push(0 /* FILL */); break; case 'markers': layers.push(2 /* MARKERS */); break; } }); DEFAULT_VALUE.forEach(function (value) { if (layers.indexOf(value) === -1) { layers.push(value); } }); return layers; } }; var webkitTextStrokeColor = { name: "-webkit-text-stroke-color", initialValue: 'currentcolor', prefix: false, type: 3 /* TYPE_VALUE */, format: 'color' }; var webkitTextStrokeWidth = { name: "-webkit-text-stroke-width", initialValue: '0', type: 0 /* VALUE */, prefix: false, parse: function (_context, token) { if (isDimensionToken(token)) { return token.number; } return 0; } }; var CSSParsedDeclaration = /** @class */ (function () { function CSSParsedDeclaration(context, declaration) { var _a, _b; this.animationDuration = parse(context, duration, declaration.animationDuration); this.backgroundClip = parse(context, backgroundClip, declaration.backgroundClip); this.backgroundColor = parse(context, backgroundColor, declaration.backgroundColor); this.backgroundImage = parse(context, backgroundImage, declaration.backgroundImage); this.backgroundOrigin = parse(context, backgroundOrigin, declaration.backgroundOrigin); this.backgroundPosition = parse(context, backgroundPosition, declaration.backgroundPosition); this.backgroundRepeat = parse(context, backgroundRepeat, declaration.backgroundRepeat); this.backgroundSize = parse(context, backgroundSize, declaration.backgroundSize); this.borderTopColor = parse(context, borderTopColor, declaration.borderTopColor); this.borderRightColor = parse(context, borderRightColor, declaration.borderRightColor); this.borderBottomColor = parse(context, borderBottomColor, declaration.borderBottomColor); this.borderLeftColor = parse(context, borderLeftColor, declaration.borderLeftColor); this.borderTopLeftRadius = parse(context, borderTopLeftRadius, declaration.borderTopLeftRadius); this.borderTopRightRadius = parse(context, borderTopRightRadius, declaration.borderTopRightRadius); this.borderBottomRightRadius = parse(context, borderBottomRightRadius, declaration.borderBottomRightRadius); this.borderBottomLeftRadius = parse(context, borderBottomLeftRadius, declaration.borderBottomLeftRadius); this.borderTopStyle = parse(context, borderTopStyle, declaration.borderTopStyle); this.borderRightStyle = parse(context, borderRightStyle, declaration.borderRightStyle); this.borderBottomStyle = parse(context, borderBottomStyle, declaration.borderBottomStyle); this.borderLeftStyle = parse(context, borderLeftStyle, declaration.borderLeftStyle); this.borderTopWidth = parse(context, borderTopWidth, declaration.borderTopWidth); this.borderRightWidth = parse(context, borderRightWidth, declaration.borderRightWidth); this.borderBottomWidth = parse(context, borderBottomWidth, declaration.borderBottomWidth); this.borderLeftWidth = parse(context, borderLeftWidth, declaration.borderLeftWidth); this.boxShadow = parse(context, boxShadow, declaration.boxShadow); this.color = parse(context, color, declaration.color); this.direction = parse(context, direction, declaration.direction); this.display = parse(context, display, declaration.display); this.float = parse(context, float, declaration.cssFloat); this.fontFamily = parse(context, fontFamily, declaration.fontFamily); this.fontSize = parse(context, fontSize, declaration.fontSize); this.fontStyle = parse(context, fontStyle, declaration.fontStyle); this.fontVariant = parse(context, fontVariant, declaration.fontVariant); this.fontWeight = parse(context, fontWeight, declaration.fontWeight); this.letterSpacing = parse(context, letterSpacing, declaration.letterSpacing); this.lineBreak = parse(context, lineBreak, declaration.lineBreak); this.lineHeight = parse(context, lineHeight, declaration.lineHeight); this.listStyleImage = parse(context, listStyleImage, declaration.listStyleImage); this.listStylePosition = parse(context, listStylePosition, declaration.listStylePosition); this.listStyleType = parse(context, listStyleType, declaration.listStyleType); this.marginTop = parse(context, marginTop, declaration.marginTop); this.marginRight = parse(context, marginRight, declaration.marginRight); this.marginBottom = parse(context, marginBottom, declaration.marginBottom); this.marginLeft = parse(context, marginLeft, declaration.marginLeft); this.opacity = parse(context, opacity, declaration.opacity); var overflowTuple = parse(context, overflow, declaration.overflow); this.overflowX = overflowTuple[0]; this.overflowY = overflowTuple[overflowTuple.length > 1 ? 1 : 0]; this.overflowWrap = parse(context, overflowWrap, declaration.overflowWrap); this.paddingTop = parse(context, paddingTop, declaration.paddingTop); this.paddingRight = parse(context, paddingRight, declaration.paddingRight); this.paddingBottom = parse(context, paddingBottom, declaration.paddingBottom); this.paddingLeft = parse(context, paddingLeft, declaration.paddingLeft); this.paintOrder = parse(context, paintOrder, declaration.paintOrder); this.position = parse(context, position, declaration.position); this.textAlign = parse(context, textAlign, declaration.textAlign); this.textDecorationColor = parse(context, textDecorationColor, (_a = declaration.textDecorationColor) !== null && _a !== void 0 ? _a : declaration.color); this.textDecorationLine = parse(context, textDecorationLine, (_b = declaration.textDecorationLine) !== null && _b !== void 0 ? _b : declaration.textDecoration); this.textShadow = parse(context, textShadow, declaration.textShadow); this.textTransform = parse(context, textTransform, declaration.textTransform); this.transform = parse(context, transform$1, declaration.transform); this.transformOrigin = parse(context, transformOrigin, declaration.transformOrigin); this.visibility = parse(context, visibility, declaration.visibility); this.webkitTextStrokeColor = parse(context, webkitTextStrokeColor, declaration.webkitTextStrokeColor); this.webkitTextStrokeWidth = parse(context, webkitTextStrokeWidth, declaration.webkitTextStrokeWidth); this.wordBreak = parse(context, wordBreak, declaration.wordBreak); this.zIndex = parse(context, zIndex, declaration.zIndex); } CSSParsedDeclaration.prototype.isVisible = function () { return this.display > 0 && this.opacity > 0 && this.visibility === 0 /* VISIBLE */; }; CSSParsedDeclaration.prototype.isTransparent = function () { return isTransparent(this.backgroundColor); }; CSSParsedDeclaration.prototype.isTransformed = function () { return this.transform !== null; }; CSSParsedDeclaration.prototype.isPositioned = function () { return this.position !== 0 /* STATIC */; }; CSSParsedDeclaration.prototype.isPositionedWithZIndex = function () { return this.isPositioned() && !this.zIndex.auto; }; CSSParsedDeclaration.prototype.isFloating = function () { return this.float !== 0 /* NONE */; }; CSSParsedDeclaration.prototype.isInlineLevel = function () { return (contains(this.display, 4 /* INLINE */) || contains(this.display, 33554432 /* INLINE_BLOCK */) || contains(this.display, 268435456 /* INLINE_FLEX */) || contains(this.display, 536870912 /* INLINE_GRID */) || contains(this.display, 67108864 /* INLINE_LIST_ITEM */) || contains(this.display, 134217728 /* INLINE_TABLE */)); }; return CSSParsedDeclaration; }()); var CSSParsedPseudoDeclaration = /** @class */ (function () { function CSSParsedPseudoDeclaration(context, declaration) { this.content = parse(context, content, declaration.content); this.quotes = parse(context, quotes, declaration.quotes); } return CSSParsedPseudoDeclaration; }()); var CSSParsedCounterDeclaration = /** @class */ (function () { function CSSParsedCounterDeclaration(context, declaration) { this.counterIncrement = parse(context, counterIncrement, declaration.counterIncrement); this.counterReset = parse(context, counterReset, declaration.counterReset); } return CSSParsedCounterDeclaration; }()); // eslint-disable-next-line @typescript-eslint/no-explicit-any var parse = function (context, descriptor, style) { var tokenizer = new Tokenizer(); var value = style !== null && typeof style !== 'undefined' ? style.toString() : descriptor.initialValue; tokenizer.write(value); var parser = new Parser(tokenizer.read()); switch (descriptor.type) { case 2 /* IDENT_VALUE */: var token = parser.parseComponentValue(); return descriptor.parse(context, isIdentToken(token) ? token.value : descriptor.initialValue); case 0 /* VALUE */: return descriptor.parse(context, parser.parseComponentValue()); case 1 /* LIST */: return descriptor.parse(context, parser.parseComponentValues()); case 4 /* TOKEN_VALUE */: return parser.parseComponentValue(); case 3 /* TYPE_VALUE */: switch (descriptor.format) { case 'angle': return angle.parse(context, parser.parseComponentValue()); case 'color': return color$1.parse(context, parser.parseComponentValue()); case 'image': return image.parse(context, parser.parseComponentValue()); case 'length': var length_1 = parser.parseComponentValue(); return isLength(length_1) ? length_1 : ZERO_LENGTH; case 'length-percentage': var value_1 = parser.parseComponentValue(); return isLengthPercentage(value_1) ? value_1 : ZERO_LENGTH; case 'time': return time.parse(context, parser.parseComponentValue()); } break; } }; var elementDebuggerAttribute = 'data-html2canvas-debug'; var getElementDebugType = function (element) { var attribute = element.getAttribute(elementDebuggerAttribute); switch (attribute) { case 'all': return 1 /* ALL */; case 'clone': return 2 /* CLONE */; case 'parse': return 3 /* PARSE */; case 'render': return 4 /* RENDER */; default: return 0 /* NONE */; } }; var isDebugging = function (element, type) { var elementType = getElementDebugType(element); return elementType === 1 /* ALL */ || type === elementType; }; var ElementContainer = /** @class */ (function () { function ElementContainer(context, element) { this.context = context; this.textNodes = []; this.elements = []; this.flags = 0; if (isDebugging(element, 3 /* PARSE */)) { debugger; } this.styles = new CSSParsedDeclaration(context, window.getComputedStyle(element, null)); if (isHTMLElementNode(element)) { if (this.styles.animationDuration.some(function (duration) { return duration > 0; })) { element.style.animationDuration = '0s'; } if (this.styles.transform !== null) { // getBoundingClientRect takes transforms into account element.style.transform = 'none'; } } this.bounds = parseBounds(this.context, element); if (isDebugging(element, 4 /* RENDER */)) { this.flags |= 16 /* DEBUG_RENDER */; } } return ElementContainer; }()); /* * text-segmentation 1.0.3 <https://github.com/niklasvh/text-segmentation> * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com> * Released under MIT License */ var base64 = 'AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA='; /* * utrie 1.0.2 <https://github.com/niklasvh/utrie> * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com> * Released under MIT License */ var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; // Use a lookup table to find the index. var lookup$1 = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256); for (var i$1 = 0; i$1 < chars$1.length; i$1++) { lookup$1[chars$1.charCodeAt(i$1)] = i$1; } var decode = function (base64) { var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4; if (base64[base64.length - 1] === '=') { bufferLength--; if (base64[base64.length - 2] === '=') { bufferLength--; } } var buffer = typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint8Array.prototype.slice !== 'undefined' ? new ArrayBuffer(bufferLength) : new Array(bufferLength); var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer); for (i = 0; i < len; i += 4) { encoded1 = lookup$1[base64.charCodeAt(i)]; encoded2 = lookup$1[base64.charCodeAt(i + 1)]; encoded3 = lookup$1[base64.charCodeAt(i + 2)]; encoded4 = lookup$1[base64.charCodeAt(i + 3)]; bytes[p++] = (encoded1 << 2) | (encoded2 >> 4); bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2); bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63); } return buffer; }; var polyUint16Array = function (buffer) { var length = buffer.length; var bytes = []; for (var i = 0; i < length; i += 2) { bytes.push((buffer[i + 1] << 8) | buffer[i]); } return bytes; }; var polyUint32Array = function (buffer) { var length = buffer.length; var bytes = []; for (var i = 0; i < length; i += 4) { bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]); } return bytes; }; /** Shift size for getting the index-2 table offset. */ var UTRIE2_SHIFT_2 = 5; /** Shift size for getting the index-1 table offset. */ var UTRIE2_SHIFT_1 = 6 + 5; /** * Shift size for shifting left the index array values. * Increases possible data size with 16-bit index values at the cost * of compactability. * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY. */ var UTRIE2_INDEX_SHIFT = 2; /** * Difference between the two shift sizes, * for getting an index-1 offset from an index-2 offset. 6=11-5 */ var UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2; /** * The part of the index-2 table for U+D800..U+DBFF stores values for * lead surrogate code _units_ not code _points_. * Values for lead surrogate code _points_ are indexed with this portion of the table. * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.) */ var UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2; /** Number of entries in a data block. 32=0x20 */ var UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2; /** Mask for getting the lower bits for the in-data-block offset. */ var UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1; var UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2; /** Count the lengths of both BMP pieces. 2080=0x820 */ var UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH; /** * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820. * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2. */ var UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH; var UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */ /** * The index-1 table, only used for supplementary code points, at offset 2112=0x840. * Variable length, for code points up to highStart, where the last single-value range starts. * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1. * (For 0x100000 supplementary code points U+10000..U+10ffff.) * * The part of the index-2 table for supplementary code points starts * after this index-1 table. * * Both the index-1 table and the following part of the index-2 table * are omitted completely if there is only BMP data. */ var UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH; /** * Number of index-1 entries for the BMP. 32=0x20 * This part of the index-1 table is omitted from the serialized form. */ var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1; /** Number of entries in an index-2 block. 64=0x40 */ var UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2; /** Mask for getting the lower bits for the in-index-2-block offset. */ var UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1; var slice16 = function (view, start, end) { if (view.slice) { return view.slice(start, end); } return new Uint16Array(Array.prototype.slice.call(view, start, end)); }; var slice32 = function (view, start, end) { if (view.slice) { return view.slice(start, end); } return new Uint32Array(Array.prototype.slice.call(view, start, end)); }; var createTrieFromBase64 = function (base64, _byteLength) { var buffer = decode(base64); var view32 = Array.isArray(buffer) ? polyUint32Array(buffer) : new Uint32Array(buffer); var view16 = Array.isArray(buffer) ? polyUint16Array(buffer) : new Uint16Array(buffer); var headerLength = 24; var index = slice16(view16, headerLength / 2, view32[4] / 2); var data = view32[5] === 2 ? slice16(view16, (headerLength + view32[4]) / 2) : slice32(view32, Math.ceil((headerLength + view32[4]) / 4)); return new Trie(view32[0], view32[1], view32[2], view32[3], index, data); }; var Trie = /** @class */ (function () { function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) { this.initialValue = initialValue; this.errorValue = errorValue; this.highStart = highStart; this.highValueIndex = highValueIndex; this.index = index; this.data = data; } /** * Get the value for a code point as stored in the Trie. * * @param codePoint the code point * @return the value */ Trie.prototype.get = function (codePoint) { var ix; if (codePoint >= 0) { if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) { // Ordinary BMP code point, excluding leading surrogates. // BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index. // 16 bit data is stored in the index array itself. ix = this.index[codePoint >> UTRIE2_SHIFT_2]; ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK); return this.data[ix]; } if (codePoint <= 0xffff) { // Lead Surrogate Code Point. A Separate index section is stored for // lead surrogate code units and code points. // The main index has the code unit data. // For this function, we need the code point data. // Note: this expression could be refactored for slightly improved efficiency, but // surrogate code points will be so rare in practice that it's not worth it. ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> UTRIE2_SHIFT_2)]; ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK); return this.data[ix]; } if (codePoint < this.highStart) { // Supplemental code point, use two-level lookup. ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1); ix = this.index[ix]; ix += (codePoint >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK; ix = this.index[ix]; ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK); return this.data[ix]; } if (codePoint <= 0x10ffff) { return this.data[this.highValueIndex]; } } // Fall through. The code point is outside of the legal range of 0..0x10ffff. return this.errorValue; }; return Trie; }()); /* * base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer> * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com> * Released under MIT License */ var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; // Use a lookup table to find the index. var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256); for (var i = 0; i < chars.length; i++) { lookup[chars.charCodeAt(i)] = i; } var Prepend = 1; var CR = 2; var LF = 3; var Control = 4; var Extend = 5; var SpacingMark = 7; var L = 8; var V = 9; var T = 10; var LV = 11; var LVT = 12; var ZWJ = 13; var Extended_Pictographic = 14; var RI = 15; var toCodePoints = function (str) { var codePoints = []; var i = 0; var length = str.length; while (i < length) { var value = str.charCodeAt(i++); if (value >= 0xd800 && value <= 0xdbff && i < length) { var extra = str.charCodeAt(i++); if ((extra & 0xfc00) === 0xdc00) { codePoints.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000); } else { codePoints.push(value); i--; } } else { codePoints.push(value); } } return codePoints; }; var fromCodePoint = function () { var codePoints = []; for (var _i = 0; _i < arguments.length; _i++) { codePoints[_i] = arguments[_i]; } if (String.fromCodePoint) { return String.fromCodePoint.apply(String, codePoints); } var length = codePoints.length; if (!length) { return ''; } var codeUnits = []; var index = -1; var result = ''; while (++index < length) { var codePoint = codePoints[index]; if (codePoint <= 0xffff) { codeUnits.push(codePoint); } else { codePoint -= 0x10000; codeUnits.push((codePoint >> 10) + 0xd800, (codePoint % 0x400) + 0xdc00); } if (index + 1 === length || codeUnits.length > 0x4000) { result += String.fromCharCode.apply(String, codeUnits); codeUnits.length = 0; } } return result; }; var UnicodeTrie = createTrieFromBase64(base64); var BREAK_NOT_ALLOWED = '×'; var BREAK_ALLOWED = '÷'; var codePointToClass = function (codePoint) { return UnicodeTrie.get(codePoint); }; var _graphemeBreakAtIndex = function (_codePoints, classTypes, index) { var prevIndex = index - 2; var prev = classTypes[prevIndex]; var current = classTypes[index - 1]; var next = classTypes[index]; // GB3 Do not break between a CR and LF if (current === CR && next === LF) { return BREAK_NOT_ALLOWED; } // GB4 Otherwise, break before and after controls. if (current === CR || current === LF || current === Control) { return BREAK_ALLOWED; } // GB5 if (next === CR || next === LF || next === Control) { return BREAK_ALLOWED; } // Do not break Hangul syllable sequences. // GB6 if (current === L && [L, V, LV, LVT].indexOf(next) !== -1) { return BREAK_NOT_ALLOWED; } // GB7 if ((current === LV || current === V) && (next === V || next === T)) { return BREAK_NOT_ALLOWED; } // GB8 if ((current === LVT || current === T) && next === T) { return BREAK_NOT_ALLOWED; } // GB9 Do not break before extending characters or ZWJ. if (next === ZWJ || next === Extend) { return BREAK_NOT_ALLOWED; } // Do not break before SpacingMarks, or after Prepend characters. // GB9a if (next === SpacingMark) { return BREAK_NOT_ALLOWED; } // GB9a if (current === Prepend) { return BREAK_NOT_ALLOWED; } // GB11 Do not break within emoji modifier sequences or emoji zwj sequences. if (current === ZWJ && next === Extended_Pictographic) { while (prev === Extend) { prev = classTypes[--prevIndex]; } if (prev === Extended_Pictographic) { return BREAK_NOT_ALLOWED; } } // GB12 Do not break within emoji flag sequences. // That is, do not break between regional indicator (RI) symbols // if there is an odd number of RI characters before the break point. if (current === RI && next === RI) { var countRI = 0; while (prev === RI) { countRI++; prev = classTypes[--prevIndex]; } if (countRI % 2 === 0) { return BREAK_NOT_ALLOWED; } } return BREAK_ALLOWED; }; var GraphemeBreaker = function (str) { var codePoints = toCodePoints(str); var length = codePoints.length; var index = 0; var lastEnd = 0; var classTypes = codePoints.map(codePointToClass); return { next: function () { if (index >= length) { return { done: true, value: null }; } var graphemeBreak = BREAK_NOT_ALLOWED; while (index < length && (graphemeBreak = _graphemeBreakAtIndex(codePoints, classTypes, ++index)) === BREAK_NOT_ALLOWED) { } if (graphemeBreak !== BREAK_NOT_ALLOWED || index === length) { var value = fromCodePoint.apply(null, codePoints.slice(lastEnd, index)); lastEnd = index; return { value: value, done: false }; } return { done: true, value: null }; }, }; }; var splitGraphemes = function (str) { var breaker = GraphemeBreaker(str); var graphemes = []; var bk; while (!(bk = breaker.next()).done) { if (bk.value) { graphemes.push(bk.value.slice()); } } return graphemes; }; var testRangeBounds = function (document) { var TEST_HEIGHT = 123; if (document.createRange) { var range = document.createRange(); if (range.getBoundingClientRect) { var testElement = document.createElement('boundtest'); testElement.style.height = TEST_HEIGHT + "px"; testElement.style.display = 'block'; document.body.appendChild(testElement); range.selectNode(testElement); var rangeBounds = range.getBoundingClientRect(); var rangeHeight = Math.round(rangeBounds.height); document.body.removeChild(testElement); if (rangeHeight === TEST_HEIGHT) { return true; } } } return false; }; var testIOSLineBreak = function (document) { var testElement = document.createElement('boundtest'); testElement.style.width = '50px'; testElement.style.display = 'block'; testElement.style.fontSize = '12px'; testElement.style.letterSpacing = '0px'; testElement.style.wordSpacing = '0px'; document.body.appendChild(testElement); var range = document.createRange(); testElement.innerHTML = typeof ''.repeat === 'function' ? '&#128104;'.repeat(10) : ''; var node = testElement.firstChild; var textList = toCodePoints$1(node.data).map(function (i) { return fromCodePoint$1(i); }); var offset = 0; var prev = {}; // ios 13 does not handle range getBoundingClientRect line changes correctly #2177 var supports = textList.every(function (text, i) { range.setStart(node, offset); range.setEnd(node, offset + text.length); var rect = range.getBoundingClientRect(); offset += text.length; var boundAhead = rect.x > prev.x || rect.y > prev.y; prev = rect; if (i === 0) { return true; } return boundAhead; }); document.body.removeChild(testElement); return supports; }; var testCORS = function () { return typeof new Image().crossOrigin !== 'undefined'; }; var testResponseType = function () { return typeof new XMLHttpRequest().responseType === 'string'; }; var testSVG = function (document) { var img = new Image(); var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); if (!ctx) { return false; } img.src = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>"; try { ctx.drawImage(img, 0, 0); canvas.toDataURL(); } catch (e) { return false; } return true; }; var isGreenPixel = function (data) { return data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255; }; var testForeignObject = function (document) { var canvas = document.createElement('canvas'); var size = 100; canvas.width = size; canvas.height = size; var ctx = canvas.getContext('2d'); if (!ctx) { return Promise.reject(false); } ctx.fillStyle = 'rgb(0, 255, 0)'; ctx.fillRect(0, 0, size, size); var img = new Image(); var greenImageSrc = canvas.toDataURL(); img.src = greenImageSrc; var svg = createForeignObjectSVG(size, size, 0, 0, img); ctx.fillStyle = 'red'; ctx.fillRect(0, 0, size, size); return loadSerializedSVG$1(svg) .then(function (img) { ctx.drawImage(img, 0, 0); var data = ctx.getImageData(0, 0, size, size).data; ctx.fillStyle = 'red'; ctx.fillRect(0, 0, size, size); var node = document.createElement('div'); node.style.backgroundImage = "url(" + greenImageSrc + ")"; node.style.height = size + "px"; // Firefox 55 does not render inline <img /> tags return isGreenPixel(data) ? loadSerializedSVG$1(createForeignObjectSVG(size, size, 0, 0, node)) : Promise.reject(false); }) .then(function (img) { ctx.drawImage(img, 0, 0); // Edge does not render background-images return isGreenPixel(ctx.getImageData(0, 0, size, size).data); }) .catch(function () { return false; }); }; var createForeignObjectSVG = function (width, height, x, y, node) { var xmlns = 'http://www.w3.org/2000/svg'; var svg = document.createElementNS(xmlns, 'svg'); var foreignObject = document.createElementNS(xmlns, 'foreignObject'); svg.setAttributeNS(null, 'width', width.toString()); svg.setAttributeNS(null, 'height', height.toString()); foreignObject.setAttributeNS(null, 'width', '100%'); foreignObject.setAttributeNS(null, 'height', '100%'); foreignObject.setAttributeNS(null, 'x', x.toString()); foreignObject.setAttributeNS(null, 'y', y.toString()); foreignObject.setAttributeNS(null, 'externalResourcesRequired', 'true'); svg.appendChild(foreignObject); foreignObject.appendChild(node); return svg; }; var loadSerializedSVG$1 = function (svg) { return new Promise(function (resolve, reject) { var img = new Image(); img.onload = function () { return resolve(img); }; img.onerror = reject; img.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(svg)); }); }; var FEATURES = { get SUPPORT_RANGE_BOUNDS() { var value = testRangeBounds(document); Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value }); return value; }, get SUPPORT_WORD_BREAKING() { var value = FEATURES.SUPPORT_RANGE_BOUNDS && testIOSLineBreak(document); Object.defineProperty(FEATURES, 'SUPPORT_WORD_BREAKING', { value: value }); return value; }, get SUPPORT_SVG_DRAWING() { var value = testSVG(document); Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value }); return value; }, get SUPPORT_FOREIGNOBJECT_DRAWING() { var value = typeof Array.from === 'function' && typeof window.fetch === 'function' ? testForeignObject(document) : Promise.resolve(false); Object.defineProperty(FEATURES, 'SUPPORT_FOREIGNOBJECT_DRAWING', { value: value }); return value; }, get SUPPORT_CORS_IMAGES() { var value = testCORS(); Object.defineProperty(FEATURES, 'SUPPORT_CORS_IMAGES', { value: value }); return value; }, get SUPPORT_RESPONSE_TYPE() { var value = testResponseType(); Object.defineProperty(FEATURES, 'SUPPORT_RESPONSE_TYPE', { value: value }); return value; }, get SUPPORT_CORS_XHR() { var value = 'withCredentials' in new XMLHttpRequest(); Object.defineProperty(FEATURES, 'SUPPORT_CORS_XHR', { value: value }); return value; }, get SUPPORT_NATIVE_TEXT_SEGMENTATION() { // eslint-disable-next-line @typescript-eslint/no-explicit-any var value = !!(typeof Intl !== 'undefined' && Intl.Segmenter); Object.defineProperty(FEATURES, 'SUPPORT_NATIVE_TEXT_SEGMENTATION', { value: value }); return value; } }; var TextBounds = /** @class */ (function () { function TextBounds(text, bounds) { this.text = text; this.bounds = bounds; } return TextBounds; }()); var parseTextBounds = function (context, value, styles, node) { var textList = breakText(value, styles); var textBounds = []; var offset = 0; textList.forEach(function (text) { if (styles.textDecorationLine.length || text.trim().length > 0) { if (FEATURES.SUPPORT_RANGE_BOUNDS) { var clientRects = createRange(node, offset, text.length).getClientRects(); if (clientRects.length > 1) { var subSegments = segmentGraphemes(text); var subOffset_1 = 0; subSegments.forEach(function (subSegment) { textBounds.push(new TextBounds(subSegment, Bounds.fromDOMRectList(context, createRange(node, subOffset_1 + offset, subSegment.length).getClientRects()))); subOffset_1 += subSegment.length; }); } else { textBounds.push(new TextBounds(text, Bounds.fromDOMRectList(context, clientRects))); } } else { var replacementNode = node.splitText(text.length); textBounds.push(new TextBounds(text, getWrapperBounds(context, node))); node = replacementNode; } } else if (!FEATURES.SUPPORT_RANGE_BOUNDS) { node = node.splitText(text.length); } offset += text.length; }); return textBounds; }; var getWrapperBounds = function (context, node) { var ownerDocument = node.ownerDocument; if (ownerDocument) { var wrapper = ownerDocument.createElement('html2canvaswrapper'); wrapper.appendChild(node.cloneNode(true)); var parentNode = node.parentNode; if (parentNode) { parentNode.replaceChild(wrapper, node); var bounds = parseBounds(context, wrapper); if (wrapper.firstChild) { parentNode.replaceChild(wrapper.firstChild, wrapper); } return bounds; } } return Bounds.EMPTY; }; var createRange = function (node, offset, length) { var ownerDocument = node.ownerDocument; if (!ownerDocument) { throw new Error('Node has no owner document'); } var range = ownerDocument.createRange(); range.setStart(node, offset); range.setEnd(node, offset + length); return range; }; var segmentGraphemes = function (value) { if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) { // eslint-disable-next-line @typescript-eslint/no-explicit-any var segmenter = new Intl.Segmenter(void 0, { granularity: 'grapheme' }); // eslint-disable-next-line @typescript-eslint/no-explicit-any return Array.from(segmenter.segment(value)).map(function (segment) { return segment.segment; }); } return splitGraphemes(value); }; var segmentWords = function (value, styles) { if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) { // eslint-disable-next-line @typescript-eslint/no-explicit-any var segmenter = new Intl.Segmenter(void 0, { granularity: 'word' }); // eslint-disable-next-line @typescript-eslint/no-explicit-any return Array.from(segmenter.segment(value)).map(function (segment) { return segment.segment; }); } return breakWords(value, styles); }; var breakText = function (value, styles) { return styles.letterSpacing !== 0 ? segmentGraphemes(value) : segmentWords(value, styles); }; // https://drafts.csswg.org/css-text/#word-separator var wordSeparators = [0x0020, 0x00a0, 0x1361, 0x10100, 0x10101, 0x1039, 0x1091]; var breakWords = function (str, styles) { var breaker = LineBreaker(str, { lineBreak: styles.lineBreak, wordBreak: styles.overflowWrap === "break-word" /* BREAK_WORD */ ? 'break-word' : styles.wordBreak }); var words = []; var bk; var _loop_1 = function () { if (bk.value) { var value = bk.value.slice(); var codePoints = toCodePoints$1(value); var word_1 = ''; codePoints.forEach(function (codePoint) { if (wordSeparators.indexOf(codePoint) === -1) { word_1 += fromCodePoint$1(codePoint); } else { if (word_1.length) { words.push(word_1); } words.push(fromCodePoint$1(codePoint)); word_1 = ''; } }); if (word_1.length) { words.push(word_1); } } }; while (!(bk = breaker.next()).done) { _loop_1(); } return words; }; var TextContainer = /** @class */ (function () { function TextContainer(context, node, styles) { this.text = transform(node.data, styles.textTransform); this.textBounds = parseTextBounds(context, this.text, styles, node); } return TextContainer; }()); var transform = function (text, transform) { switch (transform) { case 1 /* LOWERCASE */: return text.toLowerCase(); case 3 /* CAPITALIZE */: return text.replace(CAPITALIZE, capitalize); case 2 /* UPPERCASE */: return text.toUpperCase(); default: return text; } }; var CAPITALIZE = /(^|\s|:|-|\(|\))([a-z])/g; var capitalize = function (m, p1, p2) { if (m.length > 0) { return p1 + p2.toUpperCase(); } return m; }; var ImageElementContainer = /** @class */ (function (_super) { __extends(ImageElementContainer, _super); function ImageElementContainer(context, img) { var _this = _super.call(this, context, img) || this; _this.src = img.currentSrc || img.src; _this.intrinsicWidth = img.naturalWidth; _this.intrinsicHeight = img.naturalHeight; _this.context.cache.addImage(_this.src); return _this; } return ImageElementContainer; }(ElementContainer)); var CanvasElementContainer = /** @class */ (function (_super) { __extends(CanvasElementContainer, _super); function CanvasElementContainer(context, canvas) { var _this = _super.call(this, context, canvas) || this; _this.canvas = canvas; _this.intrinsicWidth = canvas.width; _this.intrinsicHeight = canvas.height; return _this; } return CanvasElementContainer; }(ElementContainer)); var SVGElementContainer = /** @class */ (function (_super) { __extends(SVGElementContainer, _super); function SVGElementContainer(context, img) { var _this = _super.call(this, context, img) || this; var s = new XMLSerializer(); var bounds = parseBounds(context, img); img.setAttribute('width', bounds.width + "px"); img.setAttribute('height', bounds.height + "px"); _this.svg = "data:image/svg+xml," + encodeURIComponent(s.serializeToString(img)); _this.intrinsicWidth = img.width.baseVal.value; _this.intrinsicHeight = img.height.baseVal.value; _this.context.cache.addImage(_this.svg); return _this; } return SVGElementContainer; }(ElementContainer)); var LIElementContainer = /** @class */ (function (_super) { __extends(LIElementContainer, _super); function LIElementContainer(context, element) { var _this = _super.call(this, context, element) || this; _this.value = element.value; return _this; } return LIElementContainer; }(ElementContainer)); var OLElementContainer = /** @class */ (function (_super) { __extends(OLElementContainer, _super); function OLElementContainer(context, element) { var _this = _super.call(this, context, element) || this; _this.start = element.start; _this.reversed = typeof element.reversed === 'boolean' && element.reversed === true; return _this; } return OLElementContainer; }(ElementContainer)); var CHECKBOX_BORDER_RADIUS = [ { type: 15 /* DIMENSION_TOKEN */, flags: 0, unit: 'px', number: 3 } ]; var RADIO_BORDER_RADIUS = [ { type: 16 /* PERCENTAGE_TOKEN */, flags: 0, number: 50 } ]; var reformatInputBounds = function (bounds) { if (bounds.width > bounds.height) { return new Bounds(bounds.left + (bounds.width - bounds.height) / 2, bounds.top, bounds.height, bounds.height); } else if (bounds.width < bounds.height) { return new Bounds(bounds.left, bounds.top + (bounds.height - bounds.width) / 2, bounds.width, bounds.width); } return bounds; }; var getInputValue = function (node) { var value = node.type === PASSWORD ? new Array(node.value.length + 1).join('\u2022') : node.value; return value.length === 0 ? node.placeholder || '' : value; }; var CHECKBOX = 'checkbox'; var RADIO = 'radio'; var PASSWORD = 'password'; var INPUT_COLOR = 0x2a2a2aff; var InputElementContainer = /** @class */ (function (_super) { __extends(InputElementContainer, _super); function InputElementContainer(context, input) { var _this = _super.call(this, context, input) || this; _this.type = input.type.toLowerCase(); _this.checked = input.checked; _this.value = getInputValue(input); if (_this.type === CHECKBOX || _this.type === RADIO) { _this.styles.backgroundColor = 0xdededeff; _this.styles.borderTopColor = _this.styles.borderRightColor = _this.styles.borderBottomColor = _this.styles.borderLeftColor = 0xa5a5a5ff; _this.styles.borderTopWidth = _this.styles.borderRightWidth = _this.styles.borderBottomWidth = _this.styles.borderLeftWidth = 1; _this.styles.borderTopStyle = _this.styles.borderRightStyle = _this.styles.borderBottomStyle = _this.styles.borderLeftStyle = 1 /* SOLID */; _this.styles.backgroundClip = [0 /* BORDER_BOX */]; _this.styles.backgroundOrigin = [0 /* BORDER_BOX */]; _this.bounds = reformatInputBounds(_this.bounds); } switch (_this.type) { case CHECKBOX: _this.styles.borderTopRightRadius = _this.styles.borderTopLeftRadius = _this.styles.borderBottomRightRadius = _this.styles.borderBottomLeftRadius = CHECKBOX_BORDER_RADIUS; break; case RADIO: _this.styles.borderTopRightRadius = _this.styles.borderTopLeftRadius = _this.styles.borderBottomRightRadius = _this.styles.borderBottomLeftRadius = RADIO_BORDER_RADIUS; break; } return _this; } return InputElementContainer; }(ElementContainer)); var SelectElementContainer = /** @class */ (function (_super) { __extends(SelectElementContainer, _super); function SelectElementContainer(context, element) { var _this = _super.call(this, context, element) || this; var option = element.options[element.selectedIndex || 0]; _this.value = option ? option.text || '' : ''; return _this; } return SelectElementContainer; }(ElementContainer)); var TextareaElementContainer = /** @class */ (function (_super) { __extends(TextareaElementContainer, _super); function TextareaElementContainer(context, element) { var _this = _super.call(this, context, element) || this; _this.value = element.value; return _this; } return TextareaElementContainer; }(ElementContainer)); var IFrameElementContainer = /** @class */ (function (_super) { __extends(IFrameElementContainer, _super); function IFrameElementContainer(context, iframe) { var _this = _super.call(this, context, iframe) || this; _this.src = iframe.src; _this.width = parseInt(iframe.width, 10) || 0; _this.height = parseInt(iframe.height, 10) || 0; _this.backgroundColor = _this.styles.backgroundColor; try { if (iframe.contentWindow && iframe.contentWindow.document && iframe.contentWindow.document.documentElement) { _this.tree = parseTree(context, iframe.contentWindow.document.documentElement); // http://www.w3.org/TR/css3-background/#special-backgrounds var documentBackgroundColor = iframe.contentWindow.document.documentElement ? parseColor(context, getComputedStyle(iframe.contentWindow.document.documentElement).backgroundColor) : COLORS.TRANSPARENT; var bodyBackgroundColor = iframe.contentWindow.document.body ? parseColor(context, getComputedStyle(iframe.contentWindow.document.body).backgroundColor) : COLORS.TRANSPARENT; _this.backgroundColor = isTransparent(documentBackgroundColor) ? isTransparent(bodyBackgroundColor) ? _this.styles.backgroundColor : bodyBackgroundColor : documentBackgroundColor; } } catch (e) { } return _this; } return IFrameElementContainer; }(ElementContainer)); var LIST_OWNERS = ['OL', 'UL', 'MENU']; var parseNodeTree = function (context, node, parent, root) { for (var childNode = node.firstChild, nextNode = void 0; childNode; childNode = nextNode) { nextNode = childNode.nextSibling; if (isTextNode(childNode) && childNode.data.trim().length > 0) { parent.textNodes.push(new TextContainer(context, childNode, parent.styles)); } else if (isElementNode(childNode)) { if (isSlotElement(childNode) && childNode.assignedNodes) { childNode.assignedNodes().forEach(function (childNode) { return parseNodeTree(context, childNode, parent, root); }); } else { var container = createContainer(context, childNode); if (container.styles.isVisible()) { if (createsRealStackingContext(childNode, container, root)) { container.flags |= 4 /* CREATES_REAL_STACKING_CONTEXT */; } else if (createsStackingContext(container.styles)) { container.flags |= 2 /* CREATES_STACKING_CONTEXT */; } if (LIST_OWNERS.indexOf(childNode.tagName) !== -1) { container.flags |= 8 /* IS_LIST_OWNER */; } parent.elements.push(container); childNode.slot; if (childNode.shadowRoot) { parseNodeTree(context, childNode.shadowRoot, container, root); } else if (!isTextareaElement(childNode) && !isSVGElement(childNode) && !isSelectElement(childNode)) { parseNodeTree(context, childNode, container, root); } } } } } }; var createContainer = function (context, element) { if (isImageElement(element)) { return new ImageElementContainer(context, element); } if (isCanvasElement(element)) { return new CanvasElementContainer(context, element); } if (isSVGElement(element)) { return new SVGElementContainer(context, element); } if (isLIElement(element)) { return new LIElementContainer(context, element); } if (isOLElement(element)) { return new OLElementContainer(context, element); } if (isInputElement(element)) { return new InputElementContainer(context, element); } if (isSelectElement(element)) { return new SelectElementContainer(context, element); } if (isTextareaElement(element)) { return new TextareaElementContainer(context, element); } if (isIFrameElement(element)) { return new IFrameElementContainer(context, element); } return new ElementContainer(context, element); }; var parseTree = function (context, element) { var container = createContainer(context, element); container.flags |= 4 /* CREATES_REAL_STACKING_CONTEXT */; parseNodeTree(context, element, container, container); return container; }; var createsRealStackingContext = function (node, container, root) { return (container.styles.isPositionedWithZIndex() || container.styles.opacity < 1 || container.styles.isTransformed() || (isBodyElement(node) && root.styles.isTransparent())); }; var createsStackingContext = function (styles) { return styles.isPositioned() || styles.isFloating(); }; var isTextNode = function (node) { return node.nodeType === Node.TEXT_NODE; }; var isElementNode = function (node) { return node.nodeType === Node.ELEMENT_NODE; }; var isHTMLElementNode = function (node) { return isElementNode(node) && typeof node.style !== 'undefined' && !isSVGElementNode(node); }; var isSVGElementNode = function (element) { return typeof element.className === 'object'; }; var isLIElement = function (node) { return node.tagName === 'LI'; }; var isOLElement = function (node) { return node.tagName === 'OL'; }; var isInputElement = function (node) { return node.tagName === 'INPUT'; }; var isHTMLElement = function (node) { return node.tagName === 'HTML'; }; var isSVGElement = function (node) { return node.tagName === 'svg'; }; var isBodyElement = function (node) { return node.tagName === 'BODY'; }; var isCanvasElement = function (node) { return node.tagName === 'CANVAS'; }; var isVideoElement = function (node) { return node.tagName === 'VIDEO'; }; var isImageElement = function (node) { return node.tagName === 'IMG'; }; var isIFrameElement = function (node) { return node.tagName === 'IFRAME'; }; var isStyleElement = function (node) { return node.tagName === 'STYLE'; }; var isScriptElement = function (node) { return node.tagName === 'SCRIPT'; }; var isTextareaElement = function (node) { return node.tagName === 'TEXTAREA'; }; var isSelectElement = function (node) { return node.tagName === 'SELECT'; }; var isSlotElement = function (node) { return node.tagName === 'SLOT'; }; // https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name var isCustomElement = function (node) { return node.tagName.indexOf('-') > 0; }; var CounterState = /** @class */ (function () { function CounterState() { this.counters = {}; } CounterState.prototype.getCounterValue = function (name) { var counter = this.counters[name]; if (counter && counter.length) { return counter[counter.length - 1]; } return 1; }; CounterState.prototype.getCounterValues = function (name) { var counter = this.counters[name]; return counter ? counter : []; }; CounterState.prototype.pop = function (counters) { var _this = this; counters.forEach(function (counter) { return _this.counters[counter].pop(); }); }; CounterState.prototype.parse = function (style) { var _this = this; var counterIncrement = style.counterIncrement; var counterReset = style.counterReset; var canReset = true; if (counterIncrement !== null) { counterIncrement.forEach(function (entry) { var counter = _this.counters[entry.counter]; if (counter && entry.increment !== 0) { canReset = false; if (!counter.length) { counter.push(1); } counter[Math.max(0, counter.length - 1)] += entry.increment; } }); } var counterNames = []; if (canReset) { counterReset.forEach(function (entry) { var counter = _this.counters[entry.counter]; counterNames.push(entry.counter); if (!counter) { counter = _this.counters[entry.counter] = []; } counter.push(entry.reset); }); } return counterNames; }; return CounterState; }()); var ROMAN_UPPER = { integers: [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1], values: ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'] }; var ARMENIAN = { integers: [ 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 ], values: [ 'Ք', 'Փ', 'Ւ', 'Ց', 'Ր', 'Տ', 'Վ', 'Ս', 'Ռ', 'Ջ', 'Պ', 'Չ', 'Ո', 'Շ', 'Ն', 'Յ', 'Մ', 'Ճ', 'Ղ', 'Ձ', 'Հ', 'Կ', 'Ծ', 'Խ', 'Լ', 'Ի', 'Ժ', 'Թ', 'Ը', 'Է', 'Զ', 'Ե', 'Դ', 'Գ', 'Բ', 'Ա' ] }; var HEBREW = { integers: [ 10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 19, 18, 17, 16, 15, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 ], values: [ 'י׳', 'ט׳', 'ח׳', 'ז׳', 'ו׳', 'ה׳', 'ד׳', 'ג׳', 'ב׳', 'א׳', 'ת', 'ש', 'ר', 'ק', 'צ', 'פ', 'ע', 'ס', 'נ', 'מ', 'ל', 'כ', 'יט', 'יח', 'יז', 'טז', 'טו', 'י', 'ט', 'ח', 'ז', 'ו', 'ה', 'ד', 'ג', 'ב', 'א' ] }; var GEORGIAN = { integers: [ 10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 ], values: [ 'ჵ', 'ჰ', 'ჯ', 'ჴ', 'ხ', 'ჭ', 'წ', 'ძ', 'ც', 'ჩ', 'შ', 'ყ', 'ღ', 'ქ', 'ფ', 'ჳ', 'ტ', 'ს', 'რ', 'ჟ', 'პ', 'ო', 'ჲ', 'ნ', 'მ', 'ლ', 'კ', 'ი', 'თ', 'ჱ', 'ზ', 'ვ', 'ე', 'დ', 'გ', 'ბ', 'ა' ] }; var createAdditiveCounter = function (value, min, max, symbols, fallback, suffix) { if (value < min || value > max) { return createCounterText(value, fallback, suffix.length > 0); } return (symbols.integers.reduce(function (string, integer, index) { while (value >= integer) { value -= integer; string += symbols.values[index]; } return string; }, '') + suffix); }; var createCounterStyleWithSymbolResolver = function (value, codePointRangeLength, isNumeric, resolver) { var string = ''; do { if (!isNumeric) { value--; } string = resolver(value) + string; value /= codePointRangeLength; } while (value * codePointRangeLength >= codePointRangeLength); return string; }; var createCounterStyleFromRange = function (value, codePointRangeStart, codePointRangeEnd, isNumeric, suffix) { var codePointRangeLength = codePointRangeEnd - codePointRangeStart + 1; return ((value < 0 ? '-' : '') + (createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, isNumeric, function (codePoint) { return fromCodePoint$1(Math.floor(codePoint % codePointRangeLength) + codePointRangeStart); }) + suffix)); }; var createCounterStyleFromSymbols = function (value, symbols, suffix) { if (suffix === void 0) { suffix = '. '; } var codePointRangeLength = symbols.length; return (createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, false, function (codePoint) { return symbols[Math.floor(codePoint % codePointRangeLength)]; }) + suffix); }; var CJK_ZEROS = 1 << 0; var CJK_TEN_COEFFICIENTS = 1 << 1; var CJK_TEN_HIGH_COEFFICIENTS = 1 << 2; var CJK_HUNDRED_COEFFICIENTS = 1 << 3; var createCJKCounter = function (value, numbers, multipliers, negativeSign, suffix, flags) { if (value < -9999 || value > 9999) { return createCounterText(value, 4 /* CJK_DECIMAL */, suffix.length > 0); } var tmp = Math.abs(value); var string = suffix; if (tmp === 0) { return numbers[0] + string; } for (var digit = 0; tmp > 0 && digit <= 4; digit++) { var coefficient = tmp % 10; if (coefficient === 0 && contains(flags, CJK_ZEROS) && string !== '') { string = numbers[coefficient] + string; } else if (coefficient > 1 || (coefficient === 1 && digit === 0) || (coefficient === 1 && digit === 1 && contains(flags, CJK_TEN_COEFFICIENTS)) || (coefficient === 1 && digit === 1 && contains(flags, CJK_TEN_HIGH_COEFFICIENTS) && value > 100) || (coefficient === 1 && digit > 1 && contains(flags, CJK_HUNDRED_COEFFICIENTS))) { string = numbers[coefficient] + (digit > 0 ? multipliers[digit - 1] : '') + string; } else if (coefficient === 1 && digit > 0) { string = multipliers[digit - 1] + string; } tmp = Math.floor(tmp / 10); } return (value < 0 ? negativeSign : '') + string; }; var CHINESE_INFORMAL_MULTIPLIERS = '十百千萬'; var CHINESE_FORMAL_MULTIPLIERS = '拾佰仟萬'; var JAPANESE_NEGATIVE = 'マイナス'; var KOREAN_NEGATIVE = '마이너스'; var createCounterText = function (value, type, appendSuffix) { var defaultSuffix = appendSuffix ? '. ' : ''; var cjkSuffix = appendSuffix ? '、' : ''; var koreanSuffix = appendSuffix ? ', ' : ''; var spaceSuffix = appendSuffix ? ' ' : ''; switch (type) { case 0 /* DISC */: return '•' + spaceSuffix; case 1 /* CIRCLE */: return '◦' + spaceSuffix; case 2 /* SQUARE */: return '◾' + spaceSuffix; case 5 /* DECIMAL_LEADING_ZERO */: var string = createCounterStyleFromRange(value, 48, 57, true, defaultSuffix); return string.length < 4 ? "0" + string : string; case 4 /* CJK_DECIMAL */: return createCounterStyleFromSymbols(value, '〇一二三四五六七八九', cjkSuffix); case 6 /* LOWER_ROMAN */: return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, 3 /* DECIMAL */, defaultSuffix).toLowerCase(); case 7 /* UPPER_ROMAN */: return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, 3 /* DECIMAL */, defaultSuffix); case 8 /* LOWER_GREEK */: return createCounterStyleFromRange(value, 945, 969, false, defaultSuffix); case 9 /* LOWER_ALPHA */: return createCounterStyleFromRange(value, 97, 122, false, defaultSuffix); case 10 /* UPPER_ALPHA */: return createCounterStyleFromRange(value, 65, 90, false, defaultSuffix); case 11 /* ARABIC_INDIC */: return createCounterStyleFromRange(value, 1632, 1641, true, defaultSuffix); case 12 /* ARMENIAN */: case 49 /* UPPER_ARMENIAN */: return createAdditiveCounter(value, 1, 9999, ARMENIAN, 3 /* DECIMAL */, defaultSuffix); case 35 /* LOWER_ARMENIAN */: return createAdditiveCounter(value, 1, 9999, ARMENIAN, 3 /* DECIMAL */, defaultSuffix).toLowerCase(); case 13 /* BENGALI */: return createCounterStyleFromRange(value, 2534, 2543, true, defaultSuffix); case 14 /* CAMBODIAN */: case 30 /* KHMER */: return createCounterStyleFromRange(value, 6112, 6121, true, defaultSuffix); case 15 /* CJK_EARTHLY_BRANCH */: return createCounterStyleFromSymbols(value, '子丑寅卯辰巳午未申酉戌亥', cjkSuffix); case 16 /* CJK_HEAVENLY_STEM */: return createCounterStyleFromSymbols(value, '甲乙丙丁戊己庚辛壬癸', cjkSuffix); case 17 /* CJK_IDEOGRAPHIC */: case 48 /* TRAD_CHINESE_INFORMAL */: return createCJKCounter(value, '零一二三四五六七八九', CHINESE_INFORMAL_MULTIPLIERS, '負', cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS); case 47 /* TRAD_CHINESE_FORMAL */: return createCJKCounter(value, '零壹貳參肆伍陸柒捌玖', CHINESE_FORMAL_MULTIPLIERS, '負', cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS); case 42 /* SIMP_CHINESE_INFORMAL */: return createCJKCounter(value, '零一二三四五六七八九', CHINESE_INFORMAL_MULTIPLIERS, '负', cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS); case 41 /* SIMP_CHINESE_FORMAL */: return createCJKCounter(value, '零壹贰叁肆伍陆柒捌玖', CHINESE_FORMAL_MULTIPLIERS, '负', cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS); case 26 /* JAPANESE_INFORMAL */: return createCJKCounter(value, '〇一二三四五六七八九', '十百千万', JAPANESE_NEGATIVE, cjkSuffix, 0); case 25 /* JAPANESE_FORMAL */: return createCJKCounter(value, '零壱弐参四伍六七八九', '拾百千万', JAPANESE_NEGATIVE, cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS); case 31 /* KOREAN_HANGUL_FORMAL */: return createCJKCounter(value, '영일이삼사오육칠팔구', '십백천만', KOREAN_NEGATIVE, koreanSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS); case 33 /* KOREAN_HANJA_INFORMAL */: return createCJKCounter(value, '零一二三四五六七八九', '十百千萬', KOREAN_NEGATIVE, koreanSuffix, 0); case 32 /* KOREAN_HANJA_FORMAL */: return createCJKCounter(value, '零壹貳參四五六七八九', '拾百千', KOREAN_NEGATIVE, koreanSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS); case 18 /* DEVANAGARI */: return createCounterStyleFromRange(value, 0x966, 0x96f, true, defaultSuffix); case 20 /* GEORGIAN */: return createAdditiveCounter(value, 1, 19999, GEORGIAN, 3 /* DECIMAL */, defaultSuffix); case 21 /* GUJARATI */: return createCounterStyleFromRange(value, 0xae6, 0xaef, true, defaultSuffix); case 22 /* GURMUKHI */: return createCounterStyleFromRange(value, 0xa66, 0xa6f, true, defaultSuffix); case 22 /* HEBREW */: return createAdditiveCounter(value, 1, 10999, HEBREW, 3 /* DECIMAL */, defaultSuffix); case 23 /* HIRAGANA */: return createCounterStyleFromSymbols(value, 'あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん'); case 24 /* HIRAGANA_IROHA */: return createCounterStyleFromSymbols(value, 'いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす'); case 27 /* KANNADA */: return createCounterStyleFromRange(value, 0xce6, 0xcef, true, defaultSuffix); case 28 /* KATAKANA */: return createCounterStyleFromSymbols(value, 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン', cjkSuffix); case 29 /* KATAKANA_IROHA */: return createCounterStyleFromSymbols(value, 'イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス', cjkSuffix); case 34 /* LAO */: return createCounterStyleFromRange(value, 0xed0, 0xed9, true, defaultSuffix); case 37 /* MONGOLIAN */: return createCounterStyleFromRange(value, 0x1810, 0x1819, true, defaultSuffix); case 38 /* MYANMAR */: return createCounterStyleFromRange(value, 0x1040, 0x1049, true, defaultSuffix); case 39 /* ORIYA */: return createCounterStyleFromRange(value, 0xb66, 0xb6f, true, defaultSuffix); case 40 /* PERSIAN */: return createCounterStyleFromRange(value, 0x6f0, 0x6f9, true, defaultSuffix); case 43 /* TAMIL */: return createCounterStyleFromRange(value, 0xbe6, 0xbef, true, defaultSuffix); case 44 /* TELUGU */: return createCounterStyleFromRange(value, 0xc66, 0xc6f, true, defaultSuffix); case 45 /* THAI */: return createCounterStyleFromRange(value, 0xe50, 0xe59, true, defaultSuffix); case 46 /* TIBETAN */: return createCounterStyleFromRange(value, 0xf20, 0xf29, true, defaultSuffix); case 3 /* DECIMAL */: default: return createCounterStyleFromRange(value, 48, 57, true, defaultSuffix); } }; var IGNORE_ATTRIBUTE = 'data-html2canvas-ignore'; var DocumentCloner = /** @class */ (function () { function DocumentCloner(context, element, options) { this.context = context; this.options = options; this.scrolledElements = []; this.referenceElement = element; this.counters = new CounterState(); this.quoteDepth = 0; if (!element.ownerDocument) { throw new Error('Cloned element does not have an owner document'); } this.documentElement = this.cloneNode(element.ownerDocument.documentElement, false); } DocumentCloner.prototype.toIFrame = function (ownerDocument, windowSize) { var _this = this; var iframe = createIFrameContainer(ownerDocument, windowSize); if (!iframe.contentWindow) { return Promise.reject("Unable to find iframe window"); } var scrollX = ownerDocument.defaultView.pageXOffset; var scrollY = ownerDocument.defaultView.pageYOffset; var cloneWindow = iframe.contentWindow; var documentClone = cloneWindow.document; /* Chrome doesn't detect relative background-images assigned in inline <style> sheets when fetched through getComputedStyle if window url is about:blank, we can assign the url to current by writing onto the document */ var iframeLoad = iframeLoader(iframe).then(function () { return __awaiter(_this, void 0, void 0, function () { var onclone, referenceElement; return __generator(this, function (_a) { switch (_a.label) { case 0: this.scrolledElements.forEach(restoreNodeScroll); if (cloneWindow) { cloneWindow.scrollTo(windowSize.left, windowSize.top); if (/(iPad|iPhone|iPod)/g.test(navigator.userAgent) && (cloneWindow.scrollY !== windowSize.top || cloneWindow.scrollX !== windowSize.left)) { this.context.logger.warn('Unable to restore scroll position for cloned document'); this.context.windowBounds = this.context.windowBounds.add(cloneWindow.scrollX - windowSize.left, cloneWindow.scrollY - windowSize.top, 0, 0); } } onclone = this.options.onclone; referenceElement = this.clonedReferenceElement; if (typeof referenceElement === 'undefined') { return [2 /*return*/, Promise.reject("Error finding the " + this.referenceElement.nodeName + " in the cloned document")]; } if (!(documentClone.fonts && documentClone.fonts.ready)) return [3 /*break*/, 2]; return [4 /*yield*/, documentClone.fonts.ready]; case 1: _a.sent(); _a.label = 2; case 2: if (!/(AppleWebKit)/g.test(navigator.userAgent)) return [3 /*break*/, 4]; return [4 /*yield*/, imagesReady(documentClone)]; case 3: _a.sent(); _a.label = 4; case 4: if (typeof onclone === 'function') { return [2 /*return*/, Promise.resolve() .then(function () { return onclone(documentClone, referenceElement); }) .then(function () { return iframe; })]; } return [2 /*return*/, iframe]; } }); }); }); documentClone.open(); documentClone.write(serializeDoctype(document.doctype) + "<html></html>"); // Chrome scrolls the parent document for some reason after the write to the cloned window??? restoreOwnerScroll(this.referenceElement.ownerDocument, scrollX, scrollY); documentClone.replaceChild(documentClone.adoptNode(this.documentElement), documentClone.documentElement); documentClone.close(); return iframeLoad; }; DocumentCloner.prototype.createElementClone = function (node) { if (isDebugging(node, 2 /* CLONE */)) { debugger; } if (isCanvasElement(node)) { return this.createCanvasClone(node); } if (isVideoElement(node)) { return this.createVideoClone(node); } if (isStyleElement(node)) { return this.createStyleClone(node); } var clone = node.cloneNode(false); if (isImageElement(clone)) { if (isImageElement(node) && node.currentSrc && node.currentSrc !== node.src) { clone.src = node.currentSrc; clone.srcset = ''; } if (clone.loading === 'lazy') { clone.loading = 'eager'; } } if (isCustomElement(clone)) { return this.createCustomElementClone(clone); } return clone; }; DocumentCloner.prototype.createCustomElementClone = function (node) { var clone = document.createElement('html2canvascustomelement'); copyCSSStyles(node.style, clone); return clone; }; DocumentCloner.prototype.createStyleClone = function (node) { try { var sheet = node.sheet; if (sheet && sheet.cssRules) { var css = [].slice.call(sheet.cssRules, 0).reduce(function (css, rule) { if (rule && typeof rule.cssText === 'string') { return css + rule.cssText; } return css; }, ''); var style = node.cloneNode(false); style.textContent = css; return style; } } catch (e) { // accessing node.sheet.cssRules throws a DOMException this.context.logger.error('Unable to access cssRules property', e); if (e.name !== 'SecurityError') { throw e; } } return node.cloneNode(false); }; DocumentCloner.prototype.createCanvasClone = function (canvas) { var _a; if (this.options.inlineImages && canvas.ownerDocument) { var img = canvas.ownerDocument.createElement('img'); try { img.src = canvas.toDataURL(); return img; } catch (e) { this.context.logger.info("Unable to inline canvas contents, canvas is tainted", canvas); } } var clonedCanvas = canvas.cloneNode(false); try { clonedCanvas.width = canvas.width; clonedCanvas.height = canvas.height; var ctx = canvas.getContext('2d'); var clonedCtx = clonedCanvas.getContext('2d'); if (clonedCtx) { if (!this.options.allowTaint && ctx) { clonedCtx.putImageData(ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0); } else { var gl = (_a = canvas.getContext('webgl2')) !== null && _a !== void 0 ? _a : canvas.getContext('webgl'); if (gl) { var attribs = gl.getContextAttributes(); if ((attribs === null || attribs === void 0 ? void 0 : attribs.preserveDrawingBuffer) === false) { this.context.logger.warn('Unable to clone WebGL context as it has preserveDrawingBuffer=false', canvas); } } clonedCtx.drawImage(canvas, 0, 0); } } return clonedCanvas; } catch (e) { this.context.logger.info("Unable to clone canvas as it is tainted", canvas); } return clonedCanvas; }; DocumentCloner.prototype.createVideoClone = function (video) { var canvas = video.ownerDocument.createElement('canvas'); canvas.width = video.offsetWidth; canvas.height = video.offsetHeight; var ctx = canvas.getContext('2d'); try { if (ctx) { ctx.drawImage(video, 0, 0, canvas.width, canvas.height); if (!this.options.allowTaint) { ctx.getImageData(0, 0, canvas.width, canvas.height); } } return canvas; } catch (e) { this.context.logger.info("Unable to clone video as it is tainted", video); } var blankCanvas = video.ownerDocument.createElement('canvas'); blankCanvas.width = video.offsetWidth; blankCanvas.height = video.offsetHeight; return blankCanvas; }; DocumentCloner.prototype.appendChildNode = function (clone, child, copyStyles) { if (!isElementNode(child) || (!isScriptElement(child) && !child.hasAttribute(IGNORE_ATTRIBUTE) && (typeof this.options.ignoreElements !== 'function' || !this.options.ignoreElements(child)))) { if (!this.options.copyStyles || !isElementNode(child) || !isStyleElement(child)) { clone.appendChild(this.cloneNode(child, copyStyles)); } } }; DocumentCloner.prototype.cloneChildNodes = function (node, clone, copyStyles) { var _this = this; for (var child = node.shadowRoot ? node.shadowRoot.firstChild : node.firstChild; child; child = child.nextSibling) { if (isElementNode(child) && isSlotElement(child) && typeof child.assignedNodes === 'function') { var assignedNodes = child.assignedNodes(); if (assignedNodes.length) { assignedNodes.forEach(function (assignedNode) { return _this.appendChildNode(clone, assignedNode, copyStyles); }); } } else { this.appendChildNode(clone, child, copyStyles); } } }; DocumentCloner.prototype.cloneNode = function (node, copyStyles) { if (isTextNode(node)) { return document.createTextNode(node.data); } if (!node.ownerDocument) { return node.cloneNode(false); } var window = node.ownerDocument.defaultView; if (window && isElementNode(node) && (isHTMLElementNode(node) || isSVGElementNode(node))) { var clone = this.createElementClone(node); clone.style.transitionProperty = 'none'; var style = window.getComputedStyle(node); var styleBefore = window.getComputedStyle(node, ':before'); var styleAfter = window.getComputedStyle(node, ':after'); if (this.referenceElement === node && isHTMLElementNode(clone)) { this.clonedReferenceElement = clone; } if (isBodyElement(clone)) { createPseudoHideStyles(clone); } var counters = this.counters.parse(new CSSParsedCounterDeclaration(this.context, style)); var before = this.resolvePseudoContent(node, clone, styleBefore, PseudoElementType.BEFORE); if (isCustomElement(node)) { copyStyles = true; } if (!isVideoElement(node)) { this.cloneChildNodes(node, clone, copyStyles); } if (before) { clone.insertBefore(before, clone.firstChild); } var after = this.resolvePseudoContent(node, clone, styleAfter, PseudoElementType.AFTER); if (after) { clone.appendChild(after); } this.counters.pop(counters); if ((style && (this.options.copyStyles || isSVGElementNode(node)) && !isIFrameElement(node)) || copyStyles) { copyCSSStyles(style, clone); } if (node.scrollTop !== 0 || node.scrollLeft !== 0) { this.scrolledElements.push([clone, node.scrollLeft, node.scrollTop]); } if ((isTextareaElement(node) || isSelectElement(node)) && (isTextareaElement(clone) || isSelectElement(clone))) { clone.value = node.value; } return clone; } return node.cloneNode(false); }; DocumentCloner.prototype.resolvePseudoContent = function (node, clone, style, pseudoElt) { var _this = this; if (!style) { return; } var value = style.content; var document = clone.ownerDocument; if (!document || !value || value === 'none' || value === '-moz-alt-content' || style.display === 'none') { return; } this.counters.parse(new CSSParsedCounterDeclaration(this.context, style)); var declaration = new CSSParsedPseudoDeclaration(this.context, style); var anonymousReplacedElement = document.createElement('html2canvaspseudoelement'); copyCSSStyles(style, anonymousReplacedElement); declaration.content.forEach(function (token) { if (token.type === 0 /* STRING_TOKEN */) { anonymousReplacedElement.appendChild(document.createTextNode(token.value)); } else if (token.type === 22 /* URL_TOKEN */) { var img = document.createElement('img'); img.src = token.value; img.style.opacity = '1'; anonymousReplacedElement.appendChild(img); } else if (token.type === 18 /* FUNCTION */) { if (token.name === 'attr') { var attr = token.values.filter(isIdentToken); if (attr.length) { anonymousReplacedElement.appendChild(document.createTextNode(node.getAttribute(attr[0].value) || '')); } } else if (token.name === 'counter') { var _a = token.values.filter(nonFunctionArgSeparator), counter = _a[0], counterStyle = _a[1]; if (counter && isIdentToken(counter)) { var counterState = _this.counters.getCounterValue(counter.value); var counterType = counterStyle && isIdentToken(counterStyle) ? listStyleType.parse(_this.context, counterStyle.value) : 3 /* DECIMAL */; anonymousReplacedElement.appendChild(document.createTextNode(createCounterText(counterState, counterType, false))); } } else if (token.name === 'counters') { var _b = token.values.filter(nonFunctionArgSeparator), counter = _b[0], delim = _b[1], counterStyle = _b[2]; if (counter && isIdentToken(counter)) { var counterStates = _this.counters.getCounterValues(counter.value); var counterType_1 = counterStyle && isIdentToken(counterStyle) ? listStyleType.parse(_this.context, counterStyle.value) : 3 /* DECIMAL */; var separator = delim && delim.type === 0 /* STRING_TOKEN */ ? delim.value : ''; var text = counterStates .map(function (value) { return createCounterText(value, counterType_1, false); }) .join(separator); anonymousReplacedElement.appendChild(document.createTextNode(text)); } } else ; } else if (token.type === 20 /* IDENT_TOKEN */) { switch (token.value) { case 'open-quote': anonymousReplacedElement.appendChild(document.createTextNode(getQuote(declaration.quotes, _this.quoteDepth++, true))); break; case 'close-quote': anonymousReplacedElement.appendChild(document.createTextNode(getQuote(declaration.quotes, --_this.quoteDepth, false))); break; default: // safari doesn't parse string tokens correctly because of lack of quotes anonymousReplacedElement.appendChild(document.createTextNode(token.value)); } } }); anonymousReplacedElement.className = PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + " " + PSEUDO_HIDE_ELEMENT_CLASS_AFTER; var newClassName = pseudoElt === PseudoElementType.BEFORE ? " " + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE : " " + PSEUDO_HIDE_ELEMENT_CLASS_AFTER; if (isSVGElementNode(clone)) { clone.className.baseValue += newClassName; } else { clone.className += newClassName; } return anonymousReplacedElement; }; DocumentCloner.destroy = function (container) { if (container.parentNode) { container.parentNode.removeChild(container); return true; } return false; }; return DocumentCloner; }()); var PseudoElementType; (function (PseudoElementType) { PseudoElementType[PseudoElementType["BEFORE"] = 0] = "BEFORE"; PseudoElementType[PseudoElementType["AFTER"] = 1] = "AFTER"; })(PseudoElementType || (PseudoElementType = {})); var createIFrameContainer = function (ownerDocument, bounds) { var cloneIframeContainer = ownerDocument.createElement('iframe'); cloneIframeContainer.className = 'html2canvas-container'; cloneIframeContainer.style.visibility = 'hidden'; cloneIframeContainer.style.position = 'fixed'; cloneIframeContainer.style.left = '-10000px'; cloneIframeContainer.style.top = '0px'; cloneIframeContainer.style.border = '0'; cloneIframeContainer.width = bounds.width.toString(); cloneIframeContainer.height = bounds.height.toString(); cloneIframeContainer.scrolling = 'no'; // ios won't scroll without it cloneIframeContainer.setAttribute(IGNORE_ATTRIBUTE, 'true'); ownerDocument.body.appendChild(cloneIframeContainer); return cloneIframeContainer; }; var imageReady = function (img) { return new Promise(function (resolve) { if (img.complete) { resolve(); return; } if (!img.src) { resolve(); return; } img.onload = resolve; img.onerror = resolve; }); }; var imagesReady = function (document) { return Promise.all([].slice.call(document.images, 0).map(imageReady)); }; var iframeLoader = function (iframe) { return new Promise(function (resolve, reject) { var cloneWindow = iframe.contentWindow; if (!cloneWindow) { return reject("No window assigned for iframe"); } var documentClone = cloneWindow.document; cloneWindow.onload = iframe.onload = function () { cloneWindow.onload = iframe.onload = null; var interval = setInterval(function () { if (documentClone.body.childNodes.length > 0 && documentClone.readyState === 'complete') { clearInterval(interval); resolve(iframe); } }, 50); }; }); }; var ignoredStyleProperties = [ 'all', 'd', 'content' // Safari shows pseudoelements if content is set ]; var copyCSSStyles = function (style, target) { // Edge does not provide value for cssText for (var i = style.length - 1; i >= 0; i--) { var property = style.item(i); if (ignoredStyleProperties.indexOf(property) === -1) { target.style.setProperty(property, style.getPropertyValue(property)); } } return target; }; var serializeDoctype = function (doctype) { var str = ''; if (doctype) { str += '<!DOCTYPE '; if (doctype.name) { str += doctype.name; } if (doctype.internalSubset) { str += doctype.internalSubset; } if (doctype.publicId) { str += "\"" + doctype.publicId + "\""; } if (doctype.systemId) { str += "\"" + doctype.systemId + "\""; } str += '>'; } return str; }; var restoreOwnerScroll = function (ownerDocument, x, y) { if (ownerDocument && ownerDocument.defaultView && (x !== ownerDocument.defaultView.pageXOffset || y !== ownerDocument.defaultView.pageYOffset)) { ownerDocument.defaultView.scrollTo(x, y); } }; var restoreNodeScroll = function (_a) { var element = _a[0], x = _a[1], y = _a[2]; element.scrollLeft = x; element.scrollTop = y; }; var PSEUDO_BEFORE = ':before'; var PSEUDO_AFTER = ':after'; var PSEUDO_HIDE_ELEMENT_CLASS_BEFORE = '___html2canvas___pseudoelement_before'; var PSEUDO_HIDE_ELEMENT_CLASS_AFTER = '___html2canvas___pseudoelement_after'; var PSEUDO_HIDE_ELEMENT_STYLE = "{\n content: \"\" !important;\n display: none !important;\n}"; var createPseudoHideStyles = function (body) { createStyles(body, "." + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + PSEUDO_BEFORE + PSEUDO_HIDE_ELEMENT_STYLE + "\n ." + PSEUDO_HIDE_ELEMENT_CLASS_AFTER + PSEUDO_AFTER + PSEUDO_HIDE_ELEMENT_STYLE); }; var createStyles = function (body, styles) { var document = body.ownerDocument; if (document) { var style = document.createElement('style'); style.textContent = styles; body.appendChild(style); } }; var CacheStorage = /** @class */ (function () { function CacheStorage() { } CacheStorage.getOrigin = function (url) { var link = CacheStorage._link; if (!link) { return 'about:blank'; } link.href = url; link.href = link.href; // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/ return link.protocol + link.hostname + link.port; }; CacheStorage.isSameOrigin = function (src) { return CacheStorage.getOrigin(src) === CacheStorage._origin; }; CacheStorage.setContext = function (window) { CacheStorage._link = window.document.createElement('a'); CacheStorage._origin = CacheStorage.getOrigin(window.location.href); }; CacheStorage._origin = 'about:blank'; return CacheStorage; }()); var Cache = /** @class */ (function () { function Cache(context, _options) { this.context = context; this._options = _options; // eslint-disable-next-line @typescript-eslint/no-explicit-any this._cache = {}; } Cache.prototype.addImage = function (src) { var result = Promise.resolve(); if (this.has(src)) { return result; } if (isBlobImage(src) || isRenderable(src)) { (this._cache[src] = this.loadImage(src)).catch(function () { // prevent unhandled rejection }); return result; } return result; }; // eslint-disable-next-line @typescript-eslint/no-explicit-any Cache.prototype.match = function (src) { return this._cache[src]; }; Cache.prototype.loadImage = function (key) { return __awaiter(this, void 0, void 0, function () { var isSameOrigin, useCORS, useProxy, src; var _this = this; return __generator(this, function (_a) { switch (_a.label) { case 0: isSameOrigin = CacheStorage.isSameOrigin(key); useCORS = !isInlineImage(key) && this._options.useCORS === true && FEATURES.SUPPORT_CORS_IMAGES && !isSameOrigin; useProxy = !isInlineImage(key) && !isSameOrigin && !isBlobImage(key) && typeof this._options.proxy === 'string' && FEATURES.SUPPORT_CORS_XHR && !useCORS; if (!isSameOrigin && this._options.allowTaint === false && !isInlineImage(key) && !isBlobImage(key) && !useProxy && !useCORS) { return [2 /*return*/]; } src = key; if (!useProxy) return [3 /*break*/, 2]; return [4 /*yield*/, this.proxy(src)]; case 1: src = _a.sent(); _a.label = 2; case 2: this.context.logger.debug("Added image " + key.substring(0, 256)); return [4 /*yield*/, new Promise(function (resolve, reject) { var img = new Image(); img.onload = function () { return resolve(img); }; img.onerror = reject; //ios safari 10.3 taints canvas with data urls unless crossOrigin is set to anonymous if (isInlineBase64Image(src) || useCORS) { img.crossOrigin = 'anonymous'; } img.src = src; if (img.complete === true) { // Inline XML images may fail to parse, throwing an Error later on setTimeout(function () { return resolve(img); }, 500); } if (_this._options.imageTimeout > 0) { setTimeout(function () { return reject("Timed out (" + _this._options.imageTimeout + "ms) loading image"); }, _this._options.imageTimeout); } })]; case 3: return [2 /*return*/, _a.sent()]; } }); }); }; Cache.prototype.has = function (key) { return typeof this._cache[key] !== 'undefined'; }; Cache.prototype.keys = function () { return Promise.resolve(Object.keys(this._cache)); }; Cache.prototype.proxy = function (src) { var _this = this; var proxy = this._options.proxy; if (!proxy) { throw new Error('No proxy defined'); } var key = src.substring(0, 256); return new Promise(function (resolve, reject) { var responseType = FEATURES.SUPPORT_RESPONSE_TYPE ? 'blob' : 'text'; var xhr = new XMLHttpRequest(); xhr.onload = function () { if (xhr.status === 200) { if (responseType === 'text') { resolve(xhr.response); } else { var reader_1 = new FileReader(); reader_1.addEventListener('load', function () { return resolve(reader_1.result); }, false); reader_1.addEventListener('error', function (e) { return reject(e); }, false); reader_1.readAsDataURL(xhr.response); } } else { reject("Failed to proxy resource " + key + " with status code " + xhr.status); } }; xhr.onerror = reject; var queryString = proxy.indexOf('?') > -1 ? '&' : '?'; xhr.open('GET', "" + proxy + queryString + "url=" + encodeURIComponent(src) + "&responseType=" + responseType); if (responseType !== 'text' && xhr instanceof XMLHttpRequest) { xhr.responseType = responseType; } if (_this._options.imageTimeout) { var timeout_1 = _this._options.imageTimeout; xhr.timeout = timeout_1; xhr.ontimeout = function () { return reject("Timed out (" + timeout_1 + "ms) proxying " + key); }; } xhr.send(); }); }; return Cache; }()); var INLINE_SVG = /^data:image\/svg\+xml/i; var INLINE_BASE64 = /^data:image\/.*;base64,/i; var INLINE_IMG = /^data:image\/.*/i; var isRenderable = function (src) { return FEATURES.SUPPORT_SVG_DRAWING || !isSVG(src); }; var isInlineImage = function (src) { return INLINE_IMG.test(src); }; var isInlineBase64Image = function (src) { return INLINE_BASE64.test(src); }; var isBlobImage = function (src) { return src.substr(0, 4) === 'blob'; }; var isSVG = function (src) { return src.substr(-3).toLowerCase() === 'svg' || INLINE_SVG.test(src); }; var Vector = /** @class */ (function () { function Vector(x, y) { this.type = 0 /* VECTOR */; this.x = x; this.y = y; } Vector.prototype.add = function (deltaX, deltaY) { return new Vector(this.x + deltaX, this.y + deltaY); }; return Vector; }()); var lerp = function (a, b, t) { return new Vector(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t); }; var BezierCurve = /** @class */ (function () { function BezierCurve(start, startControl, endControl, end) { this.type = 1 /* BEZIER_CURVE */; this.start = start; this.startControl = startControl; this.endControl = endControl; this.end = end; } BezierCurve.prototype.subdivide = function (t, firstHalf) { var ab = lerp(this.start, this.startControl, t); var bc = lerp(this.startControl, this.endControl, t); var cd = lerp(this.endControl, this.end, t); var abbc = lerp(ab, bc, t); var bccd = lerp(bc, cd, t); var dest = lerp(abbc, bccd, t); return firstHalf ? new BezierCurve(this.start, ab, abbc, dest) : new BezierCurve(dest, bccd, cd, this.end); }; BezierCurve.prototype.add = function (deltaX, deltaY) { return new BezierCurve(this.start.add(deltaX, deltaY), this.startControl.add(deltaX, deltaY), this.endControl.add(deltaX, deltaY), this.end.add(deltaX, deltaY)); }; BezierCurve.prototype.reverse = function () { return new BezierCurve(this.end, this.endControl, this.startControl, this.start); }; return BezierCurve; }()); var isBezierCurve = function (path) { return path.type === 1 /* BEZIER_CURVE */; }; var BoundCurves = /** @class */ (function () { function BoundCurves(element) { var styles = element.styles; var bounds = element.bounds; var _a = getAbsoluteValueForTuple(styles.borderTopLeftRadius, bounds.width, bounds.height), tlh = _a[0], tlv = _a[1]; var _b = getAbsoluteValueForTuple(styles.borderTopRightRadius, bounds.width, bounds.height), trh = _b[0], trv = _b[1]; var _c = getAbsoluteValueForTuple(styles.borderBottomRightRadius, bounds.width, bounds.height), brh = _c[0], brv = _c[1]; var _d = getAbsoluteValueForTuple(styles.borderBottomLeftRadius, bounds.width, bounds.height), blh = _d[0], blv = _d[1]; var factors = []; factors.push((tlh + trh) / bounds.width); factors.push((blh + brh) / bounds.width); factors.push((tlv + blv) / bounds.height); factors.push((trv + brv) / bounds.height); var maxFactor = Math.max.apply(Math, factors); if (maxFactor > 1) { tlh /= maxFactor; tlv /= maxFactor; trh /= maxFactor; trv /= maxFactor; brh /= maxFactor; brv /= maxFactor; blh /= maxFactor; blv /= maxFactor; } var topWidth = bounds.width - trh; var rightHeight = bounds.height - brv; var bottomWidth = bounds.width - brh; var leftHeight = bounds.height - blv; var borderTopWidth = styles.borderTopWidth; var borderRightWidth = styles.borderRightWidth; var borderBottomWidth = styles.borderBottomWidth; var borderLeftWidth = styles.borderLeftWidth; var paddingTop = getAbsoluteValue(styles.paddingTop, element.bounds.width); var paddingRight = getAbsoluteValue(styles.paddingRight, element.bounds.width); var paddingBottom = getAbsoluteValue(styles.paddingBottom, element.bounds.width); var paddingLeft = getAbsoluteValue(styles.paddingLeft, element.bounds.width); this.topLeftBorderDoubleOuterBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth / 3, bounds.top + borderTopWidth / 3, tlh - borderLeftWidth / 3, tlv - borderTopWidth / 3, CORNER.TOP_LEFT) : new Vector(bounds.left + borderLeftWidth / 3, bounds.top + borderTopWidth / 3); this.topRightBorderDoubleOuterBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth / 3, trh - borderRightWidth / 3, trv - borderTopWidth / 3, CORNER.TOP_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth / 3, bounds.top + borderTopWidth / 3); this.bottomRightBorderDoubleOuterBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth / 3, brv - borderBottomWidth / 3, CORNER.BOTTOM_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth / 3, bounds.top + bounds.height - borderBottomWidth / 3); this.bottomLeftBorderDoubleOuterBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth / 3, bounds.top + leftHeight, blh - borderLeftWidth / 3, blv - borderBottomWidth / 3, CORNER.BOTTOM_LEFT) : new Vector(bounds.left + borderLeftWidth / 3, bounds.top + bounds.height - borderBottomWidth / 3); this.topLeftBorderDoubleInnerBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + (borderTopWidth * 2) / 3, tlh - (borderLeftWidth * 2) / 3, tlv - (borderTopWidth * 2) / 3, CORNER.TOP_LEFT) : new Vector(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + (borderTopWidth * 2) / 3); this.topRightBorderDoubleInnerBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top + (borderTopWidth * 2) / 3, trh - (borderRightWidth * 2) / 3, trv - (borderTopWidth * 2) / 3, CORNER.TOP_RIGHT) : new Vector(bounds.left + bounds.width - (borderRightWidth * 2) / 3, bounds.top + (borderTopWidth * 2) / 3); this.bottomRightBorderDoubleInnerBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - (borderRightWidth * 2) / 3, brv - (borderBottomWidth * 2) / 3, CORNER.BOTTOM_RIGHT) : new Vector(bounds.left + bounds.width - (borderRightWidth * 2) / 3, bounds.top + bounds.height - (borderBottomWidth * 2) / 3); this.bottomLeftBorderDoubleInnerBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + leftHeight, blh - (borderLeftWidth * 2) / 3, blv - (borderBottomWidth * 2) / 3, CORNER.BOTTOM_LEFT) : new Vector(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + bounds.height - (borderBottomWidth * 2) / 3); this.topLeftBorderStroke = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth / 2, bounds.top + borderTopWidth / 2, tlh - borderLeftWidth / 2, tlv - borderTopWidth / 2, CORNER.TOP_LEFT) : new Vector(bounds.left + borderLeftWidth / 2, bounds.top + borderTopWidth / 2); this.topRightBorderStroke = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth / 2, trh - borderRightWidth / 2, trv - borderTopWidth / 2, CORNER.TOP_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth / 2, bounds.top + borderTopWidth / 2); this.bottomRightBorderStroke = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth / 2, brv - borderBottomWidth / 2, CORNER.BOTTOM_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth / 2, bounds.top + bounds.height - borderBottomWidth / 2); this.bottomLeftBorderStroke = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth / 2, bounds.top + leftHeight, blh - borderLeftWidth / 2, blv - borderBottomWidth / 2, CORNER.BOTTOM_LEFT) : new Vector(bounds.left + borderLeftWidth / 2, bounds.top + bounds.height - borderBottomWidth / 2); this.topLeftBorderBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left, bounds.top, tlh, tlv, CORNER.TOP_LEFT) : new Vector(bounds.left, bounds.top); this.topRightBorderBox = trh > 0 || trv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top, trh, trv, CORNER.TOP_RIGHT) : new Vector(bounds.left + bounds.width, bounds.top); this.bottomRightBorderBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh, brv, CORNER.BOTTOM_RIGHT) : new Vector(bounds.left + bounds.width, bounds.top + bounds.height); this.bottomLeftBorderBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left, bounds.top + leftHeight, blh, blv, CORNER.BOTTOM_LEFT) : new Vector(bounds.left, bounds.top + bounds.height); this.topLeftPaddingBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth, bounds.top + borderTopWidth, Math.max(0, tlh - borderLeftWidth), Math.max(0, tlv - borderTopWidth), CORNER.TOP_LEFT) : new Vector(bounds.left + borderLeftWidth, bounds.top + borderTopWidth); this.topRightPaddingBox = trh > 0 || trv > 0 ? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width - borderRightWidth), bounds.top + borderTopWidth, topWidth > bounds.width + borderRightWidth ? 0 : Math.max(0, trh - borderRightWidth), Math.max(0, trv - borderTopWidth), CORNER.TOP_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth, bounds.top + borderTopWidth); this.bottomRightPaddingBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - borderLeftWidth), bounds.top + Math.min(rightHeight, bounds.height - borderBottomWidth), Math.max(0, brh - borderRightWidth), Math.max(0, brv - borderBottomWidth), CORNER.BOTTOM_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth, bounds.top + bounds.height - borderBottomWidth); this.bottomLeftPaddingBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth, bounds.top + Math.min(leftHeight, bounds.height - borderBottomWidth), Math.max(0, blh - borderLeftWidth), Math.max(0, blv - borderBottomWidth), CORNER.BOTTOM_LEFT) : new Vector(bounds.left + borderLeftWidth, bounds.top + bounds.height - borderBottomWidth); this.topLeftContentBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth + paddingLeft, bounds.top + borderTopWidth + paddingTop, Math.max(0, tlh - (borderLeftWidth + paddingLeft)), Math.max(0, tlv - (borderTopWidth + paddingTop)), CORNER.TOP_LEFT) : new Vector(bounds.left + borderLeftWidth + paddingLeft, bounds.top + borderTopWidth + paddingTop); this.topRightContentBox = trh > 0 || trv > 0 ? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width + borderLeftWidth + paddingLeft), bounds.top + borderTopWidth + paddingTop, topWidth > bounds.width + borderLeftWidth + paddingLeft ? 0 : trh - borderLeftWidth + paddingLeft, trv - (borderTopWidth + paddingTop), CORNER.TOP_RIGHT) : new Vector(bounds.left + bounds.width - (borderRightWidth + paddingRight), bounds.top + borderTopWidth + paddingTop); this.bottomRightContentBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - (borderLeftWidth + paddingLeft)), bounds.top + Math.min(rightHeight, bounds.height + borderTopWidth + paddingTop), Math.max(0, brh - (borderRightWidth + paddingRight)), brv - (borderBottomWidth + paddingBottom), CORNER.BOTTOM_RIGHT) : new Vector(bounds.left + bounds.width - (borderRightWidth + paddingRight), bounds.top + bounds.height - (borderBottomWidth + paddingBottom)); this.bottomLeftContentBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth + paddingLeft, bounds.top + leftHeight, Math.max(0, blh - (borderLeftWidth + paddingLeft)), blv - (borderBottomWidth + paddingBottom), CORNER.BOTTOM_LEFT) : new Vector(bounds.left + borderLeftWidth + paddingLeft, bounds.top + bounds.height - (borderBottomWidth + paddingBottom)); } return BoundCurves; }()); var CORNER; (function (CORNER) { CORNER[CORNER["TOP_LEFT"] = 0] = "TOP_LEFT"; CORNER[CORNER["TOP_RIGHT"] = 1] = "TOP_RIGHT"; CORNER[CORNER["BOTTOM_RIGHT"] = 2] = "BOTTOM_RIGHT"; CORNER[CORNER["BOTTOM_LEFT"] = 3] = "BOTTOM_LEFT"; })(CORNER || (CORNER = {})); var getCurvePoints = function (x, y, r1, r2, position) { var kappa = 4 * ((Math.sqrt(2) - 1) / 3); var ox = r1 * kappa; // control point offset horizontal var oy = r2 * kappa; // control point offset vertical var xm = x + r1; // x-middle var ym = y + r2; // y-middle switch (position) { case CORNER.TOP_LEFT: return new BezierCurve(new Vector(x, ym), new Vector(x, ym - oy), new Vector(xm - ox, y), new Vector(xm, y)); case CORNER.TOP_RIGHT: return new BezierCurve(new Vector(x, y), new Vector(x + ox, y), new Vector(xm, ym - oy), new Vector(xm, ym)); case CORNER.BOTTOM_RIGHT: return new BezierCurve(new Vector(xm, y), new Vector(xm, y + oy), new Vector(x + ox, ym), new Vector(x, ym)); case CORNER.BOTTOM_LEFT: default: return new BezierCurve(new Vector(xm, ym), new Vector(xm - ox, ym), new Vector(x, y + oy), new Vector(x, y)); } }; var calculateBorderBoxPath = function (curves) { return [curves.topLeftBorderBox, curves.topRightBorderBox, curves.bottomRightBorderBox, curves.bottomLeftBorderBox]; }; var calculateContentBoxPath = function (curves) { return [ curves.topLeftContentBox, curves.topRightContentBox, curves.bottomRightContentBox, curves.bottomLeftContentBox ]; }; var calculatePaddingBoxPath = function (curves) { return [ curves.topLeftPaddingBox, curves.topRightPaddingBox, curves.bottomRightPaddingBox, curves.bottomLeftPaddingBox ]; }; var TransformEffect = /** @class */ (function () { function TransformEffect(offsetX, offsetY, matrix) { this.offsetX = offsetX; this.offsetY = offsetY; this.matrix = matrix; this.type = 0 /* TRANSFORM */; this.target = 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */; } return TransformEffect; }()); var ClipEffect = /** @class */ (function () { function ClipEffect(path, target) { this.path = path; this.target = target; this.type = 1 /* CLIP */; } return ClipEffect; }()); var OpacityEffect = /** @class */ (function () { function OpacityEffect(opacity) { this.opacity = opacity; this.type = 2 /* OPACITY */; this.target = 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */; } return OpacityEffect; }()); var isTransformEffect = function (effect) { return effect.type === 0 /* TRANSFORM */; }; var isClipEffect = function (effect) { return effect.type === 1 /* CLIP */; }; var isOpacityEffect = function (effect) { return effect.type === 2 /* OPACITY */; }; var equalPath = function (a, b) { if (a.length === b.length) { return a.some(function (v, i) { return v === b[i]; }); } return false; }; var transformPath = function (path, deltaX, deltaY, deltaW, deltaH) { return path.map(function (point, index) { switch (index) { case 0: return point.add(deltaX, deltaY); case 1: return point.add(deltaX + deltaW, deltaY); case 2: return point.add(deltaX + deltaW, deltaY + deltaH); case 3: return point.add(deltaX, deltaY + deltaH); } return point; }); }; var StackingContext = /** @class */ (function () { function StackingContext(container) { this.element = container; this.inlineLevel = []; this.nonInlineLevel = []; this.negativeZIndex = []; this.zeroOrAutoZIndexOrTransformedOrOpacity = []; this.positiveZIndex = []; this.nonPositionedFloats = []; this.nonPositionedInlineLevel = []; } return StackingContext; }()); var ElementPaint = /** @class */ (function () { function ElementPaint(container, parent) { this.container = container; this.parent = parent; this.effects = []; this.curves = new BoundCurves(this.container); if (this.container.styles.opacity < 1) { this.effects.push(new OpacityEffect(this.container.styles.opacity)); } if (this.container.styles.transform !== null) { var offsetX = this.container.bounds.left + this.container.styles.transformOrigin[0].number; var offsetY = this.container.bounds.top + this.container.styles.transformOrigin[1].number; var matrix = this.container.styles.transform; this.effects.push(new TransformEffect(offsetX, offsetY, matrix)); } if (this.container.styles.overflowX !== 0 /* VISIBLE */) { var borderBox = calculateBorderBoxPath(this.curves); var paddingBox = calculatePaddingBoxPath(this.curves); if (equalPath(borderBox, paddingBox)) { this.effects.push(new ClipEffect(borderBox, 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */)); } else { this.effects.push(new ClipEffect(borderBox, 2 /* BACKGROUND_BORDERS */)); this.effects.push(new ClipEffect(paddingBox, 4 /* CONTENT */)); } } } ElementPaint.prototype.getEffects = function (target) { var inFlow = [2 /* ABSOLUTE */, 3 /* FIXED */].indexOf(this.container.styles.position) === -1; var parent = this.parent; var effects = this.effects.slice(0); while (parent) { var croplessEffects = parent.effects.filter(function (effect) { return !isClipEffect(effect); }); if (inFlow || parent.container.styles.position !== 0 /* STATIC */ || !parent.parent) { effects.unshift.apply(effects, croplessEffects); inFlow = [2 /* ABSOLUTE */, 3 /* FIXED */].indexOf(parent.container.styles.position) === -1; if (parent.container.styles.overflowX !== 0 /* VISIBLE */) { var borderBox = calculateBorderBoxPath(parent.curves); var paddingBox = calculatePaddingBoxPath(parent.curves); if (!equalPath(borderBox, paddingBox)) { effects.unshift(new ClipEffect(paddingBox, 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */)); } } } else { effects.unshift.apply(effects, croplessEffects); } parent = parent.parent; } return effects.filter(function (effect) { return contains(effect.target, target); }); }; return ElementPaint; }()); var parseStackTree = function (parent, stackingContext, realStackingContext, listItems) { parent.container.elements.forEach(function (child) { var treatAsRealStackingContext = contains(child.flags, 4 /* CREATES_REAL_STACKING_CONTEXT */); var createsStackingContext = contains(child.flags, 2 /* CREATES_STACKING_CONTEXT */); var paintContainer = new ElementPaint(child, parent); if (contains(child.styles.display, 2048 /* LIST_ITEM */)) { listItems.push(paintContainer); } var listOwnerItems = contains(child.flags, 8 /* IS_LIST_OWNER */) ? [] : listItems; if (treatAsRealStackingContext || createsStackingContext) { var parentStack = treatAsRealStackingContext || child.styles.isPositioned() ? realStackingContext : stackingContext; var stack = new StackingContext(paintContainer); if (child.styles.isPositioned() || child.styles.opacity < 1 || child.styles.isTransformed()) { var order_1 = child.styles.zIndex.order; if (order_1 < 0) { var index_1 = 0; parentStack.negativeZIndex.some(function (current, i) { if (order_1 > current.element.container.styles.zIndex.order) { index_1 = i; return false; } else if (index_1 > 0) { return true; } return false; }); parentStack.negativeZIndex.splice(index_1, 0, stack); } else if (order_1 > 0) { var index_2 = 0; parentStack.positiveZIndex.some(function (current, i) { if (order_1 >= current.element.container.styles.zIndex.order) { index_2 = i + 1; return false; } else if (index_2 > 0) { return true; } return false; }); parentStack.positiveZIndex.splice(index_2, 0, stack); } else { parentStack.zeroOrAutoZIndexOrTransformedOrOpacity.push(stack); } } else { if (child.styles.isFloating()) { parentStack.nonPositionedFloats.push(stack); } else { parentStack.nonPositionedInlineLevel.push(stack); } } parseStackTree(paintContainer, stack, treatAsRealStackingContext ? stack : realStackingContext, listOwnerItems); } else { if (child.styles.isInlineLevel()) { stackingContext.inlineLevel.push(paintContainer); } else { stackingContext.nonInlineLevel.push(paintContainer); } parseStackTree(paintContainer, stackingContext, realStackingContext, listOwnerItems); } if (contains(child.flags, 8 /* IS_LIST_OWNER */)) { processListItems(child, listOwnerItems); } }); }; var processListItems = function (owner, elements) { var numbering = owner instanceof OLElementContainer ? owner.start : 1; var reversed = owner instanceof OLElementContainer ? owner.reversed : false; for (var i = 0; i < elements.length; i++) { var item = elements[i]; if (item.container instanceof LIElementContainer && typeof item.container.value === 'number' && item.container.value !== 0) { numbering = item.container.value; } item.listValue = createCounterText(numbering, item.container.styles.listStyleType, true); numbering += reversed ? -1 : 1; } }; var parseStackingContexts = function (container) { var paintContainer = new ElementPaint(container, null); var root = new StackingContext(paintContainer); var listItems = []; parseStackTree(paintContainer, root, root, listItems); processListItems(paintContainer.container, listItems); return root; }; var parsePathForBorder = function (curves, borderSide) { switch (borderSide) { case 0: return createPathFromCurves(curves.topLeftBorderBox, curves.topLeftPaddingBox, curves.topRightBorderBox, curves.topRightPaddingBox); case 1: return createPathFromCurves(curves.topRightBorderBox, curves.topRightPaddingBox, curves.bottomRightBorderBox, curves.bottomRightPaddingBox); case 2: return createPathFromCurves(curves.bottomRightBorderBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox); case 3: default: return createPathFromCurves(curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox, curves.topLeftBorderBox, curves.topLeftPaddingBox); } }; var parsePathForBorderDoubleOuter = function (curves, borderSide) { switch (borderSide) { case 0: return createPathFromCurves(curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox, curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox); case 1: return createPathFromCurves(curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox, curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox); case 2: return createPathFromCurves(curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox, curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox); case 3: default: return createPathFromCurves(curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox, curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox); } }; var parsePathForBorderDoubleInner = function (curves, borderSide) { switch (borderSide) { case 0: return createPathFromCurves(curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox, curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox); case 1: return createPathFromCurves(curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox, curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox); case 2: return createPathFromCurves(curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox); case 3: default: return createPathFromCurves(curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox, curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox); } }; var parsePathForBorderStroke = function (curves, borderSide) { switch (borderSide) { case 0: return createStrokePathFromCurves(curves.topLeftBorderStroke, curves.topRightBorderStroke); case 1: return createStrokePathFromCurves(curves.topRightBorderStroke, curves.bottomRightBorderStroke); case 2: return createStrokePathFromCurves(curves.bottomRightBorderStroke, curves.bottomLeftBorderStroke); case 3: default: return createStrokePathFromCurves(curves.bottomLeftBorderStroke, curves.topLeftBorderStroke); } }; var createStrokePathFromCurves = function (outer1, outer2) { var path = []; if (isBezierCurve(outer1)) { path.push(outer1.subdivide(0.5, false)); } else { path.push(outer1); } if (isBezierCurve(outer2)) { path.push(outer2.subdivide(0.5, true)); } else { path.push(outer2); } return path; }; var createPathFromCurves = function (outer1, inner1, outer2, inner2) { var path = []; if (isBezierCurve(outer1)) { path.push(outer1.subdivide(0.5, false)); } else { path.push(outer1); } if (isBezierCurve(outer2)) { path.push(outer2.subdivide(0.5, true)); } else { path.push(outer2); } if (isBezierCurve(inner2)) { path.push(inner2.subdivide(0.5, true).reverse()); } else { path.push(inner2); } if (isBezierCurve(inner1)) { path.push(inner1.subdivide(0.5, false).reverse()); } else { path.push(inner1); } return path; }; var paddingBox = function (element) { var bounds = element.bounds; var styles = element.styles; return bounds.add(styles.borderLeftWidth, styles.borderTopWidth, -(styles.borderRightWidth + styles.borderLeftWidth), -(styles.borderTopWidth + styles.borderBottomWidth)); }; var contentBox = function (element) { var styles = element.styles; var bounds = element.bounds; var paddingLeft = getAbsoluteValue(styles.paddingLeft, bounds.width); var paddingRight = getAbsoluteValue(styles.paddingRight, bounds.width); var paddingTop = getAbsoluteValue(styles.paddingTop, bounds.width); var paddingBottom = getAbsoluteValue(styles.paddingBottom, bounds.width); return bounds.add(paddingLeft + styles.borderLeftWidth, paddingTop + styles.borderTopWidth, -(styles.borderRightWidth + styles.borderLeftWidth + paddingLeft + paddingRight), -(styles.borderTopWidth + styles.borderBottomWidth + paddingTop + paddingBottom)); }; var calculateBackgroundPositioningArea = function (backgroundOrigin, element) { if (backgroundOrigin === 0 /* BORDER_BOX */) { return element.bounds; } if (backgroundOrigin === 2 /* CONTENT_BOX */) { return contentBox(element); } return paddingBox(element); }; var calculateBackgroundPaintingArea = function (backgroundClip, element) { if (backgroundClip === 0 /* BORDER_BOX */) { return element.bounds; } if (backgroundClip === 2 /* CONTENT_BOX */) { return contentBox(element); } return paddingBox(element); }; var calculateBackgroundRendering = function (container, index, intrinsicSize) { var backgroundPositioningArea = calculateBackgroundPositioningArea(getBackgroundValueForIndex(container.styles.backgroundOrigin, index), container); var backgroundPaintingArea = calculateBackgroundPaintingArea(getBackgroundValueForIndex(container.styles.backgroundClip, index), container); var backgroundImageSize = calculateBackgroundSize(getBackgroundValueForIndex(container.styles.backgroundSize, index), intrinsicSize, backgroundPositioningArea); var sizeWidth = backgroundImageSize[0], sizeHeight = backgroundImageSize[1]; var position = getAbsoluteValueForTuple(getBackgroundValueForIndex(container.styles.backgroundPosition, index), backgroundPositioningArea.width - sizeWidth, backgroundPositioningArea.height - sizeHeight); var path = calculateBackgroundRepeatPath(getBackgroundValueForIndex(container.styles.backgroundRepeat, index), position, backgroundImageSize, backgroundPositioningArea, backgroundPaintingArea); var offsetX = Math.round(backgroundPositioningArea.left + position[0]); var offsetY = Math.round(backgroundPositioningArea.top + position[1]); return [path, offsetX, offsetY, sizeWidth, sizeHeight]; }; var isAuto = function (token) { return isIdentToken(token) && token.value === BACKGROUND_SIZE.AUTO; }; var hasIntrinsicValue = function (value) { return typeof value === 'number'; }; var calculateBackgroundSize = function (size, _a, bounds) { var intrinsicWidth = _a[0], intrinsicHeight = _a[1], intrinsicProportion = _a[2]; var first = size[0], second = size[1]; if (!first) { return [0, 0]; } if (isLengthPercentage(first) && second && isLengthPercentage(second)) { return [getAbsoluteValue(first, bounds.width), getAbsoluteValue(second, bounds.height)]; } var hasIntrinsicProportion = hasIntrinsicValue(intrinsicProportion); if (isIdentToken(first) && (first.value === BACKGROUND_SIZE.CONTAIN || first.value === BACKGROUND_SIZE.COVER)) { if (hasIntrinsicValue(intrinsicProportion)) { var targetRatio = bounds.width / bounds.height; return targetRatio < intrinsicProportion !== (first.value === BACKGROUND_SIZE.COVER) ? [bounds.width, bounds.width / intrinsicProportion] : [bounds.height * intrinsicProportion, bounds.height]; } return [bounds.width, bounds.height]; } var hasIntrinsicWidth = hasIntrinsicValue(intrinsicWidth); var hasIntrinsicHeight = hasIntrinsicValue(intrinsicHeight); var hasIntrinsicDimensions = hasIntrinsicWidth || hasIntrinsicHeight; // If the background-size is auto or auto auto: if (isAuto(first) && (!second || isAuto(second))) { // If the image has both horizontal and vertical intrinsic dimensions, it's rendered at that size. if (hasIntrinsicWidth && hasIntrinsicHeight) { return [intrinsicWidth, intrinsicHeight]; } // If the image has no intrinsic dimensions and has no intrinsic proportions, // it's rendered at the size of the background positioning area. if (!hasIntrinsicProportion && !hasIntrinsicDimensions) { return [bounds.width, bounds.height]; } // TODO If the image has no intrinsic dimensions but has intrinsic proportions, it's rendered as if contain had been specified instead. // If the image has only one intrinsic dimension and has intrinsic proportions, it's rendered at the size corresponding to that one dimension. // The other dimension is computed using the specified dimension and the intrinsic proportions. if (hasIntrinsicDimensions && hasIntrinsicProportion) { var width_1 = hasIntrinsicWidth ? intrinsicWidth : intrinsicHeight * intrinsicProportion; var height_1 = hasIntrinsicHeight ? intrinsicHeight : intrinsicWidth / intrinsicProportion; return [width_1, height_1]; } // If the image has only one intrinsic dimension but has no intrinsic proportions, // it's rendered using the specified dimension and the other dimension of the background positioning area. var width_2 = hasIntrinsicWidth ? intrinsicWidth : bounds.width; var height_2 = hasIntrinsicHeight ? intrinsicHeight : bounds.height; return [width_2, height_2]; } // If the image has intrinsic proportions, it's stretched to the specified dimension. // The unspecified dimension is computed using the specified dimension and the intrinsic proportions. if (hasIntrinsicProportion) { var width_3 = 0; var height_3 = 0; if (isLengthPercentage(first)) { width_3 = getAbsoluteValue(first, bounds.width); } else if (isLengthPercentage(second)) { height_3 = getAbsoluteValue(second, bounds.height); } if (isAuto(first)) { width_3 = height_3 * intrinsicProportion; } else if (!second || isAuto(second)) { height_3 = width_3 / intrinsicProportion; } return [width_3, height_3]; } // If the image has no intrinsic proportions, it's stretched to the specified dimension. // The unspecified dimension is computed using the image's corresponding intrinsic dimension, // if there is one. If there is no such intrinsic dimension, // it becomes the corresponding dimension of the background positioning area. var width = null; var height = null; if (isLengthPercentage(first)) { width = getAbsoluteValue(first, bounds.width); } else if (second && isLengthPercentage(second)) { height = getAbsoluteValue(second, bounds.height); } if (width !== null && (!second || isAuto(second))) { height = hasIntrinsicWidth && hasIntrinsicHeight ? (width / intrinsicWidth) * intrinsicHeight : bounds.height; } if (height !== null && isAuto(first)) { width = hasIntrinsicWidth && hasIntrinsicHeight ? (height / intrinsicHeight) * intrinsicWidth : bounds.width; } if (width !== null && height !== null) { return [width, height]; } throw new Error("Unable to calculate background-size for element"); }; var getBackgroundValueForIndex = function (values, index) { var value = values[index]; if (typeof value === 'undefined') { return values[0]; } return value; }; var calculateBackgroundRepeatPath = function (repeat, _a, _b, backgroundPositioningArea, backgroundPaintingArea) { var x = _a[0], y = _a[1]; var width = _b[0], height = _b[1]; switch (repeat) { case 2 /* REPEAT_X */: return [ new Vector(Math.round(backgroundPositioningArea.left), Math.round(backgroundPositioningArea.top + y)), new Vector(Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width), Math.round(backgroundPositioningArea.top + y)), new Vector(Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width), Math.round(height + backgroundPositioningArea.top + y)), new Vector(Math.round(backgroundPositioningArea.left), Math.round(height + backgroundPositioningArea.top + y)) ]; case 3 /* REPEAT_Y */: return [ new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top)), new Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top)), new Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top)), new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top)) ]; case 1 /* NO_REPEAT */: return [ new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top + y)), new Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top + y)), new Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top + y + height)), new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top + y + height)) ]; default: return [ new Vector(Math.round(backgroundPaintingArea.left), Math.round(backgroundPaintingArea.top)), new Vector(Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width), Math.round(backgroundPaintingArea.top)), new Vector(Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width), Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top)), new Vector(Math.round(backgroundPaintingArea.left), Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top)) ]; } }; var SMALL_IMAGE = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; var SAMPLE_TEXT = 'Hidden Text'; var FontMetrics = /** @class */ (function () { function FontMetrics(document) { this._data = {}; this._document = document; } FontMetrics.prototype.parseMetrics = function (fontFamily, fontSize) { var container = this._document.createElement('div'); var img = this._document.createElement('img'); var span = this._document.createElement('span'); var body = this._document.body; container.style.visibility = 'hidden'; container.style.fontFamily = fontFamily; container.style.fontSize = fontSize; container.style.margin = '0'; container.style.padding = '0'; container.style.whiteSpace = 'nowrap'; body.appendChild(container); img.src = SMALL_IMAGE; img.width = 1; img.height = 1; img.style.margin = '0'; img.style.padding = '0'; img.style.verticalAlign = 'baseline'; span.style.fontFamily = fontFamily; span.style.fontSize = fontSize; span.style.margin = '0'; span.style.padding = '0'; span.appendChild(this._document.createTextNode(SAMPLE_TEXT)); container.appendChild(span); container.appendChild(img); var baseline = img.offsetTop - span.offsetTop + 2; container.removeChild(span); container.appendChild(this._document.createTextNode(SAMPLE_TEXT)); container.style.lineHeight = 'normal'; img.style.verticalAlign = 'super'; var middle = img.offsetTop - container.offsetTop + 2; body.removeChild(container); return { baseline: baseline, middle: middle }; }; FontMetrics.prototype.getMetrics = function (fontFamily, fontSize) { var key = fontFamily + " " + fontSize; if (typeof this._data[key] === 'undefined') { this._data[key] = this.parseMetrics(fontFamily, fontSize); } return this._data[key]; }; return FontMetrics; }()); var Renderer = /** @class */ (function () { function Renderer(context, options) { this.context = context; this.options = options; } return Renderer; }()); var MASK_OFFSET = 10000; var CanvasRenderer = /** @class */ (function (_super) { __extends(CanvasRenderer, _super); function CanvasRenderer(context, options) { var _this = _super.call(this, context, options) || this; _this._activeEffects = []; _this.canvas = options.canvas ? options.canvas : document.createElement('canvas'); _this.ctx = _this.canvas.getContext('2d'); if (!options.canvas) { _this.canvas.width = Math.floor(options.width * options.scale); _this.canvas.height = Math.floor(options.height * options.scale); _this.canvas.style.width = options.width + "px"; _this.canvas.style.height = options.height + "px"; } _this.fontMetrics = new FontMetrics(document); _this.ctx.scale(_this.options.scale, _this.options.scale); _this.ctx.translate(-options.x, -options.y); _this.ctx.textBaseline = 'bottom'; _this._activeEffects = []; _this.context.logger.debug("Canvas renderer initialized (" + options.width + "x" + options.height + ") with scale " + options.scale); return _this; } CanvasRenderer.prototype.applyEffects = function (effects) { var _this = this; while (this._activeEffects.length) { this.popEffect(); } effects.forEach(function (effect) { return _this.applyEffect(effect); }); }; CanvasRenderer.prototype.applyEffect = function (effect) { this.ctx.save(); if (isOpacityEffect(effect)) { this.ctx.globalAlpha = effect.opacity; } if (isTransformEffect(effect)) { this.ctx.translate(effect.offsetX, effect.offsetY); this.ctx.transform(effect.matrix[0], effect.matrix[1], effect.matrix[2], effect.matrix[3], effect.matrix[4], effect.matrix[5]); this.ctx.translate(-effect.offsetX, -effect.offsetY); } if (isClipEffect(effect)) { this.path(effect.path); this.ctx.clip(); } this._activeEffects.push(effect); }; CanvasRenderer.prototype.popEffect = function () { this._activeEffects.pop(); this.ctx.restore(); }; CanvasRenderer.prototype.renderStack = function (stack) { return __awaiter(this, void 0, void 0, function () { var styles; return __generator(this, function (_a) { switch (_a.label) { case 0: styles = stack.element.container.styles; if (!styles.isVisible()) return [3 /*break*/, 2]; return [4 /*yield*/, this.renderStackContent(stack)]; case 1: _a.sent(); _a.label = 2; case 2: return [2 /*return*/]; } }); }); }; CanvasRenderer.prototype.renderNode = function (paint) { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { switch (_a.label) { case 0: if (contains(paint.container.flags, 16 /* DEBUG_RENDER */)) { debugger; } if (!paint.container.styles.isVisible()) return [3 /*break*/, 3]; return [4 /*yield*/, this.renderNodeBackgroundAndBorders(paint)]; case 1: _a.sent(); return [4 /*yield*/, this.renderNodeContent(paint)]; case 2: _a.sent(); _a.label = 3; case 3: return [2 /*return*/]; } }); }); }; CanvasRenderer.prototype.renderTextWithLetterSpacing = function (text, letterSpacing, baseline) { var _this = this; if (letterSpacing === 0) { this.ctx.fillText(text.text, text.bounds.left, text.bounds.top + baseline); } else { var letters = segmentGraphemes(text.text); letters.reduce(function (left, letter) { _this.ctx.fillText(letter, left, text.bounds.top + baseline); return left + _this.ctx.measureText(letter).width; }, text.bounds.left); } }; CanvasRenderer.prototype.createFontStyle = function (styles) { var fontVariant = styles.fontVariant .filter(function (variant) { return variant === 'normal' || variant === 'small-caps'; }) .join(''); var fontFamily = fixIOSSystemFonts(styles.fontFamily).join(', '); var fontSize = isDimensionToken(styles.fontSize) ? "" + styles.fontSize.number + styles.fontSize.unit : styles.fontSize.number + "px"; return [ [styles.fontStyle, fontVariant, styles.fontWeight, fontSize, fontFamily].join(' '), fontFamily, fontSize ]; }; CanvasRenderer.prototype.renderTextNode = function (text, styles) { return __awaiter(this, void 0, void 0, function () { var _a, font, fontFamily, fontSize, _b, baseline, middle, paintOrder; var _this = this; return __generator(this, function (_c) { _a = this.createFontStyle(styles), font = _a[0], fontFamily = _a[1], fontSize = _a[2]; this.ctx.font = font; this.ctx.direction = styles.direction === 1 /* RTL */ ? 'rtl' : 'ltr'; this.ctx.textAlign = 'left'; this.ctx.textBaseline = 'alphabetic'; _b = this.fontMetrics.getMetrics(fontFamily, fontSize), baseline = _b.baseline, middle = _b.middle; paintOrder = styles.paintOrder; text.textBounds.forEach(function (text) { paintOrder.forEach(function (paintOrderLayer) { switch (paintOrderLayer) { case 0 /* FILL */: _this.ctx.fillStyle = asString(styles.color); _this.renderTextWithLetterSpacing(text, styles.letterSpacing, baseline); var textShadows = styles.textShadow; if (textShadows.length && text.text.trim().length) { textShadows .slice(0) .reverse() .forEach(function (textShadow) { _this.ctx.shadowColor = asString(textShadow.color); _this.ctx.shadowOffsetX = textShadow.offsetX.number * _this.options.scale; _this.ctx.shadowOffsetY = textShadow.offsetY.number * _this.options.scale; _this.ctx.shadowBlur = textShadow.blur.number; _this.renderTextWithLetterSpacing(text, styles.letterSpacing, baseline); }); _this.ctx.shadowColor = ''; _this.ctx.shadowOffsetX = 0; _this.ctx.shadowOffsetY = 0; _this.ctx.shadowBlur = 0; } if (styles.textDecorationLine.length) { _this.ctx.fillStyle = asString(styles.textDecorationColor || styles.color); styles.textDecorationLine.forEach(function (textDecorationLine) { switch (textDecorationLine) { case 1 /* UNDERLINE */: // Draws a line at the baseline of the font // TODO As some browsers display the line as more than 1px if the font-size is big, // need to take that into account both in position and size _this.ctx.fillRect(text.bounds.left, Math.round(text.bounds.top + baseline), text.bounds.width, 1); break; case 2 /* OVERLINE */: _this.ctx.fillRect(text.bounds.left, Math.round(text.bounds.top), text.bounds.width, 1); break; case 3 /* LINE_THROUGH */: // TODO try and find exact position for line-through _this.ctx.fillRect(text.bounds.left, Math.ceil(text.bounds.top + middle), text.bounds.width, 1); break; } }); } break; case 1 /* STROKE */: if (styles.webkitTextStrokeWidth && text.text.trim().length) { _this.ctx.strokeStyle = asString(styles.webkitTextStrokeColor); _this.ctx.lineWidth = styles.webkitTextStrokeWidth; // eslint-disable-next-line @typescript-eslint/no-explicit-any _this.ctx.lineJoin = !!window.chrome ? 'miter' : 'round'; _this.ctx.strokeText(text.text, text.bounds.left, text.bounds.top + baseline); } _this.ctx.strokeStyle = ''; _this.ctx.lineWidth = 0; _this.ctx.lineJoin = 'miter'; break; } }); }); return [2 /*return*/]; }); }); }; CanvasRenderer.prototype.renderReplacedElement = function (container, curves, image) { if (image && container.intrinsicWidth > 0 && container.intrinsicHeight > 0) { var box = contentBox(container); var path = calculatePaddingBoxPath(curves); this.path(path); this.ctx.save(); this.ctx.clip(); this.ctx.drawImage(image, 0, 0, container.intrinsicWidth, container.intrinsicHeight, box.left, box.top, box.width, box.height); this.ctx.restore(); } }; CanvasRenderer.prototype.renderNodeContent = function (paint) { return __awaiter(this, void 0, void 0, function () { var container, curves, styles, _i, _a, child, image, image, iframeRenderer, canvas, size, _b, fontFamily, fontSize, baseline, bounds, x, textBounds, img, image, url, fontFamily, bounds; return __generator(this, function (_c) { switch (_c.label) { case 0: this.applyEffects(paint.getEffects(4 /* CONTENT */)); container = paint.container; curves = paint.curves; styles = container.styles; _i = 0, _a = container.textNodes; _c.label = 1; case 1: if (!(_i < _a.length)) return [3 /*break*/, 4]; child = _a[_i]; return [4 /*yield*/, this.renderTextNode(child, styles)]; case 2: _c.sent(); _c.label = 3; case 3: _i++; return [3 /*break*/, 1]; case 4: if (!(container instanceof ImageElementContainer)) return [3 /*break*/, 8]; _c.label = 5; case 5: _c.trys.push([5, 7, , 8]); return [4 /*yield*/, this.context.cache.match(container.src)]; case 6: image = _c.sent(); this.renderReplacedElement(container, curves, image); return [3 /*break*/, 8]; case 7: _c.sent(); this.context.logger.error("Error loading image " + container.src); return [3 /*break*/, 8]; case 8: if (container instanceof CanvasElementContainer) { this.renderReplacedElement(container, curves, container.canvas); } if (!(container instanceof SVGElementContainer)) return [3 /*break*/, 12]; _c.label = 9; case 9: _c.trys.push([9, 11, , 12]); return [4 /*yield*/, this.context.cache.match(container.svg)]; case 10: image = _c.sent(); this.renderReplacedElement(container, curves, image); return [3 /*break*/, 12]; case 11: _c.sent(); this.context.logger.error("Error loading svg " + container.svg.substring(0, 255)); return [3 /*break*/, 12]; case 12: if (!(container instanceof IFrameElementContainer && container.tree)) return [3 /*break*/, 14]; iframeRenderer = new CanvasRenderer(this.context, { scale: this.options.scale, backgroundColor: container.backgroundColor, x: 0, y: 0, width: container.width, height: container.height }); return [4 /*yield*/, iframeRenderer.render(container.tree)]; case 13: canvas = _c.sent(); if (container.width && container.height) { this.ctx.drawImage(canvas, 0, 0, container.width, container.height, container.bounds.left, container.bounds.top, container.bounds.width, container.bounds.height); } _c.label = 14; case 14: if (container instanceof InputElementContainer) { size = Math.min(container.bounds.width, container.bounds.height); if (container.type === CHECKBOX) { if (container.checked) { this.ctx.save(); this.path([ new Vector(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79), new Vector(container.bounds.left + size * 0.16, container.bounds.top + size * 0.5549), new Vector(container.bounds.left + size * 0.27347, container.bounds.top + size * 0.44071), new Vector(container.bounds.left + size * 0.39694, container.bounds.top + size * 0.5649), new Vector(container.bounds.left + size * 0.72983, container.bounds.top + size * 0.23), new Vector(container.bounds.left + size * 0.84, container.bounds.top + size * 0.34085), new Vector(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79) ]); this.ctx.fillStyle = asString(INPUT_COLOR); this.ctx.fill(); this.ctx.restore(); } } else if (container.type === RADIO) { if (container.checked) { this.ctx.save(); this.ctx.beginPath(); this.ctx.arc(container.bounds.left + size / 2, container.bounds.top + size / 2, size / 4, 0, Math.PI * 2, true); this.ctx.fillStyle = asString(INPUT_COLOR); this.ctx.fill(); this.ctx.restore(); } } } if (isTextInputElement(container) && container.value.length) { _b = this.createFontStyle(styles), fontFamily = _b[0], fontSize = _b[1]; baseline = this.fontMetrics.getMetrics(fontFamily, fontSize).baseline; this.ctx.font = fontFamily; this.ctx.fillStyle = asString(styles.color); this.ctx.textBaseline = 'alphabetic'; this.ctx.textAlign = canvasTextAlign(container.styles.textAlign); bounds = contentBox(container); x = 0; switch (container.styles.textAlign) { case 1 /* CENTER */: x += bounds.width / 2; break; case 2 /* RIGHT */: x += bounds.width; break; } textBounds = bounds.add(x, 0, 0, -bounds.height / 2 + 1); this.ctx.save(); this.path([ new Vector(bounds.left, bounds.top), new Vector(bounds.left + bounds.width, bounds.top), new Vector(bounds.left + bounds.width, bounds.top + bounds.height), new Vector(bounds.left, bounds.top + bounds.height) ]); this.ctx.clip(); this.renderTextWithLetterSpacing(new TextBounds(container.value, textBounds), styles.letterSpacing, baseline); this.ctx.restore(); this.ctx.textBaseline = 'alphabetic'; this.ctx.textAlign = 'left'; } if (!contains(container.styles.display, 2048 /* LIST_ITEM */)) return [3 /*break*/, 20]; if (!(container.styles.listStyleImage !== null)) return [3 /*break*/, 19]; img = container.styles.listStyleImage; if (!(img.type === 0 /* URL */)) return [3 /*break*/, 18]; image = void 0; url = img.url; _c.label = 15; case 15: _c.trys.push([15, 17, , 18]); return [4 /*yield*/, this.context.cache.match(url)]; case 16: image = _c.sent(); this.ctx.drawImage(image, container.bounds.left - (image.width + 10), container.bounds.top); return [3 /*break*/, 18]; case 17: _c.sent(); this.context.logger.error("Error loading list-style-image " + url); return [3 /*break*/, 18]; case 18: return [3 /*break*/, 20]; case 19: if (paint.listValue && container.styles.listStyleType !== -1 /* NONE */) { fontFamily = this.createFontStyle(styles)[0]; this.ctx.font = fontFamily; this.ctx.fillStyle = asString(styles.color); this.ctx.textBaseline = 'middle'; this.ctx.textAlign = 'right'; bounds = new Bounds(container.bounds.left, container.bounds.top + getAbsoluteValue(container.styles.paddingTop, container.bounds.width), container.bounds.width, computeLineHeight(styles.lineHeight, styles.fontSize.number) / 2 + 1); this.renderTextWithLetterSpacing(new TextBounds(paint.listValue, bounds), styles.letterSpacing, computeLineHeight(styles.lineHeight, styles.fontSize.number) / 2 + 2); this.ctx.textBaseline = 'bottom'; this.ctx.textAlign = 'left'; } _c.label = 20; case 20: return [2 /*return*/]; } }); }); }; CanvasRenderer.prototype.renderStackContent = function (stack) { return __awaiter(this, void 0, void 0, function () { var _i, _a, child, _b, _c, child, _d, _e, child, _f, _g, child, _h, _j, child, _k, _l, child, _m, _o, child; return __generator(this, function (_p) { switch (_p.label) { case 0: if (contains(stack.element.container.flags, 16 /* DEBUG_RENDER */)) { debugger; } // https://www.w3.org/TR/css-position-3/#painting-order // 1. the background and borders of the element forming the stacking context. return [4 /*yield*/, this.renderNodeBackgroundAndBorders(stack.element)]; case 1: // https://www.w3.org/TR/css-position-3/#painting-order // 1. the background and borders of the element forming the stacking context. _p.sent(); _i = 0, _a = stack.negativeZIndex; _p.label = 2; case 2: if (!(_i < _a.length)) return [3 /*break*/, 5]; child = _a[_i]; return [4 /*yield*/, this.renderStack(child)]; case 3: _p.sent(); _p.label = 4; case 4: _i++; return [3 /*break*/, 2]; case 5: // 3. For all its in-flow, non-positioned, block-level descendants in tree order: return [4 /*yield*/, this.renderNodeContent(stack.element)]; case 6: // 3. For all its in-flow, non-positioned, block-level descendants in tree order: _p.sent(); _b = 0, _c = stack.nonInlineLevel; _p.label = 7; case 7: if (!(_b < _c.length)) return [3 /*break*/, 10]; child = _c[_b]; return [4 /*yield*/, this.renderNode(child)]; case 8: _p.sent(); _p.label = 9; case 9: _b++; return [3 /*break*/, 7]; case 10: _d = 0, _e = stack.nonPositionedFloats; _p.label = 11; case 11: if (!(_d < _e.length)) return [3 /*break*/, 14]; child = _e[_d]; return [4 /*yield*/, this.renderStack(child)]; case 12: _p.sent(); _p.label = 13; case 13: _d++; return [3 /*break*/, 11]; case 14: _f = 0, _g = stack.nonPositionedInlineLevel; _p.label = 15; case 15: if (!(_f < _g.length)) return [3 /*break*/, 18]; child = _g[_f]; return [4 /*yield*/, this.renderStack(child)]; case 16: _p.sent(); _p.label = 17; case 17: _f++; return [3 /*break*/, 15]; case 18: _h = 0, _j = stack.inlineLevel; _p.label = 19; case 19: if (!(_h < _j.length)) return [3 /*break*/, 22]; child = _j[_h]; return [4 /*yield*/, this.renderNode(child)]; case 20: _p.sent(); _p.label = 21; case 21: _h++; return [3 /*break*/, 19]; case 22: _k = 0, _l = stack.zeroOrAutoZIndexOrTransformedOrOpacity; _p.label = 23; case 23: if (!(_k < _l.length)) return [3 /*break*/, 26]; child = _l[_k]; return [4 /*yield*/, this.renderStack(child)]; case 24: _p.sent(); _p.label = 25; case 25: _k++; return [3 /*break*/, 23]; case 26: _m = 0, _o = stack.positiveZIndex; _p.label = 27; case 27: if (!(_m < _o.length)) return [3 /*break*/, 30]; child = _o[_m]; return [4 /*yield*/, this.renderStack(child)]; case 28: _p.sent(); _p.label = 29; case 29: _m++; return [3 /*break*/, 27]; case 30: return [2 /*return*/]; } }); }); }; CanvasRenderer.prototype.mask = function (paths) { this.ctx.beginPath(); this.ctx.moveTo(0, 0); this.ctx.lineTo(this.canvas.width, 0); this.ctx.lineTo(this.canvas.width, this.canvas.height); this.ctx.lineTo(0, this.canvas.height); this.ctx.lineTo(0, 0); this.formatPath(paths.slice(0).reverse()); this.ctx.closePath(); }; CanvasRenderer.prototype.path = function (paths) { this.ctx.beginPath(); this.formatPath(paths); this.ctx.closePath(); }; CanvasRenderer.prototype.formatPath = function (paths) { var _this = this; paths.forEach(function (point, index) { var start = isBezierCurve(point) ? point.start : point; if (index === 0) { _this.ctx.moveTo(start.x, start.y); } else { _this.ctx.lineTo(start.x, start.y); } if (isBezierCurve(point)) { _this.ctx.bezierCurveTo(point.startControl.x, point.startControl.y, point.endControl.x, point.endControl.y, point.end.x, point.end.y); } }); }; CanvasRenderer.prototype.renderRepeat = function (path, pattern, offsetX, offsetY) { this.path(path); this.ctx.fillStyle = pattern; this.ctx.translate(offsetX, offsetY); this.ctx.fill(); this.ctx.translate(-offsetX, -offsetY); }; CanvasRenderer.prototype.resizeImage = function (image, width, height) { var _a; if (image.width === width && image.height === height) { return image; } var ownerDocument = (_a = this.canvas.ownerDocument) !== null && _a !== void 0 ? _a : document; var canvas = ownerDocument.createElement('canvas'); canvas.width = Math.max(1, width); canvas.height = Math.max(1, height); var ctx = canvas.getContext('2d'); ctx.drawImage(image, 0, 0, image.width, image.height, 0, 0, width, height); return canvas; }; CanvasRenderer.prototype.renderBackgroundImage = function (container) { return __awaiter(this, void 0, void 0, function () { var index, _loop_1, this_1, _i, _a, backgroundImage; return __generator(this, function (_b) { switch (_b.label) { case 0: index = container.styles.backgroundImage.length - 1; _loop_1 = function (backgroundImage) { var image, url, _c, path, x, y, width, height, pattern, _d, path, x, y, width, height, _e, lineLength, x0, x1, y0, y1, canvas, ctx, gradient_1, pattern, _f, path, left, top_1, width, height, position, x, y, _g, rx, ry, radialGradient_1, midX, midY, f, invF; return __generator(this, function (_h) { switch (_h.label) { case 0: if (!(backgroundImage.type === 0 /* URL */)) return [3 /*break*/, 5]; image = void 0; url = backgroundImage.url; _h.label = 1; case 1: _h.trys.push([1, 3, , 4]); return [4 /*yield*/, this_1.context.cache.match(url)]; case 2: image = _h.sent(); return [3 /*break*/, 4]; case 3: _h.sent(); this_1.context.logger.error("Error loading background-image " + url); return [3 /*break*/, 4]; case 4: if (image) { _c = calculateBackgroundRendering(container, index, [ image.width, image.height, image.width / image.height ]), path = _c[0], x = _c[1], y = _c[2], width = _c[3], height = _c[4]; pattern = this_1.ctx.createPattern(this_1.resizeImage(image, width, height), 'repeat'); this_1.renderRepeat(path, pattern, x, y); } return [3 /*break*/, 6]; case 5: if (isLinearGradient(backgroundImage)) { _d = calculateBackgroundRendering(container, index, [null, null, null]), path = _d[0], x = _d[1], y = _d[2], width = _d[3], height = _d[4]; _e = calculateGradientDirection(backgroundImage.angle, width, height), lineLength = _e[0], x0 = _e[1], x1 = _e[2], y0 = _e[3], y1 = _e[4]; canvas = document.createElement('canvas'); canvas.width = width; canvas.height = height; ctx = canvas.getContext('2d'); gradient_1 = ctx.createLinearGradient(x0, y0, x1, y1); processColorStops(backgroundImage.stops, lineLength).forEach(function (colorStop) { return gradient_1.addColorStop(colorStop.stop, asString(colorStop.color)); }); ctx.fillStyle = gradient_1; ctx.fillRect(0, 0, width, height); if (width > 0 && height > 0) { pattern = this_1.ctx.createPattern(canvas, 'repeat'); this_1.renderRepeat(path, pattern, x, y); } } else if (isRadialGradient(backgroundImage)) { _f = calculateBackgroundRendering(container, index, [ null, null, null ]), path = _f[0], left = _f[1], top_1 = _f[2], width = _f[3], height = _f[4]; position = backgroundImage.position.length === 0 ? [FIFTY_PERCENT] : backgroundImage.position; x = getAbsoluteValue(position[0], width); y = getAbsoluteValue(position[position.length - 1], height); _g = calculateRadius(backgroundImage, x, y, width, height), rx = _g[0], ry = _g[1]; if (rx > 0 && ry > 0) { radialGradient_1 = this_1.ctx.createRadialGradient(left + x, top_1 + y, 0, left + x, top_1 + y, rx); processColorStops(backgroundImage.stops, rx * 2).forEach(function (colorStop) { return radialGradient_1.addColorStop(colorStop.stop, asString(colorStop.color)); }); this_1.path(path); this_1.ctx.fillStyle = radialGradient_1; if (rx !== ry) { midX = container.bounds.left + 0.5 * container.bounds.width; midY = container.bounds.top + 0.5 * container.bounds.height; f = ry / rx; invF = 1 / f; this_1.ctx.save(); this_1.ctx.translate(midX, midY); this_1.ctx.transform(1, 0, 0, f, 0, 0); this_1.ctx.translate(-midX, -midY); this_1.ctx.fillRect(left, invF * (top_1 - midY) + midY, width, height * invF); this_1.ctx.restore(); } else { this_1.ctx.fill(); } } } _h.label = 6; case 6: index--; return [2 /*return*/]; } }); }; this_1 = this; _i = 0, _a = container.styles.backgroundImage.slice(0).reverse(); _b.label = 1; case 1: if (!(_i < _a.length)) return [3 /*break*/, 4]; backgroundImage = _a[_i]; return [5 /*yield**/, _loop_1(backgroundImage)]; case 2: _b.sent(); _b.label = 3; case 3: _i++; return [3 /*break*/, 1]; case 4: return [2 /*return*/]; } }); }); }; CanvasRenderer.prototype.renderSolidBorder = function (color, side, curvePoints) { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { this.path(parsePathForBorder(curvePoints, side)); this.ctx.fillStyle = asString(color); this.ctx.fill(); return [2 /*return*/]; }); }); }; CanvasRenderer.prototype.renderDoubleBorder = function (color, width, side, curvePoints) { return __awaiter(this, void 0, void 0, function () { var outerPaths, innerPaths; return __generator(this, function (_a) { switch (_a.label) { case 0: if (!(width < 3)) return [3 /*break*/, 2]; return [4 /*yield*/, this.renderSolidBorder(color, side, curvePoints)]; case 1: _a.sent(); return [2 /*return*/]; case 2: outerPaths = parsePathForBorderDoubleOuter(curvePoints, side); this.path(outerPaths); this.ctx.fillStyle = asString(color); this.ctx.fill(); innerPaths = parsePathForBorderDoubleInner(curvePoints, side); this.path(innerPaths); this.ctx.fill(); return [2 /*return*/]; } }); }); }; CanvasRenderer.prototype.renderNodeBackgroundAndBorders = function (paint) { return __awaiter(this, void 0, void 0, function () { var styles, hasBackground, borders, backgroundPaintingArea, side, _i, borders_1, border; var _this = this; return __generator(this, function (_a) { switch (_a.label) { case 0: this.applyEffects(paint.getEffects(2 /* BACKGROUND_BORDERS */)); styles = paint.container.styles; hasBackground = !isTransparent(styles.backgroundColor) || styles.backgroundImage.length; borders = [ { style: styles.borderTopStyle, color: styles.borderTopColor, width: styles.borderTopWidth }, { style: styles.borderRightStyle, color: styles.borderRightColor, width: styles.borderRightWidth }, { style: styles.borderBottomStyle, color: styles.borderBottomColor, width: styles.borderBottomWidth }, { style: styles.borderLeftStyle, color: styles.borderLeftColor, width: styles.borderLeftWidth } ]; backgroundPaintingArea = calculateBackgroundCurvedPaintingArea(getBackgroundValueForIndex(styles.backgroundClip, 0), paint.curves); if (!(hasBackground || styles.boxShadow.length)) return [3 /*break*/, 2]; this.ctx.save(); this.path(backgroundPaintingArea); this.ctx.clip(); if (!isTransparent(styles.backgroundColor)) { this.ctx.fillStyle = asString(styles.backgroundColor); this.ctx.fill(); } return [4 /*yield*/, this.renderBackgroundImage(paint.container)]; case 1: _a.sent(); this.ctx.restore(); styles.boxShadow .slice(0) .reverse() .forEach(function (shadow) { _this.ctx.save(); var borderBoxArea = calculateBorderBoxPath(paint.curves); var maskOffset = shadow.inset ? 0 : MASK_OFFSET; var shadowPaintingArea = transformPath(borderBoxArea, -maskOffset + (shadow.inset ? 1 : -1) * shadow.spread.number, (shadow.inset ? 1 : -1) * shadow.spread.number, shadow.spread.number * (shadow.inset ? -2 : 2), shadow.spread.number * (shadow.inset ? -2 : 2)); if (shadow.inset) { _this.path(borderBoxArea); _this.ctx.clip(); _this.mask(shadowPaintingArea); } else { _this.mask(borderBoxArea); _this.ctx.clip(); _this.path(shadowPaintingArea); } _this.ctx.shadowOffsetX = shadow.offsetX.number + maskOffset; _this.ctx.shadowOffsetY = shadow.offsetY.number; _this.ctx.shadowColor = asString(shadow.color); _this.ctx.shadowBlur = shadow.blur.number; _this.ctx.fillStyle = shadow.inset ? asString(shadow.color) : 'rgba(0,0,0,1)'; _this.ctx.fill(); _this.ctx.restore(); }); _a.label = 2; case 2: side = 0; _i = 0, borders_1 = borders; _a.label = 3; case 3: if (!(_i < borders_1.length)) return [3 /*break*/, 13]; border = borders_1[_i]; if (!(border.style !== 0 /* NONE */ && !isTransparent(border.color) && border.width > 0)) return [3 /*break*/, 11]; if (!(border.style === 2 /* DASHED */)) return [3 /*break*/, 5]; return [4 /*yield*/, this.renderDashedDottedBorder(border.color, border.width, side, paint.curves, 2 /* DASHED */)]; case 4: _a.sent(); return [3 /*break*/, 11]; case 5: if (!(border.style === 3 /* DOTTED */)) return [3 /*break*/, 7]; return [4 /*yield*/, this.renderDashedDottedBorder(border.color, border.width, side, paint.curves, 3 /* DOTTED */)]; case 6: _a.sent(); return [3 /*break*/, 11]; case 7: if (!(border.style === 4 /* DOUBLE */)) return [3 /*break*/, 9]; return [4 /*yield*/, this.renderDoubleBorder(border.color, border.width, side, paint.curves)]; case 8: _a.sent(); return [3 /*break*/, 11]; case 9: return [4 /*yield*/, this.renderSolidBorder(border.color, side, paint.curves)]; case 10: _a.sent(); _a.label = 11; case 11: side++; _a.label = 12; case 12: _i++; return [3 /*break*/, 3]; case 13: return [2 /*return*/]; } }); }); }; CanvasRenderer.prototype.renderDashedDottedBorder = function (color, width, side, curvePoints, style) { return __awaiter(this, void 0, void 0, function () { var strokePaths, boxPaths, startX, startY, endX, endY, length, dashLength, spaceLength, useLineDash, multiplier, numberOfDashes, minSpace, maxSpace, path1, path2, path1, path2; return __generator(this, function (_a) { this.ctx.save(); strokePaths = parsePathForBorderStroke(curvePoints, side); boxPaths = parsePathForBorder(curvePoints, side); if (style === 2 /* DASHED */) { this.path(boxPaths); this.ctx.clip(); } if (isBezierCurve(boxPaths[0])) { startX = boxPaths[0].start.x; startY = boxPaths[0].start.y; } else { startX = boxPaths[0].x; startY = boxPaths[0].y; } if (isBezierCurve(boxPaths[1])) { endX = boxPaths[1].end.x; endY = boxPaths[1].end.y; } else { endX = boxPaths[1].x; endY = boxPaths[1].y; } if (side === 0 || side === 2) { length = Math.abs(startX - endX); } else { length = Math.abs(startY - endY); } this.ctx.beginPath(); if (style === 3 /* DOTTED */) { this.formatPath(strokePaths); } else { this.formatPath(boxPaths.slice(0, 2)); } dashLength = width < 3 ? width * 3 : width * 2; spaceLength = width < 3 ? width * 2 : width; if (style === 3 /* DOTTED */) { dashLength = width; spaceLength = width; } useLineDash = true; if (length <= dashLength * 2) { useLineDash = false; } else if (length <= dashLength * 2 + spaceLength) { multiplier = length / (2 * dashLength + spaceLength); dashLength *= multiplier; spaceLength *= multiplier; } else { numberOfDashes = Math.floor((length + spaceLength) / (dashLength + spaceLength)); minSpace = (length - numberOfDashes * dashLength) / (numberOfDashes - 1); maxSpace = (length - (numberOfDashes + 1) * dashLength) / numberOfDashes; spaceLength = maxSpace <= 0 || Math.abs(spaceLength - minSpace) < Math.abs(spaceLength - maxSpace) ? minSpace : maxSpace; } if (useLineDash) { if (style === 3 /* DOTTED */) { this.ctx.setLineDash([0, dashLength + spaceLength]); } else { this.ctx.setLineDash([dashLength, spaceLength]); } } if (style === 3 /* DOTTED */) { this.ctx.lineCap = 'round'; this.ctx.lineWidth = width; } else { this.ctx.lineWidth = width * 2 + 1.1; } this.ctx.strokeStyle = asString(color); this.ctx.stroke(); this.ctx.setLineDash([]); // dashed round edge gap if (style === 2 /* DASHED */) { if (isBezierCurve(boxPaths[0])) { path1 = boxPaths[3]; path2 = boxPaths[0]; this.ctx.beginPath(); this.formatPath([new Vector(path1.end.x, path1.end.y), new Vector(path2.start.x, path2.start.y)]); this.ctx.stroke(); } if (isBezierCurve(boxPaths[1])) { path1 = boxPaths[1]; path2 = boxPaths[2]; this.ctx.beginPath(); this.formatPath([new Vector(path1.end.x, path1.end.y), new Vector(path2.start.x, path2.start.y)]); this.ctx.stroke(); } } this.ctx.restore(); return [2 /*return*/]; }); }); }; CanvasRenderer.prototype.render = function (element) { return __awaiter(this, void 0, void 0, function () { var stack; return __generator(this, function (_a) { switch (_a.label) { case 0: if (this.options.backgroundColor) { this.ctx.fillStyle = asString(this.options.backgroundColor); this.ctx.fillRect(this.options.x, this.options.y, this.options.width, this.options.height); } stack = parseStackingContexts(element); return [4 /*yield*/, this.renderStack(stack)]; case 1: _a.sent(); this.applyEffects([]); return [2 /*return*/, this.canvas]; } }); }); }; return CanvasRenderer; }(Renderer)); var isTextInputElement = function (container) { if (container instanceof TextareaElementContainer) { return true; } else if (container instanceof SelectElementContainer) { return true; } else if (container instanceof InputElementContainer && container.type !== RADIO && container.type !== CHECKBOX) { return true; } return false; }; var calculateBackgroundCurvedPaintingArea = function (clip, curves) { switch (clip) { case 0 /* BORDER_BOX */: return calculateBorderBoxPath(curves); case 2 /* CONTENT_BOX */: return calculateContentBoxPath(curves); case 1 /* PADDING_BOX */: default: return calculatePaddingBoxPath(curves); } }; var canvasTextAlign = function (textAlign) { switch (textAlign) { case 1 /* CENTER */: return 'center'; case 2 /* RIGHT */: return 'right'; case 0 /* LEFT */: default: return 'left'; } }; // see https://github.com/niklasvh/html2canvas/pull/2645 var iOSBrokenFonts = ['-apple-system', 'system-ui']; var fixIOSSystemFonts = function (fontFamilies) { return /iPhone OS 15_(0|1)/.test(window.navigator.userAgent) ? fontFamilies.filter(function (fontFamily) { return iOSBrokenFonts.indexOf(fontFamily) === -1; }) : fontFamilies; }; var ForeignObjectRenderer = /** @class */ (function (_super) { __extends(ForeignObjectRenderer, _super); function ForeignObjectRenderer(context, options) { var _this = _super.call(this, context, options) || this; _this.canvas = options.canvas ? options.canvas : document.createElement('canvas'); _this.ctx = _this.canvas.getContext('2d'); _this.options = options; _this.canvas.width = Math.floor(options.width * options.scale); _this.canvas.height = Math.floor(options.height * options.scale); _this.canvas.style.width = options.width + "px"; _this.canvas.style.height = options.height + "px"; _this.ctx.scale(_this.options.scale, _this.options.scale); _this.ctx.translate(-options.x, -options.y); _this.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized (" + options.width + "x" + options.height + " at " + options.x + "," + options.y + ") with scale " + options.scale); return _this; } ForeignObjectRenderer.prototype.render = function (element) { return __awaiter(this, void 0, void 0, function () { var svg, img; return __generator(this, function (_a) { switch (_a.label) { case 0: svg = createForeignObjectSVG(this.options.width * this.options.scale, this.options.height * this.options.scale, this.options.scale, this.options.scale, element); return [4 /*yield*/, loadSerializedSVG(svg)]; case 1: img = _a.sent(); if (this.options.backgroundColor) { this.ctx.fillStyle = asString(this.options.backgroundColor); this.ctx.fillRect(0, 0, this.options.width * this.options.scale, this.options.height * this.options.scale); } this.ctx.drawImage(img, -this.options.x * this.options.scale, -this.options.y * this.options.scale); return [2 /*return*/, this.canvas]; } }); }); }; return ForeignObjectRenderer; }(Renderer)); var loadSerializedSVG = function (svg) { return new Promise(function (resolve, reject) { var img = new Image(); img.onload = function () { resolve(img); }; img.onerror = reject; img.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(svg)); }); }; var Logger = /** @class */ (function () { function Logger(_a) { var id = _a.id, enabled = _a.enabled; this.id = id; this.enabled = enabled; this.start = Date.now(); } // eslint-disable-next-line @typescript-eslint/no-explicit-any Logger.prototype.debug = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (this.enabled) { // eslint-disable-next-line no-console if (typeof window !== 'undefined' && window.console && typeof console.debug === 'function') { // eslint-disable-next-line no-console console.debug.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args)); } else { this.info.apply(this, args); } } }; Logger.prototype.getTime = function () { return Date.now() - this.start; }; // eslint-disable-next-line @typescript-eslint/no-explicit-any Logger.prototype.info = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (this.enabled) { // eslint-disable-next-line no-console if (typeof window !== 'undefined' && window.console && typeof console.info === 'function') { // eslint-disable-next-line no-console console.info.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args)); } } }; // eslint-disable-next-line @typescript-eslint/no-explicit-any Logger.prototype.warn = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (this.enabled) { // eslint-disable-next-line no-console if (typeof window !== 'undefined' && window.console && typeof console.warn === 'function') { // eslint-disable-next-line no-console console.warn.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args)); } else { this.info.apply(this, args); } } }; // eslint-disable-next-line @typescript-eslint/no-explicit-any Logger.prototype.error = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (this.enabled) { // eslint-disable-next-line no-console if (typeof window !== 'undefined' && window.console && typeof console.error === 'function') { // eslint-disable-next-line no-console console.error.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args)); } else { this.info.apply(this, args); } } }; Logger.instances = {}; return Logger; }()); var Context = /** @class */ (function () { function Context(options, windowBounds) { var _a; this.windowBounds = windowBounds; this.instanceName = "#" + Context.instanceCount++; this.logger = new Logger({ id: this.instanceName, enabled: options.logging }); this.cache = (_a = options.cache) !== null && _a !== void 0 ? _a : new Cache(this, options); } Context.instanceCount = 1; return Context; }()); var html2canvas = function (element, options) { if (options === void 0) { options = {}; } return renderElement(element, options); }; if (typeof window !== 'undefined') { CacheStorage.setContext(window); } var renderElement = function (element, opts) { return __awaiter(void 0, void 0, void 0, function () { var ownerDocument, defaultView, resourceOptions, contextOptions, windowOptions, windowBounds, context, foreignObjectRendering, cloneOptions, documentCloner, clonedElement, container, _a, width, height, left, top, backgroundColor, renderOptions, canvas, renderer, root, renderer; var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; return __generator(this, function (_u) { switch (_u.label) { case 0: if (!element || typeof element !== 'object') { return [2 /*return*/, Promise.reject('Invalid element provided as first argument')]; } ownerDocument = element.ownerDocument; if (!ownerDocument) { throw new Error("Element is not attached to a Document"); } defaultView = ownerDocument.defaultView; if (!defaultView) { throw new Error("Document is not attached to a Window"); } resourceOptions = { allowTaint: (_b = opts.allowTaint) !== null && _b !== void 0 ? _b : false, imageTimeout: (_c = opts.imageTimeout) !== null && _c !== void 0 ? _c : 15000, proxy: opts.proxy, useCORS: (_d = opts.useCORS) !== null && _d !== void 0 ? _d : false }; contextOptions = __assign({ logging: (_e = opts.logging) !== null && _e !== void 0 ? _e : true, cache: opts.cache }, resourceOptions); windowOptions = { windowWidth: (_f = opts.windowWidth) !== null && _f !== void 0 ? _f : defaultView.innerWidth, windowHeight: (_g = opts.windowHeight) !== null && _g !== void 0 ? _g : defaultView.innerHeight, scrollX: (_h = opts.scrollX) !== null && _h !== void 0 ? _h : defaultView.pageXOffset, scrollY: (_j = opts.scrollY) !== null && _j !== void 0 ? _j : defaultView.pageYOffset }; windowBounds = new Bounds(windowOptions.scrollX, windowOptions.scrollY, windowOptions.windowWidth, windowOptions.windowHeight); context = new Context(contextOptions, windowBounds); foreignObjectRendering = (_k = opts.foreignObjectRendering) !== null && _k !== void 0 ? _k : false; cloneOptions = { allowTaint: (_l = opts.allowTaint) !== null && _l !== void 0 ? _l : false, onclone: opts.onclone, ignoreElements: opts.ignoreElements, inlineImages: foreignObjectRendering, copyStyles: foreignObjectRendering }; context.logger.debug("Starting document clone with size " + windowBounds.width + "x" + windowBounds.height + " scrolled to " + -windowBounds.left + "," + -windowBounds.top); documentCloner = new DocumentCloner(context, element, cloneOptions); clonedElement = documentCloner.clonedReferenceElement; if (!clonedElement) { return [2 /*return*/, Promise.reject("Unable to find element in cloned iframe")]; } return [4 /*yield*/, documentCloner.toIFrame(ownerDocument, windowBounds)]; case 1: container = _u.sent(); _a = isBodyElement(clonedElement) || isHTMLElement(clonedElement) ? parseDocumentSize(clonedElement.ownerDocument) : parseBounds(context, clonedElement), width = _a.width, height = _a.height, left = _a.left, top = _a.top; backgroundColor = parseBackgroundColor(context, clonedElement, opts.backgroundColor); renderOptions = { canvas: opts.canvas, backgroundColor: backgroundColor, scale: (_o = (_m = opts.scale) !== null && _m !== void 0 ? _m : defaultView.devicePixelRatio) !== null && _o !== void 0 ? _o : 1, x: ((_p = opts.x) !== null && _p !== void 0 ? _p : 0) + left, y: ((_q = opts.y) !== null && _q !== void 0 ? _q : 0) + top, width: (_r = opts.width) !== null && _r !== void 0 ? _r : Math.ceil(width), height: (_s = opts.height) !== null && _s !== void 0 ? _s : Math.ceil(height) }; if (!foreignObjectRendering) return [3 /*break*/, 3]; context.logger.debug("Document cloned, using foreign object rendering"); renderer = new ForeignObjectRenderer(context, renderOptions); return [4 /*yield*/, renderer.render(clonedElement)]; case 2: canvas = _u.sent(); return [3 /*break*/, 5]; case 3: context.logger.debug("Document cloned, element located at " + left + "," + top + " with size " + width + "x" + height + " using computed rendering"); context.logger.debug("Starting DOM parsing"); root = parseTree(context, clonedElement); if (backgroundColor === root.styles.backgroundColor) { root.styles.backgroundColor = COLORS.TRANSPARENT; } context.logger.debug("Starting renderer for element at " + renderOptions.x + "," + renderOptions.y + " with size " + renderOptions.width + "x" + renderOptions.height); renderer = new CanvasRenderer(context, renderOptions); return [4 /*yield*/, renderer.render(root)]; case 4: canvas = _u.sent(); _u.label = 5; case 5: if ((_t = opts.removeContainer) !== null && _t !== void 0 ? _t : true) { if (!DocumentCloner.destroy(container)) { context.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore"); } } context.logger.debug("Finished rendering"); return [2 /*return*/, canvas]; } }); }); }; var parseBackgroundColor = function (context, element, backgroundColorOverride) { var ownerDocument = element.ownerDocument; // http://www.w3.org/TR/css3-background/#special-backgrounds var documentBackgroundColor = ownerDocument.documentElement ? parseColor(context, getComputedStyle(ownerDocument.documentElement).backgroundColor) : COLORS.TRANSPARENT; var bodyBackgroundColor = ownerDocument.body ? parseColor(context, getComputedStyle(ownerDocument.body).backgroundColor) : COLORS.TRANSPARENT; var defaultBackgroundColor = typeof backgroundColorOverride === 'string' ? parseColor(context, backgroundColorOverride) : backgroundColorOverride === null ? COLORS.TRANSPARENT : 0xffffffff; return element === ownerDocument.documentElement ? isTransparent(documentBackgroundColor) ? isTransparent(bodyBackgroundColor) ? defaultBackgroundColor : bodyBackgroundColor : documentBackgroundColor : defaultBackgroundColor; }; return html2canvas; }))); //# sourceMappingURL=html2canvas.js.map
yairm210/Mermaid-gif-maker
13
A small webpage for making GIFs of mermaid graphs
JavaScript
yairm210
Yair Morgenstern
index.html
HTML
<html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Mermaid.js GIF maker</title> <link rel="stylesheet" href="simple.min.css"> <script src="html2canvas.js"></script> <script src="gif.js"></script> <script src="gif.worker.js"></script> <script type="module"> window.isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs'; var mermaidTheme = 'default'; if (window.isDarkMode) mermaidTheme = 'dark'; mermaid.initialize({ startOnLoad: false, theme: mermaidTheme }); // https://stackoverflow.com/questions/65533391/functions-not-working-when-type-module-or-import window.updateGraph = async function (baseGraphText, frameNumber) { // somehow it gets rid of this??? and we need to set the resulting sgv into another container??? // I confuse async function getSvg(id, code){ try { const result = await mermaid.render(id, code); return result; } catch { // display the error message in the editor, not outside - thanks https://github.com/mermaid-js/mermaid-live-editor/pull/1288/files :) const errorDiv = document.querySelector(`#d${id}`); const svg = errorDiv?.innerHTML ?? ''; errorDiv?.remove(); return { svg, bindFunctions: undefined }; } } const {svg} = await getSvg('rendering-area-'+frameNumber, baseGraphText); // text -> svg const renderingAreaContainer = document.getElementById('graph-' + frameNumber); renderingAreaContainer.innerHTML = svg; } var regex = /\{\[(\d+\s*[^|}]*(?:\s*\|\s*\d+\s*[^|}]*)*)\]\}/g var numberregex = /\d+/ // Returns number/string pairs e.g. [{number:1, string: "a"}] window.getPairs = function(text){ const list = [] var match while ((match = regex.exec(text)) !== null) { const pairs = match[1].split('|'); pairs.forEach(pair => { const number = pair.match(numberregex)[0] const string = pair.slice(number.length).trim() // const [number, string] = pair.split(':').map(s => s.trim()); list.push({number: Number(number), string}) }); } return list } window.generateTexts = function(text){ // Format: "Some text with {[0: A |1: B | 2: C]} and another {[3: D |4: E]} inside." // Means: first part should be: From stage 0, A; From 1, B; From 2, C. // Second part should be empty initially, and from stage 3, D; From 4, E const diffs = [...text.matchAll(regex)] const diffToPairs = new Map() for (let diff of diffs){ diffToPairs.set(diff[0], window.getPairs(diff[0])) } var stages = [...diffToPairs.values()].flat().map((pair) => pair.number).toSorted() stages = [...new Set(stages)] // Remove duplicates var stageTexts = [] for (let stageNum of stages){ var stageText = text for (let [diff, pairs] of diffToPairs){ var pairToSubstitute = pairs.findLast((it) => it.number <= stageNum) const text = pairToSubstitute ? pairToSubstitute.string : "" stageText = stageText.replace(diff, text) } stageTexts.push(stageText) } return stageTexts } window.createEditors = function(templateText){ const texts = generateTexts(templateText) window.removeAllEditors() for (const text of texts) window.addEditor(text) } window.createGif = async function () { document.getElementById('create-gif-button').textContent = 'Creating gif...'; const maxGraphWidth = Math.max(...Array.from(document.getElementsByClassName('graph')).map(graph => graph.clientWidth)); const maxGraphHeight = Math.max(...Array.from(document.getElementsByClassName('graph')).map(graph => graph.clientHeight)); // Empirically found that 2x is required for width and height, not sure why var gif = new GIF({ workers: 2, quality: 10, width: maxGraphWidth * 2, height: maxGraphHeight * 2, background: window.isDarkMode ? '#000' : '#fff', }); gif.on('finished', function(blob) { const objectUrl = URL.createObjectURL(blob) document.getElementById('gif').src = objectUrl; setTimeout(() => { // scroll to end of page (need to wait for gif to be rendered) window.scrollTo(0, document.body.scrollHeight); }, 100); // Magic from https://stackoverflow.com/questions/63440099/how-to-download-a-gif-from-a-given-url-using-javascript (async () => { //create new a element let a = document.createElement('a'); // use download attribute https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#Attributes a.download = 'myGif'; a.href = objectUrl; //store download url in javascript https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes#JavaScript_access a.dataset.downloadurl = ['application/octet-stream', a.download, a.href].join(':'); //click on element to start download a.click(); })(); }); const graphElements = Array.from(document.getElementsByClassName('graph')); for (const graphElement of graphElements) { // svg -> canvas const canvas = await html2canvas(graphElement, { allowTaint: true, backgroundColor: window.isDarkMode ? '#000000' : '#ffffff', }) // canvas -> gif gif.addFrame(canvas, {delay: 800}); } // gif.render(); gif.render(); document.getElementById('create-gif-button').textContent = 'Create Gif'; } </script> <script src="./monaco-editor-loader.js" type="text/javascript"></script> <script type="module"> require.config({ paths: { vs: './monaco-editor-vs' } }); import initEditor from './monaco-mermaid.js'; var counter = 0 require(['vs/editor/editor.main'], function () { initEditor(monaco); // Defines Mermaid language and theme window.removeAllEditors = function(){ document.getElementById('frame-container').replaceChildren() } window.addTemplateEditor = function(){ const container = document.getElementById("template-container") var monacoEditor = document.createElement('div'); monacoEditor.id = 'template-editor'; monacoEditor.style = "width: 50%; height: 300px; border: 1px solid grey; display: inline-block"; container.appendChild(monacoEditor); var template = [ "graph TD", "Source {[0 --> |4 ~~~ ]} OldDB", "Source {[0 ~~~ |1 --> ]} NewDB{[0 :::invisible |1 ]}", "OldDB{[0 |4 :::invisible ]} {[0 --> |3 -.-> |4 ~~~ ]} Destination", "NewDB {[0 ~~~ |2 -.-> |3 --> ]} Destination", "", "classDef invisible fill-opacity:0, stroke-opacity:0, color:#0000;" ].join("\n") var editor = monaco.editor.create(document.getElementById('template-editor'), { value: template, language: 'mermaid', minimap: { enabled: false }, theme: window.isDarkMode ? 'mermaid-dark' : 'mermaid', overviewRulerLanes: 0 }); window.createEditors(template) editor.getModel().onDidChangeContent(() => { window.createEditors(editor.getValue()) }); } window.addEditor = function (initialGraphText, position = 0) { counter += 1 const frameNumber = counter var frame = document.createElement('div'); frame.id = 'frame-' + frameNumber; frame.className = 'frame'; const borderColor = isDarkMode ? "white" : "black" frame.style = `border: 1px solid ${borderColor}; margin: 10px; position: relative;`; if (position === 0) { document.getElementById('frame-container').appendChild(frame); } else { document.getElementById('frame-container').insertBefore(frame, document.getElementsByClassName("frame")[position]); } const buttonHolder = document.createElement('div'); // make the buttons float in the middle buttonHolder.style = "display: inline-flex;" + "text-align: center;" + "margin: 10px;" + "flex-direction: column;" + "align-items: stretch;" + "top: 0px;" + "right: 0px;" + "position: absolute;"; frame.appendChild(buttonHolder); const duplicateEditorButton = document.createElement('button'); duplicateEditorButton.onclick = () => { addEditor(editor.getValue(), position + 1) } duplicateEditorButton.innerText = "Duplicate"; buttonHolder.appendChild(duplicateEditorButton); buttonHolder.appendChild(document.createElement('br')); const deleteEditorButton = document.createElement('button'); deleteEditorButton.onclick = () => { frame.remove() } deleteEditorButton.innerText = "Remove"; buttonHolder.appendChild(deleteEditorButton); var monacoEditor = document.createElement('div'); monacoEditor.id = 'container-' + frameNumber; monacoEditor.style = "width: 50%; height: 300px; border: 1px solid grey; display: inline-block"; frame.appendChild(monacoEditor); var renderingArea = document.createElement('div'); renderingArea.id = 'rendering-area-' + frameNumber; var graph = document.createElement('div'); graph.id = 'graph-' + frameNumber; graph.className = 'graph'; // used for query selection graph.style = "display: inline-block;"; frame.appendChild(graph); var editor = monaco.editor.create(document.getElementById('container-' + frameNumber), { value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'), language: 'mermaid', minimap: { enabled: false }, theme: window.isDarkMode ? 'mermaid-dark' : 'mermaid', overviewRulerLanes: 0 }); editor.getModel().onDidChangeContent(() => { updateGraph(editor.getValue(), frameNumber); }); editor.setValue(initialGraphText) } const examples = { "Binary tree": [ "graph TD\n" + "Root[1]~~~L:::invisible\n" + "L~~~LL:::invisible\n" + "L~~~LR:::invisible\n" + "Root~~~R:::invisible\n" + "R~~~RL:::invisible\n" + "R~~~RR:::invisible\n" + "classDef invisible fill-opacity:0, stroke-opacity:0, color:#0000; \n", "graph TD\n" + "Root[1]~~~L:::invisible\n" + "L~~~LL:::invisible\n" + "L~~~LR:::invisible\n" + "Root-->R[2]\n" + "R~~~RL:::invisible\n" + "R~~~RR:::invisible\n" + "classDef invisible fill-opacity:0, stroke-opacity:0, color:#0000; \n", "graph TD\n" + "Root[1]~~~L:::invisible\n" + "L~~~LL:::invisible\n" + "L~~~LR:::invisible\n" + "Root-->R[2]\n" + "R~~~RL:::invisible\n" + "R-->RR[3]\n" + "classDef invisible fill-opacity:0, stroke-opacity:0, color:#0000; \n", "graph TD\n" + "Root[2]-->L[1]\n" + "L~~~LL:::invisible\n" + "L~~~LR:::invisible\n" + "Root-->R[3]\n" + "R~~~RL:::invisible\n" + "R~~~RR:::invisible\n" + "classDef invisible fill-opacity:0, stroke-opacity:0, color:#0000; \n", ] } window.addTemplateEditor() // examples["Migration"].forEach(frame => { // window.addEditor(frame) // }) }); </script> </head> <body style="grid-template-columns: 1fr 80% 1fr"> <a href="https://github.com/yairm210/Mermaid-gif-maker" style="position: absolute"> <img decoding="async" width="149" height="149" src="https://github.blog/wp-content/uploads/2008/12/forkme_left_gray_6d6d6d.png" class="attachment-full size-full" alt="Fork me on GitHub" loading="lazy"> </a> <h1>Mermaid.js GIF maker</h1> <div>This template of format: {[frameNumber text |frameNumber text ...]}</div> <div id="template-container"></div> <div>Is converted to these frames</div> <div id="frame-container"></div> <button id="create-gif-button" class="btn" onclick="createGif()" style="height: 100px; font-size: 36px">Create Gif</button> <img src="" id="gif" style="margin: auto"> </body> <footer> Made by Yair Morgenstern, <a href="https://github.com/yairm210/Mermaid-gif-maker">source here</a> </footer> </html>
yairm210/Mermaid-gif-maker
13
A small webpage for making GIFs of mermaid graphs
JavaScript
yairm210
Yair Morgenstern
mermaid.esm.min.mjs
JavaScript
import{b as pr}from"./chunks/mermaid.esm.min/chunk-BZCPFP2Z.mjs";import{a as ze}from"./chunks/mermaid.esm.min/chunk-TEYTTQG6.mjs";import{a as Or}from"./chunks/mermaid.esm.min/chunk-GSFY7FJO.mjs";import{a as Fr}from"./chunks/mermaid.esm.min/chunk-EJX47K7M.mjs";import"./chunks/mermaid.esm.min/chunk-IATEPIBH.mjs";import"./chunks/mermaid.esm.min/chunk-U6LOUQAF.mjs";import{a as mr}from"./chunks/mermaid.esm.min/chunk-7CRZUUBC.mjs";import{b as Sr,j as Ve,l as Lr,m as X,n as _r,o as Tr}from"./chunks/mermaid.esm.min/chunk-INOGIEW4.mjs";import"./chunks/mermaid.esm.min/chunk-TI4EEUUG.mjs";import{$ as W,A as K,B as Er,C as fe,D as at,G as wr,M as br,O as Cr,aa as ue,b as A,c as Be,d as dr,f as gr,fa as H,g as Ue,h as ve,i as Ae,j as hr,k as xr,r as Ee,u as Ge,v as yr,w as Dr,x as vr,y as $e,z as Ar}from"./chunks/mermaid.esm.min/chunk-DMXVZUOD.mjs";import{d as qe}from"./chunks/mermaid.esm.min/chunk-YPUTD6PB.mjs";import"./chunks/mermaid.esm.min/chunk-6BY5RJGC.mjs";import{a as o,e as ot}from"./chunks/mermaid.esm.min/chunk-GTKDMUJJ.mjs";var kr="c4",lt=o(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),ct=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/c4Diagram-PKRGQ4J3.mjs");return{id:kr,diagram:e}},"loader"),st={id:kr,detector:lt,loader:ct},Ir=st;var Mr="flowchart",ft=o((e,r)=>r?.flowchart?.defaultRenderer==="dagre-wrapper"||r?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),ut=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/flowDiagram-N2WQQY3I.mjs");return{id:Mr,diagram:e}},"loader"),pt={id:Mr,detector:ft,loader:ut},Rr=pt;var Nr="flowchart-v2",mt=o((e,r)=>r?.flowchart?.defaultRenderer==="dagre-d3"?!1:(r?.flowchart?.defaultRenderer==="elk"&&(r.layout="elk"),/^\s*graph/.test(e)&&r?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),dt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/flowDiagram-N2WQQY3I.mjs");return{id:Nr,diagram:e}},"loader"),gt={id:Nr,detector:mt,loader:dt},Pr=gt;var jr="er",ht=o(e=>/^\s*erDiagram/.test(e),"detector"),xt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/erDiagram-CXR4D6DV.mjs");return{id:jr,diagram:e}},"loader"),yt={id:jr,detector:ht,loader:xt},Hr=yt;var Yr="gitGraph",Dt=o(e=>/^\s*gitGraph/.test(e),"detector"),vt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/gitGraphDiagram-PQENWCQG.mjs");return{id:Yr,diagram:e}},"loader"),At={id:Yr,detector:Dt,loader:vt},Br=At;var Ur="gantt",Et=o(e=>/^\s*gantt/.test(e),"detector"),wt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/ganttDiagram-ND5H62MH.mjs");return{id:Ur,diagram:e}},"loader"),bt={id:Ur,detector:Et,loader:wt},Gr=bt;var $r="info",Ct=o(e=>/^\s*info/.test(e),"detector"),St=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/infoDiagram-O2SGZPPY.mjs");return{id:$r,diagram:e}},"loader"),Vr={id:$r,detector:Ct,loader:St};var qr="pie",Lt=o(e=>/^\s*pie/.test(e),"detector"),_t=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/pieDiagram-623AM5EG.mjs");return{id:qr,diagram:e}},"loader"),zr={id:qr,detector:Lt,loader:_t};var Kr="quadrantChart",Tt=o(e=>/^\s*quadrantChart/.test(e),"detector"),Ft=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/quadrantDiagram-WGSIUGW7.mjs");return{id:Kr,diagram:e}},"loader"),Ot={id:Kr,detector:Tt,loader:Ft},Wr=Ot;var Xr="xychart",kt=o(e=>/^\s*xychart-beta/.test(e),"detector"),It=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/xychartDiagram-D5476ICG.mjs");return{id:Xr,diagram:e}},"loader"),Mt={id:Xr,detector:kt,loader:It},Qr=Mt;var Zr="requirement",Rt=o(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Nt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/requirementDiagram-W5N2FZW3.mjs");return{id:Zr,diagram:e}},"loader"),Pt={id:Zr,detector:Rt,loader:Nt},Jr=Pt;var ei="sequence",jt=o(e=>/^\s*sequenceDiagram/.test(e),"detector"),Ht=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/sequenceDiagram-5H6XI6YX.mjs");return{id:ei,diagram:e}},"loader"),Yt={id:ei,detector:jt,loader:Ht},ri=Yt;var ii="class",Bt=o((e,r)=>r?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Ut=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/classDiagram-AMI2HWAO.mjs");return{id:ii,diagram:e}},"loader"),Gt={id:ii,detector:Bt,loader:Ut},ni=Gt;var ti="classDiagram",$t=o((e,r)=>/^\s*classDiagram/.test(e)&&r?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),Vt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/classDiagram-v2-7P4PLZQY.mjs");return{id:ti,diagram:e}},"loader"),qt={id:ti,detector:$t,loader:Vt},oi=qt;var ai="state",zt=o((e,r)=>r?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),Kt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/stateDiagram-SNCBEJCU.mjs");return{id:ai,diagram:e}},"loader"),Wt={id:ai,detector:zt,loader:Kt},li=Wt;var ci="stateDiagram",Xt=o((e,r)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&r?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Qt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/stateDiagram-v2-EGS4UZ2L.mjs");return{id:ci,diagram:e}},"loader"),Zt={id:ci,detector:Xt,loader:Qt},si=Zt;var fi="journey",Jt=o(e=>/^\s*journey/.test(e),"detector"),eo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/journeyDiagram-U3TH2EJ6.mjs");return{id:fi,diagram:e}},"loader"),ro={id:fi,detector:Jt,loader:eo},ui=ro;var io=o((e,r,i)=>{A.debug(`rendering svg for syntax error `);let t=Or(r),n=t.append("g");t.attr("viewBox","0 0 2412 512"),br(t,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},"draw"),Ke={draw:io},pi=Ke;var no={db:{},renderer:Ke,parser:{parse:o(()=>{},"parse")}},mi=no;var di="flowchart-elk",to=o((e,r={})=>/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&r?.flowchart?.defaultRenderer==="elk"?(r.layout="elk",!0):!1,"detector"),oo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/flowDiagram-N2WQQY3I.mjs");return{id:di,diagram:e}},"loader"),ao={id:di,detector:to,loader:oo},gi=ao;var hi="timeline",lo=o(e=>/^\s*timeline/.test(e),"detector"),co=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/timeline-definition-T3RG5MMB.mjs");return{id:hi,diagram:e}},"loader"),so={id:hi,detector:lo,loader:co},xi=so;var yi="mindmap",fo=o(e=>/^\s*mindmap/.test(e),"detector"),uo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/mindmap-definition-QDYZEPL7.mjs");return{id:yi,diagram:e}},"loader"),po={id:yi,detector:fo,loader:uo},Di=po;var vi="sankey",mo=o(e=>/^\s*sankey-beta/.test(e),"detector"),go=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/sankeyDiagram-4BAG2S2Q.mjs");return{id:vi,diagram:e}},"loader"),ho={id:vi,detector:mo,loader:go},Ai=ho;var Ei="packet",xo=o(e=>/^\s*packet-beta/.test(e),"detector"),yo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/diagram-GRJ7KGWB.mjs");return{id:Ei,diagram:e}},"loader"),wi={id:Ei,detector:xo,loader:yo};var bi="block",Do=o(e=>/^\s*block-beta/.test(e),"detector"),vo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/blockDiagram-MMR3OPNR.mjs");return{id:bi,diagram:e}},"loader"),Ao={id:bi,detector:Do,loader:vo},Ci=Ao;var Si="architecture",Eo=o(e=>/^\s*architecture/.test(e),"detector"),wo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/architectureDiagram-SSJWAI27.mjs");return{id:Si,diagram:e}},"loader"),bo={id:Si,detector:Eo,loader:wo},Li=bo;var _i=!1,ee=o(()=>{_i||(_i=!0,W("error",mi,e=>e.toLowerCase().trim()==="error"),W("---",{db:{clear:o(()=>{},"clear")},styles:{},renderer:{draw:o(()=>{},"draw")},parser:{parse:o(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:o(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ae(Ir,oi,ni,Hr,Gr,Vr,zr,Jr,ri,gi,Pr,Rr,Di,xi,Br,si,li,ui,Wr,Ai,wi,Qr,Ci,Li))},"addDiagrams");var Ti=o(async()=>{A.debug("Loading registered diagrams");let r=(await Promise.allSettled(Object.entries(Ue).map(async([i,{detector:t,loader:n}])=>{if(n)try{ue(i)}catch{try{let{diagram:l,id:a}=await n();W(a,l,t)}catch(l){throw A.error(`Failed to load external diagram with key ${i}. Removing from detectors.`),delete Ue[i],l}}}))).filter(i=>i.status==="rejected");if(r.length>0){A.error(`Failed to load ${r.length} external diagrams`);for(let i of r)A.error(i);throw new Error(`Failed to load ${r.length} external diagrams`)}},"loadRegisteredDiagrams");var we="comm",be="rule",Ce="decl";var Fi="@import";var Oi="@keyframes";var ki="@layer";var We=Math.abs,pe=String.fromCharCode;function Se(e){return e.trim()}o(Se,"trim");function me(e,r,i){return e.replace(r,i)}o(me,"replace");function Ii(e,r,i){return e.indexOf(r,i)}o(Ii,"indexof");function Q(e,r){return e.charCodeAt(r)|0}o(Q,"charat");function G(e,r,i){return e.slice(r,i)}o(G,"substr");function F(e){return e.length}o(F,"strlen");function Mi(e){return e.length}o(Mi,"sizeof");function re(e,r){return r.push(e),e}o(re,"append");var Le=1,ie=1,Ri=0,k=0,w=0,te="";function _e(e,r,i,t,n,l,a,c){return{value:e,root:r,parent:i,type:t,props:n,children:l,line:Le,column:ie,length:a,return:"",siblings:c}}o(_e,"node");function Ni(){return w}o(Ni,"char");function Pi(){return w=k>0?Q(te,--k):0,ie--,w===10&&(ie=1,Le--),w}o(Pi,"prev");function I(){return w=k<Ri?Q(te,k++):0,ie++,w===10&&(ie=1,Le++),w}o(I,"next");function Y(){return Q(te,k)}o(Y,"peek");function de(){return k}o(de,"caret");function Te(e,r){return G(te,e,r)}o(Te,"slice");function ne(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}o(ne,"token");function ji(e){return Le=ie=1,Ri=F(te=e),k=0,[]}o(ji,"alloc");function Hi(e){return te="",e}o(Hi,"dealloc");function Fe(e){return Se(Te(k-1,Xe(e===91?e+2:e===40?e+1:e)))}o(Fe,"delimit");function Yi(e){for(;(w=Y())&&w<33;)I();return ne(e)>2||ne(w)>3?"":" "}o(Yi,"whitespace");function Bi(e,r){for(;--r&&I()&&!(w<48||w>102||w>57&&w<65||w>70&&w<97););return Te(e,de()+(r<6&&Y()==32&&I()==32))}o(Bi,"escaping");function Xe(e){for(;I();)switch(w){case e:return k;case 34:case 39:e!==34&&e!==39&&Xe(w);break;case 40:e===41&&Xe(e);break;case 92:I();break}return k}o(Xe,"delimiter");function Ui(e,r){for(;I()&&e+w!==57;)if(e+w===84&&Y()===47)break;return"/*"+Te(r,k-1)+"*"+pe(e===47?e:I())}o(Ui,"commenter");function Gi(e){for(;!ne(Y());)I();return Te(e,k)}o(Gi,"identifier");function qi(e){return Hi(Oe("",null,null,null,[""],e=ji(e),0,[0],e))}o(qi,"compile");function Oe(e,r,i,t,n,l,a,c,s){for(var u=0,p=0,f=a,m=0,d=0,y=0,h=1,D=1,E=1,x=0,M="",j=n,N=l,O=t,v=M;D;)switch(y=x,x=I()){case 40:if(y!=108&&Q(v,f-1)==58){Ii(v+=me(Fe(x),"&","&\f"),"&\f",We(u?c[u-1]:0))!=-1&&(E=-1);break}case 34:case 39:case 91:v+=Fe(x);break;case 9:case 10:case 13:case 32:v+=Yi(y);break;case 92:v+=Bi(de()-1,7);continue;case 47:switch(Y()){case 42:case 47:re(Co(Ui(I(),de()),r,i,s),s),(ne(y||1)==5||ne(Y()||1)==5)&&F(v)&&G(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*h:c[u++]=F(v)*E;case 125*h:case 59:case 0:switch(x){case 0:case 125:D=0;case 59+p:E==-1&&(v=me(v,/\f/g,"")),d>0&&(F(v)-f||h===0&&y===47)&&re(d>32?Vi(v+";",t,i,f-1,s):Vi(me(v," ","")+";",t,i,f-2,s),s);break;case 59:v+=";";default:if(re(O=$i(v,r,i,u,p,n,c,M,j=[],N=[],f,l),l),x===123)if(p===0)Oe(v,r,O,O,j,l,f,c,N);else switch(m===99&&Q(v,3)===110?100:m){case 100:case 108:case 109:case 115:Oe(e,O,O,t&&re($i(e,O,O,0,0,n,c,M,n,j=[],f,N),N),n,N,f,c,t?j:N);break;default:Oe(v,O,O,O,[""],N,0,c,N)}}u=p=d=0,h=E=1,M=v="",f=a;break;case 58:f=1+F(v),d=y;default:if(h<1){if(x==123)--h;else if(x==125&&h++==0&&Pi()==125)continue}switch(v+=pe(x),x*h){case 38:E=p>0?1:(v+="\f",-1);break;case 44:c[u++]=(F(v)-1)*E,E=1;break;case 64:Y()===45&&(v+=Fe(I())),m=Y(),p=f=F(M=v+=Gi(de())),x++;break;case 45:y===45&&F(v)==2&&(h=0)}}return l}o(Oe,"parse");function $i(e,r,i,t,n,l,a,c,s,u,p,f){for(var m=n-1,d=n===0?l:[""],y=Mi(d),h=0,D=0,E=0;h<t;++h)for(var x=0,M=G(e,m+1,m=We(D=a[h])),j=e;x<y;++x)(j=Se(D>0?d[x]+" "+M:me(M,/&\f/g,d[x])))&&(s[E++]=j);return _e(e,r,i,n===0?be:c,s,u,p,f)}o($i,"ruleset");function Co(e,r,i,t){return _e(e,r,i,we,pe(Ni()),G(e,2,-2),0,t)}o(Co,"comment");function Vi(e,r,i,t,n){return _e(e,r,i,Ce,G(e,0,t),G(e,t+1,-1),t,n)}o(Vi,"declaration");function ke(e,r){for(var i="",t=0;t<e.length;t++)i+=r(e[t],t,e,r)||"";return i}o(ke,"serialize");function zi(e,r,i,t){switch(e.type){case ki:if(e.children.length)break;case Fi:case Ce:return e.return=e.return||e.value;case we:return"";case Oi:return e.return=e.value+"{"+ke(e.children,t)+"}";case be:if(!F(e.value=e.props.join(",")))return""}return F(i=ke(e.children,t))?e.return=e.value+"{"+i+"}":""}o(zi,"stringify");var Kn=ot(at(),1);var So="graphics-document document";function Ki(e,r){e.attr("role",So),r!==""&&e.attr("aria-roledescription",r)}o(Ki,"setA11yDiagramInfo");function Wi(e,r,i,t){if(e.insert!==void 0){if(i){let n=`chart-desc-${t}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(i)}if(r){let n=`chart-title-${t}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(r)}}}o(Wi,"addSVGa11yTitleDescription");var oe=class e{constructor(r,i,t,n,l){this.type=r;this.text=i;this.db=t;this.parser=n;this.renderer=l}static{o(this,"Diagram")}static async fromText(r,i={}){let t=K(),n=ve(r,t);r=_r(r)+` `;try{ue(n)}catch{let u=hr(n);if(!u)throw new gr(`Diagram ${n} not found.`);let{id:p,diagram:f}=await u();W(p,f)}let{db:l,parser:a,renderer:c,init:s}=ue(n);return a.parser&&(a.parser.yy=l),l.clear?.(),s?.(t),i.title&&l.setDiagramTitle?.(i.title),await a.parse(r),new e(n,r,l,a,c)}async render(r,i){await this.renderer.draw(this.text,r,i,this)}getParser(){return this.parser}getType(){return this.type}};var Xi=[];var Qi=o(()=>{Xi.forEach(e=>{e()}),Xi=[]},"attachFunctions");var Zi=o(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function gn(e){return typeof e>"u"||e===null}o(gn,"isNothing");function _o(e){return typeof e=="object"&&e!==null}o(_o,"isObject");function To(e){return Array.isArray(e)?e:gn(e)?[]:[e]}o(To,"toArray");function Fo(e,r){var i,t,n,l;if(r)for(l=Object.keys(r),i=0,t=l.length;i<t;i+=1)n=l[i],e[n]=r[n];return e}o(Fo,"extend");function Oo(e,r){var i="",t;for(t=0;t<r;t+=1)i+=e;return i}o(Oo,"repeat");function ko(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}o(ko,"isNegativeZero");var Io=gn,Mo=_o,Ro=To,No=Oo,Po=ko,jo=Fo,C={isNothing:Io,isObject:Mo,toArray:Ro,repeat:No,isNegativeZero:Po,extend:jo};function hn(e,r){var i="",t=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!r&&e.mark.snippet&&(i+=` `+e.mark.snippet),t+" "+i):t}o(hn,"formatError");function he(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=hn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}o(he,"YAMLException$1");he.prototype=Object.create(Error.prototype);he.prototype.constructor=he;he.prototype.toString=o(function(r){return this.name+": "+hn(this,r)},"toString");var _=he;function Qe(e,r,i,t,n){var l="",a="",c=Math.floor(n/2)-1;return t-r>c&&(l=" ... ",r=t-c+l.length),i-t>c&&(a=" ...",i=t+c-a.length),{str:l+e.slice(r,i).replace(/\t/g,"\u2192")+a,pos:t-r+l.length}}o(Qe,"getLine");function Ze(e,r){return C.repeat(" ",r-e.length)+e}o(Ze,"padStart");function Ho(e,r){if(r=Object.create(r||null),!e.buffer)return null;r.maxLength||(r.maxLength=79),typeof r.indent!="number"&&(r.indent=1),typeof r.linesBefore!="number"&&(r.linesBefore=3),typeof r.linesAfter!="number"&&(r.linesAfter=2);for(var i=/\r?\n|\r|\0/g,t=[0],n=[],l,a=-1;l=i.exec(e.buffer);)n.push(l.index),t.push(l.index+l[0].length),e.position<=l.index&&a<0&&(a=t.length-2);a<0&&(a=t.length-1);var c="",s,u,p=Math.min(e.line+r.linesAfter,n.length).toString().length,f=r.maxLength-(r.indent+p+3);for(s=1;s<=r.linesBefore&&!(a-s<0);s++)u=Qe(e.buffer,t[a-s],n[a-s],e.position-(t[a]-t[a-s]),f),c=C.repeat(" ",r.indent)+Ze((e.line-s+1).toString(),p)+" | "+u.str+` `+c;for(u=Qe(e.buffer,t[a],n[a],e.position,f),c+=C.repeat(" ",r.indent)+Ze((e.line+1).toString(),p)+" | "+u.str+` `,c+=C.repeat("-",r.indent+p+3+u.pos)+`^ `,s=1;s<=r.linesAfter&&!(a+s>=n.length);s++)u=Qe(e.buffer,t[a+s],n[a+s],e.position-(t[a]-t[a+s]),f),c+=C.repeat(" ",r.indent)+Ze((e.line+s+1).toString(),p)+" | "+u.str+` `;return c.replace(/\n$/,"")}o(Ho,"makeSnippet");var Yo=Ho,Bo=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Uo=["scalar","sequence","mapping"];function Go(e){var r={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(t){r[String(t)]=i})}),r}o(Go,"compileStyleAliases");function $o(e,r){if(r=r||{},Object.keys(r).forEach(function(i){if(Bo.indexOf(i)===-1)throw new _('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=r,this.tag=e,this.kind=r.kind||null,this.resolve=r.resolve||function(){return!0},this.construct=r.construct||function(i){return i},this.instanceOf=r.instanceOf||null,this.predicate=r.predicate||null,this.represent=r.represent||null,this.representName=r.representName||null,this.defaultStyle=r.defaultStyle||null,this.multi=r.multi||!1,this.styleAliases=Go(r.styleAliases||null),Uo.indexOf(this.kind)===-1)throw new _('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}o($o,"Type$1");var S=$o;function Ji(e,r){var i=[];return e[r].forEach(function(t){var n=i.length;i.forEach(function(l,a){l.tag===t.tag&&l.kind===t.kind&&l.multi===t.multi&&(n=a)}),i[n]=t}),i}o(Ji,"compileList");function Vo(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,i;function t(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(o(t,"collectType"),r=0,i=arguments.length;r<i;r+=1)arguments[r].forEach(t);return e}o(Vo,"compileMap");function er(e){return this.extend(e)}o(er,"Schema$1");er.prototype.extend=o(function(r){var i=[],t=[];if(r instanceof S)t.push(r);else if(Array.isArray(r))t=t.concat(r);else if(r&&(Array.isArray(r.implicit)||Array.isArray(r.explicit)))r.implicit&&(i=i.concat(r.implicit)),r.explicit&&(t=t.concat(r.explicit));else throw new _("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(l){if(!(l instanceof S))throw new _("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new _("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new _("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),t.forEach(function(l){if(!(l instanceof S))throw new _("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(er.prototype);return n.implicit=(this.implicit||[]).concat(i),n.explicit=(this.explicit||[]).concat(t),n.compiledImplicit=Ji(n,"implicit"),n.compiledExplicit=Ji(n,"explicit"),n.compiledTypeMap=Vo(n.compiledImplicit,n.compiledExplicit),n},"extend");var qo=er,zo=new S("tag:yaml.org,2002:str",{kind:"scalar",construct:o(function(e){return e!==null?e:""},"construct")}),Ko=new S("tag:yaml.org,2002:seq",{kind:"sequence",construct:o(function(e){return e!==null?e:[]},"construct")}),Wo=new S("tag:yaml.org,2002:map",{kind:"mapping",construct:o(function(e){return e!==null?e:{}},"construct")}),Xo=new qo({explicit:[zo,Ko,Wo]});function Qo(e){if(e===null)return!0;var r=e.length;return r===1&&e==="~"||r===4&&(e==="null"||e==="Null"||e==="NULL")}o(Qo,"resolveYamlNull");function Zo(){return null}o(Zo,"constructYamlNull");function Jo(e){return e===null}o(Jo,"isNull");var ea=new S("tag:yaml.org,2002:null",{kind:"scalar",resolve:Qo,construct:Zo,predicate:Jo,represent:{canonical:o(function(){return"~"},"canonical"),lowercase:o(function(){return"null"},"lowercase"),uppercase:o(function(){return"NULL"},"uppercase"),camelcase:o(function(){return"Null"},"camelcase"),empty:o(function(){return""},"empty")},defaultStyle:"lowercase"});function ra(e){if(e===null)return!1;var r=e.length;return r===4&&(e==="true"||e==="True"||e==="TRUE")||r===5&&(e==="false"||e==="False"||e==="FALSE")}o(ra,"resolveYamlBoolean");function ia(e){return e==="true"||e==="True"||e==="TRUE"}o(ia,"constructYamlBoolean");function na(e){return Object.prototype.toString.call(e)==="[object Boolean]"}o(na,"isBoolean");var ta=new S("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ra,construct:ia,predicate:na,represent:{lowercase:o(function(e){return e?"true":"false"},"lowercase"),uppercase:o(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:o(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function oa(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}o(oa,"isHexCode");function aa(e){return 48<=e&&e<=55}o(aa,"isOctCode");function la(e){return 48<=e&&e<=57}o(la,"isDecCode");function ca(e){if(e===null)return!1;var r=e.length,i=0,t=!1,n;if(!r)return!1;if(n=e[i],(n==="-"||n==="+")&&(n=e[++i]),n==="0"){if(i+1===r)return!0;if(n=e[++i],n==="b"){for(i++;i<r;i++)if(n=e[i],n!=="_"){if(n!=="0"&&n!=="1")return!1;t=!0}return t&&n!=="_"}if(n==="x"){for(i++;i<r;i++)if(n=e[i],n!=="_"){if(!oa(e.charCodeAt(i)))return!1;t=!0}return t&&n!=="_"}if(n==="o"){for(i++;i<r;i++)if(n=e[i],n!=="_"){if(!aa(e.charCodeAt(i)))return!1;t=!0}return t&&n!=="_"}}if(n==="_")return!1;for(;i<r;i++)if(n=e[i],n!=="_"){if(!la(e.charCodeAt(i)))return!1;t=!0}return!(!t||n==="_")}o(ca,"resolveYamlInteger");function sa(e){var r=e,i=1,t;if(r.indexOf("_")!==-1&&(r=r.replace(/_/g,"")),t=r[0],(t==="-"||t==="+")&&(t==="-"&&(i=-1),r=r.slice(1),t=r[0]),r==="0")return 0;if(t==="0"){if(r[1]==="b")return i*parseInt(r.slice(2),2);if(r[1]==="x")return i*parseInt(r.slice(2),16);if(r[1]==="o")return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}o(sa,"constructYamlInteger");function fa(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!C.isNegativeZero(e)}o(fa,"isInteger");var ua=new S("tag:yaml.org,2002:int",{kind:"scalar",resolve:ca,construct:sa,predicate:fa,represent:{binary:o(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:o(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:o(function(e){return e.toString(10)},"decimal"),hexadecimal:o(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),pa=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ma(e){return!(e===null||!pa.test(e)||e[e.length-1]==="_")}o(ma,"resolveYamlFloat");function da(e){var r,i;return r=e.replace(/_/g,"").toLowerCase(),i=r[0]==="-"?-1:1,"+-".indexOf(r[0])>=0&&(r=r.slice(1)),r===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:r===".nan"?NaN:i*parseFloat(r,10)}o(da,"constructYamlFloat");var ga=/^[-+]?[0-9]+e/;function ha(e,r){var i;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(C.isNegativeZero(e))return"-0.0";return i=e.toString(10),ga.test(i)?i.replace("e",".e"):i}o(ha,"representYamlFloat");function xa(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||C.isNegativeZero(e))}o(xa,"isFloat");var ya=new S("tag:yaml.org,2002:float",{kind:"scalar",resolve:ma,construct:da,predicate:xa,represent:ha,defaultStyle:"lowercase"}),xn=Xo.extend({implicit:[ea,ta,ua,ya]}),Da=xn,yn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Dn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function va(e){return e===null?!1:yn.exec(e)!==null||Dn.exec(e)!==null}o(va,"resolveYamlTimestamp");function Aa(e){var r,i,t,n,l,a,c,s=0,u=null,p,f,m;if(r=yn.exec(e),r===null&&(r=Dn.exec(e)),r===null)throw new Error("Date resolve error");if(i=+r[1],t=+r[2]-1,n=+r[3],!r[4])return new Date(Date.UTC(i,t,n));if(l=+r[4],a=+r[5],c=+r[6],r[7]){for(s=r[7].slice(0,3);s.length<3;)s+="0";s=+s}return r[9]&&(p=+r[10],f=+(r[11]||0),u=(p*60+f)*6e4,r[9]==="-"&&(u=-u)),m=new Date(Date.UTC(i,t,n,l,a,c,s)),u&&m.setTime(m.getTime()-u),m}o(Aa,"constructYamlTimestamp");function Ea(e){return e.toISOString()}o(Ea,"representYamlTimestamp");var wa=new S("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:va,construct:Aa,instanceOf:Date,represent:Ea});function ba(e){return e==="<<"||e===null}o(ba,"resolveYamlMerge");var Ca=new S("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ba}),or=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function Sa(e){if(e===null)return!1;var r,i,t=0,n=e.length,l=or;for(i=0;i<n;i++)if(r=l.indexOf(e.charAt(i)),!(r>64)){if(r<0)return!1;t+=6}return t%8===0}o(Sa,"resolveYamlBinary");function La(e){var r,i,t=e.replace(/[\r\n=]/g,""),n=t.length,l=or,a=0,c=[];for(r=0;r<n;r++)r%4===0&&r&&(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)),a=a<<6|l.indexOf(t.charAt(r));return i=n%4*6,i===0?(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)):i===18?(c.push(a>>10&255),c.push(a>>2&255)):i===12&&c.push(a>>4&255),new Uint8Array(c)}o(La,"constructYamlBinary");function _a(e){var r="",i=0,t,n,l=e.length,a=or;for(t=0;t<l;t++)t%3===0&&t&&(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[i&63]),i=(i<<8)+e[t];return n=l%3,n===0?(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[i&63]):n===2?(r+=a[i>>10&63],r+=a[i>>4&63],r+=a[i<<2&63],r+=a[64]):n===1&&(r+=a[i>>2&63],r+=a[i<<4&63],r+=a[64],r+=a[64]),r}o(_a,"representYamlBinary");function Ta(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}o(Ta,"isBinary");var Fa=new S("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Sa,construct:La,predicate:Ta,represent:_a}),Oa=Object.prototype.hasOwnProperty,ka=Object.prototype.toString;function Ia(e){if(e===null)return!0;var r=[],i,t,n,l,a,c=e;for(i=0,t=c.length;i<t;i+=1){if(n=c[i],a=!1,ka.call(n)!=="[object Object]")return!1;for(l in n)if(Oa.call(n,l))if(!a)a=!0;else return!1;if(!a)return!1;if(r.indexOf(l)===-1)r.push(l);else return!1}return!0}o(Ia,"resolveYamlOmap");function Ma(e){return e!==null?e:[]}o(Ma,"constructYamlOmap");var Ra=new S("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ia,construct:Ma}),Na=Object.prototype.toString;function Pa(e){if(e===null)return!0;var r,i,t,n,l,a=e;for(l=new Array(a.length),r=0,i=a.length;r<i;r+=1){if(t=a[r],Na.call(t)!=="[object Object]"||(n=Object.keys(t),n.length!==1))return!1;l[r]=[n[0],t[n[0]]]}return!0}o(Pa,"resolveYamlPairs");function ja(e){if(e===null)return[];var r,i,t,n,l,a=e;for(l=new Array(a.length),r=0,i=a.length;r<i;r+=1)t=a[r],n=Object.keys(t),l[r]=[n[0],t[n[0]]];return l}o(ja,"constructYamlPairs");var Ha=new S("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Pa,construct:ja}),Ya=Object.prototype.hasOwnProperty;function Ba(e){if(e===null)return!0;var r,i=e;for(r in i)if(Ya.call(i,r)&&i[r]!==null)return!1;return!0}o(Ba,"resolveYamlSet");function Ua(e){return e!==null?e:{}}o(Ua,"constructYamlSet");var Ga=new S("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ba,construct:Ua}),vn=Da.extend({implicit:[wa,Ca],explicit:[Fa,Ra,Ha,Ga]}),V=Object.prototype.hasOwnProperty,Ie=1,An=2,En=3,Me=4,Je=1,$a=2,en=3,Va=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,qa=/[\x85\u2028\u2029]/,za=/[,\[\]\{\}]/,wn=/^(?:!|!!|![a-z\-]+!)$/i,bn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function rn(e){return Object.prototype.toString.call(e)}o(rn,"_class");function P(e){return e===10||e===13}o(P,"is_EOL");function J(e){return e===9||e===32}o(J,"is_WHITE_SPACE");function T(e){return e===9||e===32||e===10||e===13}o(T,"is_WS_OR_EOL");function le(e){return e===44||e===91||e===93||e===123||e===125}o(le,"is_FLOW_INDICATOR");function Ka(e){var r;return 48<=e&&e<=57?e-48:(r=e|32,97<=r&&r<=102?r-97+10:-1)}o(Ka,"fromHexCode");function Wa(e){return e===120?2:e===117?4:e===85?8:0}o(Wa,"escapedHexLen");function Xa(e){return 48<=e&&e<=57?e-48:-1}o(Xa,"fromDecimalCode");function nn(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?` `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}o(nn,"simpleEscapeSequence");function Qa(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}o(Qa,"charFromCodepoint");var Cn=new Array(256),Sn=new Array(256);for(Z=0;Z<256;Z++)Cn[Z]=nn(Z)?1:0,Sn[Z]=nn(Z);var Z;function Za(e,r){this.input=e,this.filename=r.filename||null,this.schema=r.schema||vn,this.onWarning=r.onWarning||null,this.legacy=r.legacy||!1,this.json=r.json||!1,this.listener=r.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}o(Za,"State$1");function Ln(e,r){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=Yo(i),new _(r,i)}o(Ln,"generateError");function g(e,r){throw Ln(e,r)}o(g,"throwError");function Re(e,r){e.onWarning&&e.onWarning.call(null,Ln(e,r))}o(Re,"throwWarning");var tn={YAML:o(function(r,i,t){var n,l,a;r.version!==null&&g(r,"duplication of %YAML directive"),t.length!==1&&g(r,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(t[0]),n===null&&g(r,"ill-formed argument of the YAML directive"),l=parseInt(n[1],10),a=parseInt(n[2],10),l!==1&&g(r,"unacceptable YAML version of the document"),r.version=t[0],r.checkLineBreaks=a<2,a!==1&&a!==2&&Re(r,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:o(function(r,i,t){var n,l;t.length!==2&&g(r,"TAG directive accepts exactly two arguments"),n=t[0],l=t[1],wn.test(n)||g(r,"ill-formed tag handle (first argument) of the TAG directive"),V.call(r.tagMap,n)&&g(r,'there is a previously declared suffix for "'+n+'" tag handle'),bn.test(l)||g(r,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{g(r,"tag prefix is malformed: "+l)}r.tagMap[n]=l},"handleTagDirective")};function $(e,r,i,t){var n,l,a,c;if(r<i){if(c=e.input.slice(r,i),t)for(n=0,l=c.length;n<l;n+=1)a=c.charCodeAt(n),a===9||32<=a&&a<=1114111||g(e,"expected valid JSON character");else Va.test(c)&&g(e,"the stream contains non-printable characters");e.result+=c}}o($,"captureSegment");function on(e,r,i,t){var n,l,a,c;for(C.isObject(i)||g(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(i),a=0,c=n.length;a<c;a+=1)l=n[a],V.call(r,l)||(r[l]=i[l],t[l]=!0)}o(on,"mergeMappings");function ce(e,r,i,t,n,l,a,c,s){var u,p;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),u=0,p=n.length;u<p;u+=1)Array.isArray(n[u])&&g(e,"nested arrays are not supported inside keys"),typeof n=="object"&&rn(n[u])==="[object Object]"&&(n[u]="[object Object]");if(typeof n=="object"&&rn(n)==="[object Object]"&&(n="[object Object]"),n=String(n),r===null&&(r={}),t==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(u=0,p=l.length;u<p;u+=1)on(e,r,l[u],i);else on(e,r,l,i);else!e.json&&!V.call(i,n)&&V.call(r,n)&&(e.line=a||e.line,e.lineStart=c||e.lineStart,e.position=s||e.position,g(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(r,n,{configurable:!0,enumerable:!0,writable:!0,value:l}):r[n]=l,delete i[n];return r}o(ce,"storeMappingPair");function ar(e){var r;r=e.input.charCodeAt(e.position),r===10?e.position++:r===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):g(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}o(ar,"readLineBreak");function b(e,r,i){for(var t=0,n=e.input.charCodeAt(e.position);n!==0;){for(;J(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(r&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(P(n))for(ar(e),n=e.input.charCodeAt(e.position),t++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return i!==-1&&t!==0&&e.lineIndent<i&&Re(e,"deficient indentation"),t}o(b,"skipSeparationSpace");function je(e){var r=e.position,i;return i=e.input.charCodeAt(r),!!((i===45||i===46)&&i===e.input.charCodeAt(r+1)&&i===e.input.charCodeAt(r+2)&&(r+=3,i=e.input.charCodeAt(r),i===0||T(i)))}o(je,"testDocumentSeparator");function lr(e,r){r===1?e.result+=" ":r>1&&(e.result+=C.repeat(` `,r-1))}o(lr,"writeFoldedLines");function Ja(e,r,i){var t,n,l,a,c,s,u,p,f=e.kind,m=e.result,d;if(d=e.input.charCodeAt(e.position),T(d)||le(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(n=e.input.charCodeAt(e.position+1),T(n)||i&&le(n)))return!1;for(e.kind="scalar",e.result="",l=a=e.position,c=!1;d!==0;){if(d===58){if(n=e.input.charCodeAt(e.position+1),T(n)||i&&le(n))break}else if(d===35){if(t=e.input.charCodeAt(e.position-1),T(t))break}else{if(e.position===e.lineStart&&je(e)||i&&le(d))break;if(P(d))if(s=e.line,u=e.lineStart,p=e.lineIndent,b(e,!1,-1),e.lineIndent>=r){c=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=s,e.lineStart=u,e.lineIndent=p;break}}c&&($(e,l,a,!1),lr(e,e.line-s),l=a=e.position,c=!1),J(d)||(a=e.position+1),d=e.input.charCodeAt(++e.position)}return $(e,l,a,!1),e.result?!0:(e.kind=f,e.result=m,!1)}o(Ja,"readPlainScalar");function el(e,r){var i,t,n;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,t=n=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if($(e,t,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)t=e.position,e.position++,n=e.position;else return!0;else P(i)?($(e,t,n,!0),lr(e,b(e,!1,r)),t=n=e.position):e.position===e.lineStart&&je(e)?g(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);g(e,"unexpected end of the stream within a single quoted scalar")}o(el,"readSingleQuotedScalar");function rl(e,r){var i,t,n,l,a,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=t=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return $(e,i,e.position,!0),e.position++,!0;if(c===92){if($(e,i,e.position,!0),c=e.input.charCodeAt(++e.position),P(c))b(e,!1,r);else if(c<256&&Cn[c])e.result+=Sn[c],e.position++;else if((a=Wa(c))>0){for(n=a,l=0;n>0;n--)c=e.input.charCodeAt(++e.position),(a=Ka(c))>=0?l=(l<<4)+a:g(e,"expected hexadecimal character");e.result+=Qa(l),e.position++}else g(e,"unknown escape sequence");i=t=e.position}else P(c)?($(e,i,t,!0),lr(e,b(e,!1,r)),i=t=e.position):e.position===e.lineStart&&je(e)?g(e,"unexpected end of the document within a double quoted scalar"):(e.position++,t=e.position)}g(e,"unexpected end of the stream within a double quoted scalar")}o(rl,"readDoubleQuotedScalar");function il(e,r){var i=!0,t,n,l,a=e.tag,c,s=e.anchor,u,p,f,m,d,y=Object.create(null),h,D,E,x;if(x=e.input.charCodeAt(e.position),x===91)p=93,d=!1,c=[];else if(x===123)p=125,d=!0,c={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),x=e.input.charCodeAt(++e.position);x!==0;){if(b(e,!0,r),x=e.input.charCodeAt(e.position),x===p)return e.position++,e.tag=a,e.anchor=s,e.kind=d?"mapping":"sequence",e.result=c,!0;i?x===44&&g(e,"expected the node content, but found ','"):g(e,"missed comma between flow collection entries"),D=h=E=null,f=m=!1,x===63&&(u=e.input.charCodeAt(e.position+1),T(u)&&(f=m=!0,e.position++,b(e,!0,r))),t=e.line,n=e.lineStart,l=e.position,se(e,r,Ie,!1,!0),D=e.tag,h=e.result,b(e,!0,r),x=e.input.charCodeAt(e.position),(m||e.line===t)&&x===58&&(f=!0,x=e.input.charCodeAt(++e.position),b(e,!0,r),se(e,r,Ie,!1,!0),E=e.result),d?ce(e,c,y,D,h,E,t,n,l):f?c.push(ce(e,null,y,D,h,E,t,n,l)):c.push(h),b(e,!0,r),x=e.input.charCodeAt(e.position),x===44?(i=!0,x=e.input.charCodeAt(++e.position)):i=!1}g(e,"unexpected end of the stream within a flow collection")}o(il,"readFlowCollection");function nl(e,r){var i,t,n=Je,l=!1,a=!1,c=r,s=0,u=!1,p,f;if(f=e.input.charCodeAt(e.position),f===124)t=!1;else if(f===62)t=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)Je===n?n=f===43?en:$a:g(e,"repeat of a chomping mode identifier");else if((p=Xa(f))>=0)p===0?g(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?g(e,"repeat of an indentation width identifier"):(c=r+p-1,a=!0);else break;if(J(f)){do f=e.input.charCodeAt(++e.position);while(J(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!P(f)&&f!==0)}for(;f!==0;){for(ar(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!a||e.lineIndent<c)&&f===32;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>c&&(c=e.lineIndent),P(f)){s++;continue}if(e.lineIndent<c){n===en?e.result+=C.repeat(` `,l?1+s:s):n===Je&&l&&(e.result+=` `);break}for(t?J(f)?(u=!0,e.result+=C.repeat(` `,l?1+s:s)):u?(u=!1,e.result+=C.repeat(` `,s+1)):s===0?l&&(e.result+=" "):e.result+=C.repeat(` `,s):e.result+=C.repeat(` `,l?1+s:s),l=!0,a=!0,s=0,i=e.position;!P(f)&&f!==0;)f=e.input.charCodeAt(++e.position);$(e,i,e.position,!1)}return!0}o(nl,"readBlockScalar");function an(e,r){var i,t=e.tag,n=e.anchor,l=[],a,c=!1,s;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),s=e.input.charCodeAt(e.position);s!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,g(e,"tab characters must not be used in indentation")),!(s!==45||(a=e.input.charCodeAt(e.position+1),!T(a))));){if(c=!0,e.position++,b(e,!0,-1)&&e.lineIndent<=r){l.push(null),s=e.input.charCodeAt(e.position);continue}if(i=e.line,se(e,r,En,!1,!0),l.push(e.result),b(e,!0,-1),s=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>r)&&s!==0)g(e,"bad indentation of a sequence entry");else if(e.lineIndent<r)break}return c?(e.tag=t,e.anchor=n,e.kind="sequence",e.result=l,!0):!1}o(an,"readBlockSequence");function tl(e,r,i){var t,n,l,a,c,s,u=e.tag,p=e.anchor,f={},m=Object.create(null),d=null,y=null,h=null,D=!1,E=!1,x;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),x=e.input.charCodeAt(e.position);x!==0;){if(!D&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,g(e,"tab characters must not be used in indentation")),t=e.input.charCodeAt(e.position+1),l=e.line,(x===63||x===58)&&T(t))x===63?(D&&(ce(e,f,m,d,y,null,a,c,s),d=y=h=null),E=!0,D=!0,n=!0):D?(D=!1,n=!0):g(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,x=t;else{if(a=e.line,c=e.lineStart,s=e.position,!se(e,i,An,!1,!0))break;if(e.line===l){for(x=e.input.charCodeAt(e.position);J(x);)x=e.input.charCodeAt(++e.position);if(x===58)x=e.input.charCodeAt(++e.position),T(x)||g(e,"a whitespace character is expected after the key-value separator within a block mapping"),D&&(ce(e,f,m,d,y,null,a,c,s),d=y=h=null),E=!0,D=!1,n=!1,d=e.tag,y=e.result;else if(E)g(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=p,!0}else if(E)g(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=p,!0}if((e.line===l||e.lineIndent>r)&&(D&&(a=e.line,c=e.lineStart,s=e.position),se(e,r,Me,!0,n)&&(D?y=e.result:h=e.result),D||(ce(e,f,m,d,y,h,a,c,s),d=y=h=null),b(e,!0,-1),x=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>r)&&x!==0)g(e,"bad indentation of a mapping entry");else if(e.lineIndent<r)break}return D&&ce(e,f,m,d,y,null,a,c,s),E&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=f),E}o(tl,"readBlockMapping");function ol(e){var r,i=!1,t=!1,n,l,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&g(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(i=!0,a=e.input.charCodeAt(++e.position)):a===33?(t=!0,n="!!",a=e.input.charCodeAt(++e.position)):n="!",r=e.position,i){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(l=e.input.slice(r,e.position),a=e.input.charCodeAt(++e.position)):g(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!T(a);)a===33&&(t?g(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(r-1,e.position+1),wn.test(n)||g(e,"named tag handle cannot contain such characters"),t=!0,r=e.position+1)),a=e.input.charCodeAt(++e.position);l=e.input.slice(r,e.position),za.test(l)&&g(e,"tag suffix cannot contain flow indicator characters")}l&&!bn.test(l)&&g(e,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{g(e,"tag name is malformed: "+l)}return i?e.tag=l:V.call(e.tagMap,n)?e.tag=e.tagMap[n]+l:n==="!"?e.tag="!"+l:n==="!!"?e.tag="tag:yaml.org,2002:"+l:g(e,'undeclared tag handle "'+n+'"'),!0}o(ol,"readTagProperty");function al(e){var r,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&g(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),r=e.position;i!==0&&!T(i)&&!le(i);)i=e.input.charCodeAt(++e.position);return e.position===r&&g(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(r,e.position),!0}o(al,"readAnchorProperty");function ll(e){var r,i,t;if(t=e.input.charCodeAt(e.position),t!==42)return!1;for(t=e.input.charCodeAt(++e.position),r=e.position;t!==0&&!T(t)&&!le(t);)t=e.input.charCodeAt(++e.position);return e.position===r&&g(e,"name of an alias node must contain at least one character"),i=e.input.slice(r,e.position),V.call(e.anchorMap,i)||g(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],b(e,!0,-1),!0}o(ll,"readAlias");function se(e,r,i,t,n){var l,a,c,s=1,u=!1,p=!1,f,m,d,y,h,D;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=a=c=Me===i||En===i,t&&b(e,!0,-1)&&(u=!0,e.lineIndent>r?s=1:e.lineIndent===r?s=0:e.lineIndent<r&&(s=-1)),s===1)for(;ol(e)||al(e);)b(e,!0,-1)?(u=!0,c=l,e.lineIndent>r?s=1:e.lineIndent===r?s=0:e.lineIndent<r&&(s=-1)):c=!1;if(c&&(c=u||n),(s===1||Me===i)&&(Ie===i||An===i?h=r:h=r+1,D=e.position-e.lineStart,s===1?c&&(an(e,D)||tl(e,D,h))||il(e,h)?p=!0:(a&&nl(e,h)||el(e,h)||rl(e,h)?p=!0:ll(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&g(e,"alias node should not have any properties")):Ja(e,h,Ie===i)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):s===0&&(p=c&&an(e,D))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&g(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),f=0,m=e.implicitTypes.length;f<m;f+=1)if(y=e.implicitTypes[f],y.resolve(e.result)){e.result=y.construct(e.result),e.tag=y.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(V.call(e.typeMap[e.kind||"fallback"],e.tag))y=e.typeMap[e.kind||"fallback"][e.tag];else for(y=null,d=e.typeMap.multi[e.kind||"fallback"],f=0,m=d.length;f<m;f+=1)if(e.tag.slice(0,d[f].tag.length)===d[f].tag){y=d[f];break}y||g(e,"unknown tag !<"+e.tag+">"),e.result!==null&&y.kind!==e.kind&&g(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"'),y.resolve(e.result,e.tag)?(e.result=y.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):g(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}o(se,"composeNode");function cl(e){var r=e.position,i,t,n,l=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(b(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(l=!0,a=e.input.charCodeAt(++e.position),i=e.position;a!==0&&!T(a);)a=e.input.charCodeAt(++e.position);for(t=e.input.slice(i,e.position),n=[],t.length<1&&g(e,"directive name must not be less than one character in length");a!==0;){for(;J(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!P(a));break}if(P(a))break;for(i=e.position;a!==0&&!T(a);)a=e.input.charCodeAt(++e.position);n.push(e.input.slice(i,e.position))}a!==0&&ar(e),V.call(tn,t)?tn[t](e,t,n):Re(e,'unknown document directive "'+t+'"')}if(b(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,b(e,!0,-1)):l&&g(e,"directives end mark is expected"),se(e,e.lineIndent-1,Me,!1,!0),b(e,!0,-1),e.checkLineBreaks&&qa.test(e.input.slice(r,e.position))&&Re(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&je(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,b(e,!0,-1));return}if(e.position<e.length-1)g(e,"end of the stream or a document separator is expected");else return}o(cl,"readDocument");function _n(e,r){e=String(e),r=r||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=` `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new Za(e,r),t=e.indexOf("\0");for(t!==-1&&(i.position=t,g(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)cl(i);return i.documents}o(_n,"loadDocuments");function sl(e,r,i){r!==null&&typeof r=="object"&&typeof i>"u"&&(i=r,r=null);var t=_n(e,i);if(typeof r!="function")return t;for(var n=0,l=t.length;n<l;n+=1)r(t[n])}o(sl,"loadAll$1");function fl(e,r){var i=_n(e,r);if(i.length!==0){if(i.length===1)return i[0];throw new _("expected a single document in the stream, but found more")}}o(fl,"load$1");var ul=sl,pl=fl,Tn={loadAll:ul,load:pl},Fn=Object.prototype.toString,On=Object.prototype.hasOwnProperty,cr=65279,ml=9,xe=10,dl=13,gl=32,hl=33,xl=34,rr=35,yl=37,Dl=38,vl=39,Al=42,kn=44,El=45,Ne=58,wl=61,bl=62,Cl=63,Sl=64,In=91,Mn=93,Ll=96,Rn=123,_l=124,Nn=125,L={};L[0]="\\0";L[7]="\\a";L[8]="\\b";L[9]="\\t";L[10]="\\n";L[11]="\\v";L[12]="\\f";L[13]="\\r";L[27]="\\e";L[34]='\\"';L[92]="\\\\";L[133]="\\N";L[160]="\\_";L[8232]="\\L";L[8233]="\\P";var Tl=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Fl=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ol(e,r){var i,t,n,l,a,c,s;if(r===null)return{};for(i={},t=Object.keys(r),n=0,l=t.length;n<l;n+=1)a=t[n],c=String(r[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),s=e.compiledTypeMap.fallback[a],s&&On.call(s.styleAliases,c)&&(c=s.styleAliases[c]),i[a]=c;return i}o(Ol,"compileStyleMap");function kl(e){var r,i,t;if(r=e.toString(16).toUpperCase(),e<=255)i="x",t=2;else if(e<=65535)i="u",t=4;else if(e<=4294967295)i="U",t=8;else throw new _("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+C.repeat("0",t-r.length)+r}o(kl,"encodeHex");var Il=1,ye=2;function Ml(e){this.schema=e.schema||vn,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=C.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Ol(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?ye:Il,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}o(Ml,"State");function ln(e,r){for(var i=C.repeat(" ",r),t=0,n=-1,l="",a,c=e.length;t<c;)n=e.indexOf(` `,t),n===-1?(a=e.slice(t),t=c):(a=e.slice(t,n+1),t=n+1),a.length&&a!==` `&&(l+=i),l+=a;return l}o(ln,"indentString");function ir(e,r){return` `+C.repeat(" ",e.indent*r)}o(ir,"generateNextLine");function Rl(e,r){var i,t,n;for(i=0,t=e.implicitTypes.length;i<t;i+=1)if(n=e.implicitTypes[i],n.resolve(r))return!0;return!1}o(Rl,"testImplicitResolving");function Pe(e){return e===gl||e===ml}o(Pe,"isWhitespace");function De(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==cr||65536<=e&&e<=1114111}o(De,"isPrintable");function cn(e){return De(e)&&e!==cr&&e!==dl&&e!==xe}o(cn,"isNsCharOrWhitespace");function sn(e,r,i){var t=cn(e),n=t&&!Pe(e);return(i?t:t&&e!==kn&&e!==In&&e!==Mn&&e!==Rn&&e!==Nn)&&e!==rr&&!(r===Ne&&!n)||cn(r)&&!Pe(r)&&e===rr||r===Ne&&n}o(sn,"isPlainSafe");function Nl(e){return De(e)&&e!==cr&&!Pe(e)&&e!==El&&e!==Cl&&e!==Ne&&e!==kn&&e!==In&&e!==Mn&&e!==Rn&&e!==Nn&&e!==rr&&e!==Dl&&e!==Al&&e!==hl&&e!==_l&&e!==wl&&e!==bl&&e!==vl&&e!==xl&&e!==yl&&e!==Sl&&e!==Ll}o(Nl,"isPlainSafeFirst");function Pl(e){return!Pe(e)&&e!==Ne}o(Pl,"isPlainSafeLast");function ge(e,r){var i=e.charCodeAt(r),t;return i>=55296&&i<=56319&&r+1<e.length&&(t=e.charCodeAt(r+1),t>=56320&&t<=57343)?(i-55296)*1024+t-56320+65536:i}o(ge,"codePointAt");function Pn(e){var r=/^\n* /;return r.test(e)}o(Pn,"needIndentIndicator");var jn=1,nr=2,Hn=3,Yn=4,ae=5;function jl(e,r,i,t,n,l,a,c){var s,u=0,p=null,f=!1,m=!1,d=t!==-1,y=-1,h=Nl(ge(e,0))&&Pl(ge(e,e.length-1));if(r||a)for(s=0;s<e.length;u>=65536?s+=2:s++){if(u=ge(e,s),!De(u))return ae;h=h&&sn(u,p,c),p=u}else{for(s=0;s<e.length;u>=65536?s+=2:s++){if(u=ge(e,s),u===xe)f=!0,d&&(m=m||s-y-1>t&&e[y+1]!==" ",y=s);else if(!De(u))return ae;h=h&&sn(u,p,c),p=u}m=m||d&&s-y-1>t&&e[y+1]!==" "}return!f&&!m?h&&!a&&!n(e)?jn:l===ye?ae:nr:i>9&&Pn(e)?ae:a?l===ye?ae:nr:m?Yn:Hn}o(jl,"chooseScalarStyle");function Hl(e,r,i,t,n){e.dump=function(){if(r.length===0)return e.quotingType===ye?'""':"''";if(!e.noCompatMode&&(Tl.indexOf(r)!==-1||Fl.test(r)))return e.quotingType===ye?'"'+r+'"':"'"+r+"'";var l=e.indent*Math.max(1,i),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),c=t||e.flowLevel>-1&&i>=e.flowLevel;function s(u){return Rl(e,u)}switch(o(s,"testAmbiguity"),jl(r,c,e.indent,a,s,e.quotingType,e.forceQuotes&&!t,n)){case jn:return r;case nr:return"'"+r.replace(/'/g,"''")+"'";case Hn:return"|"+fn(r,e.indent)+un(ln(r,l));case Yn:return">"+fn(r,e.indent)+un(ln(Yl(r,a),l));case ae:return'"'+Bl(r)+'"';default:throw new _("impossible error: invalid scalar style")}}()}o(Hl,"writeScalar");function fn(e,r){var i=Pn(e)?String(r):"",t=e[e.length-1]===` `,n=t&&(e[e.length-2]===` `||e===` `),l=n?"+":t?"":"-";return i+l+` `}o(fn,"blockHeader");function un(e){return e[e.length-1]===` `?e.slice(0,-1):e}o(un,"dropEndingNewline");function Yl(e,r){for(var i=/(\n+)([^\n]*)/g,t=function(){var u=e.indexOf(` `);return u=u!==-1?u:e.length,i.lastIndex=u,pn(e.slice(0,u),r)}(),n=e[0]===` `||e[0]===" ",l,a;a=i.exec(e);){var c=a[1],s=a[2];l=s[0]===" ",t+=c+(!n&&!l&&s!==""?` `:"")+pn(s,r),n=l}return t}o(Yl,"foldString");function pn(e,r){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,t,n=0,l,a=0,c=0,s="";t=i.exec(e);)c=t.index,c-n>r&&(l=a>n?a:c,s+=` `+e.slice(n,l),n=l+1),a=c;return s+=` `,e.length-n>r&&a>n?s+=e.slice(n,a)+` `+e.slice(a+1):s+=e.slice(n),s.slice(1)}o(pn,"foldLine");function Bl(e){for(var r="",i=0,t,n=0;n<e.length;i>=65536?n+=2:n++)i=ge(e,n),t=L[i],!t&&De(i)?(r+=e[n],i>=65536&&(r+=e[n+1])):r+=t||kl(i);return r}o(Bl,"escapeString");function Ul(e,r,i){var t="",n=e.tag,l,a,c;for(l=0,a=i.length;l<a;l+=1)c=i[l],e.replacer&&(c=e.replacer.call(i,String(l),c)),(B(e,r,c,!1,!1)||typeof c>"u"&&B(e,r,null,!1,!1))&&(t!==""&&(t+=","+(e.condenseFlow?"":" ")),t+=e.dump);e.tag=n,e.dump="["+t+"]"}o(Ul,"writeFlowSequence");function mn(e,r,i,t){var n="",l=e.tag,a,c,s;for(a=0,c=i.length;a<c;a+=1)s=i[a],e.replacer&&(s=e.replacer.call(i,String(a),s)),(B(e,r+1,s,!0,!0,!1,!0)||typeof s>"u"&&B(e,r+1,null,!0,!0,!1,!0))&&((!t||n!=="")&&(n+=ir(e,r)),e.dump&&xe===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=l,e.dump=n||"[]"}o(mn,"writeBlockSequence");function Gl(e,r,i){var t="",n=e.tag,l=Object.keys(i),a,c,s,u,p;for(a=0,c=l.length;a<c;a+=1)p="",t!==""&&(p+=", "),e.condenseFlow&&(p+='"'),s=l[a],u=i[s],e.replacer&&(u=e.replacer.call(i,s,u)),B(e,r,s,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),B(e,r,u,!1,!1)&&(p+=e.dump,t+=p));e.tag=n,e.dump="{"+t+"}"}o(Gl,"writeFlowMapping");function $l(e,r,i,t){var n="",l=e.tag,a=Object.keys(i),c,s,u,p,f,m;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new _("sortKeys must be a boolean or a function");for(c=0,s=a.length;c<s;c+=1)m="",(!t||n!=="")&&(m+=ir(e,r)),u=a[c],p=i[u],e.replacer&&(p=e.replacer.call(i,u,p)),B(e,r+1,u,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&xe===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,f&&(m+=ir(e,r)),B(e,r+1,p,!0,f)&&(e.dump&&xe===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,n+=m));e.tag=l,e.dump=n||"{}"}o($l,"writeBlockMapping");function dn(e,r,i){var t,n,l,a,c,s;for(n=i?e.explicitTypes:e.implicitTypes,l=0,a=n.length;l<a;l+=1)if(c=n[l],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof r=="object"&&r instanceof c.instanceOf)&&(!c.predicate||c.predicate(r))){if(i?c.multi&&c.representName?e.tag=c.representName(r):e.tag=c.tag:e.tag="?",c.represent){if(s=e.styleMap[c.tag]||c.defaultStyle,Fn.call(c.represent)==="[object Function]")t=c.represent(r,s);else if(On.call(c.represent,s))t=c.represent[s](r,s);else throw new _("!<"+c.tag+'> tag resolver accepts not "'+s+'" style');e.dump=t}return!0}return!1}o(dn,"detectType");function B(e,r,i,t,n,l,a){e.tag=null,e.dump=i,dn(e,i,!1)||dn(e,i,!0);var c=Fn.call(e.dump),s=t,u;t&&(t=e.flowLevel<0||e.flowLevel>r);var p=c==="[object Object]"||c==="[object Array]",f,m;if(p&&(f=e.duplicates.indexOf(i),m=f!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&r>0)&&(n=!1),m&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(p&&m&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),c==="[object Object]")t&&Object.keys(e.dump).length!==0?($l(e,r,e.dump,n),m&&(e.dump="&ref_"+f+e.dump)):(Gl(e,r,e.dump),m&&(e.dump="&ref_"+f+" "+e.dump));else if(c==="[object Array]")t&&e.dump.length!==0?(e.noArrayIndent&&!a&&r>0?mn(e,r-1,e.dump,n):mn(e,r,e.dump,n),m&&(e.dump="&ref_"+f+e.dump)):(Ul(e,r,e.dump),m&&(e.dump="&ref_"+f+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&Hl(e,e.dump,r,l,s);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new _("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}o(B,"writeNode");function Vl(e,r){var i=[],t=[],n,l;for(tr(e,i,t),n=0,l=t.length;n<l;n+=1)r.duplicates.push(i[t[n]]);r.usedDuplicates=new Array(l)}o(Vl,"getDuplicateReferences");function tr(e,r,i){var t,n,l;if(e!==null&&typeof e=="object")if(n=r.indexOf(e),n!==-1)i.indexOf(n)===-1&&i.push(n);else if(r.push(e),Array.isArray(e))for(n=0,l=e.length;n<l;n+=1)tr(e[n],r,i);else for(t=Object.keys(e),n=0,l=t.length;n<l;n+=1)tr(e[t[n]],r,i)}o(tr,"inspectNode");function ql(e,r){r=r||{};var i=new Ml(r);i.noRefs||Vl(e,i);var t=e;return i.replacer&&(t=i.replacer.call({"":t},"",t)),B(i,0,t,!0,!0)?i.dump+` `:""}o(ql,"dump$1");var zl=ql,Kl={dump:zl};function sr(e,r){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+r+" instead, which is now safe by default.")}}o(sr,"renamed");var Bn=xn;var Un=Tn.load,Yf=Tn.loadAll,Bf=Kl.dump;var Uf=sr("safeLoad","load"),Gf=sr("safeLoadAll","loadAll"),$f=sr("safeDump","dump");function Gn(e){let r=e.match(dr);if(!r)return{text:e,metadata:{}};let i=Un(r[1],{schema:Bn})??{};i=typeof i=="object"&&!Array.isArray(i)?i:{};let t={};return i.displayMode&&(t.displayMode=i.displayMode.toString()),i.title&&(t.title=i.title.toString()),i.config&&(t.config=i.config),{text:e.slice(r[0].length),metadata:t}}o(Gn,"extractFrontMatter");var Xl=o(e=>e.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(r,i,t)=>"<"+i+t.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Ql=o(e=>{let{text:r,metadata:i}=Gn(e),{displayMode:t,title:n,config:l={}}=i;return t&&(l.gantt||(l.gantt={}),l.gantt.displayMode=t),{title:n,config:l,text:r}},"processFrontmatter"),Zl=o(e=>{let r=X.detectInit(e)??{},i=X.detectDirective(e,"wrap");return Array.isArray(i)?r.wrap=i.some(({type:t})=>t==="wrap"):i?.type==="wrap"&&(r.wrap=!0),{text:Sr(e),directive:r}},"processDirectives");function fr(e){let r=Xl(e),i=Ql(r),t=Zl(i.text),n=Lr(i.config,t.directive);return e=Zi(t.text),{code:e,title:i.title,config:n}}o(fr,"preprocessDiagram");function $n(e){let r=new TextEncoder().encode(e),i=Array.from(r,t=>String.fromCodePoint(t)).join("");return btoa(i)}o($n,"toBase64");var Jl=5e4,ec="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",rc="sandbox",ic="loose",nc="http://www.w3.org/2000/svg",tc="http://www.w3.org/1999/xlink",oc="http://www.w3.org/1999/xhtml",ac="100%",lc="100%",cc="border:0;margin:0;",sc="margin:0",fc="allow-top-navigation-by-user-activation allow-popups",uc='The "iframe" tag is not supported by your browser.',pc=["foreignobject"],mc=["dominant-baseline"];function Wn(e){let r=fr(e);return fe(),Er(r.config??{}),r}o(Wn,"processAndSetConfigs");async function dc(e,r){ee();try{let{code:i,config:t}=Wn(e);return{diagramType:(await Xn(i)).type,config:t}}catch(i){if(r?.suppressErrors)return!1;throw i}}o(dc,"parse");var Vn=o((e,r,i=[])=>` .${e} ${r} { ${i.join(" !important; ")} !important; }`,"cssImportantStyles"),gc=o((e,r=new Map)=>{let i="";if(e.themeCSS!==void 0&&(i+=` ${e.themeCSS}`),e.fontFamily!==void 0&&(i+=` :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(i+=` :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),r instanceof Map){let a=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(c=>{qe(c.styles)||a.forEach(s=>{i+=Vn(c.id,s,c.styles)}),qe(c.textStyles)||(i+=Vn(c.id,"tspan",(c?.textStyles||[]).map(s=>s.replace("color","fill"))))})}return i},"createCssStyles"),hc=o((e,r,i,t)=>{let n=gc(e,i),l=Cr(r,n,e.themeVariables);return ke(qi(`${t}{${l}}`),zi)},"createUserStyles"),xc=o((e="",r,i)=>{let t=e;return!i&&!r&&(t=t.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),t=Tr(t),t=t.replace(/<br>/g,"<br/>"),t},"cleanUpSvgCode"),yc=o((e="",r)=>{let i=r?.viewBox?.baseVal?.height?r.viewBox.baseVal.height+"px":lc,t=$n(`<body style="${sc}">${e}</body>`);return`<iframe style="width:${ac};height:${i};${cc}" src="data:text/html;charset=UTF-8;base64,${t}" sandbox="${fc}"> ${uc} </iframe>`},"putIntoIFrame"),qn=o((e,r,i,t,n)=>{let l=e.append("div");l.attr("id",i),t&&l.attr("style",t);let a=l.append("svg").attr("id",r).attr("width","100%").attr("xmlns",nc);return n&&a.attr("xmlns:xlink",n),a.append("g"),e},"appendDivSvgG");function zn(e,r){return e.append("iframe").attr("id",r).attr("style","width: 100%; height: 100%;").attr("sandbox","")}o(zn,"sandboxedIframe");var Dc=o((e,r,i,t)=>{e.getElementById(r)?.remove(),e.getElementById(i)?.remove(),e.getElementById(t)?.remove()},"removeExistingElements"),vc=o(async function(e,r,i){ee();let t=Wn(r);r=t.code;let n=K();A.debug(n),r.length>(n?.maxTextSize??Jl)&&(r=ec);let l="#"+e,a="i"+e,c="#"+a,s="d"+e,u="#"+s,p=o(()=>{let Ye=H(m?c:u).node();Ye&&"remove"in Ye&&Ye.remove()},"removeTempElements"),f=H("body"),m=n.securityLevel===rc,d=n.securityLevel===ic,y=n.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),m){let R=zn(H(i),a);f=H(R.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=H(i);qn(f,e,s,`font-family: ${y}`,tc)}else{if(Dc(document,e,s,a),m){let R=zn(H("body"),a);f=H(R.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=H("body");qn(f,e,s)}let h,D;try{h=await oe.fromText(r,{title:t.title})}catch(R){if(n.suppressErrorRendering)throw p(),R;h=await oe.fromText("error"),D=R}let E=f.select(u).node(),x=h.type,M=E.firstChild,j=M.firstChild,N=h.renderer.getClasses?.(r,h),O=hc(n,x,N,l),v=document.createElement("style");v.innerHTML=O,M.insertBefore(v,j);try{await h.renderer.draw(r,e,ze,h)}catch(R){throw n.suppressErrorRendering?p():pi.draw(r,e,ze),R}let it=f.select(`${u} svg`),nt=h.db.getAccTitle?.(),tt=h.db.getAccDescription?.();Ec(x,it,nt,tt),f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",oc);let z=f.select(u).node().innerHTML;if(A.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),z=xc(z,m,wr(n.arrowMarkerAbsolute)),m){let R=f.select(u+" svg").node();z=yc(z,R)}else d||(z=Kn.default.sanitize(z,{ADD_TAGS:pc,ADD_ATTR:mc}));if(Qi(),D)throw D;return p(),{diagramType:x,svg:z,bindFunctions:h.db.bindFunctions}},"render");function Ac(e={}){let r=xr({},e);r?.fontFamily&&!r.themeVariables?.fontFamily&&(r.themeVariables||(r.themeVariables={}),r.themeVariables.fontFamily=r.fontFamily),Dr(r),r?.theme&&r.theme in Ee?r.themeVariables=Ee[r.theme].getThemeVariables(r.themeVariables):r&&(r.themeVariables=Ee.default.getThemeVariables(r.themeVariables));let i=typeof r=="object"?yr(r):$e();Be(i.logLevel),ee()}o(Ac,"initialize");var Xn=o((e,r={})=>{let{code:i}=fr(e);return oe.fromText(i,r)},"getDiagramFromText");function Ec(e,r,i,t){Ki(r,e),Wi(r,i,t,r.attr("id"))}o(Ec,"addA11yInfo");var q=Object.freeze({render:vc,parse:dc,getDiagramFromText:Xn,initialize:Ac,getConfig:K,setConfig:Ar,getSiteConfig:$e,updateSiteConfig:vr,reset:o(()=>{fe()},"reset"),globalReset:o(()=>{fe(Ge)},"globalReset"),defaultConfig:Ge});Be(K().logLevel);fe(K());var wc=o((e,r,i)=>{A.warn(e),Ve(e)?(i&&i(e.str,e.hash),r.push({...e,message:e.str,error:e})):(i&&i(e),e instanceof Error&&r.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Qn=o(async function(e={querySelector:".mermaid"}){try{await bc(e)}catch(r){if(Ve(r)&&A.error(r.str),U.parseError&&U.parseError(r),!e.suppressErrors)throw A.error("Use the suppressErrors option to suppress these errors"),r}},"run"),bc=o(async function({postRenderCallback:e,querySelector:r,nodes:i}={querySelector:".mermaid"}){let t=q.getConfig();A.debug(`${e?"":"No "}Callback function found`);let n;if(i)n=i;else if(r)n=document.querySelectorAll(r);else throw new Error("Nodes and querySelector are both undefined");A.debug(`Found ${n.length} diagrams`),t?.startOnLoad!==void 0&&(A.debug("Start On Load: "+t?.startOnLoad),q.updateSiteConfig({startOnLoad:t?.startOnLoad}));let l=new X.InitIDGenerator(t.deterministicIds,t.deterministicIDSeed),a,c=[];for(let s of Array.from(n)){A.info("Rendering diagram: "+s.id);if(s.getAttribute("data-processed"))continue;s.setAttribute("data-processed","true");let u=`mermaid-${l.next()}`;a=s.innerHTML,a=mr(X.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");let p=X.detectInit(a);p&&A.debug("Detected early reinit: ",p);try{let{svg:f,bindFunctions:m}=await rt(u,a,s);s.innerHTML=f,e&&await e(u),m&&m(s)}catch(f){wc(f,c,U.parseError)}}if(c.length>0)throw c[0]},"runThrowsErrors"),Zn=o(function(e){q.initialize(e)},"initialize"),Cc=o(async function(e,r,i){A.warn("mermaid.init is deprecated. Please use run instead."),e&&Zn(e);let t={postRenderCallback:i,querySelector:".mermaid"};typeof r=="string"?t.querySelector=r:r&&(r instanceof HTMLElement?t.nodes=[r]:t.nodes=r),await Qn(t)},"init"),Sc=o(async(e,{lazyLoad:r=!0}={})=>{ee(),Ae(...e),r===!1&&await Ti()},"registerExternalDiagrams"),Jn=o(function(){if(U.startOnLoad){let{startOnLoad:e}=q.getConfig();e&&U.run().catch(r=>A.error("Mermaid failed to initialize",r))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",Jn,!1)}var Lc=o(function(e){U.parseError=e},"setParseErrorHandler"),He=[],ur=!1,et=o(async()=>{if(!ur){for(ur=!0;He.length>0;){let e=He.shift();if(e)try{await e()}catch(r){A.error("Error executing queue",r)}}ur=!1}},"executeQueue"),_c=o(async(e,r)=>new Promise((i,t)=>{let n=o(()=>new Promise((l,a)=>{q.parse(e,r).then(c=>{l(c),i(c)},c=>{A.error("Error parsing",c),U.parseError?.(c),a(c),t(c)})}),"performCall");He.push(n),et().catch(t)}),"parse"),rt=o((e,r,i)=>new Promise((t,n)=>{let l=o(()=>new Promise((a,c)=>{q.render(e,r,i).then(s=>{a(s),t(s)},s=>{A.error("Error parsing",s),U.parseError?.(s),c(s),n(s)})}),"performCall");He.push(l),et().catch(n)}),"render"),U={startOnLoad:!0,mermaidAPI:q,parse:_c,render:rt,init:Cc,run:Qn,registerExternalDiagrams:Sc,registerLayoutLoaders:Fr,initialize:Zn,parseError:void 0,contentLoaded:Jn,setParseErrorHandler:Lc,detectType:ve,registerIconPacks:pr},Fu=U;export{Fu as default}; /*! Check if previously processed */ /*! * Wait for document loaded before starting the execution */ /*! Bundled license information: js-yaml/dist/js-yaml.mjs: (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) */
yairm210/Mermaid-gif-maker
13
A small webpage for making GIFs of mermaid graphs
JavaScript
yairm210
Yair Morgenstern
monaco-editor-loader.js
JavaScript
"use strict";/*!----------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.51.0(67d664a32968e19e2eb08b696a92463804182ae4) * Released under the MIT license * https://github.com/microsoft/vscode/blob/main/LICENSE.txt *-----------------------------------------------------------*/const _amdLoaderGlobal=this,_commonjsGlobal=typeof global=="object"?global:{};var AMDLoader;(function(u){u.global=_amdLoaderGlobal;class y{get isWindows(){return this._detect(),this._isWindows}get isNode(){return this._detect(),this._isNode}get isElectronRenderer(){return this._detect(),this._isElectronRenderer}get isWebWorker(){return this._detect(),this._isWebWorker}get isElectronNodeIntegrationWebWorker(){return this._detect(),this._isElectronNodeIntegrationWebWorker}constructor(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1,this._isElectronNodeIntegrationWebWorker=!1}_detect(){this._detected||(this._detected=!0,this._isWindows=y._isWindows(),this._isNode=typeof module<"u"&&!!module.exports,this._isElectronRenderer=typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.electron<"u"&&process.type==="renderer",this._isWebWorker=typeof u.global.importScripts=="function",this._isElectronNodeIntegrationWebWorker=this._isWebWorker&&typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.electron<"u"&&process.type==="worker")}static _isWindows(){return typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0?!0:typeof process<"u"?process.platform==="win32":!1}}u.Environment=y})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(u){class y{constructor(r,c,a){this.type=r,this.detail=c,this.timestamp=a}}u.LoaderEvent=y;class m{constructor(r){this._events=[new y(1,"",r)]}record(r,c){this._events.push(new y(r,c,u.Utilities.getHighPerformanceTimestamp()))}getEvents(){return this._events}}u.LoaderEventRecorder=m;class p{record(r,c){}getEvents(){return[]}}p.INSTANCE=new p,u.NullLoaderEventRecorder=p})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(u){class y{static fileUriToFilePath(p,h){if(h=decodeURI(h).replace(/%23/g,"#"),p){if(/^file:\/\/\//.test(h))return h.substr(8);if(/^file:\/\//.test(h))return h.substr(5)}else if(/^file:\/\//.test(h))return h.substr(7);return h}static startsWith(p,h){return p.length>=h.length&&p.substr(0,h.length)===h}static endsWith(p,h){return p.length>=h.length&&p.substr(p.length-h.length)===h}static containsQueryString(p){return/^[^\#]*\?/gi.test(p)}static isAbsolutePath(p){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(p)}static forEachProperty(p,h){if(p){let r;for(r in p)p.hasOwnProperty(r)&&h(r,p[r])}}static isEmpty(p){let h=!0;return y.forEachProperty(p,()=>{h=!1}),h}static recursiveClone(p){if(!p||typeof p!="object"||p instanceof RegExp||!Array.isArray(p)&&Object.getPrototypeOf(p)!==Object.prototype)return p;let h=Array.isArray(p)?[]:{};return y.forEachProperty(p,(r,c)=>{c&&typeof c=="object"?h[r]=y.recursiveClone(c):h[r]=c}),h}static generateAnonymousModule(){return"===anonymous"+y.NEXT_ANONYMOUS_ID+++"==="}static isAnonymousModule(p){return y.startsWith(p,"===anonymous")}static getHighPerformanceTimestamp(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=u.global.performance&&typeof u.global.performance.now=="function"),this.HAS_PERFORMANCE_NOW?u.global.performance.now():Date.now()}}y.NEXT_ANONYMOUS_ID=1,y.PERFORMANCE_NOW_PROBED=!1,y.HAS_PERFORMANCE_NOW=!1,u.Utilities=y})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(u){function y(h){if(h instanceof Error)return h;const r=new Error(h.message||String(h)||"Unknown Error");return h.stack&&(r.stack=h.stack),r}u.ensureError=y;class m{static validateConfigurationOptions(r){function c(a){if(a.phase==="loading"){console.error('Loading "'+a.moduleId+'" failed'),console.error(a),console.error("Here are the modules that depend on it:"),console.error(a.neededBy);return}if(a.phase==="factory"){console.error('The factory function of "'+a.moduleId+'" has thrown an exception'),console.error(a),console.error("Here are the modules that depend on it:"),console.error(a.neededBy);return}}if(r=r||{},typeof r.baseUrl!="string"&&(r.baseUrl=""),typeof r.isBuild!="boolean"&&(r.isBuild=!1),typeof r.paths!="object"&&(r.paths={}),typeof r.config!="object"&&(r.config={}),typeof r.catchError>"u"&&(r.catchError=!1),typeof r.recordStats>"u"&&(r.recordStats=!1),typeof r.urlArgs!="string"&&(r.urlArgs=""),typeof r.onError!="function"&&(r.onError=c),Array.isArray(r.ignoreDuplicateModules)||(r.ignoreDuplicateModules=[]),r.baseUrl.length>0&&(u.Utilities.endsWith(r.baseUrl,"/")||(r.baseUrl+="/")),typeof r.cspNonce!="string"&&(r.cspNonce=""),typeof r.preferScriptTags>"u"&&(r.preferScriptTags=!1),r.nodeCachedData&&typeof r.nodeCachedData=="object"&&(typeof r.nodeCachedData.seed!="string"&&(r.nodeCachedData.seed="seed"),(typeof r.nodeCachedData.writeDelay!="number"||r.nodeCachedData.writeDelay<0)&&(r.nodeCachedData.writeDelay=1e3*7),!r.nodeCachedData.path||typeof r.nodeCachedData.path!="string")){const a=y(new Error("INVALID cached data configuration, 'path' MUST be set"));a.phase="configuration",r.onError(a),r.nodeCachedData=void 0}return r}static mergeConfigurationOptions(r=null,c=null){let a=u.Utilities.recursiveClone(c||{});return u.Utilities.forEachProperty(r,(t,e)=>{t==="ignoreDuplicateModules"&&typeof a.ignoreDuplicateModules<"u"?a.ignoreDuplicateModules=a.ignoreDuplicateModules.concat(e):t==="paths"&&typeof a.paths<"u"?u.Utilities.forEachProperty(e,(i,s)=>a.paths[i]=s):t==="config"&&typeof a.config<"u"?u.Utilities.forEachProperty(e,(i,s)=>a.config[i]=s):a[t]=u.Utilities.recursiveClone(e)}),m.validateConfigurationOptions(a)}}u.ConfigurationOptionsUtil=m;class p{constructor(r,c){if(this._env=r,this.options=m.mergeConfigurationOptions(c),this._createIgnoreDuplicateModulesMap(),this._createSortedPathsRules(),this.options.baseUrl===""&&this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename&&this._env.isNode){let a=this.options.nodeRequire.main.filename,t=Math.max(a.lastIndexOf("/"),a.lastIndexOf("\\"));this.options.baseUrl=a.substring(0,t+1)}}_createIgnoreDuplicateModulesMap(){this.ignoreDuplicateModulesMap={};for(let r=0;r<this.options.ignoreDuplicateModules.length;r++)this.ignoreDuplicateModulesMap[this.options.ignoreDuplicateModules[r]]=!0}_createSortedPathsRules(){this.sortedPathsRules=[],u.Utilities.forEachProperty(this.options.paths,(r,c)=>{Array.isArray(c)?this.sortedPathsRules.push({from:r,to:c}):this.sortedPathsRules.push({from:r,to:[c]})}),this.sortedPathsRules.sort((r,c)=>c.from.length-r.from.length)}cloneAndMerge(r){return new p(this._env,m.mergeConfigurationOptions(r,this.options))}getOptionsLiteral(){return this.options}_applyPaths(r){let c;for(let a=0,t=this.sortedPathsRules.length;a<t;a++)if(c=this.sortedPathsRules[a],u.Utilities.startsWith(r,c.from)){let e=[];for(let i=0,s=c.to.length;i<s;i++)e.push(c.to[i]+r.substr(c.from.length));return e}return[r]}_addUrlArgsToUrl(r){return u.Utilities.containsQueryString(r)?r+"&"+this.options.urlArgs:r+"?"+this.options.urlArgs}_addUrlArgsIfNecessaryToUrl(r){return this.options.urlArgs?this._addUrlArgsToUrl(r):r}_addUrlArgsIfNecessaryToUrls(r){if(this.options.urlArgs)for(let c=0,a=r.length;c<a;c++)r[c]=this._addUrlArgsToUrl(r[c]);return r}moduleIdToPaths(r){if(this._env.isNode&&this.options.amdModulesPattern instanceof RegExp&&!this.options.amdModulesPattern.test(r))return this.isBuild()?["empty:"]:["node|"+r];let c=r,a;if(!u.Utilities.endsWith(c,".js")&&!u.Utilities.isAbsolutePath(c)){a=this._applyPaths(c);for(let t=0,e=a.length;t<e;t++)this.isBuild()&&a[t]==="empty:"||(u.Utilities.isAbsolutePath(a[t])||(a[t]=this.options.baseUrl+a[t]),!u.Utilities.endsWith(a[t],".js")&&!u.Utilities.containsQueryString(a[t])&&(a[t]=a[t]+".js"))}else!u.Utilities.endsWith(c,".js")&&!u.Utilities.containsQueryString(c)&&(c=c+".js"),a=[c];return this._addUrlArgsIfNecessaryToUrls(a)}requireToUrl(r){let c=r;return u.Utilities.isAbsolutePath(c)||(c=this._applyPaths(c)[0],u.Utilities.isAbsolutePath(c)||(c=this.options.baseUrl+c)),this._addUrlArgsIfNecessaryToUrl(c)}isBuild(){return this.options.isBuild}shouldInvokeFactory(r){return!!(!this.options.isBuild||u.Utilities.isAnonymousModule(r)||this.options.buildForceInvokeFactory&&this.options.buildForceInvokeFactory[r])}isDuplicateMessageIgnoredFor(r){return this.ignoreDuplicateModulesMap.hasOwnProperty(r)}getConfigForModule(r){if(this.options.config)return this.options.config[r]}shouldCatchError(){return this.options.catchError}shouldRecordStats(){return this.options.recordStats}onError(r){this.options.onError(r)}}u.Configuration=p})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(u){class y{constructor(e){this._env=e,this._scriptLoader=null,this._callbackMap={}}load(e,i,s,n){if(!this._scriptLoader)if(this._env.isWebWorker)this._scriptLoader=new h;else if(this._env.isElectronRenderer){const{preferScriptTags:d}=e.getConfig().getOptionsLiteral();d?this._scriptLoader=new m:this._scriptLoader=new r(this._env)}else this._env.isNode?this._scriptLoader=new r(this._env):this._scriptLoader=new m;let l={callback:s,errorback:n};if(this._callbackMap.hasOwnProperty(i)){this._callbackMap[i].push(l);return}this._callbackMap[i]=[l],this._scriptLoader.load(e,i,()=>this.triggerCallback(i),d=>this.triggerErrorback(i,d))}triggerCallback(e){let i=this._callbackMap[e];delete this._callbackMap[e];for(let s=0;s<i.length;s++)i[s].callback()}triggerErrorback(e,i){let s=this._callbackMap[e];delete this._callbackMap[e];for(let n=0;n<s.length;n++)s[n].errorback(i)}}class m{attachListeners(e,i,s){let n=()=>{e.removeEventListener("load",l),e.removeEventListener("error",d)},l=o=>{n(),i()},d=o=>{n(),s(o)};e.addEventListener("load",l),e.addEventListener("error",d)}load(e,i,s,n){if(/^node\|/.test(i)){let l=e.getConfig().getOptionsLiteral(),d=c(e.getRecorder(),l.nodeRequire||u.global.nodeRequire),o=i.split("|"),_=null;try{_=d(o[1])}catch(f){n(f);return}e.enqueueDefineAnonymousModule([],()=>_),s()}else{let l=document.createElement("script");l.setAttribute("async","async"),l.setAttribute("type","text/javascript"),this.attachListeners(l,s,n);const{trustedTypesPolicy:d}=e.getConfig().getOptionsLiteral();d&&(i=d.createScriptURL(i)),l.setAttribute("src",i);const{cspNonce:o}=e.getConfig().getOptionsLiteral();o&&l.setAttribute("nonce",o),document.getElementsByTagName("head")[0].appendChild(l)}}}function p(t){const{trustedTypesPolicy:e}=t.getConfig().getOptionsLiteral();try{return(e?self.eval(e.createScript("","true")):new Function("true")).call(self),!0}catch{return!1}}class h{constructor(){this._cachedCanUseEval=null}_canUseEval(e){return this._cachedCanUseEval===null&&(this._cachedCanUseEval=p(e)),this._cachedCanUseEval}load(e,i,s,n){if(/^node\|/.test(i)){const l=e.getConfig().getOptionsLiteral(),d=c(e.getRecorder(),l.nodeRequire||u.global.nodeRequire),o=i.split("|");let _=null;try{_=d(o[1])}catch(f){n(f);return}e.enqueueDefineAnonymousModule([],function(){return _}),s()}else{const{trustedTypesPolicy:l}=e.getConfig().getOptionsLiteral();if(!(/^((http:)|(https:)|(file:))/.test(i)&&i.substring(0,self.origin.length)!==self.origin)&&this._canUseEval(e)){fetch(i).then(o=>{if(o.status!==200)throw new Error(o.statusText);return o.text()}).then(o=>{o=`${o} //# sourceURL=${i}`,(l?self.eval(l.createScript("",o)):new Function(o)).call(self),s()}).then(void 0,n);return}try{l&&(i=l.createScriptURL(i)),importScripts(i),s()}catch(o){n(o)}}}}class r{constructor(e){this._env=e,this._didInitialize=!1,this._didPatchNodeRequire=!1}_init(e){this._didInitialize||(this._didInitialize=!0,this._fs=e("fs"),this._vm=e("vm"),this._path=e("path"),this._crypto=e("crypto"))}_initNodeRequire(e,i){const{nodeCachedData:s}=i.getConfig().getOptionsLiteral();if(!s||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;const n=this,l=e("module");function d(o){const _=o.constructor;let f=function(v){try{return o.require(v)}finally{}};return f.resolve=function(v,E){return _._resolveFilename(v,o,!1,E)},f.resolve.paths=function(v){return _._resolveLookupPaths(v,o)},f.main=process.mainModule,f.extensions=_._extensions,f.cache=_._cache,f}l.prototype._compile=function(o,_){const f=l.wrap(o.replace(/^#!.*/,"")),g=i.getRecorder(),v=n._getCachedDataPath(s,_),E={filename:_};let I;try{const D=n._fs.readFileSync(v);I=D.slice(0,16),E.cachedData=D.slice(16),g.record(60,v)}catch{g.record(61,v)}const C=new n._vm.Script(f,E),P=C.runInThisContext(E),w=n._path.dirname(_),R=d(this),U=[this.exports,R,this,_,w,process,_commonjsGlobal,Buffer],b=P.apply(this.exports,U);return n._handleCachedData(C,f,v,!E.cachedData,i),n._verifyCachedData(C,f,v,I,i),b}}load(e,i,s,n){const l=e.getConfig().getOptionsLiteral(),d=c(e.getRecorder(),l.nodeRequire||u.global.nodeRequire),o=l.nodeInstrumenter||function(f){return f};this._init(d),this._initNodeRequire(d,e);let _=e.getRecorder();if(/^node\|/.test(i)){let f=i.split("|"),g=null;try{g=d(f[1])}catch(v){n(v);return}e.enqueueDefineAnonymousModule([],()=>g),s()}else{i=u.Utilities.fileUriToFilePath(this._env.isWindows,i);const f=this._path.normalize(i),g=this._getElectronRendererScriptPathOrUri(f),v=!!l.nodeCachedData,E=v?this._getCachedDataPath(l.nodeCachedData,i):void 0;this._readSourceAndCachedData(f,E,_,(I,C,P,w)=>{if(I){n(I);return}let R;C.charCodeAt(0)===r._BOM?R=r._PREFIX+C.substring(1)+r._SUFFIX:R=r._PREFIX+C+r._SUFFIX,R=o(R,f);const U={filename:g,cachedData:P},b=this._createAndEvalScript(e,R,U,s,n);this._handleCachedData(b,R,E,v&&!P,e),this._verifyCachedData(b,R,E,w,e)})}}_createAndEvalScript(e,i,s,n,l){const d=e.getRecorder();d.record(31,s.filename);const o=new this._vm.Script(i,s),_=o.runInThisContext(s),f=e.getGlobalAMDDefineFunc();let g=!1;const v=function(){return g=!0,f.apply(null,arguments)};return v.amd=f.amd,_.call(u.global,e.getGlobalAMDRequireFunc(),v,s.filename,this._path.dirname(s.filename)),d.record(32,s.filename),g?n():l(new Error(`Didn't receive define call in ${s.filename}!`)),o}_getElectronRendererScriptPathOrUri(e){if(!this._env.isElectronRenderer)return e;let i=e.match(/^([a-z])\:(.*)/i);return i?`file:///${(i[1].toUpperCase()+":"+i[2]).replace(/\\/g,"/")}`:`file://${e}`}_getCachedDataPath(e,i){const s=this._crypto.createHash("md5").update(i,"utf8").update(e.seed,"utf8").update(process.arch,"").digest("hex"),n=this._path.basename(i).replace(/\.js$/,"");return this._path.join(e.path,`${n}-${s}.code`)}_handleCachedData(e,i,s,n,l){e.cachedDataRejected?this._fs.unlink(s,d=>{l.getRecorder().record(62,s),this._createAndWriteCachedData(e,i,s,l),d&&l.getConfig().onError(d)}):n&&this._createAndWriteCachedData(e,i,s,l)}_createAndWriteCachedData(e,i,s,n){let l=Math.ceil(n.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),d=-1,o=0,_;const f=()=>{setTimeout(()=>{_||(_=this._crypto.createHash("md5").update(i,"utf8").digest());const g=e.createCachedData();if(!(g.length===0||g.length===d||o>=5)){if(g.length<d){f();return}d=g.length,this._fs.writeFile(s,Buffer.concat([_,g]),v=>{v&&n.getConfig().onError(v),n.getRecorder().record(63,s),f()})}},l*Math.pow(4,o++))};f()}_readSourceAndCachedData(e,i,s,n){if(!i)this._fs.readFile(e,{encoding:"utf8"},n);else{let l,d,o,_=2;const f=g=>{g?n(g):--_===0&&n(void 0,l,d,o)};this._fs.readFile(e,{encoding:"utf8"},(g,v)=>{l=v,f(g)}),this._fs.readFile(i,(g,v)=>{!g&&v&&v.length>0?(o=v.slice(0,16),d=v.slice(16),s.record(60,i)):s.record(61,i),f()})}}_verifyCachedData(e,i,s,n,l){n&&(e.cachedDataRejected||setTimeout(()=>{const d=this._crypto.createHash("md5").update(i,"utf8").digest();n.equals(d)||(l.getConfig().onError(new Error(`FAILED TO VERIFY CACHED DATA, deleting stale '${s}' now, but a RESTART IS REQUIRED`)),this._fs.unlink(s,o=>{o&&l.getConfig().onError(o)}))},Math.ceil(5e3*(1+Math.random()))))}}r._BOM=65279,r._PREFIX="(function (require, define, __filename, __dirname) { ",r._SUFFIX=` });`;function c(t,e){if(e.__$__isRecorded)return e;const i=function(n){t.record(33,n);try{return e(n)}finally{t.record(34,n)}};return i.__$__isRecorded=!0,i}u.ensureRecordedNodeRequire=c;function a(t){return new y(t)}u.createScriptLoader=a})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(u){class y{constructor(t){let e=t.lastIndexOf("/");e!==-1?this.fromModulePath=t.substr(0,e+1):this.fromModulePath=""}static _normalizeModuleId(t){let e=t,i;for(i=/\/\.\//;i.test(e);)e=e.replace(i,"/");for(e=e.replace(/^\.\//g,""),i=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;i.test(e);)e=e.replace(i,"/");return e=e.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,""),e}resolveModule(t){let e=t;return u.Utilities.isAbsolutePath(e)||(u.Utilities.startsWith(e,"./")||u.Utilities.startsWith(e,"../"))&&(e=y._normalizeModuleId(this.fromModulePath+e)),e}}y.ROOT=new y(""),u.ModuleIdResolver=y;class m{constructor(t,e,i,s,n,l){this.id=t,this.strId=e,this.dependencies=i,this._callback=s,this._errorback=n,this.moduleIdResolver=l,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}static _safeInvokeFunction(t,e){try{return{returnedValue:t.apply(u.global,e),producedError:null}}catch(i){return{returnedValue:null,producedError:i}}}static _invokeFactory(t,e,i,s){return t.shouldInvokeFactory(e)?t.shouldCatchError()?this._safeInvokeFunction(i,s):{returnedValue:i.apply(u.global,s),producedError:null}:{returnedValue:null,producedError:null}}complete(t,e,i,s){this._isComplete=!0;let n=null;if(this._callback)if(typeof this._callback=="function"){t.record(21,this.strId);let l=m._invokeFactory(e,this.strId,this._callback,i);n=l.producedError,t.record(22,this.strId),!n&&typeof l.returnedValue<"u"&&(!this.exportsPassedIn||u.Utilities.isEmpty(this.exports))&&(this.exports=l.returnedValue)}else this.exports=this._callback;if(n){let l=u.ensureError(n);l.phase="factory",l.moduleId=this.strId,l.neededBy=s(this.id),this.error=l,e.onError(l)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null}onDependencyError(t){return this._isComplete=!0,this.error=t,this._errorback?(this._errorback(t),!0):!1}isComplete(){return this._isComplete}}u.Module=m;class p{constructor(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}getMaxModuleId(){return this._nextId}getModuleId(t){let e=this._strModuleIdToIntModuleId.get(t);return typeof e>"u"&&(e=this._nextId++,this._strModuleIdToIntModuleId.set(t,e),this._intModuleIdToStrModuleId[e]=t),e}getStrModuleId(t){return this._intModuleIdToStrModuleId[t]}}class h{constructor(t){this.id=t}}h.EXPORTS=new h(0),h.MODULE=new h(1),h.REQUIRE=new h(2),u.RegularDependency=h;class r{constructor(t,e,i){this.id=t,this.pluginId=e,this.pluginParam=i}}u.PluginDependency=r;class c{constructor(t,e,i,s,n=0){this._env=t,this._scriptLoader=e,this._loaderAvailableTimestamp=n,this._defineFunc=i,this._requireFunc=s,this._moduleIdProvider=new p,this._config=new u.Configuration(this._env),this._hasDependencyCycle=!1,this._modules2=[],this._knownModules2=[],this._inverseDependencies2=[],this._inversePluginDependencies2=new Map,this._currentAnonymousDefineCall=null,this._recorder=null,this._buildInfoPath=[],this._buildInfoDefineStack=[],this._buildInfoDependencies=[],this._requireFunc.moduleManager=this}reset(){return new c(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)}getGlobalAMDDefineFunc(){return this._defineFunc}getGlobalAMDRequireFunc(){return this._requireFunc}static _findRelevantLocationInStack(t,e){let i=l=>l.replace(/\\/g,"/"),s=i(t),n=e.split(/\n/);for(let l=0;l<n.length;l++){let d=n[l].match(/(.*):(\d+):(\d+)\)?$/);if(d){let o=d[1],_=d[2],f=d[3],g=Math.max(o.lastIndexOf(" ")+1,o.lastIndexOf("(")+1);if(o=o.substr(g),o=i(o),o===s){let v={line:parseInt(_,10),col:parseInt(f,10)};return v.line===1&&(v.col-=53),v}}}throw new Error("Could not correlate define call site for needle "+t)}getBuildInfo(){if(!this._config.isBuild())return null;let t=[],e=0;for(let i=0,s=this._modules2.length;i<s;i++){let n=this._modules2[i];if(!n)continue;let l=this._buildInfoPath[n.id]||null,d=this._buildInfoDefineStack[n.id]||null,o=this._buildInfoDependencies[n.id];t[e++]={id:n.strId,path:l,defineLocation:l&&d?c._findRelevantLocationInStack(l,d):null,dependencies:o,shim:null,exports:n.exports}}return t}getRecorder(){return this._recorder||(this._config.shouldRecordStats()?this._recorder=new u.LoaderEventRecorder(this._loaderAvailableTimestamp):this._recorder=u.NullLoaderEventRecorder.INSTANCE),this._recorder}getLoaderEvents(){return this.getRecorder().getEvents()}enqueueDefineAnonymousModule(t,e){if(this._currentAnonymousDefineCall!==null)throw new Error("Can only have one anonymous define call per script file");let i=null;this._config.isBuild()&&(i=new Error("StackLocation").stack||null),this._currentAnonymousDefineCall={stack:i,dependencies:t,callback:e}}defineModule(t,e,i,s,n,l=new y(t)){let d=this._moduleIdProvider.getModuleId(t);if(this._modules2[d]){this._config.isDuplicateMessageIgnoredFor(t)||console.warn("Duplicate definition of module '"+t+"'");return}let o=new m(d,t,this._normalizeDependencies(e,l),i,s,l);this._modules2[d]=o,this._config.isBuild()&&(this._buildInfoDefineStack[d]=n,this._buildInfoDependencies[d]=(o.dependencies||[]).map(_=>this._moduleIdProvider.getStrModuleId(_.id))),this._resolve(o)}_normalizeDependency(t,e){if(t==="exports")return h.EXPORTS;if(t==="module")return h.MODULE;if(t==="require")return h.REQUIRE;let i=t.indexOf("!");if(i>=0){let s=e.resolveModule(t.substr(0,i)),n=e.resolveModule(t.substr(i+1)),l=this._moduleIdProvider.getModuleId(s+"!"+n),d=this._moduleIdProvider.getModuleId(s);return new r(l,d,n)}return new h(this._moduleIdProvider.getModuleId(e.resolveModule(t)))}_normalizeDependencies(t,e){let i=[],s=0;for(let n=0,l=t.length;n<l;n++)i[s++]=this._normalizeDependency(t[n],e);return i}_relativeRequire(t,e,i,s){if(typeof e=="string")return this.synchronousRequire(e,t);this.defineModule(u.Utilities.generateAnonymousModule(),e,i,s,null,t)}synchronousRequire(t,e=new y(t)){let i=this._normalizeDependency(t,e),s=this._modules2[i.id];if(!s)throw new Error("Check dependency list! Synchronous require cannot resolve module '"+t+"'. This is the first mention of this module!");if(!s.isComplete())throw new Error("Check dependency list! Synchronous require cannot resolve module '"+t+"'. This module has not been resolved completely yet.");if(s.error)throw s.error;return s.exports}configure(t,e){let i=this._config.shouldRecordStats();e?this._config=new u.Configuration(this._env,t):this._config=this._config.cloneAndMerge(t),this._config.shouldRecordStats()&&!i&&(this._recorder=null)}getConfig(){return this._config}_onLoad(t){if(this._currentAnonymousDefineCall!==null){let e=this._currentAnonymousDefineCall;this._currentAnonymousDefineCall=null,this.defineModule(this._moduleIdProvider.getStrModuleId(t),e.dependencies,e.callback,null,e.stack)}}_createLoadError(t,e){let i=this._moduleIdProvider.getStrModuleId(t),s=(this._inverseDependencies2[t]||[]).map(l=>this._moduleIdProvider.getStrModuleId(l));const n=u.ensureError(e);return n.phase="loading",n.moduleId=i,n.neededBy=s,n}_onLoadError(t,e){const i=this._createLoadError(t,e);this._modules2[t]||(this._modules2[t]=new m(t,this._moduleIdProvider.getStrModuleId(t),[],()=>{},null,null));let s=[];for(let d=0,o=this._moduleIdProvider.getMaxModuleId();d<o;d++)s[d]=!1;let n=!1,l=[];for(l.push(t),s[t]=!0;l.length>0;){let d=l.shift(),o=this._modules2[d];o&&(n=o.onDependencyError(i)||n);let _=this._inverseDependencies2[d];if(_)for(let f=0,g=_.length;f<g;f++){let v=_[f];s[v]||(l.push(v),s[v]=!0)}}n||this._config.onError(i)}_hasDependencyPath(t,e){let i=this._modules2[t];if(!i)return!1;let s=[];for(let l=0,d=this._moduleIdProvider.getMaxModuleId();l<d;l++)s[l]=!1;let n=[];for(n.push(i),s[t]=!0;n.length>0;){let d=n.shift().dependencies;if(d)for(let o=0,_=d.length;o<_;o++){let f=d[o];if(f.id===e)return!0;let g=this._modules2[f.id];g&&!s[f.id]&&(s[f.id]=!0,n.push(g))}}return!1}_findCyclePath(t,e,i){if(t===e||i===50)return[t];let s=this._modules2[t];if(!s)return null;let n=s.dependencies;if(n)for(let l=0,d=n.length;l<d;l++){let o=this._findCyclePath(n[l].id,e,i+1);if(o!==null)return o.push(t),o}return null}_createRequire(t){let e=(i,s,n)=>this._relativeRequire(t,i,s,n);return e.toUrl=i=>this._config.requireToUrl(t.resolveModule(i)),e.getStats=()=>this.getLoaderEvents(),e.hasDependencyCycle=()=>this._hasDependencyCycle,e.config=(i,s=!1)=>{this.configure(i,s)},e.__$__nodeRequire=u.global.nodeRequire,e}_loadModule(t){if(this._modules2[t]||this._knownModules2[t])return;this._knownModules2[t]=!0;let e=this._moduleIdProvider.getStrModuleId(t),i=this._config.moduleIdToPaths(e),s=/^@[^\/]+\/[^\/]+$/;this._env.isNode&&(e.indexOf("/")===-1||s.test(e))&&i.push("node|"+e);let n=-1,l=d=>{if(n++,n>=i.length)this._onLoadError(t,d);else{let o=i[n],_=this.getRecorder();if(this._config.isBuild()&&o==="empty:"){this._buildInfoPath[t]=o,this.defineModule(this._moduleIdProvider.getStrModuleId(t),[],null,null,null),this._onLoad(t);return}_.record(10,o),this._scriptLoader.load(this,o,()=>{this._config.isBuild()&&(this._buildInfoPath[t]=o),_.record(11,o),this._onLoad(t)},f=>{_.record(12,o),l(f)})}};l(null)}_loadPluginDependency(t,e){if(this._modules2[e.id]||this._knownModules2[e.id])return;this._knownModules2[e.id]=!0;let i=s=>{this.defineModule(this._moduleIdProvider.getStrModuleId(e.id),[],s,null,null)};i.error=s=>{this._config.onError(this._createLoadError(e.id,s))},t.load(e.pluginParam,this._createRequire(y.ROOT),i,this._config.getOptionsLiteral())}_resolve(t){let e=t.dependencies;if(e)for(let i=0,s=e.length;i<s;i++){let n=e[i];if(n===h.EXPORTS){t.exportsPassedIn=!0,t.unresolvedDependenciesCount--;continue}if(n===h.MODULE){t.unresolvedDependenciesCount--;continue}if(n===h.REQUIRE){t.unresolvedDependenciesCount--;continue}let l=this._modules2[n.id];if(l&&l.isComplete()){if(l.error){t.onDependencyError(l.error);return}t.unresolvedDependenciesCount--;continue}if(this._hasDependencyPath(n.id,t.id)){this._hasDependencyCycle=!0,console.warn("There is a dependency cycle between '"+this._moduleIdProvider.getStrModuleId(n.id)+"' and '"+this._moduleIdProvider.getStrModuleId(t.id)+"'. The cyclic path follows:");let d=this._findCyclePath(n.id,t.id,0)||[];d.reverse(),d.push(n.id),console.warn(d.map(o=>this._moduleIdProvider.getStrModuleId(o)).join(` => `)),t.unresolvedDependenciesCount--;continue}if(this._inverseDependencies2[n.id]=this._inverseDependencies2[n.id]||[],this._inverseDependencies2[n.id].push(t.id),n instanceof r){let d=this._modules2[n.pluginId];if(d&&d.isComplete()){this._loadPluginDependency(d.exports,n);continue}let o=this._inversePluginDependencies2.get(n.pluginId);o||(o=[],this._inversePluginDependencies2.set(n.pluginId,o)),o.push(n),this._loadModule(n.pluginId);continue}this._loadModule(n.id)}t.unresolvedDependenciesCount===0&&this._onModuleComplete(t)}_onModuleComplete(t){let e=this.getRecorder();if(t.isComplete())return;let i=t.dependencies,s=[];if(i)for(let o=0,_=i.length;o<_;o++){let f=i[o];if(f===h.EXPORTS){s[o]=t.exports;continue}if(f===h.MODULE){s[o]={id:t.strId,config:()=>this._config.getConfigForModule(t.strId)};continue}if(f===h.REQUIRE){s[o]=this._createRequire(t.moduleIdResolver);continue}let g=this._modules2[f.id];if(g){s[o]=g.exports;continue}s[o]=null}const n=o=>(this._inverseDependencies2[o]||[]).map(_=>this._moduleIdProvider.getStrModuleId(_));t.complete(e,this._config,s,n);let l=this._inverseDependencies2[t.id];if(this._inverseDependencies2[t.id]=null,l)for(let o=0,_=l.length;o<_;o++){let f=l[o],g=this._modules2[f];g.unresolvedDependenciesCount--,g.unresolvedDependenciesCount===0&&this._onModuleComplete(g)}let d=this._inversePluginDependencies2.get(t.id);if(d){this._inversePluginDependencies2.delete(t.id);for(let o=0,_=d.length;o<_;o++)this._loadPluginDependency(t.exports,d[o])}}}u.ModuleManager=c})(AMDLoader||(AMDLoader={}));var define,AMDLoader;(function(u){const y=new u.Environment;let m=null;const p=function(a,t,e){typeof a!="string"&&(e=t,t=a,a=null),(typeof t!="object"||!Array.isArray(t))&&(e=t,t=null),t||(t=["require","exports","module"]),a?m.defineModule(a,t,e,null,null):m.enqueueDefineAnonymousModule(t,e)};p.amd={jQuery:!0};const h=function(a,t=!1){m.configure(a,t)},r=function(){if(arguments.length===1){if(arguments[0]instanceof Object&&!Array.isArray(arguments[0])){h(arguments[0]);return}if(typeof arguments[0]=="string")return m.synchronousRequire(arguments[0])}if((arguments.length===2||arguments.length===3)&&Array.isArray(arguments[0])){m.defineModule(u.Utilities.generateAnonymousModule(),arguments[0],arguments[1],arguments[2],null);return}throw new Error("Unrecognized require call")};r.config=h,r.getConfig=function(){return m.getConfig().getOptionsLiteral()},r.reset=function(){m=m.reset()},r.getBuildInfo=function(){return m.getBuildInfo()},r.getStats=function(){return m.getLoaderEvents()},r.define=p;function c(){if(typeof u.global.require<"u"||typeof require<"u"){const a=u.global.require||require;if(typeof a=="function"&&typeof a.resolve=="function"){const t=u.ensureRecordedNodeRequire(m.getRecorder(),a);u.global.nodeRequire=t,r.nodeRequire=t,r.__$__nodeRequire=t}}y.isNode&&!y.isElectronRenderer&&!y.isElectronNodeIntegrationWebWorker?module.exports=r:(y.isElectronRenderer||(u.global.define=p),u.global.require=r)}u.init=c,(typeof u.global.define!="function"||!u.global.define.amd)&&(m=new u.ModuleManager(y,u.createScriptLoader(y),p,r,u.Utilities.getHighPerformanceTimestamp()),typeof u.global.require<"u"&&typeof u.global.require!="function"&&r.config(u.global.require),define=function(){return p.apply(null,arguments)},define.amd=p.amd,typeof doNotInitLoader>"u"&&c())})(AMDLoader||(AMDLoader={})); //# sourceMappingURL=../../min-maps/vs/loader.js.map
yairm210/Mermaid-gif-maker
13
A small webpage for making GIFs of mermaid graphs
JavaScript
yairm210
Yair Morgenstern
monaco-editor-vs/editor/editor.main.css
CSS
/*!----------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.51.0(67d664a32968e19e2eb08b696a92463804182ae4) * Released under the MIT license * https://github.com/microsoft/vscode/blob/main/LICENSE.txt *-----------------------------------------------------------*/.monaco-action-bar{height:100%;white-space:nowrap}.monaco-action-bar .actions-container{align-items:center;display:flex;height:100%;margin:0 auto;padding:0;width:100%}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{align-items:center;cursor:pointer;display:block;justify-content:center;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .codicon,.monaco-action-bar .action-item .icon{display:block}.monaco-action-bar .action-item .codicon{align-items:center;display:flex;height:16px;width:16px}.monaco-action-bar .action-label{border-radius:5px;display:flex;font-size:11px;padding:3px}.monaco-action-bar .action-item.disabled .action-label,.monaco-action-bar .action-item.disabled .action-label:before,.monaco-action-bar .action-item.disabled .action-label:hover{color:var(--vscode-disabledForeground)}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{border-bottom:1px solid #bbb;display:block;margin-left:.8em;margin-right:.8em;padding-top:1px}.monaco-action-bar .action-item .action-label.separator{background-color:#bbb;cursor:default;height:16px;margin:5px 4px!important;min-width:1px;padding:0;width:1px}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{align-items:center;display:flex;flex:1;justify-content:center;margin-right:10px;max-width:170px;min-width:60px;overflow:hidden}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator{align-items:center;cursor:default;display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator>div{width:1px}.monaco-aria-container{left:-999em;position:absolute}.monaco-text-button{align-items:center;border:1px solid var(--vscode-button-border,transparent);border-radius:2px;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;line-height:18px;padding:4px;text-align:center;width:100%}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled,.monaco-button.disabled:focus{cursor:default;opacity:.4!important}.monaco-text-button .codicon{color:inherit!important;margin:0 .2em}.monaco-text-button.monaco-text-button-with-short-label{flex-direction:row;flex-wrap:wrap;height:28px;overflow:hidden;padding:0 4px}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label{flex-basis:100%}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{flex-grow:1;overflow:hidden;width:0}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label,.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{align-items:center;display:flex;font-style:inherit;font-weight:400;justify-content:center;padding:4px 0}.monaco-button-dropdown{cursor:pointer;display:flex}.monaco-button-dropdown.disabled{cursor:default}.monaco-button-dropdown>.monaco-button:focus{outline-offset:-1px!important}.monaco-button-dropdown.disabled>.monaco-button-dropdown-separator,.monaco-button-dropdown.disabled>.monaco-button.disabled,.monaco-button-dropdown.disabled>.monaco-button.disabled:focus{opacity:.4!important}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-right-width:0!important}.monaco-button-dropdown .monaco-button-dropdown-separator{cursor:default;padding:4px 0}.monaco-button-dropdown .monaco-button-dropdown-separator>div{height:100%;width:1px}.monaco-button-dropdown>.monaco-button.monaco-dropdown-button{align-items:center;border:1px solid var(--vscode-button-border,transparent);border-left-width:0!important;border-radius:0 2px 2px 0;display:flex}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-radius:2px 0 0 2px}.monaco-description-button{align-items:center;display:flex;flex-direction:column;margin:4px 5px}.monaco-description-button .monaco-button-description{font-size:11px;font-style:italic;padding:4px 20px}.monaco-description-button .monaco-button-description,.monaco-description-button .monaco-button-label{align-items:center;display:flex;justify-content:center}.monaco-description-button .monaco-button-description>.codicon,.monaco-description-button .monaco-button-label>.codicon{color:inherit!important;margin:0 .2em}.monaco-button-dropdown.default-colors>.monaco-button,.monaco-button.default-colors{background-color:var(--vscode-button-background);color:var(--vscode-button-foreground)}.monaco-button-dropdown.default-colors>.monaco-button:hover,.monaco-button.default-colors:hover{background-color:var(--vscode-button-hoverBackground)}.monaco-button-dropdown.default-colors>.monaco-button.secondary,.monaco-button.default-colors.secondary{background-color:var(--vscode-button-secondaryBackground);color:var(--vscode-button-secondaryForeground)}.monaco-button-dropdown.default-colors>.monaco-button.secondary:hover,.monaco-button.default-colors.secondary:hover{background-color:var(--vscode-button-secondaryHoverBackground)}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator{background-color:var(--vscode-button-background);border-bottom:1px solid var(--vscode-button-border);border-top:1px solid var(--vscode-button-border)}.monaco-button-dropdown.default-colors .monaco-button.secondary+.monaco-button-dropdown-separator{background-color:var(--vscode-button-secondaryBackground)}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator>div{background-color:var(--vscode-button-separator)}@font-face{font-display:block;font-family:codicon;src:url(../base/browser/ui/codicons/codicon/codicon.ttf) format("truetype")}.codicon[class*=codicon-]{display:inline-block;font:normal normal normal 16px/1 codicon;text-align:center;text-decoration:none;text-rendering:auto;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none;-webkit-user-select:none}.codicon-wrench-subaction{opacity:.5}@keyframes codicon-spin{to{transform:rotate(1turn)}}.codicon-gear.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin,.codicon-sync.codicon-modifier-spin{animation:codicon-spin 1.5s steps(30) infinite}.codicon-modifier-disabled{opacity:.4}.codicon-loading,.codicon-tree-item-loading:before{animation-duration:1s!important;animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important}.context-view{position:absolute}.context-view.fixed{all:initial;color:inherit;font-family:inherit;font-size:13px;position:fixed}.monaco-count-badge{border-radius:11px;box-sizing:border-box;display:inline-block;font-size:11px;font-weight:400;line-height:11px;min-height:18px;min-width:18px;padding:3px 6px;text-align:center}.monaco-count-badge.long{border-radius:2px;line-height:normal;min-height:auto;padding:2px 3px}.monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{align-items:center;cursor:pointer;display:flex;height:100%;justify-content:center}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-dropdown-with-primary{border-radius:5px;display:flex!important;flex-direction:row}.monaco-dropdown-with-primary>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;line-height:16px;margin-left:-3px;padding-left:0;padding-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{background-position:50%;background-repeat:no-repeat;background-size:16px;display:block}.monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;right:2px;top:3px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.hc-light .monaco-findInput.highlight-0 .controls,.monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-0 .1s linear 0s}.hc-light .monaco-findInput.highlight-1 .controls,.monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@keyframes monaco-findInput-highlight-0{0%{background:rgba(253,255,0,.8)}to{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:rgba(253,255,0,.8)}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:hsla(0,0%,100%,.44)}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:hsla(0,0%,100%,.44)}99%{background:transparent}}.monaco-hover{animation:fadein .1s linear;box-sizing:border-box;cursor:default;line-height:1.5em;overflow:hidden;position:absolute;user-select:text;-webkit-user-select:text;white-space:var(--vscode-hover-whiteSpace,normal)}.monaco-hover.hidden{display:none}.monaco-hover a:hover:not(.disabled){cursor:pointer}.monaco-hover .hover-contents:not(.html-hover-contents){padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){max-width:var(--vscode-hover-maxWidth,500px);word-wrap:break-word}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:100%}.monaco-hover .code,.monaco-hover h1,.monaco-hover h2,.monaco-hover h3,.monaco-hover h4,.monaco-hover h5,.monaco-hover h6,.monaco-hover p,.monaco-hover ul{margin:8px 0}.monaco-hover h1,.monaco-hover h2,.monaco-hover h3,.monaco-hover h4,.monaco-hover h5,.monaco-hover h6{line-height:1.1}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{border-left:0;border-right:0;box-sizing:border-box;height:1px;margin:4px -8px -4px}.monaco-hover .code:first-child,.monaco-hover p:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover .code:last-child,.monaco-hover p:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ol,.monaco-hover ul{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:var(--vscode-hover-sourceWhiteSpace,pre-wrap)}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .info{font-style:italic;padding:0 8px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px;width:100%}.monaco-hover .hover-row.status-bar .actions .action-container{cursor:pointer;margin-right:16px}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px}.monaco-hover .hover-row.status-bar .actions .action-container a{color:var(--vscode-textLink-foreground);text-decoration:var(--text-link-decoration)}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link,.monaco-hover .hover-contents a.code-link:hover{color:inherit}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link>span{border-bottom:1px solid transparent;color:var(--vscode-textLink-foreground);text-decoration:underline;text-underline-position:under}.monaco-hover .hover-contents a.code-link>span:hover{color:var(--vscode-textLink-activeForeground)}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span{display:inline-block;margin-bottom:4px}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span.codicon{margin-bottom:2px}.monaco-hover-content .action-container a{-webkit-user-select:none;user-select:none}.monaco-hover-content .action-container.disabled{cursor:default;opacity:.4;pointer-events:none}.monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{background-position:0;background-repeat:no-repeat;background-size:16px;display:inline-block;height:22px;line-height:inherit!important;padding-right:6px;width:16px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;flex-shrink:0;vertical-align:top}.monaco-icon-label-iconpath{display:flex;height:16px;margin-top:2px;padding-left:2px;width:16px}.monaco-icon-label-container.disabled{color:var(--vscode-disabledForeground)}.monaco-icon-label>.monaco-icon-label-container{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-suffix-container>.label-suffix{opacity:.7;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-size:.9em;margin-left:.5em;opacity:.7;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{font-style:italic}.monaco-icon-label.deprecated{opacity:.66;text-decoration:line-through}.monaco-icon-label.italic:after{font-style:italic}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{text-decoration:line-through}.monaco-icon-label:after{font-size:90%;font-weight:600;margin:auto 16px 0 5px;opacity:.75;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}.monaco-inputbox{border-radius:2px;box-sizing:border-box;display:block;font-size:inherit;padding:0;position:relative}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px 6px}.monaco-inputbox>.ibwrapper{height:100%;position:relative;width:100%}.monaco-inputbox>.ibwrapper>.input{border:none;box-sizing:border-box;color:inherit;display:inline-block;font-family:inherit;font-size:inherit;height:100%;line-height:inherit;resize:none;width:100%}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{display:block;outline:none;scrollbar-width:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{box-sizing:border-box;display:inline-block;left:0;position:absolute;top:0;visibility:hidden;white-space:pre-wrap;width:100%;word-wrap:break-word}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{box-sizing:border-box;display:inline-block;font-size:12px;line-height:17px;margin-top:-1px;overflow:hidden;padding:.4em;text-align:left;width:100%;word-wrap:break-word}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;height:16px;width:16px}.monaco-keybinding{align-items:center;display:flex;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{border-radius:3px;border-style:solid;border-width:1px;display:inline-block;font-size:11px;margin:0 2px;padding:3px 5px;vertical-align:middle}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}.monaco-list{height:100%;position:relative;white-space:nowrap;width:100%}.monaco-list.mouse-support{user-select:none;-webkit-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{height:100%;position:relative;width:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{min-width:100%;width:auto}.monaco-list-row{box-sizing:border-box;overflow:hidden;position:absolute;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list .monaco-scrollable-element>.scrollbar.vertical,.monaco-pane-view>.monaco-split-view2.vertical>.monaco-scrollable-element>.scrollbar.vertical{z-index:14}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-multiple,.monaco-list.selection-single{outline:0!important}.monaco-drag-image{border-radius:10px;display:inline-block;font-size:12px;padding:1px 7px;position:absolute;z-index:1000}.monaco-list-type-filter-message{box-sizing:border-box;height:100%;left:0;opacity:.7;padding:40px 1em 1em;pointer-events:none;position:absolute;text-align:center;top:0;white-space:normal;width:100%}.monaco-list-type-filter-message:empty{display:none}.monaco-mouse-cursor-text{cursor:text}.monaco-progress-container{height:2px;overflow:hidden;width:100%}.monaco-progress-container .progress-bit{display:none;height:2px;left:0;position:absolute;width:2%}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{animation-duration:4s;animation-iteration-count:infinite;animation-name:progress;animation-timing-function:linear;transform:translateZ(0)}.monaco-progress-container.infinite.infinite-long-running .progress-bit{animation-timing-function:steps(100)}@keyframes progress{0%{transform:translateX(0) scaleX(1)}50%{transform:translateX(2500%) scaleX(3)}to{transform:translateX(4900%) scaleX(1)}}:root{--vscode-sash-size:4px;--vscode-sash-hover-size:4px}.monaco-sash{position:absolute;touch-action:none;z-index:35}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;height:100%;top:0;width:var(--vscode-sash-size)}.monaco-sash.horizontal{cursor:ns-resize;height:var(--vscode-sash-size);left:0;width:100%}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";cursor:all-scroll;display:block;height:calc(var(--vscode-sash-size)*2);position:absolute;width:calc(var(--vscode-sash-size)*2);z-index:100}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--vscode-sash-size)*-.5);top:calc(var(--vscode-sash-size)*-1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{bottom:calc(var(--vscode-sash-size)*-1);left:calc(var(--vscode-sash-size)*-.5)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{left:calc(var(--vscode-sash-size)*-1);top:calc(var(--vscode-sash-size)*-.5)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{right:calc(var(--vscode-sash-size)*-1);top:calc(var(--vscode-sash-size)*-.5)}.monaco-sash:before{background:transparent;content:"";height:100%;pointer-events:none;position:absolute;width:100%}.monaco-workbench:not(.reduce-motion) .monaco-sash:before{transition:background-color .1s ease-out}.monaco-sash.active:before,.monaco-sash.hover:before{background:var(--vscode-sash-hoverBorder)}.monaco-sash.vertical:before{left:calc(50% - var(--vscode-sash-hover-size)/2);width:var(--vscode-sash-hover-size)}.monaco-sash.horizontal:before{height:var(--vscode-sash-hover-size);top:calc(50% - var(--vscode-sash-hover-size)/2)}.pointer-events-disabled{pointer-events:none!important}.monaco-sash.debug{background:cyan}.monaco-sash.debug.disabled{background:rgba(0,255,255,.2)}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{background:transparent;opacity:1;transition:opacity .1s linear;z-index:11}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{display:none;position:absolute}.monaco-scrollable-element>.shadow.top{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;display:block;height:3px;left:3px;top:0;width:100%}.monaco-scrollable-element>.shadow.left{box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset;display:block;height:100%;left:0;top:3px;width:3px}.monaco-scrollable-element>.shadow.top-left-corner{display:block;height:3px;left:0;top:0;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.scrollbar>.slider{background:var(--vscode-scrollbarSlider-background)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-scrollable-element>.scrollbar>.slider.active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-select-box{border-radius:2px;cursor:pointer;width:100%}.monaco-select-box-dropdown-container{font-size:13px;font-weight:400;text-transform:none}.monaco-action-bar .action-item.select-container{cursor:default}.monaco-action-bar .action-item .monaco-select-box{cursor:pointer;min-height:18px;min-width:100px;padding:2px 23px 2px 8px}.mac .monaco-action-bar .action-item .monaco-select-box{border-radius:5px;font-size:11px}.monaco-select-box-dropdown-padding{--dropdown-padding-top:1px;--dropdown-padding-bottom:1px}.hc-black .monaco-select-box-dropdown-padding,.hc-light .monaco-select-box-dropdown-padding{--dropdown-padding-top:3px;--dropdown-padding-bottom:4px}.monaco-select-box-dropdown-container{box-sizing:border-box;display:none}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown *{margin:0}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown a:focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown code{font-family:var(--monaco-monospace-font);line-height:15px}.monaco-select-box-dropdown-container.visible{border-bottom-left-radius:3px;border-bottom-right-radius:3px;display:flex;flex-direction:column;overflow:hidden;text-align:left;width:1px}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container{align-self:flex-start;box-sizing:border-box;flex:0 0 auto;overflow:hidden;padding-bottom:var(--dropdown-padding-bottom);padding-left:1px;padding-right:1px;padding-top:var(--dropdown-padding-top);width:100%}.monaco-select-box-dropdown-container>.select-box-details-pane{padding:5px}.hc-black .monaco-select-box-dropdown-container>.select-box-dropdown-list-container{padding-bottom:var(--dropdown-padding-bottom);padding-top:var(--dropdown-padding-top)}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row{cursor:pointer}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-text{float:left;overflow:hidden;padding-left:3.5px;text-overflow:ellipsis;white-space:nowrap}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-detail{float:left;opacity:.7;overflow:hidden;padding-left:3.5px;text-overflow:ellipsis;white-space:nowrap}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-decorator-right{float:right;overflow:hidden;padding-right:10px;text-overflow:ellipsis;white-space:nowrap}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.visually-hidden{height:1px;left:-10000px;overflow:hidden;position:absolute;top:auto;width:1px}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control{align-self:flex-start;flex:1 1 auto;opacity:0}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div{max-height:0;overflow:hidden}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div>.option-text-width-control{padding-left:4px;padding-right:8px;white-space:nowrap}.monaco-split-view2{height:100%;position:relative;width:100%}.monaco-split-view2>.sash-container{height:100%;pointer-events:none;position:absolute;width:100%}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:auto}.monaco-split-view2>.monaco-scrollable-element{height:100%;width:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{height:100%;position:relative;white-space:nowrap;width:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{position:absolute;white-space:normal}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{background-color:var(--separator-border);content:" ";left:0;pointer-events:none;position:absolute;top:0;z-index:5}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}.monaco-table{display:flex;flex-direction:column;height:100%;overflow:hidden;position:relative;white-space:nowrap;width:100%}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{font-weight:700;height:100%;overflow:hidden;text-overflow:ellipsis;width:100%}.monaco-table-td,.monaco-table-th{box-sizing:border-box;flex-shrink:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{border-left:1px solid transparent;content:"";left:calc(var(--vscode-sash-size)/2);position:absolute;width:0}.monaco-workbench:not(.reduce-motion) .monaco-table>.monaco-split-view2,.monaco-workbench:not(.reduce-motion) .monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}.monaco-custom-toggle{border:1px solid transparent;border-radius:3px;box-sizing:border-box;cursor:pointer;float:left;height:20px;margin-left:2px;overflow:hidden;padding:1px;user-select:none;-webkit-user-select:none;width:20px}.monaco-custom-toggle:hover{background-color:var(--vscode-inputOption-hoverBackground)}.hc-black .monaco-custom-toggle:hover,.hc-light .monaco-custom-toggle:hover{border:1px dashed var(--vscode-focusBorder)}.hc-black .monaco-custom-toggle,.hc-black .monaco-custom-toggle:hover,.hc-light .monaco-custom-toggle,.hc-light .monaco-custom-toggle:hover{background:none}.monaco-custom-toggle.monaco-checkbox{background-size:16px!important;border:1px solid transparent;border-radius:3px;height:18px;margin-left:0;margin-right:9px;opacity:1;padding:0;width:18px}.monaco-action-bar .checkbox-action-item{align-items:center;border-radius:2px;display:flex;padding-right:2px}.monaco-action-bar .checkbox-action-item:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-action-bar .checkbox-action-item>.monaco-custom-toggle.monaco-checkbox{margin-right:4px}.monaco-action-bar .checkbox-action-item>.checkbox-label{font-size:12px}.monaco-custom-toggle.monaco-checkbox:not(.checked):before{visibility:hidden}.monaco-toolbar{height:100%}.monaco-toolbar .toolbar-toggle-more{display:inline-block;padding:0}.monaco-tl-row{align-items:center;display:flex;height:100%;position:relative}.monaco-tl-row.disabled{cursor:default}.monaco-tl-indent{height:100%;left:16px;pointer-events:none;position:absolute;top:0}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{border-left:1px solid transparent;box-sizing:border-box;display:inline-block;height:100%}.monaco-workbench:not(.reduce-motion) .monaco-tl-indent>.indent-guide{transition:border-color .1s linear}.monaco-tl-contents,.monaco-tl-twistie{height:100%}.monaco-tl-twistie{align-items:center;display:flex!important;flex-shrink:0;font-size:10px;justify-content:center;padding-right:6px;text-align:right;transform:translateX(3px);width:16px}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{animation:codicon-spin 1.25s steps(30) infinite}.monaco-tree-type-filter{border:1px solid var(--vscode-widget-border);border-bottom-left-radius:4px;border-bottom-right-radius:4px;display:flex;margin:0 6px;max-width:200px;padding:3px;position:absolute;top:0;z-index:100}.monaco-workbench:not(.reduce-motion) .monaco-tree-type-filter{transition:top .3s}.monaco-tree-type-filter.disabled{top:-40px!important}.monaco-tree-type-filter-grab{align-items:center;cursor:grab;display:flex!important;justify-content:center;margin-right:2px}.monaco-tree-type-filter-grab.grabbing{cursor:grabbing}.monaco-tree-type-filter-input{flex:1}.monaco-tree-type-filter-input .monaco-inputbox{height:23px}.monaco-tree-type-filter-input .monaco-inputbox>.ibwrapper>.input,.monaco-tree-type-filter-input .monaco-inputbox>.ibwrapper>.mirror{padding:2px 4px}.monaco-tree-type-filter-input .monaco-findInput>.controls{top:2px}.monaco-tree-type-filter-actionbar{margin-left:4px}.monaco-tree-type-filter-actionbar .monaco-action-bar .action-label{padding:2px}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container{background-color:var(--vscode-sideBar-background);height:0;left:0;position:absolute;top:0;width:100%;z-index:13}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row.monaco-list-row{background-color:var(--vscode-sideBar-background);opacity:1!important;overflow:hidden;position:absolute;width:100%}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row:hover{background-color:var(--vscode-list-hoverBackground)!important;cursor:pointer}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container.empty,.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container.empty .monaco-tree-sticky-container-shadow{display:none}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow{bottom:-3px;height:0;left:0;position:absolute;width:100%}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container[tabindex="0"]:focus{outline:none}.monaco-editor .inputarea{background-color:transparent;border:none;color:transparent;margin:0;min-height:0;min-width:0;outline:none!important;overflow:hidden;padding:0;position:absolute;resize:none;z-index:-10}.monaco-editor .inputarea.ime-input{caret-color:var(--vscode-editorCursor-foreground);color:var(--vscode-editor-foreground);z-index:10}.monaco-workbench .workbench-hover{background:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);border-radius:3px;box-shadow:0 2px 8px var(--vscode-widget-shadow);color:var(--vscode-editorHoverWidget-foreground);font-size:13px;line-height:19px;max-width:700px;overflow:hidden;position:relative;z-index:40}.monaco-workbench .workbench-hover hr{border-bottom:none}.monaco-workbench .workbench-hover:not(.skip-fade-in){animation:fadein .1s linear}.monaco-workbench .workbench-hover.compact{font-size:12px}.monaco-workbench .workbench-hover.compact .hover-contents{padding:2px 8px}.monaco-workbench .workbench-hover-container.locked .workbench-hover{outline:1px solid var(--vscode-editorHoverWidget-border)}.monaco-workbench .workbench-hover-container.locked .workbench-hover:focus,.monaco-workbench .workbench-hover-lock:focus{outline:1px solid var(--vscode-focusBorder)}.monaco-workbench .workbench-hover-container.locked .workbench-hover-lock:hover{background:var(--vscode-toolbar-hoverBackground)}.monaco-workbench .workbench-hover-pointer{pointer-events:none;position:absolute;z-index:41}.monaco-workbench .workbench-hover-pointer:after{background-color:var(--vscode-editorHoverWidget-background);border-bottom:1px solid var(--vscode-editorHoverWidget-border);border-right:1px solid var(--vscode-editorHoverWidget-border);content:"";height:5px;position:absolute;width:5px}.monaco-workbench .locked .workbench-hover-pointer:after{border-bottom-width:2px;border-right-width:2px;height:4px;width:4px}.monaco-workbench .workbench-hover-pointer.left{left:-3px}.monaco-workbench .workbench-hover-pointer.right{right:3px}.monaco-workbench .workbench-hover-pointer.top{top:-3px}.monaco-workbench .workbench-hover-pointer.bottom{bottom:3px}.monaco-workbench .workbench-hover-pointer.left:after{transform:rotate(135deg)}.monaco-workbench .workbench-hover-pointer.right:after{transform:rotate(315deg)}.monaco-workbench .workbench-hover-pointer.top:after{transform:rotate(225deg)}.monaco-workbench .workbench-hover-pointer.bottom:after{transform:rotate(45deg)}.monaco-workbench .workbench-hover a{color:var(--vscode-textLink-foreground)}.monaco-workbench .workbench-hover a:focus{outline:1px solid;outline-color:var(--vscode-focusBorder);outline-offset:-1px;text-decoration:underline}.monaco-workbench .workbench-hover a:active,.monaco-workbench .workbench-hover a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-workbench .workbench-hover code{background:var(--vscode-textCodeBlock-background)}.monaco-workbench .workbench-hover .hover-row .actions{background:var(--vscode-editorHoverWidget-statusBarBackground)}.monaco-workbench .workbench-hover.right-aligned{left:1px}.monaco-workbench .workbench-hover.right-aligned .hover-row.status-bar .actions{flex-direction:row-reverse}.monaco-workbench .workbench-hover.right-aligned .hover-row.status-bar .actions .action-container{margin-left:16px;margin-right:0}.monaco-editor .blockDecorations-container{pointer-events:none;position:absolute;top:0}.monaco-editor .blockDecorations-block{box-sizing:border-box;position:absolute}.monaco-editor .margin-view-overlays .current-line,.monaco-editor .view-overlays .current-line{box-sizing:border-box;display:block;height:100%;left:0;position:absolute;top:0}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{height:100%;position:absolute}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .glyph-margin-widgets .cgmr{align-items:center;display:flex;justify-content:center;position:absolute}.monaco-editor .glyph-margin-widgets .cgmr.codicon-modifier-spin:before{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.monaco-editor .lines-content .core-guide{box-sizing:border-box;height:100%;position:absolute}.monaco-editor .margin-view-overlays .line-numbers{bottom:0;box-sizing:border-box;cursor:default;display:inline-block;font-variant-numeric:tabular-nums;position:absolute;text-align:right;vertical-align:middle}.monaco-editor .relative-current-line-number{display:inline-block;text-align:left;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-editor .line-numbers{color:var(--vscode-editorLineNumber-foreground)}.monaco-editor .line-numbers.active-line-number{color:var(--vscode-editorLineNumber-activeForeground)}.mtkcontrol{background:#960000!important;color:#fff!important}.mtkoverflow{background-color:var(--vscode-button-background,var(--vscode-editor-background));border-color:var(--vscode-contrastBorder);border-radius:2px;border-style:solid;border-width:1px;color:var(--vscode-button-foreground,var(--vscode-editor-foreground));cursor:pointer;padding:4px}.mtkoverflow:hover{background-color:var(--vscode-button-hoverBackground)}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{user-select:none;-webkit-user-select:none}.monaco-editor.mac .lines-content:hover,.monaco-editor.mac .view-line:hover,.monaco-editor.mac .view-lines:hover{user-select:text;-webkit-user-select:text;-ms-user-select:text}.monaco-editor.enable-user-select{user-select:auto;-webkit-user-select:initial}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .lines-content>.view-lines>.view-line>span{bottom:0;position:absolute;top:0}.monaco-editor .mtkw,.monaco-editor .mtkz{color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .mtkz{display:inline-block}.monaco-editor .lines-decorations{background:#fff;position:absolute;top:0}.monaco-editor .margin-view-overlays .cldr{height:100%;position:absolute}.monaco-editor .margin{background-color:var(--vscode-editorGutter-background)}.monaco-editor .margin-view-overlays .cmdr{height:100%;left:0;position:absolute;width:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover .minimap-slider.active,.monaco-editor .minimap.slider-mouseover:hover .minimap-slider{opacity:1}.monaco-editor .minimap-slider .minimap-slider-horizontal{background:var(--vscode-minimapSlider-background)}.monaco-editor .minimap-slider:hover .minimap-slider-horizontal{background:var(--vscode-minimapSlider-hoverBackground)}.monaco-editor .minimap-slider.active .minimap-slider-horizontal{background:var(--vscode-minimapSlider-activeBackground)}.monaco-editor .minimap-shadow-visible{box-shadow:var(--vscode-scrollbar-shadow) -6px 0 6px -6px inset}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{left:-6px;position:absolute;width:6px}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{left:-1px;position:absolute;width:1px}.minimap.autohide{opacity:0;transition:opacity .5s}.minimap.autohide:hover{opacity:1}.monaco-editor .minimap{z-index:5}.monaco-editor .overlayWidgets{left:0;position:absolute;top:0}.monaco-editor .view-ruler{box-shadow:1px 0 0 0 var(--vscode-editorRuler-foreground) inset;position:absolute;top:0}.monaco-editor .scroll-decoration{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;height:6px;left:0;position:absolute;top:0}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .focused .selected-text{background-color:var(--vscode-editor-selectionBackground)}.monaco-editor .selected-text{background-color:var(--vscode-editor-inactiveSelectionBackground)}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor.hc-light .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-light .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-light .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-light .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{box-sizing:border-box;overflow:hidden;position:absolute}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{background:transparent!important;border-style:solid;border-width:1px}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{background:transparent!important;border-bottom-style:solid;border-bottom-width:2px}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{background:transparent!important;border-bottom-style:solid;border-bottom-width:1px}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}.monaco-editor .mwh{color:var(--vscode-editorWhitespace-foreground)!important;position:absolute}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{overflow:visible;position:relative;-webkit-text-size-adjust:100%;color:var(--vscode-editor-foreground);overflow-wrap:normal}.monaco-editor,.monaco-editor-background{background-color:var(--vscode-editor-background)}.monaco-editor .rangeHighlight{background-color:var(--vscode-editor-rangeHighlightBackground);border:1px solid var(--vscode-editor-rangeHighlightBorder);box-sizing:border-box}.monaco-editor.hc-black .rangeHighlight,.monaco-editor.hc-light .rangeHighlight{border-style:dotted}.monaco-editor .symbolHighlight{background-color:var(--vscode-editor-symbolHighlightBackground);border:1px solid var(--vscode-editor-symbolHighlightBorder);box-sizing:border-box}.monaco-editor.hc-black .symbolHighlight,.monaco-editor.hc-light .symbolHighlight{border-style:dotted}.monaco-editor .overflow-guard{overflow:hidden;position:relative}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .margin-view-overlays>div,.monaco-editor .view-overlays>div{position:absolute;width:100%}.monaco-editor .squiggly-error{border-bottom:4px double var(--vscode-editorError-border)}.monaco-editor .squiggly-error:before{background:var(--vscode-editorError-background);content:"";display:block;height:100%;width:100%}.monaco-editor .squiggly-warning{border-bottom:4px double var(--vscode-editorWarning-border)}.monaco-editor .squiggly-warning:before{background:var(--vscode-editorWarning-background);content:"";display:block;height:100%;width:100%}.monaco-editor .squiggly-info{border-bottom:4px double var(--vscode-editorInfo-border)}.monaco-editor .squiggly-info:before{background:var(--vscode-editorInfo-background);content:"";display:block;height:100%;width:100%}.monaco-editor .squiggly-hint{border-bottom:2px dotted var(--vscode-editorHint-border)}.monaco-editor.showUnused .squiggly-unnecessary{border-bottom:2px dashed var(--vscode-editorUnnecessaryCode-border)}.monaco-editor.showDeprecated .squiggly-inline-deprecated{text-decoration:line-through;text-decoration-color:var(--vscode-editor-foreground,inherit)}.monaco-component.diff-review{user-select:none;-webkit-user-select:none;z-index:99}.monaco-diff-editor .diff-review{position:absolute}.monaco-component.diff-review .diff-review-line-number{color:var(--vscode-editorLineNumber-foreground);display:inline-block;text-align:right}.monaco-component.diff-review .diff-review-summary{padding-left:10px}.monaco-component.diff-review .diff-review-shadow{box-shadow:var(--vscode-scrollbar-shadow) 0 -6px 6px -6px inset;position:absolute}.monaco-component.diff-review .diff-review-row{white-space:pre}.monaco-component.diff-review .diff-review-table{display:table;min-width:100%}.monaco-component.diff-review .diff-review-row{display:table-row;width:100%}.monaco-component.diff-review .diff-review-spacer{display:inline-block;vertical-align:middle;width:10px}.monaco-component.diff-review .diff-review-spacer>.codicon{font-size:9px!important}.monaco-component.diff-review .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px;z-index:100}.monaco-component.diff-review .diff-review-actions .action-label{height:16px;margin:2px 0;width:16px}.monaco-component.diff-review .revertButton{cursor:pointer}.monaco-editor .diff-hidden-lines-widget{width:100%}.monaco-editor .diff-hidden-lines{font-size:13px;height:0;line-height:14px;transform:translateY(-10px)}.monaco-editor .diff-hidden-lines .bottom.dragging,.monaco-editor .diff-hidden-lines .top.dragging,.monaco-editor .diff-hidden-lines:not(.dragging) .bottom:hover,.monaco-editor .diff-hidden-lines:not(.dragging) .top:hover{background-color:var(--vscode-focusBorder)}.monaco-editor .diff-hidden-lines .bottom,.monaco-editor .diff-hidden-lines .top{background-clip:padding-box;background-color:transparent;border-bottom:2px solid transparent;border-top:4px solid transparent;height:4px;transition:background-color .1s ease-out}.monaco-editor .diff-hidden-lines .bottom.canMoveTop:not(.canMoveBottom),.monaco-editor .diff-hidden-lines .top.canMoveTop:not(.canMoveBottom),.monaco-editor.draggingUnchangedRegion.canMoveTop:not(.canMoveBottom) *{cursor:n-resize!important}.monaco-editor .diff-hidden-lines .bottom:not(.canMoveTop).canMoveBottom,.monaco-editor .diff-hidden-lines .top:not(.canMoveTop).canMoveBottom,.monaco-editor.draggingUnchangedRegion:not(.canMoveTop).canMoveBottom *{cursor:s-resize!important}.monaco-editor .diff-hidden-lines .bottom.canMoveTop.canMoveBottom,.monaco-editor .diff-hidden-lines .top.canMoveTop.canMoveBottom,.monaco-editor.draggingUnchangedRegion.canMoveTop.canMoveBottom *{cursor:ns-resize!important}.monaco-editor .diff-hidden-lines .top{transform:translateY(4px)}.monaco-editor .diff-hidden-lines .bottom{transform:translateY(-6px)}.monaco-editor .diff-unchanged-lines{background:var(--vscode-diffEditor-unchangedCodeBackground)}.monaco-editor .noModificationsOverlay{align-items:center;background:var(--vscode-editor-background);display:flex;justify-content:center;z-index:1}.monaco-editor .diff-hidden-lines .center{background:var(--vscode-diffEditor-unchangedRegionBackground);box-shadow:inset 0 -5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow),inset 0 5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow);color:var(--vscode-diffEditor-unchangedRegionForeground);display:block;height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .diff-hidden-lines .center span.codicon{vertical-align:middle}.monaco-editor .diff-hidden-lines .center a:hover .codicon{color:var(--vscode-editorLink-activeForeground)!important;cursor:pointer}.monaco-editor .diff-hidden-lines div.breadcrumb-item{cursor:pointer}.monaco-editor .diff-hidden-lines div.breadcrumb-item:hover{color:var(--vscode-editorLink-activeForeground)}.monaco-editor .movedModified,.monaco-editor .movedOriginal{border:2px solid var(--vscode-diffEditor-move-border)}.monaco-editor .movedModified.currentMove,.monaco-editor .movedOriginal.currentMove{border:2px solid var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines path.currentMove{stroke:var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines path{pointer-events:visiblestroke}.monaco-diff-editor .moved-blocks-lines .arrow{fill:var(--vscode-diffEditor-move-border)}.monaco-diff-editor .moved-blocks-lines .arrow.currentMove{fill:var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines .arrow-rectangle{fill:var(--vscode-editor-background)}.monaco-diff-editor .moved-blocks-lines{pointer-events:none;position:absolute}.monaco-diff-editor .moved-blocks-lines path{fill:none;stroke:var(--vscode-diffEditor-move-border);stroke-width:2}.monaco-editor .char-delete.diff-range-empty{border-left:3px solid var(--vscode-diffEditor-removedTextBackground);margin-left:-1px}.monaco-editor .char-insert.diff-range-empty{border-left:3px solid var(--vscode-diffEditor-insertedTextBackground)}.monaco-editor .fold-unchanged{cursor:pointer}.monaco-diff-editor .diff-moved-code-block{display:flex;justify-content:flex-end;margin-top:-4px}.monaco-diff-editor .diff-moved-code-block .action-bar .action-label.codicon{font-size:12px;height:12px;width:12px}.monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:rgba(0,0,0,.03)}.monaco-diff-editor.vs-dark .diffOverview{background:hsla(0,0%,100%,.01)}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar{background:transparent}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-light .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:hsla(0,0%,67%,.4)}.modified-in-monaco-diff-editor.hc-black .slider.active,.modified-in-monaco-diff-editor.hc-light .slider.active{background:none}.monaco-diff-editor .delete-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-editor .insert-sign{align-items:center;display:flex!important;font-size:11px!important;opacity:.7!important}.monaco-diff-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-diff-editor.hc-light .delete-sign,.monaco-diff-editor.hc-light .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-editor.hc-black .insert-sign,.monaco-editor.hc-light .delete-sign,.monaco-editor.hc-light .insert-sign{opacity:1}.monaco-editor .inline-added-margin-view-zone,.monaco-editor .inline-deleted-margin-view-zone{text-align:right}.monaco-editor .arrow-revert-change{position:absolute;z-index:10}.monaco-editor .arrow-revert-change:hover{cursor:pointer}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}.monaco-diff-editor .char-insert,.monaco-editor .char-insert{background-color:var(--vscode-diffEditor-insertedTextBackground)}.monaco-diff-editor .line-insert,.monaco-editor .line-insert{background-color:var(--vscode-diffEditor-insertedLineBackground,var(--vscode-diffEditor-insertedTextBackground))}.monaco-editor .char-insert,.monaco-editor .line-insert{border:1px solid var(--vscode-diffEditor-insertedTextBorder);box-sizing:border-box}.monaco-editor.hc-black .char-insert,.monaco-editor.hc-black .line-insert,.monaco-editor.hc-light .char-insert,.monaco-editor.hc-light .line-insert{border-style:dashed}.monaco-editor .char-delete,.monaco-editor .line-delete{border:1px solid var(--vscode-diffEditor-removedTextBorder);box-sizing:border-box}.monaco-editor.hc-black .char-delete,.monaco-editor.hc-black .line-delete,.monaco-editor.hc-light .char-delete,.monaco-editor.hc-light .line-delete{border-style:dashed}.monaco-diff-editor .gutter-insert,.monaco-editor .gutter-insert,.monaco-editor .inline-added-margin-view-zone{background-color:var(--vscode-diffEditorGutter-insertedLineBackground,var(--vscode-diffEditor-insertedLineBackground),var(--vscode-diffEditor-insertedTextBackground))}.monaco-diff-editor .char-delete,.monaco-editor .char-delete,.monaco-editor .inline-deleted-text{background-color:var(--vscode-diffEditor-removedTextBackground)}.monaco-editor .inline-deleted-text{text-decoration:line-through}.monaco-diff-editor .line-delete,.monaco-editor .line-delete{background-color:var(--vscode-diffEditor-removedLineBackground,var(--vscode-diffEditor-removedTextBackground))}.monaco-diff-editor .gutter-delete,.monaco-editor .gutter-delete,.monaco-editor .inline-deleted-margin-view-zone{background-color:var(--vscode-diffEditorGutter-removedLineBackground,var(--vscode-diffEditor-removedLineBackground),var(--vscode-diffEditor-removedTextBackground))}.monaco-diff-editor.side-by-side .editor.modified{border-left:1px solid var(--vscode-diffEditor-border);box-shadow:-6px 0 5px -5px var(--vscode-scrollbar-shadow)}.monaco-diff-editor.side-by-side .editor.original{border-right:1px solid var(--vscode-diffEditor-border);box-shadow:6px 0 5px -5px var(--vscode-scrollbar-shadow)}.monaco-diff-editor .diffViewport{background:var(--vscode-scrollbarSlider-background)}.monaco-diff-editor .diffViewport:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-diff-editor .diffViewport:active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-editor .diagonal-fill{background-image:linear-gradient(-45deg,var(--vscode-diffEditor-diagonalFill) 12.5%,#0000 12.5%,#0000 50%,var(--vscode-diffEditor-diagonalFill) 50%,var(--vscode-diffEditor-diagonalFill) 62.5%,#0000 62.5%,#0000 100%);background-size:8px 8px}.monaco-diff-editor .gutter{flex-grow:0;flex-shrink:0;overflow:hidden;position:relative}.monaco-diff-editor .gutter>div{position:absolute}.monaco-diff-editor .gutter .gutterItem{opacity:0;transition:opacity .7s}.monaco-diff-editor .gutter .gutterItem.showAlways{opacity:1;transition:none}.monaco-diff-editor .gutter .gutterItem.noTransition{transition:none}.monaco-diff-editor .gutter:hover .gutterItem{opacity:1;transition:opacity .1s ease-in-out}.monaco-diff-editor .gutter .gutterItem .background{border-left:2px solid var(--vscode-menu-border);height:100%;left:50%;position:absolute;width:1px}.monaco-diff-editor .gutter .gutterItem .buttons{align-items:center;display:flex;justify-content:center;position:absolute;width:100%}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar{height:fit-content}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar .monaco-action-bar{line-height:1}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar .monaco-action-bar .actions-container{background:var(--vscode-editorGutter-commentRangeForeground);border-radius:4px;width:fit-content}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar .monaco-action-bar .actions-container .action-item:hover{background:var(--vscode-toolbar-hoverBackground)}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar .monaco-action-bar .actions-container .action-item .action-label{padding:1px 2px}.monaco-diff-editor .diff-hidden-lines-compact{display:flex;height:11px}.monaco-diff-editor .diff-hidden-lines-compact .line-left,.monaco-diff-editor .diff-hidden-lines-compact .line-right{border-top:1px solid;border-color:var(--vscode-editorCodeLens-foreground);height:1px;margin:auto;opacity:.5;width:100%}.monaco-diff-editor .diff-hidden-lines-compact .line-left{width:20px}.monaco-diff-editor .diff-hidden-lines-compact .text{color:var(--vscode-editorCodeLens-foreground);text-wrap:nowrap;font-size:11px;line-height:11px;margin:0 4px}.monaco-editor .rendered-markdown kbd{background-color:var(--vscode-keybindingLabel-background);border-color:var(--vscode-keybindingLabel-border);border-bottom-color:var(--vscode-keybindingLabel-bottomBorder);border-radius:3px;border-style:solid;border-width:1px;box-shadow:inset 0 -1px 0 var(--vscode-widget-shadow);color:var(--vscode-keybindingLabel-foreground);padding:1px 3px;vertical-align:middle}.rendered-markdown li:has(input[type=checkbox]){list-style-type:none}.monaco-component.multiDiffEditor{background:var(--vscode-multiDiffEditor-background);height:100%;overflow-y:hidden;position:relative;width:100%}.monaco-component.multiDiffEditor>div{height:100%;left:0;position:absolute;top:0;width:100%}.monaco-component.multiDiffEditor>div.placeholder{display:grid;place-content:center;place-items:center;visibility:hidden}.monaco-component.multiDiffEditor>div.placeholder.visible{visibility:visible}.monaco-component.multiDiffEditor .active{--vscode-multiDiffEditor-border:var(--vscode-focusBorder)}.monaco-component.multiDiffEditor .multiDiffEntry{display:flex;flex:1;flex-direction:column;overflow:hidden}.monaco-component.multiDiffEditor .multiDiffEntry .collapse-button{cursor:pointer;margin:0 5px}.monaco-component.multiDiffEditor .multiDiffEntry .collapse-button a{display:block}.monaco-component.multiDiffEditor .multiDiffEntry .header{background:var(--vscode-editor-background);z-index:1000}.monaco-component.multiDiffEditor .multiDiffEntry .header:not(.collapsed) .header-content{border-bottom:1px solid var(--vscode-sideBarSectionHeader-border)}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content{align-items:center;background:var(--vscode-multiDiffEditor-headerBackground);border-top:1px solid var(--vscode-multiDiffEditor-border);color:var(--vscode-foreground);display:flex;margin:8px 0 0;padding:4px 5px}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content.shadow{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .file-path{display:flex;flex:1;min-width:0}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .file-path .title{font-size:14px;line-height:22px}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .file-path .title.original{flex:1;min-width:0;text-overflow:ellipsis}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .file-path .status{font-weight:600;line-height:22px;margin:0 10px;opacity:.75}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .actions{padding:0 8px}.monaco-component.multiDiffEditor .multiDiffEntry .editorParent{border-bottom:1px solid var(--vscode-multiDiffEditor-border);display:flex;flex:1;flex-direction:column;overflow:hidden}.monaco-component.multiDiffEditor .multiDiffEntry .editorContainer{flex:1}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{background-color:var(--vscode-editorBracketMatch-background);border:1px solid var(--vscode-editorBracketMatch-border);box-sizing:border-box}.monaco-editor .lightBulbWidget{align-items:center;display:flex;justify-content:center}.monaco-editor .lightBulbWidget:hover{cursor:pointer}.monaco-editor .lightBulbWidget.codicon-light-bulb,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle{color:var(--vscode-editorLightBulb-foreground)}.monaco-editor .lightBulbWidget.codicon-lightbulb-autofix,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle-autofix{color:var(--vscode-editorLightBulbAutoFix-foreground,var(--vscode-editorLightBulb-foreground))}.monaco-editor .lightBulbWidget.codicon-sparkle-filled{color:var(--vscode-editorLightBulbAi-foreground,var(--vscode-icon-foreground))}.monaco-editor .lightBulbWidget:before{position:relative;z-index:2}.monaco-editor .lightBulbWidget:after{content:"";display:block;height:100%;left:0;opacity:.3;position:absolute;top:0;width:100%;z-index:1}.monaco-editor .glyph-margin-widgets .cgmr[class*=codicon-gutter-lightbulb]{cursor:pointer;display:block}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb,.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-sparkle{color:var(--vscode-editorLightBulb-foreground)}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-aifix-auto-fix,.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-auto-fix{color:var(--vscode-editorLightBulbAutoFix-foreground,var(--vscode-editorLightBulb-foreground))}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-sparkle-filled{color:var(--vscode-editorLightBulbAi-foreground,var(--vscode-icon-foreground))}.monaco-editor .codelens-decoration{color:var(--vscode-editorCodeLens-foreground);display:inline-block;font-family:var(--vscode-editorCodeLens-fontFamily),var(--vscode-editorCodeLens-fontFamilyDefault);font-feature-settings:var(--vscode-editorCodeLens-fontFeatureSettings);font-size:var(--vscode-editorCodeLens-fontSize);line-height:var(--vscode-editorCodeLens-lineHeight);overflow:hidden;padding-right:calc(var(--vscode-editorCodeLens-fontSize)*.5);text-overflow:ellipsis;white-space:nowrap}.monaco-editor .codelens-decoration>a,.monaco-editor .codelens-decoration>span{user-select:none;-webkit-user-select:none;vertical-align:sub;white-space:nowrap}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer}.monaco-editor .codelens-decoration>a:hover,.monaco-editor .codelens-decoration>a:hover .codicon{color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration .codicon{color:currentColor!important;color:var(--vscode-editorCodeLens-foreground);font-size:var(--vscode-editorCodeLens-fontSize);line-height:var(--vscode-editorCodeLens-lineHeight);vertical-align:middle}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}.monaco-editor .codelens-decoration.fadein{animation:fadein .1s linear}.colorpicker-widget{height:190px;user-select:none;-webkit-user-select:none}.colorpicker-color-decoration,.hc-light .colorpicker-color-decoration{border:.1em solid #000;box-sizing:border-box;cursor:pointer;display:inline-block;height:.8em;line-height:.8em;margin:.1em .2em 0;width:.8em}.hc-black .colorpicker-color-decoration,.vs-dark .colorpicker-color-decoration{border:.1em solid #eee}.colorpicker-header{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;display:flex;height:24px;image-rendering:pixelated;position:relative}.colorpicker-header .picked-color{align-items:center;color:#fff;cursor:pointer;display:flex;flex:1;justify-content:center;line-height:24px;overflow:hidden;white-space:nowrap;width:240px}.colorpicker-header .picked-color .picked-color-presentation{margin-left:5px;margin-right:5px;white-space:nowrap}.colorpicker-header .picked-color .codicon{color:inherit;font-size:14px}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{cursor:pointer;width:74px;z-index:inherit}.standalone-colorpicker{background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);color:var(--vscode-editorHoverWidget-foreground)}.colorpicker-header.standalone-colorpicker{border-bottom:none}.colorpicker-header .close-button{background-color:var(--vscode-editorHoverWidget-background);border-left:1px solid var(--vscode-editorHoverWidget-border);cursor:pointer}.colorpicker-header .close-button-inner-div{height:100%;text-align:center;width:100%}.colorpicker-header .close-button-inner-div:hover{background-color:var(--vscode-toolbar-hoverBackground)}.colorpicker-header .close-icon{padding:3px}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{flex:1;height:150px;min-width:220px;overflow:hidden;position:relative}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{border:1px solid #fff;border-radius:100%;box-shadow:0 0 2px rgba(0,0,0,.8);height:9px;margin:-5px 0 0 -5px;position:absolute;width:9px}.colorpicker-body .strip{height:150px;width:25px}.colorpicker-body .standalone-strip{height:122px;width:25px}.colorpicker-body .hue-strip{background:linear-gradient(180deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);cursor:grab;margin-left:8px;position:relative}.colorpicker-body .opacity-strip{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;cursor:grab;image-rendering:pixelated;margin-left:8px;position:relative}.colorpicker-body .strip.grabbing{cursor:grabbing}.colorpicker-body .slider{border:1px solid hsla(0,0%,100%,.71);box-shadow:0 0 1px rgba(0,0,0,.85);box-sizing:border-box;height:4px;left:-2px;position:absolute;top:0;width:calc(100% + 4px)}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}.colorpicker-body .standalone-strip .standalone-overlay{height:122px;pointer-events:none}.standalone-colorpicker-body{border:1px solid transparent;border-bottom:1px solid var(--vscode-editorHoverWidget-border);display:block;overflow:hidden}.colorpicker-body .insert-button{background:var(--vscode-button-background);border:none;border-radius:2px;bottom:8px;color:var(--vscode-button-foreground);cursor:pointer;height:20px;padding:0;position:absolute;right:8px;width:58px}.colorpicker-body .insert-button:hover{background:var(--vscode-button-hoverBackground)}.monaco-editor.hc-light .dnd-target,.monaco-editor.vs .dnd-target{border-right:2px dotted #000;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #aeafad;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.hc-black.mac.mouse-default .view-lines,.monaco-editor.hc-light.mac.mouse-default .view-lines,.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines{cursor:default}.monaco-editor.hc-black.mac.mouse-copy .view-lines,.monaco-editor.hc-light.mac.mouse-copy .view-lines,.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines{cursor:copy}.post-edit-widget{background-color:var(--vscode-editorWidget-background);border:1px solid var(--vscode-widget-border,transparent);border-radius:4px;box-shadow:0 0 8px 2px var(--vscode-widget-shadow);overflow:hidden}.post-edit-widget .monaco-button{border:none;border-radius:0;padding:2px}.post-edit-widget .monaco-button:hover{background-color:var(--vscode-button-secondaryHoverBackground)!important}.post-edit-widget .monaco-button .codicon{margin:0}.monaco-editor .findOptionsWidget{border:2px solid var(--vscode-contrastBorder)}.monaco-editor .find-widget,.monaco-editor .findOptionsWidget{background-color:var(--vscode-editorWidget-background);box-shadow:0 0 8px 2px var(--vscode-widget-shadow);color:var(--vscode-editorWidget-foreground)}.monaco-editor .find-widget{border-bottom:1px solid var(--vscode-widget-border);border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-left:1px solid var(--vscode-widget-border);border-right:1px solid var(--vscode-widget-border);box-sizing:border-box;height:33px;line-height:19px;overflow:hidden;padding:0 4px;position:absolute;transform:translateY(calc(-100% - 10px));transition:transform .2s linear;z-index:35}.monaco-workbench.reduce-motion .monaco-editor .find-widget{transition:transform 0ms linear}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-color:var(--vscode-focusBorder);outline-offset:-1px}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{display:flex;font-size:12px;margin:3px 25px 0 17px}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-bottom:2px;padding-top:2px}.monaco-editor .find-widget>.find-part .find-actions,.monaco-editor .find-widget>.replace-part .replace-actions{align-items:center;display:flex;height:25px}.monaco-editor .find-widget .monaco-findInput{display:flex;flex:1;vertical-align:middle}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{box-sizing:border-box;display:flex;flex:initial;height:25px;line-height:23px;margin:0 0 0 3px;padding:2px 0 0 2px;text-align:center;vertical-align:middle}.monaco-editor .find-widget .button{align-items:center;background-position:50%;background-repeat:no-repeat;border-radius:5px;cursor:pointer;display:flex;flex:initial;height:16px;justify-content:center;margin-left:3px;padding:3px;width:16px}.monaco-editor .find-widget .codicon-find-selection{border-radius:5px;height:22px;padding:3px;width:22px}.monaco-editor .find-widget .button.left{margin-left:0;margin-right:3px}.monaco-editor .find-widget .button.wide{padding:1px 6px;top:-1px;width:auto}.monaco-editor .find-widget .button.toggle{border-radius:0;box-sizing:border-box;height:100%;left:3px;position:absolute;top:0;width:18px}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{color:var(--vscode-disabledForeground);cursor:default}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{display:flex;flex:auto;flex-grow:0;flex-shrink:0;position:relative;vertical-align:middle}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;right:2px;top:3px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .find-widget.no-results .matchesCount{color:var(--vscode-errorForeground)}.monaco-editor .findMatch{animation-duration:0;animation-name:inherit!important;background-color:var(--vscode-editor-findMatchHighlightBackground)}.monaco-editor .currentFindMatch{background-color:var(--vscode-editor-findMatchBackground);border:2px solid var(--vscode-editor-findMatchBorder);box-sizing:border-box;padding:1px}.monaco-editor .findScope{background-color:var(--vscode-editor-findRangeHighlightBackground)}.monaco-editor .find-widget .monaco-sash{background-color:var(--vscode-editorWidget-resizeBorder,var(--vscode-editorWidget-border));left:0!important}.monaco-editor.hc-black .find-widget .button:before{left:2px;position:relative;top:1px}.monaco-editor .find-widget .button:not(.disabled):hover,.monaco-editor .find-widget .codicon-find-selection:hover{background-color:var(--vscode-toolbar-hoverBackground)!important}.monaco-editor.findMatch{background-color:var(--vscode-editor-findMatchHighlightBackground)}.monaco-editor.currentFindMatch{background-color:var(--vscode-editor-findMatchBackground)}.monaco-editor.findScope{background-color:var(--vscode-editor-findRangeHighlightBackground)}.monaco-editor.findMatch{background-color:var(--vscode-editorWidget-background)}.monaco-editor .find-widget>.button.codicon-widget-close{position:absolute;right:4px;top:5px}.monaco-editor .margin-view-overlays .codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,.monaco-editor .margin-view-overlays .codicon-folding-manual-expanded{align-items:center;cursor:pointer;display:flex;font-size:140%;justify-content:center;margin-left:2px;opacity:0;transition:opacity .5s}.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-collapsed,.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-expanded{transition:initial}.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon.codicon-folding-manual-collapsed,.monaco-editor .margin-view-overlays:hover .codicon{opacity:1}.monaco-editor .inline-folded:after{color:var(--vscode-editor-foldPlaceholderForeground);content:"\22EF";cursor:pointer;display:inline;line-height:1em;margin:.1em .2em 0}.monaco-editor .folded-background{background-color:var(--vscode-editor-foldBackground)}.monaco-editor .cldr.codicon.codicon-folding-collapsed,.monaco-editor .cldr.codicon.codicon-folding-expanded,.monaco-editor .cldr.codicon.codicon-folding-manual-collapsed,.monaco-editor .cldr.codicon.codicon-folding-manual-expanded{color:var(--vscode-editorGutter-foldingControlForeground)!important}.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;margin-right:4px;vertical-align:text-top}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{font-style:italic;opacity:.6}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{padding:8px 12px 0 20px;position:absolute;user-select:text;-webkit-user-select:text;white-space:pre}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{color:inherit;opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{border-bottom:1px solid transparent;color:var(--vscode-textLink-activeForeground);text-decoration:underline;text-underline-position:under}.monaco-editor .marker-widget .descriptioncontainer .filename{color:var(--vscode-textLink-activeForeground);cursor:pointer}.monaco-editor .goto-definition-link{color:var(--vscode-editorLink-activeForeground)!important;cursor:pointer;text-decoration:underline}.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-bottom-width:1px;border-top-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;padding:3em 0;text-align:center;width:100%}.monaco-editor .reference-zone-widget .ref-tree{background-color:var(--vscode-peekViewResult-background);color:var(--vscode-peekViewResult-lineForeground);line-height:23px}.monaco-editor .reference-zone-widget .ref-tree .reference{overflow:hidden;text-overflow:ellipsis}.monaco-editor .reference-zone-widget .ref-tree .reference-file{color:var(--vscode-peekViewResult-fileForeground);display:inline-flex;height:100%;width:100%}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows>.monaco-list-row.selected:not(.highlighted){background-color:var(--vscode-peekViewResult-selectionBackground);color:var(--vscode-peekViewResult-selectionForeground)!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-left:auto;margin-right:12px}.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight{background-color:var(--vscode-peekViewResult-matchHighlightBackground)}.monaco-editor .reference-zone-widget .preview .reference-decoration{background-color:var(--vscode-peekViewEditor-matchHighlightBackground);border:2px solid var(--vscode-peekViewEditor-matchHighlightBorder);box-sizing:border-box}.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input,.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background{background-color:var(--vscode-peekViewEditor-background)}.monaco-editor .reference-zone-widget .preview .monaco-editor .margin{background-color:var(--vscode-peekViewEditorGutter-background)}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file,.monaco-editor.hc-light .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-editor.hc-black .reference-zone-widget .ref-tree .referenceMatch .highlight,.monaco-editor.hc-light .reference-zone-widget .ref-tree .referenceMatch .highlight{border:1px dotted var(--vscode-contrastActiveBorder,transparent);box-sizing:border-box}.monaco-editor .hoverHighlight{background-color:var(--vscode-editor-hoverHighlightBackground)}.monaco-editor .monaco-hover-content{box-sizing:border-box;padding-bottom:2px;padding-right:2px}.monaco-editor .monaco-hover{background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);border-radius:3px;color:var(--vscode-editorHoverWidget-foreground)}.monaco-editor .monaco-hover a{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-hover a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .monaco-hover .hover-row{display:flex}.monaco-editor .monaco-hover .hover-row .hover-row-contents{display:flex;flex-direction:column;min-width:0}.monaco-editor .monaco-hover .hover-row .verbosity-actions{border-right:1px solid var(--vscode-editorHoverWidget-border);display:flex;flex-direction:column;justify-content:end;padding-left:5px;padding-right:5px}.monaco-editor .monaco-hover .hover-row .verbosity-actions .codicon{cursor:pointer;font-size:11px}.monaco-editor .monaco-hover .hover-row .verbosity-actions .codicon.enabled{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-hover .hover-row .verbosity-actions .codicon.disabled{opacity:.6}.monaco-editor .monaco-hover .hover-row .actions{background-color:var(--vscode-editorHoverWidget-statusBarBackground)}.monaco-editor .monaco-hover code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor.vs .valueSetReplacement{outline:solid 2px var(--vscode-editorBracketMatch-border)}.monaco-editor .suggest-preview-additional-widget{white-space:nowrap}.monaco-editor .suggest-preview-additional-widget .content-spacer{color:transparent;white-space:pre}.monaco-editor .suggest-preview-additional-widget .button{cursor:pointer;display:inline-block;text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-hidden{font-size:0;opacity:0}.monaco-editor .ghost-text-decoration,.monaco-editor .suggest-preview-text .ghost-text{font-style:italic}.monaco-editor .ghost-text-decoration,.monaco-editor .ghost-text-decoration-preview,.monaco-editor .suggest-preview-text .ghost-text{background-color:var(--vscode-editorGhostText-background);border:1px solid var(--vscode-editorGhostText-border);color:var(--vscode-editorGhostText-foreground)!important}.monaco-editor .inlineSuggestionsHints.withBorder{background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);color:var(--vscode-editorHoverWidget-foreground);z-index:39}.monaco-editor .inlineSuggestionsHints a,.monaco-editor .inlineSuggestionsHints a:hover{color:var(--vscode-foreground)}.monaco-editor .inlineSuggestionsHints .keybinding{display:flex;margin-left:4px;opacity:.6}.monaco-editor .inlineSuggestionsHints .keybinding .monaco-keybinding-key{font-size:8px;padding:2px 3px}.monaco-editor .inlineSuggestionsHints .availableSuggestionCount a{display:flex;justify-content:center;min-width:19px}.monaco-editor .inlineSuggestionStatusBarItemLabel{margin-right:2px}.monaco-editor .inline-edit-remove{background-color:var(--vscode-editorGhostText-background);font-style:italic}.monaco-editor .inline-edit-hidden{font-size:0;opacity:0}.monaco-editor .inline-edit-decoration,.monaco-editor .suggest-preview-text .inline-edit{font-style:italic}.monaco-editor .inline-completion-text-to-replace{text-decoration:underline;text-underline-position:under}.monaco-editor .inline-edit-decoration,.monaco-editor .inline-edit-decoration-preview,.monaco-editor .suggest-preview-text .inline-edit{background-color:var(--vscode-editorGhostText-background);border:1px solid var(--vscode-editorGhostText-border);color:var(--vscode-editorGhostText-foreground)!important}.monaco-editor .inlineEditHints.withBorder{background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);color:var(--vscode-editorHoverWidget-foreground);z-index:39}.monaco-editor .inlineEditHints a,.monaco-editor .inlineEditHints a:hover{color:var(--vscode-foreground)}.monaco-editor .inlineEditHints .keybinding{display:flex;margin-left:4px;opacity:.6}.monaco-editor .inlineEditHints .keybinding .monaco-keybinding-key{font-size:8px;padding:2px 3px}.monaco-editor .inlineEditStatusBarItemLabel{margin-right:2px}.monaco-editor .inlineEditSideBySide{background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);color:var(--vscode-editorHoverWidget-foreground);white-space:pre;z-index:39}.monaco-editor div.inline-edits-widget{--widget-color:var(--vscode-notifications-background)}.monaco-editor div.inline-edits-widget .promptEditor .monaco-editor{--vscode-editor-placeholder-foreground:var(--vscode-editorGhostText-foreground)}.monaco-editor div.inline-edits-widget .promptEditor,.monaco-editor div.inline-edits-widget .toolbar{opacity:0;transition:opacity .2s ease-in-out}.monaco-editor div.inline-edits-widget.focused .promptEditor,.monaco-editor div.inline-edits-widget.focused .toolbar,.monaco-editor div.inline-edits-widget:hover .promptEditor,.monaco-editor div.inline-edits-widget:hover .toolbar{opacity:1}.monaco-editor div.inline-edits-widget .preview .monaco-editor{--vscode-editor-background:var(--widget-color)}.monaco-editor div.inline-edits-widget .preview .monaco-editor .mtk1{color:var(--vscode-editorGhostText-foreground)}.monaco-editor div.inline-edits-widget .preview .monaco-editor .current-line-margin,.monaco-editor div.inline-edits-widget .preview .monaco-editor .view-overlays .current-line-exact{border:none}.monaco-editor div.inline-edits-widget svg .gradient-start{stop-color:var(--vscode-editor-background)}.monaco-editor div.inline-edits-widget svg .gradient-stop{stop-color:var(--widget-color)}.inline-editor-progress-decoration{display:inline-block;height:1em;width:1em}.inline-progress-widget{align-items:center;display:flex!important;justify-content:center}.inline-progress-widget .icon{font-size:80%!important}.inline-progress-widget:hover .icon{animation:none;font-size:90%!important}.inline-progress-widget:hover .icon:before{content:var(--vscode-icon-x-content);font-family:var(--vscode-icon-x-font-family)}.monaco-editor .linked-editing-decoration{background-color:var(--vscode-editor-linkedEditingBackground);min-width:1px}.monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{color:var(--vscode-editorLink-activeForeground)!important;cursor:pointer}.monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{animation:fadeIn .15s ease-out}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-inputValidation-infoBorder);border-radius:3px;color:var(--vscode-editorHoverWidget-foreground);padding:2px 4px}.monaco-editor .monaco-editor-overlaymessage .message p{margin-block:0}.monaco-editor .monaco-editor-overlaymessage .message a{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-editor-overlaymessage .message a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor.hc-black .monaco-editor-overlaymessage .message,.monaco-editor.hc-light .monaco-editor-overlaymessage .message{border-width:2px}.monaco-editor .monaco-editor-overlaymessage .anchor{border:8px solid transparent;height:0!important;left:2px;position:absolute;width:0!important;z-index:1000}.monaco-editor .monaco-editor-overlaymessage .anchor.top{border-bottom-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage .anchor.below{border-top-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage.below .anchor.below,.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.monaco-editor .parameter-hints-widget{background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);color:var(--vscode-editorHoverWidget-foreground);cursor:default;display:flex;flex-direction:column;line-height:1.5em;z-index:39}.hc-black .monaco-editor .parameter-hints-widget,.hc-light .monaco-editor .parameter-hints-widget{border-width:2px}.monaco-editor .parameter-hints-widget>.phwrapper{display:flex;flex-direction:row;max-width:440px}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.multiple .body:before{border-left:1px solid var(--vscode-editorHoverWidget-border);content:"";display:block;height:100%;opacity:.5;position:absolute}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .body,.monaco-editor .parameter-hints-widget .monaco-scrollable-element{display:flex;flex:1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px;position:relative}.monaco-editor .parameter-hints-widget .signature.has-docs:after{border-bottom:1px solid var(--vscode-editorHoverWidget-border);content:"";display:block;left:0;opacity:.5;padding-top:4px;position:absolute;width:100%}.monaco-editor .parameter-hints-widget .code{font-family:var(--vscode-parameterHintsWidget-editorFontFamily),var(--vscode-parameterHintsWidget-editorFontFamilyDefault)}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs a{color:var(--vscode-textLink-foreground)}.monaco-editor .parameter-hints-widget .docs a:hover{color:var(--vscode-textLink-activeForeground);cursor:pointer}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:normal}.monaco-editor .parameter-hints-widget .docs code{background-color:var(--vscode-textCodeBlock-background);border-radius:3px;font-family:var(--monaco-monospace-font);padding:0 .4em}.monaco-editor .parameter-hints-widget .docs .code,.monaco-editor .parameter-hints-widget .docs .monaco-tokenized-source{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .controls{align-items:center;display:none;flex-direction:column;justify-content:flex-end;min-width:22px}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{background-repeat:no-repeat;cursor:pointer;height:16px;width:16px}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{font-family:var(--monaco-monospace-font);height:12px;line-height:12px;text-align:center}.monaco-editor .parameter-hints-widget .signature .parameter.active{color:var(--vscode-editorHoverWidget-highlightForeground);font-weight:700}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex;flex-wrap:nowrap;justify-content:space-between}.monaco-editor .peekview-widget .head .peekview-title{align-items:baseline;display:flex;font-size:13px;margin-left:20px;min-width:0;overflow:hidden;text-overflow:ellipsis}.monaco-editor .peekview-widget .head .peekview-title.clickable{cursor:pointer}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em}.monaco-editor .peekview-widget .head .peekview-title .dirname,.monaco-editor .peekview-widget .head .peekview-title .filename,.monaco-editor .peekview-widget .head .peekview-title .meta{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1;padding-right:2px;text-align:right}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{align-self:center;margin-right:4px}.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon{color:inherit!important}.monaco-editor{--vscode-editor-placeholder-foreground:var(--vscode-editorGhostText-foreground)}.monaco-editor .editorPlaceholder{overflow:hidden;position:absolute;text-overflow:ellipsis;top:0;text-wrap:nowrap;color:var(--vscode-editor-placeholder-foreground);pointer-events:none}.monaco-editor .rename-box{border-radius:4px;color:inherit;z-index:100}.monaco-editor .rename-box.preview{padding:4px 4px 0}.monaco-editor .rename-box .rename-input-with-button{border-radius:2px;padding:3px;width:calc(100% - 8px)}.monaco-editor .rename-box .rename-input{padding:0;width:calc(100% - 8px)}.monaco-editor .rename-box .rename-input:focus{outline:none}.monaco-editor .rename-box .rename-suggestions-button{align-items:center;background-color:transparent;border:none;border-radius:5px;cursor:pointer;display:flex;padding:3px}.monaco-editor .rename-box .rename-suggestions-button:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-editor .rename-box .rename-candidate-list-container .monaco-list-row{border-radius:2px}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}.monaco-editor .snippet-placeholder{background-color:var(--vscode-editor-snippetTabstopHighlightBackground,transparent);min-width:2px;outline-color:var(--vscode-editor-snippetTabstopHighlightBorder,transparent);outline-style:solid;outline-width:1px}.monaco-editor .finish-snippet-placeholder{background-color:var(--vscode-editor-snippetFinalTabstopHighlightBackground,transparent);outline-color:var(--vscode-editor-snippetFinalTabstopHighlightBorder,transparent);outline-style:solid;outline-width:1px}.monaco-editor .sticky-widget{overflow:hidden}.monaco-editor .sticky-widget-line-numbers{background-color:inherit;float:left}.monaco-editor .sticky-widget-lines-scrollable{background-color:inherit;display:inline-block;overflow:hidden;position:absolute;width:var(--vscode-editorStickyScroll-scrollableWidth)}.monaco-editor .sticky-widget-lines{background-color:inherit;position:absolute}.monaco-editor .sticky-line-content,.monaco-editor .sticky-line-number{background-color:inherit;color:var(--vscode-editorLineNumber-foreground);display:inline-block;position:absolute;white-space:nowrap}.monaco-editor .sticky-line-number .codicon-folding-collapsed,.monaco-editor .sticky-line-number .codicon-folding-expanded{float:right;transition:var(--vscode-editorStickyScroll-foldingOpacityTransition)}.monaco-editor .sticky-line-content{background-color:inherit;white-space:nowrap;width:var(--vscode-editorStickyScroll-scrollableWidth)}.monaco-editor .sticky-line-number-inner{display:inline-block;text-align:right}.monaco-editor .sticky-widget{border-bottom:1px solid var(--vscode-editorStickyScroll-border)}.monaco-editor .sticky-line-content:hover{background-color:var(--vscode-editorStickyScrollHover-background);cursor:pointer}.monaco-editor .sticky-widget{background-color:var(--vscode-editorStickyScroll-background);box-shadow:var(--vscode-editorStickyScroll-shadow) 0 4px 2px -2px;right:auto!important;width:100%;z-index:4}.monaco-editor .sticky-widget.peek{background-color:var(--vscode-peekViewEditorStickyScroll-background)}.monaco-editor .suggest-widget{border-radius:3px;display:flex;flex-direction:column;width:430px;z-index:40}.monaco-editor .suggest-widget.message{align-items:center;flex-direction:row}.monaco-editor .suggest-details,.monaco-editor .suggest-widget{background-color:var(--vscode-editorSuggestWidget-background);border-color:var(--vscode-editorSuggestWidget-border);border-style:solid;border-width:1px;flex:0 1 auto;width:100%}.monaco-editor.hc-black .suggest-details,.monaco-editor.hc-black .suggest-widget,.monaco-editor.hc-light .suggest-details,.monaco-editor.hc-light .suggest-widget{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{border-top:1px solid var(--vscode-editorSuggestWidget-border);box-sizing:border-box;display:none;flex-flow:row nowrap;font-size:80%;justify-content:space-between;overflow:hidden;padding:0 4px;width:100%}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{color:var(--vscode-editorSuggestWidgetStatus-foreground)}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{user-select:none;-webkit-user-select:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{background-position:2px 2px;background-repeat:no-repeat;-mox-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:flex;padding-right:10px;touch-action:none;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused{color:var(--vscode-editorSuggestWidget-selectedForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon{color:var(--vscode-editorSuggestWidget-selectedIconForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;justify-content:space-between;overflow:hidden;text-overflow:ellipsis;white-space:pre}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.focused)>.contents>.main .monaco-icon-label{color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-highlightForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-focusHighlightForeground)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;cursor:pointer;font-size:14px;opacity:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;right:2px;top:6px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{opacity:.7}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{opacity:.6;overflow:hidden;text-overflow:ellipsis}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{align-self:center;font-size:85%;line-height:normal;margin-left:12px;opacity:.4;overflow:hidden;text-overflow:ellipsis}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{font-size:85%;margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-grow:1;flex-shrink:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{flex-shrink:4;max-width:70%;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;height:18px;position:absolute;right:10px;visibility:hidden;width:18px}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{background-position:50%;background-repeat:no-repeat;background-size:80%;display:block;height:16px;margin-left:2px;width:16px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{align-items:center;display:flex;margin-right:4px}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{border:.1em solid #000;display:inline-block;height:.7em;margin:0 0 0 .3em;width:.7em}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{color:var(--vscode-editorSuggestWidget-foreground);cursor:default;display:flex;flex-direction:column}.monaco-editor .suggest-details.focused{border-color:var(--vscode-focusBorder)}.monaco-editor .suggest-details a{color:var(--vscode-textLink-foreground)}.monaco-editor .suggest-details a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .suggest-details code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2;margin:0 24px 0 0;opacity:.7;overflow:hidden;padding:4px 0 12px 5px;text-overflow:ellipsis;white-space:pre}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px;overflow:hidden}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{min-height:calc(1rem + 8px);padding:0;white-space:normal}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .monaco-tokenized-source{white-space:pre}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{white-space:pre-wrap;word-wrap:break-word}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ol,.monaco-editor .suggest-details ul{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}.monaco-editor .codicon.codicon-symbol-array,.monaco-workbench .codicon.codicon-symbol-array{color:var(--vscode-symbolIcon-arrayForeground)}.monaco-editor .codicon.codicon-symbol-boolean,.monaco-workbench .codicon.codicon-symbol-boolean{color:var(--vscode-symbolIcon-booleanForeground)}.monaco-editor .codicon.codicon-symbol-class,.monaco-workbench .codicon.codicon-symbol-class{color:var(--vscode-symbolIcon-classForeground)}.monaco-editor .codicon.codicon-symbol-method,.monaco-workbench .codicon.codicon-symbol-method{color:var(--vscode-symbolIcon-methodForeground)}.monaco-editor .codicon.codicon-symbol-color,.monaco-workbench .codicon.codicon-symbol-color{color:var(--vscode-symbolIcon-colorForeground)}.monaco-editor .codicon.codicon-symbol-constant,.monaco-workbench .codicon.codicon-symbol-constant{color:var(--vscode-symbolIcon-constantForeground)}.monaco-editor .codicon.codicon-symbol-constructor,.monaco-workbench .codicon.codicon-symbol-constructor{color:var(--vscode-symbolIcon-constructorForeground)}.monaco-editor .codicon.codicon-symbol-enum,.monaco-editor .codicon.codicon-symbol-value,.monaco-workbench .codicon.codicon-symbol-enum,.monaco-workbench .codicon.codicon-symbol-value{color:var(--vscode-symbolIcon-enumeratorForeground)}.monaco-editor .codicon.codicon-symbol-enum-member,.monaco-workbench .codicon.codicon-symbol-enum-member{color:var(--vscode-symbolIcon-enumeratorMemberForeground)}.monaco-editor .codicon.codicon-symbol-event,.monaco-workbench .codicon.codicon-symbol-event{color:var(--vscode-symbolIcon-eventForeground)}.monaco-editor .codicon.codicon-symbol-field,.monaco-workbench .codicon.codicon-symbol-field{color:var(--vscode-symbolIcon-fieldForeground)}.monaco-editor .codicon.codicon-symbol-file,.monaco-workbench .codicon.codicon-symbol-file{color:var(--vscode-symbolIcon-fileForeground)}.monaco-editor .codicon.codicon-symbol-folder,.monaco-workbench .codicon.codicon-symbol-folder{color:var(--vscode-symbolIcon-folderForeground)}.monaco-editor .codicon.codicon-symbol-function,.monaco-workbench .codicon.codicon-symbol-function{color:var(--vscode-symbolIcon-functionForeground)}.monaco-editor .codicon.codicon-symbol-interface,.monaco-workbench .codicon.codicon-symbol-interface{color:var(--vscode-symbolIcon-interfaceForeground)}.monaco-editor .codicon.codicon-symbol-key,.monaco-workbench .codicon.codicon-symbol-key{color:var(--vscode-symbolIcon-keyForeground)}.monaco-editor .codicon.codicon-symbol-keyword,.monaco-workbench .codicon.codicon-symbol-keyword{color:var(--vscode-symbolIcon-keywordForeground)}.monaco-editor .codicon.codicon-symbol-module,.monaco-workbench .codicon.codicon-symbol-module{color:var(--vscode-symbolIcon-moduleForeground)}.monaco-editor .codicon.codicon-symbol-namespace,.monaco-workbench .codicon.codicon-symbol-namespace{color:var(--vscode-symbolIcon-namespaceForeground)}.monaco-editor .codicon.codicon-symbol-null,.monaco-workbench .codicon.codicon-symbol-null{color:var(--vscode-symbolIcon-nullForeground)}.monaco-editor .codicon.codicon-symbol-number,.monaco-workbench .codicon.codicon-symbol-number{color:var(--vscode-symbolIcon-numberForeground)}.monaco-editor .codicon.codicon-symbol-object,.monaco-workbench .codicon.codicon-symbol-object{color:var(--vscode-symbolIcon-objectForeground)}.monaco-editor .codicon.codicon-symbol-operator,.monaco-workbench .codicon.codicon-symbol-operator{color:var(--vscode-symbolIcon-operatorForeground)}.monaco-editor .codicon.codicon-symbol-package,.monaco-workbench .codicon.codicon-symbol-package{color:var(--vscode-symbolIcon-packageForeground)}.monaco-editor .codicon.codicon-symbol-property,.monaco-workbench .codicon.codicon-symbol-property{color:var(--vscode-symbolIcon-propertyForeground)}.monaco-editor .codicon.codicon-symbol-reference,.monaco-workbench .codicon.codicon-symbol-reference{color:var(--vscode-symbolIcon-referenceForeground)}.monaco-editor .codicon.codicon-symbol-snippet,.monaco-workbench .codicon.codicon-symbol-snippet{color:var(--vscode-symbolIcon-snippetForeground)}.monaco-editor .codicon.codicon-symbol-string,.monaco-workbench .codicon.codicon-symbol-string{color:var(--vscode-symbolIcon-stringForeground)}.monaco-editor .codicon.codicon-symbol-struct,.monaco-workbench .codicon.codicon-symbol-struct{color:var(--vscode-symbolIcon-structForeground)}.monaco-editor .codicon.codicon-symbol-text,.monaco-workbench .codicon.codicon-symbol-text{color:var(--vscode-symbolIcon-textForeground)}.monaco-editor .codicon.codicon-symbol-type-parameter,.monaco-workbench .codicon.codicon-symbol-type-parameter{color:var(--vscode-symbolIcon-typeParameterForeground)}.monaco-editor .codicon.codicon-symbol-unit,.monaco-workbench .codicon.codicon-symbol-unit{color:var(--vscode-symbolIcon-unitForeground)}.monaco-editor .codicon.codicon-symbol-variable,.monaco-workbench .codicon.codicon-symbol-variable{color:var(--vscode-symbolIcon-variableForeground)}.editor-banner{background:var(--vscode-banner-background);box-sizing:border-box;cursor:default;display:flex;font-size:12px;height:26px;overflow:visible;width:100%}.editor-banner .icon-container{align-items:center;display:flex;flex-shrink:0;padding:0 6px 0 10px}.editor-banner .icon-container.custom-icon{background-position:50%;background-repeat:no-repeat;background-size:16px;margin:0 6px 0 10px;padding:0;width:16px}.editor-banner .message-container{align-items:center;display:flex;line-height:26px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editor-banner .message-container p{margin-block-end:0;margin-block-start:0}.editor-banner .message-actions-container{flex-grow:1;flex-shrink:0;line-height:26px;margin:0 4px}.editor-banner .message-actions-container a.monaco-button{margin:2px 8px;padding:0 12px;width:inherit}.editor-banner .message-actions-container a{margin-left:12px;padding:3px;text-decoration:underline}.editor-banner .action-container{padding:0 10px 0 6px}.editor-banner{background-color:var(--vscode-banner-background)}.editor-banner,.editor-banner .action-container .codicon,.editor-banner .message-actions-container .monaco-link{color:var(--vscode-banner-foreground)}.editor-banner .icon-container .codicon{color:var(--vscode-banner-iconForeground)}.monaco-editor .unicode-highlight{background-color:var(--vscode-editorUnicodeHighlight-background);border:1px solid var(--vscode-editorUnicodeHighlight-border);box-sizing:border-box}.monaco-editor .focused .selectionHighlight{background-color:var(--vscode-editor-selectionHighlightBackground);border:1px solid var(--vscode-editor-selectionHighlightBorder);box-sizing:border-box}.monaco-editor.hc-black .focused .selectionHighlight,.monaco-editor.hc-light .focused .selectionHighlight{border-style:dotted}.monaco-editor .wordHighlight{background-color:var(--vscode-editor-wordHighlightBackground);border:1px solid var(--vscode-editor-wordHighlightBorder);box-sizing:border-box}.monaco-editor.hc-black .wordHighlight,.monaco-editor.hc-light .wordHighlight{border-style:dotted}.monaco-editor .wordHighlightStrong{background-color:var(--vscode-editor-wordHighlightStrongBackground);border:1px solid var(--vscode-editor-wordHighlightStrongBorder);box-sizing:border-box}.monaco-editor.hc-black .wordHighlightStrong,.monaco-editor.hc-light .wordHighlightStrong{border-style:dotted}.monaco-editor .wordHighlightText{background-color:var(--vscode-editor-wordHighlightTextBackground);border:1px solid var(--vscode-editor-wordHighlightTextBorder);box-sizing:border-box}.monaco-editor.hc-black .wordHighlightText,.monaco-editor.hc-light .wordHighlightText{border-style:dotted}.monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-bottom-style:solid;border-bottom-width:0;border-top-style:solid;border-top-width:0;position:relative}.monaco-editor .iPadShowKeyboard{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MyIgaGVpZ2h0PSIzNiIgZmlsbD0ibm9uZSI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsPSIjNDI0MjQyIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OC4wMzYgNC4wMUg0LjAwOFYzMi4wM2g0NC4wMjh6TTQuMDA4LjAwOEE0LjAwMyA0LjAwMyAwIDAgMCAuMDA1IDQuMDFWMzIuMDNhNC4wMDMgNC4wMDMgMCAwIDAgNC4wMDMgNC4wMDJoNDQuMDI4YTQuMDAzIDQuMDAzIDAgMCAwIDQuMDAzLTQuMDAyVjQuMDFBNC4wMDMgNC4wMDMgMCAwIDAgNDguMDM2LjAwOHpNOC4wMSA4LjAxM2g0LjAwM3Y0LjAwM0g4LjAxem0xMi4wMDggMGgtNC4wMDJ2NC4wMDNoNC4wMDJ6bTQuMDAzIDBoNC4wMDJ2NC4wMDNoLTQuMDAyem0xMi4wMDggMGgtNC4wMDN2NC4wMDNoNC4wMDN6bTQuMDAyIDBoNC4wMDN2NC4wMDNINDAuMDN6bS0yNC4wMTUgOC4wMDVIOC4wMXY0LjAwM2g4LjAwNnptNC4wMDIgMGg0LjAwM3Y0LjAwM2gtNC4wMDN6bTEyLjAwOCAwaC00LjAwM3Y0LjAwM2g0LjAwM3ptMTIuMDA4IDB2NC4wMDNoLTguMDA1di00LjAwM3ptLTMyLjAyMSA4LjAwNUg4LjAxdjQuMDAzaDQuMDAzem00LjAwMyAwaDIwLjAxM3Y0LjAwM0gxNi4wMTZ6bTI4LjAxOCAwSDQwLjAzdjQuMDAzaDQuMDAzeiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9nPjxkZWZzPjxjbGlwUGF0aCBpZD0iYSI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTAgMGg1M3YzNkgweiIvPjwvY2xpcFBhdGg+PC9kZWZzPjwvc3ZnPg==) 50% no-repeat;border:4px solid #f6f6f6;border-radius:4px;height:36px;margin:0;min-height:0;min-width:0;overflow:hidden;padding:0;position:absolute;resize:none;width:58px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MyIgaGVpZ2h0PSIzNiIgZmlsbD0ibm9uZSI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsPSIjQzVDNUM1IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OC4wMzYgNC4wMUg0LjAwOFYzMi4wM2g0NC4wMjh6TTQuMDA4LjAwOEE0LjAwMyA0LjAwMyAwIDAgMCAuMDA1IDQuMDFWMzIuMDNhNC4wMDMgNC4wMDMgMCAwIDAgNC4wMDMgNC4wMDJoNDQuMDI4YTQuMDAzIDQuMDAzIDAgMCAwIDQuMDAzLTQuMDAyVjQuMDFBNC4wMDMgNC4wMDMgMCAwIDAgNDguMDM2LjAwOHpNOC4wMSA4LjAxM2g0LjAwM3Y0LjAwM0g4LjAxem0xMi4wMDggMGgtNC4wMDJ2NC4wMDNoNC4wMDJ6bTQuMDAzIDBoNC4wMDJ2NC4wMDNoLTQuMDAyem0xMi4wMDggMGgtNC4wMDN2NC4wMDNoNC4wMDN6bTQuMDAyIDBoNC4wMDN2NC4wMDNINDAuMDN6bS0yNC4wMTUgOC4wMDVIOC4wMXY0LjAwM2g4LjAwNnptNC4wMDIgMGg0LjAwM3Y0LjAwM2gtNC4wMDN6bTEyLjAwOCAwaC00LjAwM3Y0LjAwM2g0LjAwM3ptMTIuMDA4IDB2NC4wMDNoLTguMDA1di00LjAwM3ptLTMyLjAyMSA4LjAwNUg4LjAxdjQuMDAzaDQuMDAzem00LjAwMyAwaDIwLjAxM3Y0LjAwM0gxNi4wMTZ6bTI4LjAxOCAwSDQwLjAzdjQuMDAzaDQuMDAzeiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9nPjxkZWZzPjxjbGlwUGF0aCBpZD0iYSI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTAgMGg1M3YzNkgweiIvPjwvY2xpcFBhdGg+PC9kZWZzPjwvc3ZnPg==) 50% no-repeat;border:4px solid #252526}.monaco-editor .tokens-inspect-widget{background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);color:var(--vscode-editorHoverWidget-foreground);padding:10px;user-select:text;-webkit-user-select:text;z-index:50}.monaco-editor.hc-black .tokens-inspect-widget,.monaco-editor.hc-light .tokens-inspect-widget{border-width:2px}.monaco-editor .tokens-inspect-widget .tokens-inspect-separator{background-color:var(--vscode-editorHoverWidget-border);border:0;height:1px}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{float:right;font-size:60%;font-weight:400}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)}.quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.hc-light .quick-input-widget .monaco-highlighted-label .highlight{color:#0f4a85}.monaco-keybinding>.monaco-keybinding-key{background-color:hsla(0,0%,87%,.4);border:1px solid hsla(0,0%,80%,.4);border-bottom-color:hsla(0,0%,73%,.4);box-shadow:inset 0 -1px 0 hsla(0,0%,73%,.4);color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:1px solid #6fc3df;box-shadow:none;color:#fff}.hc-light .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:1px solid #0f4a85;box-shadow:none;color:#292929}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:hsla(0,0%,50%,.17);border:1px solid rgba(51,51,51,.6);border-bottom-color:rgba(68,68,68,.6);box-shadow:inset 0 -1px 0 rgba(68,68,68,.6);color:#ccc}.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif;--monaco-monospace-font:"SF Mono",Monaco,Menlo,Consolas,"Ubuntu Mono","Liberation Mono","DejaVu Sans Mono","Courier New",monospace}.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-light .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;top:0;width:1px;clip:rect(1px,1px,1px,1px);clip-path:inset(50%)}.monaco-diff-editor .synthetic-focus,.monaco-diff-editor [tabindex="-1"]:focus,.monaco-diff-editor [tabindex="0"]:focus,.monaco-diff-editor button:focus,.monaco-diff-editor input[type=button]:focus,.monaco-diff-editor input[type=checkbox]:focus,.monaco-diff-editor input[type=search]:focus,.monaco-diff-editor input[type=text]:focus,.monaco-diff-editor select:focus,.monaco-diff-editor textarea:focus,.monaco-editor{opacity:1;outline-color:var(--vscode-focusBorder);outline-offset:-1px;outline-style:solid;outline-width:1px}.action-widget{background-color:var(--vscode-editorWidget-background);border:1px solid var(--vscode-editorWidget-border)!important;border-radius:0;border-radius:2px;color:var(--vscode-editorWidget-foreground);display:block;font-size:13px;max-width:80vw;min-width:160px;width:100%;z-index:40}.context-view-block{z-index:-1}.context-view-block,.context-view-pointerBlock{cursor:auto;height:100%;left:0;position:fixed;top:0;width:100%}.context-view-pointerBlock{z-index:2}.action-widget .monaco-list{border:0!important;user-select:none;-webkit-user-select:none}.action-widget .monaco-list:focus:before{outline:0!important}.action-widget .monaco-list .monaco-scrollable-element{overflow:visible}.action-widget .monaco-list .monaco-list-row{cursor:pointer;padding:0 10px;touch-action:none;white-space:nowrap;width:100%}.action-widget .monaco-list .monaco-list-row.action.focused:not(.option-disabled){background-color:var(--vscode-quickInputList-focusBackground)!important;color:var(--vscode-quickInputList-focusForeground);outline:1px solid var(--vscode-menu-selectionBorder,transparent);outline-offset:-1px}.action-widget .monaco-list-row.group-header{color:var(--vscode-descriptionForeground)!important;font-weight:600}.action-widget .monaco-list .group-header,.action-widget .monaco-list .option-disabled,.action-widget .monaco-list .option-disabled .focused,.action-widget .monaco-list .option-disabled .focused:before,.action-widget .monaco-list .option-disabled:before{cursor:default!important;-webkit-touch-callout:none;background-color:transparent!important;outline:0 solid!important;-webkit-user-select:none;user-select:none}.action-widget .monaco-list-row.action{align-items:center;display:flex;gap:6px}.action-widget .monaco-list-row.action.option-disabled,.action-widget .monaco-list-row.action.option-disabled .codicon,.action-widget .monaco-list:focus .monaco-list-row.focused.action.option-disabled,.action-widget .monaco-list:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused).option-disabled{color:var(--vscode-disabledForeground)}.action-widget .monaco-list-row.action:not(.option-disabled) .codicon{color:inherit}.action-widget .monaco-list-row.action .title{flex:1;overflow:hidden;text-overflow:ellipsis}.action-widget .monaco-list-row.action .monaco-keybinding>.monaco-keybinding-key{background-color:var(--vscode-keybindingLabel-background);border-color:var(--vscode-keybindingLabel-border);border-bottom-color:var(--vscode-keybindingLabel-bottomBorder);border-radius:3px;border-style:solid;border-width:1px;box-shadow:inset 0 -1px 0 var(--vscode-widget-shadow);color:var(--vscode-keybindingLabel-foreground)}.action-widget .action-widget-action-bar{background-color:var(--vscode-editorHoverWidget-statusBarBackground);border-top:1px solid var(--vscode-editorHoverWidget-border)}.action-widget .action-widget-action-bar:before{content:"";display:block;width:100%}.action-widget .action-widget-action-bar .actions-container{padding:0 8px}.action-widget-action-bar .action-label{color:var(--vscode-textLink-activeForeground);font-size:12px;line-height:22px;padding:0;pointer-events:all}.action-widget-action-bar .action-item{margin-right:16px;pointer-events:none}.action-widget-action-bar .action-label:hover{background-color:transparent!important}.monaco-action-bar .actions-container.highlight-toggled .action-label.checked{background:var(--vscode-actionBar-toggledBackground)!important}.monaco-action-bar .action-item.menu-entry .action-label.icon{background-position:50%;background-repeat:no-repeat;background-size:16px;height:16px;width:16px}.monaco-action-bar .action-item.menu-entry.text-only .action-label{border-radius:2px;color:var(--vscode-descriptionForeground);overflow:hidden}.monaco-action-bar .action-item.menu-entry.text-only.use-comma:not(:last-of-type) .action-label:after{content:", "}.monaco-action-bar .action-item.menu-entry.text-only+.action-item:not(.text-only)>.monaco-dropdown .action-label{color:var(--vscode-descriptionForeground)}.monaco-dropdown-with-default{border-radius:5px;display:flex!important;flex-direction:row}.monaco-dropdown-with-default>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label.icon{background-position:50%;background-repeat:no-repeat;background-size:16px;height:16px;width:16px}.monaco-dropdown-with-default:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;line-height:16px;margin-left:-3px;padding-left:0;padding-right:0}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{background-position:50%;background-repeat:no-repeat;background-size:16px;display:block}.monaco-link{color:var(--vscode-textLink-foreground)}.monaco-link:hover{color:var(--vscode-textLink-activeForeground)}.quick-input-widget{left:50%;margin-left:-300px;position:absolute;width:600px;z-index:2550;-webkit-app-region:no-drag;border-radius:6px}.quick-input-titlebar{align-items:center;border-top-left-radius:5px;border-top-right-radius:5px;display:flex}.quick-input-left-action-bar{display:flex;flex:1;margin-left:4px}.quick-input-inline-action-bar{margin:2px 0 0 5px}.quick-input-title{overflow:hidden;padding:3px 0;text-align:center;text-overflow:ellipsis}.quick-input-right-action-bar{display:flex;flex:1;margin-right:4px}.quick-input-right-action-bar>.actions-container{justify-content:flex-end}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:50%;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px 6px 6px 11px}.quick-input-header .quick-input-description{flex:1;margin:4px 2px}.quick-input-header{display:flex;padding:8px 6px 2px}.quick-input-widget.hidden-input .quick-input-header{margin-bottom:0;padding:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;min-width:0;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-filter{display:flex;flex-grow:1;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{left:-10000px;position:absolute}.quick-input-count{align-items:center;align-self:center;display:flex;position:absolute;right:4px}.quick-input-count .monaco-count-badge{border-radius:2px;line-height:normal;min-height:auto;padding:2px 4px;vertical-align:middle}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{align-items:center;display:flex;font-size:11px;height:25px;padding:0 6px}.quick-input-message{margin-top:-1px;overflow-wrap:break-word;padding:5px}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-message a{color:inherit}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-list{line-height:22px}.quick-input-widget.hidden-input .quick-input-list{margin-top:4px;padding-bottom:4px}.quick-input-list .monaco-list{max-height:440px;overflow:hidden;padding-bottom:5px}.quick-input-list .monaco-scrollable-element{padding:0 5px}.quick-input-list .quick-input-list-entry{box-sizing:border-box;display:flex;overflow:hidden;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-style:solid;border-top-width:1px}.quick-input-list .monaco-list-row{border-radius:3px}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{display:flex;flex:1;height:100%;overflow:hidden}.quick-input-list .quick-input-list-checkbox{align-self:center;margin:0}.quick-input-list .quick-input-list-icon{align-items:center;background-position:0;background-repeat:no-repeat;background-size:16px;display:flex;height:22px;justify-content:center;padding-right:6px;width:16px}.quick-input-list .quick-input-list-rows{display:flex;flex:1;flex-direction:column;height:100%;margin-left:5px;overflow:hidden;text-overflow:ellipsis}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows{margin-left:10px}.quick-input-widget .quick-input-list .quick-input-list-checkbox{display:none}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox{display:inline}.quick-input-list .quick-input-list-rows>.quick-input-list-row{align-items:center;display:flex}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-list .quick-input-list-rows .monaco-highlighted-label>span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{line-height:normal;opacity:.7;overflow:hidden;text-overflow:ellipsis}.quick-input-list .monaco-list .monaco-list-row .monaco-highlighted-label .highlight{background-color:unset;color:var(--vscode-list-highlightForeground)!important;font-weight:700}.quick-input-list .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight{color:var(--vscode-list-focusHighlightForeground)!important}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:4px}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:2px}.quick-input-list .quick-input-list-entry-action-bar{margin-right:4px;margin-top:1px}.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label,.quick-input-list .monaco-list-row.passive-focused .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry.focus-inside .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label{display:flex}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key{background:none}.quick-input-list .quick-input-list-separator-as-item{font-size:12px;padding:4px 6px}.quick-input-list .quick-input-list-separator-as-item .label-name{font-weight:600}.quick-input-list .quick-input-list-separator-as-item .label-description{opacity:1!important}.quick-input-list .monaco-tree-sticky-row .quick-input-list-entry.quick-input-list-separator-as-item.quick-input-list-separator-border{border-top-style:none}.quick-input-list .monaco-tree-sticky-row{padding:0 5px}.quick-input-list .monaco-tl-twistie{display:none!important}.extension-editor .codicon.codicon-error,.extensions-viewlet>.extensions .codicon.codicon-error,.markers-panel .marker-icon .codicon.codicon-error,.markers-panel .marker-icon.error,.monaco-editor .zone-widget .codicon.codicon-error,.preferences-editor .codicon.codicon-error,.text-search-provider-messages .providerMessage .codicon.codicon-error{color:var(--vscode-problemsErrorIcon-foreground)}.extension-editor .codicon.codicon-warning,.extensions-viewlet>.extensions .codicon.codicon-warning,.markers-panel .marker-icon .codicon.codicon-warning,.markers-panel .marker-icon.warning,.monaco-editor .zone-widget .codicon.codicon-warning,.preferences-editor .codicon.codicon-warning,.text-search-provider-messages .providerMessage .codicon.codicon-warning{color:var(--vscode-problemsWarningIcon-foreground)}.extension-editor .codicon.codicon-info,.extensions-viewlet>.extensions .codicon.codicon-info,.markers-panel .marker-icon .codicon.codicon-info,.markers-panel .marker-icon.info,.monaco-editor .zone-widget .codicon.codicon-info,.preferences-editor .codicon.codicon-info,.text-search-provider-messages .providerMessage .codicon.codicon-info{color:var(--vscode-problemsInfoIcon-foreground)}
yairm210/Mermaid-gif-maker
13
A small webpage for making GIFs of mermaid graphs
JavaScript
yairm210
Yair Morgenstern
monaco-mermaid.js
JavaScript
export default (monacoEditor) => { monacoEditor.languages.register({ id: 'mermaid' }); const requirementDiagrams = [ 'requirement', 'functionalRequirement', 'interfaceRequirement', 'performanceRequirement', 'physicalRequirement', 'designConstraint', ]; const keywords = { flowchart: { typeKeywords: ['flowchart', 'flowchart-v2', 'graph'], blockKeywords: ['subgraph', 'end'], keywords: [ 'TB', 'TD', 'BT', 'RL', 'LR', 'click', 'call', 'href', '_self', '_blank', '_parent', '_top', 'linkStyle', 'style', 'classDef', 'class', 'direction', 'interpolate', ], }, sequenceDiagram: { typeKeywords: ['sequenceDiagram'], blockKeywords: [ 'alt', 'par', 'and', 'loop', 'else', 'end', 'rect', 'opt', 'alt', 'rect', ], keywords: [ 'participant', 'as', 'Note', 'note', 'right of', 'left of', 'over', 'activate', 'deactivate', 'autonumber', 'title', 'actor', 'accDescription', 'link', 'links', ], }, classDiagram: { typeKeywords: ['classDiagram', 'classDiagram-v2'], blockKeywords: ['class'], keywords: [ 'link', 'click', 'callback', 'call', 'href', 'cssClass', 'direction', 'TB', 'BT', 'RL', 'LR', 'title', 'accDescription', 'order', ], }, stateDiagram: { typeKeywords: ['stateDiagram', 'stateDiagram-v2'], blockKeywords: ['state', 'note', 'end'], keywords: [ 'state', 'as', 'hide empty description', 'direction', 'TB', 'BT', 'RL', 'LR', ], }, erDiagram: { typeKeywords: ['erDiagram'], blockKeywords: [], keywords: ['title', 'accDescription'], }, journey: { typeKeywords: ['journey'], blockKeywords: ['section'], keywords: ['title'], }, info: { typeKeywords: ['info'], blockKeywords: [], keywords: ['showInfo'], }, gantt: { typeKeywords: ['gantt'], blockKeywords: [], keywords: [ 'title', 'dateFormat', 'axisFormat', 'todayMarker', 'section', 'excludes', 'inclusiveEndDates', ], }, requirementDiagram: { typeKeywords: ['requirement', 'requirementDiagram'], blockKeywords: requirementDiagrams.concat('element'), keywords: [], }, gitGraph: { typeKeywords: ['gitGraph'], blockKeywords: [], keywords: [ 'accTitle', 'accDescr', 'commit', 'cherry-pick', 'branch', 'merge', 'reset', 'checkout', 'LR', 'BT', 'id', 'msg', 'type', 'tag', 'NORMAL', 'REVERSE', 'HIGHLIGHT', ], }, pie: { typeKeywords: ['pie'], blockKeywords: [], keywords: ['title', 'showData', 'title', 'accDescription'], }, c4Diagram: { typeKeywords: [ 'C4Context', 'C4Container', 'C4Component', 'C4Dynamic', 'C4Deployment', ], blockKeywords: [ 'Boundary', 'Enterprise_Boundary', 'System_Boundary', 'Container_Boundary', 'Node', 'Node_L', 'Node_R', ], keywords: [ 'title', 'accDescription', 'direction', 'TB', 'BT', 'RL', 'LR', 'Person_Ext', 'Person', 'SystemQueue_Ext', 'SystemDb_Ext', 'System_Ext', 'SystemQueue', 'SystemDb', 'System', 'ContainerQueue_Ext', 'ContainerDb_Ext', 'Container_Ext', 'ContainerQueue', 'ContainerDb', 'Container', 'ComponentQueue_Ext', 'ComponentDb_Ext', 'Component_Ext', 'ComponentQueue', 'ComponentDb', 'Component', 'Deployment_Node', 'Rel', 'BiRel', 'Rel_Up', 'Rel_U', 'Rel_Down', 'Rel_D', 'Rel_Left', 'Rel_L', 'Rel_Right', 'Rel_R', 'Rel_Back', 'RelIndex', ], }, }; const configDirectiveHandler = [ /^\s*%%(?={)/, { token: 'string', next: '@configDirective', nextEmbedded: 'javascript', }, ]; // Register a tokens provider for the mermaid language monacoEditor.languages.setMonarchTokensProvider('mermaid', Object.assign(Object.assign({}, Object.entries(keywords) .map((entry) => Object.fromEntries(Object.entries(entry[1]).map((deepEntry) => [ entry[0] + deepEntry[0][0].toUpperCase() + deepEntry[0].slice(1), deepEntry[1], ]))) .reduce((overallKeywords, nextKeyword) => (Object.assign(Object.assign({}, overallKeywords), nextKeyword)), {})), { tokenizer: { root: [ [/^\s*gitGraph/m, 'typeKeyword', 'gitGraph'], [/^\s*info/m, 'typeKeyword', 'info'], [/^\s*pie/m, 'typeKeyword', 'pie'], [/^\s*(flowchart|flowchart-v2|graph)/m, 'typeKeyword', 'flowchart'], [/^\s*sequenceDiagram/, 'typeKeyword', 'sequenceDiagram'], [/^\s*classDiagram(-v2)?/, 'typeKeyword', 'classDiagram'], [/^\s*journey/, 'typeKeyword', 'journey'], [/^\s*gantt/, 'typeKeyword', 'gantt'], [/^\s*stateDiagram(-v2)?/, 'typeKeyword', 'stateDiagram'], [/^\s*er(Diagram)?/, 'typeKeyword', 'erDiagram'], [/^\s*requirement(Diagram)?/, 'typeKeyword', 'requirementDiagram'], [ /^\s*(C4Context|C4Container|C4Component|C4Dynamic|C4Deployment)/m, 'typeKeyword', 'c4Diagram', ], configDirectiveHandler, [/%%[^${].*$/, 'comment'], ], configDirective: [ [/%%$/, { token: 'string', next: '@pop', nextEmbedded: '@pop' }], ], gitGraph: [ configDirectiveHandler, [/option(?=s)/, { token: 'typeKeyword', next: 'optionsGitGraph' }], [ /(accTitle|accDescr)(\s*:)(\s*[^\r\n]+$)/, ['keyword', 'delimiter.bracket', 'string'], ], [ /(^\s*branch)(.*?)(\s+order)(:\s*)(\d+\s*$)/, ['keyword', 'variable', 'keyword', 'delimiter.bracket', 'number'], ], [/".*?"/, 'string'], [ /(^\s*)(branch|reset|merge|checkout)(\s*\S+)/m, ['delimiter.bracket', 'keyword', 'variable'], ], [ /[a-zA-Z][\w$]*/, { cases: { '@gitGraphBlockKeywords': 'typeKeyword', '@gitGraphKeywords': 'keyword', }, }, ], [/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'], [/\^/, 'delimiter.bracket'], ], optionsGitGraph: [ [ /s$/, { token: 'typeKeyword', nextEmbedded: 'json', }, ], ['end', { token: 'typeKeyword', next: '@pop', nextEmbedded: '@pop' }], ], info: [ [ /[a-zA-Z][\w$]*/, { cases: { '@infoBlockKeywords': 'typeKeyword', '@infoKeywords': 'keyword', }, }, ], ], pie: [ configDirectiveHandler, [/(title|accDescription)(.*$)/, ['keyword', 'string']], [ /[a-zA-Z][\w$]*/, { cases: { '@pieBlockKeywords': 'typeKeyword', '@pieKeywords': 'keyword', }, }, ], [/".*?"/, 'string'], [/\s*\d+/, 'number'], [/:/, 'delimiter.bracket'], [/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'], ], flowchart: [ configDirectiveHandler, [/[ox]?(--+|==+)[ox]/, 'transition'], [ /[a-zA-Z][\w$]*/, { cases: { '@flowchartBlockKeywords': 'typeKeyword', '@flowchartKeywords': 'keyword', '@default': 'variable', }, }, ], [/\|+.+?\|+/, 'string'], [/\[+(\\.+?[\\/]|\/.+?[/\\])\]+/, 'string'], [/[[>]+[^\]|[]+?\]+/, 'string'], [/{+.+?}+/, 'string'], [/\(+.+?\)+/, 'string'], [/-\.+->?/, 'transition'], [ /(-[-.])([^->][^-]+?)(-{3,}|-{2,}>|\.-+>)/, ['transition', 'string', 'transition'], ], [/(==+)([^=]+?)(={3,}|={2,}>)/, ['transition', 'string', 'transition']], [/<?(--+|==+)>|===+|---+/, 'transition'], [/:::/, 'transition'], [/[;&]/, 'delimiter.bracket'], [/".*?"/, 'string'], [/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'], ], sequenceDiagram: [ configDirectiveHandler, [/(title:?|accDescription)([^\r\n;]*$)/, ['keyword', 'string']], [/(autonumber)([^\r\n\S]+off[^\r\n\S]*$)/, ['keyword', 'keyword']], [ /(autonumber)([^\r\n\S]+\d+[^\r\n\S]+\d+[^\r\n\S]*$)/, ['keyword', 'number'], ], [/(autonumber)([^\r\n\S]+\d+[^\r\n\S]*$)/, ['keyword', 'number']], [ /(link\s+)(.*?)(:)(\s*.*?)(\s*@)(\s*[^\r\n;]+)/, [ 'keyword', 'variable', 'delimiter.bracket', 'string', 'delimiter.bracket', 'string', ], ], [ /((?:links|properties)\s+)([^\r\n:]*?)(:\s+)/, [ { token: 'keyword' }, { token: 'variable' }, { token: 'delimiter.bracket', nextEmbedded: 'javascript', next: '@sequenceDiagramLinksProps', }, ], ], [ /[a-zA-Z][\w$]*/, { cases: { '@sequenceDiagramBlockKeywords': 'typeKeyword', '@sequenceDiagramKeywords': 'keyword', '@default': 'variable', }, }, ], [/(--?>?>|--?[)x])[+-]?/, 'transition'], [/(:)([^:\n]*?$)/, ['delimiter.bracket', 'string']], [/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'], ], sequenceDiagramLinksProps: [ // [/^:/, { token: 'delimiter.bracket', nextEmbedded: 'json' }], [ /$|;/, { nextEmbedded: '@pop', next: '@pop', token: 'delimiter.bracket' }, ], ], classDiagram: [ configDirectiveHandler, [/(^\s*(?:title|accDescription))(\s+.*$)/, ['keyword', 'string']], [ /(\*|<\|?|o|)(--|\.\.)(\*|\|?>|o|)([ \t]*[a-zA-Z]+[ \t]*)(:)(.*?$)/, [ 'transition', 'transition', 'transition', 'variable', 'delimiter.bracket', 'string', ], ], [/(?!class\s)([a-zA-Z]+)(\s+[a-zA-Z]+)/, ['type', 'variable']], [/(\*|<\|?|o)?(--|\.\.)(\*|\|?>|o)?/, 'transition'], [/^\s*class\s(?!.*\{)/, 'keyword'], [ /[a-zA-Z][\w$]*/, { cases: { '@classDiagramBlockKeywords': 'typeKeyword', '@classDiagramKeywords': 'keyword', '@default': 'variable', }, }, ], [/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'], [ /(<<)(.+?)(>>)/, ['delimiter.bracket', 'annotation', 'delimiter.bracket'], ], [/".*?"/, 'string'], [/:::/, 'transition'], [/:|\+|-|#|~|\*\s*$|\$\s*$|\(|\)|{|}/, 'delimiter.bracket'], ], journey: [ configDirectiveHandler, [/(title)(.*)/, ['keyword', 'string']], [/(section)(.*)/, ['typeKeyword', 'string']], [ /[a-zA-Z][\w$]*/, { cases: { '@journeyBlockKeywords': 'typeKeyword', '@journeyKeywords': 'keyword', '@default': 'variable', }, }, ], [ /(^\s*.+?)(:)(.*?)(:)(.*?)([,$])/, [ 'string', 'delimiter.bracket', 'number', 'delimiter.bracket', 'variable', 'delimiter.bracket', ], ], [/,/, 'delimiter.bracket'], [/(^\s*.+?)(:)([^:]*?)$/, ['string', 'delimiter.bracket', 'variable']], [/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'], ], gantt: [ configDirectiveHandler, [/(title)(.*)/, ['keyword', 'string']], [/(section)(.*)/, ['typeKeyword', 'string']], [/^\s*([^:\n]*?)(:)/, ['string', 'delimiter.bracket']], [ /[a-zA-Z][\w$]*/, { cases: { '@ganttBlockKeywords': 'typeKeyword', '@ganttKeywords': 'keyword', }, }, ], [/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'], [/:/, 'delimiter.bracket'], ], stateDiagram: [ configDirectiveHandler, [/note[^:]*$/, { token: 'typeKeyword', next: 'stateDiagramNote' }], ['hide empty description', 'keyword'], [/^\s*state\s(?!.*\{)/, 'keyword'], [/(<<)(fork|join|choice)(>>)/, 'annotation'], [ /(\[\[)(fork|join|choice)(]])/, ['delimiter.bracket', 'annotation', 'delimiter.bracket'], ], [ /[a-zA-Z][\w$]*/, { cases: { '@stateDiagramBlockKeywords': 'typeKeyword', '@stateDiagramKeywords': 'keyword', '@default': 'variable', }, }, ], [/".*?"/, 'string'], [/(:)([^:\n]*?$)/, ['delimiter.bracket', 'string']], [/{|}/, 'delimiter.bracket'], [/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'], [/-->/, 'transition'], [/\[.*?]/, 'string'], ], stateDiagramNote: [ [/^\s*end note$/, { token: 'typeKeyword', next: '@pop' }], [/.*/, 'string'], ], erDiagram: [ configDirectiveHandler, [/(title|accDescription)(.*$)/, ['keyword', 'string']], [/[}|][o|](--|\.\.)[o|][{|]/, 'transition'], [/".*?"/, 'string'], [/(:)(.*?$)/, ['delimiter.bracket', 'string']], [/:|{|}/, 'delimiter.bracket'], [/([a-zA-Z]+)(\s+[a-zA-Z]+)/, ['type', 'variable']], [/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'], [/[a-zA-Z_-][\w$]*/, 'variable'], ], requirementDiagram: [ configDirectiveHandler, [/->|<-|-/, 'transition'], [/(\d+\.)*\d+/, 'number'], [ /[a-zA-Z_-][\w$]*/, { cases: { '@requirementDiagramBlockKeywords': 'typeKeyword', '@default': 'variable', }, }, ], [/:|{|}|\//, 'delimiter.bracket'], [/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'], [/".*?"/, 'string'], ], c4Diagram: [ configDirectiveHandler, [/(title|accDescription)(.*$)/, ['keyword', 'string']], [/\(/, { token: 'delimiter.bracket', next: 'c4DiagramParenthesis' }], [ /[a-zA-Z_-][\w$]*/, { cases: { '@c4DiagramBlockKeywords': 'typeKeyword', '@c4DiagramKeywords': 'keyword', '@default': 'variable', }, }, ], [/%%[^$]([^%]*(?!%%$)%?)*$/, 'comment'], ], c4DiagramParenthesis: [ [/,/, 'delimiter.bracket'], [/\)/, { next: '@pop', token: 'delimiter.bracket' }], [/[^,)]/, 'string'], ], } })); monacoEditor.editor.defineTheme('mermaid-dark', { base: 'vs-dark', inherit: true, colors: {}, rules: [ { token: 'typeKeyword', foreground: '9650c8', fontStyle: 'bold' }, { token: 'transition', foreground: '008800', fontStyle: 'bold' }, { token: 'identifier', foreground: '9cdcfe' }, ], }); monacoEditor.editor.defineTheme('mermaid', { base: 'vs', inherit: true, colors: {}, rules: [ { token: 'typeKeyword', foreground: '9650c8', fontStyle: 'bold' }, { token: 'keyword', foreground: '649696' }, { token: 'custom-error', foreground: 'ff0000', fontStyle: 'bold' }, { token: 'string', foreground: 'AA8500' }, { token: 'transition', foreground: '008800', fontStyle: 'bold' }, { token: 'delimiter.bracket', foreground: '000000', fontStyle: 'bold' }, { token: 'annotation', foreground: '4b4b96' }, { token: 'number', foreground: '4b4b96' }, { token: 'comment', foreground: '888c89' }, { token: 'variable', foreground: 'A22889' }, { token: 'type', foreground: '2BDEA8' }, { token: 'identifier', foreground: '9cdcfe' }, ], }); // Register a completion item provider for the mermaid language monacoEditor.languages.registerCompletionItemProvider('mermaid', { provideCompletionItems: (model, position) => { const word = model.getWordUntilPosition(position); const range = { startLineNumber: position.lineNumber, endLineNumber: position.lineNumber, startColumn: word.startColumn, endColumn: word.endColumn, }; const suggestions = [ { label: 'loop', kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: ['loop ${1:Loop text}', '\t$0', 'end'].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: 'Sequence Diagram Loops', }, { label: 'alt', kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: [ 'alt ${1:Describing text}', '\t$0', 'else', '\t', 'end', ].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: 'Alternative Path', }, { label: 'opt', kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: ['opt ${1:Describing text}', '\t$0', 'end'].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: 'Optional Path', }, { label: 'par', kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: [ 'par ${1:[Action 1]}', '\t$0', 'and ${2:[Action 2]}', '\t', 'and ${3:[Action 3]}', '\t', 'end', ].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: 'Parallel Actions', }, { label: 'rect', kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: ['rect ${1:rgb(0, 255, 0)}', '\t$0', 'end'].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: 'Background Color', }, { label: 'subgraph', kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: ['subgraph ${1:title}', '\t$0', 'end'].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: 'Subgraph', }, { label: 'class', kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: ['class ${1:className} {', '\t$0', '}'].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: 'Class', }, { label: 'state', kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: ['state ${1:stateName} {', '\t$0', '}'].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: 'State', }, { label: 'note', kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: ['note ${1:right of State1}', '\t$0', 'end note'].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: 'State', }, { label: 'section', kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: ['section ${1:Go to work}', '\t$0'].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: 'User-journey Section', }, { label: 'element', kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: ['element ${1:test_entity} {', '\t$0', '}'].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: 'Requirement Diagram Element', }, { label: 'options', kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: ['options', '{', ' $0', '}', 'end'].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: 'Git Graph Options', }, ...keywords.c4Diagram.blockKeywords.map((containerType) => ({ label: containerType, kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: [ containerType + ' (${1:boundary_id}, "New Boundary") {', ' $0', '}', ].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: 'C4 Diagram ' + containerType + ' Boundary', })), ...requirementDiagrams.map((requirementDiagramType) => ({ label: requirementDiagramType, kind: monacoEditor.languages.CompletionItemKind.Snippet, insertText: [ requirementDiagramType + ' ${1:test_req} {', '\tid: 1', '\ttext: the test text.', '\trisk: high', '\tverifyMethod: test', '}', ].join('\n'), insertTextRules: monacoEditor.languages.CompletionItemInsertTextRule.InsertAsSnippet, documentation: requirementDiagramType .split(/(?=[A-Z])/) .map((part) => part[0].toUpperCase() + part.slice(1)) .join(' '), })), ...[ ...new Set(Object.values(keywords) .map((diagramKeywords) => Object.entries(diagramKeywords) .filter((keywordType) => keywordType[0] !== 'annotations') .map((entry) => entry[1])) .flat(2)), ].map((keyword) => ({ label: keyword, kind: monacoEditor.languages.CompletionItemKind.Keyword, insertText: keyword, })), ]; return { suggestions: suggestions.map((suggestion) => (Object.assign(Object.assign({}, suggestion), { range }))), }; }, }); monacoEditor.languages.setLanguageConfiguration('mermaid', { autoClosingPairs: [ { open: '(', close: ')', }, { open: '{', close: '}', }, { open: '[', close: ']', }, ], brackets: [ ['(', ')'], ['{', '}'], ['[', ']'], ], comments: { lineComment: '%%', }, }); };
yairm210/Mermaid-gif-maker
13
A small webpage for making GIFs of mermaid graphs
JavaScript
yairm210
Yair Morgenstern
simple.min.css
CSS
:root,::backdrop{--sans-font:-apple-system,BlinkMacSystemFont,"Avenir Next",Avenir,"Nimbus Sans L",Roboto,"Noto Sans","Segoe UI",Arial,Helvetica,"Helvetica Neue",sans-serif;--mono-font:Consolas,Menlo,Monaco,"Andale Mono","Ubuntu Mono",monospace;--standard-border-radius:5px;--bg:#fff;--accent-bg:#f5f7ff;--text:#212121;--text-light:#585858;--border:#898ea4;--accent:#0d47a1;--accent-hover:#1266e2;--accent-text:var(--bg);--code:#d81b60;--preformatted:#444;--marked:#fd3;--disabled:#efefef}@media (prefers-color-scheme:dark){:root,::backdrop{color-scheme:dark;--bg:#212121;--accent-bg:#2b2b2b;--text:#dcdcdc;--text-light:#ababab;--accent:#ffb300;--accent-hover:#ffe099;--accent-text:var(--bg);--code:#f06292;--preformatted:#ccc;--disabled:#111}img,video{opacity:.8}}*,:before,:after{box-sizing:border-box}textarea,select,input,progress{-webkit-appearance:none;-moz-appearance:none;appearance:none}html{font-family:var(--sans-font);scroll-behavior:smooth}body{color:var(--text);background-color:var(--bg);grid-template-columns:1fr min(45rem,90%) 1fr;margin:0;font-size:1.15rem;line-height:1.5;display:grid}body>*{grid-column:2}body>header{background-color:var(--accent-bg);border-bottom:1px solid var(--border);text-align:center;grid-column:1/-1;padding:0 .5rem 2rem}body>header>:only-child{margin-block-start:2rem}body>header h1{max-width:1200px;margin:1rem auto}body>header p{max-width:40rem;margin:1rem auto}main{padding-top:1.5rem}body>footer{color:var(--text-light);text-align:center;border-top:1px solid var(--border);margin-top:4rem;padding:2rem 1rem 1.5rem;font-size:.9rem}h1{font-size:3rem}h2{margin-top:3rem;font-size:2.6rem}h3{margin-top:3rem;font-size:2rem}h4{font-size:1.44rem}h5{font-size:1.15rem}h6{font-size:.96rem}p{margin:1.5rem 0}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}h1,h2,h3{line-height:1.1}@media only screen and (width<=720px){h1{font-size:2.5rem}h2{font-size:2.1rem}h3{font-size:1.75rem}h4{font-size:1.25rem}}a,a:visited{color:var(--accent)}a:hover{text-decoration:none}button,.button,a.button,input[type=submit],input[type=reset],input[type=button],label[type=button]{border:1px solid var(--accent);background-color:var(--accent);color:var(--accent-text);padding:.5rem .9rem;line-height:normal;text-decoration:none}.button[aria-disabled=true],input:disabled,textarea:disabled,select:disabled,button[disabled]{cursor:not-allowed;background-color:var(--disabled);border-color:var(--disabled);color:var(--text-light)}input[type=range]{padding:0}abbr[title]{cursor:help;text-decoration-line:underline;text-decoration-style:dotted}button:enabled:hover,.button:not([aria-disabled=true]):hover,input[type=submit]:enabled:hover,input[type=reset]:enabled:hover,input[type=button]:enabled:hover,label[type=button]:hover{background-color:var(--accent-hover);border-color:var(--accent-hover);cursor:pointer}.button:focus-visible,button:focus-visible:where(:enabled),input:enabled:focus-visible:where([type=submit],[type=reset],[type=button]){outline:2px solid var(--accent);outline-offset:1px}header>nav{padding:1rem 0 0;font-size:1rem;line-height:2}header>nav ul,header>nav ol{flex-flow:wrap;place-content:space-around center;align-items:center;margin:0;padding:0;list-style-type:none;display:flex}header>nav ul li,header>nav ol li{display:inline-block}header>nav a,header>nav a:visited{border:1px solid var(--border);border-radius:var(--standard-border-radius);color:var(--text);margin:0 .5rem 1rem;padding:.1rem 1rem;text-decoration:none;display:inline-block}header>nav a:hover,header>nav a.current,header>nav a[aria-current=page],header>nav a[aria-current=true]{border-color:var(--accent);color:var(--accent);cursor:pointer}@media only screen and (width<=720px){header>nav a{border:none;padding:0;line-height:1;text-decoration:underline}}aside,details,pre,progress{background-color:var(--accent-bg);border:1px solid var(--border);border-radius:var(--standard-border-radius);margin-bottom:1rem}aside{float:right;width:30%;margin-inline-start:15px;padding:0 15px;font-size:1rem}[dir=rtl] aside{float:left}@media only screen and (width<=720px){aside{float:none;width:100%;margin-inline-start:0}}article,fieldset,dialog{border:1px solid var(--border);border-radius:var(--standard-border-radius);margin-bottom:1rem;padding:1rem}article h2:first-child,section h2:first-child,article h3:first-child,section h3:first-child{margin-top:1rem}section{border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin:3rem 0;padding:2rem 1rem}section+section,section:first-child{border-top:0;padding-top:0}section+section{margin-top:0}section:last-child{border-bottom:0;padding-bottom:0}details{padding:.7rem 1rem}summary{cursor:pointer;word-break:break-all;margin:-.7rem -1rem;padding:.7rem 1rem;font-weight:700}details[open]>summary+*{margin-top:0}details[open]>summary{margin-bottom:.5rem}details[open]>:last-child{margin-bottom:0}table{border-collapse:collapse;margin:1.5rem 0}figure>table{width:max-content;margin:0}td,th{border:1px solid var(--border);text-align:start;padding:.5rem}th{background-color:var(--accent-bg);font-weight:700}tr:nth-child(2n){background-color:var(--accent-bg)}table caption{margin-bottom:.5rem;font-weight:700}textarea,select,input,button,.button{font-size:inherit;border-radius:var(--standard-border-radius);box-shadow:none;max-width:100%;margin-bottom:.5rem;padding:.5rem;font-family:inherit;display:inline-block}textarea,select,input{color:var(--text);background-color:var(--bg);border:1px solid var(--border)}label{display:block}textarea:not([cols]){width:100%}select:not([multiple]){background-image:linear-gradient(45deg,transparent 49%,var(--text)51%),linear-gradient(135deg,var(--text)51%,transparent 49%);background-position:calc(100% - 15px),calc(100% - 10px);background-repeat:no-repeat;background-size:5px 5px,5px 5px;padding-inline-end:25px}[dir=rtl] select:not([multiple]){background-position:10px,15px}input[type=checkbox],input[type=radio]{vertical-align:middle;width:min-content;position:relative}input[type=checkbox]+label,input[type=radio]+label{display:inline-block}input[type=radio]{border-radius:100%}input[type=checkbox]:checked,input[type=radio]:checked{background-color:var(--accent)}input[type=checkbox]:checked:after{content:" ";border-right:solid var(--bg).08em;border-bottom:solid var(--bg).08em;background-color:#0000;border-radius:0;width:.18em;height:.32em;font-size:1.8em;position:absolute;top:.05em;left:.17em;transform:rotate(45deg)}input[type=radio]:checked:after{content:" ";background-color:var(--bg);border-radius:100%;width:.25em;height:.25em;font-size:32px;position:absolute;top:.125em;left:.125em}@media only screen and (width<=720px){textarea,select,input{width:100%}}input[type=color]{height:2.5rem;padding:.2rem}input[type=file]{border:0}hr{background:var(--border);border:none;height:1px;margin:1rem auto}mark{border-radius:var(--standard-border-radius);background-color:var(--marked);color:#000;padding:2px 5px}mark a{color:#0d47a1}img,video{border-radius:var(--standard-border-radius);max-width:100%;height:auto}figure{margin:0;display:block;overflow-x:auto}figure>img,figure>picture>img{margin-inline:auto;display:block}figcaption{text-align:center;color:var(--text-light);margin-block:1rem;font-size:.9rem}blockquote{border-inline-start:.35rem solid var(--accent);color:var(--text-light);margin-block:2rem;margin-inline:2rem 0;padding:.4rem .8rem;font-style:italic}cite{color:var(--text-light);font-size:.9rem;font-style:normal}dt{color:var(--text-light)}code,pre,pre span,kbd,samp{font-family:var(--mono-font);color:var(--code)}kbd{color:var(--preformatted);border:1px solid var(--preformatted);border-bottom:3px solid var(--preformatted);border-radius:var(--standard-border-radius);padding:.1rem .4rem}pre{color:var(--preformatted);max-width:100%;padding:1rem 1.4rem;overflow:auto}pre code{color:var(--preformatted);background:0 0;margin:0;padding:0}progress{width:100%}progress:indeterminate{background-color:var(--accent-bg)}progress::-webkit-progress-bar{border-radius:var(--standard-border-radius);background-color:var(--accent-bg)}progress::-webkit-progress-value{border-radius:var(--standard-border-radius);background-color:var(--accent)}progress::-moz-progress-bar{border-radius:var(--standard-border-radius);background-color:var(--accent);transition-property:width;transition-duration:.3s}progress:indeterminate::-moz-progress-bar{background-color:var(--accent-bg)}dialog{max-width:40rem;margin:auto}dialog::backdrop{background-color:var(--bg);opacity:.8}@media only screen and (width<=720px){dialog{max-width:100%;margin:auto 1em}}sup,sub{vertical-align:baseline;position:relative}sup{top:-.4em}sub{top:.3em}.notice{background:var(--accent-bg);border:2px solid var(--border);border-radius:var(--standard-border-radius);margin:2rem 0;padding:1.5rem}
yairm210/Mermaid-gif-maker
13
A small webpage for making GIFs of mermaid graphs
JavaScript
yairm210
Yair Morgenstern
annotations/build.gradle.kts
Kotlin
import com.vanniktech.maven.publish.SonatypeHost plugins { id("org.jetbrains.kotlin.multiplatform") version libs.versions.kotlin id("com.vanniktech.maven.publish") version("0.32.0") signing } group = "io.github.yairm210" version = "1.3.2" kotlin { sourceSets{ val commonMain by getting { } } jvm() jvmToolchain(8) // test plugin compatibility to older jvm } mavenPublishing { coordinates(group.toString(), "purity-annotations", version.toString()) publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) signAllPublications() // Comment out for local publishing if you don't have a GPG key set up pom { name = "Purity Compiler Plugin" description = "Annotations for the Purity Compiler Plugin, which allows you to mark Kotlin functions as pure and readonly" inceptionYear = "2025" url = "https://github.com/yairm210/purity" licenses { license { name = "The Apache License, Version 2.0" url = "http://www.apache.org/licenses/LICENSE-2.0.txt" distribution = "http://www.apache.org/licenses/LICENSE-2.0.txt" } } developers { developer { id = "yairm210" name = "Yair Morgenstern" url = "https://github.com/yairm210" } } scm { url = "https://github.com/yairm210/purity" connection = "scm:git:git://github.com/yairm210/purity.git" developerConnection = "scm:git:ssh://git@github.com/yairm210/purity.git" } } }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
annotations/src/commonMain/kotlin/Cache.kt
Kotlin
package yairm210.purity.annotations import kotlin.annotation.AnnotationTarget.PROPERTY /** * Indicates that a private property is a cache for a function, and therefore can be both read and written to. * Note that this does NOT ensure thread safety, so choose thread-safe data structures multithreading. */ @Target(PROPERTY) public annotation class Cache
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
annotations/src/commonMain/kotlin/Immutable.kt
Kotlin
package yairm210.purity.annotations import kotlin.annotation.AnnotationTarget.LOCAL_VARIABLE import kotlin.annotation.AnnotationTarget.PROPERTY /** * Indicates that a val - such as a list or map - is immutable, and thus its Readable functions should be considered Pure. * Has no effect on var. */ // this differs from IrValueDeclaration.isImmutable - that only checks if it's a val or var, // NOT that its internals are modifiable e.g. listOf() vs ArrayListOf() @Target(LOCAL_VARIABLE, PROPERTY) public annotation class Immutable
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
annotations/src/commonMain/kotlin/InternalState.kt
Kotlin
package yairm210.purity.annotations import kotlin.annotation.AnnotationTarget.CLASS /** * Indicates that this class can mutate *only* state that it owns - lost upon destruction of the instance. * The equivalent of this for external classes is WellKnownInternalStateClasses - see https://yairm210.github.io/Purity/usage/configuration/#handling-external-classes */ @Target(CLASS) public annotation class InternalState
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
annotations/src/commonMain/kotlin/LocalState.kt
Kotlin
package yairm210.purity.annotations import kotlin.annotation.AnnotationTarget.LOCAL_VARIABLE import kotlin.annotation.AnnotationTarget.VALUE_PARAMETER /** * Indicates that the class alters its internal state only, AND that this instance is inaccessible from elsewhere in the code (e.g. created within this function) * Thus, its state-mutating functions can be called without violating function purity. */ @Target(LOCAL_VARIABLE, VALUE_PARAMETER) public annotation class LocalState
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
annotations/src/commonMain/kotlin/Pure.kt
Kotlin
package yairm210.purity.annotations import kotlin.annotation.AnnotationTarget.FUNCTION /** * An annotation to indicate that this function is Pure. * This means that it does not have any side effects and its output depends only on its input. * Functions which read from mutable state are not pure. * * The equivalent of this for external functions is WellKnownPureFunctions - see https://yairm210.github.io/Purity/usage/configuration/#handling-external-classes */ @Target(FUNCTION, AnnotationTarget.VALUE_PARAMETER) public annotation class Pure
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
annotations/src/commonMain/kotlin/Readonly.kt
Kotlin
package yairm210.purity.annotations import kotlin.annotation.AnnotationTarget.FUNCTION import kotlin.annotation.AnnotationTarget.VALUE_PARAMETER /** * An annotation to indicate that this function is Pure. * This means that it does not have any side effects and its output depends only on its input. * Functions which read from mutable state are not pure. * * The equivalent of this for external functions is WellKnownPureFunctions - see https://yairm210.github.io/Purity/usage/configuration/#handling-external-classes */ @Target(FUNCTION, VALUE_PARAMETER, AnnotationTarget.PROPERTY_GETTER) public annotation class Readonly
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
annotations/src/commonMain/kotlin/TestExpectCompileError.kt
Kotlin
package yairm210.purity.annotations import kotlin.annotation.AnnotationTarget.FUNCTION /** * A test-only annotation that indicates that the annotated function is EXPECTED to error * Used for plugin tests. */ @Target(FUNCTION) public annotation class TestExpectCompileError
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
build.gradle.kts
Kotlin
import org.gradle.kotlin.dsl.libs buildscript { repositories { mavenLocal() google() mavenCentral() } } plugins { id("org.jetbrains.kotlin.multiplatform") version libs.versions.kotlin apply false } System.setProperty("kotlin.compiler.execution.strategy", "in-process") // For debugging allprojects { repositories { mavenLocal() mavenCentral() maven("https://maven.google.com") maven("https://plugins.gradle.org/m2/") google() } }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/build.gradle.kts
Kotlin
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask import com.vanniktech.maven.publish.SonatypeHost import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { kotlin("jvm") version("2.2.0") kotlin("kapt") version("2.2.0") id("com.vanniktech.maven.publish") version("0.32.0") signing } allprojects { repositories { mavenLocal() mavenCentral() maven("https://maven.google.com") maven("https://plugins.gradle.org/m2/") google() } } group = "io.github.yairm210" version = "1.3.2" mavenPublishing { coordinates(group.toString(), "purity-compiler-plugin", version.toString()) publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) signAllPublications() // Comment out for local publishing if you don't have a GPG key set up pom { name = "Purity Compiler Plugin" description = "The Compiler plugin for the Purity, which allows you to mark Kotlin functions as pure and readonly" inceptionYear = "2025" url = "https://github.com/yairm210/purity" licenses { license { name = "The Apache License, Version 2.0" url = "http://www.apache.org/licenses/LICENSE-2.0.txt" distribution = "http://www.apache.org/licenses/LICENSE-2.0.txt" } } developers { developer { id = "yairm210" name = "Yair Morgenstern" url = "https://github.com/yairm210" } } scm { url = "https://github.com/yairm210/purity" connection = "scm:git:git://github.com/yairm210/purity.git" developerConnection = "scm:git:ssh://git@github.com/yairm210/purity.git" } } } val autoService = "1.1.1" dependencies { compileOnly("com.google.auto.service:auto-service:$autoService") kapt("com.google.auto.service:auto-service:$autoService") compileOnly("org.jetbrains.kotlin:kotlin-compiler-embeddable:2.2.0") } java { toolchain { languageVersion.set(JavaLanguageVersion.of(8)) } } kotlin { compilerOptions { jvmTarget.set(JvmTarget.JVM_1_8) } } tasks.withType<KotlinCompilationTask<*>>().configureEach { compilerOptions.freeCompilerArgs.add("-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi") } //./gradlew clean :lib:compileKotlinJvm --no-daemon -Dorg.gradle.debug=true -Dkotlin.compiler.execution.strategy="in-process" -Dkotlin.daemon.jvm.options="-Xdebug,-Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n"
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/PurityConfig.kt
Kotlin
package yairm210.purity class PurityConfig { var warnOnPossibleAnnotations: Boolean = false var wellKnownPureClassesFromUser: Set<String> = setOf() var wellKnownPureFunctionsFromUser: Set<String> = setOf() var wellKnownReadonlyClassesFromUser: Set<String> = setOf() var wellKnownReadonlyFunctionsFromUser: Set<String> = setOf() var wellKnownInternalStateClassesFromUser: Set<String> = setOf() }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/boilerplate/DebugLogger.kt
Kotlin
package yairm210.purity.boilerplate import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity import org.jetbrains.kotlin.cli.common.messages.MessageCollector internal data class DebugLogger(val debug: Boolean, val messageCollector: MessageCollector) { fun log(message: String) { if (debug) { messageCollector.report(CompilerMessageSeverity.INFO, message) } } }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/boilerplate/PurityCommandLineProcessor.kt
Kotlin
package yairm210.purity.boilerplate import com.google.auto.service.AutoService import org.jetbrains.kotlin.compiler.plugin.AbstractCliOption import org.jetbrains.kotlin.compiler.plugin.CliOption import org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor import org.jetbrains.kotlin.config.CompilerConfiguration import org.jetbrains.kotlin.config.CompilerConfigurationKey import yairm210.purity.PurityConfig val enabled = "enabled" val warnOnPossibleAnnotations = "warnOnPossibleAnnotations" val wellKnownPureClasses = "wellKnownPureClasses" val wellKnownPureFunctions = "wellKnownPureFunctions" val wellKnownReadonlyClasses = "wellKnownReadonlyClasses" val wellKnownReadonlyFunctions = "wellKnownReadonlyFunctions" val wellKnownInternalStateClasses = "wellKnownInternalStateClasses" @AutoService(CommandLineProcessor::class) // don't forget! class PurityCommandLineProcessor : CommandLineProcessor { override val pluginId: String = "purityPlugin" override val pluginOptions: Collection<CliOption> = listOf( CliOption( optionName = enabled, valueDescription = "<true|false>", description = "whether to enable the plugin or not" ), CliOption( optionName = warnOnPossibleAnnotations, valueDescription = "<true|false>", description = "whether to warn when annotations can be added/changed" ), CliOption( optionName = wellKnownPureClasses, valueDescription = "<fully qualified class names delimited by underscores>", description = "A list of fully qualified class names, all functions of which are pure functions", required = false ), CliOption( optionName = wellKnownPureFunctions, valueDescription = "<fully qualified function names delimited by underscores>", description = "A list of fully qualified function names that are pure functions", required = false ), CliOption( optionName = wellKnownReadonlyClasses, valueDescription = "<fully qualified class names delimited by underscores>", description = "A list of fully qualified class names, all functions of which are readonly functions", required = false ), CliOption( optionName = wellKnownReadonlyFunctions, valueDescription = "<fully qualified function names delimited by underscores>", description = "A list of fully qualified function names that are readonly functions", required = false ), CliOption( optionName = wellKnownInternalStateClasses, valueDescription = "<fully qualified class names delimited by underscores>", description = "A list of fully qualified class names that alter only internal state", required = false ), ) private fun stringToSet(string:String) = string.split("_").map { it.trim() }.toSet() private fun getConfig(configuration: CompilerConfiguration): PurityConfig { val currentValue = configuration.get(KEY_PURITY_CONFIG) if (currentValue != null) return currentValue val newConfig = PurityConfig() configuration.put(KEY_PURITY_CONFIG, newConfig) return newConfig } override fun processOption( option: AbstractCliOption, value: String, configuration: CompilerConfiguration ) = when (option.optionName) { enabled -> configuration.put(KEY_ENABLED, value.toBoolean()) warnOnPossibleAnnotations -> getConfig(configuration).warnOnPossibleAnnotations = value.toBoolean() wellKnownPureClasses -> getConfig(configuration).wellKnownPureClassesFromUser = stringToSet(value) wellKnownPureFunctions -> getConfig(configuration).wellKnownPureFunctionsFromUser = stringToSet(value) wellKnownReadonlyFunctions -> getConfig(configuration).wellKnownReadonlyFunctionsFromUser = stringToSet(value) wellKnownInternalStateClasses -> getConfig(configuration).wellKnownInternalStateClassesFromUser = stringToSet(value) wellKnownReadonlyClasses -> getConfig(configuration).wellKnownReadonlyClassesFromUser = stringToSet(value) else -> throw IllegalArgumentException("Unknown option: ${option.optionName}") } } val KEY_ENABLED = CompilerConfigurationKey<Boolean>(enabled) val KEY_PURITY_CONFIG = CompilerConfigurationKey<PurityConfig>("purityConfig")
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/boilerplate/PurityComponentRegistrar.kt
Kotlin
package yairm210.purity.boilerplate import com.google.auto.service.AutoService import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension import org.jetbrains.kotlin.cli.common.messages.MessageCollector import org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar import org.jetbrains.kotlin.config.CommonConfigurationKeys import org.jetbrains.kotlin.config.CompilerConfiguration import yairm210.purity.PurityConfig @AutoService(CompilerPluginRegistrar::class) class PurityComponentRegistrar : CompilerPluginRegistrar() { override val supportsK2: Boolean get() = true override fun ExtensionStorage.registerExtensions(configuration: CompilerConfiguration) { if (configuration[KEY_ENABLED] == false) return val messageCollector = configuration.get(CommonConfigurationKeys.MESSAGE_COLLECTOR_KEY, MessageCollector.NONE) val logging = true IrGenerationExtension.registerExtension( PurityIrGenerationExtension( DebugLogger(logging, messageCollector), configuration[KEY_PURITY_CONFIG] ?: PurityConfig() ) ) } }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/boilerplate/PurityIrGenerationExtension.kt
Kotlin
package yairm210.purity.boilerplate import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext import org.jetbrains.kotlin.ir.declarations.IrModuleFragment import yairm210.purity.PurityConfig import yairm210.purity.validation.PurityElementTransformer internal class PurityIrGenerationExtension(private val debugLogger: DebugLogger, private val purityConfig: PurityConfig, ) : IrGenerationExtension { override fun generate(moduleFragment: IrModuleFragment, pluginContext: IrPluginContext) { moduleFragment.transform( PurityElementTransformer(debugLogger, purityConfig), null) } }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/validation/Annotations.kt
Kotlin
package yairm210.purity.validation import org.jetbrains.kotlin.name.FqName object Annotations { val Pure = FqName("yairm210.purity.annotations.Pure") val Readonly = FqName("yairm210.purity.annotations.Readonly") val LocalState = FqName("yairm210.purity.annotations.LocalState") val InternalState = FqName("yairm210.purity.annotations.InternalState") val Cache = FqName("yairm210.purity.annotations.Cache") val Immutable = FqName("yairm210.purity.annotations.Immutable") val TestExpectCompileError = FqName("yairm210.purity.annotations.TestExpectCompileError") }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/validation/CheckFunctionPurityVisitor.kt
Kotlin
@file:OptIn(UnsafeDuringIrConstructionAPI::class) package yairm210.purity.validation import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity import org.jetbrains.kotlin.cli.common.messages.MessageCollector import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.IrFileEntry import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.symbols.UnsafeDuringIrConstructionAPI import org.jetbrains.kotlin.ir.types.classFqName import org.jetbrains.kotlin.ir.types.getClass import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.ir.visitors.IrVisitor import org.jetbrains.kotlin.name.FqName import yairm210.purity.PurityConfig import yairm210.purity.validation.wellknown.wellKnownInternalStateClasses import yairm210.purity.validation.wellknown.wellKnownNewInstanceFunctions import yairm210.purity.validation.wellknown.wellKnownPureClasses fun getLocationForExpression(function: IrFunction, expression: IrElement) = getLocationForExpression(function.fileEntry, expression) fun getLocationForExpression( fileEntry: IrFileEntry, expression: IrElement ): CompilerMessageLocation { val lineAndColumn = fileEntry.getLineAndColumnNumbers(expression.startOffset) return CompilerMessageLocation.create( path = fileEntry.name, line = lineAndColumn.line + 1, // Convert to 1-indexed column = lineAndColumn.column + 1, // Convert to 1-indexed lineContent = null )!! } /** Checks all declarations of a specific function. * Warns every time a var is set a value, or an unpure function is called. * Vars that are created within the function are OK to set */ class CheckFunctionPurityVisitor( private val function: IrFunction, private val declaredFunctionPurity: FunctionPurity, private val messageCollector: MessageCollector, private val purityConfig: PurityConfig, ) : IrVisitor<Unit, Unit>() { // Returns whether this is an acceptable X function private var isReadonly = true private var isPure = true var hasErrored = false val hasExpectCompileErrorAnnotation = function.hasAnnotation(Annotations.TestExpectCompileError) private val errorSeverity = if (hasExpectCompileErrorAnnotation) CompilerMessageSeverity.WARNING else CompilerMessageSeverity.ERROR fun actualFunctionPurity(): FunctionPurity { return when { isPure -> FunctionPurity.Pure isReadonly -> FunctionPurity.Readonly else -> FunctionPurity.None } } private fun report(message: String, element: IrElement) { messageCollector.report( errorSeverity, message, location = getLocationForExpression(function, element) ) hasErrored = true } private fun varCreatedInFunction(varValueDeclaration: IrValueDeclaration): Boolean { // If the variable is created in this function that's ok // Contains, because if e.g. we create a sequence{} in a function and define the variable in the sequence, it's the parent return function in varValueDeclaration.parents } // Iterate over IR tree and warn on each var set where the var is not created within this function override fun visitSetValue(expression: IrSetValue, data: Unit) { if (declaredFunctionPurity == FunctionPurity.None){ return super.visitSetValue(expression, data) } // Not sure if we can assume owner is set at this point :think: val varValueDeclaration: IrValueDeclaration = expression.symbol.owner if (varValueDeclaration is IrVariable && varValueDeclaration.isVar && !varCreatedInFunction(varValueDeclaration)) { isReadonly = false isPure = false val text = "Function \"${function.name}\" is marked as $declaredFunctionPurity but sets variable \"${varValueDeclaration.name}\"\n" report( text, expression ) } super.visitSetValue(expression, data) } private fun isInternalStateClass(irClass: IrClass?): Boolean { if (irClass == null) return false if (irClass.hasAnnotation(Annotations.InternalState)) return true val fullyQualifiedClassName = irClass.fqNameForIrSerialization.asString() if (fullyQualifiedClassName in wellKnownInternalStateClasses) return true if (fullyQualifiedClassName in purityConfig.wellKnownInternalStateClassesFromUser) return true return false } private val localStateVariables = HashSet<IrVariable>() override fun visitVariable(declaration: IrVariable, data: Unit) { val initializer = declaration.initializer // If we're initializing a val with a constructor call to a well-known internal state class, it's the same as manually adding @LocalState if (!declaration.isVar && initializer is IrConstructorCall && isInternalStateClass(initializer.type.getClass())) { localStateVariables.add(declaration) } // If we're calling a pure function, the instance is guaranteed to not be mutable by anyone else (or the function would not be pure) // If in addition to that, the type is a well-known internal state class, then it's state that we may modify only // Thus, it is safe to consider this as a LocalState variable if (!declaration.isVar && initializer is IrCall && isInternalStateClass(initializer.type.getClass()) && (initializer.symbol.owner.fqNameForIrSerialization.asString() in wellKnownNewInstanceFunctions || ExpectedFunctionPurityChecker.isMarkedAsPure(initializer.symbol.owner, purityConfig)) ) { localStateVariables.add(declaration) } return super.visitVariable(declaration, data) } override fun visitGetValue(expression: IrGetValue, data: Unit) { val varValueDeclaration: IrValueDeclaration = expression.symbol.owner // If the variable is created in this function that's ok if (varValueDeclaration is IrVariable && varValueDeclaration.isVar && !varCreatedInFunction(varValueDeclaration)) { isPure = false if (declaredFunctionPurity == FunctionPurity.Pure) { report( "Function \"${function.name}\" is marked as $declaredFunctionPurity but gets variable \"${varValueDeclaration.name}\"", expression ) } } super.visitGetValue(expression, data) } override fun visitCall(expression: IrCall, data: Unit) { checkCalledFunctionPurity(expression) checkMarkedParameters(expression) super.visitCall(expression, data) } /** Only accept calls to functions marked as pure / readonly */ private fun checkCalledFunctionPurity(expression: IrCall) { val calledFunction = expression.symbol.owner // This is a subfunction of the current function, so it's already checked if (function in calledFunction.parents) return val extensionOrDispatchReceiverParameter = calledFunction.parameters .indexOfFirst { it.kind == IrParameterKind.DispatchReceiver || it.kind == IrParameterKind.ExtensionReceiver } val receiver = if (extensionOrDispatchReceiverParameter != -1) expression.arguments[extensionOrDispatchReceiverParameter] else null // e.g. a top-level function fun receiverHasAnnotation(annotation: FqName): Boolean = receiver?.let { representsAnnotationBearer(it, annotation) } == true fun isWellKnownPureClass(fqName: FqName?): Boolean { if (fqName == null) return false val fqString = fqName.asString() return fqString in wellKnownPureClasses || fqString in purityConfig.wellKnownPureClassesFromUser } fun isImmutableReceiver(): Boolean { if (receiver == null) return false if (isWellKnownPureClass(receiver.type.classFqName)) return true if (receiverHasAnnotation(Annotations.Immutable)) return true // Vararg arrays are created by the function, so they can't be modified from outside if (receiver is IrGetValue){ val symbolOwner = receiver.symbol.owner if (symbolOwner is IrValueParameter && symbolOwner.isVararg) return true } return false } fun receiverIsLocalState(): Boolean { if (receiverHasAnnotation(Annotations.LocalState)) return true if (receiver is IrGetValue && receiver.symbol.owner in localStateVariables) return true // When you += or *= a variable, the value being set is actually a IR_TEMPORARY_VARIABLE that is just initialized to the original variable // This is so that for chains (a.b.c += d) the final 'c' is given a local variable so it can be both read and written to fun isComplexSetForLocalState(): Boolean { if (receiver !is IrGetValue) return false val symbolOwner = receiver.symbol.owner if (symbolOwner !is IrVariable || symbolOwner.isVar) return false val initializer = symbolOwner.initializer if (initializer !is IrGetValue) return false val initializerOwner = initializer.symbol.owner if (initializerOwner in localStateVariables) return true if (initializerOwner.hasAnnotation(Annotations.LocalState)) return true return false } if (isComplexSetForLocalState()) return true return false } val calledFunctionPurity = when { // Pure function ExpectedFunctionPurityChecker.isMarkedAsPure(calledFunction, purityConfig) -> FunctionPurity.Pure // Readonly functions on Immutable vals, are considered pure isImmutableReceiver() && ExpectedFunctionPurityChecker.isReadonly(calledFunction, purityConfig) -> FunctionPurity.Pure // All functions on LocalState variables are considered pure receiverIsLocalState() || receiverHasAnnotation(Annotations.Cache) // Allow setting @Cache properties || calledFunction.isSetter && calledFunction.correspondingPropertySymbol?.owner?.hasAnnotation(Annotations.Cache) == true -> FunctionPurity.Pure // Function invocation // INTENTIONALLY NOT checking for @Pure or @Readonly annotations - see documentation calledFunction.name.asString() == "invoke" && receiver?.type?.isFunction() == true -> FunctionPurity.Pure ExpectedFunctionPurityChecker.isReadonly(calledFunction, purityConfig) -> FunctionPurity.Readonly else -> FunctionPurity.None } if (calledFunctionPurity < FunctionPurity.Pure) isPure = false if (calledFunctionPurity < FunctionPurity.Readonly) isReadonly = false if (declaredFunctionPurity > calledFunctionPurity) { reportUnacceptableFunctionCall(expression, calledFunction, calledFunctionPurity, receiver) } } private fun reportUnacceptableFunctionCall( expression: IrCall, calledFunction: IrSimpleFunction, calledFunctionPurity: FunctionPurity, receiver: IrExpression? ) { var message = "Function \"${function.name}\" is marked as $declaredFunctionPurity " + "but calls non-$declaredFunctionPurity function \"${expression.symbol.owner.fqNameForIrSerialization}\".\n" // Calling setter of property if (calledFunction.isSetter && calledFunction.correspondingPropertySymbol!!.owner.parentClassOrNull == function.parentClassOrNull) { message += "You are trying to set a mutable property \"${calledFunction.correspondingPropertySymbol!!.owner.name}\" declared within the same class.\n" + "If this property is meant be be a cache, it must be annotated with @Cache, and be private to the class." } else { message += " - If this is in your code, add @$declaredFunctionPurity annotation to the function.\n" + " - If this is in external code, you can declare it as $declaredFunctionPurity via the PurityConfiguration in gradle - see https://yairm210.github.io/Purity/usage/configuration/#handling-external-classes \n" } // Check if relevant to declare it @Immutable if (declaredFunctionPurity == FunctionPurity.Pure && calledFunctionPurity == FunctionPurity.Readonly) { if (receiver is IrCall && receiver.symbol.owner.isGetter) // property getter message += " - Since the function called is @Readonly, you can annotate \"${receiver.symbol.owner.correspondingPropertySymbol!!.owner.name}\" as @Immutable so the call will be considered @Pure - see https://yairm210.github.io/Purity/usage/advanced-usage/#marking-variables-as-immutable \n" if (receiver is IrGetValue) // local variable message += " - Since the function called is @Readonly, you can annotate \"${receiver.symbol.owner.name}\" as @Immutable so the call will be considered @Pure - see https://yairm210.github.io/Purity/usage/advanced-usage/#marking-variables-as-immutable \n" } // Check for vals declared within the function that can be marked @LocalState if (receiver is IrGetValue) { val symbolOwner = receiver.symbol.owner if (symbolOwner is IrVariable && !symbolOwner.isVar) { val className = symbolOwner.type.classFqName?.asString() if (className != null) { message += if (className in wellKnownInternalStateClasses || className in purityConfig.wellKnownInternalStateClassesFromUser ) { " - Since $className does not modify any external state (only internal), if " } else { " - If $className does not modify any external state (only internal), AND " } message += "this instance is inaccessible by other places in the code, you can annotate ${symbolOwner.name} as @LocalState - see https://yairm210.github.io/Purity/usage/advanced-usage/#local-state-variables \n" } } } report( message, expression ) } private fun representsAnnotationBearer(irExpression: IrExpression, annotation: FqName): Boolean { if (irExpression is IrGetValue) { // local function variable return irExpression.symbol.owner.hasAnnotation(annotation) } if (irExpression is IrTypeOperatorCall){ // This seems to be type conversion? I'm not sure honestly, seems pretty random to me where it pops up return representsAnnotationBearer(irExpression.argument, annotation) } if (irExpression is IrCall) { return irExpression.symbol.owner.let { it == it.correspondingPropertySymbol?.owner?.getter // A getter.. // ... for a property that is immutable && it.correspondingPropertySymbol?.owner?.hasAnnotation(annotation) == true } } return false } private fun checkMarkedParameters(expression: IrCall) { val calledFunction = expression.symbol.owner for ((parameter, parameterExpression) in expression.getAllArgumentsWithIr()) { if (parameterExpression == null) continue // No value passed for this parameter - use default value val parameterPurity = when { parameter.hasAnnotation(Annotations.Pure) -> FunctionPurity.Pure parameter.hasAnnotation(Annotations.Readonly) -> FunctionPurity.Readonly else -> FunctionPurity.None } if (parameterPurity == FunctionPurity.None) continue if (parameterExpression is IrFunctionExpression) { // lambda expression raisePassedLambdaErrors(parameterPurity, parameterExpression) continue } val actualExpressionPurity: FunctionPurity? = getExpressionPurity(parameterExpression) if (actualExpressionPurity == null) { report( "Function \"${function.name}\" calls \"${calledFunction.fqNameForIrSerialization}\" " + "with parameter \"${parameter.name}\" that is marked as $parameterPurity, but the purity of the value sent could not be determined.", expression ) continue } if (actualExpressionPurity < parameterPurity) { val message = "Function \"${function.name}\" calls \"${calledFunction.fqNameForIrSerialization}\" " + "with parameter \"${parameter.name}\" that is marked as $parameterPurity, but the value sent is not $parameterPurity.\n" + " - If passing a function input, annotate it as @$parameterPurity.\n"+ " - If passing a function reference (::function), ensure the function itself is annotated as @$parameterPurity.\n" report( message, expression ) } } } private fun raisePassedLambdaErrors( parameterPurity: FunctionPurity, parameterExpression: IrFunctionExpression ) { // If this functions is already on the parameter purity level or higher, we already check it satisfies the required purity - no-op // Otherwise, we instantiate a new checkFunctionPurityVisitor to check the lambda. // There is still a case where we will check things doubly: // If the parent function is readonly, and the parameter is pure, we'll create a Pure visitor // That means that readonly violations in the lambda will be raised by both the parent and the child if (declaredFunctionPurity >= parameterPurity) return val visitor = CheckFunctionPurityVisitor( function = parameterExpression.function, declaredFunctionPurity = parameterPurity, messageCollector = messageCollector, purityConfig = purityConfig, ) // If there are problems, this will raise them as-is parameterExpression.function.accept(visitor, Unit) } /** For expressions of type 'function' * Does not include lambdas since they require actual checking of the function body. * */ private fun getExpressionPurity(parameterExpression: IrExpression?) = when { parameterExpression is IrGetValue -> { // local variable when { parameterExpression.symbol.owner.hasAnnotation(Annotations.Pure) -> FunctionPurity.Pure parameterExpression.symbol.owner.hasAnnotation(Annotations.Readonly) -> FunctionPurity.Readonly else -> FunctionPurity.None } } parameterExpression is IrFunctionReference -> { // e.g. ::function val referencedFunction = parameterExpression.symbol.owner when { ExpectedFunctionPurityChecker.isMarkedAsPure(referencedFunction, purityConfig) -> FunctionPurity.Pure ExpectedFunctionPurityChecker.isReadonly(referencedFunction, purityConfig) -> FunctionPurity.Readonly else -> FunctionPurity.None } } // val getter parameterExpression is IrCall && parameterExpression.symbol.owner.isGetter && !parameterExpression.symbol.owner.correspondingPropertySymbol!!.owner.isVar -> { val calledFunction = parameterExpression.symbol.owner val property = calledFunction.correspondingPropertySymbol!!.owner when { property.hasAnnotation(Annotations.Pure) -> FunctionPurity.Pure property.hasAnnotation(Annotations.Readonly) -> FunctionPurity.Readonly else -> FunctionPurity.None } } else -> null } override fun visitFunction(declaration: IrFunction, data: Unit) { // Ensure that all annotated parameters have acceptable default values val valueParameters = declaration.parameters.filter { it.kind == IrParameterKind.Regular || it.kind == IrParameterKind.Context } for (parameter in valueParameters) { val defaultValue = parameter.defaultValue ?: continue val parameterPurity = when { parameter.hasAnnotation(Annotations.Pure) -> FunctionPurity.Pure parameter.hasAnnotation(Annotations.Readonly) -> FunctionPurity.Readonly else -> FunctionPurity.None } if (parameterPurity == FunctionPurity.None) continue val defaultExpression = defaultValue.expression if (defaultExpression is IrFunctionExpression) { // lambda expression // If this functions is already on the parameter purity level or higher, we already check it satisfies the required purity - no-op if (declaredFunctionPurity >= parameterPurity) return val visitor = CheckFunctionPurityVisitor( function = defaultExpression.function, declaredFunctionPurity = parameterPurity, messageCollector = messageCollector, purityConfig = purityConfig, ) // If there are problems, this will raise them as-is defaultExpression.function.accept(visitor, Unit) continue } val defaultValuePurity = getExpressionPurity(defaultExpression) if (defaultValuePurity == null) { report( "Function \"${declaration.name}\" has parameter \"${parameter.name}\" that is marked as $parameterPurity, " + "but the default value's purity could not be determined.", declaration ) } else if (defaultValuePurity < parameterPurity) { report( "Function \"${declaration.name}\" has parameter \"${parameter.name}\" that is marked as $parameterPurity, " + "but the default value's purity is not $parameterPurity.", declaration ) } } super.visitFunction(declaration, data) } override fun visitElement(element: IrElement, data: Unit) { element.acceptChildren(this, data) } }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/validation/ExpectedFunctionPurityChecker.kt
Kotlin
@file:OptIn(UnsafeDuringIrConstructionAPI::class) package yairm210.purity.validation import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.symbols.UnsafeDuringIrConstructionAPI import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.name.FqName import yairm210.purity.PurityConfig import yairm210.purity.validation.wellknown.* /** Checks the expected purity of a given IrFunction. * Unlike [CheckFunctionPurityVisitor] this is not a deep dive into the function. * Rather, it checks by annotations, function names, and parent classes. * */ object ExpectedFunctionPurityChecker { private val intrinsicConstEvaluationFqName = FqName("kotlin.internal.IntrinsicConstEvaluation") /** Tests shallowly whether we should consider the function as pure. * Does not check the function body, but rather checks for annotations, function names, and parent classes. * */ fun isMarkedAsPure(function: IrFunction, purityConfig: PurityConfig): Boolean { // Marked by @Pure if (function.hasAnnotation(Annotations.Pure)) return true // Custom annotation for readonly functions // Simple values like int + int -> plus(int, int), are marked thus val constEvaluation = function.getAnnotation(intrinsicConstEvaluationFqName) if (constEvaluation != null) return true val fullyQualifiedClassName = function.parent.fqNameForIrSerialization.asString() if (fullyQualifiedClassName in wellKnownPureClasses) return true if (fullyQualifiedClassName in purityConfig.wellKnownPureClassesFromUser) return true val fullyQualifiedFunctionName = function.fqNameForIrSerialization.asString() if (fullyQualifiedFunctionName in wellKnownPureFunctions) return true if (fullyQualifiedFunctionName in purityConfig.wellKnownPureFunctionsFromUser) return true if (wellKnownPureFunctionsPrefixes.any { fullyQualifiedFunctionName.startsWith(it) }) return true // autogenerated <get-val> functions for files & classes - allows reading from class.val if (function.isGetter && !(function as IrSimpleFunction).correspondingPropertySymbol!!.owner.isVar ) return true // Check if we're overriding a marked @Pure function if (function is IrSimpleFunction && getAllOverriddenFunctions(function).any { it.hasAnnotation(Annotations.Pure) }) return true if (isSingleStatementReturnPure(function)) return true if (isAutogeneratedEnumFunction(function)) return true if (isOfImmutableDataClass(function) && isAutogeneratedDataClassFunction(function)) return true return false } private val autogeneratedEnumFunctionNames = setOf("values", "valueOf", "compareTo") private fun isAutogeneratedEnumFunction(function: IrFunction): Boolean { if ((function.parent as? IrClass)?.isEnumClass != true) return false return function.name.asString() in autogeneratedEnumFunctionNames } private fun isOfImmutableDataClass(function: IrFunction): Boolean { val parentClass = function.parent as? IrClass ?: return false if (!parentClass.isData) return false return parentClass.properties.none { it.isVar } } fun isOfDataClass(function: IrFunction): Boolean { val parentClass = function.parent as? IrClass ?: return false return parentClass.isData } /** Regex for data class componentN functions */ val componentRegex = "component\\d+".toRegex() private fun isAutogeneratedDataClassFunction(function: IrFunction): Boolean { if (function.name.asString() == "copy") return true // copy function for data classes if (function.name.asString().matches(componentRegex)) return true // componentN functions for data classes return false } private fun isAcceptableGetter(function: IrFunction): Boolean { val body = function.body ?: return true // From outside our code, we can't know - assume it's ok, since most getters are autogenerated if (body is IrSyntheticBody) return true // Autogenerated getter - return field if (body.statements.size == 1){ val statement = body.statements.single() if (statement !is IrReturn) return false // I'm pretty sure this is impossible - how can a getter have 1 statement that doesn't return? val returnValue = statement.value if (returnValue is IrGetField) return true } return false } fun isReadonly(function: IrFunction, purityConfig: PurityConfig): Boolean { if (function.isGetter) return true if (function.hasAnnotation(Annotations.Readonly)) return true // Marked by @Readonly if (function.name.asString().startsWith("<get-")) return true // Autogenerated function for class variables val fullyQualifiedClassName = function.parent.fqNameForIrSerialization.asString() if (fullyQualifiedClassName in wellKnownReadonlyClasses) return true if (fullyQualifiedClassName in purityConfig.wellKnownReadonlyClassesFromUser) return true // Do NOT check for readonly parent classes - child classes can add non-readonly functionality! // E.g. List is readonly, but ArrayList is not. val fullyQualifiedFunctionName = function.fqNameForIrSerialization.asString() if (fullyQualifiedFunctionName in wellKnownReadonlyFunctions) return true if (fullyQualifiedFunctionName in purityConfig.wellKnownReadonlyFunctionsFromUser) return true // What is a NON-simple function, you ask? So do I! Lazy functions perhaps? if (function is IrSimpleFunction) { // Check if we're overriding a well-known readonly function for (overriddenFunction in getAllOverriddenFunctions(function).toSet()) { val overriddenFunctionName = overriddenFunction.fqNameForIrSerialization.asString() if (overriddenFunctionName in wellKnownReadonlyFunctions) return true if (overriddenFunctionName in purityConfig.wellKnownReadonlyFunctionsFromUser) return true if (overriddenFunction.hasAnnotation(Annotations.Readonly)) return true // We're overriding a @Readonly function } } if (isSingleStatementReturnReadonly(function)) return true // Data class destructuring functions if (isOfDataClass(function) && isAutogeneratedDataClassFunction(function)) return true return false } /** For convenience - single-declaration functions like "fun getX() = x" are readonly */ private fun isSingleStatementReturnReadonly(function: IrFunction): Boolean { val body = function.body ?: return false if (body is IrSyntheticBody) return false // Not sure what this IS, but it has no statements if (body.statements.size != 1) return false val statement = body.statements[0] if (statement !is IrReturn) return false val value = statement.value if (value is IrGetValue) return true // function local variable access // getter for a field e.g. this.varvar if (value is IrCall && value.symbol.owner.isGetter // <something>.property && value.dispatchReceiver is IrGetValue // <something> is a function local variable ) return true return false } private fun isSingleStatementReturnPure(function: IrFunction): Boolean { val body = function.body ?: return false if (body is IrSyntheticBody) return false // Not sure what this IS, but it has no statements if (body.statements.size != 1) return false val statement = body.statements[0] if (statement !is IrReturn) return false val value = statement.value if (value is IrConst) return true if (value is IrGetValue && !value.symbol.owner.let { it is IrVariable && it.isVar }) return true if (value is IrCall && value.symbol.owner.isGetter && // <something>.property value.dispatchReceiver is IrGetValue // <something> is a function-local value, not variable && !(value.dispatchReceiver as IrGetValue).symbol.owner.let { it is IrVariable && it.isVar } && value.symbol.owner.correspondingPropertySymbol?.owner?.isVar == false) return true return false } } // overriddenSymbols only gives you the *direct* overrides, not the transitive ones. internal fun getAllOverriddenFunctions(function: IrSimpleFunction): Sequence<IrSimpleFunction> { return function.overriddenSymbols.asSequence() .flatMap { val owner = it.owner sequenceOf(owner) + getAllOverriddenFunctions(owner) } }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/validation/FunctionPurity.kt
Kotlin
package yairm210.purity.validation enum class FunctionPurity{ None, Readonly, Pure }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/validation/PurityElementTransformer.kt
Kotlin
package yairm210.purity.validation import org.jetbrains.kotlin.DeprecatedForRemovalCompilerApi import org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity import org.jetbrains.kotlin.descriptors.DescriptorVisibilities import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.backend.js.utils.parentEnumClassOrNull import org.jetbrains.kotlin.ir.declarations.IrProperty import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction import org.jetbrains.kotlin.ir.expressions.IrConst import org.jetbrains.kotlin.ir.expressions.impl.IrVarargImpl import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.name.FqName import yairm210.purity.PurityConfig import yairm210.purity.boilerplate.DebugLogger /** * Iterates over all functions in the IR. * For each function, creates a CheckFunctionPurityVisitor to raise errors for that specific function. * */ internal class PurityElementTransformer( private val debugLogger: DebugLogger, private val purityConfig: PurityConfig, ) : IrElementTransformerVoidWithContext() { // These are created behind the scenes for every class, don't warn for them private val autogeneratedFunctions = setOf( "equals", "hashCode", "toString" ) private val enumAutogeneratedFunctions = setOf( "values", "valueOf", "compareTo", "clone" ) private fun isAutogeneratedFunction(function: IrSimpleFunction): Boolean { val name = function.name.asString() return autogeneratedFunctions.contains(name) || name.startsWith('<') // auto-generated functions like <init>, <get-name>, <set-name> || function.parentEnumClassOrNull != null && (name in enumAutogeneratedFunctions) // Enum values function || function.parentClassOrNull?.isData == true && ExpectedFunctionPurityChecker.componentRegex.matches(name) // componentN functions for data classes || function.parentClassOrNull?.isData == true && name == "copy" // copy function for data classes } @OptIn(DeprecatedForRemovalCompilerApi::class) private fun isSuppressed(declaration: IrSimpleFunction): Boolean { val allInheritedAnnotations = declaration.annotations + getAllOverriddenFunctions(declaration).flatMap { it.annotations } val suppressFqName = FqName("kotlin.Suppress") val suppressAnnotations = allInheritedAnnotations.filter { it.isAnnotation(suppressFqName) } if (suppressAnnotations.isEmpty()) return false // getAnnotationArgumentValue does not work for varargs, so we find the vararg //.flatmap{} instead of .valueArguments[0] because Suppress can be called with zero parameters also -_- @Suppress("UNCHECKED_CAST") val suppressParameters: List<String> = suppressAnnotations .flatMap { annotation -> List(annotation.valueArgumentsCount) { annotation.getValueArgument(it) } } // arguments of function and all overridden functions .flatMap { (it as IrVarargImpl).elements } .mapNotNull{it as? IrConst} .map { it.value.toString() } return suppressParameters.contains("purity") } override fun visitPropertyNew(declaration: IrProperty): IrStatement { if (declaration.visibility != DescriptorVisibilities.PRIVATE && declaration.hasAnnotation(Annotations.Cache)){ val message = "Variable \"${declaration.name}\" is marked as \"@Cache\", but is public - this annotation is reserved for private variables" debugLogger.messageCollector.report( CompilerMessageSeverity.ERROR, message, location = getLocationForExpression(declaration.fileEntry, declaration) ) } return super.visitPropertyNew(declaration) } override fun visitSimpleFunction(declaration: IrSimpleFunction): IrStatement { if (isAutogeneratedFunction(declaration)) return super.visitSimpleFunction(declaration) // Skip interface/abstract functions that are not implemented if (declaration.body == null) return super.visitSimpleFunction(declaration) if (isSuppressed(declaration)) return super.visitSimpleFunction(declaration) val functionDeclaredPurity = when { ExpectedFunctionPurityChecker.isMarkedAsPure(declaration, purityConfig) -> FunctionPurity.Pure ExpectedFunctionPurityChecker.isReadonly(declaration, purityConfig) -> FunctionPurity.Readonly else -> FunctionPurity.None } val messageCollector = debugLogger.messageCollector val visitor = CheckFunctionPurityVisitor(declaration, functionDeclaredPurity, messageCollector, purityConfig) declaration.accept(visitor, Unit) val actualPurity = visitor.actualFunctionPurity() if (visitor.hasExpectCompileErrorAnnotation) { // opposite land - fail is success, success is fail // We use hasErrored and not function purity, because there are other kinds of exceptions // For example, passing a non-readonly variable to a @Readonly parameter doesn't violate purity, but it is an error! if (!visitor.hasErrored) messageCollector.report( CompilerMessageSeverity.ERROR, "Function \"${declaration.name}\" should fail on purity checks, but succeeds!", location = getLocationForExpression(declaration, declaration) ) return super.visitSimpleFunction(declaration) } val shouldWarnForPossibleAnnotations = functionDeclaredPurity < actualPurity && purityConfig.warnOnPossibleAnnotations && !isAutogeneratedFunction(declaration) && !declaration.overriddenSymbols.any() // not inherited && declaration.parentClassOrNull?.isInterface != true if (shouldWarnForPossibleAnnotations) { // if equal, no message; If less that declared, we already warn for each individual violation val message = when (actualPurity) { FunctionPurity.Pure -> "Function \"${declaration.name}\" can be marked with @Pure to indicate it is pure" FunctionPurity.Readonly -> "Function \"${declaration.name}\" can be marked with @Readonly to indicate it is readonly" else -> throw Exception("Unexpected function purity: $actualPurity") } debugLogger.messageCollector.report( CompilerMessageSeverity.WARNING, message, location = getLocationForExpression(declaration, declaration) ) } return super.visitSimpleFunction(declaration) } }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/validation/wellknown/WellKnownInternalStateClasses.kt
Kotlin
package yairm210.purity.validation.wellknown /** Classes that hold state internally. * This means that if this function created that class, and it does not leak, it can call all functions on it and be considered pure */ val wellKnownInternalStateClasses = setOf( "kotlin.collections.MutableList", "kotlin.collections.MutableSet", "kotlin.collections.MutableMap", "kotlin.collections.List", "kotlin.collections.Set", "kotlin.collections.Map", "kotlin.collections.ArrayDequeue", "java.lang.StringBuilder", "java.util.EnumMap", "java.util.HashMap", "java.util.LinkedHashMap", "java.util.ArrayList", "java.util.HashSet", "java.util.LinkedHashSet", "java.util.BitSet", "java.util.concurrent.ConcurrentHashMap", "java.util.TreeMap", )
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/validation/wellknown/WellKnownNewInstanceFunctions.kt
Kotlin
package yairm210.purity.validation.wellknown /** Functions that return a new instance * This means that if the type is InternalState, * the vals created are guaranteed to be LocalState, just like for constructors * This is unnecessary for immutable classes, or for functions known to be pure - * They must by definition return a new instance, or they wouldn't be able to return consistent results * */ val wellKnownNewInstanceFunctions = setOf( "kotlin.collections.distinct", "kotlin.collections.distinctBy", "kotlin.collections.distinctBy", "kotlin.collections.drop", "kotlin.collections.dropWhile", "kotlin.collections.filter", "kotlin.collections.filterIndexed", "kotlin.collections.filterNot", "kotlin.collections.filterNotNull", "kotlin.collections.flatMap", "kotlin.collections.flatMapIndexed", "kotlin.collections.flatten", ) + getCommonNewInstanceSequenceIterableFunctions().asSequence() fun getCommonNewInstanceSequenceIterableFunctions(): Set<String> { val iterableSequenceCommonFunctions = setOf( // Many of these return a new list for iterator, but NOT for sequence "associate", "associateBy", "associateWith", "chunked", // "distinctBy", // "drop", // not for sequence // "dropWhile", // "filter", // "filterIndexed", // "filterNot", // "filterNotNull", // "flatMap", // not for sequence // "flatMapIndexed", // "flatten",// not for sequence "groupBy", "partition", "sorted", "sortedBy", "sortedByDescending", "sortedDescending", "sortedWith", "sortedWithComparator", "toArray", "toHashSet", "toList", "toMap", "toMutableList", "toMutableMap", "toMutableSet", "toSet", "toSortedSet", "windowed", // "zip", // "zipWithNext" ) val fullyQualifiedFunctionNames = mutableSetOf<String>() for (prefix in listOf("kotlin.sequences.", "kotlin.collections.")){ for (function in iterableSequenceCommonFunctions) { fullyQualifiedFunctionNames += prefix + function } } return fullyQualifiedFunctionNames }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/validation/wellknown/WellKnownPureClasses.kt
Kotlin
package yairm210.purity.validation.wellknown val wellKnownPureClasses = setOf( "kotlin.Int", "kotlin.Long", "kotlin.Float", "kotlin.Double", "kotlin.Number", "kotlin.Boolean", "kotlin.Char", "kotlin.String", "kotlin.text.Regex", // Even when reading, we read a string, which is immutable "kotlin.text.MatchResult", "kotlin.ranges.IntRange", "kotlin.ranges.LongRange", "kotlin.ranges.CharRange", "kotlin.ranges.FloatRange", "kotlin.ranges.DoubleRange", "kotlin.enums.EnumEntries", "java.text.NumberFormat", "java.text.DecimalFormat", "java.util.Locale", "java.util.UUID", "java.lang.Integer", "java.lang.StackTraceElement", "java.lang.Math", )
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/validation/wellknown/WellKnownPureFunctions.kt
Kotlin
package yairm210.purity.validation.wellknown val wellKnownPureFunctions = setOf( "kotlin.internal.ir.CHECK_NOT_NULL", // AKA !! "kotlin.internal.ir.noWhenBranchMatchedException", "kotlin.internal.ir.EQEQEQ", "kotlin.to", "kotlin.assert", "kotlin.require", "kotlin.requireNotNull", "kotlin.check", "kotlin.checkNotNull", "kotlin.lazy", "kotlin.getValue", "kotlin.error", "kotlin.repeat", "kotlin.let", "kotlin.run", "kotlin.also", "kotlin.apply", "kotlin.with", "kotlin.takeIf", "kotlin.takeUnless", "kotlin.collections.mutableListOf", "kotlin.collections.mutableSetOf", "kotlin.collections.mutableMapOf", "kotlin.collections.listOf", "kotlin.collections.setOf", "kotlin.collections.mapOf", "kotlin.collections.emptyList", "kotlin.collections.emptySet", "kotlin.collections.emptyMap", "kotlin.collections.arrayListOf", "kotlin.collections.hashSetOf", "kotlin.collections.hashMapOf", "kotlin.collections.linkedMapOf", "kotlin.sequences.sequenceOf", "kotlin.sequences.generateSequence", "kotlin.collections.component1", // required for destructuring declarations "kotlin.collections.component2", "kotlin.sequences.sequence", "kotlin.sequences.SequenceScope.yield", "kotlin.sequences.SequenceScope.yieldAll", "kotlin.sequences.emptySequence", "kotlin.io.println", // not TECHNICALLY pure, but PRACTICALLY pure - used for debug logs "kotlin.io.print", "java.util.regex.Pattern.matcher", "java.util.regex.Matcher.find", "java.util.regex.Matcher.replaceAll", ) val wellKnownPureFunctionsPrefixes = listOf( "kotlin.text.", "kotlin.ranges.", "kotlin.math.", "kotlin.comparisons.", "kotlin.random.", )
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/validation/wellknown/WellKnownReadonlyClasses.kt
Kotlin
package yairm210.purity.validation.wellknown /** All the functions of these are readonly */ val wellKnownReadonlyClasses = setOf( "kotlin.collections.List", "kotlin.collections.Set", "kotlin.collections.Map", "kotlin.collections.Collection", "kotlin.collections.Iterator", "kotlin.collections.IntIterator", "kotlin.sequences.Sequence", )
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
compiler-plugin/src/main/kotlin/yairm210/purity/validation/wellknown/WellKnownReadonlyFunctions.kt
Kotlin
package yairm210.purity.validation.wellknown // Where possible, use interfaces that cover a lot of classes val wellKnownReadonlyFunctions = setOf( // Somehow Kotlin manages to make "overridden symbols" for hashmap functions contain AbstractMap and // kotlin.collections.MutableMap and kotlin.collections.Map. But NOT Java.util.Map. WTF? "kotlin.collections.Map.isEmpty", "kotlin.collections.Map.containsKey", "kotlin.collections.Map.containsValue", "kotlin.collections.Map.get", // Collection "java.util.AbstractCollection.contains", "java.util.AbstractCollection.isEmpty", "java.util.AbstractCollection.size", "java.util.AbstractCollection.iterator", "java.util.AbstractList.get", "java.util.BitSet.get", // kotlin collections "kotlin.collections.Iterator.hasNext", "kotlin.collections.Iterator.next", "kotlin.collections.Iterable.iterator", "kotlin.collections.Collection.isEmpty", "kotlin.collections.Collection.contains", "kotlin.collections.Collection.containsAll", "kotlin.collections.List.indexOf", "kotlin.collections.get", "kotlin.collections.getOrNull", "kotlin.collections.getOrElse", "kotlin.collections.containsKey", "kotlin.collections.containsValue", "kotlin.collections.dropLastWhile", "kotlin.collections.isNullOrEmpty", "kotlin.collections.filterKeys", "kotlin.collections.minus", // creates a new instance "kotlin.collections.plus", // creates a new instanceg "kotlin.collections.reversed", "kotlin.collections.intersect", "kotlin.collections.getValue", "kotlin.collections.randomOrNull", "kotlin.collections.subtract", "kotlin.collections.union", "kotlin.collections.intersect", "kotlin.collections.sortBy", "kotlin.collections.random", "kotlin.collections.shuffled", "kotlin.Array.get", "kotlin.hashCode", // Java Reflection "java.lang.Class.getField", "java.lang.Class.getFields", "java.lang.Class.getMethod", "java.lang.Class.getMethods", "java.lang.Class.getDeclaredField", "java.lang.Class.getDeclaredFields", "java.lang.Class.getDeclaredMethod", "java.lang.Class.getDeclaredMethods", "java.lang.Class.getAnnotation", "java.lang.Class.getAnnotations", "java.lang.Class.getDeclaredAnnotation", "java.lang.Class.getDeclaredAnnotations", "java.lang.Class.getPackage", "java.lang.Class.getSimpleName", "java.lang.Class.getName", "java.lang.Class.getCanonicalName", "java.lang.Class.getTypeName", "java.lang.Class.getInterfaces", "java.lang.Class.getSuperclass", "java.lang.Class.isArray", "java.lang.Class.isEnum", "java.lang.Class.isInstance", "java.lang.Class.isAssignableFrom", "java.lang.Class.isAnnotation", "java.lang.Class.isInterface", "java.lang.Class.isPrimitive", "java.lang.Class.isSynthetic", "java.lang.Class.isAnonymousClass", "java.lang.Class.isLocalClass", "java.lang.Class.isMemberClass", "java.lang.Class.getEnumConstants", "java.lang.reflect.Field.getAnnotation", "java.lang.reflect.Field.getAnnotations", "java.lang.reflect.Field.getDeclaredAnnotation", "java.lang.reflect.Field.getDeclaredAnnotations", "java.lang.reflect.Field.getType", "java.lang.reflect.Field.getTypeName", "java.lang.reflect.Field.getName", "java.lang.reflect.Field.getModifiers", "java.lang.reflect.Field.getDeclaringClass", "java.lang.reflect.Field.get", "java.lang.reflect.Field.getBoolean", "java.lang.reflect.Field.getByte", "java.lang.reflect.Field.getChar", "java.lang.reflect.Field.getShort", "java.lang.reflect.Field.getInt", "java.lang.reflect.Field.getLong", "java.lang.reflect.Field.getFloat", "java.lang.reflect.Field.getDouble", "java.lang.reflect.Field.getGenericType", "java.lang.reflect.Field.getGenericTypeName", "java.lang.reflect.Field.getGenericType", // Kotlin Reflection "kotlin.reflect.KMutableProperty0.get", "kotlin.reflect.KMutableProperty1.get", "kotlin.reflect.KMutableProperty2.get", "kotlin.Throwable.getStackTrace", ) + getCommonSequenceIterableFunctions() fun getCommonSequenceIterableFunctions(): Set<String>{ val iterableSequenceCommonFunctions = setOf( "all", "any", "asIterable", "asSequence", "associate", "associateBy", "associateWith", "average", "chunked", "contains", "containsAll", "count", "distinct", "distinctBy", "drop", "dropWhile", "elementAt", "elementAtOrElse", "elementAtOrNull", "filter", "filterIndexed", "filterNot", "filterNotNull", "find", "findLast", "first", "firstOrNull", "flatMap", "flatMapIndexed", "flatten", "fold", "forEach", "forEachIndexed", "groupBy", "groupingBy", "ifEmpty", "indexOf", "indexOfFirst", "indexOfLast", "isEmpty", "isNotEmpty", "iterator", "joinToString", "last", "lastIndexOf", "lastOrNull", "map", "mapIndexed", "mapIndexedNotNull", "mapNotNull", "max", "maxBy", "maxByOrNull", "maxOf", "maxOfOrNull", "maxOrNull", "min", "minBy", "minByOrNull", "minOf", "minOfOrNull", "minOrNull", "none", "partition", "plus", "reduce", "single", "singleOrNull", "sorted", "sortedBy", "sortedByDescending", "sortedDescending", "sortedWith", "sortedWithComparator", "sum", "sumBy", "sumByDouble", "sumByLong", "sumOf", "take", "takeWhile", "toArray", "toHashSet", "toList", "toMap", "toMutableList", "toMutableMap", "toMutableSet", "toSet", "toSortedSet", "windowed", "withIndex", "zip", "zipWithNext" ) val fullyQualifiedFunctionNames = mutableSetOf<String>() for (prefix in listOf("kotlin.sequences.", "kotlin.collections.")){ for (function in iterableSequenceCommonFunctions) { fullyQualifiedFunctionNames += prefix + function } } return fullyQualifiedFunctionNames }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
gradle-plugin/build.gradle.kts
Kotlin
import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { kotlin("jvm") version("2.2.0") kotlin("kapt") version("2.2.0") id("com.gradle.plugin-publish") version "2.0.0" } // Not sure if required - there's no Java :think: java.targetCompatibility = JavaVersion.VERSION_1_8 // Make KAPT stubs Java 8 compatible kotlin { compilerOptions { jvmTarget.set(JvmTarget.JVM_1_8) } } allprojects { repositories { mavenLocal() mavenCentral() maven("https://maven.google.com") maven("https://plugins.gradle.org/m2/") google() } } dependencies { implementation("org.jetbrains.kotlin:kotlin-gradle-plugin-api:2.2.20") } group = "io.github.yairm210" version = "1.3.2" gradlePlugin { website = "https://github.com/yairm210/purity" vcsUrl = "https://github.com/yairm210/purity.git" plugins { create("simplePlugin") { id = "io.github.yairm210.purity-plugin" // users will do `apply plugin: "io.github.yairm210.purity-plugin"` displayName = "Kotlin Purity Plugin" description = "A Kotlin compiler plugin that allows you to mark functions as pure and readonly, enabling optimizations and better code analysis." implementationClass = "yairm210.purity.PurityGradlePlugin" // entry-point class tags = listOf("kotlin", "compiler-plugin", "purity", "pure-functions", "readonly") } } } tasks.register("sourcesJar", Jar::class) { group = "build" description = "Assembles Kotlin sources" archiveClassifier.set("sources") from(sourceSets.main.get().allSource) dependsOn(tasks.classes) } tasks.build { // makes every build also publish locally dependsOn("publishToMavenLocal") }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
gradle-plugin/src/main/kotlin/yairm210/purity/PurityGradlePlugin.kt
Kotlin
package yairm210.purity import org.gradle.api.Project import org.gradle.api.provider.Provider import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerPluginSupportPlugin import org.jetbrains.kotlin.gradle.plugin.SubpluginArtifact import org.jetbrains.kotlin.gradle.plugin.SubpluginOption open class PurityConfiguration { var enabled: Boolean = true /** If true, adds warnings where @Readonly or @Pure annotations can be added */ var warnOnPossibleAnnotations: Boolean = false /** Fully-qualified names of classes where all functions are pure */ var wellKnownPureClasses = setOf<String>() /** Fully-qualified names of pure functions */ var wellKnownPureFunctions = setOf<String>() /** Fully-qualified names of classes where all functions are readonly */ var wellKnownReadonlyClasses = setOf<String>() /** Fully-qualified names of readonly functions */ var wellKnownReadonlyFunctions = setOf<String>() /** Fully-qualified names of classes which alter state, but only internally (e.g. List, HashMap, Set). * Newly constructed instances of this class are recognized automatically as @LocalState in functions */ var wellKnownInternalStateClasses = setOf<String>() } @Suppress("unused") class PurityGradlePlugin : KotlinCompilerPluginSupportPlugin { companion object { const val COMPILER_PLUGIN_GROUP_NAME = "io.github.yairm210" const val ARTIFACT_NAME = "purity-compiler-plugin" const val VERSION_NUMBER = "1.3.2" } private var gradleExtension : PurityConfiguration = PurityConfiguration() override fun applyToCompilation(kotlinCompilation: KotlinCompilation<*>): Provider<List<SubpluginOption>> { gradleExtension = kotlinCompilation.target.project.extensions.findByType(PurityConfiguration::class.java) ?: PurityConfiguration() return kotlinCompilation.target.project.provider { val options = mutableListOf( // TODO: Find a way to sync the key names between projects - other side is in PurityCommandLineProcessor SubpluginOption("enabled", gradleExtension.enabled.toString()), SubpluginOption("warnOnPossibleAnnotations", gradleExtension.warnOnPossibleAnnotations.toString()), SubpluginOption("wellKnownPureClasses", gradleExtension.wellKnownPureClasses.joinToString("_")), SubpluginOption("wellKnownPureFunctions", gradleExtension.wellKnownPureFunctions.joinToString("_")), SubpluginOption("wellKnownReadonlyClasses", gradleExtension.wellKnownReadonlyClasses.joinToString("_")), SubpluginOption("wellKnownReadonlyFunctions", gradleExtension.wellKnownReadonlyFunctions.joinToString("_")), SubpluginOption("wellKnownInternalStateClasses", gradleExtension.wellKnownInternalStateClasses.joinToString("_")), ) options } } override fun apply(target: Project) { target.extensions.create( "purity", PurityConfiguration::class.java ) super.apply(target) } override fun getCompilerPluginId(): String = "purityPlugin" override fun isApplicable(kotlinCompilation: KotlinCompilation<*>): Boolean { return true } override fun getPluginArtifact(): SubpluginArtifact = SubpluginArtifact( groupId = COMPILER_PLUGIN_GROUP_NAME, artifactId = ARTIFACT_NAME, version = VERSION_NUMBER // remember to bump this version before any release! ) }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
lib/build.gradle.kts
Kotlin
import yairm210.purity.PurityConfiguration plugins { id("org.jetbrains.kotlin.multiplatform") version libs.versions.kotlin id("io.github.yairm210.purity-plugin") version "1.0.3" // This is overridden in settings so the version doesn't matter } configure<PurityConfiguration> { enabled = true warnOnPossibleAnnotations = false wellKnownPureClasses = setOf("kotlin.ranges.IntRange") wellKnownPureFunctions = setOf("hi","bob") wellKnownReadonlyClasses = setOf("kotlin.sequences.Sequence") wellKnownReadonlyFunctions = setOf("java.util.EnumMap.get") wellKnownInternalStateClasses = setOf("my.internal.list") } kotlin { jvm() jvmToolchain(8) // test plugin compatibility to older jvm // linuxX64("linux") // js() sourceSets { val commonMain by getting { dependencies { implementation(project(":annotations")) } } // val jsMain by getting { // // dependencies { // // } // } val jvmMain by getting { dependencies { implementation(project(":annotations")) } } // val linuxMain by getting { // // } } }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
lib/src/commonMain/kotlin/sample/Sample.kt
Kotlin
package sample expect class Sample() { fun checkMe(): Int } expect object Platform { val name: String } fun hello(): String = "Hello from ${Platform.name}" class _MyTestProvider : MyTest{ override fun print(){ println("Hello from _MyTestProvider") } } interface MyTest{ fun print() } fun <T> create(myTestProvider: MyTest? = null): MyTest { return myTestProvider!! }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
lib/src/jsMain/kotlin/sample/SampleJs.kt
Kotlin
package sample actual class Sample { actual fun checkMe() = 12 } actual object Platform { actual val name: String = "JS" }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
lib/src/jvmMain/kotlin/sample/JvmSampleTests.kt
Kotlin
package sample import yairm210.purity.annotations.* import java.util.* import kotlin.collections.HashMap actual class Sample { actual fun checkMe() = 42 } actual object Platform { actual val name: String = "JVM" } fun testUnmarkedFunctionCanGetAndSetVariables() { var x = 5 fun unmarkedGetX() = x fun unmarkedSetX(value: Int) { x = value } } enum class MyEnum { A, B } fun testWellKnownReadonlyFunctions(){ val map = HashMap<String, String>() @Readonly fun correctReadonlyInterfaceOverrideUsage(): Boolean { return map.containsKey("key") } val enumMap = EnumMap<MyEnum, String>(MyEnum::class.java) @Readonly fun getUniques(uniqueType: MyEnum) = enumMap[uniqueType] ?.asSequence() ?: emptySequence() @Readonly fun sequenceChaining(): String { return sequenceOf("Hello, ", "World!") .joinToString(separator = "") } } fun testClassVariableRetrieval(){ class A{ var x = 5 @Readonly fun getXReadonly() = x @Pure @TestExpectCompileError fun getXPure() = x } class B { val x = 5 @Pure fun getXX() = x } } fun testFunctionVariableGetSet(){ var functionVariable = 3 @Readonly // RIGHT: readonly, because reading external variables is allowed fun readonlyGetVariable(): Int { return functionVariable } @Pure @TestExpectCompileError fun pureGetVariable(): Int { return functionVariable } @Readonly @TestExpectCompileError fun readonlySetVariable() { functionVariable = 4 } @Pure @TestExpectCompileError fun pureSetVariable() { functionVariable = 4 } } fun testFunctionsCanOnlyCallTheirPurityAndHigher() { fun unmarkedFunction(){} @Readonly fun readonlyFunction(){} @Pure fun pureFunction(){} @Readonly fun readonlyCorrect(){ readonlyFunction() pureFunction() // Allowed, since pure is higher than readonly } @Readonly @TestExpectCompileError fun readonlyIncorrect(){ unmarkedFunction() // NOT allowed, since unmarked is lower than readonly } @Pure fun pureCorrect(){ pureFunction() // Allowed, since pure is equal to pure } @Pure @TestExpectCompileError fun pureIncorrectReadonly(){ readonlyFunction() // NOT allowed, since readonly is lower than pure } @Pure @TestExpectCompileError fun pureIncorrectRUnmarked(){ unmarkedFunction() // NOT allowed, since readonly is lower than pure } } fun testReadonlyFunctionsOnImmutableFunctionVariableConsideredPure(){ @Immutable val immutableList = arrayListOf(1,2,3) @Pure fun readImmutable(index: Int): Int { immutableList.filter { it > 2 } // allowed as 'extensionReceiver is @Immutable' return immutableList[index] // allowed as 'dispatchReceiver is @Immutable' } @Pure @TestExpectCompileError fun writeImmutable(){ // @Immutable only allows readonly functions to be considered pure, not write functions immutableList.add(4) // This is not allowed, so this function is not pure } } fun testReadonlyFunctionsOnImmutableClassPropertyConsideredPure(){ class A{ @Immutable val immutableList = arrayListOf(1,2,3) @Pure fun readImmutable(index: Int): Int { immutableList.filter { it > 2 } // allowed as 'extensionReceiver is @Immutable' return immutableList[index] // allowed as 'dispatchReceiver is @Immutable' } @Pure @TestExpectCompileError fun writeImmutable(){ // @Immutable only allows readonly functions to be considered pure, not write functions immutableList.add(4) // This is not allowed, so this function is not pure } } } fun testLocalStatesAlterable() { @Readonly fun getArrayList() = ArrayList<String>() @Readonly fun alterInnerStateClass() { @LocalState val existingArrayList = getArrayList() existingArrayList.add("string") // Anything is allowed on a LocalState variable } } fun testAutorecognizeSingleReturnFunctionOnValAsPure(){ // On function variables val map = mapOf(1 to 2, 3 to 4) fun returnMap() = map // Autorecognized as pure @Pure fun getReturnMap() = returnMap() // can call pure function // On class properties class SampleClass { val map = mapOf(1 to 2, 3 to 4) fun returnMap() = this.map @Pure fun getReturnMutableMap() = returnMap() } } fun testAutorecognizeSingleReturnFunctionOnVarAsReadonly(){ class SampleClass { var mutableMap = mutableMapOf(1 to 2, 3 to 4) fun returnMutableMap() = mutableMap @Readonly fun getReturnMutableMap() = returnMutableMap() @Pure @TestExpectCompileError // returnMutableMap is recognized as readonly, not pure fun incorrectPureGetReturnMutableMap() = returnMutableMap() // This is not pure, because it returns a mutable map } } // Apparently interfaces cannot be defined within functions, who knew? interface AreaCalculator { @Pure fun area(): Int } fun testMarkingInterfaceMarksImplementations() { // If an interface is marked as @Pure, all implementations are considered pure class Square(val width: Int) : AreaCalculator { override fun area(): Int = width * width // Checked as if the function is marked with @Pure @Pure fun otherFunction(): Int = area() // Can call area() since it is considered @Pure } } @TestExpectCompileError // This is a hack - since internal notPassablePasser fails on passing function references, this will fail too // I couldn't find a way to check IrCall parameter passing *only* at the bottom-most function, which annoys me -_- fun testPassingReadonlyFunction() { @Readonly fun invoker(@Readonly function: (Int) -> Unit) { function(4) // Can invoke input params marked as @Readonly } // Can even invoke non-Readonly function - see documentation @Readonly fun invokerError(function: (Int) -> Unit) { function(4) } // We sent a non-readonly function, so this should fail fun testFunctionNotReadonly() { invoker @TestExpectCompileError { i: Int -> println("Hello, World!") } } fun testFunctionReadonly() = invoker { 1 + 1 } fun testPassThroughFunction() { fun passThroughReadonly(@Readonly function: (Int) -> Unit) = invoker(function) // allowed, since function is marked as @Readonly as well fun pureReceiver(@Pure function: (Int) -> Unit) {} fun passThroughPure(@Pure function: (Int) -> Unit) = pureReceiver(function) // allowed, since function is marked as @Readonly as well fun passThroughPureToReadonly(@Pure function: (Int) -> Unit) = invoker(function) } class ClassWithReadonlyFunction { @Readonly fun passable(i: Int) {} fun passer() = invoker(::passable) fun notPassable(i: Int) {} @TestExpectCompileError fun notPassablePasser() { invoker(::notPassable) // This should fail, since notPassable is not marked as @Readonly } } var f = 5 fun testUnacceptableDefaultValue( @Readonly function: (Int) -> Unit = @TestExpectCompileError { f = 6 } // Default function is marked as @Readonly ) {} fun testAcceptableDefaultValue( @Readonly function: (Int) -> Unit = { println() } // Default function is marked as @Readonly ) {} fun testCallingUsingDefault(){ testAcceptableDefaultValue() } } enum class Order{ First, Second, Third } fun testEnumComparisonIsPure() { @Pure fun isHigherThan(orderA: Order, orderB: Order) = orderA > orderB } fun testDataClassDestructuringConsideredPureOrReadonly() { @Pure fun splitDataClass() { val pair = "example" to 42 // destructuring declarations of immmutable data classes are considered pure val (str, num) = pair } data class MutablePair(var first: String, var second: Int) @Readonly fun splitMutableDataClassReadonly() { val pair = MutablePair("example", 42) val (str, num) = pair } @Pure @TestExpectCompileError fun splitMutableDataClassPure() { val pair = MutablePair("example", 42) val (str, num) = pair // destructuring declarations are considered pure } } fun testDestructureHashmapEntries(){ @Readonly fun splitHashmapEntries() { val hashmap = hashMapOf("key1" to "value1", "key2" to "value2") for ((key, value) in hashmap) { var result = "$key: $value" } } } fun testCache(){ class withCache { @Cache private val cacheMap: MutableMap<Int, Int> = mutableMapOf() @Readonly fun cachedMutatingFunction(input: Int): Int { return cacheMap.getOrPut(input){input * 2} } @Cache private var value = 0 @Readonly fun cachedSettingFunction(input: Int): Int { if (value == 0) value = 42 // "heavy processing function" return value } } } fun testWellKnownPureClassesConsideredImmutable() { @Pure fun useWellKnownPureClasses() { val string = "Hello, World!" var sumOfChars = 0 string.indices.forEach { sumOfChars += string[it].code } } } fun testFunctionsCanSafelyCallSubfunctions(){ // Function purity checks include all subfunction code - so the only difference is if they write to function-local variables or not @Pure fun functionTested(): Int { var internal = 0 fun subFunction(){ internal += 1 } subFunction() return internal } } fun testVarargsConsideredImmutable(){ @Pure fun varargsFunction(vararg numbers: Int): Int { return numbers.sum() // varargs are considered immutable, so this is pure } } fun testNestedFunctionsCanBeCalled(){ @Readonly fun readonlySequence() = sequence { var i = 0 fun changeLocalVariable(){ i = 1 } changeLocalVariable() yield(1) } } fun testLocalStateRecognizedAutomaticallyForKnownClasses(){ @Pure fun alterInnerStateClass() { val existingArrayList = ArrayList<String>() existingArrayList.add("string") // Anything is allowed on a LocalState variable } @Pure fun alterInnerStateClassFromPureFunction() { val existingArrayList = hashSetOf("hi") existingArrayList.add("string") // Anything is allowed on a LocalState variable } } fun testInheritingFunctionsInheritSuppression(){ var external = 0 open class A{ @Pure @Suppress("purity") open fun suppressed() {} } class B : A() { override fun suppressed() { external += 1 } } } fun testForLocalStateAnnotation() { @Readonly fun localStateFunction() { // This is recognized as local state val localListOfLists = mutableListOf(mutableListOf<String>(), mutableListOf()) // This is not for (@LocalState item in localListOfLists) { item.add("hi") } } } fun testInternalClassesConsideredLocalState(){ class NotDeclaredInternal{ var x = 2 fun doSomething() { x = 4 } } @Readonly @TestExpectCompileError fun notInternalUser(){ val notInternal = NotDeclaredInternal() notInternal.doSomething() } @InternalState class DeclaredInternal{ var x = 2 fun doSomething() { x = 4 } } @Readonly fun internalUser(){ val notInternal = DeclaredInternal() notInternal.doSomething() } } fun testPlusEqualsSet(){ @InternalState class Internal(var a:Int) @Pure fun testCanPlusSetInternal(){ val bob = Internal(3) bob.a += 2 } class Local(var a:Int) @Pure fun testCanPlusSetLocal(){ @LocalState val bob = Local(3) bob.a += 2 } } fun testWellKnownNewInstanceFunctionsDetermineLocalState(){ @Pure fun testIterableCreatesNew(){ val list = listOf(1, 2, 3) val mutableList = list.toMutableList() mutableList.add(4) } } // //fun testCustomValGetterNotReadonly(){ // class A { // var i: Int = 0 // val j: Int // get() = ++i // } // // @Readonly @TestExpectCompileError // fun testCanPlusCustomValGetter(){ // val bob = A() // print(bob.j) // } //}
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
lib/src/linuxMain/kotlin/sample/SampleLinux.kt
Kotlin
package sample actual class Sample { actual fun checkMe() = 7 } actual object Platform { actual val name: String = "Native" }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
lib/src/linuxTest/kotlin/sample/SampleTestsNative.kt
Kotlin
package sample import kotlin.test.Test import kotlin.test.assertTrue class SampleTestsNative { @Test fun testHello() { assertTrue("Native" in hello()) } }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
settings.gradle.kts
Kotlin
includeBuild("gradle-plugin") includeBuild("compiler-plugin"){ dependencySubstitution { // for lib, even though it gets purity-compiler-plugin dependency via gradle plugin, will still use local compiler-plugin substitute(module("io.github.yairm210:purity-compiler-plugin")) .using(project(":")) } } include(":annotations") include(":lib") // Allow plugins from local - required for lib to get the gradle plugin from our maven local pluginManagement { repositories { mavenLocal() gradlePluginPortal() } }
yairm210/Purity
40
Kotlin Compiler Plugin for validating Pure and Readonly functions
Kotlin
yairm210
Yair Morgenstern
build.zig
Zig
const std = @import("std"); const rlz = @import("raylib_zig"); pub fn build(b: *std.Build) !void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const raylib_dep = b.dependency("raylib_zig", .{ .target = target, .optimize = optimize, }); const raylib = raylib_dep.module("raylib"); const raylib_artifact = raylib_dep.artifact("raylib"); const ziglang_set_dep = b.dependency("ziglangSet", .{ .target = target, .optimize = optimize, }); const ziglang_set = ziglang_set_dep.module("ziglangSet"); const exe_mod = b.createModule(.{ .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, }); exe_mod.addImport("raylib", raylib); exe_mod.addImport("ziglangSet", ziglang_set); const run_step = b.step("run", "Run the app"); //web exports are completely separate if (target.query.os_tag == .emscripten) { const emsdk = rlz.emsdk; const wasm = b.addLibrary(.{ .name = "testgame", .root_module = exe_mod, }); const install_dir: std.Build.InstallDir = .{ .custom = "web" }; const emcc_flags = emsdk.emccDefaultFlags(b.allocator, .{ .optimize = optimize }); var emcc_settings = emsdk.emccDefaultSettings(b.allocator, .{ .optimize = optimize }); // Add increased stack size for web compatibility emcc_settings.put("STACK_SIZE", "262144") catch {}; // 256KB stack const emcc_step = emsdk.emccStep(b, raylib_artifact, wasm, .{ .optimize = optimize, .flags = emcc_flags, .settings = emcc_settings, .shell_file_path = emsdk.shell(raylib_dep.builder), .install_dir = install_dir, .embed_paths = &.{.{ .src_path = "resources/" }}, }); b.getInstallStep().dependOn(emcc_step); const html_filename = try std.fmt.allocPrint(b.allocator, "{s}.html", .{wasm.name}); const emrun_step = emsdk.emrunStep( b, b.getInstallPath(install_dir, html_filename), &.{}, ); emrun_step.dependOn(emcc_step); run_step.dependOn(emrun_step); } else { const exe = b.addExecutable(.{ .name = "testgame", .root_module = exe_mod, }); b.installArtifact(exe); const run_cmd = b.addRunArtifact(exe); run_cmd.step.dependOn(b.getInstallStep()); run_step.dependOn(&run_cmd.step); } }
yairm210/Runelocker
0
Zig/raylib strategy game for learning Zig
Zig
yairm210
Yair Morgenstern
src/main.zig
Zig
// raylib-zig (c) Nikolas Wipper 2023 const std = @import("std"); const rl = @import("raylib"); const ZSet = @import("ziglangSet"); const runes = @import("runes.zig"); const Direction = runes.Direction; const Rune = runes.Rune; const GridIndex = runes.GridIndex; const ConnectionIndex = runes.ConnectionIndex; const ToggledWithRound = runes.ToggledWithRound; const ConnectionWithRound = runes.ConnectionWithRound; const ToggleList = runes.ToggleList; const ConnectionSet = runes.ConnectionSet; const RunesClickedResult = runes.RunesClickedResult; const RuneGrid = runes.RuneGrid; const AnimationState = struct { isAnimating: bool = false, currentRound: usize = 0, maxRounds: usize = 0, lastUpdateTime: f64 = 0.0, roundDuration: f64 = 0.2, // 100ms finalHoldDuration: f64 = 0.5, // 500ms finalHoldStartTime: f64 = 0.0, inFinalHold: bool = false, toggledByRound: std.ArrayList(ToggledWithRound), usedConnections: ZSet.Set(ConnectionIndex), connectionsByRound: std.ArrayList(ConnectionWithRound), pub fn deinit(self: *AnimationState, allocator: std.mem.Allocator) void { self.toggledByRound.deinit(allocator); self.usedConnections.deinit(); self.connectionsByRound.deinit(allocator); } }; pub fn main() anyerror!void { // Create a fixed buffer allocator for web compatibility - use larger buffer for animation memory var buffer: [65536]u8 = undefined; // 64KB buffer var fba = std.heap.FixedBufferAllocator.init(&buffer); const allocator = fba.allocator(); // Game state - differs from animation state var grid = RuneGrid(3, 3).init(); var animationState = AnimationState{ .toggledByRound = std.ArrayList(ToggledWithRound){}, .usedConnections = ConnectionSet.init(allocator), .connectionsByRound = std.ArrayList(ConnectionWithRound){}, }; defer animationState.deinit(allocator); try grid.addRune(1, 1, &[_]Direction{.right}); try grid.addRune(2, 1, &[_]Direction{ .left, .down }); try grid.addRune(2, 2, &[_]Direction{.left}); try grid.addRune(1, 2, &[_]Direction{.up}); // Initialization //-------------------------------------------------------------------------------------- const screenWidth = 800; const screenHeight = 450; rl.initWindow(screenWidth, screenHeight, "raylib-zig [core] example - basic window"); defer rl.closeWindow(); // Close window and OpenGL context rl.setTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- // Main game loop while (!rl.windowShouldClose()) { // Detect window close button or ESC key // Update //---------------------------------------------------------------------------------- // Handle animation timing if (animationState.isAnimating) { const currentTime = rl.getTime(); if (!animationState.inFinalHold) { // Check if it's time to advance to next round if (currentTime - animationState.lastUpdateTime >= animationState.roundDuration) { animationState.currentRound += 1; animationState.lastUpdateTime = currentTime; if (animationState.currentRound > animationState.maxRounds) { // Start final hold period animationState.inFinalHold = true; animationState.finalHoldStartTime = currentTime; std.debug.print("Starting final hold period\n", .{}); } else { std.debug.print("Advanced to round {}\n", .{animationState.currentRound}); } } } else { // Check if final hold period is over if (currentTime - animationState.finalHoldStartTime >= animationState.finalHoldDuration) { animationState.isAnimating = false; animationState.inFinalHold = false; std.debug.print("Animation completed\n", .{}); } } } //---------------------------------------------------------------------------------- // Draw //---------------------------------------------------------------------------------- rl.beginDrawing(); defer rl.endDrawing(); rl.clearBackground(.white); const drawSquareFromCenter = struct { fn call(x: i32, y: i32, size: i32, color: rl.Color) void { const halfSize = @divFloor(size, 2); rl.drawRectangle(x - halfSize, y - halfSize, size, size, color); } }.call; const drawPartialRectangleFromCenter = struct { fn call(x: i32, y: i32, width: i32, height: i32, color: rl.Color, progress: f32, direction: Direction) void { const clampedProgress = @max(0.0, @min(1.0, progress)); if (clampedProgress <= 0.0) return; switch (direction) { .left => { // Grow from right edge towards center (from rune towards center) const actualWidth = @as(i32, @intFromFloat(@as(f32, @floatFromInt(width)) * clampedProgress)); const halfHeight = @divFloor(height, 2); rl.drawRectangle(x + @divFloor(width, 2) - actualWidth, y - halfHeight, actualWidth, height, color); }, .right => { // Grow from left edge towards center (from rune towards center) const actualWidth = @as(i32, @intFromFloat(@as(f32, @floatFromInt(width)) * clampedProgress)); const halfHeight = @divFloor(height, 2); rl.drawRectangle(x - @divFloor(width, 2), y - halfHeight, actualWidth, height, color); }, .up => { // Grow from bottom edge towards center (from rune towards center) const actualHeight = @as(i32, @intFromFloat(@as(f32, @floatFromInt(height)) * clampedProgress)); const halfWidth = @divFloor(width, 2); rl.drawRectangle(x - halfWidth, y + @divFloor(height, 2) - actualHeight, width, actualHeight, color); }, .down => { // Grow from top edge towards center (from rune towards center) const actualHeight = @as(i32, @intFromFloat(@as(f32, @floatFromInt(height)) * clampedProgress)); const halfWidth = @divFloor(width, 2); rl.drawRectangle(x - halfWidth, y - @divFloor(height, 2), width, actualHeight, color); }, } } }.call; // for each grid slot draw a square. If a rune is present red, else gray. const blockSize: i32 = 80; const halfblockSize: i32 = @divFloor(blockSize, 2); const gap: i32 = 24; // must divide by 8 so that gap/4 can be "drawn from center" = is divisible by 2 const distanceBetweenBlockCenterAndConnectionCenter: i32 = blockSize / 2 + gap / 4; const mouseX = rl.getMouseX(); const mouseY = rl.getMouseY(); for (grid.runes, 0..) |row, y| { for (row, 0..) |rune, x| { const posX: i32 = @intCast(x * (blockSize + gap) + 300 + halfblockSize); const posY: i32 = @intCast(y * (blockSize + gap) + 100 + halfblockSize); if (rune == null) { drawSquareFromCenter(posX, posY, blockSize, .gray); continue; } const r = rune.?; // Determine rune color based on animation state var runeColor: rl.Color = undefined; var shouldShowActivated = false; if (animationState.isAnimating) { // Check if this rune should be shown as activated in current round for (animationState.toggledByRound.items) |toggle| { if (toggle.GridIndex.x == x and toggle.GridIndex.y == y and toggle.round <= animationState.currentRound) { shouldShowActivated = true; break; } } if (shouldShowActivated) { runeColor = if (r.isActive) rl.Color.maroon else rl.Color.dark_green; } else { runeColor = if (r.isActive) rl.Color.red else rl.Color.lime; } } else { runeColor = if (r.isActive) rl.Color.red else rl.Color.lime; } drawSquareFromCenter(posX, posY, blockSize, runeColor); // Draw oscillating border when hovering over rune (between rune color and orange) if (mouseX >= posX - halfblockSize and mouseX <= posX + halfblockSize and mouseY >= posY - halfblockSize and mouseY <= posY + halfblockSize) { // Create oscillating color between current rune color and orange using sine wave const time = @as(f32, @floatCast(rl.getTime())); const oscillation = (@sin(time * 4.0) + 1.0) * 0.5; // Normalize to 0-1 range // Interpolate between current rune color and orange (255, 165, 0) const orange = rl.Color{ .r = 255, .g = 165, .b = 0, .a = 255 }; const hover_r = @as(u8, @intFromFloat(@as(f32, @floatFromInt(runeColor.r)) * (1.0 - oscillation) + @as(f32, @floatFromInt(orange.r)) * oscillation)); const hover_g = @as(u8, @intFromFloat(@as(f32, @floatFromInt(runeColor.g)) * (1.0 - oscillation) + @as(f32, @floatFromInt(orange.g)) * oscillation)); const hover_b = @as(u8, @intFromFloat(@as(f32, @floatFromInt(runeColor.b)) * (1.0 - oscillation) + @as(f32, @floatFromInt(orange.b)) * oscillation)); const hover_color = rl.Color{ .r = hover_r, .g = hover_g, .b = hover_b, .a = 255 }; rl.drawRectangleLines(posX - halfblockSize - 2, posY - halfblockSize - 2, blockSize + 4, blockSize + 4, hover_color); } // Handle mouse clicks if (rl.isMouseButtonPressed(rl.MouseButton.left)) { if (mouseX >= posX - halfblockSize and mouseX <= posX + halfblockSize and mouseY >= posY - halfblockSize and mouseY <= posY + halfblockSize) { if (!animationState.isAnimating) { // Clear existing data properly animationState.toggledByRound.clearRetainingCapacity(); animationState.usedConnections.clearRetainingCapacity(); animationState.connectionsByRound.clearRetainingCapacity(); if (grid.runeClicked(x, y, allocator, &animationState.toggledByRound, &animationState.usedConnections, &animationState.connectionsByRound)) { // Calculate max rounds var maxRounds: usize = 0; for (animationState.toggledByRound.items) |toggle| { if (toggle.round > maxRounds) { maxRounds = toggle.round; } } // Reset state animationState.isAnimating = true; animationState.currentRound = 0; animationState.inFinalHold = false; animationState.maxRounds = maxRounds; animationState.lastUpdateTime = rl.getTime(); std.debug.print("Animation started: {} rounds, {} runes total\n", .{ animationState.maxRounds + 1, animationState.toggledByRound.items.len }); } } } } // draw connections as smaller rectangles on sides // for each direction... inline for (0..Direction.count) |i| { if (r.isConnected[i]) { const dir: Direction = @enumFromInt(i); var connX: i32 = posX; var connY: i32 = posY; switch (dir) { .up => connY -= distanceBetweenBlockCenterAndConnectionCenter, .down => connY += distanceBetweenBlockCenterAndConnectionCenter, .left => connX -= distanceBetweenBlockCenterAndConnectionCenter, .right => connX += distanceBetweenBlockCenterAndConnectionCenter, } // Determine connection color based on animation state var connectionColor = rl.Color.blue; if (animationState.isAnimating) { const connection = ConnectionIndex{ .from = GridIndex{ .x = x, .y = y }, .direction = dir, }; if (animationState.usedConnections.contains(connection)) { // Calculate fade based on current progress const totalRounds = animationState.maxRounds + 1; const progress = if (totalRounds > 0) @as(f32, @floatFromInt(animationState.currentRound)) / @as(f32, @floatFromInt(totalRounds)) else 1.0; const fadeAlpha = @as(u8, @intFromFloat(255.0 * (1.0 - progress * 0.175))); // Fade to 82.5% of original (4x faster) connectionColor = rl.Color{ .r = 0, .g = 0, .b = 255, .a = fadeAlpha }; } } drawSquareFromCenter(connX, connY, gap / 2, connectionColor); // Draw animated red rectangle extending from source rune (only during animation on used connections) if (animationState.isAnimating) { const connection = ConnectionIndex{ .from = GridIndex{ .x = x, .y = y }, .direction = dir, }; // Find which round this connection was activated var connectionRound: ?usize = null; for (animationState.connectionsByRound.items) |connWithRound| { if (connWithRound.connection.from.x == connection.from.x and connWithRound.connection.from.y == connection.from.y and connWithRound.connection.direction == connection.direction) { connectionRound = connWithRound.round; break; } } if (connectionRound) |round| { // Only animate if we're at or past this connection's round if (animationState.currentRound >= round) { // Calculate animation progress for this specific connection (100ms duration) const currentTime = rl.getTime(); const connectionAnimDuration = 0.1; // 100ms const connectionStartTime = animationState.lastUpdateTime - (animationState.roundDuration * @as(f64, @floatFromInt(animationState.currentRound - round))); const timeSinceConnectionStart = currentTime - connectionStartTime; const overlayProgress = @as(f32, @floatCast(@max(0.0, @min(1.0, timeSinceConnectionStart / connectionAnimDuration)))); switch (dir) { .left, .right => { // Horizontal connector: same width, half height drawPartialRectangleFromCenter(connX, connY, gap / 2, gap / 4, rl.Color.red, overlayProgress, dir); }, .up, .down => { // Vertical connector: half width, same height drawPartialRectangleFromCenter(connX, connY, gap / 4, gap / 2, rl.Color.red, overlayProgress, dir); }, } } } } } } } } // Draw memory usage in top left corner const bytesUsed = fba.end_index; const totalBytes = buffer.len; const usagePercentage = (@as(f32, @floatFromInt(bytesUsed)) / @as(f32, @floatFromInt(totalBytes))) * 100.0; // Format memory usage string var memoryText: [64]u8 = undefined; const memoryString = std.fmt.bufPrint(&memoryText, "Memory: {d}/{d} bytes ({:.1}%)", .{ bytesUsed, totalBytes, usagePercentage }) catch "Memory: Error"; // Null-terminate the string for C compatibility var nullTerminatedMemory: [65]u8 = undefined; @memcpy(nullTerminatedMemory[0..memoryString.len], memoryString); nullTerminatedMemory[memoryString.len] = 0; // Draw with a dark background for better visibility const textWidth = rl.measureText(@ptrCast(&nullTerminatedMemory), 16); rl.drawRectangle(5, 5, textWidth + 10, 25, rl.Color{ .r = 0, .g = 0, .b = 0, .a = 180 }); rl.drawText(@ptrCast(&nullTerminatedMemory), 10, 10, 16, .white); rl.drawText("Congrats! You created your first window!", 190, 200, 20, .light_gray); //---------------------------------------------------------------------------------- } }
yairm210/Runelocker
0
Zig/raylib strategy game for learning Zig
Zig
yairm210
Yair Morgenstern
src/runes.zig
Zig
const std = @import("std"); const ZSet = @import("ziglangSet"); pub const Direction = enum { up, down, left, right, pub const count = 4; }; pub const GridIndex = struct { x: usize, y: usize, pub fn getIndexInDirection(self: GridIndex, direction: Direction) GridIndex { var newX: isize = @intCast(self.x); var newY: isize = @intCast(self.y); switch (direction) { .up => newY -= 1, .down => newY += 1, .left => newX -= 1, .right => newX += 1, } return GridIndex{ .x = @intCast(newX), .y = @intCast(newY), }; } }; pub const ConnectionIndex = struct { from: GridIndex, direction: Direction, pub fn hash(self: ConnectionIndex) u64 { var hasher = std.hash_map.hashString(@tagName(self.direction)); hasher = std.hash_map.hashInt(u64, @as(u64, self.from.x) << 32 | self.from.y, hasher); return hasher; } pub fn eql(self: ConnectionIndex, other: ConnectionIndex) bool { return self.from.x == other.from.x and self.from.y == other.from.y and self.direction == other.direction; } }; pub const Rune = struct { index: GridIndex, isConnected: [Direction.count]bool, isActive: bool = true, links: [Direction.count]?*Rune, // late-set }; pub const ToggledWithRound = struct { GridIndex: GridIndex, round: usize, }; pub const ConnectionWithRound = struct { connection: ConnectionIndex, round: usize, }; pub const ToggleList = std.ArrayList(ToggledWithRound); pub const ConnectionSet = ZSet.Set(ConnectionIndex); pub const RunesClickedResult = struct { toggledByRound: ToggleList, usedConnections: ConnectionSet, connectionsByRound: std.ArrayList(ConnectionWithRound), pub fn deinit(self: *RunesClickedResult, allocator: std.mem.Allocator) void { self.toggledByRound.deinit(allocator); self.usedConnections.deinit(); self.connectionsByRound.deinit(allocator); } }; // init a 3x3 grid of runes. pub fn RuneGrid(comptime width: usize, comptime height: usize) type { return struct { // Stored row-major: runes[y][x] => [height][width]Rune ([row][column]). runes: [height][width]?Rune, const Self = @This(); pub fn init() Self { return Self{ .runes = [_][width]?Rune{[_]?Rune{null} ** width} ** height, }; } pub fn addRune(self: *Self, x: usize, y: usize, connections: []const Direction) !void { if (self.runes[y][x] != null) { return error.RuneAlreadyExists; } const rune = Rune{ .isConnected = [_]bool{false} ** Direction.count, .links = [_]?*Rune{null} ** Direction.count, .index = GridIndex{ .x = x, .y = y }, }; self.runes[y][x] = rune; for (connections) |dir| { // print connected std.debug.print("Connecting rune at ({}, {}) to direction: {}\n", .{ x, y, dir }); self.runes[y][x].?.isConnected[@intFromEnum(dir)] = true; } } pub fn isInBounds(index: GridIndex) bool { return index.x < width and index.y < height; } pub fn runeClicked(self: *Self, x: usize, y: usize, allocator: std.mem.Allocator, toggledByRound: *std.ArrayList(ToggledWithRound), usedConnections: *ConnectionSet, connectionsByRound: *std.ArrayList(ConnectionWithRound)) bool { if (self.runes[y][x] == null) return false; // Clear the output lists toggledByRound.clearRetainingCapacity(); usedConnections.clearRetainingCapacity(); connectionsByRound.clearRetainingCapacity(); // Start with the clicked rune var currentRoundToggles = std.ArrayList(GridIndex){}; defer currentRoundToggles.deinit(allocator); currentRoundToggles.append(allocator, GridIndex{ .x = x, .y = y }) catch return false; var round: usize = 0; while (currentRoundToggles.items.len > 0) { // Toggle all runes in current round for (currentRoundToggles.items) |index| { if (self.runes[index.y][index.x]) |*rune| { rune.isActive = !rune.isActive; toggledByRound.append(allocator, ToggledWithRound{ .GridIndex = index, .round = round, }) catch return false; } } // Find next round activations var nextRoundToggles = std.ArrayList(GridIndex){}; defer nextRoundToggles.deinit(allocator); for (currentRoundToggles.items) |index| { const rune_ = self.runes[index.y][index.x]; if (rune_ == null) continue; const rune = rune_.?; // Check all directions for connections for (0..Direction.count) |dirIndex| { if (!rune.isConnected[dirIndex]) { continue; } const dir: Direction = @enumFromInt(dirIndex); const connection = ConnectionIndex{ .from = index, .direction = dir, }; // Check if this connection is already used if (usedConnections.contains(connection)) { continue; } // Mark connection as used (bidirectional) _ = usedConnections.add(connection) catch continue; // Record this connection with its round connectionsByRound.append(allocator, ConnectionWithRound{ .connection = connection, .round = round, }) catch continue; // Also mark the reverse connection as used const targetIndex = index.getIndexInDirection(dir); if (Self.isInBounds(targetIndex)) { const reverseDir = switch (dir) { .up => Direction.down, .down => Direction.up, .left => Direction.right, .right => Direction.left, }; const reverseConnection = ConnectionIndex{ .from = targetIndex, .direction = reverseDir, }; _ = usedConnections.add(reverseConnection) catch continue; // Check if this target is already scheduled for next round var alreadyScheduled = false; for (nextRoundToggles.items) |scheduled| { if (scheduled.x == targetIndex.x and scheduled.y == targetIndex.y) { alreadyScheduled = true; break; } } if (!alreadyScheduled) { nextRoundToggles.append(allocator, targetIndex) catch continue; } } } } // Move to next round currentRoundToggles.deinit(allocator); currentRoundToggles = std.ArrayList(GridIndex){}; currentRoundToggles.appendSlice(allocator, nextRoundToggles.items) catch break; round += 1; // Prevent infinite loops if (round > 20) break; } return true; } }; }
yairm210/Runelocker
0
Zig/raylib strategy game for learning Zig
Zig
yairm210
Yair Morgenstern
test_arraylist.zig
Zig
const std = @import("std"); pub fn main() !void { var buffer: [1024]u8 = undefined; var fba = std.heap.FixedBufferAllocator.init(&buffer); const allocator = fba.allocator(); var list = std.ArrayList(u32){}; defer list.deinit(allocator); std.debug.print("ArrayList initialized successfully\n", .{}); }
yairm210/Runelocker
0
Zig/raylib strategy game for learning Zig
Zig
yairm210
Yair Morgenstern
index.css
CSS
@import "tailwindcss"; @import "tw-animate-css"; @custom-variant dark (&:is(.dark *)); @theme inline { --radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); --radius-xl: calc(var(--radius) + 4px); --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); --color-card-foreground: var(--card-foreground); --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); --color-secondary: var(--secondary); --color-secondary-foreground: var(--secondary-foreground); --color-muted: var(--muted); --color-muted-foreground: var(--muted-foreground); --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); --color-chart-1: var(--chart-1); --color-chart-2: var(--chart-2); --color-chart-3: var(--chart-3); --color-chart-4: var(--chart-4); --color-chart-5: var(--chart-5); --color-sidebar: var(--sidebar); --color-sidebar-foreground: var(--sidebar-foreground); --color-sidebar-primary: var(--sidebar-primary); --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); --color-sidebar-accent: var(--sidebar-accent); --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); --color-sidebar-border: var(--sidebar-border); --color-sidebar-ring: var(--sidebar-ring); } :root { --radius: 0.625rem; --background: oklch(1 0 0); --foreground: oklch(0.145 0 0); --card: oklch(1 0 0); --card-foreground: oklch(0.145 0 0); --popover: oklch(1 0 0); --popover-foreground: oklch(0.145 0 0); --primary: oklch(0.205 0 0); --primary-foreground: oklch(0.985 0 0); --secondary: oklch(0.97 0 0); --secondary-foreground: oklch(0.205 0 0); --muted: oklch(0.97 0 0); --muted-foreground: oklch(0.556 0 0); --accent: oklch(0.97 0 0); --accent-foreground: oklch(0.205 0 0); --destructive: oklch(0.577 0.245 27.325); --border: oklch(0.922 0 0); --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); --chart-1: oklch(0.646 0.222 41.116); --chart-2: oklch(0.6 0.118 184.704); --chart-3: oklch(0.398 0.07 227.392); --chart-4: oklch(0.828 0.189 84.429); --chart-5: oklch(0.769 0.188 70.08); --sidebar: oklch(0.985 0 0); --sidebar-foreground: oklch(0.145 0 0); --sidebar-primary: oklch(0.205 0 0); --sidebar-primary-foreground: oklch(0.985 0 0); --sidebar-accent: oklch(0.97 0 0); --sidebar-accent-foreground: oklch(0.205 0 0); --sidebar-border: oklch(0.922 0 0); --sidebar-ring: oklch(0.708 0 0); } .dark { --background: oklch(0.145 0 0); --foreground: oklch(0.985 0 0); --card: oklch(0.205 0 0); --card-foreground: oklch(0.985 0 0); --popover: oklch(0.205 0 0); --popover-foreground: oklch(0.985 0 0); --primary: oklch(0.922 0 0); --primary-foreground: oklch(0.205 0 0); --secondary: oklch(0.269 0 0); --secondary-foreground: oklch(0.985 0 0); --muted: oklch(0.269 0 0); --muted-foreground: oklch(0.708 0 0); --accent: oklch(0.269 0 0); --accent-foreground: oklch(0.985 0 0); --destructive: oklch(0.704 0.191 22.216); --border: oklch(1 0 0 / 10%); --input: oklch(1 0 0 / 15%); --ring: oklch(0.556 0 0); --chart-1: oklch(0.488 0.243 264.376); --chart-2: oklch(0.696 0.17 162.48); --chart-3: oklch(0.769 0.188 70.08); --chart-4: oklch(0.627 0.265 303.9); --chart-5: oklch(0.645 0.246 16.439); --sidebar: oklch(0.205 0 0); --sidebar-foreground: oklch(0.985 0 0); --sidebar-primary: oklch(0.488 0.243 264.376); --sidebar-primary-foreground: oklch(0.985 0 0); --sidebar-accent: oklch(0.269 0 0); --sidebar-accent-foreground: oklch(0.985 0 0); --sidebar-border: oklch(1 0 0 / 10%); --sidebar-ring: oklch(0.556 0 0); } @layer base { * { @apply border-border outline-ring/50; } body { @apply bg-background text-foreground; } }
yairm210/base44-site-template
17
Create sites with base44 and use as standalone
JavaScript
yairm210
Yair Morgenstern
index.html
HTML
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="./index.css" /> <title>React Vite Micro App</title> </head> <body> <div id="root"></div> <script type="module" src="./src/index.jsx"></script> </body> </html>
yairm210/base44-site-template
17
Create sites with base44 and use as standalone
JavaScript
yairm210
Yair Morgenstern
src/App.jsx
JavaScript (JSX)
import React from "react"; import CodeVisualizerPage from "./CodeVisualizer"; export default () => ( <> <CodeVisualizerPage/> </> );
yairm210/base44-site-template
17
Create sites with base44 and use as standalone
JavaScript
yairm210
Yair Morgenstern
src/CodeEditor.jsx
JavaScript (JSX)
import React, { useEffect, useRef, useState } from 'react'; import * as monaco from 'monaco-editor'; export default function CodeEditor({ code, onChangeContent, onChangeCursorPosition: onChangeCursorOffset }) { const containerRef = useRef(null); const [editor, setEditor] = useState(null); useEffect(() => { if (!containerRef.current) return; // Define Kotlin language if (!monaco.languages.getLanguages().some(({ id }) => id === 'kotlin')) { monaco.languages.register({ id: 'kotlin' }); monaco.languages.setMonarchTokensProvider('kotlin', { tokenizer: { root: [ [/\b(package|import|class|interface|object|fun|val|var|when|if|else|for|while|return|constructor|companion|data|sealed|enum|override|open|private|protected|public|internal|final|abstract|suspend|lateinit|inline|get|set|this|super)\b/, 'keyword'], [/\b(Int|String|Boolean|Float|Double|Long|Short|Byte|Any|Unit|Nothing)\b/, 'type'], [/\/\/.*$/, 'comment'], [/\/\*/, 'comment', '@comment'], [/"/, 'string', '@string_double'], [/'[^']*'/, 'string'], [/\d+/, 'number'], [/@\w+/, 'annotation'], ], comment: [ [/[^/*]+/, 'comment'], [/\/\*/, 'comment', '@push'], [/\*\//, 'comment', '@pop'], [/[/*]/, 'comment'] ], string_double: [ [/[^\\"]+/, 'string'], [/\\./, 'string.escape'], [/"/, 'string', '@pop'] ] } }); } // Define a dark dracula-inspired theme monaco.editor.defineTheme('kotlinDarkDracula', { base: 'vs-dark', inherit: true, rules: [ { token: 'comment', foreground: '6272a4' }, { token: 'keyword', foreground: 'ff79c6', fontStyle: 'bold' }, { token: 'string', foreground: 'f1fa8c' }, { token: 'number', foreground: 'bd93f9' }, { token: 'type', foreground: '8be9fd' }, { token: 'annotation', foreground: '50fa7b' }, ], colors: { 'editor.background': '#1a1c25', 'editor.foreground': '#f8f8f2', 'editor.lineHighlightBackground': '#2d303e', 'editor.selectionBackground': '#44475a', 'editorCursor.foreground': '#f8f8f2', 'editorWhitespace.foreground': '#3B3A32', 'editorIndentGuide.activeBackground': '#9D550FB0', 'editor.selectionHighlightBorder': '#222218' } }); // Initialize Monaco editor const editorInstance = monaco.editor.create(containerRef.current, { value: code, language: 'kotlin', theme: 'kotlinDarkDracula', automaticLayout: true, minimap: { enabled: true }, scrollBeyondLastLine: false, fontSize: 14, fontFamily: "'JetBrains Mono', 'Fira Code', Menlo, Monaco, 'Courier New', monospace", lineNumbers: 'on', renderLineHighlight: 'all', scrollbar: { useShadows: true, verticalScrollbarSize: 10, horizontalScrollbarSize: 10 }, padding: { top: 16 }, bracketPairColorization: { enabled: true }, autoClosingBrackets: 'always' }); // Add event listener for content changes const disposable = editorInstance.onDidChangeModelContent(() => { onChangeContent(editorInstance.getValue()); }); editorInstance.onDidChangeCursorPosition((e) => { // The editor speaks in position (line/column), the IR element speaks in offset (absolute int) // The callback is in "IrSpeak" so we need to convert it const offset = editorInstance.getModel().getOffsetAt(e.position) onChangeCursorOffset(offset) }) setEditor(editorInstance); // Clean up return () => { disposable.dispose(); editorInstance.dispose(); }; }, [containerRef]); // Update editor value when code prop changes useEffect(() => { if (editor && code !== editor.getValue()) { editor.setValue(code); } }, [code, editor]); return ( <div ref={containerRef} className="h-full w-full overflow-hidden flex-grow" style={{ backgroundColor: '#1a1c25', border: 'none', outline: 'none' }} /> ); }
yairm210/base44-site-template
17
Create sites with base44 and use as standalone
JavaScript
yairm210
Yair Morgenstern
src/CodeVisualizer.jsx
JavaScript (JSX)
import React, { useState, useEffect, useRef } from "react"; import CodeEditor from "./CodeEditor"; import GraphViewer from "./GraphViewer"; import { Loader2 } from "lucide-react"; import KotlinLogo from './KotlinLogo.svg'; import axios from "axios"; import {editor} from "monaco-editor"; export default function CodeVisualizerPage() { // Initial example Kotlin code const [code, setCode] = useState(`// Example Kotlin code fun main() { var x = 5 if (x > 1 + 2) { x += 1 listOf(1, 2) } } `); const [mermaidGraphText, setMermaidGraphText] = useState(""); const [cursorPositionOffset, setCursorPositionOffset] = useState(0) const [mermaidGraphTextColored, setMermaidGraphTextColored] = useState(""); const [compilerMessages, setCompilerMessages] = useState([]); const [isProcessing, setIsProcessing] = useState(false); const [error, setError] = useState(null); const timerRef = useRef(null); const processCode = async (codeToProcess) => { setIsProcessing(true); setError(null); try { // In a real implementation, you'd send `codeToProcess` to your backend // which would return the Mermaid graph *text representation*. // TODO: How can I auto-recognize when this is run via npm run start, so I can know to use the localhost? :think: const response = await axios.post("/api/kotlinToMermaid?withOffsetComment=true", codeToProcess) // const response = await axios.post("http://localhost:8080/api/kotlinToMermaid?withOffsetComment=true", codeToProcess) const graphText = response.data.mermaidGraph const messages = response.data.messages setMermaidGraphText(graphText) setCompilerMessages(messages) } catch (err) { console.error("Error processing code:", err) setError("Failed to generate graph. Please ensure your backend is running or check the placeholder logic.") } finally { setIsProcessing(false) } }; // Debounce of 250ms, to render the graph after the user stops typing useEffect(() => { if (code.trim() === '') { setMermaidGraphText('classDiagram\n Empty["Type some Kotlin code to see the diagram"]\n classDef default fill:#2a2a3f,stroke:#6272a4,stroke-width:1px,color:#f8f8f2'); return } if (timerRef.current) { clearTimeout(timerRef.current); } timerRef.current = setTimeout(() => { processCode(code); }, 250); return () => { if (timerRef.current) { clearTimeout(timerRef.current); } }; }, [code]); const handleCodeChange = (newCode) => { setCode(newCode); }; const handleCursorOffsetChange = (offset) => { setCursorPositionOffset(offset) }; // The actual displayed graph is the graph we got plus coloring on all elements which contain the cursor position useEffect(() => { if (!mermaidGraphText){ // null or empty setMermaidGraphTextColored(null) return } const newMermaidGraphTextLines = mermaidGraphText.split("\n") .map(line => { // Offset comment looks like: " # Offset: ${element.startOffset}-${element.endOffset}" const offsetSplit = line.split(" %% Offset: ") if (offsetSplit.length < 2) return line // No comment const positions = offsetSplit[1].split("-").map(num => parseInt(num)) if (cursorPositionOffset > positions[1] || cursorPositionOffset < positions[0]) return offsetSplit[0] return offsetSplit[0] + ":::selected" // Coloring classdef }) const newMermaidGraphText = newMermaidGraphTextLines.join("\n") + "\n\n classDef selected stroke:#f00" setMermaidGraphTextColored(newMermaidGraphText) }, [cursorPositionOffset, mermaidGraphText] ) const onWarningLocationClick = (location) => { if (!location) return; // Use Monaco editor's API to reveal the line const lineNumber = location.line const columnNumber = location.column const editorInstance = editor.getEditors()[0]; // Assuming there's only one editor instance if (editorInstance) { editorInstance.revealLineInCenter(lineNumber); editorInstance.setPosition({ lineNumber, column: columnNumber }); editorInstance.focus(); } } return ( <div className="flex flex-col h-screen bg-[#0f1117] text-slate-100"> <header className="sticky top-0 z-10 bg-[#1a1c25] border-b border-slate-800 px-4 py-3 flex items-center justify-between shadow-md"> <div className="flex items-center"> <div className="h-6 w-6 mr-2"> <img src={KotlinLogo}/> </div> <h1 className="text-xl font-semibold text-slate-100 mr-4">Kotlin IR Explorer</h1> {isProcessing && ( <div className="flex items-center text-sky-400"> <Loader2 className="h-4 w-4 animate-spin mr-2" /> <span className="text-sm">Processing...</span> </div> )} </div> </header> <div className="flex flex-1 overflow-hidden"> <div className="w-1/2 border-r border-slate-800 bg-[#1a1c25]"> <CodeEditor code={code} onChangeContent={handleCodeChange} onChangeCursorPosition={handleCursorOffsetChange} /> </div> <div className="w-1/2 bg-[#1a1c25] p-4 overflow-auto"> <GraphViewer mermaidGraphText={mermaidGraphTextColored} compilerMessages={compilerMessages} isProcessing={isProcessing} error={error} onWarningLocationClick={onWarningLocationClick} /> </div> </div> </div> ); }
yairm210/base44-site-template
17
Create sites with base44 and use as standalone
JavaScript
yairm210
Yair Morgenstern
src/GraphViewer.jsx
JavaScript (JSX)
import React, {useEffect, useLayoutEffect, useRef, useState} from 'react'; import { Loader2, AlertTriangle, ImageOff } from 'lucide-react'; import mermaid from 'mermaid'; import svgPanZoom from 'svg-pan-zoom'; mermaid.initialize( { startOnLoad: false, // We will render manually theme: 'dark', // Apply dark theme globally // Dark theme configuration similar to Dracula themeVariables: { background: '#0f1117', primaryColor: '#1a1c25', // Node background primaryTextColor: '#f8f8f2', primaryBorderColor: '#6272a4', // lineColor: '#44475a', secondaryColor: '#2d303e', tertiaryColor: '#2d303e', fontSize: '14px', fontFamily: 'JetBrains Mono, Fira Code, Menlo, Monaco, Courier New, monospace', // Specific for class diagrams classText: '#f8f8f2', }, securityLevel: 'loose', // Allow clicks etc } ) export default function GraphViewer({ mermaidGraphText, compilerMessages, isProcessing, error, onWarningLocationClick }) { const svgContainerRef = useRef(null); const [renderError, setRenderError] = useState(null); const [svg, setSvg] = useState(null); const graphId = `mermaid-graph-${Date.now()}`; // Render graph when text or library readiness changes useEffect(() => { if (!mermaidGraphText || isProcessing) return setRenderError(null); try { // mermaid.render() returns a promise with the SVG mermaid.render(graphId, mermaidGraphText) .then(({ svg, bindFunctions }) => { if (svgContainerRef.current) { svgContainerRef.current.innerHTML = svg; if (bindFunctions) { bindFunctions(svgContainerRef.current); // For interactivity if any } } setSvg(svg); }) .catch(err => { console.error("Mermaid rendering error:", err); setRenderError(`Diagram error: ${err.message || 'Could not render graph.'}`); if (svgContainerRef.current) { svgContainerRef.current.innerHTML = `<div class="text-red-400 p-4">Error rendering diagram. Check console.</div>`; } }); } catch (err) { console.error("Synchronous Mermaid error:", err); setRenderError(`Diagram error: ${err.message || 'Critical error.'}`); if (svgContainerRef.current) { svgContainerRef.current.innerHTML = `<div class="text-red-400 p-4">Critical diagram rendering error.</div>`; } } }, [mermaidGraphText, isProcessing]); useLayoutEffect(() => { if (!svgContainerRef.current || !svg) return; const svgElement = svgContainerRef.current.children[0]; // make svg size to its current size - required so it's not a tiny thing svgElement.style.width = '100%'; svgElement.style.height = '100%'; svgElement.style.visibility = 'hidden'; // Hide until pan-zoom is applied svgPanZoom(svgElement, { controlIconsEnabled: true }) svgElement.style.visibility = 'visible'; // Show the SVG after pan-zoom is applied }) let content; if (isProcessing) { content = ( <div className="h-full flex flex-col items-center justify-center text-slate-400"> <Loader2 className="h-12 w-12 animate-spin mb-4 text-sky-400" /> <p>{isProcessing ? "Processing Code..." : "Rendering Diagram..."}</p> </div> ); } else if (error || renderError) { content = ( <div className="h-full flex flex-col items-center justify-center text-red-400"> <AlertTriangle className="h-12 w-12 mb-4" /> <p className="font-semibold">Error</p> <p className="text-sm text-red-500 mt-1">{error || renderError}</p> </div> ); } else if (!mermaidGraphText || mermaidGraphText.trim() === '') { // This condition checks for specific placeholder texts in the mermaid string content = ( <div className="h-full w-full flex flex-col items-center justify-center text-slate-400"> <ImageOff className="h-16 w-16 mb-4 text-slate-500" /> {compilerMessages.map(message => <div className="mt-4 text-sm bg-[#2d303e] p-3 rounded-md text-left max-w w-full" style={{cursor: 'pointer'}} // as onClick={() => onWarningLocationClick(message.location)}> {/*<p className="font-medium text-slate-300">Try a simple class:</p>*/} <pre className="mt-2 overflow-x-auto text-xs bg-[#0f1117] p-2 rounded-md text-sky-300"> { message.severity + (message.location ? ` (${message.location.line}:${message.location.column})` : '') +": "+message.message } </pre> </div> )} </div> ); } else { // The div will be populated by the useEffect hook content = ( <div ref={svgContainerRef} dangerouslySetInnerHTML={{__html: svg}} className="w-full h-full flex justify-center items-center overflow-auto p-2 mermaid-live-container"> </div> ); } return ( <div className="h-full w-full bg-[#0f1117] rounded-lg border border-slate-800 flex justify-center items-center overflow-hidden"> {content} </div> ); }
yairm210/base44-site-template
17
Create sites with base44 and use as standalone
JavaScript
yairm210
Yair Morgenstern
src/components/ui/button.tsx
TypeScript (TSX)
import * as React from "react" import { Slot } from "@radix-ui/react-slot" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const buttonVariants = cva( "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", { variants: { variant: { default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90", destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50", secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80", ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50", link: "text-primary underline-offset-4 hover:underline", }, size: { default: "h-9 px-4 py-2 has-[>svg]:px-3", sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5", lg: "h-10 rounded-md px-6 has-[>svg]:px-4", icon: "size-9", }, }, defaultVariants: { variant: "default", size: "default", }, } ) function Button({ className, variant, size, asChild = false, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & { asChild?: boolean }) { const Comp = asChild ? Slot : "button" return ( <Comp data-slot="button" className={cn(buttonVariants({ variant, size, className }))} {...props} /> ) } export { Button, buttonVariants }
yairm210/base44-site-template
17
Create sites with base44 and use as standalone
JavaScript
yairm210
Yair Morgenstern
src/components/ui/dialog.tsx
TypeScript (TSX)
import * as React from "react" import * as DialogPrimitive from "@radix-ui/react-dialog" import { XIcon } from "lucide-react" import { cn } from "@/lib/utils" function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) { return <DialogPrimitive.Root data-slot="dialog" {...props} /> } function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) { return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} /> } function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) { return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} /> } function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) { return <DialogPrimitive.Close data-slot="dialog-close" {...props} /> } function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) { return ( <DialogPrimitive.Overlay data-slot="dialog-overlay" className={cn( "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className )} {...props} /> ) } function DialogContent({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>) { return ( <DialogPortal data-slot="dialog-portal"> <DialogOverlay /> <DialogPrimitive.Content data-slot="dialog-content" className={cn( "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className )} {...props} > {children} <DialogPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"> <XIcon /> <span className="sr-only">Close</span> </DialogPrimitive.Close> </DialogPrimitive.Content> </DialogPortal> ) } function DialogHeader({ className, ...props }: React.ComponentProps<"div">) { return ( <div data-slot="dialog-header" className={cn("flex flex-col gap-2 text-center sm:text-left", className)} {...props} /> ) } function DialogFooter({ className, ...props }: React.ComponentProps<"div">) { return ( <div data-slot="dialog-footer" className={cn( "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className )} {...props} /> ) } function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) { return ( <DialogPrimitive.Title data-slot="dialog-title" className={cn("text-lg leading-none font-semibold", className)} {...props} /> ) } function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) { return ( <DialogPrimitive.Description data-slot="dialog-description" className={cn("text-muted-foreground text-sm", className)} {...props} /> ) } export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, }
yairm210/base44-site-template
17
Create sites with base44 and use as standalone
JavaScript
yairm210
Yair Morgenstern
src/components/ui/input.tsx
TypeScript (TSX)
import * as React from "react" import { cn } from "@/lib/utils" function Input({ className, type, ...props }: React.ComponentProps<"input">) { return ( <input type={type} data-slot="input" className={cn( "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className )} {...props} /> ) } export { Input }
yairm210/base44-site-template
17
Create sites with base44 and use as standalone
JavaScript
yairm210
Yair Morgenstern