[{"data":1,"prerenderedAt":9345},["ShallowReactive",2],{"posts":3,"announcements":5153,"search-data":5170,"latest-posts":5394},[4,228,562,774,878,928,1504,1643,1827,2025,2293,4520,4618,4662],{"id":5,"title":6,"body":7,"categories":214,"cross_post":215,"date":216,"description":217,"extension":218,"image":20,"meta":219,"navigation":31,"note_id":215,"note_url":215,"path":220,"private":221,"qiita_id":215,"qiita_url":215,"seo":222,"stem":223,"tags":224,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":227},"posts/posts/1064.md","javascript 配列",{"type":8,"value":9,"toc":211},"minimal",[10,14,207],[11,12,13],"h2",{"id":13},"操作",[15,16,21],"pre",{"className":17,"code":18,"language":19,"meta":20,"style":20},"language-javascript shiki shiki-themes github-light github-dark","\nconst  arr = []\n\n// 先頭を削除\narr.shift() ;\n\n// 末尾を削除\narr.pop() ;\n\n// 配列合計\ndata.reduce((a, x) =>{return a + ((x || 0) - 0);}, 0);\n\n// 配列から新しい配列\nconst count = Array.from(line)\n\n// 配列を空,null undefined を削除\narr.filter((v) => v\n// 配列の要素すべてが条件を満たしているか\n  o = s.every(isUpperCase)\n//配列の要素一つでも条件を満たしているか\narr.some()\n//配列のkeyを取得\narr_key = Object.keys(arr)\n// 配列に引数の値が含まれているかどうか\narr_key.includes(x)\n//配列の順番を逆に\narr.reverse()\n\n// 配列の重複削除\nconst array1 = [1, 5, 3, 1, 5, 3];\nconst array2 = Array.from(new Set(array1))\n\n","javascript","",[22,23,24,33,39,44,50,56,61,67,73,78,84,90,95,101,107,112,118,124,130,136,142,148,154,160,166,172,178,184,189,195,201],"code",{"__ignoreMap":20},[25,26,29],"span",{"class":27,"line":28},"line",1,[25,30,32],{"emptyLinePlaceholder":31},true,"\n",[25,34,36],{"class":27,"line":35},2,[25,37,38],{},"const  arr = []\n",[25,40,42],{"class":27,"line":41},3,[25,43,32],{"emptyLinePlaceholder":31},[25,45,47],{"class":27,"line":46},4,[25,48,49],{},"// 先頭を削除\n",[25,51,53],{"class":27,"line":52},5,[25,54,55],{},"arr.shift() ;\n",[25,57,59],{"class":27,"line":58},6,[25,60,32],{"emptyLinePlaceholder":31},[25,62,64],{"class":27,"line":63},7,[25,65,66],{},"// 末尾を削除\n",[25,68,70],{"class":27,"line":69},8,[25,71,72],{},"arr.pop() ;\n",[25,74,76],{"class":27,"line":75},9,[25,77,32],{"emptyLinePlaceholder":31},[25,79,81],{"class":27,"line":80},10,[25,82,83],{},"// 配列合計\n",[25,85,87],{"class":27,"line":86},11,[25,88,89],{},"data.reduce((a, x) =>{return a + ((x || 0) - 0);}, 0);\n",[25,91,93],{"class":27,"line":92},12,[25,94,32],{"emptyLinePlaceholder":31},[25,96,98],{"class":27,"line":97},13,[25,99,100],{},"// 配列から新しい配列\n",[25,102,104],{"class":27,"line":103},14,[25,105,106],{},"const count = Array.from(line)\n",[25,108,110],{"class":27,"line":109},15,[25,111,32],{"emptyLinePlaceholder":31},[25,113,115],{"class":27,"line":114},16,[25,116,117],{},"// 配列を空,null undefined を削除\n",[25,119,121],{"class":27,"line":120},17,[25,122,123],{},"arr.filter((v) => v\n",[25,125,127],{"class":27,"line":126},18,[25,128,129],{},"// 配列の要素すべてが条件を満たしているか\n",[25,131,133],{"class":27,"line":132},19,[25,134,135],{},"  o = s.every(isUpperCase)\n",[25,137,139],{"class":27,"line":138},20,[25,140,141],{},"//配列の要素一つでも条件を満たしているか\n",[25,143,145],{"class":27,"line":144},21,[25,146,147],{},"arr.some()\n",[25,149,151],{"class":27,"line":150},22,[25,152,153],{},"//配列のkeyを取得\n",[25,155,157],{"class":27,"line":156},23,[25,158,159],{},"arr_key = Object.keys(arr)\n",[25,161,163],{"class":27,"line":162},24,[25,164,165],{},"// 配列に引数の値が含まれているかどうか\n",[25,167,169],{"class":27,"line":168},25,[25,170,171],{},"arr_key.includes(x)\n",[25,173,175],{"class":27,"line":174},26,[25,176,177],{},"//配列の順番を逆に\n",[25,179,181],{"class":27,"line":180},27,[25,182,183],{},"arr.reverse()\n",[25,185,187],{"class":27,"line":186},28,[25,188,32],{"emptyLinePlaceholder":31},[25,190,192],{"class":27,"line":191},29,[25,193,194],{},"// 配列の重複削除\n",[25,196,198],{"class":27,"line":197},30,[25,199,200],{},"const array1 = [1, 5, 3, 1, 5, 3];\n",[25,202,204],{"class":27,"line":203},31,[25,205,206],{},"const array2 = Array.from(new Set(array1))\n",[208,209,210],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":20,"searchDepth":35,"depth":35,"links":212},[213],{"id":13,"depth":35,"text":13},[19],null,"2021-04-24T00:00:00.000Z","JavaScriptの配列操作(shift/pop/reduce/filter/every/some/includes等)を使い方付きでまとめたメモ","md",{},"/posts/1064",false,{"title":6,"description":217},"posts/1064",[225,226],"javascprit","memo","l479JEVfw33a_o9maTdOENUiLQu1ymjwNi1nOZRpfh8",{"id":229,"title":230,"body":231,"categories":550,"cross_post":215,"date":552,"description":553,"extension":218,"image":20,"meta":554,"navigation":31,"note_id":215,"note_url":215,"path":555,"private":221,"qiita_id":215,"qiita_url":215,"seo":556,"stem":557,"tags":558,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":561},"posts/posts/2024-review.md","2024年を振り返って",{"type":8,"value":232,"toc":543},[233,237,241,244,247,250,253,256,269,278,282,285,288,291,294,297,300,303,316,319,322,325,328,337,340,343,346,349,352,355,358,361,370,374,377,380,383,386,389,392,395,398,401,404,407,416,425,428,431,434,438,441,444,447,450,453,456,459,468,471,474,477,480,483,486,489,492,495,498,507,516,519,522,525,528,531,534,537,540],[11,234,236],{"id":235},"_13月","1~3月",[238,239,240],"p",{},"例年ながら、冬は寒いし日光なくてあんまり調子は出ないで",[238,242,243],{},"今年もローテンションで生活していました..",[238,245,246],{},"とはいえ",[238,248,249],{},"りんご農園さんの受注分析システムを作成したり",[238,251,252],{},"はじめて冬の戸隠神社に仲良くなったオーストラリア人でワーキングホリデーで日本に来た友達と",[238,254,255],{},"雪の中行ってみたりしました。",[238,257,258,261,267],{},[259,260],"br",{},[262,263],"iframe",{"src":264,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1ZNigyxjgJNA8ZBWw213p2JPtEG5pa9aJ&pid=explorer&efh=false&a=v&chrome=false&embedded=true","width:300px; height:300px;","0",[259,268],{},[238,270,271,273,276],{},[259,272],{},[262,274],{"src":275,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1pMSpEv11YoZqC_ctYznDY3MvTZdz3H_E&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,277],{},[11,279,281],{"id":280},"_46月","4~6月",[238,283,284],{},"4月5月で東京でSIerの新人研修のサブ講師をしたのは新しい経験でした。",[238,286,287],{},"今まで子供にプログラミングを教えたりとか、",[238,289,290],{},"オンラインのプログラミング教室の講師の経験をしてきましたが",[238,292,293],{},"やはり対面でメイン講師ではないとはいえ100名以上を前に喋ったり",[238,295,296],{},"サポートするのは今までとはちがった経験で仕事を受けた時は意識していませんでしたが",[238,298,299],{},"チャレンジであり新しい価値観とスキルを身につけた気がします。",[238,301,302],{},"また、登山もことしも行き始め",[304,305,306,310,313],"ul",{},[307,308,309],"li",{},"見晴岳・三方ヶ峰・篭ノ登山(東篭ノ登山)",[307,311,312],{},"飯綱山",[307,314,315],{},"蓼科山",[238,317,318],{},"に行きましたー。",[238,320,321],{},"ものすごい高い山ではないですが、",[238,323,324],{},"山頂でお湯を沸かしてカップラーメンとコーヒーは達成感あっていいものですね〜",[238,326,327],{},"帰りに、温泉に寄ってくるのも定番です！",[238,329,330,332,335],{},[259,331],{},[262,333],{"src":334,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1H0UBDszh3o_635R8-u5oAeRigbkx55dg&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,336],{},[238,338,339],{},"そして、今年の大きな旅行１つ目",[238,341,342],{},"台湾にも１人旅をしてきました。",[238,344,345],{},"今まで海外は誰かと一緒でしたので今回",[238,347,348],{},"全ての手配も一人でやり一人で台湾に行って帰ってきたのは",[238,350,351],{},"旅行の楽しさも凄くありましたが、",[238,353,354],{},"より色々なとこにフットワーク軽く移動できるようになった気がして嬉しかったです。",[238,356,357],{},"それから台湾は英語あまり通じなかったですが、同じホステルの人とかと頑張って喋ってみて",[238,359,360],{},"前よりも英語も上達している気がしたのも嬉しかったです。",[238,362,363,365,368],{},[259,364],{},[262,366],{"src":367,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1WlUr1YDksAX4nLRQmwuR9G3BUUcnGxCV&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,369],{},[11,371,373],{"id":372},"_79月","7~9月",[238,375,376],{},"暑すぎてあまり引きこもり気味でした…",[238,378,379],{},"それでも",[238,381,382],{},"松本の花火や穂高神社の花火に行ったりしました。",[238,384,385],{},"そして今年の大きな旅行２つ目",[238,387,388],{},"青春18きっぷで北海道まで行ったことです。",[238,390,391],{},"青春18きっぷが今年で無くなるのではないかとの噂を聞いて",[238,393,394],{},"今まで１回もチャレンジしたことなかったので",[238,396,397],{},"長野からどこまで行けるか調べてチャレンジしてみました。",[238,399,400],{},"フェリーに乗る必要があるとはいえ函館まで行きさらに札幌までいってきました！",[238,402,403],{},"じつはこのルート青春18きっぷの改訂でこの冬からは同じ手段ではいけなくなっていまいました。",[238,405,406],{},"ちゃんと夏のシーズンにいってよかったな思いました。",[238,408,409,411,414],{},[259,410],{},[262,412],{"src":413,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1d5_ZDcg1bq_BYWCNivb4XSqmRNA0f8s3&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,415],{},[238,417,418,420,423],{},[259,419],{},[262,421],{"src":422,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1kOoSs5Py_ln7tIOIQNXvv2fd12R1HXbS&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,424],{},[238,426,427],{},"山にも登りました、",[238,429,430],{},"9月の少し涼しくなってきたタイミングで",[238,432,433],{},"烏帽子岳と湯ノ丸山にいってきましたー",[11,435,437],{"id":436},"_1012月","10~12月",[238,439,440],{},"前半登山とキャンプ",[238,442,443],{},"根子岳と四阿山にいってきました。",[238,445,446],{},"キャンプは子安温泉キャンプ所で！",[238,448,449],{},"今回一緒に行ったメンバーが焚き火台を持ってきてくれて",[238,451,452],{},"初めてキャンプで焚き火を焚き火で魚や肉を焼いたりして",[238,454,455],{},"炎を眺めるのもいいですし、焚き火で作った料理は美味しいしで",[238,457,458],{},"僕も焚き火台が欲しくなりました…",[238,460,461,463,466],{},[259,462],{},[262,464],{"src":465,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1vR5tfYQ5BKvAPrOAMui4c24vvGe0yo44&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,467],{},[238,469,470],{},"そして今年３つ目の大きな旅行で",[238,472,473],{},"出雲へいってきました",[238,475,476],{},"東京からサンライズ出雲の寝台列車に乗ることができて嬉しかったです！",[238,478,479],{},"日本で唯一毎日運行されている寝台特急ということで",[238,481,482],{},"乗れるうちに乗ってみたかったのですが、今回その目標も叶いました〜",[238,484,485],{},"出雲で出雲大社と周辺の神社、それから松江で宿泊し、松江城や歴史館",[238,487,488],{},"そして世界遺産の石見銀山の構成遺産の温泉津に泊まって",[238,490,491],{},"翌日石見銀山へ",[238,493,494],{},"なかなか関西より西に行くことが少ないので色々回れておもしろかったし、",[238,496,497],{},"歴史も垣間見れる場所もいけてよかったです。",[238,499,500,502,505],{},[259,501],{},[262,503],{"src":504,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1HLBYL8UOTYv5efg5_m-Z6Stmnzg0fR9_&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,506],{},[238,508,509,511,514],{},[259,510],{},[262,512],{"src":513,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1Bec0WqpRYjwK6Fvdt1JgXF9UHPhjq_7Y&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,515],{},[11,517,518],{"id":518},"まとめ",[238,520,521],{},"今年は結構旅行など意外に外出が多かった年でした〜",[238,523,524],{},"仕事ではフリーランスになって１年目で変化が多かったですが",[238,526,527],{},"りんご農園さんのDX支援は講師をしてみたりで新たな自分の可能性を広げられたかなと思ってます。",[238,529,530],{},"あと、地味に夏からダイエットをしてるのです、12月末で7kg痩せていて",[238,532,533],{},"自分でもびっくりですが結構嬉しいです！",[238,535,536],{},"あと2kg痩せてそこから筋肉つけれる方向に向かっていければなって考えてますね〜",[238,538,539],{},"来年の目標は年始にまた考えますが、もうちょい痩せて、もうちょい英語喋れるようになるのは",[238,541,542],{},"頑張っていきたいところですね〜",{"title":20,"searchDepth":35,"depth":35,"links":544},[545,546,547,548,549],{"id":235,"depth":35,"text":236},{"id":280,"depth":35,"text":281},{"id":372,"depth":35,"text":373},{"id":436,"depth":35,"text":437},{"id":518,"depth":35,"text":518},[551],"日常","2024-12-31T00:00:00.000Z","2024年の振り返り。りんご農園の受注分析システム開発や戸隠神社への冬の旅など、この一年の出来事をまとめた",{},"/posts/2024-review",{"title":230,"description":553},"posts/2024-review",[559,560],"振り返り",2024,"eRHq1qQ1NLrxBpCQVXsfIpxzrO5skiSJBEsdSpQZ3MU",{"id":563,"title":564,"body":565,"categories":764,"cross_post":215,"date":766,"description":767,"extension":218,"image":20,"meta":768,"navigation":31,"note_id":215,"note_url":215,"path":769,"private":221,"qiita_id":215,"qiita_url":215,"seo":770,"stem":771,"tags":772,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":773},"posts/posts/4456.md","firebase firestore データ取得",{"type":8,"value":566,"toc":761},[567,570,758],[11,568,569],{"id":569},"データ取得コレクション全部",[15,571,575],{"className":572,"code":573,"language":574,"meta":20,"style":20},"language-typescript shiki shiki-themes github-light github-dark","firebase.initializeApp(firebaseConfig)\n\nconst firestore = firebase.firestore()\n\nconst querySnapshot = await firestore.collection('p0st')\n\n// firebase.firestore.QuerySnapshotのインスタンスを取得\nconsole.log(querySnapshot.size)\nconsole.log(querySnapshot.empty)\nconsole.log(querySnapshot.docs.map((postDoc) => postDoc.id))\nquerySnapshot.forEach((postDoc) => {\n  console.log([postDoc.id, JSON.stringify(postDoc.data())])\n})\n","typescript",[22,576,577,590,594,616,620,648,652,658,669,678,706,725,753],{"__ignoreMap":20},[25,578,579,583,587],{"class":27,"line":28},[25,580,582],{"class":581},"sVt8B","firebase.",[25,584,586],{"class":585},"sScJk","initializeApp",[25,588,589],{"class":581},"(firebaseConfig)\n",[25,591,592],{"class":27,"line":35},[25,593,32],{"emptyLinePlaceholder":31},[25,595,596,600,604,607,610,613],{"class":27,"line":41},[25,597,599],{"class":598},"szBVR","const",[25,601,603],{"class":602},"sj4cs"," firestore",[25,605,606],{"class":598}," =",[25,608,609],{"class":581}," firebase.",[25,611,612],{"class":585},"firestore",[25,614,615],{"class":581},"()\n",[25,617,618],{"class":27,"line":46},[25,619,32],{"emptyLinePlaceholder":31},[25,621,622,624,627,629,632,635,638,641,645],{"class":27,"line":52},[25,623,599],{"class":598},[25,625,626],{"class":602}," querySnapshot",[25,628,606],{"class":598},[25,630,631],{"class":598}," await",[25,633,634],{"class":581}," firestore.",[25,636,637],{"class":585},"collection",[25,639,640],{"class":581},"(",[25,642,644],{"class":643},"sZZnC","'p0st'",[25,646,647],{"class":581},")\n",[25,649,650],{"class":27,"line":58},[25,651,32],{"emptyLinePlaceholder":31},[25,653,654],{"class":27,"line":63},[25,655,657],{"class":656},"sJ8bj","// firebase.firestore.QuerySnapshotのインスタンスを取得\n",[25,659,660,663,666],{"class":27,"line":69},[25,661,662],{"class":581},"console.",[25,664,665],{"class":585},"log",[25,667,668],{"class":581},"(querySnapshot.size)\n",[25,670,671,673,675],{"class":27,"line":75},[25,672,662],{"class":581},[25,674,665],{"class":585},[25,676,677],{"class":581},"(querySnapshot.empty)\n",[25,679,680,682,684,687,690,693,697,700,703],{"class":27,"line":80},[25,681,662],{"class":581},[25,683,665],{"class":585},[25,685,686],{"class":581},"(querySnapshot.docs.",[25,688,689],{"class":585},"map",[25,691,692],{"class":581},"((",[25,694,696],{"class":695},"s4XuR","postDoc",[25,698,699],{"class":581},") ",[25,701,702],{"class":598},"=>",[25,704,705],{"class":581}," postDoc.id))\n",[25,707,708,711,714,716,718,720,722],{"class":27,"line":86},[25,709,710],{"class":581},"querySnapshot.",[25,712,713],{"class":585},"forEach",[25,715,692],{"class":581},[25,717,696],{"class":695},[25,719,699],{"class":581},[25,721,702],{"class":598},[25,723,724],{"class":581}," {\n",[25,726,727,730,732,735,738,741,744,747,750],{"class":27,"line":92},[25,728,729],{"class":581},"  console.",[25,731,665],{"class":585},[25,733,734],{"class":581},"([postDoc.id, ",[25,736,737],{"class":602},"JSON",[25,739,740],{"class":581},".",[25,742,743],{"class":585},"stringify",[25,745,746],{"class":581},"(postDoc.",[25,748,749],{"class":585},"data",[25,751,752],{"class":581},"())])\n",[25,754,755],{"class":27,"line":97},[25,756,757],{"class":581},"})\n",[208,759,760],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":20,"searchDepth":35,"depth":35,"links":762},[763],{"id":569,"depth":35,"text":569},[765],"firebase","2021-04-20T00:00:00.000Z","FirebaseのFirestoreからコレクション内の全ドキュメントを取得するTypeScriptのサンプルコード",{},"/posts/4456",{"title":564,"description":767},"posts/4456",[765,612,574],"9phuXdAqszh46W1glf-UkPEEx0Y_IaeIDn8UF5eJsIk",{"id":775,"title":776,"body":777,"categories":869,"cross_post":215,"date":870,"description":871,"extension":218,"image":20,"meta":872,"navigation":31,"note_id":215,"note_url":215,"path":873,"private":221,"qiita_id":215,"qiita_url":215,"seo":874,"stem":875,"tags":876,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":877},"posts/posts/4621.md","javascript 年月の差分、日にちの差分",{"type":8,"value":778,"toc":865},[779,782,785,829,832,835,863],[11,780,781],{"id":781},"月の差分",[238,783,784],{},"何月前か後ろかを整数で返す",[15,786,788],{"className":17,"code":787,"language":19,"meta":20,"style":20},"//  js月の比較\nconst date1 = new Date(2021, 1, 1)\nconst date2 = new Date(2021, 12, 11)\n\nlet months\nmonths = (date2.getFullYear() - date1.getFullYear()) * 12\nmonths -= date1.getMonth() + 1\nmonths += date2.getMonth() + 1\n",[22,789,790,795,800,805,809,814,819,824],{"__ignoreMap":20},[25,791,792],{"class":27,"line":28},[25,793,794],{},"//  js月の比較\n",[25,796,797],{"class":27,"line":35},[25,798,799],{},"const date1 = new Date(2021, 1, 1)\n",[25,801,802],{"class":27,"line":41},[25,803,804],{},"const date2 = new Date(2021, 12, 11)\n",[25,806,807],{"class":27,"line":46},[25,808,32],{"emptyLinePlaceholder":31},[25,810,811],{"class":27,"line":52},[25,812,813],{},"let months\n",[25,815,816],{"class":27,"line":58},[25,817,818],{},"months = (date2.getFullYear() - date1.getFullYear()) * 12\n",[25,820,821],{"class":27,"line":63},[25,822,823],{},"months -= date1.getMonth() + 1\n",[25,825,826],{"class":27,"line":69},[25,827,828],{},"months += date2.getMonth() + 1\n",[11,830,831],{"id":831},"日の差分",[238,833,834],{},"単純に日数の差分を返す",[15,836,838],{"className":17,"code":837,"language":19,"meta":20,"style":20},"//  js日差分\nconst date1 = new Date(2021, 1, 1)\nconst date2 = new Date(2021, 12, 11)\nconst termDay = (date2 - date1) / 86400000\nconsole.log(termDay)\n",[22,839,840,845,849,853,858],{"__ignoreMap":20},[25,841,842],{"class":27,"line":28},[25,843,844],{},"//  js日差分\n",[25,846,847],{"class":27,"line":35},[25,848,799],{},[25,850,851],{"class":27,"line":41},[25,852,804],{},[25,854,855],{"class":27,"line":46},[25,856,857],{},"const termDay = (date2 - date1) / 86400000\n",[25,859,860],{"class":27,"line":52},[25,861,862],{},"console.log(termDay)\n",[208,864,210],{},{"title":20,"searchDepth":35,"depth":35,"links":866},[867,868],{"id":781,"depth":35,"text":781},{"id":831,"depth":35,"text":831},[19],"2021-04-28T00:00:00.000Z","JavaScriptで2つの日付から月の差分・日にちの差分を計算するコードのメモ",{},"/posts/4621",{"title":776,"description":871},"posts/4621",[19,226],"-fPzHOzKLbyefpQ2qEiL_AWB3mmPlb2ujaEkwCKBqLw",{"id":879,"title":880,"body":881,"categories":915,"cross_post":215,"date":917,"description":918,"extension":218,"image":919,"meta":920,"navigation":31,"note_id":215,"note_url":215,"path":921,"private":221,"qiita_id":215,"qiita_url":215,"seo":922,"stem":923,"tags":924,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":927},"posts/posts/chiriquiz01.md","地理好きなら全問正解!?信州の地理クイズpart1",{"type":8,"value":882,"toc":910},[883,886,894,897,902,905],[11,884,885],{"id":885},"第1問",[887,888],"quiz-item",{":options":889,"correctMessage":890,"explanation":891,"incorrectMessage":892,"question":893},"[{\"text\":\"66\",\"isCorrect\":false},{\"text\":\"77\",\"isCorrect\":true},{\"text\":\"88\",\"isCorrect\":false}]","正解です！","いわゆる「平成の大合併」前は120市町村ありました。","不正解です。もう一度挑戦してください。","長野県の市町村の総数はいくつ？",[11,895,896],{"id":896},"第2問",[887,898],{":options":899,"correctMessage":890,"explanation":900,"incorrectMessage":892,"question":901},"[{\"text\":\"2番目\",\"isCorrect\":true},{\"text\":\"12番目\",\"isCorrect\":false},{\"text\":\"22番目\",\"isCorrect\":false}]","北海道に次いで全国2位です。","長野県の市町村の総数は47都道府県で何番目に多い？",[11,903,904],{"id":904},"第3問",[887,906],{":options":907,"correctMessage":890,"explanation":908,"incorrectMessage":892,"question":909},"[{\"text\":\"市\",\"isCorrect\":false},{\"text\":\"町\",\"isCorrect\":false},{\"text\":\"村\",\"isCorrect\":true}]","長野県の市町村数の内訳は「19市23町35村」で、村がいちばん多いんです。","長野県の市の数、町の数、村の数をそれぞれ数えたとき、最も数が多いのはどれ？",{"title":20,"searchDepth":35,"depth":35,"links":911},[912,913,914],{"id":885,"depth":35,"text":885},{"id":896,"depth":35,"text":896},{"id":904,"depth":35,"text":904},[916],"地理","2024-03-17T00:00:00.000Z","信州の地理クイズpart1","/images/chiriquiz.jpg",{},"/posts/chiriquiz01",{"title":880,"description":918},"posts/chiriquiz01",[925,916,926],"社会","市町村","PFiByKYS4-CG2UMeir5LYiunFnyojJo7cDkdxJFNHaE",{"id":929,"title":930,"body":931,"categories":1492,"cross_post":215,"date":1494,"description":1495,"extension":218,"image":20,"meta":1496,"navigation":31,"note_id":215,"note_url":215,"path":1497,"private":221,"qiita_id":215,"qiita_url":215,"seo":1498,"stem":1499,"tags":1500,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1503},"posts/posts/gas-checkRakutenPayEmailsAndLogDaily.md","楽天payと楽天キャッシュの入出金を毎日GAS(google app script)で取得してみる",{"type":8,"value":932,"toc":1483},[933,938,941,944,947,950,958,961,964,968,979,1237,1239,1243,1253,1257,1438,1440,1444,1451,1470,1472,1475,1478,1481],[934,935,937],"h1",{"id":936},"gmailを自動解析楽天payと楽天キャッシュの利用情報をスプレッドシートに記録するスクリプト","Gmailを自動解析！楽天Payと楽天キャッシュの利用情報をスプレッドシートに記録するスクリプト",[11,939,940],{"id":940},"はじめに",[238,942,943],{},"日々の支出管理やキャッシュフローの可視化は大切ですよね？",[238,945,946],{},"僕は基本的に支払いは電子決済で済ませてるので大体の履歴はマネーフォワードに連携して",[238,948,949],{},"そこで見ているですが、実は楽天pay,PayPay,ANApayなどは連携していなく",[238,951,952,953,957],{},"アプリでしかみることができないので今回\n「楽天Pay」や「楽天キャッシュ」の利用履歴を自動で取得して、スプレッドシートに保存してBIで見れたら便利だと思いやってみました\n今回は ",[954,955,956],"strong",{},"Google Apps Script (GAS)"," を使って、Gmailから自動で利用情報を取得し、Googleスプレッドシートに記録するスクリプトを作成します。",[238,959,960],{},"また、基本的に楽天payの支払いを楽天キャッシュからしているので支払いとチャージ料方法を取得するコードもつくりました。",[962,963],"hr",{},[11,965,967],{"id":966},"_1-楽天pay版スクリプト","1. 楽天Pay版スクリプト",[304,969,970,973,976],{},[307,971,972],{},"Gmailの「楽天Payアプリご利用内容確認メール」を解析。",[307,974,975],{},"利用日時、店舗名、伝票番号、決済総額などを抽出。",[307,977,978],{},"データをGoogleスプレッドシートに自動で記録。",[15,980,982],{"className":17,"code":981,"language":19,"meta":20,"style":20},"\n\nfunction checkRakutenPayEmailsAndLogDaily() {\n  const sheetId = \"YOUR_SPREADSHEET_ID\"; // スプレッドシートIDを指定\n  const sheetName = \"楽天Payログ\"; // シート名を指定\n\n  const today = new Date();\n  today.setHours(0, 0, 0, 0);\n  const yesterday = new Date(today);\n  yesterday.setDate(today.getDate() - 1);\n  const startDate = Utilities.formatDate(yesterday, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n  const endDate = Utilities.formatDate(today, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n\n  const searchQuery = `from:no-reply@pay.rakuten.co.jp subject:\"楽天ペイアプリご利用内容確認メール\" after:${startDate} before:${endDate}`;\n  const sheet = SpreadsheetApp.openById(sheetId).getSheetByName(sheetName);\n  if (!sheet) throw new Error(`シート \"${sheetName}\" が見つかりません`);\n\n  const threads = GmailApp.search(searchQuery);\n  if (threads.length === 0) {\n    console.log(\"前日分の対象メールはありません。\");\n    return;\n  }\n\n  threads.forEach(thread => {\n    const messages = thread.getMessages();\n    messages.forEach(message => {\n      const body = message.getPlainBody();\n      let date, receiptNumber, store, totalAmount, points, paymentMethod;\n\n      const dateMatch = body.match(/ご利用日時\\s+([\\d/]+\\(.\\)\\s+[\\d:]+)/);\n      const receiptMatch = body.match(/伝票番号\\s+([A-Z0-9-]+)/);\n      const storeMatch = body.match(/ご利用店舗\\s+(.+)/);\n      const totalAmountMatch = body.match(/決済総額\\s+¥([\\d,]+)/);\n      const pointsMatch = body.match(/ポイント\\s+([\\d,]+)/);\n      const paymentMatch = body.match(/お取引内容\\s+(.+)/);\n\n      date = dateMatch ? dateMatch[1] : \"不明\";\n      receiptNumber = receiptMatch ? receiptMatch[1] : \"不明\";\n      store = storeMatch ? storeMatch[1].trim() : \"不明\";\n      totalAmount = totalAmountMatch ? totalAmountMatch[1].replace(/,/g, '') : \"0\";\n      points = pointsMatch ? pointsMatch[1] : \"0\";\n      paymentMethod = paymentMatch ? paymentMatch[1].trim() : \"不明\";\n\n      sheet.appendRow([new Date(), date, receiptNumber, store, `¥${totalAmount}`, points, paymentMethod]);\n    });\n  });\n\n  console.log(\"前日分の楽天ペイのメール内容をスプレッドシートに記録しました。\");\n}\n\n",[22,983,984,988,992,997,1002,1007,1011,1016,1021,1026,1031,1036,1041,1045,1050,1055,1060,1064,1069,1074,1079,1084,1089,1093,1098,1103,1108,1113,1118,1122,1127,1132,1138,1144,1150,1156,1161,1167,1173,1179,1185,1191,1197,1202,1208,1214,1220,1225,1231],{"__ignoreMap":20},[25,985,986],{"class":27,"line":28},[25,987,32],{"emptyLinePlaceholder":31},[25,989,990],{"class":27,"line":35},[25,991,32],{"emptyLinePlaceholder":31},[25,993,994],{"class":27,"line":41},[25,995,996],{},"function checkRakutenPayEmailsAndLogDaily() {\n",[25,998,999],{"class":27,"line":46},[25,1000,1001],{},"  const sheetId = \"YOUR_SPREADSHEET_ID\"; // スプレッドシートIDを指定\n",[25,1003,1004],{"class":27,"line":52},[25,1005,1006],{},"  const sheetName = \"楽天Payログ\"; // シート名を指定\n",[25,1008,1009],{"class":27,"line":58},[25,1010,32],{"emptyLinePlaceholder":31},[25,1012,1013],{"class":27,"line":63},[25,1014,1015],{},"  const today = new Date();\n",[25,1017,1018],{"class":27,"line":69},[25,1019,1020],{},"  today.setHours(0, 0, 0, 0);\n",[25,1022,1023],{"class":27,"line":75},[25,1024,1025],{},"  const yesterday = new Date(today);\n",[25,1027,1028],{"class":27,"line":80},[25,1029,1030],{},"  yesterday.setDate(today.getDate() - 1);\n",[25,1032,1033],{"class":27,"line":86},[25,1034,1035],{},"  const startDate = Utilities.formatDate(yesterday, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n",[25,1037,1038],{"class":27,"line":92},[25,1039,1040],{},"  const endDate = Utilities.formatDate(today, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n",[25,1042,1043],{"class":27,"line":97},[25,1044,32],{"emptyLinePlaceholder":31},[25,1046,1047],{"class":27,"line":103},[25,1048,1049],{},"  const searchQuery = `from:no-reply@pay.rakuten.co.jp subject:\"楽天ペイアプリご利用内容確認メール\" after:${startDate} before:${endDate}`;\n",[25,1051,1052],{"class":27,"line":109},[25,1053,1054],{},"  const sheet = SpreadsheetApp.openById(sheetId).getSheetByName(sheetName);\n",[25,1056,1057],{"class":27,"line":114},[25,1058,1059],{},"  if (!sheet) throw new Error(`シート \"${sheetName}\" が見つかりません`);\n",[25,1061,1062],{"class":27,"line":120},[25,1063,32],{"emptyLinePlaceholder":31},[25,1065,1066],{"class":27,"line":126},[25,1067,1068],{},"  const threads = GmailApp.search(searchQuery);\n",[25,1070,1071],{"class":27,"line":132},[25,1072,1073],{},"  if (threads.length === 0) {\n",[25,1075,1076],{"class":27,"line":138},[25,1077,1078],{},"    console.log(\"前日分の対象メールはありません。\");\n",[25,1080,1081],{"class":27,"line":144},[25,1082,1083],{},"    return;\n",[25,1085,1086],{"class":27,"line":150},[25,1087,1088],{},"  }\n",[25,1090,1091],{"class":27,"line":156},[25,1092,32],{"emptyLinePlaceholder":31},[25,1094,1095],{"class":27,"line":162},[25,1096,1097],{},"  threads.forEach(thread => {\n",[25,1099,1100],{"class":27,"line":168},[25,1101,1102],{},"    const messages = thread.getMessages();\n",[25,1104,1105],{"class":27,"line":174},[25,1106,1107],{},"    messages.forEach(message => {\n",[25,1109,1110],{"class":27,"line":180},[25,1111,1112],{},"      const body = message.getPlainBody();\n",[25,1114,1115],{"class":27,"line":186},[25,1116,1117],{},"      let date, receiptNumber, store, totalAmount, points, paymentMethod;\n",[25,1119,1120],{"class":27,"line":191},[25,1121,32],{"emptyLinePlaceholder":31},[25,1123,1124],{"class":27,"line":197},[25,1125,1126],{},"      const dateMatch = body.match(/ご利用日時\\s+([\\d/]+\\(.\\)\\s+[\\d:]+)/);\n",[25,1128,1129],{"class":27,"line":203},[25,1130,1131],{},"      const receiptMatch = body.match(/伝票番号\\s+([A-Z0-9-]+)/);\n",[25,1133,1135],{"class":27,"line":1134},32,[25,1136,1137],{},"      const storeMatch = body.match(/ご利用店舗\\s+(.+)/);\n",[25,1139,1141],{"class":27,"line":1140},33,[25,1142,1143],{},"      const totalAmountMatch = body.match(/決済総額\\s+¥([\\d,]+)/);\n",[25,1145,1147],{"class":27,"line":1146},34,[25,1148,1149],{},"      const pointsMatch = body.match(/ポイント\\s+([\\d,]+)/);\n",[25,1151,1153],{"class":27,"line":1152},35,[25,1154,1155],{},"      const paymentMatch = body.match(/お取引内容\\s+(.+)/);\n",[25,1157,1159],{"class":27,"line":1158},36,[25,1160,32],{"emptyLinePlaceholder":31},[25,1162,1164],{"class":27,"line":1163},37,[25,1165,1166],{},"      date = dateMatch ? dateMatch[1] : \"不明\";\n",[25,1168,1170],{"class":27,"line":1169},38,[25,1171,1172],{},"      receiptNumber = receiptMatch ? receiptMatch[1] : \"不明\";\n",[25,1174,1176],{"class":27,"line":1175},39,[25,1177,1178],{},"      store = storeMatch ? storeMatch[1].trim() : \"不明\";\n",[25,1180,1182],{"class":27,"line":1181},40,[25,1183,1184],{},"      totalAmount = totalAmountMatch ? totalAmountMatch[1].replace(/,/g, '') : \"0\";\n",[25,1186,1188],{"class":27,"line":1187},41,[25,1189,1190],{},"      points = pointsMatch ? pointsMatch[1] : \"0\";\n",[25,1192,1194],{"class":27,"line":1193},42,[25,1195,1196],{},"      paymentMethod = paymentMatch ? paymentMatch[1].trim() : \"不明\";\n",[25,1198,1200],{"class":27,"line":1199},43,[25,1201,32],{"emptyLinePlaceholder":31},[25,1203,1205],{"class":27,"line":1204},44,[25,1206,1207],{},"      sheet.appendRow([new Date(), date, receiptNumber, store, `¥${totalAmount}`, points, paymentMethod]);\n",[25,1209,1211],{"class":27,"line":1210},45,[25,1212,1213],{},"    });\n",[25,1215,1217],{"class":27,"line":1216},46,[25,1218,1219],{},"  });\n",[25,1221,1223],{"class":27,"line":1222},47,[25,1224,32],{"emptyLinePlaceholder":31},[25,1226,1228],{"class":27,"line":1227},48,[25,1229,1230],{},"  console.log(\"前日分の楽天ペイのメール内容をスプレッドシートに記録しました。\");\n",[25,1232,1234],{"class":27,"line":1233},49,[25,1235,1236],{},"}\n",[962,1238],{},[11,1240,1242],{"id":1241},"_2-楽天キャッシュ版スクリプト","2. 楽天キャッシュ版スクリプト",[304,1244,1245,1248,1251],{},[307,1246,1247],{},"Gmailの「楽天キャッシュチャージ完了メール」を解析。",[307,1249,1250],{},"取引日時、チャージ内容、金額を抽出。",[307,1252,978],{},[1254,1255,1256],"h3",{"id":1256},"スクリプトコード",[15,1258,1260],{"className":17,"code":1259,"language":19,"meta":20,"style":20},"function checkRakutenCashEmailsAndLogDaily() {\n  const sheetId = \"YOUR_SPREADSHEET_ID\"; // スプレッドシートIDを指定\n  const sheetName = \"楽天キャッシュログ\"; // シート名を指定\n\n  const today = new Date();\n  today.setHours(0, 0, 0, 0);\n  const yesterday = new Date(today);\n  yesterday.setDate(today.getDate() - 1);\n  const startDate = Utilities.formatDate(yesterday, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n  const endDate = Utilities.formatDate(today, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n\n  const searchQuery = `from:pointcharge@edy.rakuten.co.jp subject:\"【楽天キャッシュ】チャージ完了のお知らせ\" after:${startDate} before:${endDate}`;\n  const sheet = SpreadsheetApp.openById(sheetId).getSheetByName(sheetName);\n  if (!sheet) throw new Error(`シート \"${sheetName}\" が見つかりません`);\n\n  const threads = GmailApp.search(searchQuery);\n  if (threads.length === 0) {\n    console.log(\"前日分の対象メールはありません。\");\n    return;\n  }\n\n  threads.forEach(thread => {\n    const messages = thread.getMessages();\n    messages.forEach(message => {\n      const body = message.getPlainBody();\n      let transactionDate, content, amount;\n\n      const dateMatch = body.match(/\\[取引日時\\]\\s+([\\d/]+\\s+[\\d:]+)/);\n      const contentMatch = body.match(/\\[内容\\]\\s+(.+)/);\n      const amountMatch = body.match(/\\[金額\\]\\s+([\\d,]+)円/);\n\n      transactionDate = dateMatch ? dateMatch[1] : \"不明\";\n      content = contentMatch ? contentMatch[1].trim() : \"不明\";\n      amount = amountMatch ? amountMatch[1].replace(/,/g, '') : \"0\";\n\n      sheet.appendRow([new Date(), transactionDate, content, `¥${amount}`]);\n    });\n  });\n\n  console.log(\"前日分の楽天キャッシュのメール内容をスプレッドシートに記録しました。\");\n}\n\n",[22,1261,1262,1267,1271,1276,1280,1284,1288,1292,1296,1300,1304,1308,1313,1317,1321,1325,1329,1333,1337,1341,1345,1349,1353,1357,1361,1365,1370,1374,1379,1384,1389,1393,1398,1403,1408,1412,1417,1421,1425,1429,1434],{"__ignoreMap":20},[25,1263,1264],{"class":27,"line":28},[25,1265,1266],{},"function checkRakutenCashEmailsAndLogDaily() {\n",[25,1268,1269],{"class":27,"line":35},[25,1270,1001],{},[25,1272,1273],{"class":27,"line":41},[25,1274,1275],{},"  const sheetName = \"楽天キャッシュログ\"; // シート名を指定\n",[25,1277,1278],{"class":27,"line":46},[25,1279,32],{"emptyLinePlaceholder":31},[25,1281,1282],{"class":27,"line":52},[25,1283,1015],{},[25,1285,1286],{"class":27,"line":58},[25,1287,1020],{},[25,1289,1290],{"class":27,"line":63},[25,1291,1025],{},[25,1293,1294],{"class":27,"line":69},[25,1295,1030],{},[25,1297,1298],{"class":27,"line":75},[25,1299,1035],{},[25,1301,1302],{"class":27,"line":80},[25,1303,1040],{},[25,1305,1306],{"class":27,"line":86},[25,1307,32],{"emptyLinePlaceholder":31},[25,1309,1310],{"class":27,"line":92},[25,1311,1312],{},"  const searchQuery = `from:pointcharge@edy.rakuten.co.jp subject:\"【楽天キャッシュ】チャージ完了のお知らせ\" after:${startDate} before:${endDate}`;\n",[25,1314,1315],{"class":27,"line":97},[25,1316,1054],{},[25,1318,1319],{"class":27,"line":103},[25,1320,1059],{},[25,1322,1323],{"class":27,"line":109},[25,1324,32],{"emptyLinePlaceholder":31},[25,1326,1327],{"class":27,"line":114},[25,1328,1068],{},[25,1330,1331],{"class":27,"line":120},[25,1332,1073],{},[25,1334,1335],{"class":27,"line":126},[25,1336,1078],{},[25,1338,1339],{"class":27,"line":132},[25,1340,1083],{},[25,1342,1343],{"class":27,"line":138},[25,1344,1088],{},[25,1346,1347],{"class":27,"line":144},[25,1348,32],{"emptyLinePlaceholder":31},[25,1350,1351],{"class":27,"line":150},[25,1352,1097],{},[25,1354,1355],{"class":27,"line":156},[25,1356,1102],{},[25,1358,1359],{"class":27,"line":162},[25,1360,1107],{},[25,1362,1363],{"class":27,"line":168},[25,1364,1112],{},[25,1366,1367],{"class":27,"line":174},[25,1368,1369],{},"      let transactionDate, content, amount;\n",[25,1371,1372],{"class":27,"line":180},[25,1373,32],{"emptyLinePlaceholder":31},[25,1375,1376],{"class":27,"line":186},[25,1377,1378],{},"      const dateMatch = body.match(/\\[取引日時\\]\\s+([\\d/]+\\s+[\\d:]+)/);\n",[25,1380,1381],{"class":27,"line":191},[25,1382,1383],{},"      const contentMatch = body.match(/\\[内容\\]\\s+(.+)/);\n",[25,1385,1386],{"class":27,"line":197},[25,1387,1388],{},"      const amountMatch = body.match(/\\[金額\\]\\s+([\\d,]+)円/);\n",[25,1390,1391],{"class":27,"line":203},[25,1392,32],{"emptyLinePlaceholder":31},[25,1394,1395],{"class":27,"line":1134},[25,1396,1397],{},"      transactionDate = dateMatch ? dateMatch[1] : \"不明\";\n",[25,1399,1400],{"class":27,"line":1140},[25,1401,1402],{},"      content = contentMatch ? contentMatch[1].trim() : \"不明\";\n",[25,1404,1405],{"class":27,"line":1146},[25,1406,1407],{},"      amount = amountMatch ? amountMatch[1].replace(/,/g, '') : \"0\";\n",[25,1409,1410],{"class":27,"line":1152},[25,1411,32],{"emptyLinePlaceholder":31},[25,1413,1414],{"class":27,"line":1158},[25,1415,1416],{},"      sheet.appendRow([new Date(), transactionDate, content, `¥${amount}`]);\n",[25,1418,1419],{"class":27,"line":1163},[25,1420,1213],{},[25,1422,1423],{"class":27,"line":1169},[25,1424,1219],{},[25,1426,1427],{"class":27,"line":1175},[25,1428,32],{"emptyLinePlaceholder":31},[25,1430,1431],{"class":27,"line":1181},[25,1432,1433],{},"  console.log(\"前日分の楽天キャッシュのメール内容をスプレッドシートに記録しました。\");\n",[25,1435,1436],{"class":27,"line":1187},[25,1437,1236],{},[962,1439],{},[11,1441,1443],{"id":1442},"_3-トリガー設定","3. トリガー設定",[238,1445,1446,1447,1450],{},"どちらのスクリプトも毎日自動実行するには、Google Apps Script の ",[954,1448,1449],{},"トリガー機能"," を活用します。",[1452,1453,1454,1457,1460,1467],"ol",{},[307,1455,1456],{},"スクリプトエディタを開き、時計マーク（トリガー設定）をクリック。",[307,1458,1459],{},"「トリガーを追加」を選択。",[307,1461,1462,1463,1466],{},"必要なスクリプト関数（例: ",[22,1464,1465],{},"checkRakutenPayEmailsAndLogDaily","）を選択。",[307,1468,1469],{},"実行タイミングを「日付ベース」「午前1時」などに設定。",[962,1471],{},[11,1473,1474],{"id":1474},"終わりに",[238,1476,1477],{},"これで、毎日の支出やチャージ状況を取得できそうです。",[238,1479,1480],{},"これを元にBIなどでみるかもしくはマネーフォワードに自動的にスクレイピングのライブラリを使って登録するのもいいかもしれません。",[208,1482,210],{},{"title":20,"searchDepth":35,"depth":35,"links":1484},[1485,1486,1487,1490,1491],{"id":940,"depth":35,"text":940},{"id":966,"depth":35,"text":967},{"id":1241,"depth":35,"text":1242,"children":1488},[1489],{"id":1256,"depth":41,"text":1256},{"id":1442,"depth":35,"text":1443},{"id":1474,"depth":35,"text":1474},[1493],"IT","2024-12-11T00:00:00.000Z","Google Apps ScriptでGmailを自動解析し、楽天Pay・楽天キャッシュの利用履歴をスプレッドシートに毎日記録するスクリプトを作った話",{},"/posts/gas-checkrakutenpayemailsandlogdaily",{"title":930,"description":1495},"posts/gas-checkRakutenPayEmailsAndLogDaily",[1501,1502],"Javascript","Google App script","0R_IfRey-_WoLH5asXbuL5i7WHsCautKTQE8vrJF2GY",{"id":1505,"title":1506,"body":1507,"categories":1632,"cross_post":215,"date":1633,"description":1634,"extension":218,"image":20,"meta":1635,"navigation":31,"note_id":215,"note_url":215,"path":1636,"private":221,"qiita_id":215,"qiita_url":215,"seo":1637,"stem":1638,"tags":1639,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1642},"posts/posts/gas-cloud-function-auth.md","Google App Script から Could Functions を実行するために",{"type":8,"value":1508,"toc":1628},[1509,1512,1515,1518,1521,1524,1535,1538,1591,1605,1612,1619,1626],[1254,1510,1511],{"id":1511},"経緯",[238,1513,1514],{},"Google App Scriptだけでは外部ライブラリを使ったりnpmを使ったりするのが難しいの",[238,1516,1517],{},"Cloud Functions で処理してデータを返してもらって作ろうと思った時の認証について",[238,1519,1520],{},"ひとまず簡易なやり方で",[11,1522,1523],{"id":1523},"結論",[304,1525,1526,1529,1532],{},[307,1527,1528],{},"GCPでOAuth 同意画面を作成",[307,1530,1531],{},"Google App Script側をOAuth 同意画面作ったGCPプロジェクト作成",[307,1533,1534],{},"appscript.jsonの編集してOAuthスコープの設定",[238,1536,1537],{},"あと下記のようなコードで認証できる",[15,1539,1541],{"className":17,"code":1540,"language":19,"meta":20,"style":20},"\nfunction myFunction() {\n  const url = \"https://xxxxxx.cloudfunctions.net/xxxxx\"\n  const res = UrlFetchApp.fetch(url, {\n    headers: {\n      Authorization: `Bearer ${ScriptApp.getIdentityToken()}`\n    }\n  })\n  console.log(res.getContentText()) // Fnctiionの結果\n}\n\n\n",[22,1542,1543,1547,1552,1557,1562,1567,1572,1577,1582,1587],{"__ignoreMap":20},[25,1544,1545],{"class":27,"line":28},[25,1546,32],{"emptyLinePlaceholder":31},[25,1548,1549],{"class":27,"line":35},[25,1550,1551],{},"function myFunction() {\n",[25,1553,1554],{"class":27,"line":41},[25,1555,1556],{},"  const url = \"https://xxxxxx.cloudfunctions.net/xxxxx\"\n",[25,1558,1559],{"class":27,"line":46},[25,1560,1561],{},"  const res = UrlFetchApp.fetch(url, {\n",[25,1563,1564],{"class":27,"line":52},[25,1565,1566],{},"    headers: {\n",[25,1568,1569],{"class":27,"line":58},[25,1570,1571],{},"      Authorization: `Bearer ${ScriptApp.getIdentityToken()}`\n",[25,1573,1574],{"class":27,"line":63},[25,1575,1576],{},"    }\n",[25,1578,1579],{"class":27,"line":69},[25,1580,1581],{},"  })\n",[25,1583,1584],{"class":27,"line":75},[25,1585,1586],{},"  console.log(res.getContentText()) // Fnctiionの結果\n",[25,1588,1589],{"class":27,"line":80},[25,1590,1236],{},[238,1592,1593,1600],{},[1594,1595,1599],"a",{"href":1596,"rel":1597},"https://qiita.com/venect_qiita/items/26634a32037e40a585089%C2%A5",[1598],"nofollow","GAS（GoogleAppsScript）から認証付きのCloud Functionsをサービスアカウントを使用して呼び出す #GoogleCloud - Qiita",[1594,1601,1604],{"href":1602,"rel":1603},"https://qiita.com/kyhei_0727/items/d6b1cb33ce90b99e8129#oauth%E5%90%8C%E6%84%8F%E7%94%BB%E9%9D%A2%E3%81%AE%E4%BD%9C%E6%88%909%C2%A5",[1598],"GASから認証付きのCloud Functionsを実行する。 #GoogleCloud - Qiita",[238,1606,1607],{},[1594,1608,1611],{"href":1609,"rel":1610},"https://kkuchima.wordpress.com/2020/12/30/google-apps-script-gas-%E3%81%8B%E3%82%89-cloud-functions-%E3%81%AB%E3%82%A2%E3%82%AF%E3%82%BB%E3%82%B9%E3%81%99%E3%82%8B/9%C2%A5",[1598],"Google Apps Script (GAS) から Cloud Functions に認証付きでアクセスする – kkuchima memo",[238,1613,1614],{},[1594,1615,1618],{"href":1616,"rel":1617},"https://link-and-motivation.hatenablog.com/entry/2024/04/10/1200009%C2%A5",[1598],"Google Apps Script で書かれたアドオンのバックエンドを Cloud Run に移行した話 - Link and Motivation Developers' Blog",[238,1620,1621],{},[1594,1622,1625],{"href":1623,"rel":1624},"https://qiita.com/akira-yp/items/e3cd9d4eefb8f5238edb9%C2%A5",[1598],"GAS + CloudFunctionsでVisionAPIの処理結果をスプレッドシートに出力する #GoogleAppsScript - Qiita",[208,1627,210],{},{"title":20,"searchDepth":35,"depth":35,"links":1629},[1630,1631],{"id":1511,"depth":41,"text":1511},{"id":1523,"depth":35,"text":1523},[1493],"2024-11-01T00:00:00.000Z","Google Apps ScriptからCloud Functionsを呼び出す際のOAuth認証設定を簡易なやり方でまとめたメモ",{},"/posts/gas-cloud-function-auth",{"title":1506,"description":1634},"posts/gas-cloud-function-auth",[1493,1502,1640,1641],"GCP","Cloud Function","Bjg58cvNCM_31CvuZtTK0qCMWZXs9p9G00g1HTRCNTg",{"id":1644,"title":1645,"body":1646,"categories":1818,"cross_post":215,"date":1819,"description":1820,"extension":218,"image":20,"meta":1821,"navigation":31,"note_id":215,"note_url":215,"path":1822,"private":221,"qiita_id":215,"qiita_url":215,"seo":1823,"stem":1824,"tags":1825,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1826},"posts/posts/google-drive-csv-get.md","google drive csv 取込結合 スプレッドシート書き込み",{"type":8,"value":1647,"toc":1816},[1648,1814],[15,1649,1651],{"className":17,"code":1650,"language":19,"meta":20,"style":20},"function importData() {\n\n  // 対象フォルダを指定\n  const ss = SpreadsheetApp.getActiveSpreadsheet();\n  const sheet = ss.getSheetByName(\"data\"); //シート名\n  const folder = DriveApp.getFolderById('xxxxx'); //フォルダパスを指定\n\n\n\n  sheet.getRange(2, 1, sheet.getLastRow(), sheet.getLastColumn()).clear()\n\n  const files = folder.getFiles();\n  let sortFiles = []\n  while (files.hasNext()) {\n    sortFiles.push(files.next());\n  }\n  sortFiles.sort(function (a, b) { if (a.getName() > b.getName()) { return 1 } else { return -1 } })\n\n\n  let allSetData = []\n  for (const iterator of sortFiles) {\n    const file = iterator;\n    // 取込処理\n    const data = file.getBlob().getDataAsString(\"UTF-8\");\n    const csv = Utilities.parseCsv(data);\n    const setData = csv\n    setData.shift()\n    setData.reverse()\n    const lastRow = sheet.getLastRow();\n    Logger.log(setData)\n\n    allSetData = [...allSetData, ...setData]\n    // CSV書込\n    if (setData.length > 0) sheet.getRange(lastRow + 1, 1, setData.length, setData[0].length).setValues(setData);\n\n\n",[22,1652,1653,1658,1662,1667,1672,1677,1682,1686,1690,1694,1699,1703,1708,1713,1718,1723,1727,1732,1736,1740,1745,1750,1755,1760,1765,1770,1775,1780,1785,1790,1795,1799,1804,1809],{"__ignoreMap":20},[25,1654,1655],{"class":27,"line":28},[25,1656,1657],{},"function importData() {\n",[25,1659,1660],{"class":27,"line":35},[25,1661,32],{"emptyLinePlaceholder":31},[25,1663,1664],{"class":27,"line":41},[25,1665,1666],{},"  // 対象フォルダを指定\n",[25,1668,1669],{"class":27,"line":46},[25,1670,1671],{},"  const ss = SpreadsheetApp.getActiveSpreadsheet();\n",[25,1673,1674],{"class":27,"line":52},[25,1675,1676],{},"  const sheet = ss.getSheetByName(\"data\"); //シート名\n",[25,1678,1679],{"class":27,"line":58},[25,1680,1681],{},"  const folder = DriveApp.getFolderById('xxxxx'); //フォルダパスを指定\n",[25,1683,1684],{"class":27,"line":63},[25,1685,32],{"emptyLinePlaceholder":31},[25,1687,1688],{"class":27,"line":69},[25,1689,32],{"emptyLinePlaceholder":31},[25,1691,1692],{"class":27,"line":75},[25,1693,32],{"emptyLinePlaceholder":31},[25,1695,1696],{"class":27,"line":80},[25,1697,1698],{},"  sheet.getRange(2, 1, sheet.getLastRow(), sheet.getLastColumn()).clear()\n",[25,1700,1701],{"class":27,"line":86},[25,1702,32],{"emptyLinePlaceholder":31},[25,1704,1705],{"class":27,"line":92},[25,1706,1707],{},"  const files = folder.getFiles();\n",[25,1709,1710],{"class":27,"line":97},[25,1711,1712],{},"  let sortFiles = []\n",[25,1714,1715],{"class":27,"line":103},[25,1716,1717],{},"  while (files.hasNext()) {\n",[25,1719,1720],{"class":27,"line":109},[25,1721,1722],{},"    sortFiles.push(files.next());\n",[25,1724,1725],{"class":27,"line":114},[25,1726,1088],{},[25,1728,1729],{"class":27,"line":120},[25,1730,1731],{},"  sortFiles.sort(function (a, b) { if (a.getName() > b.getName()) { return 1 } else { return -1 } })\n",[25,1733,1734],{"class":27,"line":126},[25,1735,32],{"emptyLinePlaceholder":31},[25,1737,1738],{"class":27,"line":132},[25,1739,32],{"emptyLinePlaceholder":31},[25,1741,1742],{"class":27,"line":138},[25,1743,1744],{},"  let allSetData = []\n",[25,1746,1747],{"class":27,"line":144},[25,1748,1749],{},"  for (const iterator of sortFiles) {\n",[25,1751,1752],{"class":27,"line":150},[25,1753,1754],{},"    const file = iterator;\n",[25,1756,1757],{"class":27,"line":156},[25,1758,1759],{},"    // 取込処理\n",[25,1761,1762],{"class":27,"line":162},[25,1763,1764],{},"    const data = file.getBlob().getDataAsString(\"UTF-8\");\n",[25,1766,1767],{"class":27,"line":168},[25,1768,1769],{},"    const csv = Utilities.parseCsv(data);\n",[25,1771,1772],{"class":27,"line":174},[25,1773,1774],{},"    const setData = csv\n",[25,1776,1777],{"class":27,"line":180},[25,1778,1779],{},"    setData.shift()\n",[25,1781,1782],{"class":27,"line":186},[25,1783,1784],{},"    setData.reverse()\n",[25,1786,1787],{"class":27,"line":191},[25,1788,1789],{},"    const lastRow = sheet.getLastRow();\n",[25,1791,1792],{"class":27,"line":197},[25,1793,1794],{},"    Logger.log(setData)\n",[25,1796,1797],{"class":27,"line":203},[25,1798,32],{"emptyLinePlaceholder":31},[25,1800,1801],{"class":27,"line":1134},[25,1802,1803],{},"    allSetData = [...allSetData, ...setData]\n",[25,1805,1806],{"class":27,"line":1140},[25,1807,1808],{},"    // CSV書込\n",[25,1810,1811],{"class":27,"line":1146},[25,1812,1813],{},"    if (setData.length > 0) sheet.getRange(lastRow + 1, 1, setData.length, setData[0].length).setValues(setData);\n",[208,1815,210],{},{"title":20,"searchDepth":35,"depth":35,"links":1817},[],[1493],"2024-08-08T00:00:00.000Z","Google Apps ScriptでGoogle Driveフォルダ内のCSVファイルをまとめて読み込み、スプレッドシートに書き込むコード",{},"/posts/google-drive-csv-get",{"title":1645,"description":1820},"posts/google-drive-csv-get",[1640,1493],"DWeXhfhJNlWzIfjs3OG6Ixn_U6VO6QyZpwPUHFt7CgU",{"id":1828,"title":1829,"body":1830,"categories":2016,"cross_post":215,"date":2017,"description":2018,"extension":218,"image":20,"meta":2019,"navigation":31,"note_id":215,"note_url":215,"path":2020,"private":221,"qiita_id":215,"qiita_url":215,"seo":2021,"stem":2022,"tags":2023,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":2024},"posts/posts/google-drive-csv-write.md","google drive csv　 オブジェクトからcsv ファイルがない場合保存",{"type":8,"value":1831,"toc":2014},[1832,2012],[15,1833,1835],{"className":17,"code":1834,"language":19,"meta":20,"style":20},"\nconst sample = { id:1 ,name:\"aa\"} // サンプル実際のデータに直して\n\nconst fileName = \"test.csv\"\n\n\n\nconst blob = createBlob(csv, fileName)\n\ndeleteAndWriteDrive(blob, folderId, fileName)\n\nfunction deleteAndWriteDrive(csvBlob, folderId,fileName) {\n  const drive = DriveApp.getFolderById(folderId);\n  const files = drive.getFiles();\n  let sortFiles = []\n  while (files.hasNext()) {\n    sortFiles.push(files.next());\n  }\n  sortFiles.sort(function (a, b) { if (a.getName() > b.getName()) { return 1 } else { return -1 } })\n\n  for (const iterator of sortFiles) {\n    const file = iterator;\n    if (file.getName() === fileName) {\n      hasFileName = file.getName()\n      console.log(`${hasFileName}フォルダが存在します。`)\n      file.setTrashed(true)\n      break\n    }\n  }\n  \n  drive.createFile(csvBlob);\n}\n\nfunction createBlob(csv, fileName) {\n  const contentType = 'text/csv';\n  const charset = 'utf-8';\n  const blob = Utilities.newBlob('', contentType, fileName).setDataFromString(csv, charset);\n  return blob;\n}\n\n",[22,1836,1837,1841,1846,1850,1855,1859,1863,1867,1872,1876,1881,1885,1890,1895,1900,1904,1908,1912,1916,1920,1924,1928,1932,1937,1942,1947,1952,1957,1961,1965,1970,1975,1979,1983,1988,1993,1998,2003,2008],{"__ignoreMap":20},[25,1838,1839],{"class":27,"line":28},[25,1840,32],{"emptyLinePlaceholder":31},[25,1842,1843],{"class":27,"line":35},[25,1844,1845],{},"const sample = { id:1 ,name:\"aa\"} // サンプル実際のデータに直して\n",[25,1847,1848],{"class":27,"line":41},[25,1849,32],{"emptyLinePlaceholder":31},[25,1851,1852],{"class":27,"line":46},[25,1853,1854],{},"const fileName = \"test.csv\"\n",[25,1856,1857],{"class":27,"line":52},[25,1858,32],{"emptyLinePlaceholder":31},[25,1860,1861],{"class":27,"line":58},[25,1862,32],{"emptyLinePlaceholder":31},[25,1864,1865],{"class":27,"line":63},[25,1866,32],{"emptyLinePlaceholder":31},[25,1868,1869],{"class":27,"line":69},[25,1870,1871],{},"const blob = createBlob(csv, fileName)\n",[25,1873,1874],{"class":27,"line":75},[25,1875,32],{"emptyLinePlaceholder":31},[25,1877,1878],{"class":27,"line":80},[25,1879,1880],{},"deleteAndWriteDrive(blob, folderId, fileName)\n",[25,1882,1883],{"class":27,"line":86},[25,1884,32],{"emptyLinePlaceholder":31},[25,1886,1887],{"class":27,"line":92},[25,1888,1889],{},"function deleteAndWriteDrive(csvBlob, folderId,fileName) {\n",[25,1891,1892],{"class":27,"line":97},[25,1893,1894],{},"  const drive = DriveApp.getFolderById(folderId);\n",[25,1896,1897],{"class":27,"line":103},[25,1898,1899],{},"  const files = drive.getFiles();\n",[25,1901,1902],{"class":27,"line":109},[25,1903,1712],{},[25,1905,1906],{"class":27,"line":114},[25,1907,1717],{},[25,1909,1910],{"class":27,"line":120},[25,1911,1722],{},[25,1913,1914],{"class":27,"line":126},[25,1915,1088],{},[25,1917,1918],{"class":27,"line":132},[25,1919,1731],{},[25,1921,1922],{"class":27,"line":138},[25,1923,32],{"emptyLinePlaceholder":31},[25,1925,1926],{"class":27,"line":144},[25,1927,1749],{},[25,1929,1930],{"class":27,"line":150},[25,1931,1754],{},[25,1933,1934],{"class":27,"line":156},[25,1935,1936],{},"    if (file.getName() === fileName) {\n",[25,1938,1939],{"class":27,"line":162},[25,1940,1941],{},"      hasFileName = file.getName()\n",[25,1943,1944],{"class":27,"line":168},[25,1945,1946],{},"      console.log(`${hasFileName}フォルダが存在します。`)\n",[25,1948,1949],{"class":27,"line":174},[25,1950,1951],{},"      file.setTrashed(true)\n",[25,1953,1954],{"class":27,"line":180},[25,1955,1956],{},"      break\n",[25,1958,1959],{"class":27,"line":186},[25,1960,1576],{},[25,1962,1963],{"class":27,"line":191},[25,1964,1088],{},[25,1966,1967],{"class":27,"line":197},[25,1968,1969],{},"  \n",[25,1971,1972],{"class":27,"line":203},[25,1973,1974],{},"  drive.createFile(csvBlob);\n",[25,1976,1977],{"class":27,"line":1134},[25,1978,1236],{},[25,1980,1981],{"class":27,"line":1140},[25,1982,32],{"emptyLinePlaceholder":31},[25,1984,1985],{"class":27,"line":1146},[25,1986,1987],{},"function createBlob(csv, fileName) {\n",[25,1989,1990],{"class":27,"line":1152},[25,1991,1992],{},"  const contentType = 'text/csv';\n",[25,1994,1995],{"class":27,"line":1158},[25,1996,1997],{},"  const charset = 'utf-8';\n",[25,1999,2000],{"class":27,"line":1163},[25,2001,2002],{},"  const blob = Utilities.newBlob('', contentType, fileName).setDataFromString(csv, charset);\n",[25,2004,2005],{"class":27,"line":1169},[25,2006,2007],{},"  return blob;\n",[25,2009,2010],{"class":27,"line":1175},[25,2011,1236],{},[208,2013,210],{},{"title":20,"searchDepth":35,"depth":35,"links":2015},[],[1493],"2024-03-06T00:00:00.000Z","Google Apps Scriptでオブジェクトから生成したCSVを、同名ファイルの重複を避けつつGoogle Driveへ保存するコード",{},"/posts/google-drive-csv-write",{"title":1829,"description":2018},"posts/google-drive-csv-write",[1640,1493],"BnqTqYOrdODaTUComV4rb1dvhnSnlzw_9ISV36xH4mc",{"id":2026,"title":2027,"body":2028,"categories":2284,"cross_post":215,"date":2285,"description":2286,"extension":218,"image":20,"meta":2287,"navigation":31,"note_id":215,"note_url":215,"path":2288,"private":221,"qiita_id":215,"qiita_url":215,"seo":2289,"stem":2290,"tags":2291,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":2292},"posts/posts/js-array-count-max.md","javascript 配列 同じ要素数カウント、最大出力",{"type":8,"value":2029,"toc":2281},[2030,2263,2266,2272,2278],[15,2031,2033],{"className":572,"code":2032,"language":574,"meta":20,"style":20},"const array = [1, 1, 1, 2, 2, 3];\n\nconst map = array.reduce(\n  (acc, curr) => acc.set(curr, (acc.get(curr) || 0) + 1),\n  new Map()\n);\n\nconsole.log([...map.keys()]); // [1, 2, 3]\nconsole.log([...map.values()]); // [3, 2, 1]\nconsole.log([...map.entries()]); // [[1, 3], [2, 2], [3, 1]]\n\nconst arrayCountMax = Math.max(...map.values()) //3\n",[22,2034,2035,2076,2080,2098,2147,2157,2162,2166,2190,2210,2230,2234],{"__ignoreMap":20},[25,2036,2037,2039,2042,2044,2047,2050,2053,2055,2057,2059,2061,2064,2066,2068,2070,2073],{"class":27,"line":28},[25,2038,599],{"class":598},[25,2040,2041],{"class":602}," array",[25,2043,606],{"class":598},[25,2045,2046],{"class":581}," [",[25,2048,2049],{"class":602},"1",[25,2051,2052],{"class":581},", ",[25,2054,2049],{"class":602},[25,2056,2052],{"class":581},[25,2058,2049],{"class":602},[25,2060,2052],{"class":581},[25,2062,2063],{"class":602},"2",[25,2065,2052],{"class":581},[25,2067,2063],{"class":602},[25,2069,2052],{"class":581},[25,2071,2072],{"class":602},"3",[25,2074,2075],{"class":581},"];\n",[25,2077,2078],{"class":27,"line":35},[25,2079,32],{"emptyLinePlaceholder":31},[25,2081,2082,2084,2087,2089,2092,2095],{"class":27,"line":41},[25,2083,599],{"class":598},[25,2085,2086],{"class":602}," map",[25,2088,606],{"class":598},[25,2090,2091],{"class":581}," array.",[25,2093,2094],{"class":585},"reduce",[25,2096,2097],{"class":581},"(\n",[25,2099,2100,2103,2106,2108,2111,2113,2115,2118,2121,2124,2127,2130,2133,2136,2138,2141,2144],{"class":27,"line":46},[25,2101,2102],{"class":581},"  (",[25,2104,2105],{"class":695},"acc",[25,2107,2052],{"class":581},[25,2109,2110],{"class":695},"curr",[25,2112,699],{"class":581},[25,2114,702],{"class":598},[25,2116,2117],{"class":581}," acc.",[25,2119,2120],{"class":585},"set",[25,2122,2123],{"class":581},"(curr, (acc.",[25,2125,2126],{"class":585},"get",[25,2128,2129],{"class":581},"(curr) ",[25,2131,2132],{"class":598},"||",[25,2134,2135],{"class":602}," 0",[25,2137,699],{"class":581},[25,2139,2140],{"class":598},"+",[25,2142,2143],{"class":602}," 1",[25,2145,2146],{"class":581},"),\n",[25,2148,2149,2152,2155],{"class":27,"line":52},[25,2150,2151],{"class":598},"  new",[25,2153,2154],{"class":585}," Map",[25,2156,615],{"class":581},[25,2158,2159],{"class":27,"line":58},[25,2160,2161],{"class":581},");\n",[25,2163,2164],{"class":27,"line":63},[25,2165,32],{"emptyLinePlaceholder":31},[25,2167,2168,2170,2172,2175,2178,2181,2184,2187],{"class":27,"line":69},[25,2169,662],{"class":581},[25,2171,665],{"class":585},[25,2173,2174],{"class":581},"([",[25,2176,2177],{"class":598},"...",[25,2179,2180],{"class":581},"map.",[25,2182,2183],{"class":585},"keys",[25,2185,2186],{"class":581},"()]); ",[25,2188,2189],{"class":656},"// [1, 2, 3]\n",[25,2191,2192,2194,2196,2198,2200,2202,2205,2207],{"class":27,"line":75},[25,2193,662],{"class":581},[25,2195,665],{"class":585},[25,2197,2174],{"class":581},[25,2199,2177],{"class":598},[25,2201,2180],{"class":581},[25,2203,2204],{"class":585},"values",[25,2206,2186],{"class":581},[25,2208,2209],{"class":656},"// [3, 2, 1]\n",[25,2211,2212,2214,2216,2218,2220,2222,2225,2227],{"class":27,"line":80},[25,2213,662],{"class":581},[25,2215,665],{"class":585},[25,2217,2174],{"class":581},[25,2219,2177],{"class":598},[25,2221,2180],{"class":581},[25,2223,2224],{"class":585},"entries",[25,2226,2186],{"class":581},[25,2228,2229],{"class":656},"// [[1, 3], [2, 2], [3, 1]]\n",[25,2231,2232],{"class":27,"line":86},[25,2233,32],{"emptyLinePlaceholder":31},[25,2235,2236,2238,2241,2243,2246,2249,2251,2253,2255,2257,2260],{"class":27,"line":92},[25,2237,599],{"class":598},[25,2239,2240],{"class":602}," arrayCountMax",[25,2242,606],{"class":598},[25,2244,2245],{"class":581}," Math.",[25,2247,2248],{"class":585},"max",[25,2250,640],{"class":581},[25,2252,2177],{"class":598},[25,2254,2180],{"class":581},[25,2256,2204],{"class":585},[25,2258,2259],{"class":581},"()) ",[25,2261,2262],{"class":656},"//3\n",[1254,2264,2265],{"id":2265},"参考",[238,2267,2268],{},[1594,2269,2270],{"href":2270,"rel":2271},"https://qiita.com/saka212/items/408bb17dddefc09004c8",[1598],[238,2273,2274],{},[1594,2275,2276],{"href":2276,"rel":2277},"https://pote-chil.com/blog/count-duplicate-array-item",[1598],[208,2279,2280],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":20,"searchDepth":35,"depth":35,"links":2282},[2283],{"id":2265,"depth":41,"text":2265},[1493],"2023-11-28T00:00:00.000Z","JavaScriptで配列内の要素ごとの出現回数を数え、最も多く出現する回数を求めるコードのメモ",{},"/posts/js-array-count-max",{"title":2027,"description":2286},"posts/js-array-count-max",[1493,1501],"8I4Gi8Rb3KSJmwp7Hf2MmCMk-KAxC6CH7GYypAtmW48",{"id":2294,"title":2295,"body":2296,"categories":4509,"cross_post":215,"date":4510,"description":4511,"extension":218,"image":20,"meta":4512,"navigation":31,"note_id":215,"note_url":215,"path":4513,"private":221,"qiita_id":215,"qiita_url":215,"seo":4514,"stem":4515,"tags":4516,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":4519},"posts/posts/notion-to-google-calender-1103.md","NotionタスクとGoogleカレンダーの同期システムを作る",{"type":8,"value":2297,"toc":4482},[2298,2300,2303,2306,2309,2312,2326,2329,2343,2346,2350,2353,2393,2397,2400,2479,2482,2566,2570,2573,2640,2644,2647,2705,2709,2810,2813,2817,2828,2832,2843,2847,2914,2917,2920,2923,2937,2940,3003,4402,4405,4446,4448,4451,4454,4457,4480],[11,2299,940],{"id":940},[238,2301,2302],{},"NotionのタスクをGoogleカレンダーと自動で同期させるシステムの実装方法を紹介します。このシステムにより、Notionで管理しているタスクの期限日を自動的にGoogleカレンダーに反映させることができます。ただしGoogleカレンダーの変更をNotionに反映することは想定していません。",[238,2304,2305],{},"また、完了したタスクはGoogleカレンダータスクを同期しているカレンダーとは別のカレンダに移動させるようにしています。",[11,2307,2308],{"id":2308},"システムの概要",[1254,2310,2311],{"id":2311},"主な機能",[304,2313,2314,2317,2320,2323],{},[307,2315,2316],{},"Notionの新規タスクを自動的にGoogleカレンダーに追加",[307,2318,2319],{},"タスクの更新（タイトル、期限）をカレンダーに反映",[307,2321,2322],{},"完了したタスクのカレンダーイベントを自動削除",[307,2324,2325],{},"定期的に同期",[1254,2327,2328],{"id":2328},"必要な準備",[1452,2330,2331,2334,2337,2340],{},[307,2332,2333],{},"Notion API キー",[307,2335,2336],{},"Notionデータベースの設定",[307,2338,2339],{},"Googleカレンダー",[307,2341,2342],{},"Google Apps Script環境",[11,2344,2345],{"id":2345},"実装方法",[1254,2347,2349],{"id":2348},"_1-設定","1. 設定",[238,2351,2352],{},"必要な認証情報とIDを設定します：",[15,2354,2356],{"className":17,"code":2355,"language":19,"meta":20,"style":20},"const CONFIG = {\n  NOTION_API_KEY: 'your-notion-api-key',\n  NOTION_DATABASE_ID: 'your-database-id',\n  CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  DONE_CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  NOTION_VERSION: '2022-06-28'\n};\n",[22,2357,2358,2363,2368,2373,2378,2383,2388],{"__ignoreMap":20},[25,2359,2360],{"class":27,"line":28},[25,2361,2362],{},"const CONFIG = {\n",[25,2364,2365],{"class":27,"line":35},[25,2366,2367],{},"  NOTION_API_KEY: 'your-notion-api-key',\n",[25,2369,2370],{"class":27,"line":41},[25,2371,2372],{},"  NOTION_DATABASE_ID: 'your-database-id',\n",[25,2374,2375],{"class":27,"line":46},[25,2376,2377],{},"  CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n",[25,2379,2380],{"class":27,"line":52},[25,2381,2382],{},"  DONE_CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n",[25,2384,2385],{"class":27,"line":58},[25,2386,2387],{},"  NOTION_VERSION: '2022-06-28'\n",[25,2389,2390],{"class":27,"line":63},[25,2391,2392],{},"};\n",[1254,2394,2396],{"id":2395},"_2-notionとの連携","2. Notionとの連携",[1254,2398,2399],{"id":2399},"タスク取得",[15,2401,2403],{"className":17,"code":2402,"language":19,"meta":20,"style":20},"// Notionからタスク一覧を取得\nfunction getNotionTasks() {\n  const url = `https://api.notion.com/v1/databases/${CONFIG.NOTION_DATABASE_ID}/query`;\n  const response = UrlFetchApp.fetch(url, {\n    method: 'POST',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      sorts: [\n        {\n          property: 'DueDate', // 日付プロパティ名\n          direction: 'descending' // 昇順にソート（降順の場合は'descending'に変更）\n        }\n      ],\n    })\n  });\n\n",[22,2404,2405,2410,2415,2420,2425,2430,2435,2440,2445,2450,2455,2460,2465,2470,2475],{"__ignoreMap":20},[25,2406,2407],{"class":27,"line":28},[25,2408,2409],{},"// Notionからタスク一覧を取得\n",[25,2411,2412],{"class":27,"line":35},[25,2413,2414],{},"function getNotionTasks() {\n",[25,2416,2417],{"class":27,"line":41},[25,2418,2419],{},"  const url = `https://api.notion.com/v1/databases/${CONFIG.NOTION_DATABASE_ID}/query`;\n",[25,2421,2422],{"class":27,"line":46},[25,2423,2424],{},"  const response = UrlFetchApp.fetch(url, {\n",[25,2426,2427],{"class":27,"line":52},[25,2428,2429],{},"    method: 'POST',\n",[25,2431,2432],{"class":27,"line":58},[25,2433,2434],{},"    headers: NOTION_HEADERS,\n",[25,2436,2437],{"class":27,"line":63},[25,2438,2439],{},"    payload: JSON.stringify({\n",[25,2441,2442],{"class":27,"line":69},[25,2443,2444],{},"      sorts: [\n",[25,2446,2447],{"class":27,"line":75},[25,2448,2449],{},"        {\n",[25,2451,2452],{"class":27,"line":80},[25,2453,2454],{},"          property: 'DueDate', // 日付プロパティ名\n",[25,2456,2457],{"class":27,"line":86},[25,2458,2459],{},"          direction: 'descending' // 昇順にソート（降順の場合は'descending'に変更）\n",[25,2461,2462],{"class":27,"line":92},[25,2463,2464],{},"        }\n",[25,2466,2467],{"class":27,"line":97},[25,2468,2469],{},"      ],\n",[25,2471,2472],{"class":27,"line":103},[25,2473,2474],{},"    })\n",[25,2476,2477],{"class":27,"line":109},[25,2478,1219],{},[1254,2480,2481],{"id":2481},"タスク更新",[15,2483,2485],{"className":17,"code":2484,"language":19,"meta":20,"style":20},"// Notionのタスクを更新（カレンダーイベントIDの保存）\nfunction updateNotionTask(taskId, calendarEventId) {\n  const url = `https://api.notion.com/v1/pages/${taskId}`;\n  return UrlFetchApp.fetch(url, {\n    method: 'PATCH',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      properties: {\n        'Calendar Event ID': {\n          rich_text: [{\n            text: { content: calendarEventId }\n          }]\n        }\n      }\n    })\n  });\n}\n\n",[22,2486,2487,2492,2497,2502,2507,2512,2516,2520,2525,2530,2535,2540,2545,2549,2554,2558,2562],{"__ignoreMap":20},[25,2488,2489],{"class":27,"line":28},[25,2490,2491],{},"// Notionのタスクを更新（カレンダーイベントIDの保存）\n",[25,2493,2494],{"class":27,"line":35},[25,2495,2496],{},"function updateNotionTask(taskId, calendarEventId) {\n",[25,2498,2499],{"class":27,"line":41},[25,2500,2501],{},"  const url = `https://api.notion.com/v1/pages/${taskId}`;\n",[25,2503,2504],{"class":27,"line":46},[25,2505,2506],{},"  return UrlFetchApp.fetch(url, {\n",[25,2508,2509],{"class":27,"line":52},[25,2510,2511],{},"    method: 'PATCH',\n",[25,2513,2514],{"class":27,"line":58},[25,2515,2434],{},[25,2517,2518],{"class":27,"line":63},[25,2519,2439],{},[25,2521,2522],{"class":27,"line":69},[25,2523,2524],{},"      properties: {\n",[25,2526,2527],{"class":27,"line":75},[25,2528,2529],{},"        'Calendar Event ID': {\n",[25,2531,2532],{"class":27,"line":80},[25,2533,2534],{},"          rich_text: [{\n",[25,2536,2537],{"class":27,"line":86},[25,2538,2539],{},"            text: { content: calendarEventId }\n",[25,2541,2542],{"class":27,"line":92},[25,2543,2544],{},"          }]\n",[25,2546,2547],{"class":27,"line":97},[25,2548,2464],{},[25,2550,2551],{"class":27,"line":103},[25,2552,2553],{},"      }\n",[25,2555,2556],{"class":27,"line":109},[25,2557,2474],{},[25,2559,2560],{"class":27,"line":114},[25,2561,1219],{},[25,2563,2564],{"class":27,"line":120},[25,2565,1236],{},[1254,2567,2569],{"id":2568},"_3-googleカレンダーとの連携","3. Googleカレンダーとの連携",[1254,2571,2572],{"id":2572},"イベント作成",[15,2574,2576],{"className":17,"code":2575,"language":19,"meta":20,"style":20},"function createCalendarEvent(task) {\n  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n  const title = task.properties.Name.title[0].plain_text;\n  const dueDate = new Date(task.properties.DueDate.date.start);\n\n  const event = calendar.createAllDayEvent(\n    title,\n    dueDate,\n    { description: `Notion Task ID: ${task.id}\\\\nURL: ${task.url}` }\n  );\n\n  return event.getId();\n}\n\n",[22,2577,2578,2583,2588,2593,2598,2602,2607,2612,2617,2622,2627,2631,2636],{"__ignoreMap":20},[25,2579,2580],{"class":27,"line":28},[25,2581,2582],{},"function createCalendarEvent(task) {\n",[25,2584,2585],{"class":27,"line":35},[25,2586,2587],{},"  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n",[25,2589,2590],{"class":27,"line":41},[25,2591,2592],{},"  const title = task.properties.Name.title[0].plain_text;\n",[25,2594,2595],{"class":27,"line":46},[25,2596,2597],{},"  const dueDate = new Date(task.properties.DueDate.date.start);\n",[25,2599,2600],{"class":27,"line":52},[25,2601,32],{"emptyLinePlaceholder":31},[25,2603,2604],{"class":27,"line":58},[25,2605,2606],{},"  const event = calendar.createAllDayEvent(\n",[25,2608,2609],{"class":27,"line":63},[25,2610,2611],{},"    title,\n",[25,2613,2614],{"class":27,"line":69},[25,2615,2616],{},"    dueDate,\n",[25,2618,2619],{"class":27,"line":75},[25,2620,2621],{},"    { description: `Notion Task ID: ${task.id}\\\\nURL: ${task.url}` }\n",[25,2623,2624],{"class":27,"line":80},[25,2625,2626],{},"  );\n",[25,2628,2629],{"class":27,"line":86},[25,2630,32],{"emptyLinePlaceholder":31},[25,2632,2633],{"class":27,"line":92},[25,2634,2635],{},"  return event.getId();\n",[25,2637,2638],{"class":27,"line":97},[25,2639,1236],{},[1254,2641,2643],{"id":2642},"_4-状態管理","4. 状態管理",[238,2645,2646],{},"タスクの状態を管理するための機能：",[15,2648,2650],{"className":17,"code":2649,"language":19,"meta":20,"style":20},"\n// タスクの現在の状態を取得\nfunction getTaskState(task) {\n  return {\n    id: task.id,\n    title: task.properties.Name.title[0].plain_text,\n    dueDate: task.properties.DueDate.date?.start,\n    status: task.properties.Status.status ? task.properties.Status.status.name : \"None\",\n    calendarEventId: task.properties['Calendar Event ID']?.rich_text[0]?.text.content\n  };\n}\n\n",[22,2651,2652,2656,2661,2666,2671,2676,2681,2686,2691,2696,2701],{"__ignoreMap":20},[25,2653,2654],{"class":27,"line":28},[25,2655,32],{"emptyLinePlaceholder":31},[25,2657,2658],{"class":27,"line":35},[25,2659,2660],{},"// タスクの現在の状態を取得\n",[25,2662,2663],{"class":27,"line":41},[25,2664,2665],{},"function getTaskState(task) {\n",[25,2667,2668],{"class":27,"line":46},[25,2669,2670],{},"  return {\n",[25,2672,2673],{"class":27,"line":52},[25,2674,2675],{},"    id: task.id,\n",[25,2677,2678],{"class":27,"line":58},[25,2679,2680],{},"    title: task.properties.Name.title[0].plain_text,\n",[25,2682,2683],{"class":27,"line":63},[25,2684,2685],{},"    dueDate: task.properties.DueDate.date?.start,\n",[25,2687,2688],{"class":27,"line":69},[25,2689,2690],{},"    status: task.properties.Status.status ? task.properties.Status.status.name : \"None\",\n",[25,2692,2693],{"class":27,"line":75},[25,2694,2695],{},"    calendarEventId: task.properties['Calendar Event ID']?.rich_text[0]?.text.content\n",[25,2697,2698],{"class":27,"line":80},[25,2699,2700],{},"  };\n",[25,2702,2703],{"class":27,"line":86},[25,2704,1236],{},[1254,2706,2708],{"id":2707},"_5-メイン同期処理","5. メイン同期処理",[15,2710,2712],{"className":17,"code":2711,"language":19,"meta":20,"style":20},"function syncNotionWithCalendar() {\n  try {\n    const tasks = getNotionTasks();\n    const previousState = getPreviousState();\n    const currentState = {};\n\n    tasks.forEach(task => {\n      currentState[task.id] = getTaskState(task);\n    });\n\n    tasks.forEach(task => {\n      processTaskChanges(task, previousState, currentState);\n    });\n\n    processDeletedTasks(previousState, currentState);\n    savePreviousState(currentState);\n\n  } catch (error) {\n    logError(error, 'メイン同期処理');\n  }\n}\n\n",[22,2713,2714,2719,2724,2729,2734,2739,2743,2748,2753,2757,2761,2765,2770,2774,2778,2783,2788,2792,2797,2802,2806],{"__ignoreMap":20},[25,2715,2716],{"class":27,"line":28},[25,2717,2718],{},"function syncNotionWithCalendar() {\n",[25,2720,2721],{"class":27,"line":35},[25,2722,2723],{},"  try {\n",[25,2725,2726],{"class":27,"line":41},[25,2727,2728],{},"    const tasks = getNotionTasks();\n",[25,2730,2731],{"class":27,"line":46},[25,2732,2733],{},"    const previousState = getPreviousState();\n",[25,2735,2736],{"class":27,"line":52},[25,2737,2738],{},"    const currentState = {};\n",[25,2740,2741],{"class":27,"line":58},[25,2742,32],{"emptyLinePlaceholder":31},[25,2744,2745],{"class":27,"line":63},[25,2746,2747],{},"    tasks.forEach(task => {\n",[25,2749,2750],{"class":27,"line":69},[25,2751,2752],{},"      currentState[task.id] = getTaskState(task);\n",[25,2754,2755],{"class":27,"line":75},[25,2756,1213],{},[25,2758,2759],{"class":27,"line":80},[25,2760,32],{"emptyLinePlaceholder":31},[25,2762,2763],{"class":27,"line":86},[25,2764,2747],{},[25,2766,2767],{"class":27,"line":92},[25,2768,2769],{},"      processTaskChanges(task, previousState, currentState);\n",[25,2771,2772],{"class":27,"line":97},[25,2773,1213],{},[25,2775,2776],{"class":27,"line":103},[25,2777,32],{"emptyLinePlaceholder":31},[25,2779,2780],{"class":27,"line":109},[25,2781,2782],{},"    processDeletedTasks(previousState, currentState);\n",[25,2784,2785],{"class":27,"line":114},[25,2786,2787],{},"    savePreviousState(currentState);\n",[25,2789,2790],{"class":27,"line":120},[25,2791,32],{"emptyLinePlaceholder":31},[25,2793,2794],{"class":27,"line":126},[25,2795,2796],{},"  } catch (error) {\n",[25,2798,2799],{"class":27,"line":132},[25,2800,2801],{},"    logError(error, 'メイン同期処理');\n",[25,2803,2804],{"class":27,"line":138},[25,2805,1088],{},[25,2807,2808],{"class":27,"line":144},[25,2809,1236],{},[11,2811,2812],{"id":2812},"実装のポイント",[1254,2814,2816],{"id":2815},"_1-エラーハンドリング","1. エラーハンドリング",[304,2818,2819,2822,2825],{},[307,2820,2821],{},"各処理でtry-catchを使用",[307,2823,2824],{},"エラーログの記録",[307,2826,2827],{},"コンテキスト情報の保持",[1254,2829,2831],{"id":2830},"_2-キャッシュの活用","2. キャッシュの活用",[304,2833,2834,2837,2840],{},[307,2835,2836],{},"前回の状態をキャッシュに保存",[307,2838,2839],{},"6時間のキャッシュ有効期限",[307,2841,2842],{},"差分検出による効率的な更新",[1254,2844,2846],{"id":2845},"_3-定期実行の設定","3. 定期実行の設定",[15,2848,2850],{"className":17,"code":2849,"language":19,"meta":20,"style":20},"// 定期実行トリガーの設定\nfunction setUpTrigger() {\n  // 既存のトリガーを削除\n  ScriptApp.getProjectTriggers().forEach(trigger => {\n    ScriptApp.deleteTrigger(trigger);\n  });\n\n  // 新しいトリガーを作成（1時間ごとに実行）\n  ScriptApp.newTrigger('syncNotionWithCalendar')\n    .timeBased()\n    .everyHours(1)\n    .create();\n}\n\n",[22,2851,2852,2857,2862,2867,2872,2877,2881,2885,2890,2895,2900,2905,2910],{"__ignoreMap":20},[25,2853,2854],{"class":27,"line":28},[25,2855,2856],{},"// 定期実行トリガーの設定\n",[25,2858,2859],{"class":27,"line":35},[25,2860,2861],{},"function setUpTrigger() {\n",[25,2863,2864],{"class":27,"line":41},[25,2865,2866],{},"  // 既存のトリガーを削除\n",[25,2868,2869],{"class":27,"line":46},[25,2870,2871],{},"  ScriptApp.getProjectTriggers().forEach(trigger => {\n",[25,2873,2874],{"class":27,"line":52},[25,2875,2876],{},"    ScriptApp.deleteTrigger(trigger);\n",[25,2878,2879],{"class":27,"line":58},[25,2880,1219],{},[25,2882,2883],{"class":27,"line":63},[25,2884,32],{"emptyLinePlaceholder":31},[25,2886,2887],{"class":27,"line":69},[25,2888,2889],{},"  // 新しいトリガーを作成（1時間ごとに実行）\n",[25,2891,2892],{"class":27,"line":75},[25,2893,2894],{},"  ScriptApp.newTrigger('syncNotionWithCalendar')\n",[25,2896,2897],{"class":27,"line":80},[25,2898,2899],{},"    .timeBased()\n",[25,2901,2902],{"class":27,"line":86},[25,2903,2904],{},"    .everyHours(1)\n",[25,2906,2907],{"class":27,"line":92},[25,2908,2909],{},"    .create();\n",[25,2911,2912],{"class":27,"line":97},[25,2913,1236],{},[11,2915,2336],{"id":2916},"notionデータベースの設定",[238,2918,2919],{},"きちんとtextかstatusか日付か合わせる",[238,2921,2922],{},"必要な項目：",[1452,2924,2925,2928,2931,2934],{},[307,2926,2927],{},"Name（タイトル）",[307,2929,2930],{},"DueDate（期限日）",[307,2932,2933],{},"Status（ステータス）",[307,2935,2936],{},"Calendar Event ID（カレンダー連携用）",[11,2938,2939],{"id":2939},"セットアップ手順",[1452,2941,2942,2945,2959,2967,2982,2985,2993],{},[307,2943,2944],{},"Google Apps Scriptプロジェクトの作成",[307,2946,2947,2948],{},"Notion APIキーの取得\n",[1452,2949,2950],{},[307,2951,2952,2953,2958],{},"Notion APIキーは ",[1594,2954,2957],{"href":2955,"rel":2956},"https://www.notion.so/my-integrations",[1598],"Notion Developer"," から取得できます。",[307,2960,2961,2962],{},"Notionデータベースの準備\n",[1452,2963,2964],{},[307,2965,2966],{},"同期したいデータベースのURLから、IDを取得します。",[307,2968,2969,2972,2973],{},[954,2970,2971],{},"GoogleカレンダーID","を確認する。\n",[304,2974,2975],{},[307,2976,2977,2978,2981],{},"メインカレンダーの場合は",[22,2979,2980],{},"primary","、他のカレンダーの場合はカレンダー設定画面でIDを確認してください。",[307,2983,2984],{},"コードの貼り付けと設定",[307,2986,2987,2988],{},"トリガーの設定\n",[1452,2989,2990],{},[307,2991,2992],{},"setUpTriggerの実行 自分の頻度に合わせて",[307,2994,2995,2998],{},[954,2996,2997],{},"権限の設定",[304,2999,3000],{},[307,3001,3002],{},"初回実行時にGoogleカレンダーへのアクセス権限を求められますので、許可します。",[15,3004,3006],{"className":17,"code":3005,"language":19,"meta":20,"style":20},"// API キーやIDを管理する設定オブジェクト\nconst CONFIG = {\n  NOTION_API_KEY: 'your-notion-api-key',\n  NOTION_DATABASE_ID: 'your-database-id',\n  CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  DONE_CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  NOTION_VERSION: '2022-06-28'\n};\n\n// Notionの共通ヘッダー設定\nconst NOTION_HEADERS = {\n  'Authorization': `Bearer ${CONFIG.NOTION_API_KEY}`,\n  'Notion-Version': CONFIG.NOTION_VERSION,\n  'Content-Type': 'application/json'\n};\n\n\n\n\n\n// メイン同期処理\nfunction syncNotionWithCalendar() {\n  try {\n    // タスク一覧の取得\n    const tasks = getNotionTasks();\n    const previousState = getPreviousState();\n    const currentState = {};\n\n    // 現在の状態を構築\n    console.log(\"現在の状態を構築\")\n    tasks.forEach(task => {\n\n      currentState[task.id] = getTaskState(task);\n    });\n\n    console.log(\"タスクの変更を処理\")\n    // タスクの変更を処理\n    tasks.forEach(task => {\n      console.log(\"currentState\", currentState[task.id])\n      console.log(\"previousState\", previousState[task.id])\n      processTaskChanges(task, previousState, currentState);\n    });\n\n    // 削除されたタスクを処理\n    console.log(\"削除されたタスクを処理\")\n    processDeletedTasks(previousState, currentState);\n\n    // 現在の状態を保存\n    console.log(\"現在の状態を保存\")\n    savePreviousState(currentState);\n\n  } catch (error) {\n    logError(error, 'メイン同期処理');\n  }\n}\n\n\n\n\n// Notionからタスク一覧を取得\nfunction getNotionTasks() {\n  const url = `https://api.notion.com/v1/databases/${CONFIG.NOTION_DATABASE_ID}/query`;\n  const response = UrlFetchApp.fetch(url, {\n    method: 'POST',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      sorts: [\n        {\n          property: 'DueDate', // 日付プロパティ名\n          direction: 'descending' // 昇順にソート（降順の場合は'descending'に変更）\n        }\n      ],\n    })\n  });\n\n  console.log(\"next_cursor\", JSON.parse(response.getContentText()).next_cursor)\n  return JSON.parse(response.getContentText()).results;\n}\n\n// Notionのタスクを更新（カレンダーイベントIDの保存）\nfunction updateNotionTask(taskId, calendarEventId) {\n  const url = `https://api.notion.com/v1/pages/${taskId}`;\n  return UrlFetchApp.fetch(url, {\n    method: 'PATCH',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      properties: {\n        'Calendar Event ID': {\n          rich_text: [{\n            text: { content: calendarEventId }\n          }]\n        }\n      }\n    })\n  });\n}\n\n// カレンダーイベントの新規作成\nfunction createCalendarEvent(task, CALENDAR_ID) {\n  const calendar = CalendarApp.getCalendarById(CALENDAR_ID);\n  const title = task.properties.Name.title[0].plain_text;\n  const dueDate = new Date(task.properties.DueDate.date.start);\n\n  if (!dueDate) return\n\n  const event = calendar.createAllDayEvent(\n    title,\n    dueDate,\n    { description: `Notion Task ID: ${task.id}\\nURL: ${task.url}` }\n  );\n\n  console.log(event)\n  return event.getId();\n}\n\n// カレンダーイベントの更新\nfunction updateCalendarEvent(eventId, task) {\n  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n  const event = calendar.getEventById(eventId);\n  if (!event) return;\n\n  const title = task.properties.Name.title[0].plain_text;\n  const dueDate = new Date(task.properties.DueDate.date.start);\n\n  event.setTitle(title);\n  event.setAllDayDate(dueDate);\n  event.setDescription(`Notion Task ID: ${task.id}\\nURL: ${task.url}`);\n}\n\n// カレンダーイベントの削除\nfunction deleteCalendarEvent(eventId) {\n  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n\n  try {\n    const event = calendar.getEventById(eventId);\n    if (event) {\n      event.deleteEvent();\n      return true\n    }\n  } catch (e) {\n    console.error(\"削除されている\", e)\n    return false\n\n  }\n\n  return false\n}\n\n// タスクの現在の状態を取得\nfunction getTaskState(task) {\n  return {\n    id: task.id,\n    title: task.properties.Name.title[0].plain_text,\n    dueDate: task.properties.DueDate.date?.start,\n    status: task.properties.Status.status ? task.properties.Status.status.name : \"None\",\n    calendarEventId: task.properties['Calendar Event ID']?.rich_text[0]?.text.content\n  };\n}\n\n// キャッシュから前回の状態を取得\nfunction getPreviousState() {\n  const cache = CacheService.getScriptCache();\n  const data = cache.get('previousState');\n\n  console.log(JSON.parse(data))\n  return data ? JSON.parse(data) : {};\n}\n\n// 現在の状態をキャッシュに保存（6時間有効）\nfunction savePreviousState(state) {\n  const cache = CacheService.getScriptCache();\n  cache.put('previousState', JSON.stringify(state), 21600);\n}\n\n// タスクの変更を検出して必要な処理を実行\nfunction processTaskChanges(task, previousState, currentState) {\n  const taskId = task.id;\n  const prevTask = previousState[taskId];\n  const currentTask = currentState[taskId];\n\n  try {\n    if (!prevTask && task.properties.DueDate?.date?.start) {\n      // 新規タスクの処理\n      console.log(\"新規タスクの処理\")\n      const calendarEventId = createCalendarEvent(task, CONFIG.CALENDAR_ID);\n      updateNotionTask(taskId, calendarEventId);\n    } else if (prevTask && prevTask.dueDate) {\n      // 既存タスクの処理\n      console.log(\"既存タスクの処理\")\n      const calendarEventId = prevTask.calendarEventId;\n      if (currentTask.status === 'Deleted') {\n        // 削除されたタスクの処理\n        console.log(\"削除されたタスクの処理\")\n        deleteCalendarEvent(calendarEventId);\n\n      } else if (\n        prevTask.title !== currentTask.title ||\n        prevTask.dueDate !== currentTask.dueDate\n      ) {\n        // タスクが更新された場合の処理\n        console.log(\"タスクが更新された場合の処理\")\n        updateCalendarEvent(calendarEventId, task);\n      } else if (currentTask.status === 'Done') {\n        // ステータスが完了タスクの処理\n        console.log(\"ステータスが完了タスクの処理\")\n        const reslut = deleteCalendarEvent(calendarEventId);\n        console.log(\"ステータスが完了タスクの処理終了 google カレンダー削除 \",reslut)\n\n        // 削除がない場合終了\n        if (!reslut) return\n\n        console.log(\"別カレンダーに完了を作成\")\n        // 別カレンダーに完了を作成\n        createCalendarEvent(task, CONFIG.DONE_CALENDAR_ID);\n        updateNotionTask(taskId, \"done\");\n        console.log(\"別カレンダーに完了を作成終了\")\n      }\n    }\n  } catch (error) {\n    logError(error, `タスク処理エラー - TaskID: ${taskId}`);\n  }\n}\n\n// 削除されたタスクの処理\nfunction processDeletedTasks(previousState, currentState) {\n  Object.keys(previousState).forEach(taskId => {\n    if (!currentState[taskId]) {\n      const calendarEventId = previousState[taskId].calendarEventId;\n      if (calendarEventId) {\n        try {\n          deleteCalendarEvent(calendarEventId);\n        } catch (error) {\n          logError(error, `削除済みタスクの処理エラー - TaskID: ${taskId}`);\n        }\n      }\n    }\n  });\n}\n\n// エラーログの記録\nfunction logError(error, context = '') {\n  console.error(`同期エラー ${context}:`, error);\n  // 必要に応じて追加のエラーハンドリング（Slack通知やメール送信など）\n\n\n}\n\n// 特定のキャッシュキーを削除する関数\nfunction clearPreviousStateCache() {\n  const cache = CacheService.getScriptCache();\n  cache.remove('previousState');\n  console.log(\"キャッシュ 'previousState' を削除しました\");\n}\n\n// 定期実行トリガーの設定\nfunction setUpTrigger() {\n  // 既存のトリガーを削除\n  ScriptApp.getProjectTriggers().forEach(trigger => {\n    ScriptApp.deleteTrigger(trigger);\n  });\n\n  // 新しいトリガーを作成（1時間ごとに実行）\n  ScriptApp.newTrigger('syncNotionWithCalendar')\n    .timeBased()\n    .everyHours(1)\n    .create();\n}\n",[22,3007,3008,3013,3017,3021,3025,3029,3033,3037,3041,3045,3050,3055,3060,3065,3070,3074,3078,3082,3086,3090,3094,3099,3103,3107,3112,3116,3120,3124,3128,3133,3138,3142,3146,3150,3154,3158,3163,3168,3172,3177,3182,3186,3190,3194,3199,3204,3208,3212,3217,3222,3227,3232,3237,3242,3247,3252,3257,3262,3267,3272,3277,3282,3287,3292,3297,3302,3307,3312,3317,3322,3327,3332,3337,3342,3347,3352,3358,3364,3369,3374,3379,3384,3389,3394,3399,3404,3409,3414,3419,3424,3429,3434,3439,3444,3449,3454,3459,3464,3470,3476,3482,3487,3492,3497,3503,3508,3513,3518,3523,3529,3534,3539,3545,3550,3555,3560,3566,3572,3577,3583,3589,3594,3599,3604,3609,3615,3621,3627,3632,3637,3643,3649,3654,3659,3664,3670,3676,3682,3688,3693,3699,3705,3711,3716,3721,3726,3732,3737,3742,3747,3752,3757,3762,3767,3772,3777,3782,3787,3792,3797,3803,3809,3815,3821,3826,3832,3838,3843,3848,3854,3860,3865,3871,3876,3881,3887,3893,3899,3905,3911,3916,3921,3927,3933,3939,3945,3951,3957,3963,3969,3975,3981,3987,3993,3999,4004,4010,4016,4022,4028,4034,4040,4046,4052,4058,4064,4070,4076,4081,4087,4093,4098,4104,4110,4116,4122,4128,4133,4138,4143,4149,4154,4159,4164,4170,4176,4182,4188,4194,4200,4206,4212,4218,4224,4229,4234,4239,4244,4249,4254,4260,4266,4272,4278,4283,4288,4293,4298,4304,4310,4315,4321,4327,4332,4337,4342,4347,4352,4357,4362,4367,4372,4377,4382,4387,4392,4397],{"__ignoreMap":20},[25,3009,3010],{"class":27,"line":28},[25,3011,3012],{},"// API キーやIDを管理する設定オブジェクト\n",[25,3014,3015],{"class":27,"line":35},[25,3016,2362],{},[25,3018,3019],{"class":27,"line":41},[25,3020,2367],{},[25,3022,3023],{"class":27,"line":46},[25,3024,2372],{},[25,3026,3027],{"class":27,"line":52},[25,3028,2377],{},[25,3030,3031],{"class":27,"line":58},[25,3032,2382],{},[25,3034,3035],{"class":27,"line":63},[25,3036,2387],{},[25,3038,3039],{"class":27,"line":69},[25,3040,2392],{},[25,3042,3043],{"class":27,"line":75},[25,3044,32],{"emptyLinePlaceholder":31},[25,3046,3047],{"class":27,"line":80},[25,3048,3049],{},"// Notionの共通ヘッダー設定\n",[25,3051,3052],{"class":27,"line":86},[25,3053,3054],{},"const NOTION_HEADERS = {\n",[25,3056,3057],{"class":27,"line":92},[25,3058,3059],{},"  'Authorization': `Bearer ${CONFIG.NOTION_API_KEY}`,\n",[25,3061,3062],{"class":27,"line":97},[25,3063,3064],{},"  'Notion-Version': CONFIG.NOTION_VERSION,\n",[25,3066,3067],{"class":27,"line":103},[25,3068,3069],{},"  'Content-Type': 'application/json'\n",[25,3071,3072],{"class":27,"line":109},[25,3073,2392],{},[25,3075,3076],{"class":27,"line":114},[25,3077,32],{"emptyLinePlaceholder":31},[25,3079,3080],{"class":27,"line":120},[25,3081,32],{"emptyLinePlaceholder":31},[25,3083,3084],{"class":27,"line":126},[25,3085,32],{"emptyLinePlaceholder":31},[25,3087,3088],{"class":27,"line":132},[25,3089,32],{"emptyLinePlaceholder":31},[25,3091,3092],{"class":27,"line":138},[25,3093,32],{"emptyLinePlaceholder":31},[25,3095,3096],{"class":27,"line":144},[25,3097,3098],{},"// メイン同期処理\n",[25,3100,3101],{"class":27,"line":150},[25,3102,2718],{},[25,3104,3105],{"class":27,"line":156},[25,3106,2723],{},[25,3108,3109],{"class":27,"line":162},[25,3110,3111],{},"    // タスク一覧の取得\n",[25,3113,3114],{"class":27,"line":168},[25,3115,2728],{},[25,3117,3118],{"class":27,"line":174},[25,3119,2733],{},[25,3121,3122],{"class":27,"line":180},[25,3123,2738],{},[25,3125,3126],{"class":27,"line":186},[25,3127,32],{"emptyLinePlaceholder":31},[25,3129,3130],{"class":27,"line":191},[25,3131,3132],{},"    // 現在の状態を構築\n",[25,3134,3135],{"class":27,"line":197},[25,3136,3137],{},"    console.log(\"現在の状態を構築\")\n",[25,3139,3140],{"class":27,"line":203},[25,3141,2747],{},[25,3143,3144],{"class":27,"line":1134},[25,3145,32],{"emptyLinePlaceholder":31},[25,3147,3148],{"class":27,"line":1140},[25,3149,2752],{},[25,3151,3152],{"class":27,"line":1146},[25,3153,1213],{},[25,3155,3156],{"class":27,"line":1152},[25,3157,32],{"emptyLinePlaceholder":31},[25,3159,3160],{"class":27,"line":1158},[25,3161,3162],{},"    console.log(\"タスクの変更を処理\")\n",[25,3164,3165],{"class":27,"line":1163},[25,3166,3167],{},"    // タスクの変更を処理\n",[25,3169,3170],{"class":27,"line":1169},[25,3171,2747],{},[25,3173,3174],{"class":27,"line":1175},[25,3175,3176],{},"      console.log(\"currentState\", currentState[task.id])\n",[25,3178,3179],{"class":27,"line":1181},[25,3180,3181],{},"      console.log(\"previousState\", previousState[task.id])\n",[25,3183,3184],{"class":27,"line":1187},[25,3185,2769],{},[25,3187,3188],{"class":27,"line":1193},[25,3189,1213],{},[25,3191,3192],{"class":27,"line":1199},[25,3193,32],{"emptyLinePlaceholder":31},[25,3195,3196],{"class":27,"line":1204},[25,3197,3198],{},"    // 削除されたタスクを処理\n",[25,3200,3201],{"class":27,"line":1210},[25,3202,3203],{},"    console.log(\"削除されたタスクを処理\")\n",[25,3205,3206],{"class":27,"line":1216},[25,3207,2782],{},[25,3209,3210],{"class":27,"line":1222},[25,3211,32],{"emptyLinePlaceholder":31},[25,3213,3214],{"class":27,"line":1227},[25,3215,3216],{},"    // 現在の状態を保存\n",[25,3218,3219],{"class":27,"line":1233},[25,3220,3221],{},"    console.log(\"現在の状態を保存\")\n",[25,3223,3225],{"class":27,"line":3224},50,[25,3226,2787],{},[25,3228,3230],{"class":27,"line":3229},51,[25,3231,32],{"emptyLinePlaceholder":31},[25,3233,3235],{"class":27,"line":3234},52,[25,3236,2796],{},[25,3238,3240],{"class":27,"line":3239},53,[25,3241,2801],{},[25,3243,3245],{"class":27,"line":3244},54,[25,3246,1088],{},[25,3248,3250],{"class":27,"line":3249},55,[25,3251,1236],{},[25,3253,3255],{"class":27,"line":3254},56,[25,3256,32],{"emptyLinePlaceholder":31},[25,3258,3260],{"class":27,"line":3259},57,[25,3261,32],{"emptyLinePlaceholder":31},[25,3263,3265],{"class":27,"line":3264},58,[25,3266,32],{"emptyLinePlaceholder":31},[25,3268,3270],{"class":27,"line":3269},59,[25,3271,32],{"emptyLinePlaceholder":31},[25,3273,3275],{"class":27,"line":3274},60,[25,3276,2409],{},[25,3278,3280],{"class":27,"line":3279},61,[25,3281,2414],{},[25,3283,3285],{"class":27,"line":3284},62,[25,3286,2419],{},[25,3288,3290],{"class":27,"line":3289},63,[25,3291,2424],{},[25,3293,3295],{"class":27,"line":3294},64,[25,3296,2429],{},[25,3298,3300],{"class":27,"line":3299},65,[25,3301,2434],{},[25,3303,3305],{"class":27,"line":3304},66,[25,3306,2439],{},[25,3308,3310],{"class":27,"line":3309},67,[25,3311,2444],{},[25,3313,3315],{"class":27,"line":3314},68,[25,3316,2449],{},[25,3318,3320],{"class":27,"line":3319},69,[25,3321,2454],{},[25,3323,3325],{"class":27,"line":3324},70,[25,3326,2459],{},[25,3328,3330],{"class":27,"line":3329},71,[25,3331,2464],{},[25,3333,3335],{"class":27,"line":3334},72,[25,3336,2469],{},[25,3338,3340],{"class":27,"line":3339},73,[25,3341,2474],{},[25,3343,3345],{"class":27,"line":3344},74,[25,3346,1219],{},[25,3348,3350],{"class":27,"line":3349},75,[25,3351,32],{"emptyLinePlaceholder":31},[25,3353,3355],{"class":27,"line":3354},76,[25,3356,3357],{},"  console.log(\"next_cursor\", JSON.parse(response.getContentText()).next_cursor)\n",[25,3359,3361],{"class":27,"line":3360},77,[25,3362,3363],{},"  return JSON.parse(response.getContentText()).results;\n",[25,3365,3367],{"class":27,"line":3366},78,[25,3368,1236],{},[25,3370,3372],{"class":27,"line":3371},79,[25,3373,32],{"emptyLinePlaceholder":31},[25,3375,3377],{"class":27,"line":3376},80,[25,3378,2491],{},[25,3380,3382],{"class":27,"line":3381},81,[25,3383,2496],{},[25,3385,3387],{"class":27,"line":3386},82,[25,3388,2501],{},[25,3390,3392],{"class":27,"line":3391},83,[25,3393,2506],{},[25,3395,3397],{"class":27,"line":3396},84,[25,3398,2511],{},[25,3400,3402],{"class":27,"line":3401},85,[25,3403,2434],{},[25,3405,3407],{"class":27,"line":3406},86,[25,3408,2439],{},[25,3410,3412],{"class":27,"line":3411},87,[25,3413,2524],{},[25,3415,3417],{"class":27,"line":3416},88,[25,3418,2529],{},[25,3420,3422],{"class":27,"line":3421},89,[25,3423,2534],{},[25,3425,3427],{"class":27,"line":3426},90,[25,3428,2539],{},[25,3430,3432],{"class":27,"line":3431},91,[25,3433,2544],{},[25,3435,3437],{"class":27,"line":3436},92,[25,3438,2464],{},[25,3440,3442],{"class":27,"line":3441},93,[25,3443,2553],{},[25,3445,3447],{"class":27,"line":3446},94,[25,3448,2474],{},[25,3450,3452],{"class":27,"line":3451},95,[25,3453,1219],{},[25,3455,3457],{"class":27,"line":3456},96,[25,3458,1236],{},[25,3460,3462],{"class":27,"line":3461},97,[25,3463,32],{"emptyLinePlaceholder":31},[25,3465,3467],{"class":27,"line":3466},98,[25,3468,3469],{},"// カレンダーイベントの新規作成\n",[25,3471,3473],{"class":27,"line":3472},99,[25,3474,3475],{},"function createCalendarEvent(task, CALENDAR_ID) {\n",[25,3477,3479],{"class":27,"line":3478},100,[25,3480,3481],{},"  const calendar = CalendarApp.getCalendarById(CALENDAR_ID);\n",[25,3483,3485],{"class":27,"line":3484},101,[25,3486,2592],{},[25,3488,3490],{"class":27,"line":3489},102,[25,3491,2597],{},[25,3493,3495],{"class":27,"line":3494},103,[25,3496,32],{"emptyLinePlaceholder":31},[25,3498,3500],{"class":27,"line":3499},104,[25,3501,3502],{},"  if (!dueDate) return\n",[25,3504,3506],{"class":27,"line":3505},105,[25,3507,32],{"emptyLinePlaceholder":31},[25,3509,3511],{"class":27,"line":3510},106,[25,3512,2606],{},[25,3514,3516],{"class":27,"line":3515},107,[25,3517,2611],{},[25,3519,3521],{"class":27,"line":3520},108,[25,3522,2616],{},[25,3524,3526],{"class":27,"line":3525},109,[25,3527,3528],{},"    { description: `Notion Task ID: ${task.id}\\nURL: ${task.url}` }\n",[25,3530,3532],{"class":27,"line":3531},110,[25,3533,2626],{},[25,3535,3537],{"class":27,"line":3536},111,[25,3538,32],{"emptyLinePlaceholder":31},[25,3540,3542],{"class":27,"line":3541},112,[25,3543,3544],{},"  console.log(event)\n",[25,3546,3548],{"class":27,"line":3547},113,[25,3549,2635],{},[25,3551,3553],{"class":27,"line":3552},114,[25,3554,1236],{},[25,3556,3558],{"class":27,"line":3557},115,[25,3559,32],{"emptyLinePlaceholder":31},[25,3561,3563],{"class":27,"line":3562},116,[25,3564,3565],{},"// カレンダーイベントの更新\n",[25,3567,3569],{"class":27,"line":3568},117,[25,3570,3571],{},"function updateCalendarEvent(eventId, task) {\n",[25,3573,3575],{"class":27,"line":3574},118,[25,3576,2587],{},[25,3578,3580],{"class":27,"line":3579},119,[25,3581,3582],{},"  const event = calendar.getEventById(eventId);\n",[25,3584,3586],{"class":27,"line":3585},120,[25,3587,3588],{},"  if (!event) return;\n",[25,3590,3592],{"class":27,"line":3591},121,[25,3593,32],{"emptyLinePlaceholder":31},[25,3595,3597],{"class":27,"line":3596},122,[25,3598,2592],{},[25,3600,3602],{"class":27,"line":3601},123,[25,3603,2597],{},[25,3605,3607],{"class":27,"line":3606},124,[25,3608,32],{"emptyLinePlaceholder":31},[25,3610,3612],{"class":27,"line":3611},125,[25,3613,3614],{},"  event.setTitle(title);\n",[25,3616,3618],{"class":27,"line":3617},126,[25,3619,3620],{},"  event.setAllDayDate(dueDate);\n",[25,3622,3624],{"class":27,"line":3623},127,[25,3625,3626],{},"  event.setDescription(`Notion Task ID: ${task.id}\\nURL: ${task.url}`);\n",[25,3628,3630],{"class":27,"line":3629},128,[25,3631,1236],{},[25,3633,3635],{"class":27,"line":3634},129,[25,3636,32],{"emptyLinePlaceholder":31},[25,3638,3640],{"class":27,"line":3639},130,[25,3641,3642],{},"// カレンダーイベントの削除\n",[25,3644,3646],{"class":27,"line":3645},131,[25,3647,3648],{},"function deleteCalendarEvent(eventId) {\n",[25,3650,3652],{"class":27,"line":3651},132,[25,3653,2587],{},[25,3655,3657],{"class":27,"line":3656},133,[25,3658,32],{"emptyLinePlaceholder":31},[25,3660,3662],{"class":27,"line":3661},134,[25,3663,2723],{},[25,3665,3667],{"class":27,"line":3666},135,[25,3668,3669],{},"    const event = calendar.getEventById(eventId);\n",[25,3671,3673],{"class":27,"line":3672},136,[25,3674,3675],{},"    if (event) {\n",[25,3677,3679],{"class":27,"line":3678},137,[25,3680,3681],{},"      event.deleteEvent();\n",[25,3683,3685],{"class":27,"line":3684},138,[25,3686,3687],{},"      return true\n",[25,3689,3691],{"class":27,"line":3690},139,[25,3692,1576],{},[25,3694,3696],{"class":27,"line":3695},140,[25,3697,3698],{},"  } catch (e) {\n",[25,3700,3702],{"class":27,"line":3701},141,[25,3703,3704],{},"    console.error(\"削除されている\", e)\n",[25,3706,3708],{"class":27,"line":3707},142,[25,3709,3710],{},"    return false\n",[25,3712,3714],{"class":27,"line":3713},143,[25,3715,32],{"emptyLinePlaceholder":31},[25,3717,3719],{"class":27,"line":3718},144,[25,3720,1088],{},[25,3722,3724],{"class":27,"line":3723},145,[25,3725,32],{"emptyLinePlaceholder":31},[25,3727,3729],{"class":27,"line":3728},146,[25,3730,3731],{},"  return false\n",[25,3733,3735],{"class":27,"line":3734},147,[25,3736,1236],{},[25,3738,3740],{"class":27,"line":3739},148,[25,3741,32],{"emptyLinePlaceholder":31},[25,3743,3745],{"class":27,"line":3744},149,[25,3746,2660],{},[25,3748,3750],{"class":27,"line":3749},150,[25,3751,2665],{},[25,3753,3755],{"class":27,"line":3754},151,[25,3756,2670],{},[25,3758,3760],{"class":27,"line":3759},152,[25,3761,2675],{},[25,3763,3765],{"class":27,"line":3764},153,[25,3766,2680],{},[25,3768,3770],{"class":27,"line":3769},154,[25,3771,2685],{},[25,3773,3775],{"class":27,"line":3774},155,[25,3776,2690],{},[25,3778,3780],{"class":27,"line":3779},156,[25,3781,2695],{},[25,3783,3785],{"class":27,"line":3784},157,[25,3786,2700],{},[25,3788,3790],{"class":27,"line":3789},158,[25,3791,1236],{},[25,3793,3795],{"class":27,"line":3794},159,[25,3796,32],{"emptyLinePlaceholder":31},[25,3798,3800],{"class":27,"line":3799},160,[25,3801,3802],{},"// キャッシュから前回の状態を取得\n",[25,3804,3806],{"class":27,"line":3805},161,[25,3807,3808],{},"function getPreviousState() {\n",[25,3810,3812],{"class":27,"line":3811},162,[25,3813,3814],{},"  const cache = CacheService.getScriptCache();\n",[25,3816,3818],{"class":27,"line":3817},163,[25,3819,3820],{},"  const data = cache.get('previousState');\n",[25,3822,3824],{"class":27,"line":3823},164,[25,3825,32],{"emptyLinePlaceholder":31},[25,3827,3829],{"class":27,"line":3828},165,[25,3830,3831],{},"  console.log(JSON.parse(data))\n",[25,3833,3835],{"class":27,"line":3834},166,[25,3836,3837],{},"  return data ? JSON.parse(data) : {};\n",[25,3839,3841],{"class":27,"line":3840},167,[25,3842,1236],{},[25,3844,3846],{"class":27,"line":3845},168,[25,3847,32],{"emptyLinePlaceholder":31},[25,3849,3851],{"class":27,"line":3850},169,[25,3852,3853],{},"// 現在の状態をキャッシュに保存（6時間有効）\n",[25,3855,3857],{"class":27,"line":3856},170,[25,3858,3859],{},"function savePreviousState(state) {\n",[25,3861,3863],{"class":27,"line":3862},171,[25,3864,3814],{},[25,3866,3868],{"class":27,"line":3867},172,[25,3869,3870],{},"  cache.put('previousState', JSON.stringify(state), 21600);\n",[25,3872,3874],{"class":27,"line":3873},173,[25,3875,1236],{},[25,3877,3879],{"class":27,"line":3878},174,[25,3880,32],{"emptyLinePlaceholder":31},[25,3882,3884],{"class":27,"line":3883},175,[25,3885,3886],{},"// タスクの変更を検出して必要な処理を実行\n",[25,3888,3890],{"class":27,"line":3889},176,[25,3891,3892],{},"function processTaskChanges(task, previousState, currentState) {\n",[25,3894,3896],{"class":27,"line":3895},177,[25,3897,3898],{},"  const taskId = task.id;\n",[25,3900,3902],{"class":27,"line":3901},178,[25,3903,3904],{},"  const prevTask = previousState[taskId];\n",[25,3906,3908],{"class":27,"line":3907},179,[25,3909,3910],{},"  const currentTask = currentState[taskId];\n",[25,3912,3914],{"class":27,"line":3913},180,[25,3915,32],{"emptyLinePlaceholder":31},[25,3917,3919],{"class":27,"line":3918},181,[25,3920,2723],{},[25,3922,3924],{"class":27,"line":3923},182,[25,3925,3926],{},"    if (!prevTask && task.properties.DueDate?.date?.start) {\n",[25,3928,3930],{"class":27,"line":3929},183,[25,3931,3932],{},"      // 新規タスクの処理\n",[25,3934,3936],{"class":27,"line":3935},184,[25,3937,3938],{},"      console.log(\"新規タスクの処理\")\n",[25,3940,3942],{"class":27,"line":3941},185,[25,3943,3944],{},"      const calendarEventId = createCalendarEvent(task, CONFIG.CALENDAR_ID);\n",[25,3946,3948],{"class":27,"line":3947},186,[25,3949,3950],{},"      updateNotionTask(taskId, calendarEventId);\n",[25,3952,3954],{"class":27,"line":3953},187,[25,3955,3956],{},"    } else if (prevTask && prevTask.dueDate) {\n",[25,3958,3960],{"class":27,"line":3959},188,[25,3961,3962],{},"      // 既存タスクの処理\n",[25,3964,3966],{"class":27,"line":3965},189,[25,3967,3968],{},"      console.log(\"既存タスクの処理\")\n",[25,3970,3972],{"class":27,"line":3971},190,[25,3973,3974],{},"      const calendarEventId = prevTask.calendarEventId;\n",[25,3976,3978],{"class":27,"line":3977},191,[25,3979,3980],{},"      if (currentTask.status === 'Deleted') {\n",[25,3982,3984],{"class":27,"line":3983},192,[25,3985,3986],{},"        // 削除されたタスクの処理\n",[25,3988,3990],{"class":27,"line":3989},193,[25,3991,3992],{},"        console.log(\"削除されたタスクの処理\")\n",[25,3994,3996],{"class":27,"line":3995},194,[25,3997,3998],{},"        deleteCalendarEvent(calendarEventId);\n",[25,4000,4002],{"class":27,"line":4001},195,[25,4003,32],{"emptyLinePlaceholder":31},[25,4005,4007],{"class":27,"line":4006},196,[25,4008,4009],{},"      } else if (\n",[25,4011,4013],{"class":27,"line":4012},197,[25,4014,4015],{},"        prevTask.title !== currentTask.title ||\n",[25,4017,4019],{"class":27,"line":4018},198,[25,4020,4021],{},"        prevTask.dueDate !== currentTask.dueDate\n",[25,4023,4025],{"class":27,"line":4024},199,[25,4026,4027],{},"      ) {\n",[25,4029,4031],{"class":27,"line":4030},200,[25,4032,4033],{},"        // タスクが更新された場合の処理\n",[25,4035,4037],{"class":27,"line":4036},201,[25,4038,4039],{},"        console.log(\"タスクが更新された場合の処理\")\n",[25,4041,4043],{"class":27,"line":4042},202,[25,4044,4045],{},"        updateCalendarEvent(calendarEventId, task);\n",[25,4047,4049],{"class":27,"line":4048},203,[25,4050,4051],{},"      } else if (currentTask.status === 'Done') {\n",[25,4053,4055],{"class":27,"line":4054},204,[25,4056,4057],{},"        // ステータスが完了タスクの処理\n",[25,4059,4061],{"class":27,"line":4060},205,[25,4062,4063],{},"        console.log(\"ステータスが完了タスクの処理\")\n",[25,4065,4067],{"class":27,"line":4066},206,[25,4068,4069],{},"        const reslut = deleteCalendarEvent(calendarEventId);\n",[25,4071,4073],{"class":27,"line":4072},207,[25,4074,4075],{},"        console.log(\"ステータスが完了タスクの処理終了 google カレンダー削除 \",reslut)\n",[25,4077,4079],{"class":27,"line":4078},208,[25,4080,32],{"emptyLinePlaceholder":31},[25,4082,4084],{"class":27,"line":4083},209,[25,4085,4086],{},"        // 削除がない場合終了\n",[25,4088,4090],{"class":27,"line":4089},210,[25,4091,4092],{},"        if (!reslut) return\n",[25,4094,4096],{"class":27,"line":4095},211,[25,4097,32],{"emptyLinePlaceholder":31},[25,4099,4101],{"class":27,"line":4100},212,[25,4102,4103],{},"        console.log(\"別カレンダーに完了を作成\")\n",[25,4105,4107],{"class":27,"line":4106},213,[25,4108,4109],{},"        // 別カレンダーに完了を作成\n",[25,4111,4113],{"class":27,"line":4112},214,[25,4114,4115],{},"        createCalendarEvent(task, CONFIG.DONE_CALENDAR_ID);\n",[25,4117,4119],{"class":27,"line":4118},215,[25,4120,4121],{},"        updateNotionTask(taskId, \"done\");\n",[25,4123,4125],{"class":27,"line":4124},216,[25,4126,4127],{},"        console.log(\"別カレンダーに完了を作成終了\")\n",[25,4129,4131],{"class":27,"line":4130},217,[25,4132,2553],{},[25,4134,4136],{"class":27,"line":4135},218,[25,4137,1576],{},[25,4139,4141],{"class":27,"line":4140},219,[25,4142,2796],{},[25,4144,4146],{"class":27,"line":4145},220,[25,4147,4148],{},"    logError(error, `タスク処理エラー - TaskID: ${taskId}`);\n",[25,4150,4152],{"class":27,"line":4151},221,[25,4153,1088],{},[25,4155,4157],{"class":27,"line":4156},222,[25,4158,1236],{},[25,4160,4162],{"class":27,"line":4161},223,[25,4163,32],{"emptyLinePlaceholder":31},[25,4165,4167],{"class":27,"line":4166},224,[25,4168,4169],{},"// 削除されたタスクの処理\n",[25,4171,4173],{"class":27,"line":4172},225,[25,4174,4175],{},"function processDeletedTasks(previousState, currentState) {\n",[25,4177,4179],{"class":27,"line":4178},226,[25,4180,4181],{},"  Object.keys(previousState).forEach(taskId => {\n",[25,4183,4185],{"class":27,"line":4184},227,[25,4186,4187],{},"    if (!currentState[taskId]) {\n",[25,4189,4191],{"class":27,"line":4190},228,[25,4192,4193],{},"      const calendarEventId = previousState[taskId].calendarEventId;\n",[25,4195,4197],{"class":27,"line":4196},229,[25,4198,4199],{},"      if (calendarEventId) {\n",[25,4201,4203],{"class":27,"line":4202},230,[25,4204,4205],{},"        try {\n",[25,4207,4209],{"class":27,"line":4208},231,[25,4210,4211],{},"          deleteCalendarEvent(calendarEventId);\n",[25,4213,4215],{"class":27,"line":4214},232,[25,4216,4217],{},"        } catch (error) {\n",[25,4219,4221],{"class":27,"line":4220},233,[25,4222,4223],{},"          logError(error, `削除済みタスクの処理エラー - TaskID: ${taskId}`);\n",[25,4225,4227],{"class":27,"line":4226},234,[25,4228,2464],{},[25,4230,4232],{"class":27,"line":4231},235,[25,4233,2553],{},[25,4235,4237],{"class":27,"line":4236},236,[25,4238,1576],{},[25,4240,4242],{"class":27,"line":4241},237,[25,4243,1219],{},[25,4245,4247],{"class":27,"line":4246},238,[25,4248,1236],{},[25,4250,4252],{"class":27,"line":4251},239,[25,4253,32],{"emptyLinePlaceholder":31},[25,4255,4257],{"class":27,"line":4256},240,[25,4258,4259],{},"// エラーログの記録\n",[25,4261,4263],{"class":27,"line":4262},241,[25,4264,4265],{},"function logError(error, context = '') {\n",[25,4267,4269],{"class":27,"line":4268},242,[25,4270,4271],{},"  console.error(`同期エラー ${context}:`, error);\n",[25,4273,4275],{"class":27,"line":4274},243,[25,4276,4277],{},"  // 必要に応じて追加のエラーハンドリング（Slack通知やメール送信など）\n",[25,4279,4281],{"class":27,"line":4280},244,[25,4282,32],{"emptyLinePlaceholder":31},[25,4284,4286],{"class":27,"line":4285},245,[25,4287,32],{"emptyLinePlaceholder":31},[25,4289,4291],{"class":27,"line":4290},246,[25,4292,1236],{},[25,4294,4296],{"class":27,"line":4295},247,[25,4297,32],{"emptyLinePlaceholder":31},[25,4299,4301],{"class":27,"line":4300},248,[25,4302,4303],{},"// 特定のキャッシュキーを削除する関数\n",[25,4305,4307],{"class":27,"line":4306},249,[25,4308,4309],{},"function clearPreviousStateCache() {\n",[25,4311,4313],{"class":27,"line":4312},250,[25,4314,3814],{},[25,4316,4318],{"class":27,"line":4317},251,[25,4319,4320],{},"  cache.remove('previousState');\n",[25,4322,4324],{"class":27,"line":4323},252,[25,4325,4326],{},"  console.log(\"キャッシュ 'previousState' を削除しました\");\n",[25,4328,4330],{"class":27,"line":4329},253,[25,4331,1236],{},[25,4333,4335],{"class":27,"line":4334},254,[25,4336,32],{"emptyLinePlaceholder":31},[25,4338,4340],{"class":27,"line":4339},255,[25,4341,2856],{},[25,4343,4345],{"class":27,"line":4344},256,[25,4346,2861],{},[25,4348,4350],{"class":27,"line":4349},257,[25,4351,2866],{},[25,4353,4355],{"class":27,"line":4354},258,[25,4356,2871],{},[25,4358,4360],{"class":27,"line":4359},259,[25,4361,2876],{},[25,4363,4365],{"class":27,"line":4364},260,[25,4366,1219],{},[25,4368,4370],{"class":27,"line":4369},261,[25,4371,32],{"emptyLinePlaceholder":31},[25,4373,4375],{"class":27,"line":4374},262,[25,4376,2889],{},[25,4378,4380],{"class":27,"line":4379},263,[25,4381,2894],{},[25,4383,4385],{"class":27,"line":4384},264,[25,4386,2899],{},[25,4388,4390],{"class":27,"line":4389},265,[25,4391,2904],{},[25,4393,4395],{"class":27,"line":4394},266,[25,4396,2909],{},[25,4398,4400],{"class":27,"line":4399},267,[25,4401,1236],{},[11,4403,4404],{"id":4404},"注意点",[1452,4406,4407,4418,4432],{},[307,4408,4409,4410],{},"APIキーの管理\n",[304,4411,4412,4415],{},[307,4413,4414],{},"重要な認証情報は適切に管理",[307,4416,4417],{},"プロジェクト設定での管理を推奨",[307,4419,4420,4421],{},"エラー処理\n",[304,4422,4423,4426,4429],{},[307,4424,4425],{},"ネットワークエラーへの対応",[307,4427,4428],{},"API制限の考慮→ noiton api (１回で100件のページしかとれない)とgasの制限に注意 (稼働時間、fetchのリクエスト回数など)",[307,4430,4431],{},"データ整合性の確保→手動編集する場合はnotinのみ編集する",[307,4433,4434,4435],{},"パフォーマンス\n",[304,4436,4437,4440,4443],{},[307,4438,4439],{},"不要な API 呼び出しの削減",[307,4441,4442],{},"キャッシュの活用",[307,4444,4445],{},"適切な実行間隔の設定",[11,4447,518],{"id":518},[238,4449,4450],{},"このシステムにより、NotionとGoogleカレンダーの連携が自動化され、タスク管理がより効率的になります。実装方法は目的や好みに応じて選択できます。",[238,4452,4453],{},"エラー処理やパフォーマンスの最適化など、実運用時の考慮点も含めて実装することで、より安定した運用が可能になります。",[11,4455,4456],{"id":4456},"参考文献",[304,4458,4459,4466,4473],{},[307,4460,4461],{},[1594,4462,4465],{"href":4463,"rel":4464},"https://developers.notion.com/",[1598],"Notion API Documentation",[307,4467,4468],{},[1594,4469,4472],{"href":4470,"rel":4471},"https://developers.google.com/calendar",[1598],"Google Calendar API Documentation",[307,4474,4475],{},[1594,4476,4479],{"href":4477,"rel":4478},"https://developers.google.com/apps-script",[1598],"Google Apps Script Documentation",[208,4481,210],{},{"title":20,"searchDepth":35,"depth":35,"links":4483},[4484,4485,4489,4499,4504,4505,4506,4507,4508],{"id":940,"depth":35,"text":940},{"id":2308,"depth":35,"text":2308,"children":4486},[4487,4488],{"id":2311,"depth":41,"text":2311},{"id":2328,"depth":41,"text":2328},{"id":2345,"depth":35,"text":2345,"children":4490},[4491,4492,4493,4494,4495,4496,4497,4498],{"id":2348,"depth":41,"text":2349},{"id":2395,"depth":41,"text":2396},{"id":2399,"depth":41,"text":2399},{"id":2481,"depth":41,"text":2481},{"id":2568,"depth":41,"text":2569},{"id":2572,"depth":41,"text":2572},{"id":2642,"depth":41,"text":2643},{"id":2707,"depth":41,"text":2708},{"id":2812,"depth":35,"text":2812,"children":4500},[4501,4502,4503],{"id":2815,"depth":41,"text":2816},{"id":2830,"depth":41,"text":2831},{"id":2845,"depth":41,"text":2846},{"id":2916,"depth":35,"text":2336},{"id":2939,"depth":35,"text":2939},{"id":4404,"depth":35,"text":4404},{"id":518,"depth":35,"text":518},{"id":4456,"depth":35,"text":4456},[1493],"2024-11-03T00:00:00.000Z","Notionのタスクの期限日をGoogleカレンダーへ自動同期し、完了タスクは別カレンダーへ移すシステムの実装方法",{},"/posts/notion-to-google-calender-1103",{"title":2295,"description":4511},"posts/notion-to-google-calender-1103",[1493,1502,4517,1501,4518],"Notion","Google Calender","FSVOKot0JaF5Z0n_1sh-M35ifUHy6ct9Yl11IwlIpCo",{"id":4521,"title":4522,"body":4523,"categories":4608,"cross_post":215,"date":4609,"description":4610,"extension":218,"image":20,"meta":4611,"navigation":31,"note_id":215,"note_url":215,"path":4612,"private":221,"qiita_id":215,"qiita_url":215,"seo":4613,"stem":4614,"tags":4615,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":4617},"posts/posts/nuxt-blog.md","nuxtを使ったblog",{"type":8,"value":4524,"toc":4603},[4525,4528,4534,4537,4540,4554,4557,4562,4565,4581,4584,4589,4592,4600],[238,4526,4527],{},"自分のブログを下記の構成でつくってみました。",[238,4529,4530],{},[1594,4531,4532],{"href":4532,"rel":4533},"https://tori-dev.com/",[1598],[11,4535,4536],{"id":4536},"機能",[238,4538,4539],{},"@nuxt/contentを使用したブログ作成のメイン機能について説明します。以下の機能が含まれます。",[304,4541,4542,4545,4548,4551],{},[307,4543,4544],{},"カテゴリー",[307,4546,4547],{},"タグ",[307,4549,4550],{},"関連記事",[307,4552,4553],{},"目次",[238,4555,4556],{},"また、アイキャッチの自動生成は現在のところ実装されていませんが、今後のアップデートで追加予定です。",[11,4558,4560],{"id":4559},"記事の作成方法",[954,4561,4559],{},[238,4563,4564],{},"ブログ記事の作成方法は以下のいずれかを選ぶことができます。",[1452,4566,4567,4578],{},[307,4568,4569,4570],{},"ローカルでダウンロードしてデプロイする方法\n",[304,4571,4572,4575],{},[307,4573,4574],{},"Notionを使用する場合",[307,4576,4577],{},"Markdownを使用する場合（Google Drive + Markdownツールなどを利用）",[307,4579,4580],{},"microCMS（ヘッドレスCMS）を使用する方法",[238,4582,4583],{},"それぞれの方法によって、使いやすさや環境に合わせて選択できます。",[11,4585,4587],{"id":4586},"デプロイ先",[954,4588,4586],{},[238,4590,4591],{},"作成したブログを公開するためのデプロイ先は、以下のオプションがあります。",[1452,4593,4594,4597],{},[307,4595,4596],{},"Firebase Hosting",[307,4598,4599],{},"Netlify",[238,4601,4602],{},"どちらのプラットフォームも高性能で信頼性があり、使いやすいインターフェースを提供しています。",{"title":20,"searchDepth":35,"depth":35,"links":4604},[4605,4606,4607],{"id":4536,"depth":35,"text":4536},{"id":4559,"depth":35,"text":4559},{"id":4586,"depth":35,"text":4586},[1493],"2023-06-13T00:00:00.000Z","@nuxt/contentでカテゴリー・タグ・関連記事・目次機能を備えた自分のブログを作った構成の紹介",{},"/posts/nuxt-blog",{"title":4522,"description":4610},"posts/nuxt-blog",[1493,4616],"nuxt","zbjVn8WDwDFKKKo_Nfou2Z9tvOmI0xvQbDErPbIWZ6g",{"id":4619,"title":4620,"body":4621,"categories":4653,"cross_post":215,"date":4654,"description":4655,"extension":218,"image":20,"meta":4656,"navigation":31,"note_id":215,"note_url":215,"path":4657,"private":221,"qiita_id":215,"qiita_url":215,"seo":4658,"stem":4659,"tags":4660,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":4661},"posts/posts/nuxtLifeCycleMemo.md","nuxtライフサイクルmemo",{"type":8,"value":4622,"toc":4651},[4623],[304,4624,4625,4628,4639,4645],{},[307,4626,4627],{},"asyncDataはssaのときはクライアントでssgのときはgenerate時にしかできない",[307,4629,4630,4631],{},"以下はクライアントで動く\n",[304,4632,4633,4636],{},[307,4634,4635],{},"created：インスタンス初期化時、DOMが生成される前",[307,4637,4638],{},"mounted：インスタンス初期化時、DOMが生成された後",[307,4640,4641,4642],{},"computed： 算出プロパティ",[954,4643,4644],{},"getter,setterが使える",[307,4646,4647,4648],{},"watch：",[954,4649,4650],{},"データの変化をトリガにしたフック",{"title":20,"searchDepth":35,"depth":35,"links":4652},[],[1493],"2021-11-10T00:00:00.000Z","NuxtのasyncData・created・mounted・computed・watchなどライフサイクルの挙動を整理したメモ",{},"/posts/nuxtlifecyclememo",{"title":4620,"description":4655},"posts/nuxtLifeCycleMemo",[1493,4616],"81Qrdx2IbJcG7TZMAQSJJz0nU2o4zf002L8aT0lXBns",{"id":4663,"title":4664,"body":4665,"categories":5143,"cross_post":215,"date":4510,"description":5145,"extension":218,"image":20,"meta":5146,"navigation":31,"note_id":215,"note_url":215,"path":5147,"private":221,"qiita_id":215,"qiita_url":215,"seo":5148,"stem":5149,"tags":5150,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":5152},"posts/posts/try-react-signature-canvas.md","reactでサイン機能をするためにreact-signature-canvasためしてみた",{"type":8,"value":4666,"toc":5137},[4667,4672,4675,4679,4693,4696,4699,4702,5119,5121,5128,5135],[11,4668,4670],{"id":4669},"react-signature-canvas",[954,4671,4669],{},[238,4673,4674],{},"react-signature-canvasは、Reactアプリケーションでサイン機能を簡単に実装できる人気のライブラリ",[1254,4676,4678],{"id":4677},"主な特徴","主な特徴:",[304,4680,4681,4684,4687,4690],{},[307,4682,4683],{},"キャンバスベースのシンプルなサイン機能",[307,4685,4686],{},"タッチデバイスとマウスの両方に対応",[307,4688,4689],{},"サインのクリア、保存、読み込みなどの基本機能を提供",[307,4691,4692],{},"カスタマイズ可能なスタイルとオプション",[1254,4694,4695],{"id":4695},"やってみて",[238,4697,4698],{},"公式を見ながらやったら意外といけた",[238,4700,4701],{},"useRefを使うのと保存したデータURLを取り込んだ時に画像が小さくなってしまうとこに少し困った。",[15,4703,4705],{"className":17,"code":4704,"language":19,"meta":20,"style":20},"\nimport SignatureCanvas from \"react-signature-canvas\";\nimport { FC, useState, useRef, useEffect } from \"react\";\n\n\n\n\n/**\n * サイン\n *\n * @returns サイン\n */\nconst Signature: FC\u003CProps> = () => {\n\n\n  const [trimmedDataURL, setTrimmedDataURL] = useState\u003Cstring>(\"\");\n  const padRef = useRef\u003CSignatureCanvas>(null);\n\n\n  /* -------------------------------- Methods ------------------------------- */\n\n  /**\n   * サインクリア\n   *\n   */\n  const clear = () => {\n    padRef.current?.clear();\n  };\n\n  /**\n   *サインURlに変換保存\n   *\n   */\n  const trim = () => {\n    const url = padRef.current?.getTrimmedCanvas().toDataURL(\"image/png\");\n    if (url) {\n      setTrimmedDataURL(url);\n\n      // どこかへ保存する\n    }\n  };\n\n  useEffect(() => {\n    /**\n     *初期実行\n     *\n     */\n    const init = async () => {\n\n                const url = \"ここで保存先から取得\"\n          \n          // fromDataURLでSignatureCanvasに\n          // 保存したデータURL取り込むきちんと幅と高さを合わせないと画像が小さくなったりする\n        padRef.current?.fromDataURL(url, {\n          width: 800,\n          height: 200\n        });\n        setTrimmedDataURL(url);\n      }\n    };\n\n    init();\n  }, []);\n\n\n  return (\n    \u003C>\n      \u003CSignatureCanvas\n        penColor=\"white\"\n        backgroundColor=\"gray\"\n        canvasProps={{ width: 800, height: 200 }}\n        ref={padRef}\n      />\n      \u003Cdiv>\n        {trimmedDataURL ? (\n          \u003Cimg alt=\"signature\" src={trimmedDataURL} width={80} height={20} />\n        ) : null}\n      \u003C/div>Ï\n          \u003CButton onClick={() => clear()} >\n            clear\n          \u003C/Button>\n          \u003CButton onClick={() => trim()} >\n               trim\n          \u003C/Button>\n\n    \u003C/>\n  );\n};\n\n\n\n\n",[22,4706,4707,4711,4716,4721,4725,4729,4733,4737,4742,4747,4752,4757,4762,4767,4771,4775,4780,4785,4789,4793,4798,4802,4807,4812,4817,4822,4827,4832,4836,4840,4844,4849,4853,4857,4862,4867,4872,4877,4881,4886,4890,4894,4898,4903,4908,4913,4918,4923,4928,4932,4937,4942,4947,4952,4957,4962,4967,4972,4977,4981,4986,4990,4995,5000,5004,5008,5013,5018,5023,5028,5033,5038,5043,5048,5053,5058,5063,5068,5073,5078,5083,5088,5093,5098,5102,5106,5111,5115],{"__ignoreMap":20},[25,4708,4709],{"class":27,"line":28},[25,4710,32],{"emptyLinePlaceholder":31},[25,4712,4713],{"class":27,"line":35},[25,4714,4715],{},"import SignatureCanvas from \"react-signature-canvas\";\n",[25,4717,4718],{"class":27,"line":41},[25,4719,4720],{},"import { FC, useState, useRef, useEffect } from \"react\";\n",[25,4722,4723],{"class":27,"line":46},[25,4724,32],{"emptyLinePlaceholder":31},[25,4726,4727],{"class":27,"line":52},[25,4728,32],{"emptyLinePlaceholder":31},[25,4730,4731],{"class":27,"line":58},[25,4732,32],{"emptyLinePlaceholder":31},[25,4734,4735],{"class":27,"line":63},[25,4736,32],{"emptyLinePlaceholder":31},[25,4738,4739],{"class":27,"line":69},[25,4740,4741],{},"/**\n",[25,4743,4744],{"class":27,"line":75},[25,4745,4746],{}," * サイン\n",[25,4748,4749],{"class":27,"line":80},[25,4750,4751],{}," *\n",[25,4753,4754],{"class":27,"line":86},[25,4755,4756],{}," * @returns サイン\n",[25,4758,4759],{"class":27,"line":92},[25,4760,4761],{}," */\n",[25,4763,4764],{"class":27,"line":97},[25,4765,4766],{},"const Signature: FC\u003CProps> = () => {\n",[25,4768,4769],{"class":27,"line":103},[25,4770,32],{"emptyLinePlaceholder":31},[25,4772,4773],{"class":27,"line":109},[25,4774,32],{"emptyLinePlaceholder":31},[25,4776,4777],{"class":27,"line":114},[25,4778,4779],{},"  const [trimmedDataURL, setTrimmedDataURL] = useState\u003Cstring>(\"\");\n",[25,4781,4782],{"class":27,"line":120},[25,4783,4784],{},"  const padRef = useRef\u003CSignatureCanvas>(null);\n",[25,4786,4787],{"class":27,"line":126},[25,4788,32],{"emptyLinePlaceholder":31},[25,4790,4791],{"class":27,"line":132},[25,4792,32],{"emptyLinePlaceholder":31},[25,4794,4795],{"class":27,"line":138},[25,4796,4797],{},"  /* -------------------------------- Methods ------------------------------- */\n",[25,4799,4800],{"class":27,"line":144},[25,4801,32],{"emptyLinePlaceholder":31},[25,4803,4804],{"class":27,"line":150},[25,4805,4806],{},"  /**\n",[25,4808,4809],{"class":27,"line":156},[25,4810,4811],{},"   * サインクリア\n",[25,4813,4814],{"class":27,"line":162},[25,4815,4816],{},"   *\n",[25,4818,4819],{"class":27,"line":168},[25,4820,4821],{},"   */\n",[25,4823,4824],{"class":27,"line":174},[25,4825,4826],{},"  const clear = () => {\n",[25,4828,4829],{"class":27,"line":180},[25,4830,4831],{},"    padRef.current?.clear();\n",[25,4833,4834],{"class":27,"line":186},[25,4835,2700],{},[25,4837,4838],{"class":27,"line":191},[25,4839,32],{"emptyLinePlaceholder":31},[25,4841,4842],{"class":27,"line":197},[25,4843,4806],{},[25,4845,4846],{"class":27,"line":203},[25,4847,4848],{},"   *サインURlに変換保存\n",[25,4850,4851],{"class":27,"line":1134},[25,4852,4816],{},[25,4854,4855],{"class":27,"line":1140},[25,4856,4821],{},[25,4858,4859],{"class":27,"line":1146},[25,4860,4861],{},"  const trim = () => {\n",[25,4863,4864],{"class":27,"line":1152},[25,4865,4866],{},"    const url = padRef.current?.getTrimmedCanvas().toDataURL(\"image/png\");\n",[25,4868,4869],{"class":27,"line":1158},[25,4870,4871],{},"    if (url) {\n",[25,4873,4874],{"class":27,"line":1163},[25,4875,4876],{},"      setTrimmedDataURL(url);\n",[25,4878,4879],{"class":27,"line":1169},[25,4880,32],{"emptyLinePlaceholder":31},[25,4882,4883],{"class":27,"line":1175},[25,4884,4885],{},"      // どこかへ保存する\n",[25,4887,4888],{"class":27,"line":1181},[25,4889,1576],{},[25,4891,4892],{"class":27,"line":1187},[25,4893,2700],{},[25,4895,4896],{"class":27,"line":1193},[25,4897,32],{"emptyLinePlaceholder":31},[25,4899,4900],{"class":27,"line":1199},[25,4901,4902],{},"  useEffect(() => {\n",[25,4904,4905],{"class":27,"line":1204},[25,4906,4907],{},"    /**\n",[25,4909,4910],{"class":27,"line":1210},[25,4911,4912],{},"     *初期実行\n",[25,4914,4915],{"class":27,"line":1216},[25,4916,4917],{},"     *\n",[25,4919,4920],{"class":27,"line":1222},[25,4921,4922],{},"     */\n",[25,4924,4925],{"class":27,"line":1227},[25,4926,4927],{},"    const init = async () => {\n",[25,4929,4930],{"class":27,"line":1233},[25,4931,32],{"emptyLinePlaceholder":31},[25,4933,4934],{"class":27,"line":3224},[25,4935,4936],{},"                const url = \"ここで保存先から取得\"\n",[25,4938,4939],{"class":27,"line":3229},[25,4940,4941],{},"          \n",[25,4943,4944],{"class":27,"line":3234},[25,4945,4946],{},"          // fromDataURLでSignatureCanvasに\n",[25,4948,4949],{"class":27,"line":3239},[25,4950,4951],{},"          // 保存したデータURL取り込むきちんと幅と高さを合わせないと画像が小さくなったりする\n",[25,4953,4954],{"class":27,"line":3244},[25,4955,4956],{},"        padRef.current?.fromDataURL(url, {\n",[25,4958,4959],{"class":27,"line":3249},[25,4960,4961],{},"          width: 800,\n",[25,4963,4964],{"class":27,"line":3254},[25,4965,4966],{},"          height: 200\n",[25,4968,4969],{"class":27,"line":3259},[25,4970,4971],{},"        });\n",[25,4973,4974],{"class":27,"line":3264},[25,4975,4976],{},"        setTrimmedDataURL(url);\n",[25,4978,4979],{"class":27,"line":3269},[25,4980,2553],{},[25,4982,4983],{"class":27,"line":3274},[25,4984,4985],{},"    };\n",[25,4987,4988],{"class":27,"line":3279},[25,4989,32],{"emptyLinePlaceholder":31},[25,4991,4992],{"class":27,"line":3284},[25,4993,4994],{},"    init();\n",[25,4996,4997],{"class":27,"line":3289},[25,4998,4999],{},"  }, []);\n",[25,5001,5002],{"class":27,"line":3294},[25,5003,32],{"emptyLinePlaceholder":31},[25,5005,5006],{"class":27,"line":3299},[25,5007,32],{"emptyLinePlaceholder":31},[25,5009,5010],{"class":27,"line":3304},[25,5011,5012],{},"  return (\n",[25,5014,5015],{"class":27,"line":3309},[25,5016,5017],{},"    \u003C>\n",[25,5019,5020],{"class":27,"line":3314},[25,5021,5022],{},"      \u003CSignatureCanvas\n",[25,5024,5025],{"class":27,"line":3319},[25,5026,5027],{},"        penColor=\"white\"\n",[25,5029,5030],{"class":27,"line":3324},[25,5031,5032],{},"        backgroundColor=\"gray\"\n",[25,5034,5035],{"class":27,"line":3329},[25,5036,5037],{},"        canvasProps={{ width: 800, height: 200 }}\n",[25,5039,5040],{"class":27,"line":3334},[25,5041,5042],{},"        ref={padRef}\n",[25,5044,5045],{"class":27,"line":3339},[25,5046,5047],{},"      />\n",[25,5049,5050],{"class":27,"line":3344},[25,5051,5052],{},"      \u003Cdiv>\n",[25,5054,5055],{"class":27,"line":3349},[25,5056,5057],{},"        {trimmedDataURL ? (\n",[25,5059,5060],{"class":27,"line":3354},[25,5061,5062],{},"          \u003Cimg alt=\"signature\" src={trimmedDataURL} width={80} height={20} />\n",[25,5064,5065],{"class":27,"line":3360},[25,5066,5067],{},"        ) : null}\n",[25,5069,5070],{"class":27,"line":3366},[25,5071,5072],{},"      \u003C/div>Ï\n",[25,5074,5075],{"class":27,"line":3371},[25,5076,5077],{},"          \u003CButton onClick={() => clear()} >\n",[25,5079,5080],{"class":27,"line":3376},[25,5081,5082],{},"            clear\n",[25,5084,5085],{"class":27,"line":3381},[25,5086,5087],{},"          \u003C/Button>\n",[25,5089,5090],{"class":27,"line":3386},[25,5091,5092],{},"          \u003CButton onClick={() => trim()} >\n",[25,5094,5095],{"class":27,"line":3391},[25,5096,5097],{},"               trim\n",[25,5099,5100],{"class":27,"line":3396},[25,5101,5087],{},[25,5103,5104],{"class":27,"line":3401},[25,5105,32],{"emptyLinePlaceholder":31},[25,5107,5108],{"class":27,"line":3406},[25,5109,5110],{},"    \u003C/>\n",[25,5112,5113],{"class":27,"line":3411},[25,5114,2626],{},[25,5116,5117],{"class":27,"line":3416},[25,5118,2392],{},[238,5120,2265],{},[238,5122,5123],{},[1594,5124,5127],{"href":5125,"rel":5126},"https://www.npmjs.com/package/react-signature-canvas",[1598],"react-signature-canvas - npm",[238,5129,5130],{},[1594,5131,5134],{"href":5132,"rel":5133},"https://github.com/agilgur5/react-signature-canvas",[1598],"agilgur5/react-signature-canvas: A React wrapper component around signature_pad (in \u003C 150 LoC). Unopinionated and heavily updated fork of react-signature-pad",[208,5136,210],{},{"title":20,"searchDepth":35,"depth":35,"links":5138},[5139],{"id":4669,"depth":35,"text":4669,"children":5140},[5141,5142],{"id":4677,"depth":41,"text":4678},{"id":4695,"depth":41,"text":4695},[5144],"React","Reactで手書きサイン機能を実装できるreact-signature-canvasを試し、実装時にハマった点をまとめた",{},"/posts/try-react-signature-canvas",{"title":4664,"description":5145},"posts/try-react-signature-canvas",[1493,1501,5144,5151],"Next.js","IwEcUQZG5ugt7Kz-mNFkk1Mvg3BbPn-Dn7Yl8pyKDSY",[5154],{"id":5155,"title":5156,"advertisements":215,"body":5157,"date":5164,"description":5161,"extension":218,"image":215,"meta":5165,"navigation":31,"path":5166,"seo":5167,"stem":5168,"__hash__":5169},"announcements/announcements/20230628.md","私のお知らせ",{"type":8,"value":5158,"toc":5162},[5159],[238,5160,5161],{},"これは私のお知らせの記事です。お知らせの内容をここに書きます。",{"title":20,"searchDepth":35,"depth":35,"links":5163},[],"2020-06-06T00:00:00.000Z",{},"/announcements/20230628",{"title":5156,"description":5161},"announcements/20230628","RJZYNIMmR2xZ4iew58mXvJUJ6HLlezfyp6fByaMX3LQ",[5171,5173,5177,5179,5183,5187,5191,5195,5199,5201,5205,5207,5211,5215,5217,5220,5223,5226,5228,5231,5235,5239,5243,5247,5251,5255,5257,5261,5265,5268,5271,5274,5278,5280,5284,5287,5291,5295,5298,5302,5305,5309,5313,5316,5320,5324,5328,5331,5335,5339,5343,5347,5351,5355,5359,5363,5366,5370,5374,5378,5381,5383,5386,5390],{"id":220,"title":6,"titles":5172,"content":217,"level":28},[],{"id":5174,"title":13,"titles":5175,"content":5176,"level":35},"/posts/1064#操作",[6],"const  arr = []\n\n// 先頭を削除\narr.shift() ;\n\n// 末尾を削除\narr.pop() ;\n\n// 配列合計\ndata.reduce((a, x) =>{return a + ((x || 0) - 0);}, 0);\n\n// 配列から新しい配列\nconst count = Array.from(line)\n\n// 配列を空,null undefined を削除\narr.filter((v) => v\n// 配列の要素すべてが条件を満たしているか\n  o = s.every(isUpperCase)\n//配列の要素一つでも条件を満たしているか\narr.some()\n//配列のkeyを取得\narr_key = Object.keys(arr)\n// 配列に引数の値が含まれているかどうか\narr_key.includes(x)\n//配列の順番を逆に\narr.reverse()\n\n// 配列の重複削除\nconst array1 = [1, 5, 3, 1, 5, 3];\nconst array2 = Array.from(new Set(array1)) html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":555,"title":230,"titles":5178,"content":553,"level":28},[],{"id":5180,"title":236,"titles":5181,"content":5182,"level":35},"/posts/2024-review#_13月",[230],"例年ながら、冬は寒いし日光なくてあんまり調子は出ないで 今年もローテンションで生活していました.. とはいえ りんご農園さんの受注分析システムを作成したり はじめて冬の戸隠神社に仲良くなったオーストラリア人でワーキングホリデーで日本に来た友達と 雪の中行ってみたりしました。",{"id":5184,"title":281,"titles":5185,"content":5186,"level":35},"/posts/2024-review#_46月",[230],"4月5月で東京でSIerの新人研修のサブ講師をしたのは新しい経験でした。 今まで子供にプログラミングを教えたりとか、 オンラインのプログラミング教室の講師の経験をしてきましたが やはり対面でメイン講師ではないとはいえ100名以上を前に喋ったり サポートするのは今までとはちがった経験で仕事を受けた時は意識していませんでしたが チャレンジであり新しい価値観とスキルを身につけた気がします。 また、登山もことしも行き始め 見晴岳・三方ヶ峰・篭ノ登山(東篭ノ登山)飯綱山蓼科山 に行きましたー。 ものすごい高い山ではないですが、 山頂でお湯を沸かしてカップラーメンとコーヒーは達成感あっていいものですね〜 帰りに、温泉に寄ってくるのも定番です！ そして、今年の大きな旅行１つ目 台湾にも１人旅をしてきました。 今まで海外は誰かと一緒でしたので今回 全ての手配も一人でやり一人で台湾に行って帰ってきたのは 旅行の楽しさも凄くありましたが、 より色々なとこにフットワーク軽く移動できるようになった気がして嬉しかったです。 それから台湾は英語あまり通じなかったですが、同じホステルの人とかと頑張って喋ってみて 前よりも英語も上達している気がしたのも嬉しかったです。",{"id":5188,"title":373,"titles":5189,"content":5190,"level":35},"/posts/2024-review#_79月",[230],"暑すぎてあまり引きこもり気味でした… それでも 松本の花火や穂高神社の花火に行ったりしました。 そして今年の大きな旅行２つ目 青春18きっぷで北海道まで行ったことです。 青春18きっぷが今年で無くなるのではないかとの噂を聞いて 今まで１回もチャレンジしたことなかったので 長野からどこまで行けるか調べてチャレンジしてみました。 フェリーに乗る必要があるとはいえ函館まで行きさらに札幌までいってきました！ じつはこのルート青春18きっぷの改訂でこの冬からは同じ手段ではいけなくなっていまいました。 ちゃんと夏のシーズンにいってよかったな思いました。 山にも登りました、 9月の少し涼しくなってきたタイミングで 烏帽子岳と湯ノ丸山にいってきましたー",{"id":5192,"title":437,"titles":5193,"content":5194,"level":35},"/posts/2024-review#_1012月",[230],"前半登山とキャンプ 根子岳と四阿山にいってきました。 キャンプは子安温泉キャンプ所で！ 今回一緒に行ったメンバーが焚き火台を持ってきてくれて 初めてキャンプで焚き火を焚き火で魚や肉を焼いたりして 炎を眺めるのもいいですし、焚き火で作った料理は美味しいしで 僕も焚き火台が欲しくなりました… そして今年３つ目の大きな旅行で 出雲へいってきました 東京からサンライズ出雲の寝台列車に乗ることができて嬉しかったです！ 日本で唯一毎日運行されている寝台特急ということで 乗れるうちに乗ってみたかったのですが、今回その目標も叶いました〜 出雲で出雲大社と周辺の神社、それから松江で宿泊し、松江城や歴史館 そして世界遺産の石見銀山の構成遺産の温泉津に泊まって 翌日石見銀山へ なかなか関西より西に行くことが少ないので色々回れておもしろかったし、 歴史も垣間見れる場所もいけてよかったです。",{"id":5196,"title":518,"titles":5197,"content":5198,"level":35},"/posts/2024-review#まとめ",[230],"今年は結構旅行など意外に外出が多かった年でした〜 仕事ではフリーランスになって１年目で変化が多かったですが りんご農園さんのDX支援は講師をしてみたりで新たな自分の可能性を広げられたかなと思ってます。 あと、地味に夏からダイエットをしてるのです、12月末で7kg痩せていて 自分でもびっくりですが結構嬉しいです！ あと2kg痩せてそこから筋肉つけれる方向に向かっていければなって考えてますね〜 来年の目標は年始にまた考えますが、もうちょい痩せて、もうちょい英語喋れるようになるのは 頑張っていきたいところですね〜",{"id":769,"title":564,"titles":5200,"content":767,"level":28},[],{"id":5202,"title":569,"titles":5203,"content":5204,"level":35},"/posts/4456#データ取得コレクション全部",[564],"firebase.initializeApp(firebaseConfig)\n\nconst firestore = firebase.firestore()\n\nconst querySnapshot = await firestore.collection('p0st')\n\n// firebase.firestore.QuerySnapshotのインスタンスを取得\nconsole.log(querySnapshot.size)\nconsole.log(querySnapshot.empty)\nconsole.log(querySnapshot.docs.map((postDoc) => postDoc.id))\nquerySnapshot.forEach((postDoc) => {\n  console.log([postDoc.id, JSON.stringify(postDoc.data())])\n}) html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":873,"title":776,"titles":5206,"content":871,"level":28},[],{"id":5208,"title":781,"titles":5209,"content":5210,"level":35},"/posts/4621#月の差分",[776],"何月前か後ろかを整数で返す //  js月の比較\nconst date1 = new Date(2021, 1, 1)\nconst date2 = new Date(2021, 12, 11)\n\nlet months\nmonths = (date2.getFullYear() - date1.getFullYear()) * 12\nmonths -= date1.getMonth() + 1\nmonths += date2.getMonth() + 1",{"id":5212,"title":831,"titles":5213,"content":5214,"level":35},"/posts/4621#日の差分",[776],"単純に日数の差分を返す //  js日差分\nconst date1 = new Date(2021, 1, 1)\nconst date2 = new Date(2021, 12, 11)\nconst termDay = (date2 - date1) / 86400000\nconsole.log(termDay) html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":921,"title":880,"titles":5216,"content":918,"level":28},[],{"id":5218,"title":885,"titles":5219,"content":20,"level":35},"/posts/chiriquiz01#第1問",[880],{"id":5221,"title":896,"titles":5222,"content":20,"level":35},"/posts/chiriquiz01#第2問",[880],{"id":5224,"title":904,"titles":5225,"content":20,"level":35},"/posts/chiriquiz01#第3問",[880],{"id":1497,"title":930,"titles":5227,"content":1495,"level":28},[],{"id":5229,"title":937,"titles":5230,"content":20,"level":28},"/posts/gas-checkrakutenpayemailsandlogdaily#gmailを自動解析楽天payと楽天キャッシュの利用情報をスプレッドシートに記録するスクリプト",[],{"id":5232,"title":940,"titles":5233,"content":5234,"level":35},"/posts/gas-checkrakutenpayemailsandlogdaily#はじめに",[937],"日々の支出管理やキャッシュフローの可視化は大切ですよね？ 僕は基本的に支払いは電子決済で済ませてるので大体の履歴はマネーフォワードに連携して そこで見ているですが、実は楽天pay,PayPay,ANApayなどは連携していなく アプリでしかみることができないので今回\n「楽天Pay」や「楽天キャッシュ」の利用履歴を自動で取得して、スプレッドシートに保存してBIで見れたら便利だと思いやってみました\n今回は Google Apps Script (GAS) を使って、Gmailから自動で利用情報を取得し、Googleスプレッドシートに記録するスクリプトを作成します。 また、基本的に楽天payの支払いを楽天キャッシュからしているので支払いとチャージ料方法を取得するコードもつくりました。",{"id":5236,"title":967,"titles":5237,"content":5238,"level":35},"/posts/gas-checkrakutenpayemailsandlogdaily#_1-楽天pay版スクリプト",[937],"Gmailの「楽天Payアプリご利用内容確認メール」を解析。利用日時、店舗名、伝票番号、決済総額などを抽出。データをGoogleスプレッドシートに自動で記録。 function checkRakutenPayEmailsAndLogDaily() {\n  const sheetId = \"YOUR_SPREADSHEET_ID\"; // スプレッドシートIDを指定\n  const sheetName = \"楽天Payログ\"; // シート名を指定\n\n  const today = new Date();\n  today.setHours(0, 0, 0, 0);\n  const yesterday = new Date(today);\n  yesterday.setDate(today.getDate() - 1);\n  const startDate = Utilities.formatDate(yesterday, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n  const endDate = Utilities.formatDate(today, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n\n  const searchQuery = `from:no-reply@pay.rakuten.co.jp subject:\"楽天ペイアプリご利用内容確認メール\" after:${startDate} before:${endDate}`;\n  const sheet = SpreadsheetApp.openById(sheetId).getSheetByName(sheetName);\n  if (!sheet) throw new Error(`シート \"${sheetName}\" が見つかりません`);\n\n  const threads = GmailApp.search(searchQuery);\n  if (threads.length === 0) {\n    console.log(\"前日分の対象メールはありません。\");\n    return;\n  }\n\n  threads.forEach(thread => {\n    const messages = thread.getMessages();\n    messages.forEach(message => {\n      const body = message.getPlainBody();\n      let date, receiptNumber, store, totalAmount, points, paymentMethod;\n\n      const dateMatch = body.match(/ご利用日時\\s+([\\d/]+\\(.\\)\\s+[\\d:]+)/);\n      const receiptMatch = body.match(/伝票番号\\s+([A-Z0-9-]+)/);\n      const storeMatch = body.match(/ご利用店舗\\s+(.+)/);\n      const totalAmountMatch = body.match(/決済総額\\s+¥([\\d,]+)/);\n      const pointsMatch = body.match(/ポイント\\s+([\\d,]+)/);\n      const paymentMatch = body.match(/お取引内容\\s+(.+)/);\n\n      date = dateMatch ? dateMatch[1] : \"不明\";\n      receiptNumber = receiptMatch ? receiptMatch[1] : \"不明\";\n      store = storeMatch ? storeMatch[1].trim() : \"不明\";\n      totalAmount = totalAmountMatch ? totalAmountMatch[1].replace(/,/g, '') : \"0\";\n      points = pointsMatch ? pointsMatch[1] : \"0\";\n      paymentMethod = paymentMatch ? paymentMatch[1].trim() : \"不明\";\n\n      sheet.appendRow([new Date(), date, receiptNumber, store, `¥${totalAmount}`, points, paymentMethod]);\n    });\n  });\n\n  console.log(\"前日分の楽天ペイのメール内容をスプレッドシートに記録しました。\");\n}",{"id":5240,"title":1242,"titles":5241,"content":5242,"level":35},"/posts/gas-checkrakutenpayemailsandlogdaily#_2-楽天キャッシュ版スクリプト",[937],"Gmailの「楽天キャッシュチャージ完了メール」を解析。取引日時、チャージ内容、金額を抽出。データをGoogleスプレッドシートに自動で記録。",{"id":5244,"title":1256,"titles":5245,"content":5246,"level":41},"/posts/gas-checkrakutenpayemailsandlogdaily#スクリプトコード",[937,1242],"function checkRakutenCashEmailsAndLogDaily() {\n  const sheetId = \"YOUR_SPREADSHEET_ID\"; // スプレッドシートIDを指定\n  const sheetName = \"楽天キャッシュログ\"; // シート名を指定\n\n  const today = new Date();\n  today.setHours(0, 0, 0, 0);\n  const yesterday = new Date(today);\n  yesterday.setDate(today.getDate() - 1);\n  const startDate = Utilities.formatDate(yesterday, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n  const endDate = Utilities.formatDate(today, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n\n  const searchQuery = `from:pointcharge@edy.rakuten.co.jp subject:\"【楽天キャッシュ】チャージ完了のお知らせ\" after:${startDate} before:${endDate}`;\n  const sheet = SpreadsheetApp.openById(sheetId).getSheetByName(sheetName);\n  if (!sheet) throw new Error(`シート \"${sheetName}\" が見つかりません`);\n\n  const threads = GmailApp.search(searchQuery);\n  if (threads.length === 0) {\n    console.log(\"前日分の対象メールはありません。\");\n    return;\n  }\n\n  threads.forEach(thread => {\n    const messages = thread.getMessages();\n    messages.forEach(message => {\n      const body = message.getPlainBody();\n      let transactionDate, content, amount;\n\n      const dateMatch = body.match(/\\[取引日時\\]\\s+([\\d/]+\\s+[\\d:]+)/);\n      const contentMatch = body.match(/\\[内容\\]\\s+(.+)/);\n      const amountMatch = body.match(/\\[金額\\]\\s+([\\d,]+)円/);\n\n      transactionDate = dateMatch ? dateMatch[1] : \"不明\";\n      content = contentMatch ? contentMatch[1].trim() : \"不明\";\n      amount = amountMatch ? amountMatch[1].replace(/,/g, '') : \"0\";\n\n      sheet.appendRow([new Date(), transactionDate, content, `¥${amount}`]);\n    });\n  });\n\n  console.log(\"前日分の楽天キャッシュのメール内容をスプレッドシートに記録しました。\");\n}",{"id":5248,"title":1443,"titles":5249,"content":5250,"level":35},"/posts/gas-checkrakutenpayemailsandlogdaily#_3-トリガー設定",[937],"どちらのスクリプトも毎日自動実行するには、Google Apps Script の トリガー機能 を活用します。 スクリプトエディタを開き、時計マーク（トリガー設定）をクリック。「トリガーを追加」を選択。必要なスクリプト関数（例: checkRakutenPayEmailsAndLogDaily）を選択。実行タイミングを「日付ベース」「午前1時」などに設定。",{"id":5252,"title":1474,"titles":5253,"content":5254,"level":35},"/posts/gas-checkrakutenpayemailsandlogdaily#終わりに",[937],"これで、毎日の支出やチャージ状況を取得できそうです。 これを元にBIなどでみるかもしくはマネーフォワードに自動的にスクレイピングのライブラリを使って登録するのもいいかもしれません。 html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":1636,"title":1506,"titles":5256,"content":1634,"level":28},[],{"id":5258,"title":1511,"titles":5259,"content":5260,"level":41},"/posts/gas-cloud-function-auth#経緯",[1506],"Google App Scriptだけでは外部ライブラリを使ったりnpmを使ったりするのが難しいの Cloud Functions で処理してデータを返してもらって作ろうと思った時の認証について ひとまず簡易なやり方で",{"id":5262,"title":1523,"titles":5263,"content":5264,"level":35},"/posts/gas-cloud-function-auth#結論",[1506],"GCPでOAuth 同意画面を作成Google App Script側をOAuth 同意画面作ったGCPプロジェクト作成appscript.jsonの編集してOAuthスコープの設定 あと下記のようなコードで認証できる function myFunction() {\n  const url = \"https://xxxxxx.cloudfunctions.net/xxxxx\"\n  const res = UrlFetchApp.fetch(url, {\n    headers: {\n      Authorization: `Bearer ${ScriptApp.getIdentityToken()}`\n    }\n  })\n  console.log(res.getContentText()) // Fnctiionの結果\n} GAS（GoogleAppsScript）から認証付きのCloud Functionsをサービスアカウントを使用して呼び出す #GoogleCloud - QiitaGASから認証付きのCloud Functionsを実行する。 #GoogleCloud - Qiita Google Apps Script (GAS) から Cloud Functions に認証付きでアクセスする – kkuchima memo Google Apps Script で書かれたアドオンのバックエンドを Cloud Run に移行した話 - Link and Motivation Developers' Blog GAS + CloudFunctionsでVisionAPIの処理結果をスプレッドシートに出力する #GoogleAppsScript - Qiita html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":1822,"title":1645,"titles":5266,"content":5267,"level":28},[],"Google Apps ScriptでGoogle Driveフォルダ内のCSVファイルをまとめて読み込み、スプレッドシートに書き込むコード function importData() {\n\n  // 対象フォルダを指定\n  const ss = SpreadsheetApp.getActiveSpreadsheet();\n  const sheet = ss.getSheetByName(\"data\"); //シート名\n  const folder = DriveApp.getFolderById('xxxxx'); //フォルダパスを指定\n\n\n\n  sheet.getRange(2, 1, sheet.getLastRow(), sheet.getLastColumn()).clear()\n\n  const files = folder.getFiles();\n  let sortFiles = []\n  while (files.hasNext()) {\n    sortFiles.push(files.next());\n  }\n  sortFiles.sort(function (a, b) { if (a.getName() > b.getName()) { return 1 } else { return -1 } })\n\n\n  let allSetData = []\n  for (const iterator of sortFiles) {\n    const file = iterator;\n    // 取込処理\n    const data = file.getBlob().getDataAsString(\"UTF-8\");\n    const csv = Utilities.parseCsv(data);\n    const setData = csv\n    setData.shift()\n    setData.reverse()\n    const lastRow = sheet.getLastRow();\n    Logger.log(setData)\n\n    allSetData = [...allSetData, ...setData]\n    // CSV書込\n    if (setData.length > 0) sheet.getRange(lastRow + 1, 1, setData.length, setData[0].length).setValues(setData); html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":2020,"title":1829,"titles":5269,"content":5270,"level":28},[],"Google Apps Scriptでオブジェクトから生成したCSVを、同名ファイルの重複を避けつつGoogle Driveへ保存するコード const sample = { id:1 ,name:\"aa\"} // サンプル実際のデータに直して\n\nconst fileName = \"test.csv\"\n\n\n\nconst blob = createBlob(csv, fileName)\n\ndeleteAndWriteDrive(blob, folderId, fileName)\n\nfunction deleteAndWriteDrive(csvBlob, folderId,fileName) {\n  const drive = DriveApp.getFolderById(folderId);\n  const files = drive.getFiles();\n  let sortFiles = []\n  while (files.hasNext()) {\n    sortFiles.push(files.next());\n  }\n  sortFiles.sort(function (a, b) { if (a.getName() > b.getName()) { return 1 } else { return -1 } })\n\n  for (const iterator of sortFiles) {\n    const file = iterator;\n    if (file.getName() === fileName) {\n      hasFileName = file.getName()\n      console.log(`${hasFileName}フォルダが存在します。`)\n      file.setTrashed(true)\n      break\n    }\n  }\n  \n  drive.createFile(csvBlob);\n}\n\nfunction createBlob(csv, fileName) {\n  const contentType = 'text/csv';\n  const charset = 'utf-8';\n  const blob = Utilities.newBlob('', contentType, fileName).setDataFromString(csv, charset);\n  return blob;\n} html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":2288,"title":2027,"titles":5272,"content":5273,"level":28},[],"JavaScriptで配列内の要素ごとの出現回数を数え、最も多く出現する回数を求めるコードのメモ const array = [1, 1, 1, 2, 2, 3];\n\nconst map = array.reduce(\n  (acc, curr) => acc.set(curr, (acc.get(curr) || 0) + 1),\n  new Map()\n);\n\nconsole.log([...map.keys()]); // [1, 2, 3]\nconsole.log([...map.values()]); // [3, 2, 1]\nconsole.log([...map.entries()]); // [[1, 3], [2, 2], [3, 1]]\n\nconst arrayCountMax = Math.max(...map.values()) //3",{"id":5275,"title":2265,"titles":5276,"content":5277,"level":41},"/posts/js-array-count-max#参考",[2027],"https://qiita.com/saka212/items/408bb17dddefc09004c8 https://pote-chil.com/blog/count-duplicate-array-item html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":4513,"title":2295,"titles":5279,"content":4511,"level":28},[],{"id":5281,"title":940,"titles":5282,"content":5283,"level":35},"/posts/notion-to-google-calender-1103#はじめに",[2295],"NotionのタスクをGoogleカレンダーと自動で同期させるシステムの実装方法を紹介します。このシステムにより、Notionで管理しているタスクの期限日を自動的にGoogleカレンダーに反映させることができます。ただしGoogleカレンダーの変更をNotionに反映することは想定していません。 また、完了したタスクはGoogleカレンダータスクを同期しているカレンダーとは別のカレンダに移動させるようにしています。",{"id":5285,"title":2308,"titles":5286,"content":20,"level":35},"/posts/notion-to-google-calender-1103#システムの概要",[2295],{"id":5288,"title":2311,"titles":5289,"content":5290,"level":41},"/posts/notion-to-google-calender-1103#主な機能",[2295,2308],"Notionの新規タスクを自動的にGoogleカレンダーに追加タスクの更新（タイトル、期限）をカレンダーに反映完了したタスクのカレンダーイベントを自動削除定期的に同期",{"id":5292,"title":2328,"titles":5293,"content":5294,"level":41},"/posts/notion-to-google-calender-1103#必要な準備",[2295,2308],"Notion API キーNotionデータベースの設定GoogleカレンダーGoogle Apps Script環境",{"id":5296,"title":2345,"titles":5297,"content":20,"level":35},"/posts/notion-to-google-calender-1103#実装方法",[2295],{"id":5299,"title":2349,"titles":5300,"content":5301,"level":41},"/posts/notion-to-google-calender-1103#_1-設定",[2295,2345],"必要な認証情報とIDを設定します： const CONFIG = {\n  NOTION_API_KEY: 'your-notion-api-key',\n  NOTION_DATABASE_ID: 'your-database-id',\n  CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  DONE_CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  NOTION_VERSION: '2022-06-28'\n};",{"id":5303,"title":2396,"titles":5304,"content":20,"level":41},"/posts/notion-to-google-calender-1103#_2-notionとの連携",[2295,2345],{"id":5306,"title":2399,"titles":5307,"content":5308,"level":41},"/posts/notion-to-google-calender-1103#タスク取得",[2295,2345],"// Notionからタスク一覧を取得\nfunction getNotionTasks() {\n  const url = `https://api.notion.com/v1/databases/${CONFIG.NOTION_DATABASE_ID}/query`;\n  const response = UrlFetchApp.fetch(url, {\n    method: 'POST',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      sorts: [\n        {\n          property: 'DueDate', // 日付プロパティ名\n          direction: 'descending' // 昇順にソート（降順の場合は'descending'に変更）\n        }\n      ],\n    })\n  });",{"id":5310,"title":2481,"titles":5311,"content":5312,"level":41},"/posts/notion-to-google-calender-1103#タスク更新",[2295,2345],"// Notionのタスクを更新（カレンダーイベントIDの保存）\nfunction updateNotionTask(taskId, calendarEventId) {\n  const url = `https://api.notion.com/v1/pages/${taskId}`;\n  return UrlFetchApp.fetch(url, {\n    method: 'PATCH',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      properties: {\n        'Calendar Event ID': {\n          rich_text: [{\n            text: { content: calendarEventId }\n          }]\n        }\n      }\n    })\n  });\n}",{"id":5314,"title":2569,"titles":5315,"content":20,"level":41},"/posts/notion-to-google-calender-1103#_3-googleカレンダーとの連携",[2295,2345],{"id":5317,"title":2572,"titles":5318,"content":5319,"level":41},"/posts/notion-to-google-calender-1103#イベント作成",[2295,2345],"function createCalendarEvent(task) {\n  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n  const title = task.properties.Name.title[0].plain_text;\n  const dueDate = new Date(task.properties.DueDate.date.start);\n\n  const event = calendar.createAllDayEvent(\n    title,\n    dueDate,\n    { description: `Notion Task ID: ${task.id}\\\\nURL: ${task.url}` }\n  );\n\n  return event.getId();\n}",{"id":5321,"title":2643,"titles":5322,"content":5323,"level":41},"/posts/notion-to-google-calender-1103#_4-状態管理",[2295,2345],"タスクの状態を管理するための機能： // タスクの現在の状態を取得\nfunction getTaskState(task) {\n  return {\n    id: task.id,\n    title: task.properties.Name.title[0].plain_text,\n    dueDate: task.properties.DueDate.date?.start,\n    status: task.properties.Status.status ? task.properties.Status.status.name : \"None\",\n    calendarEventId: task.properties['Calendar Event ID']?.rich_text[0]?.text.content\n  };\n}",{"id":5325,"title":2708,"titles":5326,"content":5327,"level":41},"/posts/notion-to-google-calender-1103#_5-メイン同期処理",[2295,2345],"function syncNotionWithCalendar() {\n  try {\n    const tasks = getNotionTasks();\n    const previousState = getPreviousState();\n    const currentState = {};\n\n    tasks.forEach(task => {\n      currentState[task.id] = getTaskState(task);\n    });\n\n    tasks.forEach(task => {\n      processTaskChanges(task, previousState, currentState);\n    });\n\n    processDeletedTasks(previousState, currentState);\n    savePreviousState(currentState);\n\n  } catch (error) {\n    logError(error, 'メイン同期処理');\n  }\n}",{"id":5329,"title":2812,"titles":5330,"content":20,"level":35},"/posts/notion-to-google-calender-1103#実装のポイント",[2295],{"id":5332,"title":2816,"titles":5333,"content":5334,"level":41},"/posts/notion-to-google-calender-1103#_1-エラーハンドリング",[2295,2812],"各処理でtry-catchを使用エラーログの記録コンテキスト情報の保持",{"id":5336,"title":2831,"titles":5337,"content":5338,"level":41},"/posts/notion-to-google-calender-1103#_2-キャッシュの活用",[2295,2812],"前回の状態をキャッシュに保存6時間のキャッシュ有効期限差分検出による効率的な更新",{"id":5340,"title":2846,"titles":5341,"content":5342,"level":41},"/posts/notion-to-google-calender-1103#_3-定期実行の設定",[2295,2812],"// 定期実行トリガーの設定\nfunction setUpTrigger() {\n  // 既存のトリガーを削除\n  ScriptApp.getProjectTriggers().forEach(trigger => {\n    ScriptApp.deleteTrigger(trigger);\n  });\n\n  // 新しいトリガーを作成（1時間ごとに実行）\n  ScriptApp.newTrigger('syncNotionWithCalendar')\n    .timeBased()\n    .everyHours(1)\n    .create();\n}",{"id":5344,"title":2336,"titles":5345,"content":5346,"level":35},"/posts/notion-to-google-calender-1103#notionデータベースの設定",[2295],"きちんとtextかstatusか日付か合わせる 必要な項目： Name（タイトル）DueDate（期限日）Status（ステータス）Calendar Event ID（カレンダー連携用）",{"id":5348,"title":2939,"titles":5349,"content":5350,"level":35},"/posts/notion-to-google-calender-1103#セットアップ手順",[2295],"Google Apps Scriptプロジェクトの作成Notion APIキーの取得\nNotion APIキーは Notion Developer から取得できます。Notionデータベースの準備\n同期したいデータベースのURLから、IDを取得します。GoogleカレンダーIDを確認する。\nメインカレンダーの場合はprimary、他のカレンダーの場合はカレンダー設定画面でIDを確認してください。コードの貼り付けと設定トリガーの設定\nsetUpTriggerの実行 自分の頻度に合わせて権限の設定初回実行時にGoogleカレンダーへのアクセス権限を求められますので、許可します。 // API キーやIDを管理する設定オブジェクト\nconst CONFIG = {\n  NOTION_API_KEY: 'your-notion-api-key',\n  NOTION_DATABASE_ID: 'your-database-id',\n  CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  DONE_CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  NOTION_VERSION: '2022-06-28'\n};\n\n// Notionの共通ヘッダー設定\nconst NOTION_HEADERS = {\n  'Authorization': `Bearer ${CONFIG.NOTION_API_KEY}`,\n  'Notion-Version': CONFIG.NOTION_VERSION,\n  'Content-Type': 'application/json'\n};\n\n\n\n\n\n// メイン同期処理\nfunction syncNotionWithCalendar() {\n  try {\n    // タスク一覧の取得\n    const tasks = getNotionTasks();\n    const previousState = getPreviousState();\n    const currentState = {};\n\n    // 現在の状態を構築\n    console.log(\"現在の状態を構築\")\n    tasks.forEach(task => {\n\n      currentState[task.id] = getTaskState(task);\n    });\n\n    console.log(\"タスクの変更を処理\")\n    // タスクの変更を処理\n    tasks.forEach(task => {\n      console.log(\"currentState\", currentState[task.id])\n      console.log(\"previousState\", previousState[task.id])\n      processTaskChanges(task, previousState, currentState);\n    });\n\n    // 削除されたタスクを処理\n    console.log(\"削除されたタスクを処理\")\n    processDeletedTasks(previousState, currentState);\n\n    // 現在の状態を保存\n    console.log(\"現在の状態を保存\")\n    savePreviousState(currentState);\n\n  } catch (error) {\n    logError(error, 'メイン同期処理');\n  }\n}\n\n\n\n\n// Notionからタスク一覧を取得\nfunction getNotionTasks() {\n  const url = `https://api.notion.com/v1/databases/${CONFIG.NOTION_DATABASE_ID}/query`;\n  const response = UrlFetchApp.fetch(url, {\n    method: 'POST',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      sorts: [\n        {\n          property: 'DueDate', // 日付プロパティ名\n          direction: 'descending' // 昇順にソート（降順の場合は'descending'に変更）\n        }\n      ],\n    })\n  });\n\n  console.log(\"next_cursor\", JSON.parse(response.getContentText()).next_cursor)\n  return JSON.parse(response.getContentText()).results;\n}\n\n// Notionのタスクを更新（カレンダーイベントIDの保存）\nfunction updateNotionTask(taskId, calendarEventId) {\n  const url = `https://api.notion.com/v1/pages/${taskId}`;\n  return UrlFetchApp.fetch(url, {\n    method: 'PATCH',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      properties: {\n        'Calendar Event ID': {\n          rich_text: [{\n            text: { content: calendarEventId }\n          }]\n        }\n      }\n    })\n  });\n}\n\n// カレンダーイベントの新規作成\nfunction createCalendarEvent(task, CALENDAR_ID) {\n  const calendar = CalendarApp.getCalendarById(CALENDAR_ID);\n  const title = task.properties.Name.title[0].plain_text;\n  const dueDate = new Date(task.properties.DueDate.date.start);\n\n  if (!dueDate) return\n\n  const event = calendar.createAllDayEvent(\n    title,\n    dueDate,\n    { description: `Notion Task ID: ${task.id}\\nURL: ${task.url}` }\n  );\n\n  console.log(event)\n  return event.getId();\n}\n\n// カレンダーイベントの更新\nfunction updateCalendarEvent(eventId, task) {\n  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n  const event = calendar.getEventById(eventId);\n  if (!event) return;\n\n  const title = task.properties.Name.title[0].plain_text;\n  const dueDate = new Date(task.properties.DueDate.date.start);\n\n  event.setTitle(title);\n  event.setAllDayDate(dueDate);\n  event.setDescription(`Notion Task ID: ${task.id}\\nURL: ${task.url}`);\n}\n\n// カレンダーイベントの削除\nfunction deleteCalendarEvent(eventId) {\n  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n\n  try {\n    const event = calendar.getEventById(eventId);\n    if (event) {\n      event.deleteEvent();\n      return true\n    }\n  } catch (e) {\n    console.error(\"削除されている\", e)\n    return false\n\n  }\n\n  return false\n}\n\n// タスクの現在の状態を取得\nfunction getTaskState(task) {\n  return {\n    id: task.id,\n    title: task.properties.Name.title[0].plain_text,\n    dueDate: task.properties.DueDate.date?.start,\n    status: task.properties.Status.status ? task.properties.Status.status.name : \"None\",\n    calendarEventId: task.properties['Calendar Event ID']?.rich_text[0]?.text.content\n  };\n}\n\n// キャッシュから前回の状態を取得\nfunction getPreviousState() {\n  const cache = CacheService.getScriptCache();\n  const data = cache.get('previousState');\n\n  console.log(JSON.parse(data))\n  return data ? JSON.parse(data) : {};\n}\n\n// 現在の状態をキャッシュに保存（6時間有効）\nfunction savePreviousState(state) {\n  const cache = CacheService.getScriptCache();\n  cache.put('previousState', JSON.stringify(state), 21600);\n}\n\n// タスクの変更を検出して必要な処理を実行\nfunction processTaskChanges(task, previousState, currentState) {\n  const taskId = task.id;\n  const prevTask = previousState[taskId];\n  const currentTask = currentState[taskId];\n\n  try {\n    if (!prevTask && task.properties.DueDate?.date?.start) {\n      // 新規タスクの処理\n      console.log(\"新規タスクの処理\")\n      const calendarEventId = createCalendarEvent(task, CONFIG.CALENDAR_ID);\n      updateNotionTask(taskId, calendarEventId);\n    } else if (prevTask && prevTask.dueDate) {\n      // 既存タスクの処理\n      console.log(\"既存タスクの処理\")\n      const calendarEventId = prevTask.calendarEventId;\n      if (currentTask.status === 'Deleted') {\n        // 削除されたタスクの処理\n        console.log(\"削除されたタスクの処理\")\n        deleteCalendarEvent(calendarEventId);\n\n      } else if (\n        prevTask.title !== currentTask.title ||\n        prevTask.dueDate !== currentTask.dueDate\n      ) {\n        // タスクが更新された場合の処理\n        console.log(\"タスクが更新された場合の処理\")\n        updateCalendarEvent(calendarEventId, task);\n      } else if (currentTask.status === 'Done') {\n        // ステータスが完了タスクの処理\n        console.log(\"ステータスが完了タスクの処理\")\n        const reslut = deleteCalendarEvent(calendarEventId);\n        console.log(\"ステータスが完了タスクの処理終了 google カレンダー削除 \",reslut)\n\n        // 削除がない場合終了\n        if (!reslut) return\n\n        console.log(\"別カレンダーに完了を作成\")\n        // 別カレンダーに完了を作成\n        createCalendarEvent(task, CONFIG.DONE_CALENDAR_ID);\n        updateNotionTask(taskId, \"done\");\n        console.log(\"別カレンダーに完了を作成終了\")\n      }\n    }\n  } catch (error) {\n    logError(error, `タスク処理エラー - TaskID: ${taskId}`);\n  }\n}\n\n// 削除されたタスクの処理\nfunction processDeletedTasks(previousState, currentState) {\n  Object.keys(previousState).forEach(taskId => {\n    if (!currentState[taskId]) {\n      const calendarEventId = previousState[taskId].calendarEventId;\n      if (calendarEventId) {\n        try {\n          deleteCalendarEvent(calendarEventId);\n        } catch (error) {\n          logError(error, `削除済みタスクの処理エラー - TaskID: ${taskId}`);\n        }\n      }\n    }\n  });\n}\n\n// エラーログの記録\nfunction logError(error, context = '') {\n  console.error(`同期エラー ${context}:`, error);\n  // 必要に応じて追加のエラーハンドリング（Slack通知やメール送信など）\n\n\n}\n\n// 特定のキャッシュキーを削除する関数\nfunction clearPreviousStateCache() {\n  const cache = CacheService.getScriptCache();\n  cache.remove('previousState');\n  console.log(\"キャッシュ 'previousState' を削除しました\");\n}\n\n// 定期実行トリガーの設定\nfunction setUpTrigger() {\n  // 既存のトリガーを削除\n  ScriptApp.getProjectTriggers().forEach(trigger => {\n    ScriptApp.deleteTrigger(trigger);\n  });\n\n  // 新しいトリガーを作成（1時間ごとに実行）\n  ScriptApp.newTrigger('syncNotionWithCalendar')\n    .timeBased()\n    .everyHours(1)\n    .create();\n}",{"id":5352,"title":4404,"titles":5353,"content":5354,"level":35},"/posts/notion-to-google-calender-1103#注意点",[2295],"APIキーの管理\n重要な認証情報は適切に管理プロジェクト設定での管理を推奨エラー処理\nネットワークエラーへの対応API制限の考慮→ noiton api (１回で100件のページしかとれない)とgasの制限に注意 (稼働時間、fetchのリクエスト回数など)データ整合性の確保→手動編集する場合はnotinのみ編集するパフォーマンス\n不要な API 呼び出しの削減キャッシュの活用適切な実行間隔の設定",{"id":5356,"title":518,"titles":5357,"content":5358,"level":35},"/posts/notion-to-google-calender-1103#まとめ",[2295],"このシステムにより、NotionとGoogleカレンダーの連携が自動化され、タスク管理がより効率的になります。実装方法は目的や好みに応じて選択できます。 エラー処理やパフォーマンスの最適化など、実運用時の考慮点も含めて実装することで、より安定した運用が可能になります。",{"id":5360,"title":4456,"titles":5361,"content":5362,"level":35},"/posts/notion-to-google-calender-1103#参考文献",[2295],"Notion API DocumentationGoogle Calendar API DocumentationGoogle Apps Script Documentation html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":4612,"title":4522,"titles":5364,"content":5365,"level":28},[],"@nuxt/contentでカテゴリー・タグ・関連記事・目次機能を備えた自分のブログを作った構成の紹介 自分のブログを下記の構成でつくってみました。 https://tori-dev.com/",{"id":5367,"title":4536,"titles":5368,"content":5369,"level":35},"/posts/nuxt-blog#機能",[4522],"@nuxt/contentを使用したブログ作成のメイン機能について説明します。以下の機能が含まれます。 カテゴリータグ関連記事目次 また、アイキャッチの自動生成は現在のところ実装されていませんが、今後のアップデートで追加予定です。",{"id":5371,"title":4559,"titles":5372,"content":5373,"level":35},"/posts/nuxt-blog#記事の作成方法",[4522],"ブログ記事の作成方法は以下のいずれかを選ぶことができます。 ローカルでダウンロードしてデプロイする方法\nNotionを使用する場合Markdownを使用する場合（Google Drive + Markdownツールなどを利用）microCMS（ヘッドレスCMS）を使用する方法 それぞれの方法によって、使いやすさや環境に合わせて選択できます。",{"id":5375,"title":4586,"titles":5376,"content":5377,"level":35},"/posts/nuxt-blog#デプロイ先",[4522],"作成したブログを公開するためのデプロイ先は、以下のオプションがあります。 Firebase HostingNetlify どちらのプラットフォームも高性能で信頼性があり、使いやすいインターフェースを提供しています。",{"id":4657,"title":4620,"titles":5379,"content":5380,"level":28},[],"NuxtのasyncData・created・mounted・computed・watchなどライフサイクルの挙動を整理したメモ asyncDataはssaのときはクライアントでssgのときはgenerate時にしかできない以下はクライアントで動く\ncreated：インスタンス初期化時、DOMが生成される前mounted：インスタンス初期化時、DOMが生成された後computed： 算出プロパティgetter,setterが使えるwatch：データの変化をトリガにしたフック",{"id":5147,"title":4664,"titles":5382,"content":5145,"level":28},[],{"id":5384,"title":4669,"titles":5385,"content":4674,"level":35},"/posts/try-react-signature-canvas#react-signature-canvas",[4664],{"id":5387,"title":4678,"titles":5388,"content":5389,"level":41},"/posts/try-react-signature-canvas#主な特徴",[4664,4669],"キャンバスベースのシンプルなサイン機能タッチデバイスとマウスの両方に対応サインのクリア、保存、読み込みなどの基本機能を提供カスタマイズ可能なスタイルとオプション",{"id":5391,"title":4695,"titles":5392,"content":5393,"level":41},"/posts/try-react-signature-canvas#やってみて",[4664,4669],"公式を見ながらやったら意外といけた useRefを使うのと保存したデータURLを取り込んだ時に画像が小さくなってしまうとこに少し困った。 import SignatureCanvas from \"react-signature-canvas\";\nimport { FC, useState, useRef, useEffect } from \"react\";\n\n\n\n\n/**\n * サイン\n *\n * @returns サイン\n */\nconst Signature: FC\u003CProps> = () => {\n\n\n  const [trimmedDataURL, setTrimmedDataURL] = useState\u003Cstring>(\"\");\n  const padRef = useRef\u003CSignatureCanvas>(null);\n\n\n  /* -------------------------------- Methods ------------------------------- */\n\n  /**\n   * サインクリア\n   *\n   */\n  const clear = () => {\n    padRef.current?.clear();\n  };\n\n  /**\n   *サインURlに変換保存\n   *\n   */\n  const trim = () => {\n    const url = padRef.current?.getTrimmedCanvas().toDataURL(\"image/png\");\n    if (url) {\n      setTrimmedDataURL(url);\n\n      // どこかへ保存する\n    }\n  };\n\n  useEffect(() => {\n    /**\n     *初期実行\n     *\n     */\n    const init = async () => {\n\n                const url = \"ここで保存先から取得\"\n          \n          // fromDataURLでSignatureCanvasに\n          // 保存したデータURL取り込むきちんと幅と高さを合わせないと画像が小さくなったりする\n        padRef.current?.fromDataURL(url, {\n          width: 800,\n          height: 200\n        });\n        setTrimmedDataURL(url);\n      }\n    };\n\n    init();\n  }, []);\n\n\n  return (\n    \u003C>\n      \u003CSignatureCanvas\n        penColor=\"white\"\n        backgroundColor=\"gray\"\n        canvasProps={{ width: 800, height: 200 }}\n        ref={padRef}\n      />\n      \u003Cdiv>\n        {trimmedDataURL ? (\n          \u003Cimg alt=\"signature\" src={trimmedDataURL} width={80} height={20} />\n        ) : null}\n      \u003C/div>Ï\n          \u003CButton onClick={() => clear()} >\n            clear\n          \u003C/Button>\n          \u003CButton onClick={() => trim()} >\n               trim\n          \u003C/Button>\n\n    \u003C/>\n  );\n}; 参考 react-signature-canvas - npm agilgur5/react-signature-canvas: A React wrapper component around signature_pad (in \u003C 150 LoC). Unopinionated and heavily updated fork of react-signature-pad html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",[5395,5537,5769,5921,6002,6026,6482,6582,6733,6904,7118,8840,8909,8938],{"id":5,"title":6,"body":5396,"categories":5533,"cross_post":215,"date":216,"description":217,"extension":218,"image":20,"meta":5534,"navigation":31,"note_id":215,"note_url":215,"path":220,"private":221,"qiita_id":215,"qiita_url":215,"seo":5535,"stem":223,"tags":5536,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":227},{"type":8,"value":5397,"toc":5530},[5398,5400,5528],[11,5399,13],{"id":13},[15,5401,5402],{"className":17,"code":18,"language":19,"meta":20,"style":20},[22,5403,5404,5408,5412,5416,5420,5424,5428,5432,5436,5440,5444,5448,5452,5456,5460,5464,5468,5472,5476,5480,5484,5488,5492,5496,5500,5504,5508,5512,5516,5520,5524],{"__ignoreMap":20},[25,5405,5406],{"class":27,"line":28},[25,5407,32],{"emptyLinePlaceholder":31},[25,5409,5410],{"class":27,"line":35},[25,5411,38],{},[25,5413,5414],{"class":27,"line":41},[25,5415,32],{"emptyLinePlaceholder":31},[25,5417,5418],{"class":27,"line":46},[25,5419,49],{},[25,5421,5422],{"class":27,"line":52},[25,5423,55],{},[25,5425,5426],{"class":27,"line":58},[25,5427,32],{"emptyLinePlaceholder":31},[25,5429,5430],{"class":27,"line":63},[25,5431,66],{},[25,5433,5434],{"class":27,"line":69},[25,5435,72],{},[25,5437,5438],{"class":27,"line":75},[25,5439,32],{"emptyLinePlaceholder":31},[25,5441,5442],{"class":27,"line":80},[25,5443,83],{},[25,5445,5446],{"class":27,"line":86},[25,5447,89],{},[25,5449,5450],{"class":27,"line":92},[25,5451,32],{"emptyLinePlaceholder":31},[25,5453,5454],{"class":27,"line":97},[25,5455,100],{},[25,5457,5458],{"class":27,"line":103},[25,5459,106],{},[25,5461,5462],{"class":27,"line":109},[25,5463,32],{"emptyLinePlaceholder":31},[25,5465,5466],{"class":27,"line":114},[25,5467,117],{},[25,5469,5470],{"class":27,"line":120},[25,5471,123],{},[25,5473,5474],{"class":27,"line":126},[25,5475,129],{},[25,5477,5478],{"class":27,"line":132},[25,5479,135],{},[25,5481,5482],{"class":27,"line":138},[25,5483,141],{},[25,5485,5486],{"class":27,"line":144},[25,5487,147],{},[25,5489,5490],{"class":27,"line":150},[25,5491,153],{},[25,5493,5494],{"class":27,"line":156},[25,5495,159],{},[25,5497,5498],{"class":27,"line":162},[25,5499,165],{},[25,5501,5502],{"class":27,"line":168},[25,5503,171],{},[25,5505,5506],{"class":27,"line":174},[25,5507,177],{},[25,5509,5510],{"class":27,"line":180},[25,5511,183],{},[25,5513,5514],{"class":27,"line":186},[25,5515,32],{"emptyLinePlaceholder":31},[25,5517,5518],{"class":27,"line":191},[25,5519,194],{},[25,5521,5522],{"class":27,"line":197},[25,5523,200],{},[25,5525,5526],{"class":27,"line":203},[25,5527,206],{},[208,5529,210],{},{"title":20,"searchDepth":35,"depth":35,"links":5531},[5532],{"id":13,"depth":35,"text":13},[19],{},{"title":6,"description":217},[225,226],{"id":229,"title":230,"body":5538,"categories":5765,"cross_post":215,"date":552,"description":553,"extension":218,"image":20,"meta":5766,"navigation":31,"note_id":215,"note_url":215,"path":555,"private":221,"qiita_id":215,"qiita_url":215,"seo":5767,"stem":557,"tags":5768,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":561},{"type":8,"value":5539,"toc":5758},[5540,5542,5544,5546,5548,5550,5552,5554,5562,5570,5572,5574,5576,5578,5580,5582,5584,5586,5594,5596,5598,5600,5602,5610,5612,5614,5616,5618,5620,5622,5624,5626,5634,5636,5638,5640,5642,5644,5646,5648,5650,5652,5654,5656,5658,5666,5674,5676,5678,5680,5682,5684,5686,5688,5690,5692,5694,5696,5704,5706,5708,5710,5712,5714,5716,5718,5720,5722,5724,5732,5740,5742,5744,5746,5748,5750,5752,5754,5756],[11,5541,236],{"id":235},[238,5543,240],{},[238,5545,243],{},[238,5547,246],{},[238,5549,249],{},[238,5551,252],{},[238,5553,255],{},[238,5555,5556,5558,5560],{},[259,5557],{},[262,5559],{"src":264,"style":265,"frameBorder":266},[259,5561],{},[238,5563,5564,5566,5568],{},[259,5565],{},[262,5567],{"src":275,"style":265,"frameBorder":266},[259,5569],{},[11,5571,281],{"id":280},[238,5573,284],{},[238,5575,287],{},[238,5577,290],{},[238,5579,293],{},[238,5581,296],{},[238,5583,299],{},[238,5585,302],{},[304,5587,5588,5590,5592],{},[307,5589,309],{},[307,5591,312],{},[307,5593,315],{},[238,5595,318],{},[238,5597,321],{},[238,5599,324],{},[238,5601,327],{},[238,5603,5604,5606,5608],{},[259,5605],{},[262,5607],{"src":334,"style":265,"frameBorder":266},[259,5609],{},[238,5611,339],{},[238,5613,342],{},[238,5615,345],{},[238,5617,348],{},[238,5619,351],{},[238,5621,354],{},[238,5623,357],{},[238,5625,360],{},[238,5627,5628,5630,5632],{},[259,5629],{},[262,5631],{"src":367,"style":265,"frameBorder":266},[259,5633],{},[11,5635,373],{"id":372},[238,5637,376],{},[238,5639,379],{},[238,5641,382],{},[238,5643,385],{},[238,5645,388],{},[238,5647,391],{},[238,5649,394],{},[238,5651,397],{},[238,5653,400],{},[238,5655,403],{},[238,5657,406],{},[238,5659,5660,5662,5664],{},[259,5661],{},[262,5663],{"src":413,"style":265,"frameBorder":266},[259,5665],{},[238,5667,5668,5670,5672],{},[259,5669],{},[262,5671],{"src":422,"style":265,"frameBorder":266},[259,5673],{},[238,5675,427],{},[238,5677,430],{},[238,5679,433],{},[11,5681,437],{"id":436},[238,5683,440],{},[238,5685,443],{},[238,5687,446],{},[238,5689,449],{},[238,5691,452],{},[238,5693,455],{},[238,5695,458],{},[238,5697,5698,5700,5702],{},[259,5699],{},[262,5701],{"src":465,"style":265,"frameBorder":266},[259,5703],{},[238,5705,470],{},[238,5707,473],{},[238,5709,476],{},[238,5711,479],{},[238,5713,482],{},[238,5715,485],{},[238,5717,488],{},[238,5719,491],{},[238,5721,494],{},[238,5723,497],{},[238,5725,5726,5728,5730],{},[259,5727],{},[262,5729],{"src":504,"style":265,"frameBorder":266},[259,5731],{},[238,5733,5734,5736,5738],{},[259,5735],{},[262,5737],{"src":513,"style":265,"frameBorder":266},[259,5739],{},[11,5741,518],{"id":518},[238,5743,521],{},[238,5745,524],{},[238,5747,527],{},[238,5749,530],{},[238,5751,533],{},[238,5753,536],{},[238,5755,539],{},[238,5757,542],{},{"title":20,"searchDepth":35,"depth":35,"links":5759},[5760,5761,5762,5763,5764],{"id":235,"depth":35,"text":236},{"id":280,"depth":35,"text":281},{"id":372,"depth":35,"text":373},{"id":436,"depth":35,"text":437},{"id":518,"depth":35,"text":518},[551],{},{"title":230,"description":553},[559,560],{"id":563,"title":564,"body":5770,"categories":5917,"cross_post":215,"date":766,"description":767,"extension":218,"image":20,"meta":5918,"navigation":31,"note_id":215,"note_url":215,"path":769,"private":221,"qiita_id":215,"qiita_url":215,"seo":5919,"stem":771,"tags":5920,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":773},{"type":8,"value":5771,"toc":5914},[5772,5774,5912],[11,5773,569],{"id":569},[15,5775,5776],{"className":572,"code":573,"language":574,"meta":20,"style":20},[22,5777,5778,5786,5790,5804,5808,5828,5832,5836,5844,5852,5872,5888,5908],{"__ignoreMap":20},[25,5779,5780,5782,5784],{"class":27,"line":28},[25,5781,582],{"class":581},[25,5783,586],{"class":585},[25,5785,589],{"class":581},[25,5787,5788],{"class":27,"line":35},[25,5789,32],{"emptyLinePlaceholder":31},[25,5791,5792,5794,5796,5798,5800,5802],{"class":27,"line":41},[25,5793,599],{"class":598},[25,5795,603],{"class":602},[25,5797,606],{"class":598},[25,5799,609],{"class":581},[25,5801,612],{"class":585},[25,5803,615],{"class":581},[25,5805,5806],{"class":27,"line":46},[25,5807,32],{"emptyLinePlaceholder":31},[25,5809,5810,5812,5814,5816,5818,5820,5822,5824,5826],{"class":27,"line":52},[25,5811,599],{"class":598},[25,5813,626],{"class":602},[25,5815,606],{"class":598},[25,5817,631],{"class":598},[25,5819,634],{"class":581},[25,5821,637],{"class":585},[25,5823,640],{"class":581},[25,5825,644],{"class":643},[25,5827,647],{"class":581},[25,5829,5830],{"class":27,"line":58},[25,5831,32],{"emptyLinePlaceholder":31},[25,5833,5834],{"class":27,"line":63},[25,5835,657],{"class":656},[25,5837,5838,5840,5842],{"class":27,"line":69},[25,5839,662],{"class":581},[25,5841,665],{"class":585},[25,5843,668],{"class":581},[25,5845,5846,5848,5850],{"class":27,"line":75},[25,5847,662],{"class":581},[25,5849,665],{"class":585},[25,5851,677],{"class":581},[25,5853,5854,5856,5858,5860,5862,5864,5866,5868,5870],{"class":27,"line":80},[25,5855,662],{"class":581},[25,5857,665],{"class":585},[25,5859,686],{"class":581},[25,5861,689],{"class":585},[25,5863,692],{"class":581},[25,5865,696],{"class":695},[25,5867,699],{"class":581},[25,5869,702],{"class":598},[25,5871,705],{"class":581},[25,5873,5874,5876,5878,5880,5882,5884,5886],{"class":27,"line":86},[25,5875,710],{"class":581},[25,5877,713],{"class":585},[25,5879,692],{"class":581},[25,5881,696],{"class":695},[25,5883,699],{"class":581},[25,5885,702],{"class":598},[25,5887,724],{"class":581},[25,5889,5890,5892,5894,5896,5898,5900,5902,5904,5906],{"class":27,"line":92},[25,5891,729],{"class":581},[25,5893,665],{"class":585},[25,5895,734],{"class":581},[25,5897,737],{"class":602},[25,5899,740],{"class":581},[25,5901,743],{"class":585},[25,5903,746],{"class":581},[25,5905,749],{"class":585},[25,5907,752],{"class":581},[25,5909,5910],{"class":27,"line":97},[25,5911,757],{"class":581},[208,5913,760],{},{"title":20,"searchDepth":35,"depth":35,"links":5915},[5916],{"id":569,"depth":35,"text":569},[765],{},{"title":564,"description":767},[765,612,574],{"id":775,"title":776,"body":5922,"categories":5998,"cross_post":215,"date":870,"description":871,"extension":218,"image":20,"meta":5999,"navigation":31,"note_id":215,"note_url":215,"path":873,"private":221,"qiita_id":215,"qiita_url":215,"seo":6000,"stem":875,"tags":6001,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":877},{"type":8,"value":5923,"toc":5994},[5924,5926,5928,5964,5966,5968,5992],[11,5925,781],{"id":781},[238,5927,784],{},[15,5929,5930],{"className":17,"code":787,"language":19,"meta":20,"style":20},[22,5931,5932,5936,5940,5944,5948,5952,5956,5960],{"__ignoreMap":20},[25,5933,5934],{"class":27,"line":28},[25,5935,794],{},[25,5937,5938],{"class":27,"line":35},[25,5939,799],{},[25,5941,5942],{"class":27,"line":41},[25,5943,804],{},[25,5945,5946],{"class":27,"line":46},[25,5947,32],{"emptyLinePlaceholder":31},[25,5949,5950],{"class":27,"line":52},[25,5951,813],{},[25,5953,5954],{"class":27,"line":58},[25,5955,818],{},[25,5957,5958],{"class":27,"line":63},[25,5959,823],{},[25,5961,5962],{"class":27,"line":69},[25,5963,828],{},[11,5965,831],{"id":831},[238,5967,834],{},[15,5969,5970],{"className":17,"code":837,"language":19,"meta":20,"style":20},[22,5971,5972,5976,5980,5984,5988],{"__ignoreMap":20},[25,5973,5974],{"class":27,"line":28},[25,5975,844],{},[25,5977,5978],{"class":27,"line":35},[25,5979,799],{},[25,5981,5982],{"class":27,"line":41},[25,5983,804],{},[25,5985,5986],{"class":27,"line":46},[25,5987,857],{},[25,5989,5990],{"class":27,"line":52},[25,5991,862],{},[208,5993,210],{},{"title":20,"searchDepth":35,"depth":35,"links":5995},[5996,5997],{"id":781,"depth":35,"text":781},{"id":831,"depth":35,"text":831},[19],{},{"title":776,"description":871},[19,226],{"id":879,"title":880,"body":6003,"categories":6022,"cross_post":215,"date":917,"description":918,"extension":218,"image":919,"meta":6023,"navigation":31,"note_id":215,"note_url":215,"path":921,"private":221,"qiita_id":215,"qiita_url":215,"seo":6024,"stem":923,"tags":6025,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":927},{"type":8,"value":6004,"toc":6017},[6005,6007,6009,6011,6013,6015],[11,6006,885],{"id":885},[887,6008],{":options":889,"correctMessage":890,"explanation":891,"incorrectMessage":892,"question":893},[11,6010,896],{"id":896},[887,6012],{":options":899,"correctMessage":890,"explanation":900,"incorrectMessage":892,"question":901},[11,6014,904],{"id":904},[887,6016],{":options":907,"correctMessage":890,"explanation":908,"incorrectMessage":892,"question":909},{"title":20,"searchDepth":35,"depth":35,"links":6018},[6019,6020,6021],{"id":885,"depth":35,"text":885},{"id":896,"depth":35,"text":896},{"id":904,"depth":35,"text":904},[916],{},{"title":880,"description":918},[925,916,926],{"id":929,"title":930,"body":6027,"categories":6478,"cross_post":215,"date":1494,"description":1495,"extension":218,"image":20,"meta":6479,"navigation":31,"note_id":215,"note_url":215,"path":1497,"private":221,"qiita_id":215,"qiita_url":215,"seo":6480,"stem":1499,"tags":6481,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1503},{"type":8,"value":6028,"toc":6469},[6029,6031,6033,6035,6037,6039,6043,6045,6047,6049,6057,6257,6259,6261,6269,6271,6439,6441,6443,6447,6459,6461,6463,6465,6467],[934,6030,937],{"id":936},[11,6032,940],{"id":940},[238,6034,943],{},[238,6036,946],{},[238,6038,949],{},[238,6040,952,6041,957],{},[954,6042,956],{},[238,6044,960],{},[962,6046],{},[11,6048,967],{"id":966},[304,6050,6051,6053,6055],{},[307,6052,972],{},[307,6054,975],{},[307,6056,978],{},[15,6058,6059],{"className":17,"code":981,"language":19,"meta":20,"style":20},[22,6060,6061,6065,6069,6073,6077,6081,6085,6089,6093,6097,6101,6105,6109,6113,6117,6121,6125,6129,6133,6137,6141,6145,6149,6153,6157,6161,6165,6169,6173,6177,6181,6185,6189,6193,6197,6201,6205,6209,6213,6217,6221,6225,6229,6233,6237,6241,6245,6249,6253],{"__ignoreMap":20},[25,6062,6063],{"class":27,"line":28},[25,6064,32],{"emptyLinePlaceholder":31},[25,6066,6067],{"class":27,"line":35},[25,6068,32],{"emptyLinePlaceholder":31},[25,6070,6071],{"class":27,"line":41},[25,6072,996],{},[25,6074,6075],{"class":27,"line":46},[25,6076,1001],{},[25,6078,6079],{"class":27,"line":52},[25,6080,1006],{},[25,6082,6083],{"class":27,"line":58},[25,6084,32],{"emptyLinePlaceholder":31},[25,6086,6087],{"class":27,"line":63},[25,6088,1015],{},[25,6090,6091],{"class":27,"line":69},[25,6092,1020],{},[25,6094,6095],{"class":27,"line":75},[25,6096,1025],{},[25,6098,6099],{"class":27,"line":80},[25,6100,1030],{},[25,6102,6103],{"class":27,"line":86},[25,6104,1035],{},[25,6106,6107],{"class":27,"line":92},[25,6108,1040],{},[25,6110,6111],{"class":27,"line":97},[25,6112,32],{"emptyLinePlaceholder":31},[25,6114,6115],{"class":27,"line":103},[25,6116,1049],{},[25,6118,6119],{"class":27,"line":109},[25,6120,1054],{},[25,6122,6123],{"class":27,"line":114},[25,6124,1059],{},[25,6126,6127],{"class":27,"line":120},[25,6128,32],{"emptyLinePlaceholder":31},[25,6130,6131],{"class":27,"line":126},[25,6132,1068],{},[25,6134,6135],{"class":27,"line":132},[25,6136,1073],{},[25,6138,6139],{"class":27,"line":138},[25,6140,1078],{},[25,6142,6143],{"class":27,"line":144},[25,6144,1083],{},[25,6146,6147],{"class":27,"line":150},[25,6148,1088],{},[25,6150,6151],{"class":27,"line":156},[25,6152,32],{"emptyLinePlaceholder":31},[25,6154,6155],{"class":27,"line":162},[25,6156,1097],{},[25,6158,6159],{"class":27,"line":168},[25,6160,1102],{},[25,6162,6163],{"class":27,"line":174},[25,6164,1107],{},[25,6166,6167],{"class":27,"line":180},[25,6168,1112],{},[25,6170,6171],{"class":27,"line":186},[25,6172,1117],{},[25,6174,6175],{"class":27,"line":191},[25,6176,32],{"emptyLinePlaceholder":31},[25,6178,6179],{"class":27,"line":197},[25,6180,1126],{},[25,6182,6183],{"class":27,"line":203},[25,6184,1131],{},[25,6186,6187],{"class":27,"line":1134},[25,6188,1137],{},[25,6190,6191],{"class":27,"line":1140},[25,6192,1143],{},[25,6194,6195],{"class":27,"line":1146},[25,6196,1149],{},[25,6198,6199],{"class":27,"line":1152},[25,6200,1155],{},[25,6202,6203],{"class":27,"line":1158},[25,6204,32],{"emptyLinePlaceholder":31},[25,6206,6207],{"class":27,"line":1163},[25,6208,1166],{},[25,6210,6211],{"class":27,"line":1169},[25,6212,1172],{},[25,6214,6215],{"class":27,"line":1175},[25,6216,1178],{},[25,6218,6219],{"class":27,"line":1181},[25,6220,1184],{},[25,6222,6223],{"class":27,"line":1187},[25,6224,1190],{},[25,6226,6227],{"class":27,"line":1193},[25,6228,1196],{},[25,6230,6231],{"class":27,"line":1199},[25,6232,32],{"emptyLinePlaceholder":31},[25,6234,6235],{"class":27,"line":1204},[25,6236,1207],{},[25,6238,6239],{"class":27,"line":1210},[25,6240,1213],{},[25,6242,6243],{"class":27,"line":1216},[25,6244,1219],{},[25,6246,6247],{"class":27,"line":1222},[25,6248,32],{"emptyLinePlaceholder":31},[25,6250,6251],{"class":27,"line":1227},[25,6252,1230],{},[25,6254,6255],{"class":27,"line":1233},[25,6256,1236],{},[962,6258],{},[11,6260,1242],{"id":1241},[304,6262,6263,6265,6267],{},[307,6264,1247],{},[307,6266,1250],{},[307,6268,978],{},[1254,6270,1256],{"id":1256},[15,6272,6273],{"className":17,"code":1259,"language":19,"meta":20,"style":20},[22,6274,6275,6279,6283,6287,6291,6295,6299,6303,6307,6311,6315,6319,6323,6327,6331,6335,6339,6343,6347,6351,6355,6359,6363,6367,6371,6375,6379,6383,6387,6391,6395,6399,6403,6407,6411,6415,6419,6423,6427,6431,6435],{"__ignoreMap":20},[25,6276,6277],{"class":27,"line":28},[25,6278,1266],{},[25,6280,6281],{"class":27,"line":35},[25,6282,1001],{},[25,6284,6285],{"class":27,"line":41},[25,6286,1275],{},[25,6288,6289],{"class":27,"line":46},[25,6290,32],{"emptyLinePlaceholder":31},[25,6292,6293],{"class":27,"line":52},[25,6294,1015],{},[25,6296,6297],{"class":27,"line":58},[25,6298,1020],{},[25,6300,6301],{"class":27,"line":63},[25,6302,1025],{},[25,6304,6305],{"class":27,"line":69},[25,6306,1030],{},[25,6308,6309],{"class":27,"line":75},[25,6310,1035],{},[25,6312,6313],{"class":27,"line":80},[25,6314,1040],{},[25,6316,6317],{"class":27,"line":86},[25,6318,32],{"emptyLinePlaceholder":31},[25,6320,6321],{"class":27,"line":92},[25,6322,1312],{},[25,6324,6325],{"class":27,"line":97},[25,6326,1054],{},[25,6328,6329],{"class":27,"line":103},[25,6330,1059],{},[25,6332,6333],{"class":27,"line":109},[25,6334,32],{"emptyLinePlaceholder":31},[25,6336,6337],{"class":27,"line":114},[25,6338,1068],{},[25,6340,6341],{"class":27,"line":120},[25,6342,1073],{},[25,6344,6345],{"class":27,"line":126},[25,6346,1078],{},[25,6348,6349],{"class":27,"line":132},[25,6350,1083],{},[25,6352,6353],{"class":27,"line":138},[25,6354,1088],{},[25,6356,6357],{"class":27,"line":144},[25,6358,32],{"emptyLinePlaceholder":31},[25,6360,6361],{"class":27,"line":150},[25,6362,1097],{},[25,6364,6365],{"class":27,"line":156},[25,6366,1102],{},[25,6368,6369],{"class":27,"line":162},[25,6370,1107],{},[25,6372,6373],{"class":27,"line":168},[25,6374,1112],{},[25,6376,6377],{"class":27,"line":174},[25,6378,1369],{},[25,6380,6381],{"class":27,"line":180},[25,6382,32],{"emptyLinePlaceholder":31},[25,6384,6385],{"class":27,"line":186},[25,6386,1378],{},[25,6388,6389],{"class":27,"line":191},[25,6390,1383],{},[25,6392,6393],{"class":27,"line":197},[25,6394,1388],{},[25,6396,6397],{"class":27,"line":203},[25,6398,32],{"emptyLinePlaceholder":31},[25,6400,6401],{"class":27,"line":1134},[25,6402,1397],{},[25,6404,6405],{"class":27,"line":1140},[25,6406,1402],{},[25,6408,6409],{"class":27,"line":1146},[25,6410,1407],{},[25,6412,6413],{"class":27,"line":1152},[25,6414,32],{"emptyLinePlaceholder":31},[25,6416,6417],{"class":27,"line":1158},[25,6418,1416],{},[25,6420,6421],{"class":27,"line":1163},[25,6422,1213],{},[25,6424,6425],{"class":27,"line":1169},[25,6426,1219],{},[25,6428,6429],{"class":27,"line":1175},[25,6430,32],{"emptyLinePlaceholder":31},[25,6432,6433],{"class":27,"line":1181},[25,6434,1433],{},[25,6436,6437],{"class":27,"line":1187},[25,6438,1236],{},[962,6440],{},[11,6442,1443],{"id":1442},[238,6444,1446,6445,1450],{},[954,6446,1449],{},[1452,6448,6449,6451,6453,6457],{},[307,6450,1456],{},[307,6452,1459],{},[307,6454,1462,6455,1466],{},[22,6456,1465],{},[307,6458,1469],{},[962,6460],{},[11,6462,1474],{"id":1474},[238,6464,1477],{},[238,6466,1480],{},[208,6468,210],{},{"title":20,"searchDepth":35,"depth":35,"links":6470},[6471,6472,6473,6476,6477],{"id":940,"depth":35,"text":940},{"id":966,"depth":35,"text":967},{"id":1241,"depth":35,"text":1242,"children":6474},[6475],{"id":1256,"depth":41,"text":1256},{"id":1442,"depth":35,"text":1443},{"id":1474,"depth":35,"text":1474},[1493],{},{"title":930,"description":1495},[1501,1502],{"id":1505,"title":1506,"body":6483,"categories":6578,"cross_post":215,"date":1633,"description":1634,"extension":218,"image":20,"meta":6579,"navigation":31,"note_id":215,"note_url":215,"path":1636,"private":221,"qiita_id":215,"qiita_url":215,"seo":6580,"stem":1638,"tags":6581,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1642},{"type":8,"value":6484,"toc":6574},[6485,6487,6489,6491,6493,6495,6503,6505,6549,6557,6562,6567,6572],[1254,6486,1511],{"id":1511},[238,6488,1514],{},[238,6490,1517],{},[238,6492,1520],{},[11,6494,1523],{"id":1523},[304,6496,6497,6499,6501],{},[307,6498,1528],{},[307,6500,1531],{},[307,6502,1534],{},[238,6504,1537],{},[15,6506,6507],{"className":17,"code":1540,"language":19,"meta":20,"style":20},[22,6508,6509,6513,6517,6521,6525,6529,6533,6537,6541,6545],{"__ignoreMap":20},[25,6510,6511],{"class":27,"line":28},[25,6512,32],{"emptyLinePlaceholder":31},[25,6514,6515],{"class":27,"line":35},[25,6516,1551],{},[25,6518,6519],{"class":27,"line":41},[25,6520,1556],{},[25,6522,6523],{"class":27,"line":46},[25,6524,1561],{},[25,6526,6527],{"class":27,"line":52},[25,6528,1566],{},[25,6530,6531],{"class":27,"line":58},[25,6532,1571],{},[25,6534,6535],{"class":27,"line":63},[25,6536,1576],{},[25,6538,6539],{"class":27,"line":69},[25,6540,1581],{},[25,6542,6543],{"class":27,"line":75},[25,6544,1586],{},[25,6546,6547],{"class":27,"line":80},[25,6548,1236],{},[238,6550,6551,6554],{},[1594,6552,1599],{"href":1596,"rel":6553},[1598],[1594,6555,1604],{"href":1602,"rel":6556},[1598],[238,6558,6559],{},[1594,6560,1611],{"href":1609,"rel":6561},[1598],[238,6563,6564],{},[1594,6565,1618],{"href":1616,"rel":6566},[1598],[238,6568,6569],{},[1594,6570,1625],{"href":1623,"rel":6571},[1598],[208,6573,210],{},{"title":20,"searchDepth":35,"depth":35,"links":6575},[6576,6577],{"id":1511,"depth":41,"text":1511},{"id":1523,"depth":35,"text":1523},[1493],{},{"title":1506,"description":1634},[1493,1502,1640,1641],{"id":1644,"title":1645,"body":6583,"categories":6729,"cross_post":215,"date":1819,"description":1820,"extension":218,"image":20,"meta":6730,"navigation":31,"note_id":215,"note_url":215,"path":1822,"private":221,"qiita_id":215,"qiita_url":215,"seo":6731,"stem":1824,"tags":6732,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1826},{"type":8,"value":6584,"toc":6727},[6585,6725],[15,6586,6587],{"className":17,"code":1650,"language":19,"meta":20,"style":20},[22,6588,6589,6593,6597,6601,6605,6609,6613,6617,6621,6625,6629,6633,6637,6641,6645,6649,6653,6657,6661,6665,6669,6673,6677,6681,6685,6689,6693,6697,6701,6705,6709,6713,6717,6721],{"__ignoreMap":20},[25,6590,6591],{"class":27,"line":28},[25,6592,1657],{},[25,6594,6595],{"class":27,"line":35},[25,6596,32],{"emptyLinePlaceholder":31},[25,6598,6599],{"class":27,"line":41},[25,6600,1666],{},[25,6602,6603],{"class":27,"line":46},[25,6604,1671],{},[25,6606,6607],{"class":27,"line":52},[25,6608,1676],{},[25,6610,6611],{"class":27,"line":58},[25,6612,1681],{},[25,6614,6615],{"class":27,"line":63},[25,6616,32],{"emptyLinePlaceholder":31},[25,6618,6619],{"class":27,"line":69},[25,6620,32],{"emptyLinePlaceholder":31},[25,6622,6623],{"class":27,"line":75},[25,6624,32],{"emptyLinePlaceholder":31},[25,6626,6627],{"class":27,"line":80},[25,6628,1698],{},[25,6630,6631],{"class":27,"line":86},[25,6632,32],{"emptyLinePlaceholder":31},[25,6634,6635],{"class":27,"line":92},[25,6636,1707],{},[25,6638,6639],{"class":27,"line":97},[25,6640,1712],{},[25,6642,6643],{"class":27,"line":103},[25,6644,1717],{},[25,6646,6647],{"class":27,"line":109},[25,6648,1722],{},[25,6650,6651],{"class":27,"line":114},[25,6652,1088],{},[25,6654,6655],{"class":27,"line":120},[25,6656,1731],{},[25,6658,6659],{"class":27,"line":126},[25,6660,32],{"emptyLinePlaceholder":31},[25,6662,6663],{"class":27,"line":132},[25,6664,32],{"emptyLinePlaceholder":31},[25,6666,6667],{"class":27,"line":138},[25,6668,1744],{},[25,6670,6671],{"class":27,"line":144},[25,6672,1749],{},[25,6674,6675],{"class":27,"line":150},[25,6676,1754],{},[25,6678,6679],{"class":27,"line":156},[25,6680,1759],{},[25,6682,6683],{"class":27,"line":162},[25,6684,1764],{},[25,6686,6687],{"class":27,"line":168},[25,6688,1769],{},[25,6690,6691],{"class":27,"line":174},[25,6692,1774],{},[25,6694,6695],{"class":27,"line":180},[25,6696,1779],{},[25,6698,6699],{"class":27,"line":186},[25,6700,1784],{},[25,6702,6703],{"class":27,"line":191},[25,6704,1789],{},[25,6706,6707],{"class":27,"line":197},[25,6708,1794],{},[25,6710,6711],{"class":27,"line":203},[25,6712,32],{"emptyLinePlaceholder":31},[25,6714,6715],{"class":27,"line":1134},[25,6716,1803],{},[25,6718,6719],{"class":27,"line":1140},[25,6720,1808],{},[25,6722,6723],{"class":27,"line":1146},[25,6724,1813],{},[208,6726,210],{},{"title":20,"searchDepth":35,"depth":35,"links":6728},[],[1493],{},{"title":1645,"description":1820},[1640,1493],{"id":1828,"title":1829,"body":6734,"categories":6900,"cross_post":215,"date":2017,"description":2018,"extension":218,"image":20,"meta":6901,"navigation":31,"note_id":215,"note_url":215,"path":2020,"private":221,"qiita_id":215,"qiita_url":215,"seo":6902,"stem":2022,"tags":6903,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":2024},{"type":8,"value":6735,"toc":6898},[6736,6896],[15,6737,6738],{"className":17,"code":1834,"language":19,"meta":20,"style":20},[22,6739,6740,6744,6748,6752,6756,6760,6764,6768,6772,6776,6780,6784,6788,6792,6796,6800,6804,6808,6812,6816,6820,6824,6828,6832,6836,6840,6844,6848,6852,6856,6860,6864,6868,6872,6876,6880,6884,6888,6892],{"__ignoreMap":20},[25,6741,6742],{"class":27,"line":28},[25,6743,32],{"emptyLinePlaceholder":31},[25,6745,6746],{"class":27,"line":35},[25,6747,1845],{},[25,6749,6750],{"class":27,"line":41},[25,6751,32],{"emptyLinePlaceholder":31},[25,6753,6754],{"class":27,"line":46},[25,6755,1854],{},[25,6757,6758],{"class":27,"line":52},[25,6759,32],{"emptyLinePlaceholder":31},[25,6761,6762],{"class":27,"line":58},[25,6763,32],{"emptyLinePlaceholder":31},[25,6765,6766],{"class":27,"line":63},[25,6767,32],{"emptyLinePlaceholder":31},[25,6769,6770],{"class":27,"line":69},[25,6771,1871],{},[25,6773,6774],{"class":27,"line":75},[25,6775,32],{"emptyLinePlaceholder":31},[25,6777,6778],{"class":27,"line":80},[25,6779,1880],{},[25,6781,6782],{"class":27,"line":86},[25,6783,32],{"emptyLinePlaceholder":31},[25,6785,6786],{"class":27,"line":92},[25,6787,1889],{},[25,6789,6790],{"class":27,"line":97},[25,6791,1894],{},[25,6793,6794],{"class":27,"line":103},[25,6795,1899],{},[25,6797,6798],{"class":27,"line":109},[25,6799,1712],{},[25,6801,6802],{"class":27,"line":114},[25,6803,1717],{},[25,6805,6806],{"class":27,"line":120},[25,6807,1722],{},[25,6809,6810],{"class":27,"line":126},[25,6811,1088],{},[25,6813,6814],{"class":27,"line":132},[25,6815,1731],{},[25,6817,6818],{"class":27,"line":138},[25,6819,32],{"emptyLinePlaceholder":31},[25,6821,6822],{"class":27,"line":144},[25,6823,1749],{},[25,6825,6826],{"class":27,"line":150},[25,6827,1754],{},[25,6829,6830],{"class":27,"line":156},[25,6831,1936],{},[25,6833,6834],{"class":27,"line":162},[25,6835,1941],{},[25,6837,6838],{"class":27,"line":168},[25,6839,1946],{},[25,6841,6842],{"class":27,"line":174},[25,6843,1951],{},[25,6845,6846],{"class":27,"line":180},[25,6847,1956],{},[25,6849,6850],{"class":27,"line":186},[25,6851,1576],{},[25,6853,6854],{"class":27,"line":191},[25,6855,1088],{},[25,6857,6858],{"class":27,"line":197},[25,6859,1969],{},[25,6861,6862],{"class":27,"line":203},[25,6863,1974],{},[25,6865,6866],{"class":27,"line":1134},[25,6867,1236],{},[25,6869,6870],{"class":27,"line":1140},[25,6871,32],{"emptyLinePlaceholder":31},[25,6873,6874],{"class":27,"line":1146},[25,6875,1987],{},[25,6877,6878],{"class":27,"line":1152},[25,6879,1992],{},[25,6881,6882],{"class":27,"line":1158},[25,6883,1997],{},[25,6885,6886],{"class":27,"line":1163},[25,6887,2002],{},[25,6889,6890],{"class":27,"line":1169},[25,6891,2007],{},[25,6893,6894],{"class":27,"line":1175},[25,6895,1236],{},[208,6897,210],{},{"title":20,"searchDepth":35,"depth":35,"links":6899},[],[1493],{},{"title":1829,"description":2018},[1640,1493],{"id":2026,"title":2027,"body":6905,"categories":7114,"cross_post":215,"date":2285,"description":2286,"extension":218,"image":20,"meta":7115,"navigation":31,"note_id":215,"note_url":215,"path":2288,"private":221,"qiita_id":215,"qiita_url":215,"seo":7116,"stem":2290,"tags":7117,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":2292},{"type":8,"value":6906,"toc":7111},[6907,7097,7099,7104,7109],[15,6908,6909],{"className":572,"code":2032,"language":574,"meta":20,"style":20},[22,6910,6911,6945,6949,6963,6999,7007,7011,7015,7033,7051,7069,7073],{"__ignoreMap":20},[25,6912,6913,6915,6917,6919,6921,6923,6925,6927,6929,6931,6933,6935,6937,6939,6941,6943],{"class":27,"line":28},[25,6914,599],{"class":598},[25,6916,2041],{"class":602},[25,6918,606],{"class":598},[25,6920,2046],{"class":581},[25,6922,2049],{"class":602},[25,6924,2052],{"class":581},[25,6926,2049],{"class":602},[25,6928,2052],{"class":581},[25,6930,2049],{"class":602},[25,6932,2052],{"class":581},[25,6934,2063],{"class":602},[25,6936,2052],{"class":581},[25,6938,2063],{"class":602},[25,6940,2052],{"class":581},[25,6942,2072],{"class":602},[25,6944,2075],{"class":581},[25,6946,6947],{"class":27,"line":35},[25,6948,32],{"emptyLinePlaceholder":31},[25,6950,6951,6953,6955,6957,6959,6961],{"class":27,"line":41},[25,6952,599],{"class":598},[25,6954,2086],{"class":602},[25,6956,606],{"class":598},[25,6958,2091],{"class":581},[25,6960,2094],{"class":585},[25,6962,2097],{"class":581},[25,6964,6965,6967,6969,6971,6973,6975,6977,6979,6981,6983,6985,6987,6989,6991,6993,6995,6997],{"class":27,"line":46},[25,6966,2102],{"class":581},[25,6968,2105],{"class":695},[25,6970,2052],{"class":581},[25,6972,2110],{"class":695},[25,6974,699],{"class":581},[25,6976,702],{"class":598},[25,6978,2117],{"class":581},[25,6980,2120],{"class":585},[25,6982,2123],{"class":581},[25,6984,2126],{"class":585},[25,6986,2129],{"class":581},[25,6988,2132],{"class":598},[25,6990,2135],{"class":602},[25,6992,699],{"class":581},[25,6994,2140],{"class":598},[25,6996,2143],{"class":602},[25,6998,2146],{"class":581},[25,7000,7001,7003,7005],{"class":27,"line":52},[25,7002,2151],{"class":598},[25,7004,2154],{"class":585},[25,7006,615],{"class":581},[25,7008,7009],{"class":27,"line":58},[25,7010,2161],{"class":581},[25,7012,7013],{"class":27,"line":63},[25,7014,32],{"emptyLinePlaceholder":31},[25,7016,7017,7019,7021,7023,7025,7027,7029,7031],{"class":27,"line":69},[25,7018,662],{"class":581},[25,7020,665],{"class":585},[25,7022,2174],{"class":581},[25,7024,2177],{"class":598},[25,7026,2180],{"class":581},[25,7028,2183],{"class":585},[25,7030,2186],{"class":581},[25,7032,2189],{"class":656},[25,7034,7035,7037,7039,7041,7043,7045,7047,7049],{"class":27,"line":75},[25,7036,662],{"class":581},[25,7038,665],{"class":585},[25,7040,2174],{"class":581},[25,7042,2177],{"class":598},[25,7044,2180],{"class":581},[25,7046,2204],{"class":585},[25,7048,2186],{"class":581},[25,7050,2209],{"class":656},[25,7052,7053,7055,7057,7059,7061,7063,7065,7067],{"class":27,"line":80},[25,7054,662],{"class":581},[25,7056,665],{"class":585},[25,7058,2174],{"class":581},[25,7060,2177],{"class":598},[25,7062,2180],{"class":581},[25,7064,2224],{"class":585},[25,7066,2186],{"class":581},[25,7068,2229],{"class":656},[25,7070,7071],{"class":27,"line":86},[25,7072,32],{"emptyLinePlaceholder":31},[25,7074,7075,7077,7079,7081,7083,7085,7087,7089,7091,7093,7095],{"class":27,"line":92},[25,7076,599],{"class":598},[25,7078,2240],{"class":602},[25,7080,606],{"class":598},[25,7082,2245],{"class":581},[25,7084,2248],{"class":585},[25,7086,640],{"class":581},[25,7088,2177],{"class":598},[25,7090,2180],{"class":581},[25,7092,2204],{"class":585},[25,7094,2259],{"class":581},[25,7096,2262],{"class":656},[1254,7098,2265],{"id":2265},[238,7100,7101],{},[1594,7102,2270],{"href":2270,"rel":7103},[1598],[238,7105,7106],{},[1594,7107,2276],{"href":2276,"rel":7108},[1598],[208,7110,2280],{},{"title":20,"searchDepth":35,"depth":35,"links":7112},[7113],{"id":2265,"depth":41,"text":2265},[1493],{},{"title":2027,"description":2286},[1493,1501],{"id":2294,"title":2295,"body":7119,"categories":8836,"cross_post":215,"date":4510,"description":4511,"extension":218,"image":20,"meta":8837,"navigation":31,"note_id":215,"note_url":215,"path":4513,"private":221,"qiita_id":215,"qiita_url":215,"seo":8838,"stem":4515,"tags":8839,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":4519},{"type":8,"value":7120,"toc":8809},[7121,7123,7125,7127,7129,7131,7141,7143,7153,7155,7157,7159,7191,7193,7195,7259,7261,7333,7335,7337,7393,7395,7397,7445,7447,7535,7537,7539,7547,7549,7557,7559,7615,7617,7619,7621,7631,7633,7678,8750,8752,8782,8784,8786,8788,8790,8807],[11,7122,940],{"id":940},[238,7124,2302],{},[238,7126,2305],{},[11,7128,2308],{"id":2308},[1254,7130,2311],{"id":2311},[304,7132,7133,7135,7137,7139],{},[307,7134,2316],{},[307,7136,2319],{},[307,7138,2322],{},[307,7140,2325],{},[1254,7142,2328],{"id":2328},[1452,7144,7145,7147,7149,7151],{},[307,7146,2333],{},[307,7148,2336],{},[307,7150,2339],{},[307,7152,2342],{},[11,7154,2345],{"id":2345},[1254,7156,2349],{"id":2348},[238,7158,2352],{},[15,7160,7161],{"className":17,"code":2355,"language":19,"meta":20,"style":20},[22,7162,7163,7167,7171,7175,7179,7183,7187],{"__ignoreMap":20},[25,7164,7165],{"class":27,"line":28},[25,7166,2362],{},[25,7168,7169],{"class":27,"line":35},[25,7170,2367],{},[25,7172,7173],{"class":27,"line":41},[25,7174,2372],{},[25,7176,7177],{"class":27,"line":46},[25,7178,2377],{},[25,7180,7181],{"class":27,"line":52},[25,7182,2382],{},[25,7184,7185],{"class":27,"line":58},[25,7186,2387],{},[25,7188,7189],{"class":27,"line":63},[25,7190,2392],{},[1254,7192,2396],{"id":2395},[1254,7194,2399],{"id":2399},[15,7196,7197],{"className":17,"code":2402,"language":19,"meta":20,"style":20},[22,7198,7199,7203,7207,7211,7215,7219,7223,7227,7231,7235,7239,7243,7247,7251,7255],{"__ignoreMap":20},[25,7200,7201],{"class":27,"line":28},[25,7202,2409],{},[25,7204,7205],{"class":27,"line":35},[25,7206,2414],{},[25,7208,7209],{"class":27,"line":41},[25,7210,2419],{},[25,7212,7213],{"class":27,"line":46},[25,7214,2424],{},[25,7216,7217],{"class":27,"line":52},[25,7218,2429],{},[25,7220,7221],{"class":27,"line":58},[25,7222,2434],{},[25,7224,7225],{"class":27,"line":63},[25,7226,2439],{},[25,7228,7229],{"class":27,"line":69},[25,7230,2444],{},[25,7232,7233],{"class":27,"line":75},[25,7234,2449],{},[25,7236,7237],{"class":27,"line":80},[25,7238,2454],{},[25,7240,7241],{"class":27,"line":86},[25,7242,2459],{},[25,7244,7245],{"class":27,"line":92},[25,7246,2464],{},[25,7248,7249],{"class":27,"line":97},[25,7250,2469],{},[25,7252,7253],{"class":27,"line":103},[25,7254,2474],{},[25,7256,7257],{"class":27,"line":109},[25,7258,1219],{},[1254,7260,2481],{"id":2481},[15,7262,7263],{"className":17,"code":2484,"language":19,"meta":20,"style":20},[22,7264,7265,7269,7273,7277,7281,7285,7289,7293,7297,7301,7305,7309,7313,7317,7321,7325,7329],{"__ignoreMap":20},[25,7266,7267],{"class":27,"line":28},[25,7268,2491],{},[25,7270,7271],{"class":27,"line":35},[25,7272,2496],{},[25,7274,7275],{"class":27,"line":41},[25,7276,2501],{},[25,7278,7279],{"class":27,"line":46},[25,7280,2506],{},[25,7282,7283],{"class":27,"line":52},[25,7284,2511],{},[25,7286,7287],{"class":27,"line":58},[25,7288,2434],{},[25,7290,7291],{"class":27,"line":63},[25,7292,2439],{},[25,7294,7295],{"class":27,"line":69},[25,7296,2524],{},[25,7298,7299],{"class":27,"line":75},[25,7300,2529],{},[25,7302,7303],{"class":27,"line":80},[25,7304,2534],{},[25,7306,7307],{"class":27,"line":86},[25,7308,2539],{},[25,7310,7311],{"class":27,"line":92},[25,7312,2544],{},[25,7314,7315],{"class":27,"line":97},[25,7316,2464],{},[25,7318,7319],{"class":27,"line":103},[25,7320,2553],{},[25,7322,7323],{"class":27,"line":109},[25,7324,2474],{},[25,7326,7327],{"class":27,"line":114},[25,7328,1219],{},[25,7330,7331],{"class":27,"line":120},[25,7332,1236],{},[1254,7334,2569],{"id":2568},[1254,7336,2572],{"id":2572},[15,7338,7339],{"className":17,"code":2575,"language":19,"meta":20,"style":20},[22,7340,7341,7345,7349,7353,7357,7361,7365,7369,7373,7377,7381,7385,7389],{"__ignoreMap":20},[25,7342,7343],{"class":27,"line":28},[25,7344,2582],{},[25,7346,7347],{"class":27,"line":35},[25,7348,2587],{},[25,7350,7351],{"class":27,"line":41},[25,7352,2592],{},[25,7354,7355],{"class":27,"line":46},[25,7356,2597],{},[25,7358,7359],{"class":27,"line":52},[25,7360,32],{"emptyLinePlaceholder":31},[25,7362,7363],{"class":27,"line":58},[25,7364,2606],{},[25,7366,7367],{"class":27,"line":63},[25,7368,2611],{},[25,7370,7371],{"class":27,"line":69},[25,7372,2616],{},[25,7374,7375],{"class":27,"line":75},[25,7376,2621],{},[25,7378,7379],{"class":27,"line":80},[25,7380,2626],{},[25,7382,7383],{"class":27,"line":86},[25,7384,32],{"emptyLinePlaceholder":31},[25,7386,7387],{"class":27,"line":92},[25,7388,2635],{},[25,7390,7391],{"class":27,"line":97},[25,7392,1236],{},[1254,7394,2643],{"id":2642},[238,7396,2646],{},[15,7398,7399],{"className":17,"code":2649,"language":19,"meta":20,"style":20},[22,7400,7401,7405,7409,7413,7417,7421,7425,7429,7433,7437,7441],{"__ignoreMap":20},[25,7402,7403],{"class":27,"line":28},[25,7404,32],{"emptyLinePlaceholder":31},[25,7406,7407],{"class":27,"line":35},[25,7408,2660],{},[25,7410,7411],{"class":27,"line":41},[25,7412,2665],{},[25,7414,7415],{"class":27,"line":46},[25,7416,2670],{},[25,7418,7419],{"class":27,"line":52},[25,7420,2675],{},[25,7422,7423],{"class":27,"line":58},[25,7424,2680],{},[25,7426,7427],{"class":27,"line":63},[25,7428,2685],{},[25,7430,7431],{"class":27,"line":69},[25,7432,2690],{},[25,7434,7435],{"class":27,"line":75},[25,7436,2695],{},[25,7438,7439],{"class":27,"line":80},[25,7440,2700],{},[25,7442,7443],{"class":27,"line":86},[25,7444,1236],{},[1254,7446,2708],{"id":2707},[15,7448,7449],{"className":17,"code":2711,"language":19,"meta":20,"style":20},[22,7450,7451,7455,7459,7463,7467,7471,7475,7479,7483,7487,7491,7495,7499,7503,7507,7511,7515,7519,7523,7527,7531],{"__ignoreMap":20},[25,7452,7453],{"class":27,"line":28},[25,7454,2718],{},[25,7456,7457],{"class":27,"line":35},[25,7458,2723],{},[25,7460,7461],{"class":27,"line":41},[25,7462,2728],{},[25,7464,7465],{"class":27,"line":46},[25,7466,2733],{},[25,7468,7469],{"class":27,"line":52},[25,7470,2738],{},[25,7472,7473],{"class":27,"line":58},[25,7474,32],{"emptyLinePlaceholder":31},[25,7476,7477],{"class":27,"line":63},[25,7478,2747],{},[25,7480,7481],{"class":27,"line":69},[25,7482,2752],{},[25,7484,7485],{"class":27,"line":75},[25,7486,1213],{},[25,7488,7489],{"class":27,"line":80},[25,7490,32],{"emptyLinePlaceholder":31},[25,7492,7493],{"class":27,"line":86},[25,7494,2747],{},[25,7496,7497],{"class":27,"line":92},[25,7498,2769],{},[25,7500,7501],{"class":27,"line":97},[25,7502,1213],{},[25,7504,7505],{"class":27,"line":103},[25,7506,32],{"emptyLinePlaceholder":31},[25,7508,7509],{"class":27,"line":109},[25,7510,2782],{},[25,7512,7513],{"class":27,"line":114},[25,7514,2787],{},[25,7516,7517],{"class":27,"line":120},[25,7518,32],{"emptyLinePlaceholder":31},[25,7520,7521],{"class":27,"line":126},[25,7522,2796],{},[25,7524,7525],{"class":27,"line":132},[25,7526,2801],{},[25,7528,7529],{"class":27,"line":138},[25,7530,1088],{},[25,7532,7533],{"class":27,"line":144},[25,7534,1236],{},[11,7536,2812],{"id":2812},[1254,7538,2816],{"id":2815},[304,7540,7541,7543,7545],{},[307,7542,2821],{},[307,7544,2824],{},[307,7546,2827],{},[1254,7548,2831],{"id":2830},[304,7550,7551,7553,7555],{},[307,7552,2836],{},[307,7554,2839],{},[307,7556,2842],{},[1254,7558,2846],{"id":2845},[15,7560,7561],{"className":17,"code":2849,"language":19,"meta":20,"style":20},[22,7562,7563,7567,7571,7575,7579,7583,7587,7591,7595,7599,7603,7607,7611],{"__ignoreMap":20},[25,7564,7565],{"class":27,"line":28},[25,7566,2856],{},[25,7568,7569],{"class":27,"line":35},[25,7570,2861],{},[25,7572,7573],{"class":27,"line":41},[25,7574,2866],{},[25,7576,7577],{"class":27,"line":46},[25,7578,2871],{},[25,7580,7581],{"class":27,"line":52},[25,7582,2876],{},[25,7584,7585],{"class":27,"line":58},[25,7586,1219],{},[25,7588,7589],{"class":27,"line":63},[25,7590,32],{"emptyLinePlaceholder":31},[25,7592,7593],{"class":27,"line":69},[25,7594,2889],{},[25,7596,7597],{"class":27,"line":75},[25,7598,2894],{},[25,7600,7601],{"class":27,"line":80},[25,7602,2899],{},[25,7604,7605],{"class":27,"line":86},[25,7606,2904],{},[25,7608,7609],{"class":27,"line":92},[25,7610,2909],{},[25,7612,7613],{"class":27,"line":97},[25,7614,1236],{},[11,7616,2336],{"id":2916},[238,7618,2919],{},[238,7620,2922],{},[1452,7622,7623,7625,7627,7629],{},[307,7624,2927],{},[307,7626,2930],{},[307,7628,2933],{},[307,7630,2936],{},[11,7632,2939],{"id":2939},[1452,7634,7635,7637,7646,7652,7662,7664,7670],{},[307,7636,2944],{},[307,7638,2947,7639],{},[1452,7640,7641],{},[307,7642,2952,7643,2958],{},[1594,7644,2957],{"href":2955,"rel":7645},[1598],[307,7647,2961,7648],{},[1452,7649,7650],{},[307,7651,2966],{},[307,7653,7654,2972,7656],{},[954,7655,2971],{},[304,7657,7658],{},[307,7659,2977,7660,2981],{},[22,7661,2980],{},[307,7663,2984],{},[307,7665,2987,7666],{},[1452,7667,7668],{},[307,7669,2992],{},[307,7671,7672,7674],{},[954,7673,2997],{},[304,7675,7676],{},[307,7677,3002],{},[15,7679,7680],{"className":17,"code":3005,"language":19,"meta":20,"style":20},[22,7681,7682,7686,7690,7694,7698,7702,7706,7710,7714,7718,7722,7726,7730,7734,7738,7742,7746,7750,7754,7758,7762,7766,7770,7774,7778,7782,7786,7790,7794,7798,7802,7806,7810,7814,7818,7822,7826,7830,7834,7838,7842,7846,7850,7854,7858,7862,7866,7870,7874,7878,7882,7886,7890,7894,7898,7902,7906,7910,7914,7918,7922,7926,7930,7934,7938,7942,7946,7950,7954,7958,7962,7966,7970,7974,7978,7982,7986,7990,7994,7998,8002,8006,8010,8014,8018,8022,8026,8030,8034,8038,8042,8046,8050,8054,8058,8062,8066,8070,8074,8078,8082,8086,8090,8094,8098,8102,8106,8110,8114,8118,8122,8126,8130,8134,8138,8142,8146,8150,8154,8158,8162,8166,8170,8174,8178,8182,8186,8190,8194,8198,8202,8206,8210,8214,8218,8222,8226,8230,8234,8238,8242,8246,8250,8254,8258,8262,8266,8270,8274,8278,8282,8286,8290,8294,8298,8302,8306,8310,8314,8318,8322,8326,8330,8334,8338,8342,8346,8350,8354,8358,8362,8366,8370,8374,8378,8382,8386,8390,8394,8398,8402,8406,8410,8414,8418,8422,8426,8430,8434,8438,8442,8446,8450,8454,8458,8462,8466,8470,8474,8478,8482,8486,8490,8494,8498,8502,8506,8510,8514,8518,8522,8526,8530,8534,8538,8542,8546,8550,8554,8558,8562,8566,8570,8574,8578,8582,8586,8590,8594,8598,8602,8606,8610,8614,8618,8622,8626,8630,8634,8638,8642,8646,8650,8654,8658,8662,8666,8670,8674,8678,8682,8686,8690,8694,8698,8702,8706,8710,8714,8718,8722,8726,8730,8734,8738,8742,8746],{"__ignoreMap":20},[25,7683,7684],{"class":27,"line":28},[25,7685,3012],{},[25,7687,7688],{"class":27,"line":35},[25,7689,2362],{},[25,7691,7692],{"class":27,"line":41},[25,7693,2367],{},[25,7695,7696],{"class":27,"line":46},[25,7697,2372],{},[25,7699,7700],{"class":27,"line":52},[25,7701,2377],{},[25,7703,7704],{"class":27,"line":58},[25,7705,2382],{},[25,7707,7708],{"class":27,"line":63},[25,7709,2387],{},[25,7711,7712],{"class":27,"line":69},[25,7713,2392],{},[25,7715,7716],{"class":27,"line":75},[25,7717,32],{"emptyLinePlaceholder":31},[25,7719,7720],{"class":27,"line":80},[25,7721,3049],{},[25,7723,7724],{"class":27,"line":86},[25,7725,3054],{},[25,7727,7728],{"class":27,"line":92},[25,7729,3059],{},[25,7731,7732],{"class":27,"line":97},[25,7733,3064],{},[25,7735,7736],{"class":27,"line":103},[25,7737,3069],{},[25,7739,7740],{"class":27,"line":109},[25,7741,2392],{},[25,7743,7744],{"class":27,"line":114},[25,7745,32],{"emptyLinePlaceholder":31},[25,7747,7748],{"class":27,"line":120},[25,7749,32],{"emptyLinePlaceholder":31},[25,7751,7752],{"class":27,"line":126},[25,7753,32],{"emptyLinePlaceholder":31},[25,7755,7756],{"class":27,"line":132},[25,7757,32],{"emptyLinePlaceholder":31},[25,7759,7760],{"class":27,"line":138},[25,7761,32],{"emptyLinePlaceholder":31},[25,7763,7764],{"class":27,"line":144},[25,7765,3098],{},[25,7767,7768],{"class":27,"line":150},[25,7769,2718],{},[25,7771,7772],{"class":27,"line":156},[25,7773,2723],{},[25,7775,7776],{"class":27,"line":162},[25,7777,3111],{},[25,7779,7780],{"class":27,"line":168},[25,7781,2728],{},[25,7783,7784],{"class":27,"line":174},[25,7785,2733],{},[25,7787,7788],{"class":27,"line":180},[25,7789,2738],{},[25,7791,7792],{"class":27,"line":186},[25,7793,32],{"emptyLinePlaceholder":31},[25,7795,7796],{"class":27,"line":191},[25,7797,3132],{},[25,7799,7800],{"class":27,"line":197},[25,7801,3137],{},[25,7803,7804],{"class":27,"line":203},[25,7805,2747],{},[25,7807,7808],{"class":27,"line":1134},[25,7809,32],{"emptyLinePlaceholder":31},[25,7811,7812],{"class":27,"line":1140},[25,7813,2752],{},[25,7815,7816],{"class":27,"line":1146},[25,7817,1213],{},[25,7819,7820],{"class":27,"line":1152},[25,7821,32],{"emptyLinePlaceholder":31},[25,7823,7824],{"class":27,"line":1158},[25,7825,3162],{},[25,7827,7828],{"class":27,"line":1163},[25,7829,3167],{},[25,7831,7832],{"class":27,"line":1169},[25,7833,2747],{},[25,7835,7836],{"class":27,"line":1175},[25,7837,3176],{},[25,7839,7840],{"class":27,"line":1181},[25,7841,3181],{},[25,7843,7844],{"class":27,"line":1187},[25,7845,2769],{},[25,7847,7848],{"class":27,"line":1193},[25,7849,1213],{},[25,7851,7852],{"class":27,"line":1199},[25,7853,32],{"emptyLinePlaceholder":31},[25,7855,7856],{"class":27,"line":1204},[25,7857,3198],{},[25,7859,7860],{"class":27,"line":1210},[25,7861,3203],{},[25,7863,7864],{"class":27,"line":1216},[25,7865,2782],{},[25,7867,7868],{"class":27,"line":1222},[25,7869,32],{"emptyLinePlaceholder":31},[25,7871,7872],{"class":27,"line":1227},[25,7873,3216],{},[25,7875,7876],{"class":27,"line":1233},[25,7877,3221],{},[25,7879,7880],{"class":27,"line":3224},[25,7881,2787],{},[25,7883,7884],{"class":27,"line":3229},[25,7885,32],{"emptyLinePlaceholder":31},[25,7887,7888],{"class":27,"line":3234},[25,7889,2796],{},[25,7891,7892],{"class":27,"line":3239},[25,7893,2801],{},[25,7895,7896],{"class":27,"line":3244},[25,7897,1088],{},[25,7899,7900],{"class":27,"line":3249},[25,7901,1236],{},[25,7903,7904],{"class":27,"line":3254},[25,7905,32],{"emptyLinePlaceholder":31},[25,7907,7908],{"class":27,"line":3259},[25,7909,32],{"emptyLinePlaceholder":31},[25,7911,7912],{"class":27,"line":3264},[25,7913,32],{"emptyLinePlaceholder":31},[25,7915,7916],{"class":27,"line":3269},[25,7917,32],{"emptyLinePlaceholder":31},[25,7919,7920],{"class":27,"line":3274},[25,7921,2409],{},[25,7923,7924],{"class":27,"line":3279},[25,7925,2414],{},[25,7927,7928],{"class":27,"line":3284},[25,7929,2419],{},[25,7931,7932],{"class":27,"line":3289},[25,7933,2424],{},[25,7935,7936],{"class":27,"line":3294},[25,7937,2429],{},[25,7939,7940],{"class":27,"line":3299},[25,7941,2434],{},[25,7943,7944],{"class":27,"line":3304},[25,7945,2439],{},[25,7947,7948],{"class":27,"line":3309},[25,7949,2444],{},[25,7951,7952],{"class":27,"line":3314},[25,7953,2449],{},[25,7955,7956],{"class":27,"line":3319},[25,7957,2454],{},[25,7959,7960],{"class":27,"line":3324},[25,7961,2459],{},[25,7963,7964],{"class":27,"line":3329},[25,7965,2464],{},[25,7967,7968],{"class":27,"line":3334},[25,7969,2469],{},[25,7971,7972],{"class":27,"line":3339},[25,7973,2474],{},[25,7975,7976],{"class":27,"line":3344},[25,7977,1219],{},[25,7979,7980],{"class":27,"line":3349},[25,7981,32],{"emptyLinePlaceholder":31},[25,7983,7984],{"class":27,"line":3354},[25,7985,3357],{},[25,7987,7988],{"class":27,"line":3360},[25,7989,3363],{},[25,7991,7992],{"class":27,"line":3366},[25,7993,1236],{},[25,7995,7996],{"class":27,"line":3371},[25,7997,32],{"emptyLinePlaceholder":31},[25,7999,8000],{"class":27,"line":3376},[25,8001,2491],{},[25,8003,8004],{"class":27,"line":3381},[25,8005,2496],{},[25,8007,8008],{"class":27,"line":3386},[25,8009,2501],{},[25,8011,8012],{"class":27,"line":3391},[25,8013,2506],{},[25,8015,8016],{"class":27,"line":3396},[25,8017,2511],{},[25,8019,8020],{"class":27,"line":3401},[25,8021,2434],{},[25,8023,8024],{"class":27,"line":3406},[25,8025,2439],{},[25,8027,8028],{"class":27,"line":3411},[25,8029,2524],{},[25,8031,8032],{"class":27,"line":3416},[25,8033,2529],{},[25,8035,8036],{"class":27,"line":3421},[25,8037,2534],{},[25,8039,8040],{"class":27,"line":3426},[25,8041,2539],{},[25,8043,8044],{"class":27,"line":3431},[25,8045,2544],{},[25,8047,8048],{"class":27,"line":3436},[25,8049,2464],{},[25,8051,8052],{"class":27,"line":3441},[25,8053,2553],{},[25,8055,8056],{"class":27,"line":3446},[25,8057,2474],{},[25,8059,8060],{"class":27,"line":3451},[25,8061,1219],{},[25,8063,8064],{"class":27,"line":3456},[25,8065,1236],{},[25,8067,8068],{"class":27,"line":3461},[25,8069,32],{"emptyLinePlaceholder":31},[25,8071,8072],{"class":27,"line":3466},[25,8073,3469],{},[25,8075,8076],{"class":27,"line":3472},[25,8077,3475],{},[25,8079,8080],{"class":27,"line":3478},[25,8081,3481],{},[25,8083,8084],{"class":27,"line":3484},[25,8085,2592],{},[25,8087,8088],{"class":27,"line":3489},[25,8089,2597],{},[25,8091,8092],{"class":27,"line":3494},[25,8093,32],{"emptyLinePlaceholder":31},[25,8095,8096],{"class":27,"line":3499},[25,8097,3502],{},[25,8099,8100],{"class":27,"line":3505},[25,8101,32],{"emptyLinePlaceholder":31},[25,8103,8104],{"class":27,"line":3510},[25,8105,2606],{},[25,8107,8108],{"class":27,"line":3515},[25,8109,2611],{},[25,8111,8112],{"class":27,"line":3520},[25,8113,2616],{},[25,8115,8116],{"class":27,"line":3525},[25,8117,3528],{},[25,8119,8120],{"class":27,"line":3531},[25,8121,2626],{},[25,8123,8124],{"class":27,"line":3536},[25,8125,32],{"emptyLinePlaceholder":31},[25,8127,8128],{"class":27,"line":3541},[25,8129,3544],{},[25,8131,8132],{"class":27,"line":3547},[25,8133,2635],{},[25,8135,8136],{"class":27,"line":3552},[25,8137,1236],{},[25,8139,8140],{"class":27,"line":3557},[25,8141,32],{"emptyLinePlaceholder":31},[25,8143,8144],{"class":27,"line":3562},[25,8145,3565],{},[25,8147,8148],{"class":27,"line":3568},[25,8149,3571],{},[25,8151,8152],{"class":27,"line":3574},[25,8153,2587],{},[25,8155,8156],{"class":27,"line":3579},[25,8157,3582],{},[25,8159,8160],{"class":27,"line":3585},[25,8161,3588],{},[25,8163,8164],{"class":27,"line":3591},[25,8165,32],{"emptyLinePlaceholder":31},[25,8167,8168],{"class":27,"line":3596},[25,8169,2592],{},[25,8171,8172],{"class":27,"line":3601},[25,8173,2597],{},[25,8175,8176],{"class":27,"line":3606},[25,8177,32],{"emptyLinePlaceholder":31},[25,8179,8180],{"class":27,"line":3611},[25,8181,3614],{},[25,8183,8184],{"class":27,"line":3617},[25,8185,3620],{},[25,8187,8188],{"class":27,"line":3623},[25,8189,3626],{},[25,8191,8192],{"class":27,"line":3629},[25,8193,1236],{},[25,8195,8196],{"class":27,"line":3634},[25,8197,32],{"emptyLinePlaceholder":31},[25,8199,8200],{"class":27,"line":3639},[25,8201,3642],{},[25,8203,8204],{"class":27,"line":3645},[25,8205,3648],{},[25,8207,8208],{"class":27,"line":3651},[25,8209,2587],{},[25,8211,8212],{"class":27,"line":3656},[25,8213,32],{"emptyLinePlaceholder":31},[25,8215,8216],{"class":27,"line":3661},[25,8217,2723],{},[25,8219,8220],{"class":27,"line":3666},[25,8221,3669],{},[25,8223,8224],{"class":27,"line":3672},[25,8225,3675],{},[25,8227,8228],{"class":27,"line":3678},[25,8229,3681],{},[25,8231,8232],{"class":27,"line":3684},[25,8233,3687],{},[25,8235,8236],{"class":27,"line":3690},[25,8237,1576],{},[25,8239,8240],{"class":27,"line":3695},[25,8241,3698],{},[25,8243,8244],{"class":27,"line":3701},[25,8245,3704],{},[25,8247,8248],{"class":27,"line":3707},[25,8249,3710],{},[25,8251,8252],{"class":27,"line":3713},[25,8253,32],{"emptyLinePlaceholder":31},[25,8255,8256],{"class":27,"line":3718},[25,8257,1088],{},[25,8259,8260],{"class":27,"line":3723},[25,8261,32],{"emptyLinePlaceholder":31},[25,8263,8264],{"class":27,"line":3728},[25,8265,3731],{},[25,8267,8268],{"class":27,"line":3734},[25,8269,1236],{},[25,8271,8272],{"class":27,"line":3739},[25,8273,32],{"emptyLinePlaceholder":31},[25,8275,8276],{"class":27,"line":3744},[25,8277,2660],{},[25,8279,8280],{"class":27,"line":3749},[25,8281,2665],{},[25,8283,8284],{"class":27,"line":3754},[25,8285,2670],{},[25,8287,8288],{"class":27,"line":3759},[25,8289,2675],{},[25,8291,8292],{"class":27,"line":3764},[25,8293,2680],{},[25,8295,8296],{"class":27,"line":3769},[25,8297,2685],{},[25,8299,8300],{"class":27,"line":3774},[25,8301,2690],{},[25,8303,8304],{"class":27,"line":3779},[25,8305,2695],{},[25,8307,8308],{"class":27,"line":3784},[25,8309,2700],{},[25,8311,8312],{"class":27,"line":3789},[25,8313,1236],{},[25,8315,8316],{"class":27,"line":3794},[25,8317,32],{"emptyLinePlaceholder":31},[25,8319,8320],{"class":27,"line":3799},[25,8321,3802],{},[25,8323,8324],{"class":27,"line":3805},[25,8325,3808],{},[25,8327,8328],{"class":27,"line":3811},[25,8329,3814],{},[25,8331,8332],{"class":27,"line":3817},[25,8333,3820],{},[25,8335,8336],{"class":27,"line":3823},[25,8337,32],{"emptyLinePlaceholder":31},[25,8339,8340],{"class":27,"line":3828},[25,8341,3831],{},[25,8343,8344],{"class":27,"line":3834},[25,8345,3837],{},[25,8347,8348],{"class":27,"line":3840},[25,8349,1236],{},[25,8351,8352],{"class":27,"line":3845},[25,8353,32],{"emptyLinePlaceholder":31},[25,8355,8356],{"class":27,"line":3850},[25,8357,3853],{},[25,8359,8360],{"class":27,"line":3856},[25,8361,3859],{},[25,8363,8364],{"class":27,"line":3862},[25,8365,3814],{},[25,8367,8368],{"class":27,"line":3867},[25,8369,3870],{},[25,8371,8372],{"class":27,"line":3873},[25,8373,1236],{},[25,8375,8376],{"class":27,"line":3878},[25,8377,32],{"emptyLinePlaceholder":31},[25,8379,8380],{"class":27,"line":3883},[25,8381,3886],{},[25,8383,8384],{"class":27,"line":3889},[25,8385,3892],{},[25,8387,8388],{"class":27,"line":3895},[25,8389,3898],{},[25,8391,8392],{"class":27,"line":3901},[25,8393,3904],{},[25,8395,8396],{"class":27,"line":3907},[25,8397,3910],{},[25,8399,8400],{"class":27,"line":3913},[25,8401,32],{"emptyLinePlaceholder":31},[25,8403,8404],{"class":27,"line":3918},[25,8405,2723],{},[25,8407,8408],{"class":27,"line":3923},[25,8409,3926],{},[25,8411,8412],{"class":27,"line":3929},[25,8413,3932],{},[25,8415,8416],{"class":27,"line":3935},[25,8417,3938],{},[25,8419,8420],{"class":27,"line":3941},[25,8421,3944],{},[25,8423,8424],{"class":27,"line":3947},[25,8425,3950],{},[25,8427,8428],{"class":27,"line":3953},[25,8429,3956],{},[25,8431,8432],{"class":27,"line":3959},[25,8433,3962],{},[25,8435,8436],{"class":27,"line":3965},[25,8437,3968],{},[25,8439,8440],{"class":27,"line":3971},[25,8441,3974],{},[25,8443,8444],{"class":27,"line":3977},[25,8445,3980],{},[25,8447,8448],{"class":27,"line":3983},[25,8449,3986],{},[25,8451,8452],{"class":27,"line":3989},[25,8453,3992],{},[25,8455,8456],{"class":27,"line":3995},[25,8457,3998],{},[25,8459,8460],{"class":27,"line":4001},[25,8461,32],{"emptyLinePlaceholder":31},[25,8463,8464],{"class":27,"line":4006},[25,8465,4009],{},[25,8467,8468],{"class":27,"line":4012},[25,8469,4015],{},[25,8471,8472],{"class":27,"line":4018},[25,8473,4021],{},[25,8475,8476],{"class":27,"line":4024},[25,8477,4027],{},[25,8479,8480],{"class":27,"line":4030},[25,8481,4033],{},[25,8483,8484],{"class":27,"line":4036},[25,8485,4039],{},[25,8487,8488],{"class":27,"line":4042},[25,8489,4045],{},[25,8491,8492],{"class":27,"line":4048},[25,8493,4051],{},[25,8495,8496],{"class":27,"line":4054},[25,8497,4057],{},[25,8499,8500],{"class":27,"line":4060},[25,8501,4063],{},[25,8503,8504],{"class":27,"line":4066},[25,8505,4069],{},[25,8507,8508],{"class":27,"line":4072},[25,8509,4075],{},[25,8511,8512],{"class":27,"line":4078},[25,8513,32],{"emptyLinePlaceholder":31},[25,8515,8516],{"class":27,"line":4083},[25,8517,4086],{},[25,8519,8520],{"class":27,"line":4089},[25,8521,4092],{},[25,8523,8524],{"class":27,"line":4095},[25,8525,32],{"emptyLinePlaceholder":31},[25,8527,8528],{"class":27,"line":4100},[25,8529,4103],{},[25,8531,8532],{"class":27,"line":4106},[25,8533,4109],{},[25,8535,8536],{"class":27,"line":4112},[25,8537,4115],{},[25,8539,8540],{"class":27,"line":4118},[25,8541,4121],{},[25,8543,8544],{"class":27,"line":4124},[25,8545,4127],{},[25,8547,8548],{"class":27,"line":4130},[25,8549,2553],{},[25,8551,8552],{"class":27,"line":4135},[25,8553,1576],{},[25,8555,8556],{"class":27,"line":4140},[25,8557,2796],{},[25,8559,8560],{"class":27,"line":4145},[25,8561,4148],{},[25,8563,8564],{"class":27,"line":4151},[25,8565,1088],{},[25,8567,8568],{"class":27,"line":4156},[25,8569,1236],{},[25,8571,8572],{"class":27,"line":4161},[25,8573,32],{"emptyLinePlaceholder":31},[25,8575,8576],{"class":27,"line":4166},[25,8577,4169],{},[25,8579,8580],{"class":27,"line":4172},[25,8581,4175],{},[25,8583,8584],{"class":27,"line":4178},[25,8585,4181],{},[25,8587,8588],{"class":27,"line":4184},[25,8589,4187],{},[25,8591,8592],{"class":27,"line":4190},[25,8593,4193],{},[25,8595,8596],{"class":27,"line":4196},[25,8597,4199],{},[25,8599,8600],{"class":27,"line":4202},[25,8601,4205],{},[25,8603,8604],{"class":27,"line":4208},[25,8605,4211],{},[25,8607,8608],{"class":27,"line":4214},[25,8609,4217],{},[25,8611,8612],{"class":27,"line":4220},[25,8613,4223],{},[25,8615,8616],{"class":27,"line":4226},[25,8617,2464],{},[25,8619,8620],{"class":27,"line":4231},[25,8621,2553],{},[25,8623,8624],{"class":27,"line":4236},[25,8625,1576],{},[25,8627,8628],{"class":27,"line":4241},[25,8629,1219],{},[25,8631,8632],{"class":27,"line":4246},[25,8633,1236],{},[25,8635,8636],{"class":27,"line":4251},[25,8637,32],{"emptyLinePlaceholder":31},[25,8639,8640],{"class":27,"line":4256},[25,8641,4259],{},[25,8643,8644],{"class":27,"line":4262},[25,8645,4265],{},[25,8647,8648],{"class":27,"line":4268},[25,8649,4271],{},[25,8651,8652],{"class":27,"line":4274},[25,8653,4277],{},[25,8655,8656],{"class":27,"line":4280},[25,8657,32],{"emptyLinePlaceholder":31},[25,8659,8660],{"class":27,"line":4285},[25,8661,32],{"emptyLinePlaceholder":31},[25,8663,8664],{"class":27,"line":4290},[25,8665,1236],{},[25,8667,8668],{"class":27,"line":4295},[25,8669,32],{"emptyLinePlaceholder":31},[25,8671,8672],{"class":27,"line":4300},[25,8673,4303],{},[25,8675,8676],{"class":27,"line":4306},[25,8677,4309],{},[25,8679,8680],{"class":27,"line":4312},[25,8681,3814],{},[25,8683,8684],{"class":27,"line":4317},[25,8685,4320],{},[25,8687,8688],{"class":27,"line":4323},[25,8689,4326],{},[25,8691,8692],{"class":27,"line":4329},[25,8693,1236],{},[25,8695,8696],{"class":27,"line":4334},[25,8697,32],{"emptyLinePlaceholder":31},[25,8699,8700],{"class":27,"line":4339},[25,8701,2856],{},[25,8703,8704],{"class":27,"line":4344},[25,8705,2861],{},[25,8707,8708],{"class":27,"line":4349},[25,8709,2866],{},[25,8711,8712],{"class":27,"line":4354},[25,8713,2871],{},[25,8715,8716],{"class":27,"line":4359},[25,8717,2876],{},[25,8719,8720],{"class":27,"line":4364},[25,8721,1219],{},[25,8723,8724],{"class":27,"line":4369},[25,8725,32],{"emptyLinePlaceholder":31},[25,8727,8728],{"class":27,"line":4374},[25,8729,2889],{},[25,8731,8732],{"class":27,"line":4379},[25,8733,2894],{},[25,8735,8736],{"class":27,"line":4384},[25,8737,2899],{},[25,8739,8740],{"class":27,"line":4389},[25,8741,2904],{},[25,8743,8744],{"class":27,"line":4394},[25,8745,2909],{},[25,8747,8748],{"class":27,"line":4399},[25,8749,1236],{},[11,8751,4404],{"id":4404},[1452,8753,8754,8762,8772],{},[307,8755,4409,8756],{},[304,8757,8758,8760],{},[307,8759,4414],{},[307,8761,4417],{},[307,8763,4420,8764],{},[304,8765,8766,8768,8770],{},[307,8767,4425],{},[307,8769,4428],{},[307,8771,4431],{},[307,8773,4434,8774],{},[304,8775,8776,8778,8780],{},[307,8777,4439],{},[307,8779,4442],{},[307,8781,4445],{},[11,8783,518],{"id":518},[238,8785,4450],{},[238,8787,4453],{},[11,8789,4456],{"id":4456},[304,8791,8792,8797,8802],{},[307,8793,8794],{},[1594,8795,4465],{"href":4463,"rel":8796},[1598],[307,8798,8799],{},[1594,8800,4472],{"href":4470,"rel":8801},[1598],[307,8803,8804],{},[1594,8805,4479],{"href":4477,"rel":8806},[1598],[208,8808,210],{},{"title":20,"searchDepth":35,"depth":35,"links":8810},[8811,8812,8816,8826,8831,8832,8833,8834,8835],{"id":940,"depth":35,"text":940},{"id":2308,"depth":35,"text":2308,"children":8813},[8814,8815],{"id":2311,"depth":41,"text":2311},{"id":2328,"depth":41,"text":2328},{"id":2345,"depth":35,"text":2345,"children":8817},[8818,8819,8820,8821,8822,8823,8824,8825],{"id":2348,"depth":41,"text":2349},{"id":2395,"depth":41,"text":2396},{"id":2399,"depth":41,"text":2399},{"id":2481,"depth":41,"text":2481},{"id":2568,"depth":41,"text":2569},{"id":2572,"depth":41,"text":2572},{"id":2642,"depth":41,"text":2643},{"id":2707,"depth":41,"text":2708},{"id":2812,"depth":35,"text":2812,"children":8827},[8828,8829,8830],{"id":2815,"depth":41,"text":2816},{"id":2830,"depth":41,"text":2831},{"id":2845,"depth":41,"text":2846},{"id":2916,"depth":35,"text":2336},{"id":2939,"depth":35,"text":2939},{"id":4404,"depth":35,"text":4404},{"id":518,"depth":35,"text":518},{"id":4456,"depth":35,"text":4456},[1493],{},{"title":2295,"description":4511},[1493,1502,4517,1501,4518],{"id":4521,"title":4522,"body":8841,"categories":8905,"cross_post":215,"date":4609,"description":4610,"extension":218,"image":20,"meta":8906,"navigation":31,"note_id":215,"note_url":215,"path":4612,"private":221,"qiita_id":215,"qiita_url":215,"seo":8907,"stem":4614,"tags":8908,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":4617},{"type":8,"value":8842,"toc":8900},[8843,8845,8850,8852,8854,8864,8866,8870,8872,8884,8886,8890,8892,8898],[238,8844,4527],{},[238,8846,8847],{},[1594,8848,4532],{"href":4532,"rel":8849},[1598],[11,8851,4536],{"id":4536},[238,8853,4539],{},[304,8855,8856,8858,8860,8862],{},[307,8857,4544],{},[307,8859,4547],{},[307,8861,4550],{},[307,8863,4553],{},[238,8865,4556],{},[11,8867,8868],{"id":4559},[954,8869,4559],{},[238,8871,4564],{},[1452,8873,8874,8882],{},[307,8875,4569,8876],{},[304,8877,8878,8880],{},[307,8879,4574],{},[307,8881,4577],{},[307,8883,4580],{},[238,8885,4583],{},[11,8887,8888],{"id":4586},[954,8889,4586],{},[238,8891,4591],{},[1452,8893,8894,8896],{},[307,8895,4596],{},[307,8897,4599],{},[238,8899,4602],{},{"title":20,"searchDepth":35,"depth":35,"links":8901},[8902,8903,8904],{"id":4536,"depth":35,"text":4536},{"id":4559,"depth":35,"text":4559},{"id":4586,"depth":35,"text":4586},[1493],{},{"title":4522,"description":4610},[1493,4616],{"id":4619,"title":4620,"body":8910,"categories":8934,"cross_post":215,"date":4654,"description":4655,"extension":218,"image":20,"meta":8935,"navigation":31,"note_id":215,"note_url":215,"path":4657,"private":221,"qiita_id":215,"qiita_url":215,"seo":8936,"stem":4659,"tags":8937,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":4661},{"type":8,"value":8911,"toc":8932},[8912],[304,8913,8914,8916,8924,8928],{},[307,8915,4627],{},[307,8917,4630,8918],{},[304,8919,8920,8922],{},[307,8921,4635],{},[307,8923,4638],{},[307,8925,4641,8926],{},[954,8927,4644],{},[307,8929,4647,8930],{},[954,8931,4650],{},{"title":20,"searchDepth":35,"depth":35,"links":8933},[],[1493],{},{"title":4620,"description":4655},[1493,4616],{"id":4663,"title":4664,"body":8939,"categories":9341,"cross_post":215,"date":4510,"description":5145,"extension":218,"image":20,"meta":9342,"navigation":31,"note_id":215,"note_url":215,"path":5147,"private":221,"qiita_id":215,"qiita_url":215,"seo":9343,"stem":5149,"tags":9344,"topics":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":5152},{"type":8,"value":8940,"toc":9335},[8941,8945,8947,8949,8959,8961,8963,8965,9321,9323,9328,9333],[11,8942,8943],{"id":4669},[954,8944,4669],{},[238,8946,4674],{},[1254,8948,4678],{"id":4677},[304,8950,8951,8953,8955,8957],{},[307,8952,4683],{},[307,8954,4686],{},[307,8956,4689],{},[307,8958,4692],{},[1254,8960,4695],{"id":4695},[238,8962,4698],{},[238,8964,4701],{},[15,8966,8967],{"className":17,"code":4704,"language":19,"meta":20,"style":20},[22,8968,8969,8973,8977,8981,8985,8989,8993,8997,9001,9005,9009,9013,9017,9021,9025,9029,9033,9037,9041,9045,9049,9053,9057,9061,9065,9069,9073,9077,9081,9085,9089,9093,9097,9101,9105,9109,9113,9117,9121,9125,9129,9133,9137,9141,9145,9149,9153,9157,9161,9165,9169,9173,9177,9181,9185,9189,9193,9197,9201,9205,9209,9213,9217,9221,9225,9229,9233,9237,9241,9245,9249,9253,9257,9261,9265,9269,9273,9277,9281,9285,9289,9293,9297,9301,9305,9309,9313,9317],{"__ignoreMap":20},[25,8970,8971],{"class":27,"line":28},[25,8972,32],{"emptyLinePlaceholder":31},[25,8974,8975],{"class":27,"line":35},[25,8976,4715],{},[25,8978,8979],{"class":27,"line":41},[25,8980,4720],{},[25,8982,8983],{"class":27,"line":46},[25,8984,32],{"emptyLinePlaceholder":31},[25,8986,8987],{"class":27,"line":52},[25,8988,32],{"emptyLinePlaceholder":31},[25,8990,8991],{"class":27,"line":58},[25,8992,32],{"emptyLinePlaceholder":31},[25,8994,8995],{"class":27,"line":63},[25,8996,32],{"emptyLinePlaceholder":31},[25,8998,8999],{"class":27,"line":69},[25,9000,4741],{},[25,9002,9003],{"class":27,"line":75},[25,9004,4746],{},[25,9006,9007],{"class":27,"line":80},[25,9008,4751],{},[25,9010,9011],{"class":27,"line":86},[25,9012,4756],{},[25,9014,9015],{"class":27,"line":92},[25,9016,4761],{},[25,9018,9019],{"class":27,"line":97},[25,9020,4766],{},[25,9022,9023],{"class":27,"line":103},[25,9024,32],{"emptyLinePlaceholder":31},[25,9026,9027],{"class":27,"line":109},[25,9028,32],{"emptyLinePlaceholder":31},[25,9030,9031],{"class":27,"line":114},[25,9032,4779],{},[25,9034,9035],{"class":27,"line":120},[25,9036,4784],{},[25,9038,9039],{"class":27,"line":126},[25,9040,32],{"emptyLinePlaceholder":31},[25,9042,9043],{"class":27,"line":132},[25,9044,32],{"emptyLinePlaceholder":31},[25,9046,9047],{"class":27,"line":138},[25,9048,4797],{},[25,9050,9051],{"class":27,"line":144},[25,9052,32],{"emptyLinePlaceholder":31},[25,9054,9055],{"class":27,"line":150},[25,9056,4806],{},[25,9058,9059],{"class":27,"line":156},[25,9060,4811],{},[25,9062,9063],{"class":27,"line":162},[25,9064,4816],{},[25,9066,9067],{"class":27,"line":168},[25,9068,4821],{},[25,9070,9071],{"class":27,"line":174},[25,9072,4826],{},[25,9074,9075],{"class":27,"line":180},[25,9076,4831],{},[25,9078,9079],{"class":27,"line":186},[25,9080,2700],{},[25,9082,9083],{"class":27,"line":191},[25,9084,32],{"emptyLinePlaceholder":31},[25,9086,9087],{"class":27,"line":197},[25,9088,4806],{},[25,9090,9091],{"class":27,"line":203},[25,9092,4848],{},[25,9094,9095],{"class":27,"line":1134},[25,9096,4816],{},[25,9098,9099],{"class":27,"line":1140},[25,9100,4821],{},[25,9102,9103],{"class":27,"line":1146},[25,9104,4861],{},[25,9106,9107],{"class":27,"line":1152},[25,9108,4866],{},[25,9110,9111],{"class":27,"line":1158},[25,9112,4871],{},[25,9114,9115],{"class":27,"line":1163},[25,9116,4876],{},[25,9118,9119],{"class":27,"line":1169},[25,9120,32],{"emptyLinePlaceholder":31},[25,9122,9123],{"class":27,"line":1175},[25,9124,4885],{},[25,9126,9127],{"class":27,"line":1181},[25,9128,1576],{},[25,9130,9131],{"class":27,"line":1187},[25,9132,2700],{},[25,9134,9135],{"class":27,"line":1193},[25,9136,32],{"emptyLinePlaceholder":31},[25,9138,9139],{"class":27,"line":1199},[25,9140,4902],{},[25,9142,9143],{"class":27,"line":1204},[25,9144,4907],{},[25,9146,9147],{"class":27,"line":1210},[25,9148,4912],{},[25,9150,9151],{"class":27,"line":1216},[25,9152,4917],{},[25,9154,9155],{"class":27,"line":1222},[25,9156,4922],{},[25,9158,9159],{"class":27,"line":1227},[25,9160,4927],{},[25,9162,9163],{"class":27,"line":1233},[25,9164,32],{"emptyLinePlaceholder":31},[25,9166,9167],{"class":27,"line":3224},[25,9168,4936],{},[25,9170,9171],{"class":27,"line":3229},[25,9172,4941],{},[25,9174,9175],{"class":27,"line":3234},[25,9176,4946],{},[25,9178,9179],{"class":27,"line":3239},[25,9180,4951],{},[25,9182,9183],{"class":27,"line":3244},[25,9184,4956],{},[25,9186,9187],{"class":27,"line":3249},[25,9188,4961],{},[25,9190,9191],{"class":27,"line":3254},[25,9192,4966],{},[25,9194,9195],{"class":27,"line":3259},[25,9196,4971],{},[25,9198,9199],{"class":27,"line":3264},[25,9200,4976],{},[25,9202,9203],{"class":27,"line":3269},[25,9204,2553],{},[25,9206,9207],{"class":27,"line":3274},[25,9208,4985],{},[25,9210,9211],{"class":27,"line":3279},[25,9212,32],{"emptyLinePlaceholder":31},[25,9214,9215],{"class":27,"line":3284},[25,9216,4994],{},[25,9218,9219],{"class":27,"line":3289},[25,9220,4999],{},[25,9222,9223],{"class":27,"line":3294},[25,9224,32],{"emptyLinePlaceholder":31},[25,9226,9227],{"class":27,"line":3299},[25,9228,32],{"emptyLinePlaceholder":31},[25,9230,9231],{"class":27,"line":3304},[25,9232,5012],{},[25,9234,9235],{"class":27,"line":3309},[25,9236,5017],{},[25,9238,9239],{"class":27,"line":3314},[25,9240,5022],{},[25,9242,9243],{"class":27,"line":3319},[25,9244,5027],{},[25,9246,9247],{"class":27,"line":3324},[25,9248,5032],{},[25,9250,9251],{"class":27,"line":3329},[25,9252,5037],{},[25,9254,9255],{"class":27,"line":3334},[25,9256,5042],{},[25,9258,9259],{"class":27,"line":3339},[25,9260,5047],{},[25,9262,9263],{"class":27,"line":3344},[25,9264,5052],{},[25,9266,9267],{"class":27,"line":3349},[25,9268,5057],{},[25,9270,9271],{"class":27,"line":3354},[25,9272,5062],{},[25,9274,9275],{"class":27,"line":3360},[25,9276,5067],{},[25,9278,9279],{"class":27,"line":3366},[25,9280,5072],{},[25,9282,9283],{"class":27,"line":3371},[25,9284,5077],{},[25,9286,9287],{"class":27,"line":3376},[25,9288,5082],{},[25,9290,9291],{"class":27,"line":3381},[25,9292,5087],{},[25,9294,9295],{"class":27,"line":3386},[25,9296,5092],{},[25,9298,9299],{"class":27,"line":3391},[25,9300,5097],{},[25,9302,9303],{"class":27,"line":3396},[25,9304,5087],{},[25,9306,9307],{"class":27,"line":3401},[25,9308,32],{"emptyLinePlaceholder":31},[25,9310,9311],{"class":27,"line":3406},[25,9312,5110],{},[25,9314,9315],{"class":27,"line":3411},[25,9316,2626],{},[25,9318,9319],{"class":27,"line":3416},[25,9320,2392],{},[238,9322,2265],{},[238,9324,9325],{},[1594,9326,5127],{"href":5125,"rel":9327},[1598],[238,9329,9330],{},[1594,9331,5134],{"href":5132,"rel":9332},[1598],[208,9334,210],{},{"title":20,"searchDepth":35,"depth":35,"links":9336},[9337],{"id":4669,"depth":35,"text":4669,"children":9338},[9339,9340],{"id":4677,"depth":41,"text":4678},{"id":4695,"depth":41,"text":4695},[5144],{},{"title":4664,"description":5145},[1493,1501,5144,5151],1784796400924]