Files
intellecton/venv/lib/python3.12/site-packages/pymdownx/__pycache__/emoji.cpython-312.pyc
T

144 lines
17 KiB
Plaintext
Raw Normal View History

Ë
j¦6ãó:dZddlmZddlmZddlmZddlmZddl m
cm Z
ddl Z ddl
Z
ddlmZdZd Zd
Zd Zd Zd
ZdZdZdZdZdZdZeeefZdZdefZdZdZdZ dZ!e!Z"dZ#dZ$dZ%dZ&dZ'dZ(d „Z)d!„Z*Gd"„d#e«Z+Gd$„d%e«Z,Gd&„d'e«Z-d(„Z.y))a¡
Emoji.
pymdownx.emoji
Emoji extension for EmojiOne's, GitHub's, or Twemoji's gemoji.
MIT license.
Copyright (c) 2016 - 2017 Isaac Muse <isaacmuse@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
é)Ú Extension)ÚInlineProcessor)Ú
Postprocessor)ÚutilNéz (:[+\-\w]+:))ÚemojioneÚgemojiÚtwemojiÚfe0fzAhttps://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/assets/svg/zAhttps://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/assets/png/z>https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/z@https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/72x72/z;https://github.githubassets.com/images/icons/emoji/unicode/z3https://github.githubassets.com/images/icons/emoji/ÚnoneÚlongÚshortÚ html_entityÚunicodeézžUsing emoji indexes with no arguments is now deprecated.
Emoji indexes now take 2 arguments: 'options' and 'md'.
Please update your custom index accordingly.
z
Emoji Extension (strict mode): The following emoji were detected and either had
their name change, were removed, or have never existed.
{}
cóh|jdi«}|r|j«D]
\}}|||<Œ yy)z'Add additional attributes from options.Ú
attributesN)ÚgetÚitems)ÚoptionsrÚattrÚvs úQ/home/antigravity/intellecton/venv/lib/python3.12/site-packages/pymdownx/emoji.pyÚadd_attributesr@s>ð ;‰;|  (€DÙ Ø—J‘J“Lò ‰DˆAˆq؈JqŠMñ ð ócó¢ddlm}|jtj|j
«tj|j «dœS)zThe EmojiOne index.r)Ú emoji1_db©ÚnameÚemojiÚaliases)Úrr ÚcopyÚdeepcopyr!r"©rÚmdÚ emoji_maps rrrNó:õܘyŸÓ—=‘= ×!2Ñ!2Ó ðrcó¢ddlm}|jtj|j
«tj|j «dœS)zThe Gemoji index.r)Ú gemoji_dbr)r#r+r r$r%r!r"r&s rr r Yr)rcó¢ddlm}|jtj|j
«tj|j «dœS)zThe Twemoji index.r)Ú
twemoji_dbr)r#r-r r$r%r!r"r&s rr
r
ds:õܘyŸÓ—=‘= ×!2Ñ!2Ó ðrc ól|dk(r
t} t}
n|dk(r
t} t}
n t} t}
|du} |j d|«} | r|j d| «}
n|j d|
«}
dj |
| r|n|dd «}| ||d
œ}|r||d <t
||«tjd |«S)
zReturn PNG element.r r
classesÚ
image_pathÚnon_standard_image_pathz{}{}.pngréÿÿÿÿ©ÚclassÚaltÚsrcÚtitleÚimg) ÚGITHUB_UNICODE_CDNÚ
GITHUB_CDNÚTWEMOJI_PNG_CDNÚEMOJIONE_PNG_CDNrÚformatrÚetreeÚElement)ÚindexÚ shortnameÚaliasÚucr5r7Úcategoryrr'Údef_image_pathÚdef_non_std_image_pathÚ
is_unicoder/r0r6rs rÚto_pngrHrð
ÒÜÜ!+ÑØ ÜÜ!0ÑäÜ!1Ðà˜4€JØk‰k˜) UÓ+€GñØ—[[ ¨~Ó>‰
à—[[Ð!:Ð<RÓSˆ
à
×
Ñ
ØÙ˜i¨¨"˜oó €Cð ØØñ€Jñ 
Ø#ˆ
ä7˜ =‰=˜ 
Ó +rc óä|dk(rt} nt} |jd|«|dj|jd| «|«dœ}
|r||
d<t ||
«t j d|
«S)zReturn SVG element.r
r/z{}{}.svgr0r3r7r8)ÚTWEMOJI_SVG_CDNÚEMOJIONE_SVG_CDNrr=rr>r?) r@rArBrCr5r7rDrr'Úsvg_pathrs rÚto_svgrMœsyð
ÒÜ"‰äð˜Y¨ÓØ× Ñ Ø K‰K˜  hÓ ó
ñ€Jñ
Ø#ˆ
ä7˜ =‰=˜ 
Ó +rc óìdd|jd|«|jdd«|r|nd|dœzi} |r|| d<t|| «tjd | «}
t j
|«|
_|
S)
zReturn PNG sprite element.r4z,%(class)s-%(size)s-%(category)s _%(unicode)sr/ÚsizeÚ64r#)r4rOrDrr7Úspan)rrr>r?Úmd_utilÚ AtomicStringÚtext) r@rArBrCr5r7rDrr'rÚels rÚ
to_png_spriterVµsð З[‘[ ¨EÓ—K‘K ¨Ó-Ù%-™°2Øñ C
ñ
ð€Jñ
Ø#ˆ
ä7˜v˜zÓ *€BÜ×" '€B„Gà
€Irc ó,dj|jdd«|«} tjdd|jd|«i«}
tj|
d«} t j |«| _tj|
dd | i«|
S)
Return SVG sprite element.
```
<svg class="%(classes)s"><description>%(alt)s</description>
<use xlink:href="%(sprite)s#emoji-%(unicode)s"></use></svg>
```
z {}#emoji-{}r0z(./../assets/sprites/emojione.sprites.svgÚsvgr4r/Ú descriptionÚusez
xlink:href)r=rr>r?Ú
SubElementrRrSrT) r@rArBrCr5r7rDrr'Ú
xlink_hrefrXÚdescs rÚ
to_svg_spriter^Ìs‡ð× LÐ"LÓMÈró€Jô -‰-˜ ¨¯©°YÀÓ)FÐ
H€CÜ × Ñ ˜C Ó /€DÜ×$ SÓ)€D„IÜ ×ÑS˜% ,°
Ð!;Ô €Jrc ó8|jj|«S)zReturn html entities.)Ú htmlStashÚstore) r@rArBrCr5r7rDrr's rÚto_altrbásð <‰<× Ñ ˜ "rcóFeZdZdZdZdZdZdZdZdZ dZ
d „Z d
Z y ) Ú EmojiPatternzWReturn element of type `tag` with a text attribute of group(2) of an `InlineProcessor`.có,tj|||«|d}|d}|d|_|j|d«|tv|_|t k(|_|d|_|tvr|nt|_ |d|_ |d|_
||_y) ú Initialize.r7r5rÚ emoji_indexÚremove_variation_selectorÚemoji_generatorÚstrictN)rÚ__init__rÚ
_set_indexÚ UNICODE_ALTÚ unicode_altÚUNICODE_ENTITYÚ encoded_altÚremove_var_selÚ VALID_TITLEÚNO_TITLEr7Ú generatorrjÚ strict_cache)ÚselfÚpatternÚconfigÚ strict_moder'r7r5s rrkzEmojiPattern.__init__íô × Ñ   w°Ôw‘ˆØU‰mˆØ˜iÑŒ Ø ˜˜}Ѥ+ÐÔØ¤.ÑÔØ$Ð%@ÑÔØ#¤{Ñ2‘U¼ˆŒ
ØÐ 1ьؘ&ˆŒ Ø'ˆÕrcóättj|«j«r#||j|j
«|_ytjt«|«|_y)zSet the index.N)
ÚlenÚinspectÚgetfullargspecÚargsrr'rgrÚwarn_deprecatedÚMSG_INDEX_WARN)rvr@s rrlzEmojiPattern._set_indexþsLô Œw×%  $ T§\¡\°4·7±7Ó;ˆDÕ ä × Ñ ¤Ô $›wˆDÕ rcó4|jdtzd«S)zRemove variation selectors.ú-r#)ÚreplaceÚUNICODE_VARIATION_SELECTOR_16)rvÚvalues rÚ_remove_variation_selectorz'EmojiPattern._remove_variation_selectorsð}‰}˜SÔ#@Ñ@À"ÓErc ó¢dj|jd«Dcgc]!}tjt |d««Œ#c}«Scc}w)zGet the Unicode char.r#ré)ÚjoinÚsplitrÚget_charÚint)rvr…Úcs rÚ_get_unicode_charzEmojiPattern._get_unicode_char s9ðw‰w¸5¿;¹;ÀsÓ;KÖL°aœŸ
¤c¨!¨R£jÕMùÒLsŸ&A cóŽ|jd«}|jd|«}|r|jr|j|«}||fS)ac
Get Unicode and Unicode alt.
Unicode: This is the stripped down form of the Unicode, no joining chars and no variation chars.
Unicode code points are not always valid. If this is present and there is no 'unicode_alt',
Unicode code points can be counted on as valid. For the most part, the returned `uc` should
be used to reference image files, or create classes, but for inserting actual Unicode, 'uc_alt'
should be used.
Unicode Alt: When present, this will always be valid Unicode points. This contains not just the
needed characters to identify the Unicode emoji, but the formatting as well. Joining characters
and variation characters will be present. If you don't want variation chars, enable the global
'remove_variation_selector' option.
rrn)rrqr†)rvr!rCÚuc_alts rÚ _get_unicodezEmojiPattern._get_unicodesGð Y‰Y
!ˆØ˜=¨"ÓÙ d××4°VÓ<ˆ6ˆrcól|jtk(r|d}|S|jtk(r|}|Sd}|S)zGet the title.r N)r7Ú
LONG_TITLEÚ SHORT_TITLE)rvrAr!r7s rÚ
_get_titlezEmojiPattern._get_title(sFð :‰:œÒ ˜&Mˆ
ˆ ð Z‰Zœ;Ò
ˆEðˆ ðˆE؈ rc
ó | |js|}|S|j|«}|jrYdjt j
|«Dcgc]+}t jdt j|«zzŒ-c}«}|Scc}w)z
Get alt form.r#z#x%04x;) rnrpr‰rÚget_code_pointsrRÚAMP_SUBSTITUTEÚget_ord)rvrArr5Úpoints rÚ_get_altzEmojiPattern._get_alt3s‡ð ˆ> ×!1Ò!1؈ˆ
ð ×Ó0ˆCØ×ÒØ—ggÜ]a×]qÑ]qÐruÓ]vÖwÐTY”W×+¨y¼4¿<¹<ÈÓ;NÑ/NÓðˆ
ùòxsÁ0B có$|jd«S)zGet the category.rD)r)rvr!s rÚ