new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
export default class Filters {
|
||||
filters;
|
||||
constructor(context) {
|
||||
this.filters = context.filters;
|
||||
}
|
||||
set(value, filterBy) {
|
||||
const parsed = this.parse(filterBy);
|
||||
this.filters.update(store => {
|
||||
const filter = { filterBy: parsed.fn, value: value, identifier: parsed.identifier };
|
||||
store = store.filter(item => { return item.identifier !== parsed.identifier && item.value.length > 0; });
|
||||
store.push(filter);
|
||||
return store;
|
||||
});
|
||||
}
|
||||
remove() {
|
||||
this.filters.update(store => store = []);
|
||||
}
|
||||
parse(filterBy) {
|
||||
if (typeof (filterBy) === 'string') {
|
||||
return {
|
||||
fn: (row) => row[filterBy],
|
||||
identifier: filterBy.toString()
|
||||
};
|
||||
}
|
||||
return {
|
||||
fn: filterBy,
|
||||
identifier: filterBy.toString()
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
[
|
||||
["0","\u0000",127],
|
||||
["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"],
|
||||
["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"],
|
||||
["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"],
|
||||
["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21],
|
||||
["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10],
|
||||
["a3a1","ㄐ",25,"˙ˉˊˇˋ"],
|
||||
["a3e1","€"],
|
||||
["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"],
|
||||
["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"],
|
||||
["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"],
|
||||
["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"],
|
||||
["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"],
|
||||
["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"],
|
||||
["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"],
|
||||
["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"],
|
||||
["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"],
|
||||
["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"],
|
||||
["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"],
|
||||
["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"],
|
||||
["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"],
|
||||
["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"],
|
||||
["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"],
|
||||
["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"],
|
||||
["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"],
|
||||
["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"],
|
||||
["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"],
|
||||
["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"],
|
||||
["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"],
|
||||
["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"],
|
||||
["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"],
|
||||
["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"],
|
||||
["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"],
|
||||
["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"],
|
||||
["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"],
|
||||
["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"],
|
||||
["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"],
|
||||
["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"],
|
||||
["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"],
|
||||
["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"],
|
||||
["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"],
|
||||
["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"],
|
||||
["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"],
|
||||
["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"],
|
||||
["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"],
|
||||
["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"],
|
||||
["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"],
|
||||
["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"],
|
||||
["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"],
|
||||
["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"],
|
||||
["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"],
|
||||
["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"],
|
||||
["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"],
|
||||
["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"],
|
||||
["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"],
|
||||
["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"],
|
||||
["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"],
|
||||
["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"],
|
||||
["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"],
|
||||
["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"],
|
||||
["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"],
|
||||
["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"],
|
||||
["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"],
|
||||
["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"],
|
||||
["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"],
|
||||
["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"],
|
||||
["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"],
|
||||
["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"],
|
||||
["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"],
|
||||
["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"],
|
||||
["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"],
|
||||
["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"],
|
||||
["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"],
|
||||
["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"],
|
||||
["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"],
|
||||
["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"],
|
||||
["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"],
|
||||
["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"],
|
||||
["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"],
|
||||
["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"],
|
||||
["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"],
|
||||
["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"],
|
||||
["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"],
|
||||
["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"],
|
||||
["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"],
|
||||
["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"],
|
||||
["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"],
|
||||
["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"],
|
||||
["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"],
|
||||
["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"],
|
||||
["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"],
|
||||
["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"],
|
||||
["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"],
|
||||
["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"],
|
||||
["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"],
|
||||
["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"],
|
||||
["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"],
|
||||
["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"],
|
||||
["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"],
|
||||
["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"],
|
||||
["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"],
|
||||
["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"],
|
||||
["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"],
|
||||
["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"],
|
||||
["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"],
|
||||
["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"],
|
||||
["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"],
|
||||
["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"],
|
||||
["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"],
|
||||
["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"],
|
||||
["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"],
|
||||
["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"],
|
||||
["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"],
|
||||
["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"],
|
||||
["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"],
|
||||
["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"],
|
||||
["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"],
|
||||
["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"],
|
||||
["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"],
|
||||
["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"],
|
||||
["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"],
|
||||
["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"],
|
||||
["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"],
|
||||
["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"],
|
||||
["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"],
|
||||
["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"],
|
||||
["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"],
|
||||
["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"],
|
||||
["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"],
|
||||
["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"],
|
||||
["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"],
|
||||
["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"],
|
||||
["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"],
|
||||
["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"],
|
||||
["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"],
|
||||
["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"],
|
||||
["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"],
|
||||
["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"],
|
||||
["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"],
|
||||
["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"],
|
||||
["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"],
|
||||
["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"],
|
||||
["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"],
|
||||
["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"],
|
||||
["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"],
|
||||
["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"],
|
||||
["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"],
|
||||
["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"],
|
||||
["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"],
|
||||
["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"],
|
||||
["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"],
|
||||
["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"],
|
||||
["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"],
|
||||
["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"],
|
||||
["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"],
|
||||
["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"],
|
||||
["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"],
|
||||
["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"],
|
||||
["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"],
|
||||
["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"],
|
||||
["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"],
|
||||
["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"],
|
||||
["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"],
|
||||
["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"],
|
||||
["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"],
|
||||
["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"],
|
||||
["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"],
|
||||
["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"],
|
||||
["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"],
|
||||
["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"],
|
||||
["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"],
|
||||
["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"],
|
||||
["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"],
|
||||
["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"],
|
||||
["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"]
|
||||
]
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"distinctUntilChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilChanged.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAuIhE,MAAM,UAAU,oBAAoB,CAClC,UAAiD,EACjD,cAA+B,QAA2B;IAK1D,UAAU,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,cAAc,CAAC;IAE1C,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAGpC,IAAI,WAAc,CAAC;QAEnB,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAE7C,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;YAKtC,IAAI,KAAK,IAAI,CAAC,UAAW,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE;gBAMlD,KAAK,GAAG,KAAK,CAAC;gBACd,WAAW,GAAG,UAAU,CAAC;gBAGzB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,cAAc,CAAC,CAAM,EAAE,CAAM;IACpC,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC"}
|
||||
@@ -0,0 +1,288 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { innerFrom } from '../observable/innerFrom';
|
||||
import { Subject } from '../Subject';
|
||||
import { ObservableInput, Observer, OperatorFunction, SubjectLike } from '../types';
|
||||
import { operate } from '../util/lift';
|
||||
import { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber';
|
||||
|
||||
export interface BasicGroupByOptions<K, T> {
|
||||
element?: undefined;
|
||||
duration?: (grouped: GroupedObservable<K, T>) => ObservableInput<any>;
|
||||
connector?: () => SubjectLike<T>;
|
||||
}
|
||||
|
||||
export interface GroupByOptionsWithElement<K, E, T> {
|
||||
element: (value: T) => E;
|
||||
duration?: (grouped: GroupedObservable<K, E>) => ObservableInput<any>;
|
||||
connector?: () => SubjectLike<E>;
|
||||
}
|
||||
|
||||
export function groupBy<T, K>(key: (value: T) => K, options: BasicGroupByOptions<K, T>): OperatorFunction<T, GroupedObservable<K, T>>;
|
||||
|
||||
export function groupBy<T, K, E>(
|
||||
key: (value: T) => K,
|
||||
options: GroupByOptionsWithElement<K, E, T>
|
||||
): OperatorFunction<T, GroupedObservable<K, E>>;
|
||||
|
||||
export function groupBy<T, K extends T>(
|
||||
key: (value: T) => value is K
|
||||
): OperatorFunction<T, GroupedObservable<true, K> | GroupedObservable<false, Exclude<T, K>>>;
|
||||
|
||||
export function groupBy<T, K>(key: (value: T) => K): OperatorFunction<T, GroupedObservable<K, T>>;
|
||||
|
||||
/**
|
||||
* @deprecated use the options parameter instead.
|
||||
*/
|
||||
export function groupBy<T, K>(
|
||||
key: (value: T) => K,
|
||||
element: void,
|
||||
duration: (grouped: GroupedObservable<K, T>) => Observable<any>
|
||||
): OperatorFunction<T, GroupedObservable<K, T>>;
|
||||
|
||||
/**
|
||||
* @deprecated use the options parameter instead.
|
||||
*/
|
||||
export function groupBy<T, K, R>(
|
||||
key: (value: T) => K,
|
||||
element?: (value: T) => R,
|
||||
duration?: (grouped: GroupedObservable<K, R>) => Observable<any>
|
||||
): OperatorFunction<T, GroupedObservable<K, R>>;
|
||||
|
||||
/**
|
||||
* Groups the items emitted by an Observable according to a specified criterion,
|
||||
* and emits these grouped items as `GroupedObservables`, one
|
||||
* {@link GroupedObservable} per group.
|
||||
*
|
||||
* 
|
||||
*
|
||||
* When the Observable emits an item, a key is computed for this item with the key function.
|
||||
*
|
||||
* If a {@link GroupedObservable} for this key exists, this {@link GroupedObservable} emits. Otherwise, a new
|
||||
* {@link GroupedObservable} for this key is created and emits.
|
||||
*
|
||||
* A {@link GroupedObservable} represents values belonging to the same group represented by a common key. The common
|
||||
* key is available as the `key` field of a {@link GroupedObservable} instance.
|
||||
*
|
||||
* The elements emitted by {@link GroupedObservable}s are by default the items emitted by the Observable, or elements
|
||||
* returned by the element function.
|
||||
*
|
||||
* ## Examples
|
||||
*
|
||||
* Group objects by `id` and return as array
|
||||
*
|
||||
* ```ts
|
||||
* import { of, groupBy, mergeMap, reduce } from 'rxjs';
|
||||
*
|
||||
* of(
|
||||
* { id: 1, name: 'JavaScript' },
|
||||
* { id: 2, name: 'Parcel' },
|
||||
* { id: 2, name: 'webpack' },
|
||||
* { id: 1, name: 'TypeScript' },
|
||||
* { id: 3, name: 'TSLint' }
|
||||
* ).pipe(
|
||||
* groupBy(p => p.id),
|
||||
* mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], [])))
|
||||
* )
|
||||
* .subscribe(p => console.log(p));
|
||||
*
|
||||
* // displays:
|
||||
* // [{ id: 1, name: 'JavaScript' }, { id: 1, name: 'TypeScript'}]
|
||||
* // [{ id: 2, name: 'Parcel' }, { id: 2, name: 'webpack'}]
|
||||
* // [{ id: 3, name: 'TSLint' }]
|
||||
* ```
|
||||
*
|
||||
* Pivot data on the `id` field
|
||||
*
|
||||
* ```ts
|
||||
* import { of, groupBy, mergeMap, reduce, map } from 'rxjs';
|
||||
*
|
||||
* of(
|
||||
* { id: 1, name: 'JavaScript' },
|
||||
* { id: 2, name: 'Parcel' },
|
||||
* { id: 2, name: 'webpack' },
|
||||
* { id: 1, name: 'TypeScript' },
|
||||
* { id: 3, name: 'TSLint' }
|
||||
* ).pipe(
|
||||
* groupBy(p => p.id, { element: p => p.name }),
|
||||
* mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], [`${ group$.key }`]))),
|
||||
* map(arr => ({ id: parseInt(arr[0], 10), values: arr.slice(1) }))
|
||||
* )
|
||||
* .subscribe(p => console.log(p));
|
||||
*
|
||||
* // displays:
|
||||
* // { id: 1, values: [ 'JavaScript', 'TypeScript' ] }
|
||||
* // { id: 2, values: [ 'Parcel', 'webpack' ] }
|
||||
* // { id: 3, values: [ 'TSLint' ] }
|
||||
* ```
|
||||
*
|
||||
* @param key A function that extracts the key
|
||||
* for each item.
|
||||
* @param element A function that extracts the
|
||||
* return element for each item.
|
||||
* @param duration
|
||||
* A function that returns an Observable to determine how long each group should
|
||||
* exist.
|
||||
* @param connector Factory function to create an
|
||||
* intermediate Subject through which grouped elements are emitted.
|
||||
* @return A function that returns an Observable that emits GroupedObservables,
|
||||
* each of which corresponds to a unique key value and each of which emits
|
||||
* those items from the source Observable that share that key value.
|
||||
*
|
||||
* @deprecated Use the options parameter instead.
|
||||
*/
|
||||
export function groupBy<T, K, R>(
|
||||
key: (value: T) => K,
|
||||
element?: (value: T) => R,
|
||||
duration?: (grouped: GroupedObservable<K, R>) => Observable<any>,
|
||||
connector?: () => Subject<R>
|
||||
): OperatorFunction<T, GroupedObservable<K, R>>;
|
||||
|
||||
// Impl
|
||||
export function groupBy<T, K, R>(
|
||||
keySelector: (value: T) => K,
|
||||
elementOrOptions?: ((value: any) => any) | void | BasicGroupByOptions<K, T> | GroupByOptionsWithElement<K, R, T>,
|
||||
duration?: (grouped: GroupedObservable<any, any>) => ObservableInput<any>,
|
||||
connector?: () => SubjectLike<any>
|
||||
): OperatorFunction<T, GroupedObservable<K, R>> {
|
||||
return operate((source, subscriber) => {
|
||||
let element: ((value: any) => any) | void;
|
||||
if (!elementOrOptions || typeof elementOrOptions === 'function') {
|
||||
element = elementOrOptions as ((value: any) => any);
|
||||
} else {
|
||||
({ duration, element, connector } = elementOrOptions);
|
||||
}
|
||||
|
||||
// A lookup for the groups that we have so far.
|
||||
const groups = new Map<K, SubjectLike<any>>();
|
||||
|
||||
// Used for notifying all groups and the subscriber in the same way.
|
||||
const notify = (cb: (group: Observer<any>) => void) => {
|
||||
groups.forEach(cb);
|
||||
cb(subscriber);
|
||||
};
|
||||
|
||||
// Used to handle errors from the source, AND errors that occur during the
|
||||
// next call from the source.
|
||||
const handleError = (err: any) => notify((consumer) => consumer.error(err));
|
||||
|
||||
// The number of actively subscribed groups
|
||||
let activeGroups = 0;
|
||||
|
||||
// Whether or not teardown was attempted on this subscription.
|
||||
let teardownAttempted = false;
|
||||
|
||||
// Capturing a reference to this, because we need a handle to it
|
||||
// in `createGroupedObservable` below. This is what we use to
|
||||
// subscribe to our source observable. This sometimes needs to be unsubscribed
|
||||
// out-of-band with our `subscriber` which is the downstream subscriber, or destination,
|
||||
// in cases where a user unsubscribes from the main resulting subscription, but
|
||||
// still has groups from this subscription subscribed and would expect values from it
|
||||
// Consider: `source.pipe(groupBy(fn), take(2))`.
|
||||
const groupBySourceSubscriber = new OperatorSubscriber(
|
||||
subscriber,
|
||||
(value: T) => {
|
||||
// Because we have to notify all groups of any errors that occur in here,
|
||||
// we have to add our own try/catch to ensure that those errors are propagated.
|
||||
// OperatorSubscriber will only send the error to the main subscriber.
|
||||
try {
|
||||
const key = keySelector(value);
|
||||
|
||||
let group = groups.get(key);
|
||||
if (!group) {
|
||||
// Create our group subject
|
||||
groups.set(key, (group = connector ? connector() : new Subject<any>()));
|
||||
|
||||
// Emit the grouped observable. Note that we can't do a simple `asObservable()` here,
|
||||
// because the grouped observable has special semantics around reference counting
|
||||
// to ensure we don't sever our connection to the source prematurely.
|
||||
const grouped = createGroupedObservable(key, group);
|
||||
subscriber.next(grouped);
|
||||
|
||||
if (duration) {
|
||||
const durationSubscriber = createOperatorSubscriber(
|
||||
// Providing the group here ensures that it is disposed of -- via `unsubscribe` --
|
||||
// when the duration subscription is torn down. That is important, because then
|
||||
// if someone holds a handle to the grouped observable and tries to subscribe to it
|
||||
// after the connection to the source has been severed, they will get an
|
||||
// `ObjectUnsubscribedError` and know they can't possibly get any notifications.
|
||||
group as any,
|
||||
() => {
|
||||
// Our duration notified! We can complete the group.
|
||||
// The group will be removed from the map in the finalization phase.
|
||||
group!.complete();
|
||||
durationSubscriber?.unsubscribe();
|
||||
},
|
||||
// Completions are also sent to the group, but just the group.
|
||||
undefined,
|
||||
// Errors on the duration subscriber are sent to the group
|
||||
// but only the group. They are not sent to the main subscription.
|
||||
undefined,
|
||||
// Finalization: Remove this group from our map.
|
||||
() => groups.delete(key)
|
||||
);
|
||||
|
||||
// Start our duration notifier.
|
||||
groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber));
|
||||
}
|
||||
}
|
||||
|
||||
// Send the value to our group.
|
||||
group.next(element ? element(value) : value);
|
||||
} catch (err) {
|
||||
handleError(err);
|
||||
}
|
||||
},
|
||||
// Source completes.
|
||||
() => notify((consumer) => consumer.complete()),
|
||||
// Error from the source.
|
||||
handleError,
|
||||
// Free up memory.
|
||||
// When the source subscription is _finally_ torn down, release the subjects and keys
|
||||
// in our groups Map, they may be quite large and we don't want to keep them around if we
|
||||
// don't have to.
|
||||
() => groups.clear(),
|
||||
() => {
|
||||
teardownAttempted = true;
|
||||
// We only kill our subscription to the source if we have
|
||||
// no active groups. As stated above, consider this scenario:
|
||||
// source$.pipe(groupBy(fn), take(2)).
|
||||
return activeGroups === 0;
|
||||
}
|
||||
);
|
||||
|
||||
// Subscribe to the source
|
||||
source.subscribe(groupBySourceSubscriber);
|
||||
|
||||
/**
|
||||
* Creates the actual grouped observable returned.
|
||||
* @param key The key of the group
|
||||
* @param groupSubject The subject that fuels the group
|
||||
*/
|
||||
function createGroupedObservable(key: K, groupSubject: SubjectLike<any>) {
|
||||
const result: any = new Observable<T>((groupSubscriber) => {
|
||||
activeGroups++;
|
||||
const innerSub = groupSubject.subscribe(groupSubscriber);
|
||||
return () => {
|
||||
innerSub.unsubscribe();
|
||||
// We can kill the subscription to our source if we now have no more
|
||||
// active groups subscribed, and a finalization was already attempted on
|
||||
// the source.
|
||||
--activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe();
|
||||
};
|
||||
});
|
||||
result.key = key;
|
||||
return result;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* An observable of values that is the emitted by the result of a {@link groupBy} operator,
|
||||
* contains a `key` property for the grouping.
|
||||
*/
|
||||
export interface GroupedObservable<K, T> extends Observable<T> {
|
||||
/**
|
||||
* The key value for the grouped notifications.
|
||||
*/
|
||||
readonly key: K;
|
||||
}
|
||||
@@ -0,0 +1,292 @@
|
||||
"use strict";;
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var es7_1 = tslib_1.__importDefault(require("./es7"));
|
||||
var type_annotations_1 = tslib_1.__importDefault(require("./type-annotations"));
|
||||
var types_1 = tslib_1.__importDefault(require("../lib/types"));
|
||||
var shared_1 = tslib_1.__importDefault(require("../lib/shared"));
|
||||
function default_1(fork) {
|
||||
fork.use(es7_1.default);
|
||||
fork.use(type_annotations_1.default);
|
||||
var types = fork.use(types_1.default);
|
||||
var def = types.Type.def;
|
||||
var or = types.Type.or;
|
||||
var defaults = fork.use(shared_1.default).defaults;
|
||||
// Base types
|
||||
def("Flow").bases("Node");
|
||||
def("FlowType").bases("Flow");
|
||||
// Type annotations
|
||||
def("AnyTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build();
|
||||
def("EmptyTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build();
|
||||
def("MixedTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build();
|
||||
def("VoidTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build();
|
||||
def("NumberTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build();
|
||||
def("NumberLiteralTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("value", "raw")
|
||||
.field("value", Number)
|
||||
.field("raw", String);
|
||||
// Babylon 6 differs in AST from Flow
|
||||
// same as NumberLiteralTypeAnnotation
|
||||
def("NumericLiteralTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("value", "raw")
|
||||
.field("value", Number)
|
||||
.field("raw", String);
|
||||
def("StringTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build();
|
||||
def("StringLiteralTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("value", "raw")
|
||||
.field("value", String)
|
||||
.field("raw", String);
|
||||
def("BooleanTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build();
|
||||
def("BooleanLiteralTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("value", "raw")
|
||||
.field("value", Boolean)
|
||||
.field("raw", String);
|
||||
def("TypeAnnotation")
|
||||
.bases("Node")
|
||||
.build("typeAnnotation")
|
||||
.field("typeAnnotation", def("FlowType"));
|
||||
def("NullableTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("typeAnnotation")
|
||||
.field("typeAnnotation", def("FlowType"));
|
||||
def("NullLiteralTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build();
|
||||
def("NullTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build();
|
||||
def("ThisTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build();
|
||||
def("ExistsTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build();
|
||||
def("ExistentialTypeParam")
|
||||
.bases("FlowType")
|
||||
.build();
|
||||
def("FunctionTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("params", "returnType", "rest", "typeParameters")
|
||||
.field("params", [def("FunctionTypeParam")])
|
||||
.field("returnType", def("FlowType"))
|
||||
.field("rest", or(def("FunctionTypeParam"), null))
|
||||
.field("typeParameters", or(def("TypeParameterDeclaration"), null));
|
||||
def("FunctionTypeParam")
|
||||
.bases("Node")
|
||||
.build("name", "typeAnnotation", "optional")
|
||||
.field("name", def("Identifier"))
|
||||
.field("typeAnnotation", def("FlowType"))
|
||||
.field("optional", Boolean);
|
||||
def("ArrayTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("elementType")
|
||||
.field("elementType", def("FlowType"));
|
||||
def("ObjectTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("properties", "indexers", "callProperties")
|
||||
.field("properties", [
|
||||
or(def("ObjectTypeProperty"), def("ObjectTypeSpreadProperty"))
|
||||
])
|
||||
.field("indexers", [def("ObjectTypeIndexer")], defaults.emptyArray)
|
||||
.field("callProperties", [def("ObjectTypeCallProperty")], defaults.emptyArray)
|
||||
.field("inexact", or(Boolean, void 0), defaults["undefined"])
|
||||
.field("exact", Boolean, defaults["false"])
|
||||
.field("internalSlots", [def("ObjectTypeInternalSlot")], defaults.emptyArray);
|
||||
def("Variance")
|
||||
.bases("Node")
|
||||
.build("kind")
|
||||
.field("kind", or("plus", "minus"));
|
||||
var LegacyVariance = or(def("Variance"), "plus", "minus", null);
|
||||
def("ObjectTypeProperty")
|
||||
.bases("Node")
|
||||
.build("key", "value", "optional")
|
||||
.field("key", or(def("Literal"), def("Identifier")))
|
||||
.field("value", def("FlowType"))
|
||||
.field("optional", Boolean)
|
||||
.field("variance", LegacyVariance, defaults["null"]);
|
||||
def("ObjectTypeIndexer")
|
||||
.bases("Node")
|
||||
.build("id", "key", "value")
|
||||
.field("id", def("Identifier"))
|
||||
.field("key", def("FlowType"))
|
||||
.field("value", def("FlowType"))
|
||||
.field("variance", LegacyVariance, defaults["null"]);
|
||||
def("ObjectTypeCallProperty")
|
||||
.bases("Node")
|
||||
.build("value")
|
||||
.field("value", def("FunctionTypeAnnotation"))
|
||||
.field("static", Boolean, defaults["false"]);
|
||||
def("QualifiedTypeIdentifier")
|
||||
.bases("Node")
|
||||
.build("qualification", "id")
|
||||
.field("qualification", or(def("Identifier"), def("QualifiedTypeIdentifier")))
|
||||
.field("id", def("Identifier"));
|
||||
def("GenericTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("id", "typeParameters")
|
||||
.field("id", or(def("Identifier"), def("QualifiedTypeIdentifier")))
|
||||
.field("typeParameters", or(def("TypeParameterInstantiation"), null));
|
||||
def("MemberTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("object", "property")
|
||||
.field("object", def("Identifier"))
|
||||
.field("property", or(def("MemberTypeAnnotation"), def("GenericTypeAnnotation")));
|
||||
def("UnionTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("types")
|
||||
.field("types", [def("FlowType")]);
|
||||
def("IntersectionTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("types")
|
||||
.field("types", [def("FlowType")]);
|
||||
def("TypeofTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("argument")
|
||||
.field("argument", def("FlowType"));
|
||||
def("ObjectTypeSpreadProperty")
|
||||
.bases("Node")
|
||||
.build("argument")
|
||||
.field("argument", def("FlowType"));
|
||||
def("ObjectTypeInternalSlot")
|
||||
.bases("Node")
|
||||
.build("id", "value", "optional", "static", "method")
|
||||
.field("id", def("Identifier"))
|
||||
.field("value", def("FlowType"))
|
||||
.field("optional", Boolean)
|
||||
.field("static", Boolean)
|
||||
.field("method", Boolean);
|
||||
def("TypeParameterDeclaration")
|
||||
.bases("Node")
|
||||
.build("params")
|
||||
.field("params", [def("TypeParameter")]);
|
||||
def("TypeParameterInstantiation")
|
||||
.bases("Node")
|
||||
.build("params")
|
||||
.field("params", [def("FlowType")]);
|
||||
def("TypeParameter")
|
||||
.bases("FlowType")
|
||||
.build("name", "variance", "bound")
|
||||
.field("name", String)
|
||||
.field("variance", LegacyVariance, defaults["null"])
|
||||
.field("bound", or(def("TypeAnnotation"), null), defaults["null"]);
|
||||
def("ClassProperty")
|
||||
.field("variance", LegacyVariance, defaults["null"]);
|
||||
def("ClassImplements")
|
||||
.bases("Node")
|
||||
.build("id")
|
||||
.field("id", def("Identifier"))
|
||||
.field("superClass", or(def("Expression"), null), defaults["null"])
|
||||
.field("typeParameters", or(def("TypeParameterInstantiation"), null), defaults["null"]);
|
||||
def("InterfaceTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("body", "extends")
|
||||
.field("body", def("ObjectTypeAnnotation"))
|
||||
.field("extends", or([def("InterfaceExtends")], null), defaults["null"]);
|
||||
def("InterfaceDeclaration")
|
||||
.bases("Declaration")
|
||||
.build("id", "body", "extends")
|
||||
.field("id", def("Identifier"))
|
||||
.field("typeParameters", or(def("TypeParameterDeclaration"), null), defaults["null"])
|
||||
.field("body", def("ObjectTypeAnnotation"))
|
||||
.field("extends", [def("InterfaceExtends")]);
|
||||
def("DeclareInterface")
|
||||
.bases("InterfaceDeclaration")
|
||||
.build("id", "body", "extends");
|
||||
def("InterfaceExtends")
|
||||
.bases("Node")
|
||||
.build("id")
|
||||
.field("id", def("Identifier"))
|
||||
.field("typeParameters", or(def("TypeParameterInstantiation"), null), defaults["null"]);
|
||||
def("TypeAlias")
|
||||
.bases("Declaration")
|
||||
.build("id", "typeParameters", "right")
|
||||
.field("id", def("Identifier"))
|
||||
.field("typeParameters", or(def("TypeParameterDeclaration"), null))
|
||||
.field("right", def("FlowType"));
|
||||
def("OpaqueType")
|
||||
.bases("Declaration")
|
||||
.build("id", "typeParameters", "impltype", "supertype")
|
||||
.field("id", def("Identifier"))
|
||||
.field("typeParameters", or(def("TypeParameterDeclaration"), null))
|
||||
.field("impltype", def("FlowType"))
|
||||
.field("supertype", def("FlowType"));
|
||||
def("DeclareTypeAlias")
|
||||
.bases("TypeAlias")
|
||||
.build("id", "typeParameters", "right");
|
||||
def("DeclareOpaqueType")
|
||||
.bases("TypeAlias")
|
||||
.build("id", "typeParameters", "supertype");
|
||||
def("TypeCastExpression")
|
||||
.bases("Expression")
|
||||
.build("expression", "typeAnnotation")
|
||||
.field("expression", def("Expression"))
|
||||
.field("typeAnnotation", def("TypeAnnotation"));
|
||||
def("TupleTypeAnnotation")
|
||||
.bases("FlowType")
|
||||
.build("types")
|
||||
.field("types", [def("FlowType")]);
|
||||
def("DeclareVariable")
|
||||
.bases("Statement")
|
||||
.build("id")
|
||||
.field("id", def("Identifier"));
|
||||
def("DeclareFunction")
|
||||
.bases("Statement")
|
||||
.build("id")
|
||||
.field("id", def("Identifier"));
|
||||
def("DeclareClass")
|
||||
.bases("InterfaceDeclaration")
|
||||
.build("id");
|
||||
def("DeclareModule")
|
||||
.bases("Statement")
|
||||
.build("id", "body")
|
||||
.field("id", or(def("Identifier"), def("Literal")))
|
||||
.field("body", def("BlockStatement"));
|
||||
def("DeclareModuleExports")
|
||||
.bases("Statement")
|
||||
.build("typeAnnotation")
|
||||
.field("typeAnnotation", def("TypeAnnotation"));
|
||||
def("DeclareExportDeclaration")
|
||||
.bases("Declaration")
|
||||
.build("default", "declaration", "specifiers", "source")
|
||||
.field("default", Boolean)
|
||||
.field("declaration", or(def("DeclareVariable"), def("DeclareFunction"), def("DeclareClass"), def("FlowType"), // Implies default.
|
||||
null))
|
||||
.field("specifiers", [or(def("ExportSpecifier"), def("ExportBatchSpecifier"))], defaults.emptyArray)
|
||||
.field("source", or(def("Literal"), null), defaults["null"]);
|
||||
def("DeclareExportAllDeclaration")
|
||||
.bases("Declaration")
|
||||
.build("source")
|
||||
.field("source", or(def("Literal"), null), defaults["null"]);
|
||||
def("FlowPredicate").bases("Flow");
|
||||
def("InferredPredicate")
|
||||
.bases("FlowPredicate")
|
||||
.build();
|
||||
def("DeclaredPredicate")
|
||||
.bases("FlowPredicate")
|
||||
.build("value")
|
||||
.field("value", def("Expression"));
|
||||
def("CallExpression")
|
||||
.field("typeArguments", or(null, def("TypeParameterInstantiation")), defaults["null"]);
|
||||
def("NewExpression")
|
||||
.field("typeArguments", or(null, def("TypeParameterInstantiation")), defaults["null"]);
|
||||
}
|
||||
exports.default = default_1;
|
||||
module.exports = exports["default"];
|
||||
@@ -0,0 +1,16 @@
|
||||
import { __read, __spreadArray } from "tslib";
|
||||
import { operate } from '../util/lift';
|
||||
import { concatAll } from './concatAll';
|
||||
import { popScheduler } from '../util/args';
|
||||
import { from } from '../observable/from';
|
||||
export function concat() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var scheduler = popScheduler(args);
|
||||
return operate(function (source, subscriber) {
|
||||
concatAll()(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber);
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=concat.js.map
|
||||
@@ -0,0 +1,87 @@
|
||||
### Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
|
||||
|
||||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
#### [v1.0.5](https://github.com/ljharb/internal-slot/compare/v1.0.4...v1.0.5)
|
||||
|
||||
> 9 February 2023
|
||||
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`e427703`](https://github.com/ljharb/internal-slot/commit/e427703bfc669c590a863ec77ecd3789d7b7c458)
|
||||
- [Deps] update `get-intrinsic` [`aa652f0`](https://github.com/ljharb/internal-slot/commit/aa652f05c5c15b4ed1a118be60f0565e47bd7208)
|
||||
- [Fix] improve assertion message [`8df86e3`](https://github.com/ljharb/internal-slot/commit/8df86e3ea21786b5eb7654f22202665c8b63accf)
|
||||
|
||||
#### [v1.0.4](https://github.com/ljharb/internal-slot/compare/v1.0.3...v1.0.4)
|
||||
|
||||
> 13 December 2022
|
||||
|
||||
- [actions] reuse common workflows [`82a1aee`](https://github.com/ljharb/internal-slot/commit/82a1aee603bce8627930597edb3a04b4970ed151)
|
||||
- [meta] use `npmignore` to autogenerate an npmignore file [`56f7e71`](https://github.com/ljharb/internal-slot/commit/56f7e7182dd934dd6c1b80497a110670d02a91b9)
|
||||
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`e25ff67`](https://github.com/ljharb/internal-slot/commit/e25ff67d568f77c1b66168957d82b080779e1c0a)
|
||||
- [actions] update rebase action to use reusable workflow [`227e81e`](https://github.com/ljharb/internal-slot/commit/227e81eaef7230a265103ef1ef0618d2920c3f30)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `foreach`, `object-inspect`, `tape` [`fc9f319`](https://github.com/ljharb/internal-slot/commit/fc9f319d136ddf2e79910390d1e7ad279d41cc01)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`0a72a0f`](https://github.com/ljharb/internal-slot/commit/0a72a0f389511b41645f441da19257a266cb37f7)
|
||||
- [actions] update codecov uploader [`e2b993f`](https://github.com/ljharb/internal-slot/commit/e2b993f143278a30424ebd5526019e59828989d0)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`8f0ab80`](https://github.com/ljharb/internal-slot/commit/8f0ab808afdd458001c35c828962dc714d824754)
|
||||
- [actions] update checkout action [`8da4b91`](https://github.com/ljharb/internal-slot/commit/8da4b91c3454671da2e53a831ca0928147965a09)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@safe-publish-latest`, `tape` [`7ab37aa`](https://github.com/ljharb/internal-slot/commit/7ab37aabf01ded2605fa583a9866b62172f82e30)
|
||||
- [readme] add github actions/codecov badges [`71234be`](https://github.com/ljharb/internal-slot/commit/71234bef4ef99e2f17d72ae3a1b7c0522519b7d7)
|
||||
- [Fix] `assert`: throw on a nonexistent slot even when an object already has other slots [`12580bd`](https://github.com/ljharb/internal-slot/commit/12580bd26fe9f8603566e9e076092b5e1fb7340b)
|
||||
- [Tests] use `for-each` instead of `foreach` [`7229df0`](https://github.com/ljharb/internal-slot/commit/7229df01666ccb022dde82686d84b97b7bcfc53a)
|
||||
- [meta] use `prepublishOnly` script for npm 7+ [`8728872`](https://github.com/ljharb/internal-slot/commit/8728872cfbd735d3ae87e885c081a08d5b26edf0)
|
||||
- [Deps] update `get-intrinsic` [`1b7088f`](https://github.com/ljharb/internal-slot/commit/1b7088fa970c33757816b08357814bdbf6d722b6)
|
||||
- [Deps] update `get-intrinsic` [`063621e`](https://github.com/ljharb/internal-slot/commit/063621ec99d1b9262d3898c0ecad0e1e98be5f75)
|
||||
|
||||
#### [v1.0.3](https://github.com/ljharb/internal-slot/compare/v1.0.2...v1.0.3)
|
||||
|
||||
> 26 January 2021
|
||||
|
||||
- [Tests] use shared travis-ci configs [`0ef2263`](https://github.com/ljharb/internal-slot/commit/0ef22634fa2269d9df0d784aca3c5748e8eabd3b)
|
||||
- [Tests] migrate tests to Github Actions [`6253915`](https://github.com/ljharb/internal-slot/commit/6253915d28721df2eda5630849bc6b57647e3ee2)
|
||||
- [meta] do not publish github action workflow files [`ef94e55`](https://github.com/ljharb/internal-slot/commit/ef94e555727ed6a649ef64010904fe89a468d459)
|
||||
- [Tests] run `nyc` on all tests; use `tape` runner [`917d6ca`](https://github.com/ljharb/internal-slot/commit/917d6ca630cdcd6b4da9a2c300c6a3abb6e724fe)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`8dcb6fe`](https://github.com/ljharb/internal-slot/commit/8dcb6fe01d6a45e1af17a9dace95ca47c99b4328)
|
||||
- [actions] add "Allow Edits" workflow [`7aa3e86`](https://github.com/ljharb/internal-slot/commit/7aa3e86edb0149fd882717481885760aeb28474e)
|
||||
- [Refactor] use `get-intrinsic` instead of `es-abstract`; update `side-channel` [`11ad17d`](https://github.com/ljharb/internal-slot/commit/11ad17d4255adcbc55fd4eca0bf6733bac59f1bf)
|
||||
- [readme] remove travis badge [`5b75452`](https://github.com/ljharb/internal-slot/commit/5b754523aa07e8f67d0135df75059a18047292bb)
|
||||
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`d531688`](https://github.com/ljharb/internal-slot/commit/d5316880956b4dd83e6b6c9ab48fdd8171a4a268)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`c76fa91`](https://github.com/ljharb/internal-slot/commit/c76fa91a7e623a738e22332bee4e985aea41122e)
|
||||
- [Dev Deps] update `eslint`, `tape` [`e733ccd`](https://github.com/ljharb/internal-slot/commit/e733ccd68e81c72ef2e02726e001895053de7887)
|
||||
- [Dev Deps] update `auto-changelog`; add `aud` [`df20bf5`](https://github.com/ljharb/internal-slot/commit/df20bf5d3943a533c20799d8cc1449997e85d53b)
|
||||
- [meta] fix autochangelog [`e89e6f1`](https://github.com/ljharb/internal-slot/commit/e89e6f1ff9f10f386e6400b586db78ad9c0f1309)
|
||||
- [Tests] only audit prod deps [`71317b9`](https://github.com/ljharb/internal-slot/commit/71317b95ec6bbd9877807da0c0316ee9f5f30fab)
|
||||
- [Deps] update `es-abstract` [`c17ccf4`](https://github.com/ljharb/internal-slot/commit/c17ccf45f4cb0d3b7a1536e9cd3a7ff9a7dafd21)
|
||||
- [Dev Deps] update `tape` [`d81ae03`](https://github.com/ljharb/internal-slot/commit/d81ae030a0e8f58cee00f752601ce60405a93d78)
|
||||
- [Deps] update `es-abstract` [`b56303b`](https://github.com/ljharb/internal-slot/commit/b56303b4c3af7a510f9f51860895a46fd2e14752)
|
||||
- [Deps] update `es-abstract` [`9996d1c`](https://github.com/ljharb/internal-slot/commit/9996d1cf3507750c7a6845a2fb0d0f849ea898a1)
|
||||
|
||||
#### [v1.0.2](https://github.com/ljharb/internal-slot/compare/v1.0.1...v1.0.2)
|
||||
|
||||
> 20 December 2019
|
||||
|
||||
- [Deps] update `es-abstract`, `side-channel` [`5c9df03`](https://github.com/ljharb/internal-slot/commit/5c9df03a25518f5c482cff4e1447a26fa071df9a)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`7820f98`](https://github.com/ljharb/internal-slot/commit/7820f984e523a64ddf3068c4e5631abf61eb1ea4)
|
||||
|
||||
#### [v1.0.1](https://github.com/ljharb/internal-slot/compare/v1.0.0...v1.0.1)
|
||||
|
||||
> 1 December 2019
|
||||
|
||||
- [Refactor] use `side-channel` package [`d38639f`](https://github.com/ljharb/internal-slot/commit/d38639f0a3cdb5090711179d0e78df857ecbd5d3)
|
||||
- [actions] add automatic rebasing / merge commit blocking [`74267e6`](https://github.com/ljharb/internal-slot/commit/74267e6e591e18ba39186cb99139d3fd7a757c9f)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest` [`b042eef`](https://github.com/ljharb/internal-slot/commit/b042eefc067b830bbd370833f7f21754e802b0b2)
|
||||
- [Deps] update `es-abstract` [`98cf4e8`](https://github.com/ljharb/internal-slot/commit/98cf4e86c1bfe99eda7b11a8ea70394368f33e4f)
|
||||
|
||||
#### v1.0.0
|
||||
|
||||
> 20 October 2019
|
||||
|
||||
- Tests [`b50fa41`](https://github.com/ljharb/internal-slot/commit/b50fa41b6f47aba39ac4cb733658580974a0b00a)
|
||||
- implementation [`c5a59f3`](https://github.com/ljharb/internal-slot/commit/c5a59f3753677f81aa12a0226d3b1187846d06dd)
|
||||
- Initial commit [`15ebe4d`](https://github.com/ljharb/internal-slot/commit/15ebe4dc6d46885f67969d64c9c3e705780963f8)
|
||||
- readme [`382a3f5`](https://github.com/ljharb/internal-slot/commit/382a3f53d8975e6488373a0fc2abcdc7c4c44247)
|
||||
- npm init [`d5e7c97`](https://github.com/ljharb/internal-slot/commit/d5e7c977ef694e89c245fd11165f63c06a7a5040)
|
||||
- [meta] add FUNDING.yml [`685b608`](https://github.com/ljharb/internal-slot/commit/685b6087613f6735f4411a558500d92f8a3ec3f2)
|
||||
- [meta] add `auto-changelog`, `safe-publish-latest` [`f8fdf1c`](https://github.com/ljharb/internal-slot/commit/f8fdf1c3f0c592f71746da6d7f8bea18f8946dda)
|
||||
- [Tests] add `npm run lint` [`baaaa09`](https://github.com/ljharb/internal-slot/commit/baaaa09ab6e5bc5fcc0e7c76e10c55aa18f4ca7e)
|
||||
- Only apps should have lockfiles [`dfa7efa`](https://github.com/ljharb/internal-slot/commit/dfa7efa3d5cd23261cb75c2adab6ee3c06790fee)
|
||||
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AjaxResponse = exports.AjaxTimeoutError = exports.AjaxError = exports.ajax = void 0;
|
||||
var ajax_1 = require("../internal/ajax/ajax");
|
||||
Object.defineProperty(exports, "ajax", { enumerable: true, get: function () { return ajax_1.ajax; } });
|
||||
var errors_1 = require("../internal/ajax/errors");
|
||||
Object.defineProperty(exports, "AjaxError", { enumerable: true, get: function () { return errors_1.AjaxError; } });
|
||||
Object.defineProperty(exports, "AjaxTimeoutError", { enumerable: true, get: function () { return errors_1.AjaxTimeoutError; } });
|
||||
var AjaxResponse_1 = require("../internal/ajax/AjaxResponse");
|
||||
Object.defineProperty(exports, "AjaxResponse", { enumerable: true, get: function () { return AjaxResponse_1.AjaxResponse; } });
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
var Converter_1 = require("./Converter");
|
||||
var helper = function (param, options) {
|
||||
return new Converter_1.Converter(param, options);
|
||||
};
|
||||
helper["csv"] = helper;
|
||||
helper["Converter"] = Converter_1.Converter;
|
||||
module.exports = helper;
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Observable } from '../Observable';
|
||||
export var EMPTY = new Observable(function (subscriber) { return subscriber.complete(); });
|
||||
export function empty(scheduler) {
|
||||
return scheduler ? emptyScheduled(scheduler) : EMPTY;
|
||||
}
|
||||
function emptyScheduled(scheduler) {
|
||||
return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
|
||||
}
|
||||
//# sourceMappingURL=empty.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
var objToString = Object.prototype.toString, id = objToString.call(new Error());
|
||||
|
||||
module.exports = function (value) {
|
||||
return (value && (value instanceof Error || objToString.call(value) === id)) || false;
|
||||
};
|
||||
@@ -0,0 +1,91 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const resolveCommand = require('./util/resolveCommand');
|
||||
const escape = require('./util/escape');
|
||||
const readShebang = require('./util/readShebang');
|
||||
|
||||
const isWin = process.platform === 'win32';
|
||||
const isExecutableRegExp = /\.(?:com|exe)$/i;
|
||||
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
||||
|
||||
function detectShebang(parsed) {
|
||||
parsed.file = resolveCommand(parsed);
|
||||
|
||||
const shebang = parsed.file && readShebang(parsed.file);
|
||||
|
||||
if (shebang) {
|
||||
parsed.args.unshift(parsed.file);
|
||||
parsed.command = shebang;
|
||||
|
||||
return resolveCommand(parsed);
|
||||
}
|
||||
|
||||
return parsed.file;
|
||||
}
|
||||
|
||||
function parseNonShell(parsed) {
|
||||
if (!isWin) {
|
||||
return parsed;
|
||||
}
|
||||
|
||||
// Detect & add support for shebangs
|
||||
const commandFile = detectShebang(parsed);
|
||||
|
||||
// We don't need a shell if the command filename is an executable
|
||||
const needsShell = !isExecutableRegExp.test(commandFile);
|
||||
|
||||
// If a shell is required, use cmd.exe and take care of escaping everything correctly
|
||||
// Note that `forceShell` is an hidden option used only in tests
|
||||
if (parsed.options.forceShell || needsShell) {
|
||||
// Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`
|
||||
// The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument
|
||||
// Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,
|
||||
// we need to double escape them
|
||||
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
||||
|
||||
// Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar)
|
||||
// This is necessary otherwise it will always fail with ENOENT in those cases
|
||||
parsed.command = path.normalize(parsed.command);
|
||||
|
||||
// Escape command & arguments
|
||||
parsed.command = escape.command(parsed.command);
|
||||
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
||||
|
||||
const shellCommand = [parsed.command].concat(parsed.args).join(' ');
|
||||
|
||||
parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
|
||||
parsed.command = process.env.comspec || 'cmd.exe';
|
||||
parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
|
||||
}
|
||||
|
||||
return parsed;
|
||||
}
|
||||
|
||||
function parse(command, args, options) {
|
||||
// Normalize arguments, similar to nodejs
|
||||
if (args && !Array.isArray(args)) {
|
||||
options = args;
|
||||
args = null;
|
||||
}
|
||||
|
||||
args = args ? args.slice(0) : []; // Clone array to avoid changing the original
|
||||
options = Object.assign({}, options); // Clone object to avoid changing the original
|
||||
|
||||
// Build our parsed object
|
||||
const parsed = {
|
||||
command,
|
||||
args,
|
||||
options,
|
||||
file: undefined,
|
||||
original: {
|
||||
command,
|
||||
args,
|
||||
},
|
||||
};
|
||||
|
||||
// Delegate further parsing to shell or non-shell
|
||||
return options.shell ? parsed : parseNonShell(parsed);
|
||||
}
|
||||
|
||||
module.exports = parse;
|
||||
@@ -0,0 +1,5 @@
|
||||
JournalCode JournalLib EcritureNum EcritureDate CompteNum CompteLib CompAuxNum CompAuxLib PieceRef PieceDate EcritureLib Debit Credit EcritureLet DateLet ValidDate Montantdevise Idevise
|
||||
AA BBBBBB 0 20140701 CCCCCCCC ddddddddddddddd ZZZZZZZ1 20140701 EEEEE EEE EEEEEE 34,81 0,00 20150630 0,00
|
||||
AA BBBBBB 0 20140701 CCCCCCCC ddddddddddddddd ZZZZZZZ2 20140701 EEEEE EEE EEEEEE 12,02 0,00 20150630 0,00
|
||||
AA BBBBBB 0 20140701 CCCCCCCC ddddddddddddddd ZZZZZZZ3 20140701 EEEEE EEE EEEEEE 37,98 0,00 20150630 0,00
|
||||
AA BBBBBB 0 20140701 CCCCCCCC ddddddddddddddd ZZZZZZZ4 20140701 EEEEE EEE EEEEEE 27,48 0,00 20150630 0,00
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"os-name","version":"5.1.0","files":{"license":{"checkedAt":1678883669302,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1678883671466,"integrity":"sha512-GK3VhzI0Bj4OLtECvk7FxJ3h99z72RE4VUa9hcWCFWWSqD5NM3D9wYF48gtG83tPSjfEZKa0ZMZkkQQsAPcOdA==","mode":420,"size":1144},"readme.md":{"checkedAt":1678883671466,"integrity":"sha512-VUHCNAHoeB4wqVH3aOpDEL7btkdmL2vq6/yL/Z+zPoZY5wqTMfXXhp4hIGIL395F7a6tsgylIYFL4QTVb79SOA==","mode":420,"size":1626},"package.json":{"checkedAt":1678883671466,"integrity":"sha512-nQy2VwGbaQh9ign1cibkjJWloM3rn3EXIn+scDCQBU4rz5HzExN1RHtpQ7RoSH7dpwQ+lZqe1IU3jVUv7CunRw==","mode":420,"size":906},"index.d.ts":{"checkedAt":1678883671466,"integrity":"sha512-tmGZxjabogbssTstjTEpnrAeKhL0wRZ0h4k5oHuIrKoZnvwzHY3iMnzo0GqdiZyYFSAP6Ft2A9cffd2elR8f2Q==","mode":420,"size":673}}}
|
||||
@@ -0,0 +1,45 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf');
|
||||
var $push = callBound('Array.prototype.push');
|
||||
|
||||
var Get = require('./Get');
|
||||
var IsArray = require('./IsArray');
|
||||
var ToLength = require('./ToLength');
|
||||
var ToString = require('./ToString');
|
||||
var Type = require('./Type');
|
||||
|
||||
var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'Object'];
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-createlistfromarraylike
|
||||
module.exports = function CreateListFromArrayLike(obj) {
|
||||
var elementTypes = arguments.length > 1
|
||||
? arguments[1]
|
||||
: defaultElementTypes;
|
||||
|
||||
if (Type(obj) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: `obj` must be an Object');
|
||||
}
|
||||
if (!IsArray(elementTypes)) {
|
||||
throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array');
|
||||
}
|
||||
var len = ToLength(Get(obj, 'length'));
|
||||
var list = [];
|
||||
var index = 0;
|
||||
while (index < len) {
|
||||
var indexName = ToString(index);
|
||||
var next = Get(obj, indexName);
|
||||
var nextType = Type(next);
|
||||
if ($indexOf(elementTypes, nextType) < 0) {
|
||||
throw new $TypeError('item type ' + nextType + ' is not a valid elementType');
|
||||
}
|
||||
$push(list, next);
|
||||
index += 1;
|
||||
}
|
||||
return list;
|
||||
};
|
||||
@@ -0,0 +1,108 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for csv2json/libs/core/fileline.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../../base.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>
|
||||
<a href="../../../index.html">All files</a> / <a href="index.html">csv2json/libs/core</a> fileline.js
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>0/6</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>0/1</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>0/6</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line low'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a>
|
||||
<a name='L14'></a><a href='#L14'>14</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">var getEol = <span class="cstat-no" title="statement not covered" >require("./getEol");</span>
|
||||
/**
|
||||
* convert data chunk to file lines array
|
||||
* @param {string} data data chunk as utf8 string
|
||||
* @param {object} param Converter param object
|
||||
* @return {Object} {lines:[line1,line2...],partial:String}
|
||||
*/
|
||||
<span class="cstat-no" title="statement not covered" >module.exports = <span class="fstat-no" title="function not covered" >fu</span>nction(data, param) {</span>
|
||||
var eol = <span class="cstat-no" title="statement not covered" >getEol(data,param);</span>
|
||||
var lines = <span class="cstat-no" title="statement not covered" >data.split(eol);</span>
|
||||
var partial = <span class="cstat-no" title="statement not covered" >lines.pop();</span>
|
||||
<span class="cstat-no" title="statement not covered" > return {lines: lines, partial: partial};</span>
|
||||
};
|
||||
</pre></td></tr>
|
||||
</table></pre>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri May 11 2018 21:20:20 GMT+0100 (IST)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (typeof prettyPrint === 'function') {
|
||||
prettyPrint();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="../../../sorter.js"></script>
|
||||
<script src="../../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,149 @@
|
||||
import { writable, derived } from 'svelte/store';
|
||||
export default class Context {
|
||||
rowsPerPage;
|
||||
pageNumber;
|
||||
triggerChange;
|
||||
globalSearch;
|
||||
filters;
|
||||
rawRows;
|
||||
filteredRows;
|
||||
rows;
|
||||
rowCount;
|
||||
pages;
|
||||
pagesWithEllipsis;
|
||||
pageCount;
|
||||
sorted;
|
||||
constructor(data, params) {
|
||||
this.rowsPerPage = writable(params.rowsPerPage);
|
||||
this.pageNumber = writable(1);
|
||||
this.triggerChange = writable(0);
|
||||
this.globalSearch = writable({ value: null, scope: null });
|
||||
this.filters = writable([]);
|
||||
this.rawRows = writable(data);
|
||||
this.filteredRows = this.createFilteredRows();
|
||||
this.rows = this.createPaginatedRows();
|
||||
this.rowCount = this.createRowCount();
|
||||
this.pages = this.createPages();
|
||||
this.pagesWithEllipsis = this.createPagesWithEllipsis();
|
||||
this.pageCount = this.createPageCount();
|
||||
this.sorted = writable({ identifier: null, direction: null, fn: null });
|
||||
}
|
||||
createFilteredRows() {
|
||||
return derived([this.rawRows, this.globalSearch, this.filters], ([$rawRows, $globalSearch, $filters]) => {
|
||||
if ($globalSearch.value) {
|
||||
$rawRows = $rawRows.filter(row => {
|
||||
const scope = $globalSearch.scope ?? Object.keys(row);
|
||||
return scope.some(key => {
|
||||
if (row[key]) {
|
||||
return this.stringMatch(row[key], $globalSearch.value);
|
||||
}
|
||||
return '';
|
||||
});
|
||||
});
|
||||
this.pageNumber.set(1);
|
||||
this.triggerChange.update(store => { return store + 1; });
|
||||
}
|
||||
if ($filters.length > 0) {
|
||||
$filters.forEach(localFilter => {
|
||||
return $rawRows = $rawRows.filter(row => {
|
||||
const entry = localFilter.filterBy(row);
|
||||
return this.stringMatch(entry, localFilter.value);
|
||||
});
|
||||
});
|
||||
this.pageNumber.set(1);
|
||||
this.triggerChange.update(store => { return store + 1; });
|
||||
}
|
||||
return $rawRows;
|
||||
});
|
||||
}
|
||||
createPaginatedRows() {
|
||||
return derived([this.filteredRows, this.rowsPerPage, this.pageNumber], ([$filteredRows, $rowsPerPage, $pageNumber]) => {
|
||||
if (!$rowsPerPage) {
|
||||
return $filteredRows;
|
||||
}
|
||||
this.triggerChange.update(store => { return store + 1; });
|
||||
return $filteredRows.slice(($pageNumber - 1) * $rowsPerPage, $pageNumber * $rowsPerPage);
|
||||
});
|
||||
}
|
||||
createRowCount() {
|
||||
return derived([this.filteredRows, this.pageNumber, this.rowsPerPage], ([$filteredRows, $pageNumber, $rowsPerPage]) => {
|
||||
const total = $filteredRows.length;
|
||||
if (!$rowsPerPage) {
|
||||
return { total: total, start: 1, end: total };
|
||||
}
|
||||
return {
|
||||
total: total,
|
||||
start: ($pageNumber * $rowsPerPage - $rowsPerPage) + 1,
|
||||
end: Math.min(($pageNumber * $rowsPerPage), $filteredRows.length),
|
||||
};
|
||||
});
|
||||
}
|
||||
createPages() {
|
||||
return derived([this.rowsPerPage, this.filteredRows], ([$rowsPerPage, $filteredRows]) => {
|
||||
if (!$rowsPerPage) {
|
||||
return [1];
|
||||
}
|
||||
const pages = Array.from(Array(Math.ceil($filteredRows.length / $rowsPerPage)));
|
||||
return pages.map((row, i) => {
|
||||
return i + 1;
|
||||
});
|
||||
});
|
||||
}
|
||||
createPagesWithEllipsis() {
|
||||
return derived([this.pages, this.pageNumber], ([$pages, $pageNumber]) => {
|
||||
if ($pages.length <= 7) {
|
||||
return $pages;
|
||||
}
|
||||
const ellipse = null;
|
||||
const firstPage = 1;
|
||||
const lastPage = $pages.length;
|
||||
if ($pageNumber <= 4) {
|
||||
return [
|
||||
...$pages.slice(0, 5),
|
||||
ellipse,
|
||||
lastPage,
|
||||
];
|
||||
}
|
||||
else if ($pageNumber < $pages.length - 3) {
|
||||
return [
|
||||
firstPage,
|
||||
ellipse,
|
||||
...$pages.slice($pageNumber - 2, $pageNumber + 1),
|
||||
ellipse,
|
||||
lastPage
|
||||
];
|
||||
}
|
||||
else {
|
||||
return [
|
||||
firstPage,
|
||||
ellipse,
|
||||
...$pages.slice($pages.length - 5, $pages.length)
|
||||
];
|
||||
}
|
||||
});
|
||||
}
|
||||
createPageCount() {
|
||||
return derived([this.pages], ([$pages]) => {
|
||||
return $pages.length;
|
||||
});
|
||||
}
|
||||
stringMatch(entry, value) {
|
||||
if (typeof entry === 'string' || !entry) {
|
||||
return String(entry)
|
||||
.toLowerCase()
|
||||
.normalize("NFD")
|
||||
.replace(/[\u0300-\u036f]/g, "")
|
||||
.indexOf(value
|
||||
.toString()
|
||||
.toLowerCase()
|
||||
.normalize("NFD")
|
||||
.replace(/[\u0300-\u036f]/g, "")) > -1;
|
||||
}
|
||||
else if (typeof entry === 'object') {
|
||||
return Object.keys(entry).some(k => {
|
||||
return this.stringMatch(entry[k], value);
|
||||
});
|
||||
}
|
||||
return String(entry).indexOf(String(value)) > -1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.from : require("./shim");
|
||||
@@ -0,0 +1,30 @@
|
||||
// Internal method, used by iteration functions.
|
||||
// Calls a function for each key-value pair found in object
|
||||
// Optionally takes compareFn to iterate object in specific order
|
||||
|
||||
"use strict";
|
||||
|
||||
var callable = require("./valid-callable")
|
||||
, value = require("./valid-value")
|
||||
, bind = Function.prototype.bind
|
||||
, call = Function.prototype.call
|
||||
, keys = Object.keys
|
||||
, objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
|
||||
module.exports = function (method, defVal) {
|
||||
return function (obj, cb /*, thisArg, compareFn*/) {
|
||||
var list, thisArg = arguments[2], compareFn = arguments[3];
|
||||
obj = Object(value(obj));
|
||||
callable(cb);
|
||||
|
||||
list = keys(obj);
|
||||
if (compareFn) {
|
||||
list.sort(typeof compareFn === "function" ? bind.call(compareFn, obj) : undefined);
|
||||
}
|
||||
if (typeof method !== "function") method = list[method];
|
||||
return call.call(method, list, function (key, index) {
|
||||
if (!objPropertyIsEnumerable.call(obj, key)) return defVal;
|
||||
return call.call(cb, thisArg, obj[key], key, obj, index);
|
||||
});
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
export type RunnerSelfserviceTimeoutError = {
|
||||
name: string;
|
||||
message: string;
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
let crypto = require('crypto')
|
||||
let { urlAlphabet } = require('./url-alphabet/index.cjs')
|
||||
const POOL_SIZE_MULTIPLIER = 128
|
||||
let pool, poolOffset
|
||||
let fillPool = bytes => {
|
||||
if (!pool || pool.length < bytes) {
|
||||
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)
|
||||
crypto.randomFillSync(pool)
|
||||
poolOffset = 0
|
||||
} else if (poolOffset + bytes > pool.length) {
|
||||
crypto.randomFillSync(pool)
|
||||
poolOffset = 0
|
||||
}
|
||||
poolOffset += bytes
|
||||
}
|
||||
let random = bytes => {
|
||||
fillPool((bytes -= 0))
|
||||
return pool.subarray(poolOffset - bytes, poolOffset)
|
||||
}
|
||||
let customRandom = (alphabet, defaultSize, getRandom) => {
|
||||
let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
|
||||
let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)
|
||||
return (size = defaultSize) => {
|
||||
let id = ''
|
||||
while (true) {
|
||||
let bytes = getRandom(step)
|
||||
let i = step
|
||||
while (i--) {
|
||||
id += alphabet[bytes[i] & mask] || ''
|
||||
if (id.length === size) return id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let customAlphabet = (alphabet, size = 21) =>
|
||||
customRandom(alphabet, size, random)
|
||||
let nanoid = (size = 21) => {
|
||||
fillPool((size -= 0))
|
||||
let id = ''
|
||||
for (let i = poolOffset - size; i < poolOffset; i++) {
|
||||
id += urlAlphabet[pool[i] & 63]
|
||||
}
|
||||
return id
|
||||
}
|
||||
module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random }
|
||||
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(String.prototype, "normalize", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
# safer-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![javascript style guide][standard-image]][standard-url] [![Security Responsible Disclosure][secuirty-image]][secuirty-url]
|
||||
|
||||
[travis-image]: https://travis-ci.org/ChALkeR/safer-buffer.svg?branch=master
|
||||
[travis-url]: https://travis-ci.org/ChALkeR/safer-buffer
|
||||
[npm-image]: https://img.shields.io/npm/v/safer-buffer.svg
|
||||
[npm-url]: https://npmjs.org/package/safer-buffer
|
||||
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
|
||||
[standard-url]: https://standardjs.com
|
||||
[secuirty-image]: https://img.shields.io/badge/Security-Responsible%20Disclosure-green.svg
|
||||
[secuirty-url]: https://github.com/nodejs/security-wg/blob/master/processes/responsible_disclosure_template.md
|
||||
|
||||
Modern Buffer API polyfill without footguns, working on Node.js from 0.8 to current.
|
||||
|
||||
## How to use?
|
||||
|
||||
First, port all `Buffer()` and `new Buffer()` calls to `Buffer.alloc()` and `Buffer.from()` API.
|
||||
|
||||
Then, to achieve compatibility with outdated Node.js versions (`<4.5.0` and 5.x `<5.9.0`), use
|
||||
`const Buffer = require('safer-buffer').Buffer` in all files where you make calls to the new
|
||||
Buffer API. _Use `var` instead of `const` if you need that for your Node.js version range support._
|
||||
|
||||
Also, see the
|
||||
[porting Buffer](https://github.com/ChALkeR/safer-buffer/blob/master/Porting-Buffer.md) guide.
|
||||
|
||||
## Do I need it?
|
||||
|
||||
Hopefully, not — dropping support for outdated Node.js versions should be fine nowdays, and that
|
||||
is the recommended path forward. You _do_ need to port to the `Buffer.alloc()` and `Buffer.from()`
|
||||
though.
|
||||
|
||||
See the [porting guide](https://github.com/ChALkeR/safer-buffer/blob/master/Porting-Buffer.md)
|
||||
for a better description.
|
||||
|
||||
## Why not [safe-buffer](https://npmjs.com/safe-buffer)?
|
||||
|
||||
_In short: while `safe-buffer` serves as a polyfill for the new API, it allows old API usage and
|
||||
itself contains footguns._
|
||||
|
||||
`safe-buffer` could be used safely to get the new API while still keeping support for older
|
||||
Node.js versions (like this module), but while analyzing ecosystem usage of the old Buffer API
|
||||
I found out that `safe-buffer` is itself causing problems in some cases.
|
||||
|
||||
For example, consider the following snippet:
|
||||
|
||||
```console
|
||||
$ cat example.unsafe.js
|
||||
console.log(Buffer(20))
|
||||
$ ./node-v6.13.0-linux-x64/bin/node example.unsafe.js
|
||||
<Buffer 0a 00 00 00 00 00 00 00 28 13 de 02 00 00 00 00 05 00 00 00>
|
||||
$ standard example.unsafe.js
|
||||
standard: Use JavaScript Standard Style (https://standardjs.com)
|
||||
/home/chalker/repo/safer-buffer/example.unsafe.js:2:13: 'Buffer()' was deprecated since v6. Use 'Buffer.alloc()' or 'Buffer.from()' (use 'https://www.npmjs.com/package/safe-buffer' for '<4.5.0') instead.
|
||||
```
|
||||
|
||||
This is allocates and writes to console an uninitialized chunk of memory.
|
||||
[standard](https://www.npmjs.com/package/standard) linter (among others) catch that and warn people
|
||||
to avoid using unsafe API.
|
||||
|
||||
Let's now throw in `safe-buffer`!
|
||||
|
||||
```console
|
||||
$ cat example.safe-buffer.js
|
||||
const Buffer = require('safe-buffer').Buffer
|
||||
console.log(Buffer(20))
|
||||
$ standard example.safe-buffer.js
|
||||
$ ./node-v6.13.0-linux-x64/bin/node example.safe-buffer.js
|
||||
<Buffer 08 00 00 00 00 00 00 00 28 58 01 82 fe 7f 00 00 00 00 00 00>
|
||||
```
|
||||
|
||||
See the problem? Adding in `safe-buffer` _magically removes the lint warning_, but the behavior
|
||||
remains identiсal to what we had before, and when launched on Node.js 6.x LTS — this dumps out
|
||||
chunks of uninitialized memory.
|
||||
_And this code will still emit runtime warnings on Node.js 10.x and above._
|
||||
|
||||
That was done by design. I first considered changing `safe-buffer`, prohibiting old API usage or
|
||||
emitting warnings on it, but that significantly diverges from `safe-buffer` design. After some
|
||||
discussion, it was decided to move my approach into a separate package, and _this is that separate
|
||||
package_.
|
||||
|
||||
This footgun is not imaginary — I observed top-downloaded packages doing that kind of thing,
|
||||
«fixing» the lint warning by blindly including `safe-buffer` without any actual changes.
|
||||
|
||||
Also in some cases, even if the API _was_ migrated to use of safe Buffer API — a random pull request
|
||||
can bring unsafe Buffer API usage back to the codebase by adding new calls — and that could go
|
||||
unnoticed even if you have a linter prohibiting that (becase of the reason stated above), and even
|
||||
pass CI. _I also observed that being done in popular packages._
|
||||
|
||||
Some examples:
|
||||
* [webdriverio](https://github.com/webdriverio/webdriverio/commit/05cbd3167c12e4930f09ef7cf93b127ba4effae4#diff-124380949022817b90b622871837d56cR31)
|
||||
(a module with 548 759 downloads/month),
|
||||
* [websocket-stream](https://github.com/maxogden/websocket-stream/commit/c9312bd24d08271687d76da0fe3c83493871cf61)
|
||||
(218 288 d/m, fix in [maxogden/websocket-stream#142](https://github.com/maxogden/websocket-stream/pull/142)),
|
||||
* [node-serialport](https://github.com/node-serialport/node-serialport/commit/e8d9d2b16c664224920ce1c895199b1ce2def48c)
|
||||
(113 138 d/m, fix in [node-serialport/node-serialport#1510](https://github.com/node-serialport/node-serialport/pull/1510)),
|
||||
* [karma](https://github.com/karma-runner/karma/commit/3d94b8cf18c695104ca195334dc75ff054c74eec)
|
||||
(3 973 193 d/m, fix in [karma-runner/karma#2947](https://github.com/karma-runner/karma/pull/2947)),
|
||||
* [spdy-transport](https://github.com/spdy-http2/spdy-transport/commit/5375ac33f4a62a4f65bcfc2827447d42a5dbe8b1)
|
||||
(5 970 727 d/m, fix in [spdy-http2/spdy-transport#53](https://github.com/spdy-http2/spdy-transport/pull/53)).
|
||||
* And there are a lot more over the ecosystem.
|
||||
|
||||
I filed a PR at
|
||||
[mysticatea/eslint-plugin-node#110](https://github.com/mysticatea/eslint-plugin-node/pull/110) to
|
||||
partially fix that (for cases when that lint rule is used), but it is a semver-major change for
|
||||
linter rules and presets, so it would take significant time for that to reach actual setups.
|
||||
_It also hasn't been released yet (2018-03-20)._
|
||||
|
||||
Also, `safer-buffer` discourages the usage of `.allocUnsafe()`, which is often done by a mistake.
|
||||
It still supports it with an explicit concern barier, by placing it under
|
||||
`require('safer-buffer/dangereous')`.
|
||||
|
||||
## But isn't throwing bad?
|
||||
|
||||
Not really. It's an error that could be noticed and fixed early, instead of causing havoc later like
|
||||
unguarded `new Buffer()` calls that end up receiving user input can do.
|
||||
|
||||
This package affects only the files where `var Buffer = require('safer-buffer').Buffer` was done, so
|
||||
it is really simple to keep track of things and make sure that you don't mix old API usage with that.
|
||||
Also, CI should hint anything that you might have missed.
|
||||
|
||||
New commits, if tested, won't land new usage of unsafe Buffer API this way.
|
||||
_Node.js 10.x also deals with that by printing a runtime depecation warning._
|
||||
|
||||
### Would it affect third-party modules?
|
||||
|
||||
No, unless you explicitly do an awful thing like monkey-patching or overriding the built-in `Buffer`.
|
||||
Don't do that.
|
||||
|
||||
### But I don't want throwing…
|
||||
|
||||
That is also fine!
|
||||
|
||||
Also, it could be better in some cases when you don't comprehensive enough test coverage.
|
||||
|
||||
In that case — just don't override `Buffer` and use
|
||||
`var SaferBuffer = require('safer-buffer').Buffer` instead.
|
||||
|
||||
That way, everything using `Buffer` natively would still work, but there would be two drawbacks:
|
||||
|
||||
* `Buffer.from`/`Buffer.alloc` won't be polyfilled — use `SaferBuffer.from` and
|
||||
`SaferBuffer.alloc` instead.
|
||||
* You are still open to accidentally using the insecure deprecated API — use a linter to catch that.
|
||||
|
||||
Note that using a linter to catch accidential `Buffer` constructor usage in this case is strongly
|
||||
recommended. `Buffer` is not overriden in this usecase, so linters won't get confused.
|
||||
|
||||
## «Without footguns»?
|
||||
|
||||
Well, it is still possible to do _some_ things with `Buffer` API, e.g. accessing `.buffer` property
|
||||
on older versions and duping things from there. You shouldn't do that in your code, probabably.
|
||||
|
||||
The intention is to remove the most significant footguns that affect lots of packages in the
|
||||
ecosystem, and to do it in the proper way.
|
||||
|
||||
Also, this package doesn't protect against security issues affecting some Node.js versions, so for
|
||||
usage in your own production code, it is still recommended to update to a Node.js version
|
||||
[supported by upstream](https://github.com/nodejs/release#release-schedule).
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"exhaust.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaust.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,MAAM,CAAC,IAAM,OAAO,GAAG,UAAU,CAAC"}
|
||||
@@ -0,0 +1,51 @@
|
||||
export type PathTypeFunction = (path: string) => Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Check whether the passed `path` is a file.
|
||||
*
|
||||
* @param path - The path to check.
|
||||
* @returns Whether the `path` is a file.
|
||||
*/
|
||||
export const isFile: PathTypeFunction;
|
||||
|
||||
/**
|
||||
* Check whether the passed `path` is a directory.
|
||||
*
|
||||
* @param path - The path to check.
|
||||
* @returns Whether the `path` is a directory.
|
||||
*/
|
||||
export const isDirectory: PathTypeFunction;
|
||||
|
||||
/**
|
||||
* Check whether the passed `path` is a symlink.
|
||||
*
|
||||
* @param path - The path to check.
|
||||
* @returns Whether the `path` is a symlink.
|
||||
*/
|
||||
export const isSymlink: PathTypeFunction;
|
||||
|
||||
export type PathTypeSyncFunction = (path: string) => boolean;
|
||||
|
||||
/**
|
||||
* Synchronously check whether the passed `path` is a file.
|
||||
*
|
||||
* @param path - The path to check.
|
||||
* @returns Whether the `path` is a file.
|
||||
*/
|
||||
export const isFileSync: PathTypeSyncFunction;
|
||||
|
||||
/**
|
||||
* Synchronously check whether the passed `path` is a directory.
|
||||
*
|
||||
* @param path - The path to check.
|
||||
* @returns Whether the `path` is a directory.
|
||||
*/
|
||||
export const isDirectorySync: PathTypeSyncFunction;
|
||||
|
||||
/**
|
||||
* Synchronously check whether the passed `path` is a symlink.
|
||||
*
|
||||
* @param path - The path to check.
|
||||
* @returns Whether the `path` is a directory.
|
||||
*/
|
||||
export const isSymlinkSync: PathTypeSyncFunction;
|
||||
@@ -0,0 +1,54 @@
|
||||
import type {CamelCase, CamelCaseOptions} from './camel-case';
|
||||
|
||||
/**
|
||||
Convert object properties to camel case recursively.
|
||||
|
||||
This can be useful when, for example, converting some API types from a different style.
|
||||
|
||||
@see CamelCasedProperties
|
||||
@see CamelCase
|
||||
|
||||
@example
|
||||
```
|
||||
import type {CamelCasedPropertiesDeep} from 'type-fest';
|
||||
|
||||
interface User {
|
||||
UserId: number;
|
||||
UserName: string;
|
||||
}
|
||||
|
||||
interface UserWithFriends {
|
||||
UserInfo: User;
|
||||
UserFriends: User[];
|
||||
}
|
||||
|
||||
const result: CamelCasedPropertiesDeep<UserWithFriends> = {
|
||||
userInfo: {
|
||||
userId: 1,
|
||||
userName: 'Tom',
|
||||
},
|
||||
userFriends: [
|
||||
{
|
||||
userId: 2,
|
||||
userName: 'Jerry',
|
||||
},
|
||||
{
|
||||
userId: 3,
|
||||
userName: 'Spike',
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
@category Change case
|
||||
@category Template literal
|
||||
@category Object
|
||||
*/
|
||||
export type CamelCasedPropertiesDeep<Value, Options extends CamelCaseOptions = {preserveConsecutiveUppercase: true}> = Value extends Function
|
||||
? Value
|
||||
: Value extends Array<infer U>
|
||||
? Array<CamelCasedPropertiesDeep<U, Options>>
|
||||
: Value extends Set<infer U>
|
||||
? Set<CamelCasedPropertiesDeep<U, Options>> : {
|
||||
[K in keyof Value as CamelCase<K, Options>]: CamelCasedPropertiesDeep<Value[K], Options>;
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
/* tslint:disable:no-empty */
|
||||
export function noop() { }
|
||||
@@ -0,0 +1,49 @@
|
||||
var baseTimes = require('./_baseTimes'),
|
||||
isArguments = require('./isArguments'),
|
||||
isArray = require('./isArray'),
|
||||
isBuffer = require('./isBuffer'),
|
||||
isIndex = require('./_isIndex'),
|
||||
isTypedArray = require('./isTypedArray');
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
var isArr = isArray(value),
|
||||
isArg = !isArr && isArguments(value),
|
||||
isBuff = !isArr && !isArg && isBuffer(value),
|
||||
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
||||
skipIndexes = isArr || isArg || isBuff || isType,
|
||||
result = skipIndexes ? baseTimes(value.length, String) : [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (
|
||||
// Safari 9 has enumerable `arguments.length` in strict mode.
|
||||
key == 'length' ||
|
||||
// Node.js 0.10 has enumerable non-index properties on buffers.
|
||||
(isBuff && (key == 'offset' || key == 'parent')) ||
|
||||
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
||||
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
||||
// Skip index properties.
|
||||
isIndex(key, length)
|
||||
))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = arrayLikeKeys;
|
||||
@@ -0,0 +1,42 @@
|
||||
var toNumber = require('./toNumber');
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0,
|
||||
MAX_INTEGER = 1.7976931348623157e+308;
|
||||
|
||||
/**
|
||||
* Converts `value` to a finite number.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.12.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to convert.
|
||||
* @returns {number} Returns the converted number.
|
||||
* @example
|
||||
*
|
||||
* _.toFinite(3.2);
|
||||
* // => 3.2
|
||||
*
|
||||
* _.toFinite(Number.MIN_VALUE);
|
||||
* // => 5e-324
|
||||
*
|
||||
* _.toFinite(Infinity);
|
||||
* // => 1.7976931348623157e+308
|
||||
*
|
||||
* _.toFinite('3.2');
|
||||
* // => 3.2
|
||||
*/
|
||||
function toFinite(value) {
|
||||
if (!value) {
|
||||
return value === 0 ? value : 0;
|
||||
}
|
||||
value = toNumber(value);
|
||||
if (value === INFINITY || value === -INFINITY) {
|
||||
var sign = (value < 0 ? -1 : 1);
|
||||
return sign * MAX_INTEGER;
|
||||
}
|
||||
return value === value ? value : 0;
|
||||
}
|
||||
|
||||
module.exports = toFinite;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"pairs.js","sourceRoot":"","sources":["../../../../src/internal/observable/pairs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA6E9B,MAAM,UAAU,KAAK,CAAC,GAAQ,EAAE,SAAyB;IACvD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,SAAgB,CAAC,CAAC;AACrD,CAAC"}
|
||||
@@ -0,0 +1,132 @@
|
||||
'use strict';
|
||||
|
||||
var d = require('d')
|
||||
, callable = require('es5-ext/object/valid-callable')
|
||||
|
||||
, apply = Function.prototype.apply, call = Function.prototype.call
|
||||
, create = Object.create, defineProperty = Object.defineProperty
|
||||
, defineProperties = Object.defineProperties
|
||||
, hasOwnProperty = Object.prototype.hasOwnProperty
|
||||
, descriptor = { configurable: true, enumerable: false, writable: true }
|
||||
|
||||
, on, once, off, emit, methods, descriptors, base;
|
||||
|
||||
on = function (type, listener) {
|
||||
var data;
|
||||
|
||||
callable(listener);
|
||||
|
||||
if (!hasOwnProperty.call(this, '__ee__')) {
|
||||
data = descriptor.value = create(null);
|
||||
defineProperty(this, '__ee__', descriptor);
|
||||
descriptor.value = null;
|
||||
} else {
|
||||
data = this.__ee__;
|
||||
}
|
||||
if (!data[type]) data[type] = listener;
|
||||
else if (typeof data[type] === 'object') data[type].push(listener);
|
||||
else data[type] = [data[type], listener];
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
once = function (type, listener) {
|
||||
var once, self;
|
||||
|
||||
callable(listener);
|
||||
self = this;
|
||||
on.call(this, type, once = function () {
|
||||
off.call(self, type, once);
|
||||
apply.call(listener, this, arguments);
|
||||
});
|
||||
|
||||
once.__eeOnceListener__ = listener;
|
||||
return this;
|
||||
};
|
||||
|
||||
off = function (type, listener) {
|
||||
var data, listeners, candidate, i;
|
||||
|
||||
callable(listener);
|
||||
|
||||
if (!hasOwnProperty.call(this, '__ee__')) return this;
|
||||
data = this.__ee__;
|
||||
if (!data[type]) return this;
|
||||
listeners = data[type];
|
||||
|
||||
if (typeof listeners === 'object') {
|
||||
for (i = 0; (candidate = listeners[i]); ++i) {
|
||||
if ((candidate === listener) ||
|
||||
(candidate.__eeOnceListener__ === listener)) {
|
||||
if (listeners.length === 2) data[type] = listeners[i ? 0 : 1];
|
||||
else listeners.splice(i, 1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((listeners === listener) ||
|
||||
(listeners.__eeOnceListener__ === listener)) {
|
||||
delete data[type];
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
emit = function (type) {
|
||||
var i, l, listener, listeners, args;
|
||||
|
||||
if (!hasOwnProperty.call(this, '__ee__')) return;
|
||||
listeners = this.__ee__[type];
|
||||
if (!listeners) return;
|
||||
|
||||
if (typeof listeners === 'object') {
|
||||
l = arguments.length;
|
||||
args = new Array(l - 1);
|
||||
for (i = 1; i < l; ++i) args[i - 1] = arguments[i];
|
||||
|
||||
listeners = listeners.slice();
|
||||
for (i = 0; (listener = listeners[i]); ++i) {
|
||||
apply.call(listener, this, args);
|
||||
}
|
||||
} else {
|
||||
switch (arguments.length) {
|
||||
case 1:
|
||||
call.call(listeners, this);
|
||||
break;
|
||||
case 2:
|
||||
call.call(listeners, this, arguments[1]);
|
||||
break;
|
||||
case 3:
|
||||
call.call(listeners, this, arguments[1], arguments[2]);
|
||||
break;
|
||||
default:
|
||||
l = arguments.length;
|
||||
args = new Array(l - 1);
|
||||
for (i = 1; i < l; ++i) {
|
||||
args[i - 1] = arguments[i];
|
||||
}
|
||||
apply.call(listeners, this, args);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
methods = {
|
||||
on: on,
|
||||
once: once,
|
||||
off: off,
|
||||
emit: emit
|
||||
};
|
||||
|
||||
descriptors = {
|
||||
on: d(on),
|
||||
once: d(once),
|
||||
off: d(off),
|
||||
emit: d(emit)
|
||||
};
|
||||
|
||||
base = defineProperties({}, descriptors);
|
||||
|
||||
module.exports = exports = function (o) {
|
||||
return (o == null) ? create(base) : defineProperties(Object(o), descriptors);
|
||||
};
|
||||
exports.methods = methods;
|
||||
@@ -0,0 +1,19 @@
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,5 @@
|
||||
parser: typescript
|
||||
printWidth: 120
|
||||
tabWidth: 2
|
||||
singleQuote: true
|
||||
trailingComma: none
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
Get the element type of an `Iterable`/`AsyncIterable`. For example, an array or a generator.
|
||||
|
||||
This can be useful, for example, if you want to get the type that is yielded in a generator function. Often the return type of those functions are not specified.
|
||||
|
||||
This type works with both `Iterable`s and `AsyncIterable`s, so it can be use with synchronous and asynchronous generators.
|
||||
|
||||
Here is an example of `IterableElement` in action with a generator function:
|
||||
|
||||
@example
|
||||
```
|
||||
import type {IterableElement} from 'type-fest';
|
||||
|
||||
function * iAmGenerator() {
|
||||
yield 1;
|
||||
yield 2;
|
||||
}
|
||||
|
||||
type MeNumber = IterableElement<ReturnType<typeof iAmGenerator>>
|
||||
```
|
||||
|
||||
And here is an example with an async generator:
|
||||
|
||||
@example
|
||||
```
|
||||
import type {IterableElement} from 'type-fest';
|
||||
|
||||
async function * iAmGeneratorAsync() {
|
||||
yield 'hi';
|
||||
yield true;
|
||||
}
|
||||
|
||||
type MeStringOrBoolean = IterableElement<ReturnType<typeof iAmGeneratorAsync>>
|
||||
```
|
||||
|
||||
Many types in JavaScript/TypeScript are iterables. This type works on all types that implement those interfaces. For example, `Array`, `Set`, `Map`, `stream.Readable`, etc.
|
||||
|
||||
An example with an array of strings:
|
||||
|
||||
@example
|
||||
```
|
||||
import type {IterableElement} from 'type-fest';
|
||||
|
||||
type MeString = IterableElement<string[]>
|
||||
```
|
||||
|
||||
@category Iterable
|
||||
*/
|
||||
export type IterableElement<TargetIterable> =
|
||||
TargetIterable extends Iterable<infer ElementType> ?
|
||||
ElementType :
|
||||
TargetIterable extends AsyncIterable<infer ElementType> ?
|
||||
ElementType :
|
||||
never;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,sDAA6B;AAC7B,6BAA6B;AAM7B,oDAAqC;AASrC,SAAS,mBAAmB,CAC3B,GAAuD,EACvD,IAA+C;IAE/C,yCAAyC;IACzC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC5B,IAAI,GAAG,GAAG,CAAC;QAEX,gCAAgC;QAChC,IAAI,IAAI,CAAC,IAAI,EAAE;YACd,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;gBAChC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;aAC1B;YACD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,GAAG,GAAG,YAAM,CAAC,IAAI,CAAC,CAAC;SACnB;aAAM;YACN,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;SACf;KACD;IACD,IAAI,CAAC,IAAI,EAAE;QACV,IAAI,GAAG,EAAE,CAAC;KACV;IAED,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC5B,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAC;KACzD;IAED,OAAO,IAAI,eAAc,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AACtC,CAAC;AAED,WAAU,mBAAmB;IAYf,iCAAa,GAAG,eAAc,CAAC;IAE5C;;OAEG;IACU,6BAAS,GAAG,MAAM,CAAC,IAAI,CAAC,iBAAM,CAAC,SAAS,CAAC,CAAC;IAEvD,mBAAmB,CAAC,SAAS,GAAG,eAAc,CAAC,SAAS,CAAC;AAC1D,CAAC,EApBS,mBAAmB,KAAnB,mBAAmB,QAoB5B;AAED,iBAAS,mBAAmB,CAAC"}
|
||||
@@ -0,0 +1,148 @@
|
||||
#!/usr/bin/env node
|
||||
(function() {
|
||||
|
||||
var fs = require('fs');
|
||||
var he = require('../he.js');
|
||||
var strings = process.argv.splice(2);
|
||||
var stdin = process.stdin;
|
||||
var data;
|
||||
var timeout;
|
||||
var action;
|
||||
var options = {};
|
||||
var log = console.log;
|
||||
|
||||
var main = function() {
|
||||
var option = strings[0];
|
||||
var count = 0;
|
||||
|
||||
if (/^(?:-h|--help|undefined)$/.test(option)) {
|
||||
log(
|
||||
'he v%s - https://mths.be/he',
|
||||
he.version
|
||||
);
|
||||
log([
|
||||
'\nUsage:\n',
|
||||
'\the [--escape] string',
|
||||
'\the [--encode] [--use-named-refs] [--everything] [--allow-unsafe] [--decimal] string',
|
||||
'\the [--decode] [--attribute] [--strict] string',
|
||||
'\the [-v | --version]',
|
||||
'\the [-h | --help]',
|
||||
'\nExamples:\n',
|
||||
'\the --escape \\<img\\ src\\=\\\'x\\\'\\ onerror\\=\\"prompt\\(1\\)\\"\\>',
|
||||
'\techo \'© 𝌆\' | he --decode'
|
||||
].join('\n'));
|
||||
return process.exit(option ? 0 : 1);
|
||||
}
|
||||
|
||||
if (/^(?:-v|--version)$/.test(option)) {
|
||||
log('v%s', he.version);
|
||||
return process.exit(0);
|
||||
}
|
||||
|
||||
strings.forEach(function(string) {
|
||||
// Process options
|
||||
if (string == '--escape') {
|
||||
action = 'escape';
|
||||
return;
|
||||
}
|
||||
if (string == '--encode') {
|
||||
action = 'encode';
|
||||
return;
|
||||
}
|
||||
if (string == '--use-named-refs') {
|
||||
action = 'encode';
|
||||
options.useNamedReferences = true;
|
||||
return;
|
||||
}
|
||||
if (string == '--everything') {
|
||||
action = 'encode';
|
||||
options.encodeEverything = true;
|
||||
return;
|
||||
}
|
||||
if (string == '--allow-unsafe') {
|
||||
action = 'encode';
|
||||
options.allowUnsafeSymbols = true;
|
||||
return;
|
||||
}
|
||||
if (string == '--decimal') {
|
||||
action = 'encode';
|
||||
options.decimal = true;
|
||||
return;
|
||||
}
|
||||
if (string == '--decode') {
|
||||
action = 'decode';
|
||||
return;
|
||||
}
|
||||
if (string == '--attribute') {
|
||||
action = 'decode';
|
||||
options.isAttributeValue = true;
|
||||
return;
|
||||
}
|
||||
if (string == '--strict') {
|
||||
action = 'decode';
|
||||
options.strict = true;
|
||||
return;
|
||||
}
|
||||
// Process string(s)
|
||||
var result;
|
||||
if (!action) {
|
||||
log('Error: he requires at least one option and a string argument.');
|
||||
log('Try `he --help` for more information.');
|
||||
return process.exit(1);
|
||||
}
|
||||
try {
|
||||
result = he[action](string, options);
|
||||
log(result);
|
||||
count++;
|
||||
} catch(error) {
|
||||
log(error.message + '\n');
|
||||
log('Error: failed to %s.', action);
|
||||
log('If you think this is a bug in he, please report it:');
|
||||
log('https://github.com/mathiasbynens/he/issues/new');
|
||||
log(
|
||||
'\nStack trace using he@%s:\n',
|
||||
he.version
|
||||
);
|
||||
log(error.stack);
|
||||
return process.exit(1);
|
||||
}
|
||||
});
|
||||
if (!count) {
|
||||
log('Error: he requires a string argument.');
|
||||
log('Try `he --help` for more information.');
|
||||
return process.exit(1);
|
||||
}
|
||||
// Return with exit status 0 outside of the `forEach` loop, in case
|
||||
// multiple strings were passed in.
|
||||
return process.exit(0);
|
||||
};
|
||||
|
||||
if (stdin.isTTY) {
|
||||
// handle shell arguments
|
||||
main();
|
||||
} else {
|
||||
// Either the script is called from within a non-TTY context, or `stdin`
|
||||
// content is being piped in.
|
||||
if (!process.stdout.isTTY) {
|
||||
// The script was called from a non-TTY context. This is a rather uncommon
|
||||
// use case we don’t actively support. However, we don’t want the script
|
||||
// to wait forever in such cases, so…
|
||||
timeout = setTimeout(function() {
|
||||
// …if no piped data arrived after a whole minute, handle shell
|
||||
// arguments instead.
|
||||
main();
|
||||
}, 60000);
|
||||
}
|
||||
data = '';
|
||||
stdin.on('data', function(chunk) {
|
||||
clearTimeout(timeout);
|
||||
data += chunk;
|
||||
});
|
||||
stdin.on('end', function() {
|
||||
strings.push(data.trim());
|
||||
main();
|
||||
});
|
||||
stdin.resume();
|
||||
}
|
||||
|
||||
}());
|
||||
@@ -0,0 +1,10 @@
|
||||
import { __read, __spreadArray } from "tslib";
|
||||
import { map } from "../operators/map";
|
||||
var isArray = Array.isArray;
|
||||
function callOrApply(fn, args) {
|
||||
return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args);
|
||||
}
|
||||
export function mapOneOrManyArgs(fn) {
|
||||
return map(function (args) { return callOrApply(fn, args); });
|
||||
}
|
||||
//# sourceMappingURL=mapOneOrManyArgs.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB"}
|
||||
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.flatMap = void 0;
|
||||
var mergeMap_1 = require("./mergeMap");
|
||||
exports.flatMap = mergeMap_1.mergeMap;
|
||||
//# sourceMappingURL=flatMap.js.map
|
||||
@@ -0,0 +1,742 @@
|
||||
# Source Map
|
||||
|
||||
[](https://travis-ci.org/mozilla/source-map)
|
||||
|
||||
[](https://www.npmjs.com/package/source-map)
|
||||
|
||||
This is a library to generate and consume the source map format
|
||||
[described here][format].
|
||||
|
||||
[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
|
||||
|
||||
## Use with Node
|
||||
|
||||
$ npm install source-map
|
||||
|
||||
## Use on the Web
|
||||
|
||||
<script src="https://raw.githubusercontent.com/mozilla/source-map/master/dist/source-map.min.js" defer></script>
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
<!-- `npm run toc` to regenerate the Table of Contents -->
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table of Contents
|
||||
|
||||
- [Examples](#examples)
|
||||
- [Consuming a source map](#consuming-a-source-map)
|
||||
- [Generating a source map](#generating-a-source-map)
|
||||
- [With SourceNode (high level API)](#with-sourcenode-high-level-api)
|
||||
- [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api)
|
||||
- [API](#api)
|
||||
- [SourceMapConsumer](#sourcemapconsumer)
|
||||
- [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap)
|
||||
- [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans)
|
||||
- [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition)
|
||||
- [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition)
|
||||
- [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition)
|
||||
- [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources)
|
||||
- [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing)
|
||||
- [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order)
|
||||
- [SourceMapGenerator](#sourcemapgenerator)
|
||||
- [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap)
|
||||
- [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer)
|
||||
- [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping)
|
||||
- [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent)
|
||||
- [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath)
|
||||
- [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring)
|
||||
- [SourceNode](#sourcenode)
|
||||
- [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name)
|
||||
- [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath)
|
||||
- [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk)
|
||||
- [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk)
|
||||
- [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent)
|
||||
- [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn)
|
||||
- [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn)
|
||||
- [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep)
|
||||
- [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement)
|
||||
- [SourceNode.prototype.toString()](#sourcenodeprototypetostring)
|
||||
- [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Examples
|
||||
|
||||
### Consuming a source map
|
||||
|
||||
```js
|
||||
var rawSourceMap = {
|
||||
version: 3,
|
||||
file: 'min.js',
|
||||
names: ['bar', 'baz', 'n'],
|
||||
sources: ['one.js', 'two.js'],
|
||||
sourceRoot: 'http://example.com/www/js/',
|
||||
mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
|
||||
};
|
||||
|
||||
var smc = new SourceMapConsumer(rawSourceMap);
|
||||
|
||||
console.log(smc.sources);
|
||||
// [ 'http://example.com/www/js/one.js',
|
||||
// 'http://example.com/www/js/two.js' ]
|
||||
|
||||
console.log(smc.originalPositionFor({
|
||||
line: 2,
|
||||
column: 28
|
||||
}));
|
||||
// { source: 'http://example.com/www/js/two.js',
|
||||
// line: 2,
|
||||
// column: 10,
|
||||
// name: 'n' }
|
||||
|
||||
console.log(smc.generatedPositionFor({
|
||||
source: 'http://example.com/www/js/two.js',
|
||||
line: 2,
|
||||
column: 10
|
||||
}));
|
||||
// { line: 2, column: 28 }
|
||||
|
||||
smc.eachMapping(function (m) {
|
||||
// ...
|
||||
});
|
||||
```
|
||||
|
||||
### Generating a source map
|
||||
|
||||
In depth guide:
|
||||
[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)
|
||||
|
||||
#### With SourceNode (high level API)
|
||||
|
||||
```js
|
||||
function compile(ast) {
|
||||
switch (ast.type) {
|
||||
case 'BinaryExpression':
|
||||
return new SourceNode(
|
||||
ast.location.line,
|
||||
ast.location.column,
|
||||
ast.location.source,
|
||||
[compile(ast.left), " + ", compile(ast.right)]
|
||||
);
|
||||
case 'Literal':
|
||||
return new SourceNode(
|
||||
ast.location.line,
|
||||
ast.location.column,
|
||||
ast.location.source,
|
||||
String(ast.value)
|
||||
);
|
||||
// ...
|
||||
default:
|
||||
throw new Error("Bad AST");
|
||||
}
|
||||
}
|
||||
|
||||
var ast = parse("40 + 2", "add.js");
|
||||
console.log(compile(ast).toStringWithSourceMap({
|
||||
file: 'add.js'
|
||||
}));
|
||||
// { code: '40 + 2',
|
||||
// map: [object SourceMapGenerator] }
|
||||
```
|
||||
|
||||
#### With SourceMapGenerator (low level API)
|
||||
|
||||
```js
|
||||
var map = new SourceMapGenerator({
|
||||
file: "source-mapped.js"
|
||||
});
|
||||
|
||||
map.addMapping({
|
||||
generated: {
|
||||
line: 10,
|
||||
column: 35
|
||||
},
|
||||
source: "foo.js",
|
||||
original: {
|
||||
line: 33,
|
||||
column: 2
|
||||
},
|
||||
name: "christopher"
|
||||
});
|
||||
|
||||
console.log(map.toString());
|
||||
// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
Get a reference to the module:
|
||||
|
||||
```js
|
||||
// Node.js
|
||||
var sourceMap = require('source-map');
|
||||
|
||||
// Browser builds
|
||||
var sourceMap = window.sourceMap;
|
||||
|
||||
// Inside Firefox
|
||||
const sourceMap = require("devtools/toolkit/sourcemap/source-map.js");
|
||||
```
|
||||
|
||||
### SourceMapConsumer
|
||||
|
||||
A SourceMapConsumer instance represents a parsed source map which we can query
|
||||
for information about the original file positions by giving it a file position
|
||||
in the generated source.
|
||||
|
||||
#### new SourceMapConsumer(rawSourceMap)
|
||||
|
||||
The only parameter is the raw source map (either as a string which can be
|
||||
`JSON.parse`'d, or an object). According to the spec, source maps have the
|
||||
following attributes:
|
||||
|
||||
* `version`: Which version of the source map spec this map is following.
|
||||
|
||||
* `sources`: An array of URLs to the original source files.
|
||||
|
||||
* `names`: An array of identifiers which can be referenced by individual
|
||||
mappings.
|
||||
|
||||
* `sourceRoot`: Optional. The URL root from which all sources are relative.
|
||||
|
||||
* `sourcesContent`: Optional. An array of contents of the original source files.
|
||||
|
||||
* `mappings`: A string of base64 VLQs which contain the actual mappings.
|
||||
|
||||
* `file`: Optional. The generated filename this source map is associated with.
|
||||
|
||||
```js
|
||||
var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData);
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.computeColumnSpans()
|
||||
|
||||
Compute the last column for each generated mapping. The last column is
|
||||
inclusive.
|
||||
|
||||
```js
|
||||
// Before:
|
||||
consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
|
||||
// [ { line: 2,
|
||||
// column: 1 },
|
||||
// { line: 2,
|
||||
// column: 10 },
|
||||
// { line: 2,
|
||||
// column: 20 } ]
|
||||
|
||||
consumer.computeColumnSpans();
|
||||
|
||||
// After:
|
||||
consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
|
||||
// [ { line: 2,
|
||||
// column: 1,
|
||||
// lastColumn: 9 },
|
||||
// { line: 2,
|
||||
// column: 10,
|
||||
// lastColumn: 19 },
|
||||
// { line: 2,
|
||||
// column: 20,
|
||||
// lastColumn: Infinity } ]
|
||||
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)
|
||||
|
||||
Returns the original source, line, and column information for the generated
|
||||
source's line and column positions provided. The only argument is an object with
|
||||
the following properties:
|
||||
|
||||
* `line`: The line number in the generated source. Line numbers in
|
||||
this library are 1-based (note that the underlying source map
|
||||
specification uses 0-based line numbers -- this library handles the
|
||||
translation).
|
||||
|
||||
* `column`: The column number in the generated source. Column numbers
|
||||
in this library are 0-based.
|
||||
|
||||
* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or
|
||||
`SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest
|
||||
element that is smaller than or greater than the one we are searching for,
|
||||
respectively, if the exact element cannot be found. Defaults to
|
||||
`SourceMapConsumer.GREATEST_LOWER_BOUND`.
|
||||
|
||||
and an object is returned with the following properties:
|
||||
|
||||
* `source`: The original source file, or null if this information is not
|
||||
available.
|
||||
|
||||
* `line`: The line number in the original source, or null if this information is
|
||||
not available. The line number is 1-based.
|
||||
|
||||
* `column`: The column number in the original source, or null if this
|
||||
information is not available. The column number is 0-based.
|
||||
|
||||
* `name`: The original identifier, or null if this information is not available.
|
||||
|
||||
```js
|
||||
consumer.originalPositionFor({ line: 2, column: 10 })
|
||||
// { source: 'foo.coffee',
|
||||
// line: 2,
|
||||
// column: 2,
|
||||
// name: null }
|
||||
|
||||
consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 })
|
||||
// { source: null,
|
||||
// line: null,
|
||||
// column: null,
|
||||
// name: null }
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)
|
||||
|
||||
Returns the generated line and column information for the original source,
|
||||
line, and column positions provided. The only argument is an object with
|
||||
the following properties:
|
||||
|
||||
* `source`: The filename of the original source.
|
||||
|
||||
* `line`: The line number in the original source. The line number is
|
||||
1-based.
|
||||
|
||||
* `column`: The column number in the original source. The column
|
||||
number is 0-based.
|
||||
|
||||
and an object is returned with the following properties:
|
||||
|
||||
* `line`: The line number in the generated source, or null. The line
|
||||
number is 1-based.
|
||||
|
||||
* `column`: The column number in the generated source, or null. The
|
||||
column number is 0-based.
|
||||
|
||||
```js
|
||||
consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 })
|
||||
// { line: 1,
|
||||
// column: 56 }
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)
|
||||
|
||||
Returns all generated line and column information for the original source, line,
|
||||
and column provided. If no column is provided, returns all mappings
|
||||
corresponding to a either the line we are searching for or the next closest line
|
||||
that has any mappings. Otherwise, returns all mappings corresponding to the
|
||||
given line and either the column we are searching for or the next closest column
|
||||
that has any offsets.
|
||||
|
||||
The only argument is an object with the following properties:
|
||||
|
||||
* `source`: The filename of the original source.
|
||||
|
||||
* `line`: The line number in the original source. The line number is
|
||||
1-based.
|
||||
|
||||
* `column`: Optional. The column number in the original source. The
|
||||
column number is 0-based.
|
||||
|
||||
and an array of objects is returned, each with the following properties:
|
||||
|
||||
* `line`: The line number in the generated source, or null. The line
|
||||
number is 1-based.
|
||||
|
||||
* `column`: The column number in the generated source, or null. The
|
||||
column number is 0-based.
|
||||
|
||||
```js
|
||||
consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" })
|
||||
// [ { line: 2,
|
||||
// column: 1 },
|
||||
// { line: 2,
|
||||
// column: 10 },
|
||||
// { line: 2,
|
||||
// column: 20 } ]
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.hasContentsOfAllSources()
|
||||
|
||||
Return true if we have the embedded source content for every source listed in
|
||||
the source map, false otherwise.
|
||||
|
||||
In other words, if this method returns `true`, then
|
||||
`consumer.sourceContentFor(s)` will succeed for every source `s` in
|
||||
`consumer.sources`.
|
||||
|
||||
```js
|
||||
// ...
|
||||
if (consumer.hasContentsOfAllSources()) {
|
||||
consumerReadyCallback(consumer);
|
||||
} else {
|
||||
fetchSources(consumer, consumerReadyCallback);
|
||||
}
|
||||
// ...
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])
|
||||
|
||||
Returns the original source content for the source provided. The only
|
||||
argument is the URL of the original source file.
|
||||
|
||||
If the source content for the given source is not found, then an error is
|
||||
thrown. Optionally, pass `true` as the second param to have `null` returned
|
||||
instead.
|
||||
|
||||
```js
|
||||
consumer.sources
|
||||
// [ "my-cool-lib.clj" ]
|
||||
|
||||
consumer.sourceContentFor("my-cool-lib.clj")
|
||||
// "..."
|
||||
|
||||
consumer.sourceContentFor("this is not in the source map");
|
||||
// Error: "this is not in the source map" is not in the source map
|
||||
|
||||
consumer.sourceContentFor("this is not in the source map", true);
|
||||
// null
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.eachMapping(callback, context, order)
|
||||
|
||||
Iterate over each mapping between an original source/line/column and a
|
||||
generated line/column in this source map.
|
||||
|
||||
* `callback`: The function that is called with each mapping. Mappings have the
|
||||
form `{ source, generatedLine, generatedColumn, originalLine, originalColumn,
|
||||
name }`
|
||||
|
||||
* `context`: Optional. If specified, this object will be the value of `this`
|
||||
every time that `callback` is called.
|
||||
|
||||
* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or
|
||||
`SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over
|
||||
the mappings sorted by the generated file's line/column order or the
|
||||
original's source/line/column order, respectively. Defaults to
|
||||
`SourceMapConsumer.GENERATED_ORDER`.
|
||||
|
||||
```js
|
||||
consumer.eachMapping(function (m) { console.log(m); })
|
||||
// ...
|
||||
// { source: 'illmatic.js',
|
||||
// generatedLine: 1,
|
||||
// generatedColumn: 0,
|
||||
// originalLine: 1,
|
||||
// originalColumn: 0,
|
||||
// name: null }
|
||||
// { source: 'illmatic.js',
|
||||
// generatedLine: 2,
|
||||
// generatedColumn: 0,
|
||||
// originalLine: 2,
|
||||
// originalColumn: 0,
|
||||
// name: null }
|
||||
// ...
|
||||
```
|
||||
### SourceMapGenerator
|
||||
|
||||
An instance of the SourceMapGenerator represents a source map which is being
|
||||
built incrementally.
|
||||
|
||||
#### new SourceMapGenerator([startOfSourceMap])
|
||||
|
||||
You may pass an object with the following properties:
|
||||
|
||||
* `file`: The filename of the generated source that this source map is
|
||||
associated with.
|
||||
|
||||
* `sourceRoot`: A root for all relative URLs in this source map.
|
||||
|
||||
* `skipValidation`: Optional. When `true`, disables validation of mappings as
|
||||
they are added. This can improve performance but should be used with
|
||||
discretion, as a last resort. Even then, one should avoid using this flag when
|
||||
running tests, if possible.
|
||||
|
||||
```js
|
||||
var generator = new sourceMap.SourceMapGenerator({
|
||||
file: "my-generated-javascript-file.js",
|
||||
sourceRoot: "http://example.com/app/js/"
|
||||
});
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.fromSourceMap(sourceMapConsumer)
|
||||
|
||||
Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance.
|
||||
|
||||
* `sourceMapConsumer` The SourceMap.
|
||||
|
||||
```js
|
||||
var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer);
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.prototype.addMapping(mapping)
|
||||
|
||||
Add a single mapping from original source line and column to the generated
|
||||
source's line and column for this source map being created. The mapping object
|
||||
should have the following properties:
|
||||
|
||||
* `generated`: An object with the generated line and column positions.
|
||||
|
||||
* `original`: An object with the original line and column positions.
|
||||
|
||||
* `source`: The original source file (relative to the sourceRoot).
|
||||
|
||||
* `name`: An optional original token name for this mapping.
|
||||
|
||||
```js
|
||||
generator.addMapping({
|
||||
source: "module-one.scm",
|
||||
original: { line: 128, column: 0 },
|
||||
generated: { line: 3, column: 456 }
|
||||
})
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)
|
||||
|
||||
Set the source content for an original source file.
|
||||
|
||||
* `sourceFile` the URL of the original source file.
|
||||
|
||||
* `sourceContent` the content of the source file.
|
||||
|
||||
```js
|
||||
generator.setSourceContent("module-one.scm",
|
||||
fs.readFileSync("path/to/module-one.scm"))
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])
|
||||
|
||||
Applies a SourceMap for a source file to the SourceMap.
|
||||
Each mapping to the supplied source file is rewritten using the
|
||||
supplied SourceMap. Note: The resolution for the resulting mappings
|
||||
is the minimum of this map and the supplied map.
|
||||
|
||||
* `sourceMapConsumer`: The SourceMap to be applied.
|
||||
|
||||
* `sourceFile`: Optional. The filename of the source file.
|
||||
If omitted, sourceMapConsumer.file will be used, if it exists.
|
||||
Otherwise an error will be thrown.
|
||||
|
||||
* `sourceMapPath`: Optional. The dirname of the path to the SourceMap
|
||||
to be applied. If relative, it is relative to the SourceMap.
|
||||
|
||||
This parameter is needed when the two SourceMaps aren't in the same
|
||||
directory, and the SourceMap to be applied contains relative source
|
||||
paths. If so, those relative source paths need to be rewritten
|
||||
relative to the SourceMap.
|
||||
|
||||
If omitted, it is assumed that both SourceMaps are in the same directory,
|
||||
thus not needing any rewriting. (Supplying `'.'` has the same effect.)
|
||||
|
||||
#### SourceMapGenerator.prototype.toString()
|
||||
|
||||
Renders the source map being generated to a string.
|
||||
|
||||
```js
|
||||
generator.toString()
|
||||
// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}'
|
||||
```
|
||||
|
||||
### SourceNode
|
||||
|
||||
SourceNodes provide a way to abstract over interpolating and/or concatenating
|
||||
snippets of generated JavaScript source code, while maintaining the line and
|
||||
column information associated between those snippets and the original source
|
||||
code. This is useful as the final intermediate representation a compiler might
|
||||
use before outputting the generated JS and source map.
|
||||
|
||||
#### new SourceNode([line, column, source[, chunk[, name]]])
|
||||
|
||||
* `line`: The original line number associated with this source node, or null if
|
||||
it isn't associated with an original line. The line number is 1-based.
|
||||
|
||||
* `column`: The original column number associated with this source node, or null
|
||||
if it isn't associated with an original column. The column number
|
||||
is 0-based.
|
||||
|
||||
* `source`: The original source's filename; null if no filename is provided.
|
||||
|
||||
* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see
|
||||
below.
|
||||
|
||||
* `name`: Optional. The original identifier.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.cpp", [
|
||||
new SourceNode(3, 4, "b.cpp", "extern int status;\n"),
|
||||
new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"),
|
||||
new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"),
|
||||
]);
|
||||
```
|
||||
|
||||
#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])
|
||||
|
||||
Creates a SourceNode from generated code and a SourceMapConsumer.
|
||||
|
||||
* `code`: The generated code
|
||||
|
||||
* `sourceMapConsumer` The SourceMap for the generated code
|
||||
|
||||
* `relativePath` The optional path that relative sources in `sourceMapConsumer`
|
||||
should be relative to.
|
||||
|
||||
```js
|
||||
var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8"));
|
||||
var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"),
|
||||
consumer);
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.add(chunk)
|
||||
|
||||
Add a chunk of generated JS to this source node.
|
||||
|
||||
* `chunk`: A string snippet of generated JS code, another instance of
|
||||
`SourceNode`, or an array where each member is one of those things.
|
||||
|
||||
```js
|
||||
node.add(" + ");
|
||||
node.add(otherNode);
|
||||
node.add([leftHandOperandNode, " + ", rightHandOperandNode]);
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.prepend(chunk)
|
||||
|
||||
Prepend a chunk of generated JS to this source node.
|
||||
|
||||
* `chunk`: A string snippet of generated JS code, another instance of
|
||||
`SourceNode`, or an array where each member is one of those things.
|
||||
|
||||
```js
|
||||
node.prepend("/** Build Id: f783haef86324gf **/\n\n");
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent)
|
||||
|
||||
Set the source content for a source file. This will be added to the
|
||||
`SourceMap` in the `sourcesContent` field.
|
||||
|
||||
* `sourceFile`: The filename of the source file
|
||||
|
||||
* `sourceContent`: The content of the source file
|
||||
|
||||
```js
|
||||
node.setSourceContent("module-one.scm",
|
||||
fs.readFileSync("path/to/module-one.scm"))
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.walk(fn)
|
||||
|
||||
Walk over the tree of JS snippets in this node and its children. The walking
|
||||
function is called once for each snippet of JS and is passed that snippet and
|
||||
the its original associated source's line/column location.
|
||||
|
||||
* `fn`: The traversal function.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.js", [
|
||||
new SourceNode(3, 4, "b.js", "uno"),
|
||||
"dos",
|
||||
[
|
||||
"tres",
|
||||
new SourceNode(5, 6, "c.js", "quatro")
|
||||
]
|
||||
]);
|
||||
|
||||
node.walk(function (code, loc) { console.log("WALK:", code, loc); })
|
||||
// WALK: uno { source: 'b.js', line: 3, column: 4, name: null }
|
||||
// WALK: dos { source: 'a.js', line: 1, column: 2, name: null }
|
||||
// WALK: tres { source: 'a.js', line: 1, column: 2, name: null }
|
||||
// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null }
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.walkSourceContents(fn)
|
||||
|
||||
Walk over the tree of SourceNodes. The walking function is called for each
|
||||
source file content and is passed the filename and source content.
|
||||
|
||||
* `fn`: The traversal function.
|
||||
|
||||
```js
|
||||
var a = new SourceNode(1, 2, "a.js", "generated from a");
|
||||
a.setSourceContent("a.js", "original a");
|
||||
var b = new SourceNode(1, 2, "b.js", "generated from b");
|
||||
b.setSourceContent("b.js", "original b");
|
||||
var c = new SourceNode(1, 2, "c.js", "generated from c");
|
||||
c.setSourceContent("c.js", "original c");
|
||||
|
||||
var node = new SourceNode(null, null, null, [a, b, c]);
|
||||
node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); })
|
||||
// WALK: a.js : original a
|
||||
// WALK: b.js : original b
|
||||
// WALK: c.js : original c
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.join(sep)
|
||||
|
||||
Like `Array.prototype.join` except for SourceNodes. Inserts the separator
|
||||
between each of this source node's children.
|
||||
|
||||
* `sep`: The separator.
|
||||
|
||||
```js
|
||||
var lhs = new SourceNode(1, 2, "a.rs", "my_copy");
|
||||
var operand = new SourceNode(3, 4, "a.rs", "=");
|
||||
var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()");
|
||||
|
||||
var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]);
|
||||
var joinedNode = node.join(" ");
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.replaceRight(pattern, replacement)
|
||||
|
||||
Call `String.prototype.replace` on the very right-most source snippet. Useful
|
||||
for trimming white space from the end of a source node, etc.
|
||||
|
||||
* `pattern`: The pattern to replace.
|
||||
|
||||
* `replacement`: The thing to replace the pattern with.
|
||||
|
||||
```js
|
||||
// Trim trailing white space.
|
||||
node.replaceRight(/\s*$/, "");
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.toString()
|
||||
|
||||
Return the string representation of this source node. Walks over the tree and
|
||||
concatenates all the various snippets together to one string.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.js", [
|
||||
new SourceNode(3, 4, "b.js", "uno"),
|
||||
"dos",
|
||||
[
|
||||
"tres",
|
||||
new SourceNode(5, 6, "c.js", "quatro")
|
||||
]
|
||||
]);
|
||||
|
||||
node.toString()
|
||||
// 'unodostresquatro'
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])
|
||||
|
||||
Returns the string representation of this tree of source nodes, plus a
|
||||
SourceMapGenerator which contains all the mappings between the generated and
|
||||
original sources.
|
||||
|
||||
The arguments are the same as those to `new SourceMapGenerator`.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.js", [
|
||||
new SourceNode(3, 4, "b.js", "uno"),
|
||||
"dos",
|
||||
[
|
||||
"tres",
|
||||
new SourceNode(5, 6, "c.js", "quatro")
|
||||
]
|
||||
]);
|
||||
|
||||
node.toStringWithSourceMap({ file: "my-output-file.js" })
|
||||
// { code: 'unodostresquatro',
|
||||
// map: [object SourceMapGenerator] }
|
||||
```
|
||||
@@ -0,0 +1,236 @@
|
||||
import { map } from '../operators/map';
|
||||
import { Observable } from '../Observable';
|
||||
import { AjaxResponse } from './AjaxResponse';
|
||||
import { AjaxTimeoutError, AjaxError } from './errors';
|
||||
function ajaxGet(url, headers) {
|
||||
return ajax({ method: 'GET', url, headers });
|
||||
}
|
||||
function ajaxPost(url, body, headers) {
|
||||
return ajax({ method: 'POST', url, body, headers });
|
||||
}
|
||||
function ajaxDelete(url, headers) {
|
||||
return ajax({ method: 'DELETE', url, headers });
|
||||
}
|
||||
function ajaxPut(url, body, headers) {
|
||||
return ajax({ method: 'PUT', url, body, headers });
|
||||
}
|
||||
function ajaxPatch(url, body, headers) {
|
||||
return ajax({ method: 'PATCH', url, body, headers });
|
||||
}
|
||||
const mapResponse = map((x) => x.response);
|
||||
function ajaxGetJSON(url, headers) {
|
||||
return mapResponse(ajax({
|
||||
method: 'GET',
|
||||
url,
|
||||
headers,
|
||||
}));
|
||||
}
|
||||
export const ajax = (() => {
|
||||
const create = (urlOrConfig) => {
|
||||
const config = typeof urlOrConfig === 'string'
|
||||
? {
|
||||
url: urlOrConfig,
|
||||
}
|
||||
: urlOrConfig;
|
||||
return fromAjax(config);
|
||||
};
|
||||
create.get = ajaxGet;
|
||||
create.post = ajaxPost;
|
||||
create.delete = ajaxDelete;
|
||||
create.put = ajaxPut;
|
||||
create.patch = ajaxPatch;
|
||||
create.getJSON = ajaxGetJSON;
|
||||
return create;
|
||||
})();
|
||||
const UPLOAD = 'upload';
|
||||
const DOWNLOAD = 'download';
|
||||
const LOADSTART = 'loadstart';
|
||||
const PROGRESS = 'progress';
|
||||
const LOAD = 'load';
|
||||
export function fromAjax(init) {
|
||||
return new Observable((destination) => {
|
||||
var _a, _b;
|
||||
const config = Object.assign({ async: true, crossDomain: false, withCredentials: false, method: 'GET', timeout: 0, responseType: 'json' }, init);
|
||||
const { queryParams, body: configuredBody, headers: configuredHeaders } = config;
|
||||
let url = config.url;
|
||||
if (!url) {
|
||||
throw new TypeError('url is required');
|
||||
}
|
||||
if (queryParams) {
|
||||
let searchParams;
|
||||
if (url.includes('?')) {
|
||||
const parts = url.split('?');
|
||||
if (2 < parts.length) {
|
||||
throw new TypeError('invalid url');
|
||||
}
|
||||
searchParams = new URLSearchParams(parts[1]);
|
||||
new URLSearchParams(queryParams).forEach((value, key) => searchParams.set(key, value));
|
||||
url = parts[0] + '?' + searchParams;
|
||||
}
|
||||
else {
|
||||
searchParams = new URLSearchParams(queryParams);
|
||||
url = url + '?' + searchParams;
|
||||
}
|
||||
}
|
||||
const headers = {};
|
||||
if (configuredHeaders) {
|
||||
for (const key in configuredHeaders) {
|
||||
if (configuredHeaders.hasOwnProperty(key)) {
|
||||
headers[key.toLowerCase()] = configuredHeaders[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
const crossDomain = config.crossDomain;
|
||||
if (!crossDomain && !('x-requested-with' in headers)) {
|
||||
headers['x-requested-with'] = 'XMLHttpRequest';
|
||||
}
|
||||
const { withCredentials, xsrfCookieName, xsrfHeaderName } = config;
|
||||
if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) {
|
||||
const xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp(`(^|;\\s*)(${xsrfCookieName})=([^;]*)`))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : '';
|
||||
if (xsrfCookie) {
|
||||
headers[xsrfHeaderName] = xsrfCookie;
|
||||
}
|
||||
}
|
||||
const body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers);
|
||||
const _request = Object.assign(Object.assign({}, config), { url,
|
||||
headers,
|
||||
body });
|
||||
let xhr;
|
||||
xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest();
|
||||
{
|
||||
const { progressSubscriber, includeDownloadProgress = false, includeUploadProgress = false } = init;
|
||||
const addErrorEvent = (type, errorFactory) => {
|
||||
xhr.addEventListener(type, () => {
|
||||
var _a;
|
||||
const error = errorFactory();
|
||||
(_a = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber, error);
|
||||
destination.error(error);
|
||||
});
|
||||
};
|
||||
addErrorEvent('timeout', () => new AjaxTimeoutError(xhr, _request));
|
||||
addErrorEvent('abort', () => new AjaxError('aborted', xhr, _request));
|
||||
const createResponse = (direction, event) => new AjaxResponse(event, xhr, _request, `${direction}_${event.type}`);
|
||||
const addProgressEvent = (target, type, direction) => {
|
||||
target.addEventListener(type, (event) => {
|
||||
destination.next(createResponse(direction, event));
|
||||
});
|
||||
};
|
||||
if (includeUploadProgress) {
|
||||
[LOADSTART, PROGRESS, LOAD].forEach((type) => addProgressEvent(xhr.upload, type, UPLOAD));
|
||||
}
|
||||
if (progressSubscriber) {
|
||||
[LOADSTART, PROGRESS].forEach((type) => xhr.upload.addEventListener(type, (e) => { var _a; return (_a = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.next) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber, e); }));
|
||||
}
|
||||
if (includeDownloadProgress) {
|
||||
[LOADSTART, PROGRESS].forEach((type) => addProgressEvent(xhr, type, DOWNLOAD));
|
||||
}
|
||||
const emitError = (status) => {
|
||||
const msg = 'ajax error' + (status ? ' ' + status : '');
|
||||
destination.error(new AjaxError(msg, xhr, _request));
|
||||
};
|
||||
xhr.addEventListener('error', (e) => {
|
||||
var _a;
|
||||
(_a = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber, e);
|
||||
emitError();
|
||||
});
|
||||
xhr.addEventListener(LOAD, (event) => {
|
||||
var _a, _b;
|
||||
const { status } = xhr;
|
||||
if (status < 400) {
|
||||
(_a = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber);
|
||||
let response;
|
||||
try {
|
||||
response = createResponse(DOWNLOAD, event);
|
||||
}
|
||||
catch (err) {
|
||||
destination.error(err);
|
||||
return;
|
||||
}
|
||||
destination.next(response);
|
||||
destination.complete();
|
||||
}
|
||||
else {
|
||||
(_b = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.error) === null || _b === void 0 ? void 0 : _b.call(progressSubscriber, event);
|
||||
emitError(status);
|
||||
}
|
||||
});
|
||||
}
|
||||
const { user, method, async } = _request;
|
||||
if (user) {
|
||||
xhr.open(method, url, async, user, _request.password);
|
||||
}
|
||||
else {
|
||||
xhr.open(method, url, async);
|
||||
}
|
||||
if (async) {
|
||||
xhr.timeout = _request.timeout;
|
||||
xhr.responseType = _request.responseType;
|
||||
}
|
||||
if ('withCredentials' in xhr) {
|
||||
xhr.withCredentials = _request.withCredentials;
|
||||
}
|
||||
for (const key in headers) {
|
||||
if (headers.hasOwnProperty(key)) {
|
||||
xhr.setRequestHeader(key, headers[key]);
|
||||
}
|
||||
}
|
||||
if (body) {
|
||||
xhr.send(body);
|
||||
}
|
||||
else {
|
||||
xhr.send();
|
||||
}
|
||||
return () => {
|
||||
if (xhr && xhr.readyState !== 4) {
|
||||
xhr.abort();
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
function extractContentTypeAndMaybeSerializeBody(body, headers) {
|
||||
var _a;
|
||||
if (!body ||
|
||||
typeof body === 'string' ||
|
||||
isFormData(body) ||
|
||||
isURLSearchParams(body) ||
|
||||
isArrayBuffer(body) ||
|
||||
isFile(body) ||
|
||||
isBlob(body) ||
|
||||
isReadableStream(body)) {
|
||||
return body;
|
||||
}
|
||||
if (isArrayBufferView(body)) {
|
||||
return body.buffer;
|
||||
}
|
||||
if (typeof body === 'object') {
|
||||
headers['content-type'] = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json;charset=utf-8';
|
||||
return JSON.stringify(body);
|
||||
}
|
||||
throw new TypeError('Unknown body type');
|
||||
}
|
||||
const _toString = Object.prototype.toString;
|
||||
function toStringCheck(obj, name) {
|
||||
return _toString.call(obj) === `[object ${name}]`;
|
||||
}
|
||||
function isArrayBuffer(body) {
|
||||
return toStringCheck(body, 'ArrayBuffer');
|
||||
}
|
||||
function isFile(body) {
|
||||
return toStringCheck(body, 'File');
|
||||
}
|
||||
function isBlob(body) {
|
||||
return toStringCheck(body, 'Blob');
|
||||
}
|
||||
function isArrayBufferView(body) {
|
||||
return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body);
|
||||
}
|
||||
function isFormData(body) {
|
||||
return typeof FormData !== 'undefined' && body instanceof FormData;
|
||||
}
|
||||
function isURLSearchParams(body) {
|
||||
return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams;
|
||||
}
|
||||
function isReadableStream(body) {
|
||||
return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream;
|
||||
}
|
||||
//# sourceMappingURL=ajax.js.map
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('truncate', require('../truncate'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,106 @@
|
||||
import { request } from '@octokit/request';
|
||||
import { getUserAgent } from 'universal-user-agent';
|
||||
|
||||
const VERSION = "5.0.5";
|
||||
|
||||
function _buildMessageForResponseErrors(data) {
|
||||
return (`Request failed due to following response errors:\n` +
|
||||
data.errors.map((e) => ` - ${e.message}`).join("\n"));
|
||||
}
|
||||
class GraphqlResponseError extends Error {
|
||||
constructor(request, headers, response) {
|
||||
super(_buildMessageForResponseErrors(response));
|
||||
this.request = request;
|
||||
this.headers = headers;
|
||||
this.response = response;
|
||||
this.name = "GraphqlResponseError";
|
||||
// Expose the errors and response data in their shorthand properties.
|
||||
this.errors = response.errors;
|
||||
this.data = response.data;
|
||||
// Maintains proper stack trace (only available on V8)
|
||||
/* istanbul ignore next */
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const NON_VARIABLE_OPTIONS = [
|
||||
"method",
|
||||
"baseUrl",
|
||||
"url",
|
||||
"headers",
|
||||
"request",
|
||||
"query",
|
||||
"mediaType",
|
||||
];
|
||||
const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
|
||||
const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
|
||||
function graphql(request, query, options) {
|
||||
if (options) {
|
||||
if (typeof query === "string" && "query" in options) {
|
||||
return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
|
||||
}
|
||||
for (const key in options) {
|
||||
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))
|
||||
continue;
|
||||
return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`));
|
||||
}
|
||||
}
|
||||
const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;
|
||||
const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {
|
||||
if (NON_VARIABLE_OPTIONS.includes(key)) {
|
||||
result[key] = parsedOptions[key];
|
||||
return result;
|
||||
}
|
||||
if (!result.variables) {
|
||||
result.variables = {};
|
||||
}
|
||||
result.variables[key] = parsedOptions[key];
|
||||
return result;
|
||||
}, {});
|
||||
// workaround for GitHub Enterprise baseUrl set with /api/v3 suffix
|
||||
// https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451
|
||||
const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;
|
||||
if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {
|
||||
requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
|
||||
}
|
||||
return request(requestOptions).then((response) => {
|
||||
if (response.data.errors) {
|
||||
const headers = {};
|
||||
for (const key of Object.keys(response.headers)) {
|
||||
headers[key] = response.headers[key];
|
||||
}
|
||||
throw new GraphqlResponseError(requestOptions, headers, response.data);
|
||||
}
|
||||
return response.data.data;
|
||||
});
|
||||
}
|
||||
|
||||
function withDefaults(request, newDefaults) {
|
||||
const newRequest = request.defaults(newDefaults);
|
||||
const newApi = (query, options) => {
|
||||
return graphql(newRequest, query, options);
|
||||
};
|
||||
return Object.assign(newApi, {
|
||||
defaults: withDefaults.bind(null, newRequest),
|
||||
endpoint: newRequest.endpoint,
|
||||
});
|
||||
}
|
||||
|
||||
const graphql$1 = withDefaults(request, {
|
||||
headers: {
|
||||
"user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,
|
||||
},
|
||||
method: "POST",
|
||||
url: "/graphql",
|
||||
});
|
||||
function withCustomRequest(customRequest) {
|
||||
return withDefaults(customRequest, {
|
||||
method: "POST",
|
||||
url: "/graphql",
|
||||
});
|
||||
}
|
||||
|
||||
export { GraphqlResponseError, graphql$1 as graphql, withCustomRequest };
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1,51 @@
|
||||
export type List = {
|
||||
/**
|
||||
* Safely splits values.
|
||||
*
|
||||
* ```js
|
||||
* Once (root, { list }) {
|
||||
* list.split('1px calc(10% + 1px)', [' ', '\n', '\t']) //=> ['1px', 'calc(10% + 1px)']
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param string separated values.
|
||||
* @param separators array of separators.
|
||||
* @param last boolean indicator.
|
||||
* @return Split values.
|
||||
*/
|
||||
split(string: string, separators: string[], last: boolean): string[]
|
||||
/**
|
||||
* Safely splits space-separated values (such as those for `background`,
|
||||
* `border-radius`, and other shorthand properties).
|
||||
*
|
||||
* ```js
|
||||
* Once (root, { list }) {
|
||||
* list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)']
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param str Space-separated values.
|
||||
* @return Split values.
|
||||
*/
|
||||
space(str: string): string[]
|
||||
|
||||
/**
|
||||
* Safely splits comma-separated values (such as those for `transition-*`
|
||||
* and `background` properties).
|
||||
*
|
||||
* ```js
|
||||
* Once (root, { list }) {
|
||||
* list.comma('black, linear-gradient(white, black)')
|
||||
* //=> ['black', 'linear-gradient(white, black)']
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param str Comma-separated values.
|
||||
* @return Split values.
|
||||
*/
|
||||
comma(str: string): string[]
|
||||
}
|
||||
|
||||
declare const list: List
|
||||
|
||||
export default list
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { argsOrArgArray } from '../util/argsOrArgArray';
|
||||
import { OperatorSubscriber } from '../operators/OperatorSubscriber';
|
||||
import { noop } from '../util/noop';
|
||||
import { innerFrom } from './innerFrom';
|
||||
export function onErrorResumeNext(...sources) {
|
||||
const nextSources = argsOrArgArray(sources);
|
||||
return new Observable((subscriber) => {
|
||||
let sourceIndex = 0;
|
||||
const subscribeNext = () => {
|
||||
if (sourceIndex < nextSources.length) {
|
||||
let nextSource;
|
||||
try {
|
||||
nextSource = innerFrom(nextSources[sourceIndex++]);
|
||||
}
|
||||
catch (err) {
|
||||
subscribeNext();
|
||||
return;
|
||||
}
|
||||
const innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop);
|
||||
nextSource.subscribe(innerSubscriber);
|
||||
innerSubscriber.add(subscribeNext);
|
||||
}
|
||||
else {
|
||||
subscriber.complete();
|
||||
}
|
||||
};
|
||||
subscribeNext();
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=onErrorResumeNext.js.map
|
||||
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
var trim = require('../');
|
||||
var test = require('tape');
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('as a function', function (t) {
|
||||
t.test('bad array/this value', function (st) {
|
||||
st['throws'](function () { trim(undefined, 'a'); }, TypeError, 'undefined is not an object');
|
||||
st['throws'](function () { trim(null, 'a'); }, TypeError, 'null is not an object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
runTests(trim, t);
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,162 @@
|
||||
import { WebSocketSubject, WebSocketSubjectConfig } from './WebSocketSubject';
|
||||
|
||||
/**
|
||||
* Wrapper around the w3c-compatible WebSocket object provided by the browser.
|
||||
*
|
||||
* <span class="informal">{@link Subject} that communicates with a server via WebSocket</span>
|
||||
*
|
||||
* `webSocket` is a factory function that produces a `WebSocketSubject`,
|
||||
* which can be used to make WebSocket connection with an arbitrary endpoint.
|
||||
* `webSocket` accepts as an argument either a string with url of WebSocket endpoint, or an
|
||||
* {@link WebSocketSubjectConfig} object for providing additional configuration, as
|
||||
* well as Observers for tracking lifecycle of WebSocket connection.
|
||||
*
|
||||
* When `WebSocketSubject` is subscribed, it attempts to make a socket connection,
|
||||
* unless there is one made already. This means that many subscribers will always listen
|
||||
* on the same socket, thus saving resources. If however, two instances are made of `WebSocketSubject`,
|
||||
* even if these two were provided with the same url, they will attempt to make separate
|
||||
* connections. When consumer of a `WebSocketSubject` unsubscribes, socket connection is closed,
|
||||
* only if there are no more subscribers still listening. If after some time a consumer starts
|
||||
* subscribing again, connection is reestablished.
|
||||
*
|
||||
* Once connection is made, whenever a new message comes from the server, `WebSocketSubject` will emit that
|
||||
* message as a value in the stream. By default, a message from the socket is parsed via `JSON.parse`. If you
|
||||
* want to customize how deserialization is handled (if at all), you can provide custom `resultSelector`
|
||||
* function in {@link WebSocketSubject}. When connection closes, stream will complete, provided it happened without
|
||||
* any errors. If at any point (starting, maintaining or closing a connection) there is an error,
|
||||
* stream will also error with whatever WebSocket API has thrown.
|
||||
*
|
||||
* By virtue of being a {@link Subject}, `WebSocketSubject` allows for receiving and sending messages from the server. In order
|
||||
* to communicate with a connected endpoint, use `next`, `error` and `complete` methods. `next` sends a value to the server, so bear in mind
|
||||
* that this value will not be serialized beforehand. Because of This, `JSON.stringify` will have to be called on a value by hand,
|
||||
* before calling `next` with a result. Note also that if at the moment of nexting value
|
||||
* there is no socket connection (for example no one is subscribing), those values will be buffered, and sent when connection
|
||||
* is finally established. `complete` method closes socket connection. `error` does the same,
|
||||
* as well as notifying the server that something went wrong via status code and string with details of what happened.
|
||||
* Since status code is required in WebSocket API, `WebSocketSubject` does not allow, like regular `Subject`,
|
||||
* arbitrary values being passed to the `error` method. It needs to be called with an object that has `code`
|
||||
* property with status code number and optional `reason` property with string describing details
|
||||
* of an error.
|
||||
*
|
||||
* Calling `next` does not affect subscribers of `WebSocketSubject` - they have no
|
||||
* information that something was sent to the server (unless of course the server
|
||||
* responds somehow to a message). On the other hand, since calling `complete` triggers
|
||||
* an attempt to close socket connection. If that connection is closed without any errors, stream will
|
||||
* complete, thus notifying all subscribers. And since calling `error` closes
|
||||
* socket connection as well, just with a different status code for the server, if closing itself proceeds
|
||||
* without errors, subscribed Observable will not error, as one might expect, but complete as usual. In both cases
|
||||
* (calling `complete` or `error`), if process of closing socket connection results in some errors, *then* stream
|
||||
* will error.
|
||||
*
|
||||
* **Multiplexing**
|
||||
*
|
||||
* `WebSocketSubject` has an additional operator, not found in other Subjects. It is called `multiplex` and it is
|
||||
* used to simulate opening several socket connections, while in reality maintaining only one.
|
||||
* For example, an application has both chat panel and real-time notifications about sport news. Since these are two distinct functions,
|
||||
* it would make sense to have two separate connections for each. Perhaps there could even be two separate services with WebSocket
|
||||
* endpoints, running on separate machines with only GUI combining them together. Having a socket connection
|
||||
* for each functionality could become too resource expensive. It is a common pattern to have single
|
||||
* WebSocket endpoint that acts as a gateway for the other services (in this case chat and sport news services).
|
||||
* Even though there is a single connection in a client app, having the ability to manipulate streams as if it
|
||||
* were two separate sockets is desirable. This eliminates manually registering and unregistering in a gateway for
|
||||
* given service and filter out messages of interest. This is exactly what `multiplex` method is for.
|
||||
*
|
||||
* Method accepts three parameters. First two are functions returning subscription and unsubscription messages
|
||||
* respectively. These are messages that will be sent to the server, whenever consumer of resulting Observable
|
||||
* subscribes and unsubscribes. Server can use them to verify that some kind of messages should start or stop
|
||||
* being forwarded to the client. In case of the above example application, after getting subscription message with proper identifier,
|
||||
* gateway server can decide that it should connect to real sport news service and start forwarding messages from it.
|
||||
* Note that both messages will be sent as returned by the functions, they are by default serialized using JSON.stringify, just
|
||||
* as messages pushed via `next`. Also bear in mind that these messages will be sent on *every* subscription and
|
||||
* unsubscription. This is potentially dangerous, because one consumer of an Observable may unsubscribe and the server
|
||||
* might stop sending messages, since it got unsubscription message. This needs to be handled
|
||||
* on the server or using {@link publish} on a Observable returned from 'multiplex'.
|
||||
*
|
||||
* Last argument to `multiplex` is a `messageFilter` function which should return a boolean. It is used to filter out messages
|
||||
* sent by the server to only those that belong to simulated WebSocket stream. For example, server might mark these
|
||||
* messages with some kind of string identifier on a message object and `messageFilter` would return `true`
|
||||
* if there is such identifier on an object emitted by the socket. Messages which returns `false` in `messageFilter` are simply skipped,
|
||||
* and are not passed down the stream.
|
||||
*
|
||||
* Return value of `multiplex` is an Observable with messages incoming from emulated socket connection. Note that this
|
||||
* is not a `WebSocketSubject`, so calling `next` or `multiplex` again will fail. For pushing values to the
|
||||
* server, use root `WebSocketSubject`.
|
||||
*
|
||||
* ## Examples
|
||||
*
|
||||
* Listening for messages from the server
|
||||
*
|
||||
* ```ts
|
||||
* import { webSocket } from 'rxjs/webSocket';
|
||||
*
|
||||
* const subject = webSocket('ws://localhost:8081');
|
||||
*
|
||||
* subject.subscribe({
|
||||
* next: msg => console.log('message received: ' + msg), // Called whenever there is a message from the server.
|
||||
* error: err => console.log(err), // Called if at any point WebSocket API signals some kind of error.
|
||||
* complete: () => console.log('complete') // Called when connection is closed (for whatever reason).
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* Pushing messages to the server
|
||||
*
|
||||
* ```ts
|
||||
* import { webSocket } from 'rxjs/webSocket';
|
||||
*
|
||||
* const subject = webSocket('ws://localhost:8081');
|
||||
*
|
||||
* subject.subscribe();
|
||||
* // Note that at least one consumer has to subscribe to the created subject - otherwise "nexted" values will be just buffered and not sent,
|
||||
* // since no connection was established!
|
||||
*
|
||||
* subject.next({ message: 'some message' });
|
||||
* // This will send a message to the server once a connection is made. Remember value is serialized with JSON.stringify by default!
|
||||
*
|
||||
* subject.complete(); // Closes the connection.
|
||||
*
|
||||
* subject.error({ code: 4000, reason: 'I think our app just broke!' });
|
||||
* // Also closes the connection, but let's the server know that this closing is caused by some error.
|
||||
* ```
|
||||
*
|
||||
* Multiplexing WebSocket
|
||||
*
|
||||
* ```ts
|
||||
* import { webSocket } from 'rxjs/webSocket';
|
||||
*
|
||||
* const subject = webSocket('ws://localhost:8081');
|
||||
*
|
||||
* const observableA = subject.multiplex(
|
||||
* () => ({ subscribe: 'A' }), // When server gets this message, it will start sending messages for 'A'...
|
||||
* () => ({ unsubscribe: 'A' }), // ...and when gets this one, it will stop.
|
||||
* message => message.type === 'A' // If the function returns `true` message is passed down the stream. Skipped if the function returns false.
|
||||
* );
|
||||
*
|
||||
* const observableB = subject.multiplex( // And the same goes for 'B'.
|
||||
* () => ({ subscribe: 'B' }),
|
||||
* () => ({ unsubscribe: 'B' }),
|
||||
* message => message.type === 'B'
|
||||
* );
|
||||
*
|
||||
* const subA = observableA.subscribe(messageForA => console.log(messageForA));
|
||||
* // At this moment WebSocket connection is established. Server gets '{"subscribe": "A"}' message and starts sending messages for 'A',
|
||||
* // which we log here.
|
||||
*
|
||||
* const subB = observableB.subscribe(messageForB => console.log(messageForB));
|
||||
* // Since we already have a connection, we just send '{"subscribe": "B"}' message to the server. It starts sending messages for 'B',
|
||||
* // which we log here.
|
||||
*
|
||||
* subB.unsubscribe();
|
||||
* // Message '{"unsubscribe": "B"}' is sent to the server, which stops sending 'B' messages.
|
||||
*
|
||||
* subA.unsubscribe();
|
||||
* // Message '{"unsubscribe": "A"}' makes the server stop sending messages for 'A'. Since there is no more subscribers to root Subject,
|
||||
* // socket connection closes.
|
||||
* ```
|
||||
*
|
||||
* @param {string|WebSocketSubjectConfig} urlConfigOrSource The WebSocket endpoint as an url or an object with
|
||||
* configuration and additional Observers.
|
||||
* @return {WebSocketSubject} Subject which allows to both send and receive messages via WebSocket connection.
|
||||
*/
|
||||
export function webSocket<T>(urlConfigOrSource: string | WebSocketSubjectConfig<T>): WebSocketSubject<T> {
|
||||
return new WebSocketSubject<T>(urlConfigOrSource);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
var ToNumber = require('./ToNumber');
|
||||
var floor = require('./floor');
|
||||
|
||||
var $isNaN = require('../helpers/isNaN');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-touint8clamp
|
||||
|
||||
module.exports = function ToUint8Clamp(argument) {
|
||||
var number = ToNumber(argument);
|
||||
if ($isNaN(number) || number <= 0) { return 0; }
|
||||
if (number >= 0xFF) { return 0xFF; }
|
||||
var f = floor(number);
|
||||
if (f + 0.5 < number) { return f + 1; }
|
||||
if (number < f + 0.5) { return f; }
|
||||
if (f % 2 !== 0) { return f + 1; }
|
||||
return f;
|
||||
};
|
||||
Reference in New Issue
Block a user